Skip to main content

API integration

Accept cryptocurrency payments from external crypto wallets through the Merchant API.

With API integration, your application creates crypto invoices, shows payment instructions to customers, and tracks payment status through the API.

You can use the API in two ways:

  • API only — your application builds the full payment experience and displays the crypto address, amount, network, and expiration time to the customer.
  • API + Hosted Checkout — your backend uses the API for order tracking and reconciliation, while Hosted Checkout provides the customer-facing payment page.

When to use API integration

Use API integration when you want to control the payment flow in your own website, application, bot, or AI agent.

API integration is useful when:

  • You want to build your own checkout UI.
  • You need to create crypto invoices programmatically.
  • You want to show payment instructions inside your own product.
  • You need to track payment status from your backend.
  • You want to combine Hosted Checkout with backend order reconciliation.

If you want the fastest integration with a ready-made payment page, use Hosted Checkout integration instead.

Integration models

ModelCustomer experienceBackend responsibilityStatus handling
API onlyBuilt by your applicationCreate invoice, display payment details, track statusPoll payment status through the API
API + Hosted CheckoutHosted by Volet.comCreate or track orders, reconcile payment statusUse Hosted Checkout Status URL and API order lookup

Before you start

To accept crypto payments through the API, you need:

  • A verified Volet.com account.
  • A configured API in the Payment Tools section.
  • API permissions for crypto payment acceptance.
  • A Hosted Checkout configuration if you use the API together with Hosted Checkout.

See Create payment gateway to create and configure your API.

Authentication

Merchant API requests require authentication headers.

Include the following headers in each API request:

HeaderDescription
Api-NameAPI name configured in your Volet.com account.
Account-EmailEmail address of the Volet.com account that owns the API.
Authentication-TokenRequest authentication token generated using your API secret.

Keep your API secret private. Never expose API credentials or authentication tokens in frontend code, mobile apps, bots, or client-side scripts.

API-only flow

Use this flow when your application handles the full crypto payment experience.

The payment flow:

  1. Create an order in your system.
  2. Optionally check invoice details before creation.
  3. Create a crypto invoice through the API.
  4. Show the payment address, amount, currency, network, and expiration time to the customer.
  5. The customer sends the payment from a crypto wallet.
  6. Your backend checks the payment status through the API.
  7. When the payment is completed, update the order status in your system.

Step 1: Check invoice details

Before creating an invoice, you can check calculated invoice values.

Use this step to preview the sender amount, receiver amount, currency conversion, and expiration time before creating the actual invoice.

Endpoint:

POST /api/invoice/crypto-invoice/check

Example request:

{
"receiverCurrency": "USD",
"senderCurrency": "USDT_TRC20",
"amount": 100,
"transferAction": "GET",
"note": "Order #1001",
"sciName": "Store",
"orderId": "ORDER-1001",
"subMerchantURL": "https://merchant.example.com"
}

Example response:

{
"receiverCurrency": "USD",
"senderCurrency": "USDT_TRC20",
"amount": 100,
"transferAction": "GET",
"note": "Order #1001",
"sciName": "Store",
"orderId": "ORDER-1001",
"subMerchantURL": "https://merchant.example.com",
"senderAmount": 100,
"receiverAmount": 100,
"expirationDate": "2026-01-15T10:30:00",
"expirationDateMillis": 1768473000000
}

This step does not create a payment address and does not start the payment.

Step 2: Create a crypto invoice

Create a crypto invoice when the customer is ready to pay.

Endpoint:

POST /api/invoice/crypto-invoice/deposit

Example request:

{
"receiverCurrency": "USD",
"senderCurrency": "USDT_TRC20",
"amount": 100,
"transferAction": "GET",
"note": "Order #1001",
"sciName": "Store",
"orderId": "ORDER-1001",
"subMerchantURL": "https://merchant.example.com"
}

The response returns the payment details that your application should show to the customer.

Example response:

{
"receiverCurrency": "USD",
"senderCurrency": "USDT_TRC20",
"amount": 100,
"transferAction": "GET",
"note": "Order #1001",
"sciName": "Store",
"orderId": "ORDER-1001",
"subMerchantURL": "https://merchant.example.com",
"address": "TXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"addressOldFormat": null,
"destinationTag": null,
"senderAmount": 100,
"receiverAmount": 100,
"expirationDate": "2026-01-15T10:30:00",
"expirationDateMillis": 1768473000000
}

Invoice request fields

FieldRequiredDescription
receiverCurrencyYesCurrency credited to your Volet.com account after the payment is completed.
senderCurrencyYesCurrency and network the customer should use to pay.
amountYesPayment amount. How this amount is interpreted depends on transferAction.
transferActionYesDefines whether the amount is treated as the amount to send or the amount to receive. Possible values: GIVE, GET.
noteNoPayment note or order description.
sciNameNoHosted Checkout or store name associated with the payment flow.
orderIdNoYour internal order ID. Use a unique value for each payment.
subMerchantURLNoWebsite URL of the sub-merchant, if the payment is processed on behalf of another merchant.

Invoice response fields

FieldDescription
addressCrypto address where the customer should send the payment.
addressOldFormatAlternative address format, if available for the selected network.
destinationTagDestination tag, memo, or additional identifier required by some networks.
senderAmountAmount the customer should send.
senderCurrencyCurrency and network the customer should use.
receiverAmountAmount expected to be credited to your account.
receiverCurrencyCurrency credited to your account.
expirationDateInvoice expiration date and time.
expirationDateMillisInvoice expiration timestamp in milliseconds.

Always show the exact senderAmount, senderCurrency, address, and destinationTag if it is returned.

Step 3: Show payment instructions

In API-only mode, your application is responsible for showing payment instructions to the customer.

Show at least:

  • Amount to send.
  • Currency and blockchain network.
  • Crypto address.
  • Destination tag or memo, if required.
  • Expiration time.
  • Warning to send funds only on the selected network.

Example instruction:

Send exactly 100 USDT on Tron (TRC-20) to:

TXXXXXXXXXXXXXXXXXXXXXXXXXXXX

This invoice expires at 2026-01-15 10:30 UTC.
Do not send funds on another network.

For networks that require a destination tag or memo, show it clearly next to the address.

Step 4: Check payment status

After creating the invoice, your backend should check the payment status.

Endpoint:

GET /api/orders

Required query parameter:

ParameterDescription
orderIdMerchant order identifier.

Optional query parameter:

ParameterDescription
sciNameHosted Checkout or store name associated with the order.

Example request:

GET /api/orders?orderId=ORDER-1001&sciName=Store

Example response:

{
"orderId": "ORDER-1001",
"sciName": "Store",
"paymentStatus": "PROCESSING",
"paymentMethod": "CRYPTO_INVOICE",
"paymentCreated": "2026-01-15T10:30:00",
"transaction": {
"status": "PROCESSING"
},
"invoice": {
"invoiceStatus": "PROCESSING",
"cryptoCurrencyAddress": "TXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"initialSenderAmount": 100,
"actualReceivedAmount": 100,
"senderCurrency": "USDT_TRC20",
"cryptoCurrencyTransactionId": "11111111-1111-4111-8111-111111111111"
}
}

Payment statuses

Use paymentStatus to decide how to update the order in your system.

StatusMeaningRecommended action
CREATEDInvoice has been created and is waiting for payment.Keep the order pending.
PROCESSINGPayment has been detected or is being processed.Keep the order pending and continue checking.
COMPLETEDPayment has been completed successfully.Mark the order as paid and deliver the product or service.
FAILEDPayment failed, expired, or could not be completed.Do not deliver the order. Ask the customer to create a new payment.

Only treat the order as paid after the status becomes COMPLETED.

API + Hosted Checkout flow

Use this model when you want Hosted Checkout to handle the customer-facing payment page, while your backend keeps API-level control over order tracking and reconciliation.

The payment flow:

  1. Create an order in your system.
  2. Redirect the customer to Hosted Checkout using your Hosted Checkout integration.
  3. Pass your orderId in the Hosted Checkout payment request.
  4. The customer completes the payment on the Hosted Checkout page.
  5. Volet.com sends a payment status notification to your Status URL.
  6. Your backend verifies the notification signature.
  7. Your backend updates the order status.
  8. Optionally, your backend also checks the order through the API for reconciliation.

In this model, Hosted Checkout handles the payment page, payment method selection, payment instructions, and customer redirects.

The API can still be used to retrieve the payment order by orderId and reconcile the final status in your system.

Status handling with Hosted Checkout

When using Hosted Checkout, do not rely only on Success URL or Failed URL redirects.

Customer redirects are part of the browser flow and may not always reach your server. Use the Status URL notification and API order lookup to update order status reliably.

Recommended approach:

  1. Receive the Hosted Checkout Status URL notification.
  2. Verify the notification signature.
  3. Update the order status if the notification is valid.
  4. Use the API order lookup as a fallback or reconciliation check.

Error handling

Merchant API errors return a structured error response.

Common error cases include:

HTTP statusMeaning
400The request is malformed or contains invalid parameters.
401Authentication headers are missing or invalid.
403The API does not have permission to use the requested operation.
404The requested resource was not found.
500Unexpected server error.

When an error occurs:

  • Log errorId for support and diagnostics.
  • Check errorField to identify the request field related to the error.
  • Do not create a duplicate order automatically.
  • Retry only when it is safe to do so.

Testing checklist

Before accepting live crypto payments, test the full flow.

For API-only integrations, verify:

  • Invoice check.
  • Invoice creation.
  • Payment address display.
  • Destination tag or memo display, where required.
  • Invoice expiration handling.
  • Order status polling.
  • Completed payment handling.
  • Failed or expired payment handling.
  • Duplicate orderId handling.

For API + Hosted Checkout integrations, also verify:

  • Customer redirection to Hosted Checkout.
  • Status URL notification delivery.
  • Notification signature validation.
  • Success URL and Failed URL redirects.
  • API order lookup for reconciliation.

Important notes

  • API-only integrations do not use Hosted Checkout callbacks.
  • Your backend should check payment status through the API.
  • Always use a unique orderId for each payment.
  • Always show the exact address, amount, currency, network, and destination tag returned by the API.
  • Do not mark an order as paid until the payment status is COMPLETED.
  • Crypto payments depend on blockchain confirmations and network conditions.
  • Sending funds to the wrong address or network may result in permanent loss of funds.