Logo

Checkout Merchant API Reference

1.4

Status Codes

HTTP response codes are used to indicate general classes of success and error.

Success Code

HTTP Status CodeDescription
200Successfully processed request.
201Resource is created.

Error Codes

HTTP Status CodeDescription
400Bad request. Request format or parameters are invalid.
401Unauthorized. Authentication credentials are missing or invalid.
403Forbidden. Merchant does not have access to requested resource.
404Not found. Requested resource does not exist.
409Conflict. For example, duplicate request with different idempotency key or invalid state.
422Unprocessable entity. Validation errors for business rules.
429Too many requests. Rate limit exceeded.
500Internal server error. Unexpected error on BirPay side.

Payment Codes

CodeDescription
PENDINGPayment is created and waiting for customer action.
SUCCEEDEDPayment is completed successfully and captured.
CANCELEDPayment is canceled by merchant or system.
REFUNDEDPayment amount is fully refunded.
PARTIALLY_REFUNDEDPart of the payment amount is refunded.
FAILEDPayment attempt failed. Customer should try again.

Payment Cancelation

Payment can be canceled by merchant, customer or payment network. Each party has its own cancelation reasons.

PartyDescription
CHECKOUTInternal schedulers continuously monitor payments to finalize them. If a payment is eligible for cancellation, the system will cancel it as part of the checkout process.
MERCHANTIf merchant wants to cancel payment before customer pays it can use cancel API. In this case cancelation party will be merchant.
PAYMENT_NETWORKM10, Birbank, or the bank can also cancel the payment. In such cases, the cancellation is initiated by the payment network.
ReasonDescription
CANCELED_BY_MERCHANTWhen merchant cancels payment.
CANCELED_BY_PAYMENT_NETWORKWhen payment network cancels payment.
EXPIRED_ON_CONFIRMATIONWhen customer does not confirm payment in time.
INSUFFICIENT_FUNDSWhen customer does not have sufficient funds.
THREE_DS_VERIFICATION_FAILEDWhen 3DS verification is failed.
EXPIRED_ON_CAPTURESuch as when the capture is not performed in time.
ISSUER_DECLINEFor card payments, if the issuer declines to process the payment, the transaction will fail and the customer will be shown a failure page.
GENERAL_DECLINESuch declines are uncommon but can occur in extreme cases.