Get Transaction Status
Obtain a transaction status
In order to get a status of a transaction with Centili Payment API, you need to send an HTTP GET request with the appropriate transaction ID.
Before initiating a transaction status request you will need to obtain an access token
URL to which a request should be sent
https://capi.centili.com/payments/v3/transactions/{transactionId}
GET transaction status request
https://capi.centili.com/payments/v3/transactions/{transactionId}/pin HTTP/1.1
Host: capi.centili.com:443
Authorization:bearer token
Request parameters
Parameter | Description | Example |
---|---|---|
transactionId | Unique identifier of transaction in Centili system. | 17000002453 |
GET transaction status response
Once a request is received, Centili will synchronously respond with an appropriate HTTP response containing a list of parameters and values in JSON format:
200
Get transaction status successfull
HTTP/1.1 200 OK
Content-Type: application/json
{
"transactionType": "CHARGE",
"country": "rs",
"item": {
"amount": null,
"price": null,
"name": null,
"currency": null
},
"notificationStatus": "DELIVERED",
"subscriber": "381644150105",
"timeCharged": null,
"transactionStatus": "COMPLETED",
"clientData": {
"clientUserId": null,
"clientReference": null
},
"serviceKey": "2ea0e6c989b433d6c591633f91c67e07",
"error": null,
"transactionId": "17000002453",
"operator": "RS_MTS
}
Response parameters
Parameter | Description | Example |
---|---|---|
transactionType | Action that is performed by this transaction. | RENEW, CHARGE, OPT_IN, OPT_OUT, REFUND |
country | Country of end-user, two-letter country code, ISO 3166-1 alpha-2 | rs |
item | Information about the item being sold. See (https://dev.centili.com/docs/transaction-status#item) | { "amount": "1", "price": "10", "name": "item", "currency": "RSD" } |
notificationStatus | Merchant notification request status. | DELIVERED, FAILED, EXCLUDED, PENDING, REJECTED |
subscriber | Customer mobile phone number. NOTE: The number must be in E.164 format, excluding the plus ("+") character. | 381644150105 |
timeCharged | Time the transaction was charged UTC | |
transactionStatus | Current status of the transaction | COMPLETED, FAILED, CANCELED, PENDING |
clientData | Client related parameters. See (https://dev.centili.com/docs/transaction-status#client-data) | { "clientUserId": "usrId1983", "clientReference": "appID1" } |
serviceKey | Centili issued service key, unique for every payment service. Consists of alphanumeric characters and counts up to 32 characters. | 2ea0e6c989b433d6c591633f91c67e07 |
error | ||
transactionId | Unique identifier of transaction in Centili system. | 17000002453 |
operator | Code of Mobile Network Operator in Centiliโs system which end user belongs to. | RS_MTS (for Telekom Serbia) |
Item
Parameter | Description | Example |
---|---|---|
amount | Item quantity | 1 |
price | Item price | 10 |
name | Item name | item |
currency | Item price currency | RSD |
Client Data
Parameter | Description | Example |
---|---|---|
clientUserId | Identification of the customer. | usrId1983 |
clientReference | Unique identification parameter under your system (pass-through variable). | appID1 |
4xx client error / 5xx server error
400 - Bad request parameters - check message for details
401 - Invalid credentials
404 - Transaction not found
500 - Request can not be processed at the current time
HTTP/1.1 404 Not Found
Content-Type: application/json
{
"code": "NOT_FOUND",
"message": "Transaction not found"
}
Parameter | Description | Example |
---|---|---|
code | Error response code | TRANSACTION_NOT_FOUND |
message | Error response message | Transaction not found |
Updated 8 months ago