Connect your business.
Build your next step.
A REST API to create crypto payments and track every payment in your own workflow.
https://api.buy360.me/v1The examples use the API configured for this application. Set your API domain before sending requests in your deployment. Monetary amounts are sent as decimal strings.
The API version is v1. All routes below include /v1 in the URL.
| Task | API route |
|---|---|
| Receive a payment | POST /v1/charges |
| Record a customer deposit | POST /v1/deposits |
| Estimate a swap | GET /v1/conversions/estimate |
| Swap between coins | POST /v1/conversions |
| Register the customer wallet | POST /v1/withdrawals/beneficiaries |
| Request a withdrawal | POST /v1/withdrawals |
| Transfer a balance to another application | POST /v1/transfers |
| Check reconciled liquidity | GET /v1/balances |
01. Authentication
Create a key per application in Applications or a global key in Developers. Send the key in the Authorization header with each authenticated request and keep it only on your server. Manual charges created from the dashboard do not require an API key.
Manage API keysAuthorization: Bearer b360_live_SUA_CHAVEErrors return JSON as { "error": { "code", "message" }, "request_id" }. Handle them by the code field and keep request_id for support. HTTP 429 with code RATE_LIMITED means a request limit: wait for the Retry-After header, when present, before retrying. HTTP 409 with IDEMPOTENCY_CONFLICT means the Idempotency-Key was already used with different data.
Application keys work only from the application's allowed IP addresses. Set them in the dashboard, under Applications, in Allowed IP addresses: IPv4 or IPv6 addresses, or ranges (CIDR), separated by commas, up to 20 per application. Each application has its own list. With no address set, every request with the key returns HTTP 403 with code IP_ALLOWLIST_REQUIRED. From an address outside the list, it returns HTTP 403 with code IP_NOT_ALLOWED. The error message states the address the request came from. The dashboard has no such restriction.
A new key only creates and reads charges. For it to withdraw, swap or transfer, turn each permission on in the dashboard, under Applications, API keys, Permissions: the change asks for the authenticator code (2FA). Buy360 may block a permission on a key for safety; it then stays off until released. Without the permission, the routes answer HTTP 403 with code WITHDRAWAL_PERMISSION_REQUIRED, CONVERSION_PERMISSION_REQUIRED or TRANSFER_PERMISSION_REQUIRED.
Most common error codes
| Code | HTTP | What it means |
|---|---|---|
UNAUTHORIZED | 401 | Key missing, invalid or revoked. |
KEY_ENVIRONMENT_MISMATCH | 401 | The key belongs to another environment (test or live). |
IP_ALLOWLIST_REQUIRED | 403 | The application has no allowed IP address set. |
IP_NOT_ALLOWED | 403 | The request came from an address outside the application's list. |
WITHDRAWAL_PERMISSION_REQUIRED | 403 | The key does not have the withdrawal permission on. |
CONVERSION_PERMISSION_REQUIRED | 403 | The key does not have the swap permission on. |
TRANSFER_PERMISSION_REQUIRED | 403 | The key does not have the transfer permission on. |
BENEFICIARY_NOT_APPROVED | 403 | The withdrawal destination is not registered and approved. |
VALIDATION_ERROR | 400 | A field is missing or in an invalid format. |
INVALID_CURRENCY | 400 | The coin or network is not in the catalogue. See GET /v1/currencies. |
INVALID_PAYOUT_ADDRESS | 400 | The address is not valid for the coin and network, or the required memo is missing. |
IDEMPOTENCY_KEY_REQUIRED | 400 | Send the Idempotency-Key header. |
IDEMPOTENCY_CONFLICT | 409 | The Idempotency-Key was already used with other data. |
INSUFFICIENT_APPLICATION_LIQUIDITY | 409 | The application does not have enough balance. |
CONVERSION_BELOW_MINIMUM | 409 | The swap amount is below the accepted minimum. |
DEPOSIT_AMOUNT_OUT_OF_RANGE | 400 | The deposit amount is outside the account's limits. |
RATE_LIMITED | 429 | Too many requests. Wait the time in the Retry-After header. |
FINANCIAL_OPERATIONS_PAUSED | 503 | The coin, the network or the operation is paused right now. Try later. |
Sandbox
Before using real money, test your whole integration in the test environment. It is separate from production, with its own account, keys and data. Payments are simulated and no amount is real.
https://sandbox.buy360.me/v1Create your account at sandbox.buy360.me and confirm your e-mail. No identity verification is needed there. Test keys start with b360_test_ and work only in the test environment; production keys, b360_live_, work only in production.
Create the charge as you would in production. To pay it, use the Simulate payment button on the test checkout, or call the route below from your server. outcome accepts paid (the full amount), partial (half) and overpaid (a little more).
curl -X POST 'https://sandbox.buy360.me/v1/charges/chg_…/test-payments' \
-H 'Authorization: Bearer b360_test_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-d '{ "outcome": "paid" }'A simulated payment takes the same path as a real one: the charge changes status, the balance is credited to the application and your webhook is sent. Withdrawals, swaps and transfers also work with the test balance. Rates are fixed, and test addresses start with TEST-ONLY: they exist on no network and cannot receive real coins.
When everything works, create your production account and switch the API base URL and the key to b360_live_.
02. Create your first payment
The endpoint creates a payment request with checkout. If pay_currency is omitted, the buyer chooses the currency and network before an address is generated. Send a unique Idempotency-Key per operation and reuse it when resuming the same attempt.
curl -X POST 'https://api.buy360.me/v1/charges' \
-H 'Authorization: Bearer b360_live_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: pedido-123-tentativa-1' \
-d '{
"price_amount": "100.00",
"price_currency": "usd",
"order_id": "pedido-123"
}'At checkout, call GET /v1/charges/:id/currencies or GET /v1/payment-links/:slug/currencies to list only accepted currencies and networks. Use GET /v1/estimate for an estimate excluding fees. Confirm the choice with POST /v1/charges/:id/payment, sending pay_currency and an Idempotency-Key saved for each attempt. Once the address is created, the currency and network are locked.
Some networks carry a network fee per payment. When it applies, the charge carries network_fee with amount_usd, payer and total_amount, and pay_amount already includes the share of the buyer. A network with a fee is offered only from the minimum amount set for it.
Show the buyer the value of send_amount: it is the amount owed (pay_amount) rounded up to a few places, to be typed without a mistake. Sent in full, it pays the charge.
| Field | Description |
|---|---|
price_amount | Positive amount as a decimal string, within the decimal places of the currency. |
price_currency | Price currency, in lower case. There are 44, listed below. |
pay_currency | Optional. Provide the exact currency and network code only if your integration has already made that selection. |
application_id | Optional in the dashboard or with a global key. Application keys automatically associate charges with their own application. |
order_id | Optional order identifier in your system. |
customer_ref | Optional. Opaque reference to your customer, with no personal data. Required for deposits and withdrawals. |
description | Optional. Charge description, up to 500 characters. |
expires_in_minutes | Optional. Checkout validity in minutes, from 1 to 1440. |
Price currencies
There are 44, always in lower case. The price is converted to crypto when the buyer chooses the coin, at the rate of that moment, and the rate stays locked until the charge expires.
usd, brl, eur, gbp, aed, ars, aud, bdt, bgn, cad, chf, clp, cny, cop, czk, dkk, egp, ghs, hkd, huf, idr, ils, inr, jpy, krw, mad, mmk, mxn, myr, nok, nzd, php, pkr, pln, ron, sar, sek, sgd, thb, try, twd, uah, vnd, zarThe amount goes up to the equivalent of 1,000,000 dollars, whichever the currency. In clp, jpy, krw and vnd, which have no cents, send a whole number: "1500", not "1500.00".
If the quote expires before the checkout deadline and nothing was paid, the charge reports quote_refreshable: true. Send POST /v1/charges/{id}/refresh-quote to receive the new pay_amount for the same address. In the Buy360 checkout the buyer does this with the Refresh quote button.
03. Track the payment
Look up a payment through the authenticated API, or use the public route to power your checkout. The public route returns only the data needed for payment.
GET /v1/charges/:id
GET /v1/charges/:id/publicA payment request awaiting confirmation is not yet a completed payment. Before releasing a product or crediting a balance, verify the current PAID status on your server through authenticated GET /v1/charges/:id. Browser messages and widget callbacks are for display only.
04. Receive updates
Each application notifies your system with its own address and secret. In the panel, open Applications, choose the application, go to API keys and fill in the section Webhook of this application. Saving the address creates the secret and shows it once: keep it on your server. Without an address and a secret, the application sends no notification.
The address must be HTTPS, on the standard port, with a public domain of yours. Local addresses, IPs, ports other than 443 and reserved domains are refused.
Choose what to receive
In the same section, tick the events your application wants. What is not ticked is not sent and appears as Not sent in the history. With nothing ticked, you receive them all.
charge.payment_selected— the buyer chose the coin and the network. From here the payment address and the exact amount in crypto exist.charge.updated— the state of the charge changed: payment seen on the network, confirmed, expired, cancelled, failed or refunded.charge.settled— the amount was reconciled and credited to the application's balance, with gross, fee and net. It is in this event that the money becomes yours.charge.repeated_deposit— a new payment arrived at the address of a charge already used. The original charge does not change and the amount is not credited automatically.withdrawal.updated— a withdrawal changed state: awaiting approval, being sent, completed with the transaction hash, or rejected.conversion.updated— a swap changed state, including the automatic conversion of what the application receives.transfer.updated— a transfer between two of your applications changed state. The notification goes to the source application.
How the notification arrives
We send a POST with a JSON body and three headers: X-Buy360-Id (unique identifier of the event), X-Buy360-Timestamp (Unix seconds) and X-Buy360-Signature (sha256= followed by the hexadecimal). Answer with any 2xx status after recording the event. Any other answer, or more than 10 seconds without answering, counts as a failure.
A delivery that fails is repeated, up to ten attempts. The history is in Applications, tab Developers, with the state of each delivery, the HTTP code of your answer and the exact content we sent. There is also the Send again button, which sends the same event once more.
Check the signature
Compute HMAC-SHA256 with your secret over the text made of timestamp + dot + event identifier + dot + the body received, exactly as it arrived, before any parsing or reserialization. Compare it with the signature in constant time. Refuse what does not match, what has more than 5 minutes of difference in the timestamp, and what you have already processed.
assinatura = HMAC_SHA256(segredo, timestamp + "." + id + "." + corpo)
confere = ( "sha256=" + hex(assinatura) ) == X-Buy360-SignatureOrder and repetition
The same event can arrive more than once and events can arrive out of order. Keep the identifier of the event and ignore the ones you have seen. Keep as well the highest data.version applied per resource and process only what comes with a higher number: equal or lower numbers are repetitions or late arrivals. Record the state and the version in the same transaction.
Body of the event
Every event has the same shape: id, type, created_at, event_version and data. The id also goes in the header X-Buy360-Id. Inside data comes the resource, with the fields below.
{
"id": "chg_…_2",
"type": "charge.settled",
"created_at": "2026-11-17T02:58:51.984Z",
"event_version": 2,
"data": {
"id": "chg_…",
"environment": "live",
"application_id": "app_…",
"customer_ref": null,
"order_id": "3434636",
"description": "Plano anual",
"version": 2,
"status": "PAID",
"accounting_status": "CREDITED",
"paid_at": "2026-11-17T02:58:51.361Z",
"created_at": "2026-11-17T02:58:01.702Z",
"updated_at": "2026-11-17T02:58:51.984Z",
"settlement": {
"currency": "usdtbsc",
"gross_amount": "5",
"total_fee": "0.1",
"merchant_net": "4.9"
}
}
}In charge.payment_selected and charge.updated, data also carries price_amount and price_currency (the price you asked for), pay_amount and pay_currency (the amount and the coin the buyer chose), pay_address and payin_extra_id (the address and the memo/tag that receive), actually_paid (what the network delivered) and partial_acceptance when a smaller amount was accepted.
In withdrawal.updated, data carries currency, amount, address, extra_id, approval_mode, max_network_fee and tx_hash, which arrives filled in once the network confirms the sending. The exact cost of the withdrawal is in GET /v1/withdrawals/:id.
In conversion.updated, data carries from_currency, to_currency, from_amount, estimated_to_amount and to_amount. In transfer.updated, data carries from_application_id, to_application_id, currency, amount and completed_at.
When an operation ends badly, data.error_code explains why, with one of the codes in the table of errors.
What to do on each event
Mark the order as awaiting payment when you create the charge, with the answer of the API itself. On charge.payment_selected, show the buyer the address and the amount in crypto, if your system follows that. On charge.updated with status PAID, record that the payment appeared on the network. Release the product on charge.settled, which is when the amount is reconciled and credited, and use merchant_net as the amount received.
05. Embed checkout
Load your deployment’s SDK and configure your checkout origin. The API key stays on your backend.
<script src="https://pay.buy360.me/v1/checkout.js"
data-checkout-origin="https://pay.buy360.me"></script>
<button onclick="Buy360.open({ chargeId: 'chg_…' })">
Pay with crypto
</button>Create the payment on your server and pass only its identifier to the browser. The widget opens checkout in a modal and validates the origin of incoming messages. Its callbacks only update the interface. Never release products, services, or balance based on browser callbacks: verify webhook signatures and versions, and confirm the current state on your backend through the authenticated API before fulfillment.
Inside the frame the buyer sees the charge; the payment is completed on the official checkout, which the widget opens for them. Address, QR Code and wallet connection appear only there: in a frame inside another page, nothing guarantees what sits on top, and an address laid over it would send your customer's money to someone else.
Buy360.open({
chargeId: 'chg_…',
onStatus: (event) => { /* display only */ },
onClose: () => { /* buyer closed */ }
});06. Deposits and withdrawals by application
Use the application key on your server. Send customer_ref as an opaque customer identifier. Keep email addresses, identification numbers and other personal data out of this field.
Create a deposit
POST /v1/deposits
Authorization: Bearer <APP_API_KEY>
Idempotency-Key: <UUID>
Content-Type: application/json
{
"customer_ref": "customer_123",
"price_amount": "100.00",
"price_currency": "usd"
}HTTP 201 means the checkout was created. Use checkout_url to open it and verify PAID with an authenticated GET /v1/deposits/:id before crediting the customer.
Request a withdrawal
Before the withdrawal, register the customer wallet with POST /v1/withdrawals/beneficiaries, sending customer_ref, currency, address and extra_id when the network requires it. The response carries status: APPROVED allows the withdrawal; PENDING waits for the merchant approval in the dashboard; REJECTED and DISABLED block it. Use GET /v1/withdrawals/beneficiaries to follow it. The wallet cannot move to another customer later.
The wallet list is paginated: use limit from 1 to 200 (default 50) and send the next_cursor from the response in the cursor parameter for the next page. Filter by exact customer_ref or by status.
Withdrawals require an application key with the withdrawal permission, reconciled liquidity and an authorized wallet. Give the exact coin and network code in currency. Send amount and max_network_fee as decimal strings, and extra_id when the network requires a Memo / Tag.
POST /v1/withdrawals
Authorization: Bearer <APP_API_KEY>
Idempotency-Key: <UUID>
Content-Type: application/json
{
"customer_ref": "customer_123",
"currency": "usdterc20",
"amount": "25.00",
"address": "<DESTINATION_ADDRESS>",
"max_network_fee": "3.00"
}HTTP 202 records the request. Check GET /v1/withdrawals/:id and consider the withdrawal settled only when its status is COMPLETED. In UNCERTAIN or REVIEW, keep the same Idempotency-Key and continue tracking the original withdrawal.
The response carries fee, the withdrawal fee as a single value: estimated while the withdrawal is under way and the one charged after COMPLETED. In that state, total_debited carries the amount plus the fee and tx_hash the transaction identifier on the network.
Check activation at GET /v1/withdrawals/readiness and liquidity at GET /v1/balances. Permissions are granted per application key.
07. Swap between coins of the application
The estimate accepts a dashboard session or an application key with the swap permission.
GET /v1/conversions/estimate?from_currency=usdtbsc&to_currency=bnbbsc&amount=100.00The estimated_to_amount field is indicative and already has the fees taken (fees_included=true). The fee field carries the fee as a single value, in the source coin, when available. The query reserves no balance and runs no swap.
Use an application key with the swap permission and reconciled balance in the source coin. A swap has its own Idempotency-Key and requests no withdrawal.
POST /v1/conversions
Authorization: Bearer <APP_API_KEY>
Idempotency-Key: <UUID>
Content-Type: application/json
{
"from_currency": "usdtbsc",
"to_currency": "bnbbsc",
"amount": "100.00"
}The amount is a positive decimal string of up to 18 places. The two coins must differ: there is no swap between networks of the same coin. Below the accepted minimum, the answer is HTTP 409 with CONVERSION_BELOW_MINIMUM.
HTTP 202 records the request. Use GET /v1/conversions/:id to track it or GET /v1/conversions to list conversions. In UNCERTAIN or REVIEW, keep the key and track the original request.
At COMPLETED, use GET /v1/balances to check liquidity in the destination currency. To withdraw, use POST /v1/withdrawals with withdrawal permission and a separate Idempotency-Key.
Check GET /v1/conversions/readiness to see whether swaps are available.
08. Transfer a balance between applications
Moves a balance from the application of the key to another application of the same account. It requires a key of the source application with the transfer permission, which is off on new keys.
POST /v1/transfers
Authorization: Bearer <APP_API_KEY>
Idempotency-Key: <UUID>
Content-Type: application/json
{
"to_application_id": "app_…",
"currency": "usdt",
"amount": "25.50",
"reason": "Reposição da carteira de saques"
}The currency field accepts the coin or any of its network codes: there is one balance per coin. The reason field is optional, from 10 to 500 characters. A transfer has no fee.
HTTP 202 records the transfer as RESERVED. Check GET /v1/transfers/:id: COMPLETED means the credit in the destination application and REJECTED returns the amount to the source, with the reason in error_code. GET /v1/transfers lists the transfers the application sent or received.
Repeating the same Idempotency-Key with the same data returns the original transfer. There is no transfer webhook: follow it by querying.