Balance & top-up
4 endpoints. Every call is POST https://api.useburj.com/v1/<path> with a JSON body.
Top-up limits
/topup/configMinimum / maximum in USD and SAR, and sandbox: true on the test account.
Body
Send an empty JSON object: {}
Errors
Like every authenticated endpoint, it can also return AUTH_UNAUTHORIZED (401), RATE_LIMITED (429) and INTERNAL_ERROR (500). See all error codes.
Create a payment link
/topup/createA MyFatoorah link (mada, cards, Apple Pay) in SAR. In the sandbox it is a simulated payment page with Pay / Fail buttons. After paying, the payer is sent to callbackUrl?paymentId=….
Body
amountnumberrequiredAmount
currencystringoptionalUSD(default) orSARlanguagestringoptionalAR(default) orENcallbackUrlstringoptionalhttps URL to return to after paying
errorUrlstringoptionalhttps URL after a failed payment (defaults to callbackUrl)
Errors
Like every authenticated endpoint, it can also return AUTH_UNAUTHORIZED (401), RATE_LIMITED (429) and INTERNAL_ERROR (500). See all error codes.
Confirm a payment
/topup/checkSend paymentId (from the callback URL) or invoiceId. The balance is credited once, when the payment is confirmed. Returns the status and the current balance.
Body
invoiceIdstringoptionalFrom /topup/create
paymentIdstringoptionalFrom the callback URL
Errors
Like every authenticated endpoint, it can also return AUTH_UNAUTHORIZED (401), RATE_LIMITED (429) and INTERNAL_ERROR (500). See all error codes.
Top-up history
/topup/historyNewest first. paymentUrl is set while the link is unpaid.
Body
statusstringoptionalPENDING, CAPTURED, EXPIRED, CANCELED, AMOUNT_MISMATCH
limitintegeroptionalDefault 50, max 200
Errors
Like every authenticated endpoint, it can also return AUTH_UNAUTHORIZED (401), RATE_LIMITED (429) and INTERNAL_ERROR (500). See all error codes.