Logo

Checkout Merchant API Reference

1.4

Introduction

The reference is your key to a comprehensive understanding of the Checkout API.

Before interact with APIs merchant should be authenticated. Each Idempotent APIs requires X-Idempotency-Key on the request header.

Code samples

Samples requests and responses are shown for each endpoint. Requests are in cURL format. In order to work with APIs, X-Idempotency-Key should be provided. Below idempotent required APIs are defined. Each POST API is retryable. With same idempotency key those APIs can be retried in case of 5xx errors.

Test Cases

IDEndpointCasePre-conditionsStepsExpected
P1.1POST /v1/paymentscreate payment1. Merchant should be authenticated.
2. Merchant should obtain terminalId and merchantId for payments.
1. send create payment request with confirmation type REDIRECT to see checkout page.
2. redirect to confirmation url.
3. check payment methods availability.
4. complete payment with relevant flows (see integration scenarios).
1. payment response with status pending, confirmation url and etc.
P1.2POST /v1/payments/{id}check payment status1. Merchant should be authenticated.
2. Payment ID should be available.
1. send check payment1. payment response with details
P1.3POST /v1/refundscreate refund1. Merchant should be authenticated.
2. Original ID should be available.
3. Refund amount should be available.
4. Merchant balance should be sufficient to make payment.
5. Amount should not be greater than original amount.
1. send create refund request1. refund response with status succeeded or canceled.
P1.4POST /v1/refunds/{id}check refund status1. Merchant should be authenticated.
2. Refund ID should be available.
1. send check refund1. refund response with details

Test Data

merchantId — E1040009, terminalId — E1040009

Card: 4169738886501026 - 369 - 1025

Supported endpoints – URLs

Use the following base URLs depending on your environment:

EnvironmentURL
Preprodhttps://preapi.birpay.az
Productionhttps://api.birpay.az