Cancel

Cancel an active subscription. No further payments will be collected.

Cancel subscription

PATCH https://api.stage.localpayment.com/api/payin/subscriptions/:id/status

Path Parameters

Name
Type
Description

id*

string

Subscription 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: CANCELLED

{
    "externalId": "1623451995",
    "subscriptionId": "498e4a08-13a8-405e-96a5-eccb44345ada",
    "status": {
        "code": "903",
        "description": "CANCELLED",
        "detail": "The subscription was canceled - merchant request"
    },
    "totalPayments": 2,
    "pendingPayments": 2,
    "creationDate": "2021-06-11T22:53:15.622+00:00",
    "payments": [],
    "retries": 0
}
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": "CANCELLED"
}'

Last updated