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

Creating a payment link

The method creates a temporary link to connect the user. The user must follow the link and give permission to spend coins from his address. After that, you will receive a webhook with the status and payment link ID

Creating a payment link

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 link to connect the user

merchantIdstringRequired

Merchant ID in the system

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

Client ID in the merchant system

Example: merchant_client_unique_id
clientEmailstringRequired

Client's mail in the merchant's system

Example: client-email@example.com
clientNamestringOptional

Client name in the merchant system

Example: John Doe
returnUrlstringOptional

URL to be used as "Return to Store" link

Example: https://merchant.domain/
webhookUrlstringOptional

URL to notify about connecting or denying a client's connection request

Example: https://merchant.domain/webhooks/subscription
Responses
200Success
application/json

Successful response

successbooleanRequired

Request success indicator

post/api-gateway/recurrents/create-subscriber-billing-link
POST /api-gateway/recurrents/create-subscriber-billing-link HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 257

{
  "merchantId": "386fc09d-b4b8-4081-ae99-bf9710e80239",
  "clientId": "merchant_client_unique_id",
  "clientEmail": "client-email@example.com",
  "clientName": "John Doe",
  "returnUrl": "https://merchant.domain/",
  "webhookUrl": "https://merchant.domain/webhooks/subscription"
}
200Success
{
  "success": true,
  "response": {
    "merchantId": "386fc09d-b4b8-4081-ae99-bf9710e80239",
    "clientId": "merchant_client_unique_id",
    "clientEmail": "client-email@example.com",
    "clientName": "John Doe",
    "returnUrl": "https://merchant.domain/",
    "webhookUrl": "https://merchant.domain/webhooks/subscription",
    "link": "https://subscriptions.domain/1db0ec64-8a2e-4bec-810a-be4bde21c412"
  }
}

Last updated