On this page
Overview
The API lets your platform take payments that settle in USD stablecoins, with your own commission on every order. You create an order, send the customer to its checkout link, and once the payment arrives the API splits it and pays every recipient on-chain. You never hold the funds or run blockchain infrastructure.
- Card, bank transfer and digital wallet payments in US dollars or euros, through a hosted checkout page, an embeddable widget or a ready payment link: you choose per order.
- One checkout for the customer, with no payment provider to choose: Privy, the wallet and payments infrastructure owned by Stripe, routes each payment to a large licensed provider that serves the customer's country.
- Every order has its own wallet, so each payment reconciles to exactly one order, with no memo or reference to match.
- A customer who comes back to a payment link sees the real state of the payment (in progress, already paid or expired), so nobody pays twice by mistake.
- Automatic split of every payment between the seller, your commission and the platform fee, paid out on-chain.
- Split payouts to up to 5 seller wallets and up to 5 commission wallets per order.
- Payouts start as soon as the payment is final on-chain, with no manual step: on Base, a payout is final about half an hour after the payment arrives.
- Payouts follow what actually arrives: any excess goes to the seller, and a shortfall is paid out in proportion to what arrived.
- Idempotent order creation, cursor pagination and stable error codes.
- Optional Telegram messages to the seller and to you when an order is created, paid and settled.
- Signed webhooks when the payment arrives, is paid out, fails to pay out or expires, when a customer pays an order again, and for what the payment page reports from the checkout.
How it works
- You create an order with the amount, the stablecoin and network, the seller's wallet(s) and your commission. See
POST /v1/orders. - The API returns the order's own wallet (
deposit.address) with how much must arrive (deposit.amount), the fees, and, for USDC on Base, a checkout (checkout.url). - The customer pays by card, bank transfer or digital wallet, in US dollars or euros, on the payment page, where a licensed payment provider converts the payment to USDC that reaches the order wallet. Or they send the stablecoin straight to
deposit.address. - The API detects the payment on-chain. When the balance is final, the order becomes
received. Nobody has to confirm the payment by hand. - The API splits and pays out: the seller's share, your commission and the platform fee, each recipient in its own on-chain transfer. When every transfer is final, the order becomes
settled.
customer
└─► checkout (checkout.url)
├─► payment page
│ MDR and processor fee
└─► order wallet (deposit.address)
├─► seller wallet(s)
│ sellerReceives
├─► your wallet(s)
│ partnerReceives
└─► platform
platformFeeWho it is for
- Marketplaces and platforms that pay sellers, creators or freelancers in USD stablecoins and keep a commission on each sale.
- Payment and invoicing products that want stablecoin settlement without running wallets, nodes or payout logic.
- Agencies and resellers that split each payment between several wallets.
Why integrate
Card-to-crypto gateways tend to lose payments in the same places. This is how the API avoids each one:
- The customer lands on a payment provider that requires an account, and gives up. Here the customer doesn't pick a provider: Privy, the wallet and payments infrastructure owned by Stripe, takes them to a large licensed payment provider that serves their country.
- Advertised coverage isn't real, and the customer reaches a country no provider serves. The provider is chosen at payment time, among those that serve where the customer is.
- The fee shows up in the middle of the payment.
GET /v1/orders/{orderId}/checkout/offerstells you what the customer will pay before they pay, with the fees itemized. - Nobody tells you what happened to a payment. Every order has its own wallet (
deposit.address), and signed webhooks report each step, including the amount paid (data.payment.amount). Every payout is an on-chain transfer you can check. - What arrives depends on the provider: a different coin, on a different network. Payouts are always USDC on Base, already split between the seller, your commission and the platform.
- A customer who pays twice becomes your problem. A second payment at the checkout, or one made after the order expired, is paid out automatically through a derived order.
- A per-payment cap that depends on the country forces large sales to be split, or lost. There is no maximum per order on our side, only the US$ 10 minimum.
We work with large licensed payment providers. Privy compares the options available in the customer's country and routes each payment to one that serves it, so there is no provider list to choose from and no dead end.
Depending on the country and the amount, the payment provider may ask the customer to confirm their identity.
Terms of use
Integrating the API means accepting these terms. You accept them when you create an API key.
- We do not perform KYB. Verifying the businesses and sellers that use your integration (KYB) is the responsibility of whoever integrates the API.
- Regulators are your responsibility. We are not liable for any problems with regulators or supervisory authorities.
- No refunds. We are not responsible for refunds, and there are no refunds in cryptocurrency.
- Fees: the platform fee is 1% per payment for orders created through the API, or 3% on our website, plus the processing fee of 6.70% + US$ 0.50 per payment (the payment provider's MDR) when the customer pays by card, bank or digital wallet. Through the API, the commission you set comes on top. There is no maximum amount per order, only the US$ 10 minimum. The card processor that handles the payment may also deduct its own fee, which varies by processor, from what it delivers, so less reaches the order wallet, and the payout follows what arrives.
Quickstart
- Get an API key from our Telegram bot @fiat_to_crypto_bot with
/newkey. The key is shown once, together with your webhook signing secret: keep both on your server only. - Check the supported assets with
GET /v1/assets. - Create an order with
POST /v1/ordersand send the customer tocheckout.url, or use another of the checkout options. The wallets in the examples are placeholders: put in wallets you control. - Follow the order with webhooks or
GET /v1/orders/{orderId}: atreceivedthe payment has arrived, and atsettledevery recipient has been paid. See order lifecycle.
curl "https://api.payfiattocrypto.com/v1/orders" \
-H "Authorization: Bearer $PFC_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-A-1001" \
-d '{
"amount": "100.00",
"asset": {
"symbol": "USDC",
"network": "base"
},
"feeMode": "seller",
"sellerWallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee": {
"rate": "0.01",
"wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
}
}'const response = await fetch("https://api.payfiattocrypto.com/v1/orders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PFC_API_KEY}`,
"Content-Type": "application/json",
// One key per order, reused on every retry of that order.
"Idempotency-Key": "order-A-1001",
},
body: JSON.stringify({
"amount": "100.00",
"asset": {
"symbol": "USDC",
"network": "base"
},
"feeMode": "seller",
"sellerWallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee": {
"rate": "0.01",
"wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
}
}),
});
const order = await response.json().catch(() => null);
if (!response.ok) {
throw new Error(order?.error ? order.error.code + ": " + order.error.message : "HTTP " + response.status);
}
// Send the customer to the hosted checkout (or embed checkout.embedUrl).
console.log(order.checkout.url);import os
import requests
response = requests.post(
"https://api.payfiattocrypto.com/v1/orders",
headers={
"Authorization": f"Bearer {os.environ['PFC_API_KEY']}",
# One key per order, reused on every retry of that order.
"Idempotency-Key": "order-A-1001",
},
json={
"amount": "100.00",
"asset": {
"symbol": "USDC",
"network": "base"
},
"feeMode": "seller",
"sellerWallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee": {
"rate": "0.01",
"wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
}
},
timeout=30,
)
if not response.ok:
try:
error = response.json()["error"]
except (ValueError, KeyError):
response.raise_for_status()
raise RuntimeError(f"{error['code']}: {error['message']}")
order = response.json()
# Send the customer to the hosted checkout (or embed checkout.embedUrl).
print(order["checkout"]["url"])<?php
$ch = curl_init("https://api.payfiattocrypto.com/v1/orders");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("PFC_API_KEY"),
"Content-Type: application/json",
// One key per order, reused on every retry of that order.
"Idempotency-Key: order-A-1001",
],
CURLOPT_POSTFIELDS => json_encode([
"amount" => "100.00",
"asset" => [
"symbol" => "USDC",
"network" => "base",
],
"feeMode" => "seller",
"sellerWallet" => "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee" => [
"rate" => "0.01",
"wallet" => "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359",
],
"webhookUrl" => "https://example.com/webhooks/payfiattocrypto",
"metadata" => [
"orderRef" => "A-1001",
],
]),
CURLOPT_TIMEOUT => 30,
]);
$raw = curl_exec($ch);
if ($raw === false) {
// No answer: the order may exist. Retry with the same Idempotency-Key.
throw new RuntimeException("Network error: " . curl_error($ch));
}
$order = json_decode($raw, true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException(($order["error"]["code"] ?? "HTTP " . $status) . ": " . ($order["error"]["message"] ?? ""));
}
// Send the customer to the hosted checkout (or embed checkout.embedUrl).
echo $order["checkout"]["url"];{
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"status": "created",
"deposit": {
"address": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb",
"amount": "100.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "97.998000",
"platformFee": "1.000000",
"partnerFee": "1.000000",
"partnerReceives": "0.998000",
"networkFee": "0.004000"
},
"checkout": {
"token": "kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"url": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"embedUrl": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT?embed=1",
"feeMode": "seller"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
},
"createdAt": "2026-11-16T14:05:09.120Z"
}Authentication
Every request needs an API key in the Authorization header. Keys start with ftc_. Each account has one active key. A new key replaces it, and the previous key keeps working for 24 hours, so you have time to switch; /revoke in the bot stops a key at once: use it on the previous key if it leaked.
Authorization: Bearer ftc_…Server-side only: never put a key in a browser, mobile app or public repository. Anyone with the key can create orders in your name.
Base URL and conventions
https://api.payfiattocrypto.com- HTTPS only. Requests and responses are JSON in UTF-8; send
Content-Type: application/jsonwith a body. - Money is a decimal string, never a JSON number:
"100.50", not100.5. Amounts are in units of the stablecoin, with at most the token's decimal places (6); more decimal places return400 INVALID_REQUEST. USDC counts as US$ 1 for every minimum and limit. - An asset is always the pair
{ "symbol": "USDC", "network": "base" }, today the only pair the API accepts. The same symbol on another network would be another asset. - In these docs, an order is the API's payment order (
orderId), not an order in your own system. Link the two with your own reference inmetadata. - Wallets are EVM addresses in EIP-55 checksummed form, exactly as the wallet displays them. An all-lowercase address is rejected, because a mistyped character could not be detected, and a transfer to a mistyped address cannot be reversed.
- Timestamps are ISO 8601. Responses use UTC; query filters need an explicit time zone.
- Unknown request fields are rejected with
400 INVALID_REQUEST, so a typo in a field name never goes unnoticed. - Responses may gain new fields over time. Ignore fields you do not know. Breaking changes get a new version prefix (
/v2). - Every error message is in English. Branch on
error.code, which is stable. - A request body can have up to 1 MiB; a larger one returns
413 INVALID_REQUEST. - Questions and support: @payfiattocrypto on Telegram.
Supported assets and networks
Every order pays out in one stablecoin on one network, chosen in the request. Today the API operates on Base only, with USDC: any other pair returns 400 UNSUPPORTED_ASSET. Every order can be paid by card, bank or digital wallet at the checkout, or by sending USDC on Base straight to the order's own wallet (deposit.address).
| Asset | Network (network) | Token contract | Payout after payment |
|---|---|---|---|
| USDC · USD Coin | Base (base) | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | ~30–38 minutes |
Payout time counts from the payment reaching the order wallet, and covers confirming the payment and confirming the payout. On Base, both wait for finality on Ethereum. That wait is part of how the network works, not a delay on our side. Read the live values from GET /v1/assets.
Checkout: card, bank and digital wallets
Orders in USDC on Base, today every order, come with a checkout: the customer pays in US dollars or euros on a payment page, where a licensed payment provider, picked there for the customer, converts the payment to USDC. The USDC reaches the order's own wallet, and from there it is the same flow as any payment. A derived order has no checkout, and the checkout endpoints return 409 ORDER_NOT_PAYABLE for it.
Three ways to send the customer
| Option | How | What the customer sees |
|---|---|---|
| Hosted page | Send the customer to checkout.url. | Our page: the currency and the amount, then the payment page in a new tab. |
| Widget | Embed checkout.embedUrl in an iframe on your site. | The same page, inside yours. |
| Ready link | Call POST /v1/orders/{orderId}/checkout and send the customer its url by email, chat or a button. | The payment page, straight away. Our page appears only when there is nothing to pay: a payment in progress, already paid or expired. |
Start with the hosted page: it shows the order's state, follows the payment and brings the customer back with checkout.returnUrl. Use the widget to keep the customer on your own page. Use the ready link to send the payment by email or chat, or behind your own button, when sending the customer straight to the payment page matters more than our page around it.
checkout.payer.currencysets the customer's currency:USD(the default) orEUR. On the hosted page and the widget, the customer can still switch.- The payment page picks the payment provider for the customer. The API has no list of providers, countries, payment methods or per-payment limits, and no way to choose them: the payment page shows the customer what is available to them before anything is charged.
- The payment page does not run inside an iframe: the widget opens it in a new tab and keeps showing the payment status.
- A payment that is opened and not paid is reused for 60 minutes; after that, a new one is opened. An order opens at most 10 payments per hour.
- The widget adapts to its frame: a width from 360 to 480 px and a height of about 700 px fit every step. Any site can embed it. If you add a
sandboxattribute to theiframe, includeallow-scripts,allow-same-origin,allow-forms,allow-popupsandallow-popups-to-escape-sandbox: the payment page opens in a new tab. checkout.returnUrl(https) is where the hosted page sends the customer back, exactly as you gave it: nothing is added to it. While the payment is pending or being confirmed, the hosted page shows a link to it; on the screen of an expired order, a button to it. Once the payment reaches the order wallet, it sends the customer there after 5 seconds. Confirming can take minutes or hours, so the customer can leave earlier through the link. The widget never navigates: your page decides, from the widget events. ReachingreturnUrlis not proof of payment: confirm with the order status or the webhooks.- The widget tells your page what happens through
postMessage, so you can resize theiframeand react to the payment without polling. Each message is an object withsource,typeandorderId;checkout.resizealso hasheight. Accept a message only whenevent.originishttps://payfiattocrypto.comandevent.data.sourceispayfiattocrypto. Treatcheckout.paidlikecheckout.returnUrl: a signal to update your screen, not proof of payment.
{
"checkout": {
"payer": {
"currency": "EUR"
},
"returnUrl": "https://example.com/orders/A-1004"
}
}<iframe id="pfc-checkout" src="https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT?embed=1" style="width:100%;max-width:480px;height:700px;border:0"></iframe>type | When | Other fields |
|---|---|---|
checkout.resize | The content height changed. | height (px) |
checkout.payment_started | The customer opened the payment page. | — |
checkout.confirming | The payment was approved; the funds are on their way to the order wallet. | — |
checkout.paid | The payment reached the order wallet. | — |
checkout.expired | The order stopped waiting for payment. | — |
const frame = document.getElementById("pfc-checkout");
window.addEventListener("message", (event) => {
if (event.origin !== "https://payfiattocrypto.com" || event.data?.source !== "payfiattocrypto") return;
const { type, orderId } = event.data;
if (type === "checkout.resize") frame.style.height = event.data.height + "px";
if (type === "checkout.paid") showThankYou(orderId);
});What the customer pays
Through the API, each card, bank or digital wallet payment costs the platform fee of 1% + the processing fee, plus the commission you set. The processing fee is the payment provider's MDR (merchant discount rate): 6.70% of each payment plus a fixed US$ 0.50 per payment, converted to the payment's currency. The MDR is not among the deductions in breakdown, and the order's feeMode decides who pays it. The card processor is chosen for each payment, so its fee is not known in advance and is not in the price: when the processor deducts a fee from the USDC it delivers, less reaches the order wallet, and the payout follows what arrives.
customer: the customer pays the order and the MDR on top, so that the wholedeposit.amountis left once the MDR is taken: (deposit.amount+ US$ 0.50) / (1 − 6.70%), converted to their currency and rounded up to the cent. If the card processor deducts its own fee, less arrives and the payout is proportional, so the seller can receive less thanamount.seller: the MDR, and any fee the card processor deducts, come out of the payment. The customer paysdeposit.amount, converted to their currency, so less thandeposit.amountreaches the order wallet, and what arrives is paid out proportionally: the seller's share, your commission and the platform fee all shrink by the same fraction. What arrives is paid out only from US$ 5 up. The smallest order is US$ 10, as incustomermode; if card costs ever push theseller-mode minimum above that,GET /v1/assetsreturns it assellerMinTicketUsd, and aseller-mode order below it is refused at creation with400 AMOUNT_TOO_LOW.- The offer shows the amount before the customer pays, split into
orderAmount(the order'samountin the customer's currency, notdeposit.amount),serviceFee(the platform fee, your commission and the network fee, together with the MDR) andprocessorFee, which is0.00today because the card processor's fee is not known in advance;feeis the two fees together. Withsellerall three fees are0.00. The hosted page shows the same split. The payout always follows what actually reaches the order wallet. - The customer pays at least US$ 10, or the same in euros. Below that there is no offer, and opening a payment returns
422 AMOUNT_BELOW_MINIMUM. Every order is at least US$ 10, so today no order falls below this limit. - Amounts in the customer's currency are rounded up to 2 decimal places. Exchange rates are public reference rates, refreshed every 6 hours.
Worked example. The same order in each mode, paid in US dollars (your commission 1%, one seller wallet, one commission wallet, network fee 0.002 USDC per transfer), with the MDR of 6.70% + US$ 0.50. What reaches the order wallet assumes the card processor deducts no fee of its own; if it does, less arrives and every share shrinks in proportion:
seller | customer | |
|---|---|---|
amount in the request | 100.00 | 100.00 |
deposit.amount | 100.000000 | 102.042857 |
| The customer pays | 100.00 USD | 109.91 USD |
orderAmount | 100.00 USD | 100.00 USD |
serviceFee | 0.00 USD | 9.91 USD |
processorFee | 0.00 USD | 0.00 USD |
| Reaches the order wallet | 92.800000 USDC | 102.046030 USDC |
| The seller receives | 90.942000 | 100.003173 |
| You receive | 0.926000 | 1.018428 |
| Rule applied | Proportional: the MDR comes out of the payment, and every share shrinks by the same fraction. | More than expected: the rounding up of the customer's amount goes to the seller. |
Payments and the customer
- The offer's amount is calculated when you ask for it, with the current exchange rate. The ready link calculates it again when the payment opens, so it can differ slightly if the rate moved.
- The ready link (
url) is our page in "pay now" mode, never the payment page itself. When the order can be paid, it sends the customer straight to the payment page, in the same tab; otherwise it shows the order's state. For a given currency the link is always the same: keep it and send it again whenever you need. Our page is no longer open while the customer pays, so it cannot bring them back tocheckout.returnUrl; the payment page is givenreturnUrland may send them there when they finish or cancel. - If the customer comes back while a payment is in progress and not confirmed, the hosted page and the ready link ask whether they already paid (and wait) or did not finish (and pay now). Paying now opens a new payment and closes the old one.
- Once a payment is approved, the order opens no other payment (
409 PAYMENT_IN_PROGRESS), and the payment page is closed so it cannot be paid again. The offer still returns a price then: to know whether a payment is on its way, use the webhooks. - The order expires 7 days after
createdAt, and card and bank payments close 12 hours earlier, because such a payment can take hours to reach the order wallet. From then on, the offer andPOST /v1/orders/{orderId}/checkoutreturn409 ORDER_NOT_PAYABLE, no new payment opens from the hosted page, the widget or the ready link, and a payment page that is still open is closed. USDC sent straight todeposit.addressstill counts until the order expires. There is noexpiresAtfield: compute both moments fromcreatedAt. - If a customer still pays twice, or pays after the order expired, the extra payment is not lost: it is paid out through a derived order, with the same recipients and terms.
- Each attempt to pay is a separate payment, with its own
data.payment.idinpayment.startedandpayment.completed; one link can lead to several. Match events to your records byorderId, never by the link. - With the hosted page, the payment page opens in a new tab and our page stays open: it follows the payment, shows the result and, with
checkout.returnUrl, takes the customer back to your site. The widget does not leave your page; it reports what happens throughpostMessage. Either way, confirm the payment with webhooks orGET /v1/orders/{orderId}. - Between
payment.completedandorder.receivedthere can be minutes or hours: the payment provider decides when it delivers, and the API waits for on-chain finality. - The payment provider may ask the customer to verify their identity, mostly on a first purchase. The customer sees a purchase of USDC, and the card statement shows the provider's name.
- Disputes and chargebacks are between the customer and the payment provider, under the provider's rules. The API never takes back a payout: a payout made on-chain cannot be reversed. What a chargeback means for the seller or for you is not defined by the API; see terms of use.
Fees and payouts
Each order has three deductions. All of them are in the order's stablecoin and are returned in breakdown when the order is created, before the customer pays. Paying at the checkout also has the processing fee (the payment provider's MDR), and the card processor may deduct its own fee from what it delivers; see what the customer pays.
| Fee | Field | Who receives it | How much |
|---|---|---|---|
| Platform fee | platformFee | The platform | 1% of deposit.amount for orders created through the API, the same for every account. Orders created on our website pay 3%. |
| Your commission | partnerFee | Your wallet(s) | partnerFee.rate × deposit.amount: your full commission, set on every order. What reaches your wallet(s) is partnerReceives. |
| Network fee | networkFee | The network (gas) | The real on-chain cost of each payout transfer, measured continuously per network. Each recipient pays for its own transfers. |
- The seller's network fee comes out of
sellerReceives. Yours comes out of your commission:partnerFeeis the full commission, andpartnerReceivesis what you actually receive,partnerFeeminus the network fee of your own transfers. networkFeeis the total of all payout transfers on the order, the seller's and yours. The platform pays for its own transfers.- So
sellerReceives+platformFee+partnerReceives+networkFee=deposit.amount, to the last decimal place. AddpartnerReceives, notpartnerFee: the network fee of your own transfers is already innetworkFee.
Fee modes
feeMode decides who pays the fees, and at the checkout it also decides who pays the MDR. Both examples below are 100 USDC on Base with your commission at 1%, one seller wallet, one commission wallet and an illustrative network fee of 0.002 USDC per transfer.
seller: the seller pays | customer: the customer pays | |
|---|---|---|
amount in the request | deposit.amount: what must reach the order wallet. By card, less arrives: the MDR, and any fee the card processor deducts, come out of it. | What the seller receives in the quote (breakdown.sellerReceives) |
deposit.amount | 100.000000 | 102.042857 |
breakdown.platformFee | 1.000000 | 1.020429 |
breakdown.partnerFee | 1.000000 | 1.020428 |
breakdown.partnerReceives | 0.998000 | 1.018428 |
breakdown.networkFee | 0.004000 | 0.004000 |
breakdown.sellerReceives | 97.998000 | 100.000000 |
Every amount is rounded down to the token's 6 decimal places. In customer mode the quote gives the seller exactly amount (breakdown.sellerReceives); the rounding remainder stays in the platform fee and never comes out of your commission. What is actually paid follows what reaches the order wallet: see when the amount received differs.
Minimums
amountmust be at least US$ 10, in either fee mode and however the customer pays (AMOUNT_TOO_LOW).GET /v1/assetsreturns this minimum asminTicketUsd. The error'sdetails.minimumTicketis adeposit.amount: incustomermode the fees come on top of the US$ 10, so it is higher. There is no maximum amount.- What reaches the order wallet is paid out only from US$ 5 up; below the order amount, the payout is proportional (see when the amount received differs). In
sellermode the card cost comes out of the payment: if card costs ever push theseller-mode minimum aboveminTicketUsd,GET /v1/assetsreturns it assellerMinTicketUsd(absent today), andseller-mode orders need at least that (AMOUNT_TOO_LOW). - Each side pays the network fee of its own transfers, and that fee, times a safety margin of 3, must stay within 10% of the side's share. In practice, your commission must be at least 30 times the network fee of your own transfers (
PARTNER_FEE_BELOW_GAS), and so must the seller's share (AMOUNT_TOO_LOW). The error tells you the smallest amount and the smallest rate that would pass. - Each recipient must receive at least twice the network fee of its own transfer (
RECIPIENT_AMOUNT_TOO_LOW). This matters with many split wallets or small shares. - Every order pays a commission:
partnerFee.rateof0cannot cover your own transfer and returnsPARTNER_FEE_BELOW_GAS. Anamountof0returnsAMOUNT_TOO_LOW. - The network fee is measured continuously, so an order near a minimum can pass today and fail later. There is no quote endpoint:
detailson these errors tells you what would pass.
These rules exist because a transfer that costs more in gas than it moves loses money. They are checked at creation, when a rejected order costs nothing.
{
"error": {
"code": "AMOUNT_TOO_LOW",
"message": "Amount is below the minimum for this asset and network.",
"details": {
"minimumTicket": "10.000000"
}
}
}Order lifecycle
created ──► received ──► settling ──► settled
│ │ ▲
▼ ▼ │
expired settle_failed| Status | Meaning | What to do |
|---|---|---|
created | Waiting for the payment: at the checkout, or sent to deposit.address. | Send the customer to the checkout, or give them deposit.address and deposit.amount. |
received | A payable amount reached the order wallet and is final on-chain. It can be less than deposit.amount. | Treat the payment as arrived; the payout starts right away. The order does not show yet how much arrived: see when the amount received differs. |
settling | Payout transfers are being sent and confirmed. | Wait. On Base, the payout is final about half an hour after the payment arrived, because it waits for finality on Ethereum. |
settled | Every recipient was paid, and every transfer is final. | Final state. Nothing else happens to this order. |
settle_failed | A payout could not be completed. For example, the token issuer blocked a recipient's address. | Our team is alerted and handles it. Transfers that already went out stay paid. Contact support if you need to change a destination. |
expired | No payable amount arrived within 7 days: nothing, or less than the minimum. The checkout no longer works, and the order wallet is no longer watched. | Create a new order. |
Paid or not: the payment has arrived in received, settling, settled and settle_failed. In created and expired, nothing payable has arrived.
The API never confirms a payment that is not final on-chain, so a chain reorganization cannot turn a paid order back into an unpaid one.
What the order shows
- The order shows the quote, fixed at creation:
deposit.amountandbreakdown. It does not show yet what actually arrived, the amount each recipient was paid or the payout transaction hashes. To see the transfers, look updeposit.addresson the network's block explorer. - The order does not repeat your request (
amount,feeModeoutsidecheckout, the wallets,partnerFee.rate). Store what you sent, or put your own references inmetadata. - An order expires 7 days after
createdAtif no payable amount arrived. There is no endpoint to cancel an order: one that is never paid simply expires. - A second payment at the checkout, or one made after the order expired, is paid out through a derived order. Crypto sent straight to
deposit.addressafter the order was paid or expired is not paid out automatically: contact support. settle_failedis resolved by our team. When the payout completes, the order becomessettledandorder.settledis sent.checkout.urlandcheckout.embedUrlare always present when the order has acheckout.- For a cart with several sellers, create one order per seller, or one order with
sellerRecipientswhen the shares are fixed. - Amounts that reach the order wallet add up, but the checkout always charges the full
deposit.amount. If part was already sent in crypto, paying at the checkout too makes the excess go to the seller.
When the amount received differs
The payout follows what actually reaches the order wallet. The expected amount is deposit.amount. A card or bank payment rarely matches it to the cent: the customer's amount is rounded up, exchange rates move, the card processor may deduct its own fee from what it delivers, and in seller mode the MDR comes out of the payment. The platform never makes up a shortfall. Whatever arrives, the result is defined in advance:
| What arrived | What is paid |
|---|---|
| Exactly the expected amount | The amounts in breakdown. |
| More than expected | The whole excess goes to the seller. Your commission and the fees stay as quoted. |
| Less than expected | Proportional to what arrived: the platform fee and your commission are each multiplied by what arrived ÷ deposit.amount, each recipient still pays the full network fee of its own transfers, and the seller receives the rest. The platform does not cover the shortfall. |
| Below the payout minimum (US$ 5), or so little that the seller's or your proportional share would not cover the network fee of its own transfers | Nothing is paid out, to anyone, because the network fees would cost more than the value. The order stays created, and later amounts delivered to the same order add up. The seller (with sellerNotify) and you are told on Telegram how much arrived, and asked to contact support (see notifications). Without a payable balance, the order expires after 7 days and sends order.expired; no webhook reports the amount that arrived. |
Additional payments and derived orders
A customer can pay an order more than once: twice at the checkout, or after the order expired. A second card or bank payment is never added to an order that was already paid or that expired: the API creates a derived order to pay it out, and tells you with order.additional_payment.
- The derived order has its own
orderId, the same as thedata.payment.idof the payment it pays out, its own wallet (deposit.address), andparentOrderId: your order'sorderId. That payment'spayment.startedandpayment.completedcame with your order'sorderId, so you can link the derived order byparentOrderIdor by thatdata.payment.id. - It copies your order's terms: the same seller and commission wallets, the same
deposit.amountandbreakdown(your order's quote, not the amount of this payment),metadata,webhookUrland Telegram chats. It has nocheckout: it cannot be paid by link, and the checkout endpoints return409 ORDER_NOT_PAYABLEfor it. - Its payout follows what actually reaches its wallet, with the same rules: in
sellermode the MDR comes out of the payment, any fee the card processor deducts comes out of what arrives, and a shortfall is paid out in proportion. - Its events go to the same
webhookUrl:order.additional_paymentwhen it is created (occurredAtis itscreatedAt), then its ownorder.receivedandorder.settled, with its ownorderId. Your order keeps its status: an expired order staysexpired. - A card payment approved shortly before your order expired can reach the order wallet after that: you then get
order.expiredfor your order and, later,order.additional_payment. If you gotpayment.completedfor an order, do not treat itsorder.expiredas final. Keep the sale open, and deliver when the derived order'sorder.receivedarrives. - Like any order, it expires if nothing payable reaches its wallet within 7 days.
- Crypto sent straight to
deposit.addressafter your order was paid or expired does not create a derived order: contact support. - The platform does not refund. The seller receives the extra payment; refunding the customer, if needed, is up to the seller, outside the API.
Split payouts
Instead of one wallet, the seller's amount (sellerRecipients) and your commission (partnerFee.recipients) can each be split between up to 5 wallets. Each entry has a wallet and a share, and the shares of a group add up to exactly 1.
{
"amount": "250.00",
"asset": {
"symbol": "USDC",
"network": "base"
},
"feeMode": "seller",
"sellerRecipients": [
{
"wallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"share": "0.7"
},
{
"wallet": "0xdbF03B407c01E7cD3CBea99509d93f8DDDC8C6FB",
"share": "0.3"
}
],
"partnerFee": {
"rate": "0.02",
"wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
}
}- Each wallet is paid in its own on-chain transfer and pays that transfer's network fee. Splitting into more wallets means more network fees for that group.
breakdown.sellerReceivesis the total for all seller wallets together, andbreakdown.partnerReceivesthe total for all your commission wallets.- Send either
sellerWalletorsellerRecipients, never both. The same applies topartnerFee.walletandpartnerFee.recipients. - A wallet receives only one part of an order: the same wallet twice in a group, or as both the seller and the partner, is rejected with
WALLET_CONFLICT. - A
shareis a decimal string with at most 39 decimal places; trailing zeros do not count.
Webhooks
Give an order a webhookUrl and we send its events to your server with a POST: when the payment arrives, when it is paid out, when a payout fails or the order expires, when a customer pays an order again, and what the payment page reports to us from the checkout. They arrive even when the customer never returns to your site, so your system can update the order on its own.
Receive webhooks for an order
- Send
webhookUrlinPOST /v1/orders. Each order has its own URL; an order without one sends no webhooks. - The URL must use
https://on port 443 or 8443, point to a public internet host and have at most 2048 characters. Anything else is rejected with400 INVALID_REQUEST. The host is checked again on every delivery, and redirects are not followed. - Every event is signed with your account's webhook secret (
whsec_…). You get it with your API key, and every new key comes with a new secret;/webhookin the Telegram bot shows the current one. For 24 hours after a new key, every attempt, including retries of older events, is signed with both the previous and the new secret, soX-Signaturecarries twov1values; after that, only the new secret signs. Update your server within those 24 hours. - A public host is a name with at least one dot that resolves only to public internet addresses. Private and local IP addresses,
localhostand names ending in.local,.localdomain,.internal,.intranet,.lan,.homeor.corpare refused. A query string is allowed; credentials and a#fragmentare not. Deliveries do not come from fixed IP addresses.
Events
Order events come from the blockchain and follow the order lifecycle. Payment events are what the payment page reports about the checkout: notices, not proof. There is no event for settling; when our team resolves a settle_failed payout, order.settled follows. Failed, cancelled or abandoned payments are not reported.
| Event | When it is sent | What to do |
|---|---|---|
order.received | A payable amount reached the order wallet and is final on-chain (received). It can be less than deposit.amount. | Treat the payment as arrived; the payout starts right away. See when the amount received differs. |
order.settled | Every recipient was paid and every transfer is final (settled). | Final state. Nothing else happens to this order. |
order.settle_failed | A payout could not be completed (settle_failed). | Our team is alerted and handles it. See order lifecycle. |
order.expired | No payable amount arrived within 7 days (expired): nothing, or less than the minimum. | Create a new order if the customer still wants to pay. After a payment.completed, the payment can still come as a derived order. Keep the sale open until then, and deliver on that order's order.received. |
order.additional_payment | The customer paid one of your orders again, or paid after it expired, and the API created a derived order to pay that out. data.order is the new order; its parentOrderId is your order. | Record the new order and link it to yours. It follows the normal lifecycle and sends its own events. The seller receives the extra payment; refunding the customer, if needed, is up to the seller. |
payment.started | The customer opened the payment page for this order. | Optional: show that the payment is in progress. The customer can still give up. |
payment.completed | The payment page reports that the customer paid. | Show the payment as accepted. The funds still have to reach the order wallet: wait for order.received before treating the order as paid. |
What we send
Each event is one POST with a JSON body. The order inside the event has the same shape as in GET /v1/orders/{orderId}, as it was when the event happened.
POST /webhooks/payfiattocrypto HTTP/1.1
Host: example.com
Content-Type: application/json
User-Agent: webhooks/1.0
X-Event-Id: evt_6f1d3c52-8e0a-4b7e-9a51-2c4d7e8f9a10
X-Event-Type: payment.completed
X-Signature: t=1794838319,v1=bc95c29c02dc06d6f7198c2e26402659e48b07cb7cc060b21ca2d966ec0aa4a3
{
"id": "evt_6f1d3c52-8e0a-4b7e-9a51-2c4d7e8f9a10",
"event": "payment.completed",
"occurredAt": "2026-11-16T14:11:58.604Z",
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"data": {
"order": {
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"status": "created",
"deposit": {
"address": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb",
"amount": "100.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "97.998000",
"platformFee": "1.000000",
"partnerFee": "1.000000",
"partnerReceives": "0.998000",
"networkFee": "0.004000"
},
"checkout": {
"token": "kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"url": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"embedUrl": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT?embed=1",
"feeMode": "seller"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
},
"createdAt": "2026-11-16T14:05:09.120Z"
},
"payment": {
"id": "3b8e2f41-6c7d-4a9e-8f10-5d2c1b0a9e87",
"amount": "100.00",
"currency": "USD"
}
}
}X-Event-Id: the event id, the same on every retry of that event. Use it to skip duplicates.X-Event-Type: the event type, the same aseventin the body.X-Signature:t=, the Unix time of this attempt, then one or morev1=, each an HMAC-SHA256 signature:t=<t>,v1=<hex>, ort=<t>,v1=<hex>,v1=<hex>while a previous secret still signs. Accept the webhook if anyv1matches. See verify the signature.
{
"id": "evt_610ed79b-c493-4323-88e9-beff2e9d8290",
"event": "order.received",
"occurredAt": "2026-11-16T16:48:03.271Z",
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"data": {
"order": {
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"status": "received",
"deposit": {
"address": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb",
"amount": "100.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "97.998000",
"platformFee": "1.000000",
"partnerFee": "1.000000",
"partnerReceives": "0.998000",
"networkFee": "0.004000"
},
"checkout": {
"token": "kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"url": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"embedUrl": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT?embed=1",
"feeMode": "seller"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
},
"createdAt": "2026-11-16T14:05:09.120Z"
}
}
}{
"id": "evt_577cc06e-1408-4778-aae6-4d1cfe3f9da7",
"event": "order.settled",
"occurredAt": "2026-11-16T17:23:41.902Z",
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"data": {
"order": {
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"status": "settled",
"deposit": {
"address": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb",
"amount": "100.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "97.998000",
"platformFee": "1.000000",
"partnerFee": "1.000000",
"partnerReceives": "0.998000",
"networkFee": "0.004000"
},
"checkout": {
"token": "kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"url": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"embedUrl": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT?embed=1",
"feeMode": "seller"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
},
"createdAt": "2026-11-16T14:05:09.120Z"
}
}
}{
"id": "evt_a5ed38c6-2fba-432e-9421-c25b89d8030e",
"event": "order.settle_failed",
"occurredAt": "2026-11-16T17:31:12.448Z",
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"data": {
"order": {
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"status": "settle_failed",
"deposit": {
"address": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb",
"amount": "100.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "97.998000",
"platformFee": "1.000000",
"partnerFee": "1.000000",
"partnerReceives": "0.998000",
"networkFee": "0.004000"
},
"checkout": {
"token": "kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"url": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"embedUrl": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT?embed=1",
"feeMode": "seller"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
},
"createdAt": "2026-11-16T14:05:09.120Z"
}
}
}{
"id": "evt_15bdf163-f19f-45cc-99b1-cc94c8e211c9",
"event": "order.expired",
"occurredAt": "2026-11-23T14:05:31.006Z",
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"data": {
"order": {
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"status": "expired",
"deposit": {
"address": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb",
"amount": "100.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "97.998000",
"platformFee": "1.000000",
"partnerFee": "1.000000",
"partnerReceives": "0.998000",
"networkFee": "0.004000"
},
"checkout": {
"token": "kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"url": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"embedUrl": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT?embed=1",
"feeMode": "seller"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
},
"createdAt": "2026-11-16T14:05:09.120Z"
}
}
}{
"id": "evt_ad303074-1e99-4692-b8a0-21478b25021d",
"event": "order.additional_payment",
"occurredAt": "2026-11-17T09:14:26.537Z",
"orderId": "c4f1a7e2-9b3d-4e58-a6c0-7d21e5f8b934",
"data": {
"order": {
"orderId": "c4f1a7e2-9b3d-4e58-a6c0-7d21e5f8b934",
"status": "created",
"deposit": {
"address": "0x52908400098527886E0F7030069857D2E4169EE7",
"amount": "100.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "97.998000",
"platformFee": "1.000000",
"partnerFee": "1.000000",
"partnerReceives": "0.998000",
"networkFee": "0.004000"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
},
"parentOrderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"createdAt": "2026-11-17T09:14:26.537Z"
}
}
}{
"id": "evt_d8833195-d5fa-4a9a-bf81-0a5b87b21d0a",
"event": "payment.started",
"occurredAt": "2026-11-16T14:07:42.315Z",
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"data": {
"order": {
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"status": "created",
"deposit": {
"address": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb",
"amount": "100.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "97.998000",
"platformFee": "1.000000",
"partnerFee": "1.000000",
"partnerReceives": "0.998000",
"networkFee": "0.004000"
},
"checkout": {
"token": "kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"url": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"embedUrl": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT?embed=1",
"feeMode": "seller"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
},
"createdAt": "2026-11-16T14:05:09.120Z"
},
"payment": {
"id": "3b8e2f41-6c7d-4a9e-8f10-5d2c1b0a9e87",
"amount": "100.00",
"currency": "USD"
}
}
}{
"id": "evt_6f1d3c52-8e0a-4b7e-9a51-2c4d7e8f9a10",
"event": "payment.completed",
"occurredAt": "2026-11-16T14:11:58.604Z",
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"data": {
"order": {
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"status": "created",
"deposit": {
"address": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb",
"amount": "100.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "97.998000",
"platformFee": "1.000000",
"partnerFee": "1.000000",
"partnerReceives": "0.998000",
"networkFee": "0.004000"
},
"checkout": {
"token": "kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"url": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"embedUrl": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT?embed=1",
"feeMode": "seller"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
},
"createdAt": "2026-11-16T14:05:09.120Z"
},
"payment": {
"id": "3b8e2f41-6c7d-4a9e-8f10-5d2c1b0a9e87",
"amount": "100.00",
"currency": "USD"
}
}
}Event fields
idstringrequiredEvent id, the same as in
X-Event-Idand on every retry.eventstringrequiredEvent type. See events.
one of
order.received,order.settled,order.settle_failed,order.expired,order.additional_payment,payment.started,payment.completedoccurredAtstring · date-timerequiredWhen the event happened, ISO 8601 in UTC.
orderIdstring · uuidrequiredThe order this event is about.
dataobjectrequiredWhat the event is about.
Show child fields (2)Hide child fields
orderobjectrequiredThe order when the event was created, in the same shape as in
GET /v1/orders/{orderId}.paymentobjectPresent on
payment.startedandpayment.completedonly, absent on everyorder.*event: the payment on the payment page.Show child fields (3)Hide child fields
idstring · uuidrequiredThe payment's id. A customer who pays again starts another payment. A derived order takes the id of the payment it pays out.
amountstring · decimalrequiredWhat the customer pays, in their currency, as a decimal string: the amount the payment was opened for, the same on
payment.startedandpayment.completed.currencystringrequiredCurrency the customer pays in, as an ISO 4217 code, for example
EUR.
Verify the signature
- Read
tand everyv1from theX-Signatureheader: there is exactly onet, and one or morev1. - Reject the request if
tis more than 300 seconds away from your clock. That way, a request someone captured and sends again later is refused. - Compute HMAC-SHA256 with your webhook secret over
t, a period (.) and the raw request body, exactly as received. Compare the result with eachv1(hex) in constant time, and accept the webhook if any of them matches. For 24 hours after a new key, the previous and the new secret both sign, so the secret your server has matches one of them. - Parse the JSON only after the signature matches. Store the event once, unique on its
id, respond with a 2xx within 10 seconds, and do the slow work afterwards. - Use the secret exactly as given, including the
whsec_prefix, and verify the raw bytes you received: the bodies we send are compact JSON. The example request is indented for reading, and its signature covers it exactly as shown.
import crypto from "node:crypto";
import express from "express";
const app = express();
const SECRET = process.env.PFC_WEBHOOK_SECRET;
const TOLERANCE_SECONDS = 300;
// The signature covers the exact bytes we sent: read the raw body.
app.post("/webhooks/payfiattocrypto", express.raw({ type: "application/json" }), async (req, res) => {
const pairs = (req.get("X-Signature") ?? "").split(",").map((p) => p.split("=", 2));
const timestamps = pairs.filter(([key]) => key === "t").map(([, value]) => value);
const t = Number(timestamps[0]);
if (timestamps.length !== 1 || !Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > TOLERANCE_SECONDS) return res.sendStatus(400);
const expected = crypto.createHmac("sha256", SECRET).update(timestamps[0] + ".").update(req.body).digest();
// There can be more than one v1 (for example, for 24 hours after a new key): accept if any of them matches.
const valid = pairs
.filter(([key]) => key === "v1")
.some(([, value]) => {
const received = Buffer.from(value ?? "", "hex");
return received.length === expected.length && crypto.timingSafeEqual(received, expected);
});
if (!valid) return res.sendStatus(400);
const event = JSON.parse(req.body.toString("utf8"));
// The same event can arrive more than once: store it once, unique on its id, and answer 2xx right away.
const isNew = await saveEventOnce(event); // e.g. INSERT ... ON CONFLICT (id) DO NOTHING
res.sendStatus(200);
// Process it afterwards: read the order with GET /v1/orders/{orderId} and act on its current status.
if (isNew) queueForProcessing(event.id); // event.event, event.orderId, event.data.payment
});import hashlib
import hmac
import json
import os
import time
from flask import Flask, request
app = Flask(__name__)
SECRET = os.environ["PFC_WEBHOOK_SECRET"].encode()
TOLERANCE_SECONDS = 300
@app.post("/webhooks/payfiattocrypto")
def webhook():
pairs = [p.split("=", 1) for p in request.headers.get("X-Signature", "").split(",") if "=" in p]
timestamps = [value for key, value in pairs if key == "t"]
if len(timestamps) != 1:
return "", 400
try:
t = int(timestamps[0])
except ValueError:
return "", 400
if abs(time.time() - t) > TOLERANCE_SECONDS:
return "", 400
# The signature covers the exact bytes we sent: read the raw body.
body = request.get_data()
expected = hmac.new(SECRET, timestamps[0].encode() + b"." + body, hashlib.sha256).hexdigest().encode()
# There can be more than one v1 (for example, for 24 hours after a new key): accept if any of them matches.
signatures = [value.encode() for key, value in pairs if key == "v1"]
if not any(hmac.compare_digest(expected, signature) for signature in signatures):
return "", 400
event = json.loads(body)
# The same event can arrive more than once: store it once, unique on its id, and answer 2xx right away.
if save_event_once(event): # e.g. INSERT ... ON CONFLICT (id) DO NOTHING
# Process it afterwards: read the order with GET /v1/orders/{orderId} and act on its current status.
queue_for_processing(event["id"]) # event["event"], event["orderId"], event["data"].get("payment")
return "", 200<?php
$secret = getenv("PFC_WEBHOOK_SECRET");
$tolerance = 300;
// The signature covers the exact bytes we sent: read the raw body.
$body = file_get_contents("php://input");
$timestamps = [];
$signatures = [];
foreach (explode(",", $_SERVER["HTTP_X_SIGNATURE"] ?? "") as $part) {
[$key, $value] = array_pad(explode("=", $part, 2), 2, "");
if ($key === "t") {
$timestamps[] = $value;
} elseif ($key === "v1") {
$signatures[] = $value;
}
}
$t = count($timestamps) === 1 ? $timestamps[0] : "";
if (!ctype_digit($t) || abs(time() - (int) $t) > $tolerance) {
http_response_code(400);
exit;
}
$expected = hash_hmac("sha256", $t . "." . $body, $secret);
// There can be more than one v1 (for example, for 24 hours after a new key): accept if any of them matches.
$valid = false;
foreach ($signatures as $signature) {
if (hash_equals($expected, $signature)) {
$valid = true;
}
}
if (!$valid) {
http_response_code(400);
exit;
}
$event = json_decode($body, true);
// The same event can arrive more than once: store it once, unique on its id, and answer 2xx right away.
if (save_event_once($event)) { // e.g. INSERT ... ON CONFLICT (id) DO NOTHING
// Process it afterwards: read the order with GET /v1/orders/{orderId} and act on its current status.
queue_for_processing($event["id"]); // $event["event"], $event["orderId"], $event["data"]["payment"] ?? null
}
http_response_code(200);To test your verifier, use the secret whsec_example with the X-Signature value and the body below, exactly as shown: the body ends at the last }, with no newline after it. The Copy button of the example request copies the headers too. Turn off the time check first: the example's t is in the past. Copying it out of a Markdown code block adds a line break before the closing fence: remove it, or the signature will not match.
t=1794838319,v1=bc95c29c02dc06d6f7198c2e26402659e48b07cb7cc060b21ca2d966ec0aa4a3{
"id": "evt_6f1d3c52-8e0a-4b7e-9a51-2c4d7e8f9a10",
"event": "payment.completed",
"occurredAt": "2026-11-16T14:11:58.604Z",
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"data": {
"order": {
"orderId": "aa2c9fc7-0940-4060-9055-e7eaa97440a3",
"status": "created",
"deposit": {
"address": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb",
"amount": "100.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "97.998000",
"platformFee": "1.000000",
"partnerFee": "1.000000",
"partnerReceives": "0.998000",
"networkFee": "0.004000"
},
"checkout": {
"token": "kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"url": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT",
"embedUrl": "https://payfiattocrypto.com/c/kV7pQ2mX9aB4cD6eF8gH0jK1lN3oR5sT?embed=1",
"feeMode": "seller"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"metadata": {
"orderRef": "A-1001"
},
"createdAt": "2026-11-16T14:05:09.120Z"
},
"payment": {
"id": "3b8e2f41-6c7d-4a9e-8f10-5d2c1b0a9e87",
"amount": "100.00",
"currency": "USD"
}
}
}Delivery rules
- Respond with a 2xx status within 10 seconds. Any other status, a redirect or no answer counts as a failed attempt.
- Failed attempts are retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h, 24 h, 24 h: up to 9 attempts over about 69 hours. A retry keeps the same
X-Event-Idand body, with a newtand signature. - Delivery is at least once: the same event can arrive more than once. Skip event ids you already handled.
- Order is not guaranteed: an older event can arrive after a newer one, and
data.orderis the order as it was when the event was created. Use the event as a trigger: before acting (shipping goods, crediting an account), read the order withGET /v1/orders/{orderId}and act on its currentstatus. An order that moved quickly fromreceivedtosettledgets both events. - An event can be about an order you have no record of: the derived order of one of yours, whose events can arrive before its
order.additional_payment. Itsdata.order.parentOrderIdis your order'sorderId. Answer with a 2xx to every event whose signature matches, even one you ignore: any other answer is retried for about 69 hours. - Webhooks speed up your integration, but the source of truth is the order status read from the API. If every attempt fails, the order still changes status normally.
- There is no endpoint to list or resend events. If you miss one, read the order with
GET /v1/orders/{orderId}or page throughGET /v1/orders.
Telegram notifications
Optionally, the seller (sellerNotify) and you (partnerFee.notify) can get Telegram messages about an order: order created, payment received, order settled, or a payout that failed.
{
"sellerNotify": {
"channel": "telegram",
"id": "123456789"
}
}idis the numeric Telegram chat id, never a@username: positive for a private chat, negative for a group, supergroup or channel (for example-1001234567890). Leading zeros are dropped, and the absolute value can be at most 9007199254740991. Anything else is rejected with400 INVALID_REQUEST. The easiest way for a seller to get their id is to openhttps://t.me/fiat_to_crypto_bot?start=notifyand press Start: our bot replies with that person's numeric chat id and a button to copy it. For a group, a Telegram "ID bot" added to the group can show its id.- For a private chat, the person must open @fiat_to_crypto_bot and press Start once, because Telegram bots cannot start a conversation. For a group, supergroup or channel, add the bot to it first: it can only post where it is a member (in a channel, as an administrator). These notices and their buttons are in English; the bot answers commands in the language of the person's Telegram app.
- Each order notifies only the chats given in that order. Nothing is reused from other orders, even with the same wallet.
- The API checks only the format of
id: it cannot tell whether the chat exists or whether Start was pressed. A message the chat cannot receive is dropped, and nothing tells you. The seller's chat and yours get a message as soon as the order is created, so you can confirm right away with the seller that the messages arrive; a repeated request (Idempotent-Replayed: true) does not send it again. - If less than the order amount arrives and it is below the payout minimum (US$ 5) or too little to cover the network fee of the payout, nothing is paid out. The seller's chat (
sellerNotify, if given) and your account's chat, where you created your API key, get one message saying how much arrived and asking to contact support at @payfiattocrypto. See when the amount received differs.
Telegram bot
For you, the integrator, the bot manages your access to the API, in a private chat only:
/newkeycreates your API key after you accept the terms. The reply shows the key once (copy it right away), together with your webhook signing secret.- Each account has one active key. Sending
/newkeyagain creates a new key and a new webhook secret; the bot warns you before. The previous key keeps working for 24 hours, then stops, and for those 24 hours webhooks are signed with both the previous and the new secret: put the new key and secret in your integration within that time. The new key still sees your orders. /keysshows your client id, your active key's short id and creation time and, for 24 hours after a new key, the previous key and when it stops; never the key itself: only its hash is stored./revokestops the key you pick from that list at once, the previous one included: use it if a key leaked./webhookshows your webhook signing secret again. To change the secret, create a new key: every key comes with a new secret.
The seller (sellerNotify) and you (partnerFee.notify) can register a Telegram on each order. That chat gets a message when the order is created, when it is paid and when the payout is sent.
- If a payout cannot be delivered, the message says so and the funds stay safe with us. Nothing is lost.
- When the token issuer has blocked the receiving address, the message has a Use another address button. The person sends an address they control on the same network, checks it on a confirmation screen, and our team reviews the change before anything is sent. After approval, the payment goes out after a short safety wait. Typing
/newaddresswith the order id from the message does the same. - Only the Telegram registered for that payout in the order can ask for a new address, and only from its private chat with the bot. A request from any other chat is refused, without revealing anything about the order. When the order registered a group, nobody can ask from the group: contact support at @payfiattocrypto to change the address.
- Any other kind of failure is handled by our team: the person does not need to do anything, and gets a message when the payment is sent.
- Anyone who does not want these messages can send
/muteto the bot: that chat stops getting payment messages, including failures and address changes./unmuteturns them back on. Commands still get answers while the chat is muted.
Idempotency
Send an Idempotency-Key header on POST /v1/orders, unique per order, and reuse it on every retry of that same order. Without it, a retry after a timeout can create a second order with a second wallet and checkout, and the customer would pay only one of them.
- Same key and same body: the API returns the same order, with the same wallet and checkout, the same
201status and the response headerIdempotent-Replayed: true. It does not create anything new. A newly created order never has this header, so it tells a repeat from a creation. - Same key with a different body:
409 IDEMPOTENCY_KEY_REUSED, at any time. A key that created an order never creates a different one. - Same key while the first request is still running:
409 REQUEST_IN_PROGRESS. Retry after a short wait. - If the first attempt failed after the order was saved, the retry finds that order and returns its current
status, also withIdempotent-Replayed: true. - The key has 1 to 255 characters. Your own order id or a UUID works well.
- The body is compared in a canonical form: spacing and the order of keys do not matter, but the order of items in an array does (for example, in
sellerRecipients). Values must match exactly:"120.00"and"120.0"are different bodies. Keep the body you sent and resend it unchanged. - A request rejected with a
4xxcreates nothing and does not use up the key: fix the request and retry with the same key. - Keys are per account, and a key that created an order stays bound to that order. A finished response is replayed for 24 hours. A request that never finishes releases its key after 2 minutes, so
REQUEST_IN_PROGRESSnever lasts longer than that. POST /v1/orders/{orderId}/checkouttakes noIdempotency-Key: it opens nothing, and for a given currency the link it returns is always the same. After a5xxor a network error, just call it again.
Pagination
GET /v1/orders returns up to limit orders (default 30, at most 100), newest first. When there are more, the response has nextCursor: pass it unchanged as cursor to get the next page. When nextCursor is absent, you are on the last page.
Pages are keyed by creation time, not by offset, so orders created while you page never make you skip or repeat an order. Keep the same filters on every page.
Errors
Every error uses the same envelope, on every endpoint. code is stable and meant for your code; message is for people; details is present on some codes. On schema errors, details.issues lists each problem as { "path", "message" }, where path names the field, for example sellerRecipients.1.wallet. On the rules for metadata, webhookUrl and checkout, details has field and reason instead. Handle an unknown code by its HTTP status.
{
"error": {
"code": "AMOUNT_TOO_LOW",
"message": "Amount is below the minimum for this asset and network.",
"details": {
"minimumTicket": "10.000000"
}
}
}details by code:
INVALID_REQUESTfrom the schema:issues, a list of{ "path", "message" }.INVALID_REQUESTfrom the rules ofmetadata,webhookUrl,checkout.payerorcheckout.returnUrl:field, one of those four, andreason, a short English text such asmust use httpsormust be at most 4096 bytes as JSON.INVALID_RECIPIENT_WALLET:field,walletandreason.WALLET_CONFLICT:fieldandwallet.RECIPIENT_AMOUNT_TOO_LOW:wallet.AMOUNT_TOO_LOW:minimumTicket, when some amount would pass.PARTNER_FEE_BELOW_GAS:minimumTicketandminimumRate, each when present.CHECKOUT_UNAVAILABLE:asset, withsymbolandnetwork.
| Code | HTTP | When |
|---|---|---|
INVALID_REQUEST | 400 | The body or query failed validation or is not valid JSON, or the body of POST /v1/orders is empty. For metadata, webhookUrl and checkout, details names the field and the reason. An oversized body returns 413 and an unsupported Content-Type returns 415, with the same code. |
INVALID_RECIPIENT_WALLET | 400 | A destination wallet is not a valid EVM address, is not in EIP-55 checksummed form, or can never receive funds (zero address, a token contract, any of the platform's own wallets, another order's wallet). details has field (sellerRecipients or partnerFee.recipients, also when you sent sellerWallet or partnerFee.wallet), wallet and reason: malformed, not_checksummed, zero_address, token_contract, platform_wallet or order_wallet. The wallet format is checked here, not in the schema. |
WALLET_CONFLICT | 400 | The same wallet appears twice in the order: repeated in a group, or used for both the seller and the partner. details has field and wallet. |
PARTNER_PLATFORM_WALLET_CONFLICT | 400 | A commission wallet is the wallet that receives the platform fee. The platform's other wallets return INVALID_RECIPIENT_WALLET. |
EMPTY_RECIPIENTS | 400 | Not returned by the current API: an empty recipient group fails the schema check first, with INVALID_REQUEST. |
INVALID_SHARES | 400 | A recipient share is zero or negative, or the shares of a group do not add up to exactly 1. |
TOO_MANY_RECIPIENTS | 400 | Not returned by the current API: a group with more than 5 recipients fails the schema check first, with INVALID_REQUEST. |
RECIPIENT_AMOUNT_TOO_LOW | 400 | A recipient would receive less than twice the network fee of its own transfer. details.wallet says which one. |
AMOUNT_TOO_LOW | 400 | amount is below US$ 10, in either fee mode; or, in seller mode, a card payment would arrive below the payout minimum (US$ 5) once card costs come out, which happens only below sellerMinTicketUsd, when GET /v1/assets returns it; or the seller's share is too small for the network fee of the seller's transfers (see minimums). details.minimumTicket, when present, is the smallest deposit.amount that would pass. In seller mode, send it as amount. In customer mode the fees come on top: for an amount below US$ 10, it is the deposit.amount of an order of 10, so send 10; otherwise, the amount that passes is about minimumTicket × (1 − 1% − your rate), minus the seller's network fee. |
PARTNER_FEE_BELOW_GAS | 400 | Your commission is too small for the network fee of your own transfers (see minimums). details has minimumTicket and minimumRate: raise either one. |
INVALID_FEE_RATE | 400 | The platform fee and your partner fee together reach 100% or more. |
UNSUPPORTED_ASSET | 400 | The asset and network pair is not supported. Today the API accepts only USDC on Base (base); see supported assets. |
CHECKOUT_UNAVAILABLE | 400 | checkout was sent for an asset and network that has no card or bank checkout. Only USDC on Base has one. details.asset names the pair. |
UNAUTHORIZED | 401 | The API key is missing, invalid or revoked. |
ORDER_NOT_FOUND | 404 | The order does not exist, belongs to another account, or the id is not a valid UUID. All cases return the same error. |
NOT_FOUND | 404 | The route does not exist: check the method and the path. Any call can return it. |
IDEMPOTENCY_KEY_REUSED | 409 | This Idempotency-Key was already used with a different body. Use a new key for a new order. |
REQUEST_IN_PROGRESS | 409 | A request with the same Idempotency-Key is still being processed. Retry after a short wait. |
ORDER_NOT_PAYABLE | 409 | The order is no longer waiting for a payment (already paid or expired), has no checkout (a derived order), or expires in less than 12 hours: card and bank payments close 12 hours before the order expires. See payments and the customer. |
PAYMENT_IN_PROGRESS | 409 | A payment for this order was already approved and is on its way. Opening another one would charge the customer twice. |
CURRENCY_NOT_SUPPORTED | 422 | The customer's currency is a three-letter code other than USD or EUR (case does not matter). Anything that is not three letters returns 400 INVALID_REQUEST. |
AMOUNT_BELOW_MINIMUM | 422 | What the customer would pay is below the minimum for a card payment (US$ 10). With today's order minimum (US$ 10) it does not happen; handle it like ORDER_NOT_PAYABLE. |
RATE_LIMITED | 429 | This IP address made more than 120 requests in the current minute, with or without an API key. Wait for the seconds in Retry-After. |
TOO_MANY_CHECKOUTS | 429 | Only on the hosted page and the widget, never in your API calls: this order opened 10 payments in the last hour. The page asks the customer to try later. |
EXCHANGE_RATE_UNAVAILABLE | 503 | The exchange rate for the customer's currency is temporarily unavailable at the checkout. Retry later, or use USD. Order creation does not need one: every supported asset is a US dollar stablecoin. |
PAYMENTS_UNAVAILABLE | 503 | Only on the hosted page and the widget, never in your API calls: the payment page is not available right now. The customer can retry shortly. |
PAYMENTS_BUSY | 503 | Only on the hosted page and the widget, never in your API calls: the queue to the payment page had no free slot in time, or this account opened too many new payments in the last minute. Nothing was opened; the hosted page, also when opened from the ready link, retries by itself for about 30 seconds. |
INTERNAL_ERROR | 500 | Unexpected error on our side. The message is generic on purpose; retry with the same Idempotency-Key. |
An order is checked in this order, and the first failure is returned: the schema (INVALID_REQUEST), the asset, the wallets and shares, the checkout options, then the amounts (INVALID_FEE_RATE, AMOUNT_TOO_LOW, PARTNER_FEE_BELOW_GAS, RECIPIENT_AMOUNT_TOO_LOW).
Retry only on 409 REQUEST_IN_PROGRESS, 429, 5xx and network errors, with the same Idempotency-Key. A 400 will fail again until the request changes.
Rate limits
- Each IP address can make up to 120 requests per minute, with or without an API key.
- Every response carries
x-ratelimit-limit,x-ratelimit-remainingandx-ratelimit-reset(seconds until the quota resets). - Above the limit the API returns
429 RATE_LIMITEDwithRetry-After, in seconds. Other errors have noRetry-After: afterREQUEST_IN_PROGRESSandEXCHANGE_RATE_UNAVAILABLE, wait a few seconds, with increasing waits. - The limit counts every call from the address, with or without a key: a different key does not reset it. On the hosted page and the widget, each customer's browser calls the API itself and has its own quota.
- Each order opens at most 10 payments per hour on the payment page, however the customer arrives (hosted page, widget or ready link). Above that, the page asks the customer to try later (
TOO_MANY_CHECKOUTS); your API calls are not affected.
Prefer webhooks. To follow many orders, page through GET /v1/orders?status=… instead of polling each order one by one; when you poll one order, every 10 seconds is enough.
Security and reliability
- Every order has its own wallet. Payments never mix and the address is never reused. It is returned in
deposit.addressfor customers who send the stablecoin directly; card and bank payments go through the checkout. - Checked before any money moves. When the order is created, every wallet's checksum is verified, and the zero address, token contracts, any of the platform's own wallets and other orders' wallets are refused as destinations.
- A payment notice is never proof. An order becomes
receivedonly when the payment is final on-chain in its own wallet, whatever the payment page reports. - Payment only from final balances. The API waits for on-chain finality before treating a payment as received or a payout as done.
- Never paid twice. Each payout transfer is recorded before it is signed, and retries resend that same transfer. A retry or a restart cannot pay the same recipient twice.
- Payouts are not held. Only the chain itself can delay a payout, never our internal processes.
- Keys are stored as hashes only. A key is shown once, at creation.
Testing your integration
There is no sandbox or test mode yet, and no endpoint that triggers events. Until there is:
- Test your webhook verifier with the signed example: with the secret
whsec_example, its signature is valid once you turn off the time check. - Webhooks go only to a public
https://URL. To receive them on your machine, use a tunnel that gives you a public HTTPS address. - Once you have a key, test with a small real order of at least US$ 10, the minimum in either fee mode: in crypto, by sending
deposit.amounttodeposit.address, or by card at the checkout. Payouts are real and irreversible: use wallets you control.
Postman, Insomnia and generated clients
Every endpoint, field, example and error is in the OpenAPI 3.1 file at https://payfiattocrypto.com/openapi.json. Import it instead of typing requests by hand:
- Postman: choose Import, paste the URL above, and keep the generated collection. Set its authorization to Bearer Token with your API key.
- Insomnia, Bruno and Hoppscotch import the same URL as an OpenAPI document.
- Generated clients: OpenAPI Generator,
openapi-typescriptand similar tools read the same file and produce typed code for your language. - Some rules are only in the field descriptions, because generators drop them: exactly one of
sellerWalletandsellerRecipients(and ofpartnerFee.walletandpartnerFee.recipients), the size ofmetadataand the host rules ofwebhookUrl. - Import the file again when the date at the end of these pages changes: it always matches the API as built.
For AI agents and LLMs
This documentation is published in formats that AI assistants and coding agents can read directly:
| Resource | URL | Contents |
|---|---|---|
| llms.txt | https://payfiattocrypto.com/llms.txt | Short index of the API and its documentation. |
| llms-full.txt | https://payfiattocrypto.com/llms-full.txt | The entire documentation as Markdown, in one file. |
| OpenAPI 3.1 | https://payfiattocrypto.com/openapi.json | Machine-readable contract: every endpoint, field and error. |
Read https://payfiattocrypto.com/llms-full.txt and https://payfiattocrypto.com/openapi.json, then help me integrate the Pay Fiat to Crypto API into my project. Use only the endpoints and fields documented there.Rules for agents that write an integration:
- Use only the documented endpoints and fields. Unknown fields are rejected.
- Send money as decimal strings, and send an
Idempotency-Keyon everyPOST /v1/orders, reused on retries. - Keep the API key in server-side configuration; never hard-code it or send it to a browser.
- Copy wallet addresses exactly, preserving upper and lower case. Never lowercase them.
- Treat a payment as arrived only when the status read from the API is
received,settling,settledorsettle_failed; atreceived, what arrived can be less thandeposit.amount. - Send the customer only to the
checkout.url,checkout.embedUrlor ready linkurlthe API returns; never build one yourself. - Offer card or bank payment only for orders that come with a
checkout(USDC on Base), inUSDorEUR. - Verify the signature of every webhook, store each event id once, respond 2xx quickly, and act on the order's current status read with
GET /v1/orders/{orderId}.