Creating an order

Create an order for payment

Creating an order

POSThttps://app.apollopayment.io/api-gateway/make-order
Header parameters
Body
advancedBalanceId*string

Identifier of the advance balance for writing off commissions

Example: "368e742d-5780-412a-a406-d290a23f1e3b"
currency*string

Ticker of the coins in which the payment will be made

Example: "USDT"
network*string

The network of the coin in which the payment will be made

Example: "ethereum"
amount*string

Payment amount

Example: "123.12"
paymentTolerancePercentstring

Acceptable 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

Example: "1.5"
errorWebhookstring

URL to send webhook on error or order expiration

Example: "https://merchant.domain/webhooks/fail"
successWebhookstring

URL to send webhook on successful payment

Example: "https://merchant.domain/webhooks/success"
returnUrlstring

URL to be placed on the payment page as "Return to Store" links

Example: "https://merchant.domain/"
order*string

Order ID in the merchant system

Example: "Order #123456"
descriptionstring

Order Description

Example: "Payment by order #123456"
lifetime*integer

Order lifetime in seconds, available values from 1800 (30 minutes) to 43200 (12 hours)

checkRisksboolean

Whether to check incoming transactions for this order

Response
Body
success*boolean

Request success indicator

response*MakeOrderResponse (object)

Response body when requesting to create an order

Request
const response = await fetch('https://app.apollopayment.io/api-gateway/make-order', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "advancedBalanceId": "368e742d-5780-412a-a406-d290a23f1e3b",
      "currency": "USDT",
      "network": "ethereum",
      "amount": "123.12",
      "order": "Order #123456"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "response": {
    "status": "pending",
    "link": "https://payment.domain/572f160a-d457-406b-b97f-158332df9270",
    "amount": "123.12",
    "paymentTolerancePercent": "1.5",
    "advancedBalanceId": "368e742d-5780-412a-a406-d290a23f1e3b",
    "currency": "USDT",
    "network": "ethereum",
    "address": "0x00000005707Bf50EfA35a2db020eDe9Ac0780b9f",
    "addressId": "8c666a6f-63b4-464e-ad9a-091373f9b761",
    "tag": null,
    "orderId": "572f160a-d457-406b-b97f-158332df9270",
    "clientOrderId": "Order #123456",
    "description": "Payment by order #123456",
    "successWebhook": "https://merchant.domain/webhooks/success",
    "errorWebhook": "https://merchant.domain/webhooks/fail",
    "returnUrl": "https://merchant.domain/",
    "expiresAt": "2024-09-24T12:39:08.855Z",
    "createdAt": "2024-09-24T12:09:08.855Z"
  }
}

Last updated