Crypto payments API

Accept crypto, keep balances, send payouts and receive signed webhooks. All requests and responses are JSON (UTF-8); amounts are decimal strings. Successful responses wrap the payload in {"ok":true,"result":…}.

Authentication

Send Authorization: Bearer cpk_… (or X-Api-Key). Keys are issued in the dashboard → API keys. Rate limits: 600 req/min per IP and 600 req/min per key; on excess you get 429 with Retry-After.

Two keys. The payment key cpk_… creates invoices and static wallets. The payout key cpk_pay_… only works with payouts, balance and history. Once a payout key exists, payouts via API require it — a leaked payment key cannot move money (403 payout_key_required). The reverse is enforced too: a payout key cannot create invoices (403 payout_key_only).

curl https://pay.pulses.exchange/api/v1/me -H "Authorization: Bearer cpk_XXXX"

Idempotency

For invoice and payout creation send Idempotency-Key (8–128 chars). A retry with the same key within 24 hours returns the original response with x-idempotent-replay: 1 instead of creating a duplicate. Reusing a key with a different body returns 409 idempotency_conflict.

Invoices

POST/api/v1/invoices

curl -X POST https://pay.pulses.exchange/api/v1/invoices \
  -H "Authorization: Bearer cpk_XXXX" -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-A-1001" \
  -d '{"amount":"49.90","currency":"USD","order_id":"A-1001",
       "currencies":["usdt_trc20","usdt_ton","btc"],
       "callback_url":"https://shop.com/cpay/callback",
       "success_url":"https://shop.com/thanks"}'
FieldNotes
amount *positive decimal string
currencyprice currency: USD, EUR, RUB, USDT… (default USDT)
order_idyour id, unique per merchant — repeated calls return the same invoice
currenciesallowed payment directions, e.g. usdt_trc20. Empty = all enabled
pay_currencyfix a single coin/network, customer skips the choice
fee_payermerchant (default) or payer — adds the service fee on top
payer_sourceWhere the customer pays from: exchange (address from the exchange pool), wallet (wallet or service), or ask to ask on the payment page (the address is issued after the answer). With exchange or wallet the payment page does not ask. Default wallet. Returned in responses and webhooks.
lifetime_min5–1440, default 60
description, customer_email, metatext on the payment page, receipt email, arbitrary object returned in webhooks
callback_urlhttps webhook URL for this invoice

Redirect the customer to result.url. When pay_currency is fixed, the response also contains address, pay_amount and rate.

GET/api/v1/invoices/{uuid} · ?order_id=… · ?status=&limit=&offset=

Pagination: limit up to 200, or cursor — read x-next-cursor from the response headers and pass it as ?cursor=… until the header stops coming. Same for payouts.

POST/api/v1/invoices/{uuid}/cancel

POST/api/v1/invoices/{uuid}/refund

Refund sends the received amount back to the payer address. The amount is capped at received − service fee and the network fee is deducted from the refund. Live refunds require trusted IPs.

{"amount":"10.00"}   // omit to refund the whole remaining amount

When a network watcher is temporarily down (for example the provider hit its quota), that network is excluded from new live invoices: it is missing from the returned currency list, and a request for that network alone returns network_unavailable. Test invoices (cpk_test_) are not affected.

POST/api/v1/invoices/{uuid}/pay

Sandbox only (key cpk_test_…): marks a test invoice as paid, emulates the incoming transfer and sends the invoice.paid webhook — handy to run a store or bot end-to-end before going live. Body is optional: {"amount":"12.5"}, defaults to the invoice amount. The test invoice page also shows a “Test payment” button.

Invoice statuses

statusfinalmeaning
pendingnowaiting for payment
confirmingnotransaction seen, waiting for confirmations
partialnounderpaid, customer can top up
paid / paid_overyespaid in full / overpaid
partial_finalyesexpired with a partial payment credited
expired / cancelledyesno payment / cancelled
holdnomanual review (AML or late payment policy)
refundedyesrefund completed

Static wallets

A permanent address per customer: every deposit is credited to your balance and delivered as wallet.deposit.

curl -X POST https://pay.pulses.exchange/api/v1/wallets \
  -H "Authorization: Bearer cpk_XXXX" -H "Content-Type: application/json" \
  -d '{"currency":"usdt_trc20","customer_id":"user-42"}'

Invoice status in Telegram

Buyers do not need an account: https://t.me/pulsesapp?start=inv_<uuid> opens the bot and shows the invoice status (pending, paid, expired), the amount and an “Open payment page” button. The order number and merchant data are not exposed.

Payouts

Send funds from your balance to any address. Idempotent via order_id. Live payouts require trusted IPs in the dashboard.

Send Idempotency-Key with POST /payouts and /payouts/batch: a retry with the same key and body returns the same result and does not create a second payout or batch.

Live payouts require a 2FA code: send x-2fa-code: 123456 with the current authenticator code. One code = one payout (or one batch); a replay is rejected with 409 totp_replay. No code → 401 totp_code_required; 2FA disabled → 403 totp_setup_required.

A live payout is not broadcast immediately: there is a 3-minute grace window (payout_delay_sec) during which it can still be cancelled with POST /payouts/{uuid}/cancel. The response carries send_after and cancellable_until; if the payout went to approval, the window starts after approval.

After an API key rotation, a password change or a password reset, live payouts are frozen (403 payouts_frozen) as an anti-takeover measure. Unfreeze in the dashboard on the Payouts page with a 2FA code; test payouts always work.

{"currency":"usdt_trc20","amount":"20","address":"T…","order_id":"w-1","is_subtract":true}

Fee = the fixed network fee for the coin (never less than the estimated network cost). A percentage surcharge applies only when configured for the platform. is_subtract subtracts the fee from the amount; otherwise it is added. Batch: POST /api/v1/payouts/batch up to 200 items.

Set auto_route: true to fill a shortfall in the target network with the same asset held in the merchant's other networks. Cross-network conversion is free for the merchant: Pulses Pay covers the bridge cost. The payout enters routing, reserves every source, waits until the full amount is credited to the target network and only then becomes pending. Cancellation is allowed before the swap starts (409 route_already_started afterwards); every unspent reserve is returned automatically if a route fails. POST /api/v1/payouts/calc with the same flag returns available, combined_available, route_ok, route_count and cross_fee.

Balance & ledger

GET /api/v1/balance
{"ok":true,"result":[{"currency":"usdt_trc20","asset":"USDT","network":"tron","available":"25.74","locked":"0"}]}
GET /api/v1/ledger?currency=&limit=&offset=

Every movement: invoice/wallet (credit), fee (service fee), sweep_fee (on-chain cost of moving the deposit off its address — capped at 50% of the credit), payout, payout_refund, adjust, refund, swap. The per-network cost comes from service settings and is charged once per credit. The ledger is append-only; each row carries balance_after.

If the invoice carries customer_email, the payer gets a receipt after payment in the language they used on the checkout page (RU/EN), with the order reference, amount, time and a transaction link.

Webhooks

We POST JSON to your callback URL and retry with backoff (up to 10 attempts: 10s, 30s, 2m, 10m, 30m, 1h, 3h, 6h, 12h, 24h). Verify the signature:

hex(HMAC_SHA256(webhook_secret, timestamp + "." + raw_body))
headers: x-cpay-timestamp, x-cpay-signature, x-cpay-event, x-cpay-delivery-id

x-cpay-delivery-id is unique per delivery — use it to deduplicate on your side.

Reject requests older than 300 seconds. Handle events idempotently by invoice uuid.

Events

eventWhentype
invoice.confirmingPayment seen on chain, waiting for confirmationspayment
invoice.partialPart of the amount received, the invoice can still be topped uppayment
invoice.paidPaid in fullpayment
invoice.paid_overPaid with an overpaymentpayment
invoice.partial_finalClosed as underpaid: only part of the amount arrivedpayment
invoice.expiredPayment window expiredpayment
invoice.cancelledInvoice cancelledpayment
invoice.holdPayment held for review (AML or manual check)payment
invoice.refundedRefund completedpayment
wallet.depositIncoming transfer to a static wallet addresswallet
payout.sentTransaction broadcast, txid is in the bodypayout
payout.doneConfirmed on chain, funds debitedpayout
payout.failedDid not go out; error explains whypayout
payout.refundedTransaction never appeared on chain; the held amount is back on your balance (refunded, reason)payout

Payout flow: payout.sent → payout.done or payout.failed. If a transaction is not confirmed in time, the money stays locked while we reconcile it against the chain: confirmed → payout.done, absent for 72 hours → payout.refunded. Do not treat payout.failed alone as a balance change: the debit happens in payout.done, the return in payout.refunded (see ledger kinds payout and payout_refund).

Header x-cpay-event repeats the event; x-cpay-test: 1 marks test events — a live integration must ignore them. Delivery log with manual retry lives in the dashboard (API keys & webhooks) and over GET /cab/api/webhook-deliveries.

Webhooks originate from 109.120.135.9 — allowlist it if you filter inbound traffic. To replay a lost delivery, call POST /api/v1/invoices/{uuid}/resend (final statuses only: paid, paid_over, partial, hold, expired, cancelled); the dashboard has the same action on the webhooks screen.

Multiple endpoints

In the dashboard under “Project settings → Additional webhooks” you can add up to 10 URLs, each with its own secret and event list (for example a dedicated URL for invoice.paid only). The primary callback_url keeps receiving every event.

Signatures use the same scheme with the endpoint’s own secret: hex(HMAC_SHA256(endpoint_secret, timestamp + "." + raw_body)). The secret is shown once when the endpoint is created. Deleting an endpoint stops new deliveries immediately; retries already queued are still attempted.

Subscriptions

Schedule recurring invoices. Each cycle creates a normal invoice with order_id = <sub-uuid>-<cycle>, so payments and webhooks work as usual.

curl -X POST https://pay.pulses.exchange/api/v1/subscriptions \
  -H "Authorization: Bearer cpk_XXXX" -H "Content-Type: application/json" \
  -d '{"amount":"9.90","currency":"USD","interval_unit":"month","interval_count":1,
       "title":"Pro plan","max_cycles":12,"customer_email":"[email protected]"}'
FieldNotes
interval_unitday | week | month
interval_count1–365
max_cyclesomit for unlimited

GET/api/v1/subscriptions · /{uuid} · POST/{uuid}/pause · /resume · /cancel

More endpoints

EndpointPurpose
GET/api/v1/ratescurrent USD rates for supported assets
POST/api/v1/quoteconvert an amount: {"currency":"RUB","amount":"5000","pay_currency":"usdt_trc20"}
GET/api/v1/discountsper-coin discounts configured for your account
POST/api/v1/payouts/calcfee and total preview before sending: {"currency":"usdt_trc20","amount":"100"}
POST/api/v1/payouts/batchup to 200 payouts in one request
POST/api/v1/wallets/{uuid}/block
POST/api/v1/wallets/{uuid}/unblock
stop or resume crediting a static wallet
POST/api/v1/webhooks/verifycheck a signature: {"timestamp":"…","body":"…","signature":"…"}
POST/api/v1/webhooks/testsend a test event to your callback URL
GET /api/v1/wallets · /{uuid}list static wallets or fetch one with its address and totals
GET /api/v1/payouts · /{uuid} · POST /{uuid}/cancelpayout history or lookup by your order_id; cancel a payout that has not been sent yet
GET /api/v1/currenciescurrencies enabled for your account with minimums and payout fees

Partial payments keep the invoice open for a top-up; a payment after expiry is credited as late or moved to hold according to your account policy. The aml field carries the screening result of incoming funds.

Capabilities & migration

What the service does today, and how to move an integration over from another processor (Heleket is used as the example: different transport and signature, nearly identical fields).

Accepting payments

CapabilityIn the API
18 payment routes: 10 coins across 8 networksGET /api/v1/currencies; the payer picks coin and network on the checkout page
Fiat invoice with a locked ratecurrency = RUB/USD/EUR/KZT…, lifetime 5–1440 minutes
Payer chooses the cointo_currency, except_currencies, is_refresh
Per-coin discountdiscount_percent per invoice, coin_discounts in project settings
Amount precisionaccuracy_payment_percent 0–5
Who pays the feefee_payer = merchant or payer; subtract for payouts
Underpay & overpaystatuses partial, partial_final, paid_over; underpay_tolerance_pct
Late paymentslate_policy, late field, invoice.hold event
Payer datacustomer_email (receipt), additional_data, meta
Test modetest key, test:true objects, webhooks with x-cpay-test: 1

Static wallets

One address per customer: POST /api/v1/wallets, deposits arrive as wallet.deposit, block with /wallets/{uuid}/block, refund a blocked wallet from the dashboard.

Payouts

CapabilityIn the API
Single and batchPOST /api/v1/payouts, /payouts/batch (up to 200)
Quote before sendingPOST /api/v1/payouts/calc
Cancel before dispatchPOST /api/v1/payouts/{uuid}/cancel
Lifecyclepending → processing → sent → done; events payout.sent/done/failed/refunded
Chain reconciliationunconfirmed tx: done when it appears, refunded after 72 hours
Limits and approvalsdaily cap, approval threshold, new address, risk score, 2FA on every live payout

Integration & operations

Migrating from Heleket

Transport differs: Heleket signs with MD5 over a form, we use JSON and HMAC-SHA256. Invoice fields map one-to-one, so mostly the request wrapper and response parsing change.

HeleketPulses Pay
POST /paymentPOST /api/v1/invoice
POST /payment/{uuid}/infoGET /api/v1/invoices/{uuid}
POST /payoutPOST /api/v1/payouts
payment_statusstatus (same values: paid, paid_over, partial, expired, cancel→cancelled)
payment_amountpay_amount (in the payment coin)
merchant_amount, commissionmerchant_amount, commission
expired_atexpires_at
txid, address, network, url, uuid, order_id, is_finalsame names; txid lives in txs[]
MD5 over a concatenated stringx-cpay-signature = HMAC-SHA256, 300-second freshness

Full schema: OpenAPI 3.1; minimal clients: the SDKs below.

POST/api/v1/sandbox/topup

Test key only: adds a fixed amount to the test balance so payouts and refunds can be integrated before account approval. Up to 10 top-ups per day; the live balance is never touched.

{"currency":"usdt_trc20"}
→ {"ok":true,"result":{"currency":"usdt_trc20","amount":"1000","test":true}}

API reference

All 35 methods. Machine-readable schema: /openapi.json (OpenAPI 3) — import into Postman or generate a client.

PathPurpose
GET/api/v1/balanceMerchant balances
GET/api/v1/currenciesEnabled currencies and minimums
GET/api/v1/discountsPer-coin discounts and markups
POST/api/v1/discountsSet a per-coin discount or markup (live key only)
POST/api/v1/invoicesCreate an invoice
GET/api/v1/invoicesList invoices or fetch one by order_id
GET/api/v1/invoices/{uuid}Get an invoice
POST/api/v1/invoices/{uuid}/cancelCancel an unpaid invoice
POST/api/v1/invoices/{uuid}/paySimulate a payment for a test invoice (sandbox only)
POST/api/v1/invoices/{uuid}/refundRefund a paid invoice to the payer address
POST/api/v1/invoices/{uuid}/resendRe-deliver the last webhook
GET/api/v1/ledgerLedger entries
GET/api/v1/meMerchant profile and limits
POST/api/v1/payoutsCreate a payout
GET/api/v1/payoutsList payouts
POST/api/v1/payouts/batchCreate up to 200 payouts
POST/api/v1/payouts/calcCalculate payout fee and total
GET/api/v1/payouts/{uuid}Get a payout
POST/api/v1/payouts/{uuid}/cancelCancel a queued payout
POST/api/v1/quoteQuote pay amount in a chosen currency
GET/api/v1/ratesExchange rates snapshot
POST/api/v1/sandbox/topupTop up a test balance (sandbox only)
POST/api/v1/subscriptionsCreate a subscription
GET/api/v1/subscriptionsList subscriptions
GET/api/v1/subscriptions/{uuid}Get one subscription
POST/api/v1/subscriptions/{uuid}/cancelCancel a subscription
POST/api/v1/subscriptions/{uuid}/pausePause a subscription
POST/api/v1/subscriptions/{uuid}/resumeResume a subscription
POST/api/v1/walletsCreate a static wallet
GET/api/v1/walletsList static wallets
GET/api/v1/wallets/{uuid}Get a static wallet with recent transfers
POST/api/v1/wallets/{uuid}/blockBlock deposits to a wallet
POST/api/v1/wallets/{uuid}/unblockUnblock a wallet
POST/api/v1/webhooks/testSend a test webhook
POST/api/v1/webhooks/verifyVerify a webhook signature

Errors

{"error":"insufficient_balance","message":"insufficient balance"}
HTTPerror
400bad_amount, bad_currency, bad_address, bad_callback_url, network_unavailable
401unauthorized
403merchant_pending, payouts_disabled, payouts_frozen, trusted_ips_required, totp_setup_required, risk_rejected, risk_banned
404not_found
409idempotency_conflict
422insufficient_balance
429rate_limited + Retry-After
Need the full reference (subscriptions, discounts, partial payments, swap, team roles)? The Russian documentation covers every endpoint: /docs. English full reference is in progress.
Support: [email protected] · pulses.exchange