Cancel a Payment
Cancel payments with the supported listed paymentMethod and transferStatus.
Country | paymentMethod | transferStatus |
---|---|---|
Mexico | CREDIT_CARD | AUTHORIZED |
Mexico | BANK_TRANSFER | IN_PROGRESS |
Mexico | PAY_CASH | IN_PROGRESS |
HTTP Request
POST
/v1/payments/charges/cancel/{{idempotencyKey}}
Content-Type: application/json
{
"transferStatusCode": 200,
"transferErrorMsg": null,
"idempotencyKey": "202209010002",
"referenceId": "202209010002",
"paymentMethod": "PAY_CASH",
"amount": 500,
"currency": "MXN",
"country": "MX",
"finalAmount": 100,
"finalCurrency": "MXN",
"createTime": "2022-09-01 01:14:01 UTC",
"scheduledTime": "2022-09-01 01:14:11 UTC",
"finalStatusTime":"2022-09-06 00:50:21 UTC",
"payer": {
"name": "username",
"email": "username@liquido.com",
"billingAddress": {
"street": "Simón Bolívar",
"number": "12121",
"city": "Álamos",
"state": "CDMX",
"zipCode": "03400"
}
},
"transferStatus": "CANCELLED",
"description": "this is a test pay",
"callbackUrl": "https://api.client.com/callback/",
"transferDetails": {
"payCash": {
"referenceNumber": "1264207400053",
"expirationDate": "2022-09-30",
"recurring": false
}
},
"subMerchantId": "UUID"
}
Request Headers Parameters
Key | Value |
---|---|
Authorization | "bearer" + " " + {{access_token}} |
x-api-key | {{api_key}} |
PATH and Query Parameters
Parameter | Type | Description |
---|---|---|
idempotencyKey | String | Unique key to ensure idempotent requests. given by the merchant in their system. |
Response Body Parameters
Parameter | Type | Description |
---|---|---|
transferStatus | String | Transfer status, should be CANCELLED if success. |
transferStatusCode | Integer | Transfer status code, 200 if CANCELLED. |
transferErrorMsg | String | Transfer error message if failed. |
referenceId | String | Unique key to payment ticket, generated by Liquido. |
idempotencyKey | String | Unique key to ensure idempotent requests. given by the merchant in their system |
amount | Long | The transfer amount |
country | String | country code |
currency | String | The currency code of the transferred fund |
finalAmount | Long | The final amount that is used for creating the charge order. EX: for charge orders with FX conversion, this field represents the converted amount from the original requested amount. |
finalCurrency | String | The currency code of the finalAmount. |
paymentMethod | String | payment method, enum value as BANK_TRANSFER, PAY_CASH |
payer | JSON | payer info |
transferDetails | JSON | transaction details info |
description | String | description of payment |
callbackUrl | String | URL where Liquido will send notifications associated to changes to this payment. will receive a post request. |
createTime | String | Payment ticket created time |
scheduledTime | String | Payment ticket scheduled time |
finalStatusTime | String | Transfer final status update time. |
subMerchantId | String | The sub merchant ID. |
TransferDetails Object Parameters
Parameter | Type | Description |
---|---|---|
payCash | JSON | The payCash details |
PayCash Object Parameters
Parameter | Type | Description |
---|---|---|
referenceNumber | String | The payer uses this number to pay for the transaction |
expirationDate | String | Expire date in local time,format "yyyy-MM-dd" |
recurring | Boolean | Multiple times to pay or single |
Transfer Status
Parameter | Description |
---|---|
IN_PROGRESS | The transaction of this method has started, but no transactions have been processed yet. |
SETTLED | The funds of the transaction of this payment have been transferred to the store. |
EXPIRED | The transaction of this payment has been expired. |
CANCELLED | The transaction of this payment has been cancelled. |
FAILED | There was an error while processing the transaction of this payment. This status is followed by a message with more details about the error. |