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

/api-gateway/recurrents/make-payment

Header parameters
x-api-public-keystring

Public API-key

x-api-signaturestring

Signing the request body with a private API-key

Content-typestring

Request content type

Example: application/json
Body
merchantIdstringrequired

Merchant ID

Example: 41fe615a-96dc-42c2-9629-196383411cd4
billingLinkIdstringrequired

Payment link ID

Example: 60b5c367-1b93-448a-b08a-16da458102b5
webhookUrlstring

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
curl -L \
  --request POST \
  --url 'https://ocp.onchainpay.io/api-gateway/recurrents/make-payment' \
  --header 'Content-Type: application/json' \
  --data '{"merchantId":"41fe615a-96dc-42c2-9629-196383411cd4","billingLinkId":"60b5c367-1b93-448a-b08a-16da458102b5","webhookUrl":"https://merchant.domain/webhooks/payment","amount":"10"}'
{
  "success": true,
  "response": {
    "id": "1d714062-350d-4856-8870-4d274dac9e9e",
    "merchantId": "41fe615a-96dc-42c2-9629-196383411cd4",
    "billingLinkId": "60b5c367-1b93-448a-b08a-16da458102b5",
    "webhookUrl": "https://merchant.domain/webhooks/payment",
    "amount": "10",
    "createdAt": "2024-12-26T08:21:33.224Z",
    "updatedAt": "2024-12-26T08:21:33.224Z",
    "tx": null,
    "status": "INIT"
  }
}

Last updated