Getting a subscription
The method allows you to get information about the subscription
Header parameters
x-api-public-keystringOptional
Public API-key
x-api-signaturestringOptional
Signing the request body with a private API-key
Content-typestringOptionalExample:
Request content type
application/json
Body
Request body for getting subscription data
idstringRequiredExample:
Subscription ID
5aa99412-0ac3-4c90-a3b8-c46f6599eabb
merchantIdstringRequiredExample:
Merchant ID
feb6b8db-87f2-46cf-a2a7-74f4c71ec577
Responses
200Success
application/json
post
POST /api-gateway/recurrents/get-subscription HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 97
{
"id": "5aa99412-0ac3-4c90-a3b8-c46f6599eabb",
"merchantId": "feb6b8db-87f2-46cf-a2a7-74f4c71ec577"
}
200Success
{
"success": true,
"response": {
"id": "5aa99412-0ac3-4c90-a3b8-c46f6599eabb",
"merchantId": "feb6b8db-87f2-46cf-a2a7-74f4c71ec577",
"billingLinkId": "78c1d432-1c30-46c3-9a39-1d0eca9126bb",
"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": "2025-07-15T10:50:46.085Z",
"updatedAt": "2025-07-15T10:50:46.085Z"
}
}
Last updated