You can try to simulate disbursement in test mode, we suggest you use the value that has been set in this scenario
Integration Checklist:
1. Retrieve your API Key
We provide unique API keys for Development and Production environments. You can retrieve these from your Dashboard. Your API keys should be kept private, so do not share your secret API keys.
To successfully authenticate with Xendit’s API, you must append a colon and Base 64 encode the API key. All API requests should be made over HTTPS instead of HTTP (all calls made over plain HTTP will fail).
2. Set callback URL
If the payout was successfully executed, we send you a callback notifying you that the payout was completed. If the payout was not successfully executed, we send you a callback notifying you that payout has failed along with the appropriate failure code, to facilitate your decision on whether to send us another request to create payout or return the failure result to your customer.
To set this up, you can set up the callback URL in your dashboard settings. Nominate a callback URL for product Payouts V2.
3. Authentication
To ensure that the HTTP requests we receive are really from you, basic authentication using your API key must be applied to each request sent to us.
Your individual API key should be provided by your AM. This key will also be used by Xendit to identify which merchant is using the APIs. Make sure to store this key securely.
Xendit’s API Gateway uses basic access authentication. Use the format {{username}}:{{password}}; insert your API key as the username and leave the password blank. Then encode the string to Base64. The resulting string must be included in the Authorization HTTP header for every API call made.
Sample authentication string (in plain text) - take note of the colon:
xnd_development_P4qDfOss0OCpl8RtKrROHjaQYNCk9dN5lSfk+R1l9Wbe+rSiCwZ3jw==: |
Sample base64 encoded string:
eG5kX2RldmVsb3BtZW50X1A0cURmT3NzME9DcGw4UnRLclJPSGphUVlOQ2s5ZE41bFNmaytSMWw5V2JlK3JTaUN3WjNqdz09Og== |
Sample HTTP Authorization header:
Authorization: Basic eG5kX2RldmVsb3BtZW50X1A0cURmT3NzME9DcGw4UnRLclJPSGphUVlOQ2s5ZE41bFNmaytSMWw5V2JlK3JTaUN3WjNqdz09Og== |
All the API requests should be made over HTTPS instead of HTTP (all calls made over plain HTTP will fail). Note that all requests made in the test environment will not be relayed to the banking networks and will thus not cost you anything.
Please allow us to emphasize: For the security of your funds, your API keys must be kept private, so do not share your secret API keys under any circumstance.
4. Funds for Testing
After receiving sandbox credentials and setting up your callback URL, you can immediately start testing! Each sandbox account is pre-loaded with a test balance of IDR 1,000,000,000 or PHP 1,000,000 for use in simulating transactions.
If you need more funds for testing, feel free to reach out to your account manager or our support team to increase the balance of your test account.
Note: We recommend using Postman collections for testing. Please see our postman integrations page for more details on how to set up your collections.
Testing Disbursement Instruction:
- Be sure to use your Development API keys to test disbursements and set your callback URL on your dashboard setting
- Post a Create Disbursement request using any of the following test details to simulate successful and failed disbursements.
- When a Disbursement is successfully created (but still in the process of sending out), you will receive a response with status “PENDING”.
- When the Disbursement has been successfully executed, you will receive a callback at your callback URL with status “COMPLETED”. If the disbursement failed, you will receive a callback at your callback URL with status “FAILED”; refer to the failure_code for more details of the failure.
- Alternatively, the Disbursement status can be identified via the GET Disbursement endpoints based on the ID or External id
Testing for specific responses and errors
To test specific response or error, please input the criteria based on the test scenario in this table