Cancel Recurring Payment API

This guide explains how to cancel a recurring payment through an API call. Canceling stops all future charges in the recurring series; charges that have already been made are unaffected.

REQUEST

testing server:

POST https://staging.xpay.app/api/payments/cancel-recurring-payment/

production(Live) server:

POST https://community.xpay.app/api/payments/cancel-recurring-payment/

Parameters

Authorization

This method requires authorization, supply the header with a key value pair with that structure

"x-api-key" : string

Required Properties

Property nameValueDescriptionNotes
x-api-keystringAPI key linked to your communitygenerate API key

โ€‹

Request body

Required Properties

Property nameValueDescriptionNotes
transaction_uuidstringUUID that is unique to your recurring transactionThis identifies the recurring payment to cancel

Response

If successful, this method returns a response body with the following structure:

{
    "status": {
        "code": 200,
        "message": "success",
        "errors": []
    },
    "data": {
        "message": "Recurring payment was successfully cancelled."
    },
    "count": null,
    "next": null,
    "previous": null
}

Example

POST https://staging.xpay.app/api/payments/cancel-recurring-payment/

Headers:
x-api-key: your-api-key-here
Content-Type: application/json
{
    "transaction_uuid": "a3d8fd1c-a919-4f4c-b1c1-2e3f6ad486d6"
}