Skip to content

Cancel a Recurring Payment

Only when the payment status is ACTIVE can a PayCash recurring payment be cancelled.

HTTP Request

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

Request Headers
{
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Content-Type: application/json
{
    "transferStatusCode": 200,
    "idempotencyKey": "06c28bb9-9bbe-4e8b-9064-2a23daff914d",
    "country": "PE",
    "currency": "PEN",
    "createTime": "2025-02-19 19:38:03 UTC",
    "status": "CANCELLED",
    "description": "this is a test reference",
    "callbackUrl": "https://api.client.com/callback/",
    "transferDetails": {
        "payCash": {
            "amount": 0,
            "expirationDate": "2025-02-21",
            "reference": "7041740022683866"
        }
    }
}

HTTP Headers Details

Key Value
Authorization "Bearer" + " " + {{access_token}}

PATH and Query Parameters

Parameter Type Description
idempotencyKey String The idempotency key of the payment which need to cancel

Response Body Details

Parameter Type Description
transferStatusCode Integer Transfer status code, 200 if CANCELLED.
idempotencyKey String Unique key of payment record.
country String Country code
currency String The currency of the transferred fund
createTime String Payment ticket created time.
status String Transfer status, should be CANCELLED if success.
description String Description of payment
transferDetails JSON Transaction details info

Object Parameters

TransferDetails
Parameter Type Description
payCash JSON The payCash details
PayCash
Parameter Type Description
amount Long The transaction amount.
expirationDate String Expire date in local time,format "yyyy-MM-dd"
reference String This is a reference that can be used for more than one time.
The payer is required to provide two numbers to the cashier to finish payment. One is this reference number and the other is an agreement number.
Back to top