The Payretailers API provides a sandbox environment for testing some of our Payment Methods.
For testing once in the live enviroment, you may use the testMode parameter in your request to make the difference between real and test transactions. On this page you will find details about how you can test our payment solution when you need to.
Data Validation Rules
Our system is designed to automatically reject transactions made with fake data when detected. Using sequential series of numbers as phone
and personalId
value will automatically blacklist the user. Please avoid using these on dummy or test scenarios. (e.g. 12345
, 98765
, etc.)
Testing Transactions
You can use the field testMode
in your POST Create Paywall and POST Create Transaction request to test your transactions. testMode
is a boolean that, when set to true, has the following effect:
- The transaction will never be processed by the system;
- The transaction status will be "PENDING" forever;
- You will be able to hide the transaction from your Back Office;
Testing Payouts
You can use the variable testMode
in your POST Create Payout request to test your payouts as well. It has the same effect as when used on transactions, meaning your payout will never be processed and won't be reflected on your end.
You can also use the variable TestModeCallBackStatus
if you want to receive a specific callback status. If no value is set, if the parameter is not added to the request, or if an invalid value is used, the status returned by default will be ERROR
.
Accepted values:Â PENDING
, PROCESSED
, ACCEPTED
, FINISHED
, ERROR
Sending Simulated Callbacks
We also provide an endpoint where you can launch different status callbacks for both transactions and payouts, here you can find the required headers, endpoint URL and the expected body formats:
Headers:
Name | Value |
---|---|
Content-Type | application/json |
Ocp-Apim-Subscription-Key | https://payretailers.readme.io/reference/introduction#api-conventions |
Authorization | https://payretailers.readme.io/reference/authentication |
URL: <https://api.payretailers.com/payments/v2/notifications>
{
"transactionId": "d63e629e-3b8f-469f-1te1-5000ac80ac33",
"notificationUrl": "https://api.test.com/callback/api/payretailers/d63e629e-3b8f-469f-1te1-5000ac80ac33",
"status": "APPROVED"
}
Accepted values:Â PENDING
, APPROVED
, FAILED
, CANCELLED
, EXPIRED
URL: <https://api.payretailers.com/payments/v2/notifications/payouts>
{
"payoutId": "3111135",
"notificationUrl": "https://api.test.com/callback/api/payretailers/3111135",
"statustypecode": "ERROR"
}
Accepted values:Â PENDING
, PROCESSED
, ACCEPTED
, FINISHED
, ERROR