For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cancel Subscription

The method allows you to disable a previously connected subscription

Cancel Subscription

post
Header parameters
x-api-public-keystringOptional

Public API-key

x-api-signaturestringOptional

Signing the request body with a private API-key

Content-typestringOptional

Request content type

Example: application/json
Body

Unsubscribe request body

idstringRequired

Subscription ID

Example: d75a2ecd-ed6b-480a-a337-5836ad64acf7
merchantIdstringRequired

Merchant ID

Example: 386fc09d-b4b8-4081-ae99-bf9710e80239
Responses
200Success
application/json

Successful response

successbooleanRequired

Request success indicator

post/api-gateway/recurrents/cancel-subscription
POST /api-gateway/recurrents/cancel-subscription HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 97

{
  "id": "d75a2ecd-ed6b-480a-a337-5836ad64acf7",
  "merchantId": "386fc09d-b4b8-4081-ae99-bf9710e80239"
}
200Success
{
  "success": true,
  "response": {
    "id": "d75a2ecd-ed6b-480a-a337-5836ad64acf7",
    "merchantId": "386fc09d-b4b8-4081-ae99-bf9710e80239",
    "billingLinkId": "1db0ec64-8a2e-4bec-810a-be4bde21c412",
    "title": "Premium",
    "description": "Premium subscription. With premium subscription u can use premium functions",
    "spendInterval": "-1",
    "status": "PENDING",
    "message": null,
    "currency": "USD",
    "amount": "7.99",
    "webhookUrl": "https://merchant.domain/webhooks/subscription",
    "createdAt": "2026-01-29T11:14:13.711Z",
    "updatedAt": "2026-01-29T11:14:13.711Z"
  }
}

Last updated