API Introduction
Enoding
Our system expects data to be sent encoded in UTF-8.
Using this Content-Type header can help: application/json; charset=UTF-8
HTTP Header
Request HTTP Header
Request | Field Name | Description | Format | Remark |
---|---|---|---|---|
authorization type | Authorization | Bearer access-token , the access- token is assigned by coshine | String, Maximum 64 characters | For example: Bearer EAmHx5ClXw7nB7ai/r2 Nm9vDiPOXBdL/0P4C ZiOHNeY= |
timestamp | Timestamp | Timestamp of the message send | String, Maximum 15 characters | For example: "10567867" UNIX Timestamp |
Response HTTP
Request | Field Name | Description | Format | Remark |
---|---|---|---|---|
timestamp | Timestamp | Timestamp of the message send | String, Maximum 15 characters | For example: "10567867" UNIX Timestamp |
HTTP Status Codes
For each request you send to our API the HTTP status code of the response will already tell you the basic result.
Status Code | Description |
---|---|
200 | Successful request |
307 | Temporary redirect |
400 | Bad request. This might either point to e.g. invalid parameters or values sent. It's also returned if the payment failed e.g. because the acquirer declined. |
401 | Invalid authorization header provided |
403 | Invalid access token provided |
404 | Requested resource or endpoint is not found. I.e. endpoint/url doesn't exist. This can also be caused by typos like POST /v3/payments instead of payments or wrong IDs like GET /v3/payments/{id} where no payment with {id} exists. |
Notification
Async notifications occur to notify your system the response of the authorization. The Webhook notification contains only transaction id and the latest status of the transaction. If you want more information ,you may use Retrieve Transaction API to get more detail.
EastPay will consider the delivery of the Webhook notification as successful if your system responds with a successful acknowledgement message containing HTTP 200 Status Code within 2 seconds. EastPay attempts to send notifications in the same sequence in which updates to the transactions occurred unless the notification requires re-delivery. The re-delivery occurs when the initial notification is not delivered successfully or the acknowledgement message is not received successfully. In such cases, EastPay attempts to re-deliver notifications up to 6 times within 1 days after the event occurred. This may result in duplicate notifications being sent to your system.
Configuring Webhook Notifications
You can configure a global notification URL in portal to receive notifications for all authorization notification at this URL.
Notification Message Layout
Request:
Field Name | Description | Format | Required | Remark |
---|---|---|---|---|
tranStatus | Transaction Status | Maximum 3 characters | Required | Response code (DE39) |
Alternatively, you can perform a Retrieve Transaction API using the” transaction id” in the received notification to obtain the changed details.