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 name | Value | Description | Notes |
|---|---|---|---|
| x-api-key | string | API key linked to your community | generate API key |
โ
Request body
Required Properties
| Property name | Value | Description | Notes |
|---|---|---|---|
| transaction_uuid | string | UUID that is unique to your recurring transaction | This 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
- Request Body
- Response Body
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"
}
{
"status": {
"code": 200,
"message": "success",
"errors": []
},
"data": {
"message": "Recurring payment was successfully cancelled."
},
"count": null,
"next": null,
"previous": null
}