Testing Payouts
Moyasar provides a Sandbox environment that allows you to test how payouts work without and test different senarios that can occur in production.
To test the payout sandbox you will need to have a test account at Moyasar, create a test account using the following link:
Once you have created the test account, navigate to Settings -> API Keys and copy your secret test API key.
The key should start with the following prefix: sk_test_
Once you have created the test API key, you can register a test account by performing the following API call:
Once the the account is created succesfully, the following response will be returned:
The id field will contain the source_id that you can use later on when making payouts.
To make payouts, please refer to the following documentations:
When making payouts in a sandbox account, all payouts will be paid by default (after the initiated phase).
However, when assigning the purpose to one of the following, the result will be different:
- expenses_services: failed with message Unsupported purpose
- family_assistance: failed with message Sequence number is already used to simulate that the sequence number has been already used within teh B2B provider.
- payroll_benefits: failed with message This account cannot be used to send salaries
- dividend_payment: failed with message Payout attempts exhausted with no result to simulate situation where Moyasar keeps trying to send the payout to B2B API but keeps failing (usually due to B2B API is down or a network issue).