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: feb6b8db-87f2-46cf-a2a7-74f4c71ec577
billingLinkIdstringRequired

Payment link ID

Example: 78c1d432-1c30-46c3-9a39-1d0eca9126bb
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
post
POST /api-gateway/recurrents/make-payment HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 178

{
  "merchantId": "feb6b8db-87f2-46cf-a2a7-74f4c71ec577",
  "billingLinkId": "78c1d432-1c30-46c3-9a39-1d0eca9126bb",
  "webhookUrl": "https://merchant.domain/webhooks/payment",
  "amount": "10"
}
200Success
{
  "success": true,
  "response": {
    "id": "6185250b-56c3-4aba-b776-e071c8bcce2a",
    "merchantId": "feb6b8db-87f2-46cf-a2a7-74f4c71ec577",
    "billingLinkId": "78c1d432-1c30-46c3-9a39-1d0eca9126bb",
    "webhookUrl": "https://merchant.domain/webhooks/payment",
    "amount": "10",
    "tx": null,
    "status": "INIT",
    "createdAt": "2025-07-15T10:50:46.086Z",
    "updatedAt": "2025-07-15T10:50:46.086Z"
  }
}

Last updated