Get Payment Merchant Status By Id
GET {{base-url}}/status/{{payment-id}}
Returns the current payment status information. This information includes the Order Id, Trust Signature, Payment Status and the Activation By and Expires On timestamps.
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | The API key for access |
Path
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The payment ID (UUID format) |
Response
{
"activation_by": "string",
"expires_on": "string",
"order_id": "string",
"trust_signature": "string",
"status": "string"
}
payload
| Name | Type | Description |
|---|---|---|
| activation_by | string | The activation timestamp |
| expires_on | string | The expiration timestamp |
| order_id | string | The order ID |
| trust_signature | string | The trust signature |
| status | string | The payment status |
Example
{
"activation_by": "2022-01-01T00:00:00Z",
"expires_on": "2022-01-01T00:00:00Z",
"order_id": "123456",
"trust_signature": "abcdef123456",
"status": "Completed"
}
Errors
| Code | Description |
|---|---|
| 400 | One or more validation errors occurred. |
| 404 | Can't find an GetPaymentMerchantStatusDTO with the parameters provided. |
| 500 | Server Error |
Bad Request Example
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "698b5f0f-6a3e-4d7b-a2e6-9025a1a7cf8e",
"errors": {
"id": ["The id field is required."]
}
}
Not Found Example
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
"title": "Can't find an GetPaymentMerchantStatusDTO with the parameters provided.",
"status": 404,
"traceId": "05faffa9-1dca-4629-934c-cea9b8637b5c"
}
Internal Server Error Example
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "An error occurred.",
"status": 500,
"traceId": "05faffa9-1dca-4629-934c-cea9b8637b5c"
}
Example Usage
Here's an example of how to make a GET request to the /api/v1/status/{payment-id} endpoint using Javascript and the fetch API:
let headersList = {
"Accept": "*/*",
"api-key": "your_api_key"
}
let response = await fetch("http://localhost:3000/api/v1/status/590fbc3e-784e-4519-95b0-08db35c30d2b", {
method: "GET",
headers: headersList
});
let data = await response.text();
console.log(data);
Replace your_api_key with your actual API key.
Expected Response
This is an example of the expected response:
{
"activation_by": "2023-04-06T12:01:13.1803538+00:00",
"expires_on": "2023-04-05T12:11:13.1803555+00:00",
"order_id": "76144",
"trust_signature": "c14593cd6c9a24ac6257ab7cac1bb45f0ff272389e600b21580b0261752b04ae",
"status": "pending"
}