/Cancel E-Commerce payment
Request cancels payment for given payId.
/Cancel E-Commerce payment
Request cancels payment for given payId.
Request Overview
Request cancels payment for given payId. It should be noted that on the day of the transaction partial amount should be cancelled only one time. if necessary, you must apply to the bank to return the remaining amount. You can refund part of the amount in the following days after the transaction. In case of pre-authorization (preAuth = true) partial amount can not be canceled before payment completion. To partially refund the amount, use the confirmation /completion method with the amount to be authorized, in which case the remaining amount will be automatically returned to the customer.
Request Endpoint
https://api.tbcbank.ge/v1/tpay/payments/{payId}/cancel
Authorization
Authorization Type | Description |
---|---|
Bearer Token | access-token should be added to Authorization header |
Request Parameters
Header
Parameter | Type | Description |
---|---|---|
apikey | string | developer app API key |
Path Parameters
Parameter | Type | Description |
---|---|---|
payId | string | tpay payment identifier |
Body Parameters
In case of partial cancellation of payment, corresponding amount should be passed in request body.
Parameter | Type | Description |
---|---|---|
amount | number | amount to be returned (should not exceed transaction amount) format: 0.00 |
extra (required for split transactions) | string | The Extra field includes the IBAN number from whose account the amount should be transferred. It is necessary to follow the standard IBAN format, otherwise the transaction will not be canceled. |
extra2 (required for split transactions) | string | The amount to be canceled is included in the specified IBAN in Extra2. (for example 10; 10.50; 10.50). The amount deducted in this field should not exceed the full amount. |
Request Sample
curl --location --request POST 'https://api.tbcbank.ge/v1/tpay/payments/{payId}/cancel' \
--header 'Content-Type: application/json' \
--header 'apikey: lXcDL8JJiAN8Vjlu6NW3kNeceOQolwnF' \
--header 'Authorization: Bearer eyJhbGciOiJKSeriiIsImtpZCI6IjVFMjBGMzQ2RUY1RjU2ODkxQTIyRkUzQUVCRjAzMzlGMzVDNjk1QjYiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJYaUR6UnU5ZlZva2FJdjQ2Nl9Bem56WEdsYlkifQ.eyJuYmYiOjE2MzE2NDQyNjEsImV4cCI6MTYzMTczMDY2MSwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50c2FwaS50YmNiYW5rLmdlLyIsImF1ZCI6WyJodHRwczovL2FjY291bnRzYXBpLnRiY2JhbmsuZ2UvcmVzb3VyY2VzIiwicGF5bWVudGFwaSJdLCJjbGllbnRfaWQiOiI3MDAwMDAyIiwic2NvcGUiOlsicGF5bWVudGFwaSJdfQ.GNIaxgik-ElXrvXOky5_1D1YjEEX5CB3eQHKPwvdCNhB-HvblqZ78QSNJcl6qLfL8gRTd0x9ASCgXu2z2RQYJ-wls0V2IwrQ7p4WEU-ON9QnasOjZWgPeVAtZQC_zjH9DdmL1GiDTIHLErhKDGl3YtSGcvPKSvTpABWda6HvF7lNGlEK0SZxzzt1i1SkpAnQfzIO1ATEmKdM1EmWzp5ZaDk0cF-Wzfk_2CrQAGofc80GT64U8WOXvVOx1gVYmjzqYs71XCOqfQdySYBIc-tbUC6YIoeSPZfu1hpi33Gz40ig57t4jxeE7Jh--38ydO4AGEw8BdlLv534O0V3ZoOddg' \
--data-raw '{
"amount":2
}'
Response Parameters
In case of successful cancelation 200 OK is returned.
Error Response
In case of error, standard response in problem JSON will be returned.
Details can be found at Error Code Description.
in case of 400 Bad Request additional parameter, resultCode containing detailed business error description will be returned.
Parameter | Type | Description |
---|---|---|
type | string | A URI identifying a human-readable web page with information about the error |
title | string | General error description |
status | string | Http status code |
systemCode | string | error code in following format: {method-name}.{http-status-code} |
detail | string | Human-readable text providing additional Information |
resultCode | string | Business level transaction status description. Detailed list of available statuses is described in the Classifications chapter/ Result Codes |
Error Response Sample
{
"type": "https://developers.tbcbank.ge/docs/error-type-401",
"title": "Invalid Api Key",
"status": "401",
"detail": "Please make sure api key is valid",
"systemCode": "System code for problem is tpay-access-token.401.001"
}
{
"type": "https://developers.tbcbank.ge/error-reference#type-400",
"title": "",
"status": "400",
"detail": "",
"systemCode": "System code for problem is tpay-access-token.400.001",
"resultCode": "decline_general"
}
Updated 8 months ago