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

Creating a payment

The method allows you to create a payment with an arbitrary amount in the coin in which the address was connected

Creating a payment

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

The body of the request to create a payment for the payment link

merchantIdstringRequired

Merchant ID

Example: 386fc09d-b4b8-4081-ae99-bf9710e80239
billingLinkIdstringRequired

Payment link ID

Example: 1db0ec64-8a2e-4bec-810a-be4bde21c412
webhookUrlstringOptional

URL for notification of payment status change

Example: https://merchant.domain/webhooks/payment
amountstringRequired

Payment amount in the currency in which the payment link was created

Example: 10
Responses
200Success
application/json

Successful response

successbooleanRequired

Request success indicator

post/api-gateway/recurrents/make-payment
POST /api-gateway/recurrents/make-payment HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 178

{
  "merchantId": "386fc09d-b4b8-4081-ae99-bf9710e80239",
  "billingLinkId": "1db0ec64-8a2e-4bec-810a-be4bde21c412",
  "webhookUrl": "https://merchant.domain/webhooks/payment",
  "amount": "10"
}
200Success
{
  "success": true,
  "response": {
    "id": "df74e31d-4e2f-4bd7-adc8-88da94945e7d",
    "merchantId": "386fc09d-b4b8-4081-ae99-bf9710e80239",
    "billingLinkId": "1db0ec64-8a2e-4bec-810a-be4bde21c412",
    "webhookUrl": "https://merchant.domain/webhooks/payment",
    "amount": "10",
    "tx": null,
    "status": "INIT",
    "createdAt": "2026-01-29T11:14:13.712Z",
    "updatedAt": "2026-01-29T11:14:13.712Z"
  }
}

Last updated