RRoyal Pay API docs
Menu

Errors

Every error answers with a non-2xx HTTP status and this body:

Pay-in endpoints
{ "success": false, "message": "Invalid access key or secret key" }
Payout endpoints
{ "status": false, "message": "Invalid access key or secret key" }

Show message in your logs. Decide what to do from the HTTP status, and for 400 and 409 from the message.

HTTPMeaningRetry?
400A field is missing or invalid.No: fix the request.
401Wrong or missing access key or secret key.No: check your keys.
403The transaction belongs to another merchant, or the request came from somewhere not allowed.No.
404No such transaction, or no such endpoint.No.
409Conflicts with the current state: the orderId was used with different details, new payments are paused, or the pay-in can't take a UTR any more.No.
415The body isn't JSON: send Content-Type: application/json.No: fix the request.
500Something failed on our side (Something went wrong).Yes, with backoff. Pay-in creation is safe to retry with the same orderId.

Messages #

MessageHTTPWhere
Access key is required / Secret key is required400pay-ins
orderId is required, userId is required, webhookUrl is required, redirectUrl is required400create
transactionId is required, utrNumber is required400status, UTR
Invalid amount400create, payouts
A valid HTTPS URL is required400create, payouts
Invalid UTR number400UTR
This payment is already accepted400UTR
A payment has already been accepted with this UTR number400UTR
Invalid request / Expected a JSON object400any
Invalid access key or secret key401any
Access key and secret key are required401payouts
Transaction does not belong to this merchant403status, UTR
Transaction not found404status, UTR
Order ID already used with different details409create, payouts
New payments are paused for this merchant409create
Payment cannot be submitted in this state409UTR
Expected JSON415any POST
Something went wrong500any