Testing for Payout API
Rapyd provides a sandbox environment where you can test your payout code.
The following sections describe testing capabilities of payout functionality.
How-To Procedures
BIC/SWIFT Numbers for Testing
When you test API calls for creating beneficiaries or payouts in the sandbox, you can use specific BIC/SWIFT numbers to simulate successful responses and errors in the production environment.
BIC/SWIFT Number for Successful Response
Use this BIC/SWIFT number in the sandbox to simulate a successful response:
BARCGB22
BIC/SWIFT Numbers for Errors
Use the following BIC/SWIFT numbers in the sandbox to simulate errors:
IBAN | Type of Error |
---|---|
BARCGB23 | INVALID_SWIFT_BIC(NOT_FOUND) The BIC/SWIFT number was not recognized. |
BARCGB22A | INVALID_SWIFT_BIC(LENGTH) Length of BIC/SWIFT is not valid, and must be either 8 or 11 characters long. |
Examples
Create Beneficiary with Vaild BIC/SWIFT
curl --location --request POST 'https://sandbox.rapyd.net/v1/payouts/beneficiary' \ --header 'Content-Type: application/json' \ --header 'access_key: AAFEB92CD37F' \ --header 'salt: 54b0ff69b5d85' \ --header 'timestamp: 1652618791' \ --header 'signature: ZjQ2Yzk1YzQ4Y2FjMTNTM2YzVlYTcxOGVjZjFlODI1YTMwZg==' \ --data-raw '{ "category": "bank", "bank_name": "Bank of Merchants", "country": "CA", "currency": "USD", "entity_type": "individual", "first_name": "John", "last_name": "Doe", "identification_type": "identification_id", "identification_value": "12p3456178h9", "merchant_reference_id": "JDho00ep1", "address": "1 Main Street", "city": "Montreal", "state": "Quebec", "postcode": "12345", "account_number": "1234p56ph007", "bic_swift": "BARCGB22" }' { "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "4948467d-1c90-4fb5-95e9-3353c8ae1a43" }, "data": { "id": "beneficiary_7e4912f745a5fa9cdfc9f457c9bb44f7", "last_name": "Doe", "first_name": "John", "country": "CA", "entity_type": "individual", "address": "1 Main Street", "name": "John Doe", "postcode": "12345", "city": "Montreal", "state": "Quebec", "account_number": "1234p56ph007", "currency": "USD", "identification_type": "identification_id", "identification_value": "12p3456178h9", "bank_name": "Bank of Merchants", "merchant_reference_id": "JDho00ep1", "bic_swift": "BARCGB22", "category": "bank" } }
Create Beneficiary with Invalid BIC/SWIFT- Not Found
curl --location --request POST 'https://sandbox.rapyd.net/v1/payouts/beneficiary' \ --header 'Content-Type: application/json' \ --header 'access_key: AAFEB92CC763D37F' \ --header 'salt: b1f8c5d0a35' \ --header 'timestamp: 1652618572' \ --header 'signature: ODZjMWNhYmEzc2ZYWNlMGI2Yg==' \ --data-raw '{ "category": "bank", "bank_name": "Bank of Merchants", "country": "CA", "currency": "USD", "entity_type": "individual", "first_name": "John", "last_name": "Doe", "identification_type": "identification_id", "identification_value": "12p3456178h9", "merchant_reference_id": "JDho00ep1", "address": "1 Main Street", "city": "Montreal", "state": "Quebec", "postcode": "12345", "account_number": "1234p56ph007", "bic_swift": "BARCGB23" }' { "status": { "error_code": "INVALID_SWIFT_BIC(NOT_FOUND)", "status": "ERROR", "message": "Was not found. Check that it is correct.", "response_code": "INVALID_SWIFT_BIC(NOT_FOUND)", "operation_id": "fd87a0d1-ea86-438d-a50c-c2469914801d" } }
Create Beneficiary with Invalid BIC/SWIFT Length
curl --location --request POST 'https://sandbox.rapyd.net/v1/payouts/beneficiary' \ --header 'Content-Type: application/json' \ --header 'access_key: AAFEB92CC763F937F' \ --header 'salt: 3eaccf45be3f9' \ --header 'timestamp: 1652618939' \ --header 'signature: YWFmNWNhM2RiNTNmMzAjZTA0NTU5MDRiMQ==' \ --data-raw '{ "category": "bank", "bank_name": "Bank of Merchants", "country": "CA", "currency": "USD", "entity_type": "individual", "first_name": "John", "last_name": "Doe", "identification_type": "identification_id", "identification_value": "12p34561789", "merchant_reference_id": "JDho0ep1", "address": "1 Main Street", "city": "Montreal", "state": "Quebec", "postcode": "12345", "account_number": "1234p56p007", "bic_swift": "BARCGB22A" }' { "status": { "error_code": "INVALID_SWIFT_BIC(LENGTH)", "status": "ERROR", "message": "Invalid length. Only 8 or 11 digits", "response_code": "INVALID_SWIFT_BIC(LENGTH)", "operation_id": "66651be4-3fa1-4e54-8ba3-6890b0399dde" } }
Related Information
IBAN Numbers for Testing
When you test API calls for creating beneficiaries or payouts in the sandbox, you can use specific IBAN numbers for successful responses and errors that simulate the production environment.
IBAN Number for Successful Response
Use this IBAN in the sandbox to simulate a successful response:
DE75512108001245126199
IBAN Numbers for Errors
Use the following IBAN numbers in the sandbox to simulate errors:
IBAN | Type of Error |
---|---|
DR75512108001245126199 1275512108001245126199 | INVALID_IBAN(COUNTRY_NOT_SUPPORTED). Country not supported or not entered. |
DE75512108001245126191 | INVALID_IBAN(CHECK_DIGIT). The characters in the IBAN are not valid. |
DE755121080012451261 DE755121080012451261991 | INVALID_IBAN(LENGTH). Length of IBAN is not valid. |
Examples
Create Beneficiary with Vaild IBAN
curl --location --request POST 'https://sandbox.rapyd.net/v1/payouts/beneficiary' \ --header 'Content-Type: application/json' \ --header 'access_key: AAFEB92CC763F' \ --header 'salt: 4dc43425598' \ --header 'timestamp: 1652192810' \ --header 'signature: ZGRlNDQ0NWViWZmNjc2ZQ==' \ --data-raw '{ "category": "bank", "country": "CA", "currency": "USD", "entity_type": "individual", "first_name": "John", "last_name": "Doe", "identification_type": "identification_id", "identification_value": "1234561789", "merchant_reference_id": "JDoe1", "address": "1 Main Street", "city": "Montreal", "state": "Quebec", "postcode": "12345", "account_number": "1234p567", "iban": "DE75512108001245126199" }' { "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "9e5d6bb7-4554-4778-88ee-b43a11680f0b" }, "data": { "id": "beneficiary_87320c751a9861ef11b28f4f8199cc59", "last_name": "Doe", "first_name": "John", "country": "CA", "entity_type": "individual", "address": "1 Main Street", "name": "John Doe", "postcode": "12345", "city": "Montreal", "state": "Quebec", "account_number": "1234p567", "currency": "USD", "identification_type": "identification_id", "identification_value": "1234561789", "bank_name": "Societe Generale", "merchant_reference_id": "JDoe1", "iban": "DE75512108001245126199", "category": "bank" } }
Create Beneficiary with Invalid IBAN - Country not Supported
curl --location --request POST 'https://sandbox.rapyd.net/v1/payouts/beneficiary' \ --header 'Content-Type: application/json' \ --header 'access_key: AAFEB92C2D37F' \ --header 'salt: a4195b9032dbe' \ --header 'timestamp: 1652193213' \ --header 'signature: MzUwYTc4MDUjZjZGUzYzcxNiZg==' \ --data-raw '{ "category": "bank", "country": "CA", "currency": "USD", "entity_type": "individual", "first_name": "John", "last_name": "Doe", "identification_type": "identification_id", "identification_value": "12p34561789", "merchant_reference_id": "JDoep1", "address": "1 Main Street", "city": "Montreal", "state": "Quebec", "postcode": "12345", "account_number": "1234p56p7", "iban": "DR75512108001245126199" }' { "status": { "error_code": "INVALID_IBAN(COUNTRY_NOT_SUPPORTED)", "status": "ERROR", "message": "", "response_code": "INVALID_IBAN(COUNTRY_NOT_SUPPORTED)", "operation_id": "5fc0ee3c-4d55-496e-84f0-9c46da396db6" } }
Create Beneficiary with Invalid IBAN Length
curl --location --request POST 'https://sandbox.rapyd.net/v1/payouts/beneficiary' \ --header 'Content-Type: application/json' \ --header 'access_key: AAFEB97F' \ --header 'salt: a7fbec154a934' \ --header 'timestamp: 1652193526' \ --header 'signature: MmYzOTR1Y2EyNjc5N2VhMw==' \ --data-raw '{ "category": "bank", "country": "CA", "currency": "USD", "entity_type": "individual", "first_name": "John", "last_name": "Doe", "identification_type": "identification_id", "identification_value": "12p34561789", "merchant_reference_id": "JDoep1", "address": "1 Main Street", "city": "Montreal", "state": "Quebec", "postcode": "12345", "account_number": "1234p56p7", "iban": "DE755121080012451261" }' { "status": { "error_code": "INVALID_IBAN(LENGTH)", "status": "ERROR", "message": "", "response_code": "INVALID_IBAN(LENGTH)", "operation_id": "7723da48-f3f5-4ede-9abd-b6a411791308" } }
Create Beneficiary with Invalid IBAN Characters
curl --location --request POST 'https://sandbox.rapyd.net/v1/payouts/beneficiary' \ --header 'Content-Type: application/json' \ --header 'access_key: AAFEB9272D37F' \ --header 'salt: 596d2abc434a830' \ --header 'timestamp: 1652193404' \ --header 'signature: NGViOWRlNjZiMmNiYzRjZWI1MzcjOTQ2OA==' \ --data-raw '{ "category": "bank", "country": "CA", "currency": "USD", "entity_type": "individual", "first_name": "John", "last_name": "Doe", "identification_type": "identification_id", "identification_value": "12p34561789", "merchant_reference_id": "JDoep1", "address": "1 Main Street", "city": "Montreal", "state": "Quebec", "postcode": "12345", "account_number": "1234p56p7", "iban": "DE75512108001245126191" }' { "status": { "error_code": "INVALID_IBAN(CHECK_DIGIT)", "status": "ERROR", "message": "", "response_code": "INVALID_IBAN(CHECK_DIGIT)", "operation_id": "c6c187e4-3a50-4541-b510-03987544f338" } }
Related Information
Simulating Quarantine Under Review Webhook
Trigger a Quarantine Under Review Webhook in the sandbox.
Create a bank payout to a beneficiary with the following name: John Doe. See Create Payout.
This type of payout triggers the Quarantine Under Review webhook.
Create Payout
curl --location 'https://sandboxapi.rapyd.net/v1/payouts' \ --header 'Content-Type: application/json' \ --header 'access_key: 4887ABA571B2D202B773' \ --header 'salt: 6fad3ed4a186f559b9b16cb7' \ --header 'timestamp: 1690800488' \ --header 'signature: ZjMzMzM2NmZiZDU2YjkyMGQ1MTc1OTFhOGQ0YmNhNjE2M2ZlZTc1NTg4MjE5MzU0MWM3ZjEwOGNmOWQ0NTliMw==' \ --data-raw '{ "beneficiary": { "name": "John Doe", "address": "456 Second Street", "email": "jdoe@rapyd.net", "country": "GB", "city": "Anytown", "postcode": "10101", "account_number": "BG96611020345678", "bank_name": "gb_local_bank", "identification_type": "passport", "identification_value": "123456789", "bic_swift": "BUINBGSF", "ach_code": "123456789" }, "beneficiary_country": "GB", "beneficiary_entity_type": "individual", "description": "Payout - Bank Transfer: Beneficiary/Sender objects", "merchant_reference_id": "GHY-1YU-HUJ-POI", "ewallet": "ewallet_4f1757749b8858160274e6db49f78ff3", "payout_amount": "110", "payout_currency": "GBP", "payout_method_type": "gb_local_bank", "sender": { "name": "Jane Doe", "address": "123 First Street", "city": "Anytown", "state": "NY", "date_of_birth": "22/02/1980", "postcode": "12345", "phonenumber": "621212938122", "remitter_account_type": "Individual", "source_of_income": "salary", "identification_type": "License No", "identification_value": "123456789", "purpose_code": "ABCDEFGHI", "account_number": "123456789", "beneficiary_relationship": "client" }, "sender_country": "NL", "sender_currency": "USD", "sender_entity_type": "individual", "statement_descriptor":"GHY* Limited Access 800-123-4567", "metadata": { "merchant_defined": true } }'
Response
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "6225f294-1ece-47d6-a74a-ed01952a4a6e" }, "data": { "id": "payout_5a0b41a4726582cd51d0aafcf71469f2", "payout_type": "bank", "payout_method_type": "gb_local_bank", "amount": 110, "payout_currency": "GBP", "sender_amount": 110, "sender_currency": "USD", "status": "Hold", "sender_country": "NL", "sender": { "id": "sender_592f55c6b7542741c92034f245461e00", "country": "NL", "entity_type": "company", "name": "BV Services Limited", "company_name": "BV Services Limited", "currency": "USD" }, "beneficiary_country": "GB", "beneficiary": { "id": "beneficiary_c2854a842ae73a785ed243f15d2e198e", "country": "GB", "entity_type": "company", "name": "John Doe", "account_number": "123456789", "currency": "GBP", "sort_code": "ABCDEFGHI" }, "fx_rate": 0.7440967, "instructions": [ { "name": "instructions", "steps": [ { "step1": "The funds will be transferred to the provided account details of the beneficiary." } ] } ], "ewallets": [ { "ewallet_id": "ewallet_20becfae6ed603c94fe7306103bcc5c5", "amount": 110, "percent": 100 } ], "metadata": {}, "description": "Payout - Bank Transfer: Beneficiary/Sender objects", "created_at": 1690275532, "payout_fees": null, "expiration": null, "paid_at": null, "identifier_type": null, "identifier_value": null, "error": null, "paid_amount": 0, "statement_descriptor": "GHY* Limited Access 800-123-4567", "gc_error_code": "NOT_IMPLEMENTED", "estimated_time_of_arrival": null } }
Quarantine Under Review Webhook
{ "id": "wh_f335a2a51e8a46cfa5e4c1d719076d59", "data": { "token": "qm_1938907a9c4034736443b7edb05b33d2", "limits": null, "reason": "rapyd_protect", "source": "rapyd_protect", "status": "HLD", "created_at": 1690275532, "error_code": null, "updated_at": 1690275532, "action_type": "create_payout", "resolved_at": 0, "action_flow_id": "d02ed7bf-0234-48c8-8a16-1970d1d54aab", "duplicated_action_flow_id": null }, "type": "QUARANTINE_UNDER_REVIEW", "status": "NEW", "created_at": 1690275532, "trigger_operation_id": "f0c9ecbf-a238-4fa9-b0d5-a00aa3e322e6" }