Use this POST request to initiate a transaction related to one of the listed services.
Note: It is essential to consult the list of available services to ensure that the service you wish to use is included.
{{base_url}}/api-services/v2/transaction
Headers
Parameter Name | Value | Mendatory | Description |
---|---|---|---|
apikey | String | Yes | your API key (provided by RichattPay) |
Accept-Language | en: default fr | An optional indicator to specify the preferred language. |
Body
{
//Sender information
"institutionSender": "INSTITUTION_NAME",
"senderId": "SENDER_ID",
"senderGender": "M",
"senderName": "SENDER_NAME",
"senderFstName": "SENDER_FIRSTNAME",
"senderPhone": "SENDER_PHONENUMBER",
"senderEmail": "SENDER_EMAIL",
"senderAddress": "SENDER_ADDRESS",
"senderCity" : "CITY_NAME",
"senderCountry": "COUNTRY_NAME",
"senderNationality": "SENDER_NATIONALITY",
"senderDateOfBirth": "SENDER_BIRTHDATE",
// Beneficiary information
"beneficiaryId": "BENEFICIARY_ID",
"beneficiaryGender": "M",
"beneficiaryName": "BENEFICIARY_NAME",
"beneficiaryFstName": "BENEFICIARY_FIRSTNAME",
"beneficiaryPhone": "BENEFICIARY_PHONENUMBER",
"beneficiaryEmail": "BENEFICIARY_EMAIL",
"beneficiaryAddress": "BENEFICIARY_ADDRESS",
"beneficiaryCity" : "CITY_NAME",
"beneficiaryCountry": "COUNTRY_NAME",
"beneficiaryNationality": "BENEFICIARY_NATIONALITY",
"relationWithSender" : "Moi meme",
//Transfert information
"externalTransactionId": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
"amount": AMOUNT,
"beneficiaryWallet": "26867619",
//"beneficiaryAccountNumber": "********",
"codeService": "MASRVI_WALLET_CASH_IN",
"callbackUrl": "https://secure-3ds.richattpay.com/ping"
}
The variables
Variable | Type | Description | Mandatory |
---|---|---|---|
institutionSender | String(255) | The name of the organization. | Yes |
senderId | String(255) | The identifier of the sender, typically a passport number or similar. Example: BG00145200 | Yes |
senderGender | String(1) | The gender of the sender. Acceptable values: M (Male), F (Female). | Yes |
senderName | String(255) | The last name of the sender. | Yes |
senderFstName | String(255) | The first name of the sender. | Yes |
senderPhone | String(32) | The phone number associated with the sender. | No |
senderEmail | String(255) | The email address of the sender. | No |
senderAddress | String(255) | The postal address of the sender. | No |
senderCity | String(255) | The city of the sender. | Yes |
senderCountry | String(3) | The country of the sender following the ISO 3166-1 alpha-3 specification. Must be exactly 3 characters. | Yes |
senderNationality | String(3) | The nationality of the sender following the ISO 3166-1 alpha-3 specification. Must be exactly 3 characters. | Yes |
senderDateOfBirth | Date | The birth date of the sender in YYYY-MM-DD format. | No |
beneficiaryId | String(255) | The identifier of the beneficiary. | No |
beneficiaryGender | String(1) | The gender of the beneficiary. Acceptable values: M (Male), F (Female). Default value = M | Yes |
beneficiaryName | String(255) | The last name of the beneficiary. | Yes |
beneficiaryFstName | String(255) | The first name of the beneficiary. | Yes |
beneficiaryPhone | String | The phone number associated with the beneficiary. | No |
beneficiaryEmail | String(255) | The email address of the beneficiary. Must be a valid email. | No |
beneficiaryAddress | String(255) | The postal address of the beneficiary. | No |
benefciaryCity | String(255) | The city of the beneficiary. | No |
beneficiaryCountry | String(3) | The country of the beneficiary following the ISO 3166-1 alpha-3 specification. Must be exactly 3 characters. | Yes |
beneficiaryNationality | String(3) | The nationality of the beneficiary following the ISO 3166-1 alpha-3 specification. Must be exactly 3 characters. | Yes |
relationWithSender | String(255) | The relationship of the beneficiary to the sender. | No |
externalTransactionId | String(255) | The external identifier of the transaction. | Yes |
amount | Double | The amount of the transaction. Must be between 100 and 10,000,000 MRU. | Yes |
beneficiaryWallet | String(255) | The wallet number of the beneficiary. Must be an 8-digit number starting with 2, 3, or 4 | Yes |
beneficiaryAccountNumber | String(14) | The account number associated with the transaction. Must be exactly 23 digits (RIB format). Mandatory when service is XXX_BANK_CASH_IN. | Yes |
codeService | String(255) | The code identifying the service used for the transaction. | Yes |
callbackUrl | String(255) | The URL to which transaction notifications will be sent. | Yes |
Example of successful response
{
"code": 200,
"msg": "Transaction created successfully without error,
you are going to receive a confirmation message",
"error": null,
"data": {
"phone": "26867619",
"amount": "50",
"codeService": "SEDAD_WALLET_CASH_IN",
"transactionId": "P2406261439444530000001",
"status": "Pending",
"externalTransactionId": "C898.yu",
"errorType": null
}
}
Examples of error response
To check the error responses, please refer to the list of errors.
Status(514)
{
"code": 514,
"msg": "this id is already used for another transaction",
"error": "externalTransactionId_duplicated",
"data": null
}