Payouts

Testing Payouts

6min

Introduction

Moyasar provides a Sandbox environment that allows you to test how payouts work without and test different senarios that can occur in production.

Prerequists

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_

Create Test Payout Account

Once you have created the test API key, you can register a test account by performing the following API call:

Curl
HTTP


Once the the account is created succesfully, the following response will be returned:

JSON


The id field will contain the source_id that you can use later on when making payouts.

Making Payouts

To make payouts, please refer to the following documentations:

Test Senarios

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).



Updated 04 Aug 2024
Did this page help you?