Cancel
Cancel an active subscription. No further payments will be collected.
Cancel subscription
PATCH https://api.stage.localpayment.com/api/payin/subscriptions/:externalId/status
Path Parameters
Name
Type
Description
id*
string
Subscription External ID as returned by POST method
Headers
Name
Type
Description
Authorization*
string
JWT token in format Bearer eyJ0... . For more information about authentication, please refer to Authentication.
Request Body
Name
Type
Description
status*
string
Fixed value: CANCEL
{
"externalId": "1623451995",
"subscriptionId": "498e4a08-13a8-405e-96a5-eccb44345ada",
"status": {
"code": "903",
"description": "CANCELLED",
"detail": "The subscription was canceled - merchant request"
}
}{
"status": {
"code": "400",
"description": "ERROR",
"detail": "Invalid operation"
}
}{
"status": {
"code": "404",
"description": "ERROR",
"detail": "Subscription not found"
}
}Curl --location --request PATCH 'https://api.stage.localpayment.com/api/subscriptions/1662595411/status' \
header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjYyMDU1NTIxLCJqdGkiOiIxY2NhNjI2NTViZjg0ZDdlOWY1NWMxNmRmMGQzNzQxYyIsInVzZXJfaWQiOjIwLCJzdXBlcnVzZXIiOnRydWUsImlzX3N0YWZmIjp0cnVlLCJyb2xlcyI6WyJJU19BRE1JTiJdLCJjb3VudHJpZXMiOlsiQUxMIl0sImNvbXBhbnkiOiIwMDA1IiwiY2xpZW50X2NvZGUiOiIwMDA1In0.HW58M472NIdpATByTFe41f1311eHZlk7YhrwlHmczJs' \
header 'Content-Type: application/json' \
--data-raw '{
"status": "CANCEL"
}'{
"externalId": "1662595411",
"internalId": "e9265b95-c207-4d48-8834-73e825d149ea",
"status": {
"code": "903",
"description": "CANCELLED",
"detail": "The subscription was canceled - merchant request"
}
}Last updated
Was this helpful?