Cancel or update recurring payment via Merchant API
Cancel recurring payment
If you (or your customer) need(s) to cancel recurring payment, Cancel Recurrence API is used. Provide recurrenceId in path:
A. If you are a single merchant, use this PATH: /merchant/recurrences/{RecurrenceId}/cancel
and authorization requirements provided here.
B. If you are a platform using BaaS APIs, use this PATH: baas/merchant/recurrences/{RecurrenceId}/cancel
and authorization requirements provided here.
No more recurring payments can be initiated with canceled recurrence ID.
Update recurring payment
If you need to make changes for existing recurring payment, you can use Update Recurrence API.
A. If you are a single merchant, use this PATH: /merchant/recurrences/{RecurrenceId}
and authorization requirements provided here.
B. If you are a platform using BaaS APIs, use this PATH: baas/merchant/recurrences/{RecurrenceId}
and authorization requirements provided here.
Details that can be updated:
Property |
Value |
Description |
---|---|---|
payment. |
eg. 12.00 |
Amount that needs to changed, valid only for recurring payments (for unscheduled MITs it can be changed via Initiate Recurring Payment API) |
payment. |
e.g. EUR |
Currency that needs to be changed. Possible values: GBP, SEK, NOK, DKK, PLN, USD |
recurrence.endDate |
e.g. |
Date format. Last date of recurring payment. Only future date can be used. No longer than 4 years from the date of a request. Can be changed to null to remove end date. |
recurrence.frequency.days |
e.g. 1 |
Integer. Period between payments. Min value: 1 |
Each property can be updated separately, therefore, all are optional.
Request sample:
PATCH /merchant/recurringpayments/0bd89167-ed59-433f-9ff7-df6eb39a3fe4 HTTP/1.1
Host: api2.connectpay.com
X-Request-ID: 0bd89167-ed59-433f-9ff7-df6eb39a3fe4
Accept: application/json,version=1
Authorization: Basic ashdgsdafjh...NiJ==
X-Signature: adsfdasfasd..fhasjkf
Content: application/json
{"recurrence": {
"type": "recurring",
"frequency": {
"days": 2
}
Request response:
{
"recurrence": {
"type": "recurring",
"frequency": {
"days": 2
},
"endDate": "2023-12-02",
"initialPaymentId": "1fd55bcc-bda8-4e12-9177-839c155a3ce1"
"status": "active"
}
}