Creating an order
Create an order for payment
Public API-key
Signing the request body with a private API-key
Request content type
application/jsonRequest body for creating a payment order
Ticker of the coins in which the payment will be made
USDTThe network of the coin in which the payment will be made
ethereumPayment amount
123.12Acceptable underpayment percentage. For example, you created an order for 100 USDT. If the parameter is set to 1.5%, the order will be completed successfully after payment of 98.5 USDT
1.5URL to send webhook on error or order expiration
https://merchant.domain/webhooks/failURL to send webhook on successful payment
https://merchant.domain/webhooks/successURL to be placed on the payment page as "Return to Store" links
https://merchant.domain/Order ID in the merchant system
Order #123456Order Description
Payment by order #123456Order lifetime in seconds, available values from 1800 (30 minutes) to 43200 (12 hours)
Whether to check incoming transactions for this order
The external user ID in your system. When specifying the identifier, the functionality of the "Personal addresses" section will be used - a static address will be reserved for this user, but the webhook will be sent to the URL specified in this request
10099Payer's email address. If it is specified alongside with the 'externalUserId' parameter, a user with such an email will be created in the "Personal addresses" section
[email protected]POST /api-gateway/make-order HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 396
{
  "currency": "USDT",
  "network": "ethereum",
  "amount": "123.12",
  "paymentTolerancePercent": "1.5",
  "errorWebhook": "https://merchant.domain/webhooks/fail",
  "successWebhook": "https://merchant.domain/webhooks/success",
  "returnUrl": "https://merchant.domain/",
  "order": "Order #123456",
  "description": "Payment by order #123456",
  "lifetime": 1,
  "checkRisks": true,
  "externalUserId": "10099",
  "payerEmail": "[email protected]"
}{
  "success": true,
  "response": {
    "status": "pending",
    "link": "https://payment.domain/4b3399ee-3690-4984-8c39-a911c8b0aad4",
    "amount": "123.12",
    "paymentTolerancePercent": "1.5",
    "currency": "USDT",
    "network": "ethereum",
    "address": "0x00000005707Bf50EfA35a2db020eDe9Ac0780b9f",
    "addressId": "258e95ed-a3c2-4c85-bf6f-09f8b8f1c0be",
    "tag": null,
    "orderId": "4b3399ee-3690-4984-8c39-a911c8b0aad4",
    "clientOrderId": "Order #123456",
    "externalUserId": "10099",
    "payerEmail": "[email protected]",
    "description": "Payment by order #123456",
    "successWebhook": "https://merchant.domain/webhooks/success",
    "errorWebhook": "https://merchant.domain/webhooks/fail",
    "returnUrl": "https://merchant.domain/",
    "expiresAt": "2025-06-09T13:48:11.523Z",
    "createdAt": "2025-06-09T13:18:11.523Z"
  }
}Last updated