Cancellation of the created and unpaid payment
info
The payment cancellation can be applied to payments that meet the following conditions:
- method =
purchase
абоauth
- status =
init
- mode =
hosted
Parameter | Type | Required | Description |
---|---|---|---|
pos_id | UUID | ✅ | Merchant's identifier (POS_ID ) |
order_id | String | ✅ | Unique identified of order on the merchant side |
Request example:
curl --location --request POST 'https://cpay.tranzzo.com/api/v1/pos/{{pos_id}}/order/{{order_id}}/cancel' \
--header 'X-API-Key: {{X-API-Key}}' \
--header 'X-API-Auth: CPAY {{API-KEY}}:{{API_SECRET}}'
Response parameters:
Parameter | Type | Description |
---|---|---|
payment_id | UUID | Unique Tranzzo payment identifier |
order_id | String(≤256) | Unique identifier of order |
gateway_order_id | GW_ID | Unique order identifier in bank acquirer system. |
billing_order_id | BILLING_ID | Unique Tranzzo billing identifier |
pos_id | UUID | Merchant's identifier (POS_ID) |
mode | MODE | hosted |
method | METHOD | Payment method (auth or purchase ) |
amount | Number | Transaction amount |
currency | CURRENCY | Transaction currency (ISO_4217) |
description | String(≤2048) | Payment description |
status | STATUS | Transaction status |
status_code | STATUS_CODE | Tranzzo payment status code |
status_description | STATUS_DESCRIPTION | Tranzzo payment status code description |
user_action_required | Boolean | Either customer action is required to proceed with payment |
user_action_url | URL | If user_action_required is true , user should be redirected to this URL |
eci | ECI | Electronic Commerce Indicator - authentication result of credit card payment on 3D Secure |
mcc | MCC | MCC for this transaction |
options_3ds | String | 3-D Secure flow option |
cc_mask | CC_MASK | Card number mask |
cc_token | CC_TOKEN | Tranzzo card token generated for this card |
cc_token_expiration | String | Token expiration timestamp |
customer_id | String | Customer’s identifier in merchant's system |
customer_ip | String | Customer’s IP address |
customer_fname | String | Customer’s first name |
customer_lname | String | Customer’s last name |
customer_email | String | Customer’s email |
customer_phone | String | Customer’s phone |
customer_country | String | Customer’s country (ISO 3166-1 (alpha-2)). For instance, UA for Ukraine |
customer_city | String | Customer’s city |
customer_birthday | String | Customer’s birthday (format: yyyy-MM-dd ) |
customer_patronym | String | Customer’s patronym |
result_url | URL | Customer will be redirected to this URL after payment. |
created_at | TIMESTAMP | Timestamp when transaction was created |
processed_at | TIMESTAMP | Timestamp when transaction was updated last time |
payload | String | Field for custom data |
Response example:
[
{
"payment_id": "9b1392a5-d030-4e85-b02d-9b7191ea2a5e,
"order_id": "123",
"gateway_order_id": null,
"billing_order_id": null,
"pos_id": "$dc728de1-51ef-4ef1-80f7-3b44b07b5667",
"mode": "hosted",
"method": "purchase",
"amount": 1,
"currency": "UAH",
"description": "Order description",
"status": "failure",
"status_code": "6007",
"status_description": "Payment has cancelled",
"user_action_required": false,
"user_action_url": null,
"eci": null,
"mcc": null,
"options_3ds": "supported",
"cc_mask": null,
"cc_token": null,
"cc_token_expiration": null,
"customer_id": null,
"customer_ip": "194.183.171.239",
"customer_fname": "Tom",
"customer_lname": "Hanks",
"customer_email": "[email protected]",
"customer_phone": "+380999999999",
"customer_country": "UA",
"customer_city": null,
"customer_birthday": null,
"result_url": "https://example.com/result",
"created_at": "2018-10-10T10:10:22.100",
"processed_at": "2018-10-10T10:10:23.300",
"payload": null,
"customer_patronym": null
}
]