Status Codes
HTTP response codes are used to indicate general classes of success and error.
Success Code
|
| 200 | Successfully processed request. |
| 201 | Resource is created. |
Error Codes
|
| 400 | Bad request. Request format or parameters are invalid. |
| 401 | Unauthorized. Authentication credentials are missing or invalid. |
| 403 | Forbidden. Merchant does not have access to requested resource. |
| 404 | Not found. Requested resource does not exist. |
| 409 | Conflict. For example, duplicate request with different idempotency key or invalid state. |
| 422 | Unprocessable entity. Validation errors for business rules. |
| 429 | Too many requests. Rate limit exceeded. |
| 500 | Internal server error. Unexpected error on BirPay side. |
Payment Codes
|
| PENDING | Payment is created and waiting for customer action. |
| SUCCEEDED | Payment is completed successfully and captured. |
| CANCELED | Payment is canceled by merchant or system. |
| REFUNDED | Payment amount is fully refunded. |
| PARTIALLY_REFUNDED | Part of the payment amount is refunded. |
| FAILED | Payment 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.
|
| CHECKOUT | Internal 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. |
| MERCHANT | If merchant wants to cancel payment before customer pays it can use cancel API. In this case cancelation party will be merchant. |
| PAYMENT_NETWORK | M10, Birbank, or the bank can also cancel the payment. In such cases, the cancellation is initiated by the payment network. |
|
| CANCELED_BY_MERCHANT | When merchant cancels payment. |
| CANCELED_BY_PAYMENT_NETWORK | When payment network cancels payment. |
| EXPIRED_ON_CONFIRMATION | When customer does not confirm payment in time. |
| INSUFFICIENT_FUNDS | When customer does not have sufficient funds. |
| THREE_DS_VERIFICATION_FAILED | When 3DS verification is failed. |
| EXPIRED_ON_CAPTURE | Such as when the capture is not performed in time. |
| ISSUER_DECLINE | For card payments, if the issuer declines to process the payment, the transaction will fail and the customer will be shown a failure page. |
| GENERAL_DECLINE | Such declines are uncommon but can occur in extreme cases. |