Skip to main content

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
ParameterTypeRequiredDescription
pos_idUUIDMerchant's identifier (POS_ID)
order_idStringUnique 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:

ParameterTypeDescription
payment_idUUIDUnique Tranzzo payment identifier
order_idString(≤256)Unique identifier of order
gateway_order_idGW_IDUnique order identifier in bank acquirer system.
billing_order_idBILLING_IDUnique Tranzzo billing identifier
pos_idUUIDMerchant's identifier (POS_ID)
modeMODEhosted
methodMETHODPayment method (auth or purchase)
amountNumberTransaction amount
currencyCURRENCYTransaction currency (ISO_4217)
descriptionString(≤2048)Payment description
statusSTATUSTransaction status
status_codeSTATUS_CODETranzzo payment status code
status_descriptionSTATUS_DESCRIPTIONTranzzo payment status code description
user_action_requiredBooleanEither customer action is required to proceed with payment
user_action_urlURLIf user_action_required is true, user should be redirected to this URL
eciECIElectronic Commerce Indicator - authentication result of credit card payment on 3D Secure
mccMCCMCC for this transaction
options_3dsString3-D Secure flow option
cc_maskCC_MASKCard number mask
cc_tokenCC_TOKENTranzzo card token generated for this card
cc_token_expirationStringToken expiration timestamp
customer_idStringCustomer’s identifier in merchant's system
customer_ipStringCustomer’s IP address
customer_fnameStringCustomer’s first name
customer_lnameStringCustomer’s last name
customer_emailStringCustomer’s email
customer_phoneStringCustomer’s phone
customer_countryStringCustomer’s country (ISO 3166-1 (alpha-2)). For instance, UA for Ukraine
customer_cityStringCustomer’s city
customer_birthdayStringCustomer’s birthday (format: yyyy-MM-dd)
customer_patronymStringCustomer’s patronym
result_urlURLCustomer will be redirected to this URL after payment.
created_atTIMESTAMPTimestamp when transaction was created
processed_atTIMESTAMPTimestamp when transaction was updated last time
payloadStringField 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
}
]