Skip to content

Cancel a Payment

HTTP Request

POST /v1/payments/charges/cancel/{{idempotencyKey}}

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}

Response

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
        }
    }
}

Request Headers Parameters

Key Value
Authorization "bearer" + " " + {{access_token}}
x-api-key {{api_key}}

Request Parameters

Parameter Required 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, SETTLED, IN_PROGRESS, FAILED
transferStatusCode int Transfer status code, 200 transaction SETTLED or IN_PROGRESS, other FAILED
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 String 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, final status include CANCELLED, FAILED
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 Mexico 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.

Notification Event Type

CHARGE_SUCCEEDED,
CHARGE_FAILED,
CHARGE_CHARGED_BACK,
CHARGE_REFUND_SUCCEEDED,
CHARGE_REFUND_FAILED;
Back to top