On this page
API reference
| Method | Path | Description |
|---|---|---|
GET | /v1/assets | Stablecoins and networks you can use in an order (today, USDC on Base), with minimums and settlement times. |
POST | /v1/orders | Creates an order and returns its own wallet and, for USDC on Base, its checkout. |
GET | /v1/orders/{orderId} | Current status, wallet, checkout and breakdown of one order. |
GET | /v1/orders | Your orders, newest first, with filters and cursor pagination. |
GET | /v1/orders/{orderId}/checkout/offers | How much the customer pays, in their currency, before paying. |
POST | /v1/orders/{orderId}/checkout | Returns a link that sends the customer straight to the payment page. |
List supported assets
/v1/assetsAPI keyReturns every stablecoin and network pair the API accepts; today there is one, USDC on Base. The list is the same for every account.
Read settlementSeconds per network: Base waits for finality on Ethereum, so a payout takes about half an hour.
Response fields
assetsarray of objectsrequiredOne entry per stablecoin and network pair.
Show child fields (8)Hide child fields
symbolstringrequiredStablecoin symbol.
one of
USDCnetworkstringrequiredNetwork id used in requests.
one of
basenamestringrequiredDisplay name.
precisionintegerrequiredDecimal places of the token contract.
minTicketUsdstring · decimalrequiredThe smallest
amountof an order, in US dollars, in either fee mode. The effective minimum can be higher; see minimums.sellerMinTicketUsdstring · decimalOnly on the stablecoin that gets a card
checkout, and only when card costs push the smallestseller-mode order aboveminTicketUsd: that minimum. Absent today. Below it, creating aseller-mode order returnsAMOUNT_TOO_LOW. See minimums.settlementSecondsintegerrequiredTypical time from the payment reaching the order wallet to the payout being final, on this network.
settlementNotestringrequiredWhat
settlementSecondscounts from.
Errors: UNAUTHORIZED, RATE_LIMITED, INTERNAL_ERROR. See errors.
curl "https://api.payfiattocrypto.com/v1/assets" \
-H "Authorization: Bearer $PFC_API_KEY"const response = await fetch("https://api.payfiattocrypto.com/v1/assets", {
headers: { Authorization: `Bearer ${process.env.PFC_API_KEY}` },
});
const data = await response.json().catch(() => null);
if (!response.ok) {
throw new Error(data?.error ? data.error.code + ": " + data.error.message : "HTTP " + response.status);
}import os
import requests
response = requests.get(
"https://api.payfiattocrypto.com/v1/assets",
headers={"Authorization": f"Bearer {os.environ['PFC_API_KEY']}"},
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']}")
data = response.json()<?php
$ch = curl_init("https://api.payfiattocrypto.com/v1/assets");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("PFC_API_KEY")],
CURLOPT_TIMEOUT => 30,
]);
$raw = curl_exec($ch);
if ($raw === false) {
throw new RuntimeException("Network error: " . curl_error($ch));
}
$data = json_decode($raw, true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException(($data["error"]["code"] ?? "HTTP " . $status) . ": " . ($data["error"]["message"] ?? ""));
}{
"assets": [
{
"symbol": "USDC",
"network": "base",
"name": "USD Coin",
"precision": 6,
"minTicketUsd": "10",
"settlementSeconds": 2280,
"settlementNote": "Waits for Ethereum L1 finality (~65 blocks); counted from the deposit reaching the order wallet."
}
]
}Create an order
/v1/ordersAPI keyCreates an order and returns its own wallet (deposit.address) with exactly how much must arrive (deposit.amount), the fees and, for USDC on Base, the checkout where the customer pays by card, bank or digital wallet. When the payment reaches the order wallet and is final on-chain, the API splits it and pays every recipient automatically.
All validation happens here, before any money moves: wallet checksums, forbidden destinations, minimums and fee coverage. A rejected order costs nothing. A wrong address after the payment would be irreversible.
Send an Idempotency-Key header. If a request fails because of a network error, retrying it with the same key returns the same order, wallet and checkout instead of creating a second one, with the response header Idempotent-Replayed: true.
The wallets in the examples are placeholders: replace them with wallets you control.
Headers
AuthorizationstringrequiredBearer <API key>. See authentication.Idempotency-KeystringStrongly recommended. Your unique id for this order, reused on every retry. See idempotency.
1–255 characters
Request body
amountstring · decimalrequiredAmount in units of the stablecoin, for example
100.00, with at most 6 decimal places, and at least 10 in either fee mode (see minimums). WithfeeMode: "seller"it is what must reach the order wallet, and the fees come out of it. WithfeeMode: "customer"it is what the seller receives, and the deposit grows to cover the fees.assetobjectrequiredStablecoin and network of every payout.
Show child fields (2)Hide child fields
symbolstringrequiredStablecoin symbol.
one of
USDCnetworkstringrequiredNetwork the stablecoin travels on. See supported assets for the valid pairs.
one of
base
feeModestringrequiredWho pays the fees and, at the checkout, the MDR. See fee modes and what the customer pays.
one of
seller,customersellerWalletstring · evm-addressThe seller's wallet. Send exactly one of
sellerWalletorsellerRecipients.sellerRecipientsarray of objectsSplit the seller's amount between up to 5 wallets. See split payouts.
1–5 items
Show child fields (2)Hide child fields
walletstring · evm-addressrequiredDestination wallet, exactly as the wallet shows it (EIP-55 checksummed).
sharestring · decimalrequiredFraction of the group's amount, for example
0.7, with at most 39 decimal places. The shares of a group add up to exactly1.
sellerNotifyobjectOptional. Telegram chat that gets this order's messages for the seller: order created, payment received and payout sent.
Show child fields (2)Hide child fields
channelstringrequiredNotification channel.
one of
telegramidstringrequiredNumeric Telegram chat id, never a
@username: positive for a private chat, negative for a group, supergroup or channel. See notifications.
partnerFeeobjectrequiredYour commission on this order, paid to your wallet(s) on every order.
Show child fields (4)Hide child fields
ratestring · decimalrequiredFraction of
deposit.amount, for example0.02for 2%. The platform fee and this rate together must stay below 100%.walletstring · evm-addressYour wallet. Send exactly one of
walletorrecipients.recipientsarray of objectsSplit your commission between up to 5 wallets.
1–5 items
Show child fields (2)Hide child fields
walletstring · evm-addressrequiredDestination wallet, exactly as the wallet shows it (EIP-55 checksummed).
sharestring · decimalrequiredFraction of the group's amount, for example
0.7, with at most 39 decimal places. The shares of a group add up to exactly1.
notifyobjectOptional. Telegram chat that gets this order's messages for you.
Show child fields (2)Hide child fields
channelstringrequiredNotification channel.
one of
telegramidstringrequiredNumeric Telegram chat id, never a
@username: positive for a private chat, negative for a group, supergroup or channel. See notifications.
checkoutobjectOptional checkout options. Only for USDC on Base; see checkout.
Show child fields (2)Hide child fields
payerobjectOptional. What you already know about the customer.
Show child fields (1)Hide child fields
currencystringThe currency the customer pays in:
USD(the default) orEUR; lowercase is accepted. Anything else returns400 INVALID_REQUEST.one of
USD,EUR
returnUrlstring · uriOptional. https URL of your site, used unchanged. The hosted page links back to it and, once the payment arrives, sends the customer there; the payment page is given it too. Not proof of payment. See checkout options.
up to 2048 characters
webhookUrlstring · uriOptional. HTTPS URL that receives this order's events: port 443 or 8443, on a public host. See webhooks.
up to 2048 characters
metadataobjectOptional. A JSON object with your own data for this order: any keys and any JSON values, nested or not. At most 4096 bytes, counted as compact JSON in UTF-8, with no
\u0000and no unpaired surrogates. Returned with the same keys and values in the order response and in every webhook; the order of the keys is not kept.
Response fields
orderIdstring · uuidrequiredThe order id. Use it in
GET /v1/orders/{orderId}.statusstringrequiredCurrent status. See order lifecycle.
one of
created,received,settling,settled,settle_failed,expireddepositobjectrequiredThe order's own wallet and how much must reach it.
Show child fields (3)Hide child fields
addressstring · evm-addressrequiredThe order's own wallet. Customers who pay in crypto send the stablecoin here; checkout payments are delivered here too. Never reused.
amountstring · decimalrequiredExactly how much of the stablecoin must reach the order wallet. The fees in
breakdowncome out of it.assetobjectrequiredStablecoin and network of the deposit and of every payout.
Show child fields (3)Hide child fields
symbolstringrequiredStablecoin symbol.
one of
USDCnetworkstringrequiredNetwork the stablecoin travels on. See supported assets for the valid pairs.
one of
basecontractAddressstring · evm-addressrequiredThe token contract. Only transfers of this contract count as payment.
breakdownobjectrequiredHow the deposit is split:
sellerReceives+platformFee+partnerReceives+networkFee=deposit.amount. See fees.Show child fields (5)Hide child fields
sellerReceivesstring · decimalrequiredNet amount for the seller (all seller wallets together), after the network fee of the seller's own transfers.
platformFeestring · decimalrequiredPlatform fee: 1% of
deposit.amount.partnerFeestring · decimalrequiredYour full commission:
partnerFee.rate×deposit.amount. The network fee of your own transfers is paid out of it; what you actually receive ispartnerReceives.partnerReceivesstring · decimalrequiredWhat your wallet(s) actually receive, all together:
partnerFeeminus the network fee of your own transfers, which is already counted innetworkFee.networkFeestring · decimalrequiredNetwork fee of every payout transfer on this order: the seller's and yours.
checkoutobjectOnly on orders that can be paid by card, bank or digital wallet (USDC on Base). See checkout.
Show child fields (6)Hide child fields
tokenstringrequiredIdentifies the checkout. The hosted page and the widget use it; it only lets someone see the amount and pay.
urlstring · urirequiredThe hosted checkout page. Send the customer to this exact URL. Always present when the order has a
checkout.embedUrlstring · urirequiredThe same page for an
iframeon your site (widget). Always present when the order has acheckout.feeModestringrequiredWho pays the MDR: the order's
feeMode.one of
seller,customerpayerobjectWhat you told us about the customer.
Show child fields (1)Hide child fields
currencystringThe currency the customer pays in:
USD(the default) orEUR; lowercase is accepted. Anything else returns400 INVALID_REQUEST.one of
USD,EUR
returnUrlstring · uriOptional. https URL of your site, used unchanged. The hosted page links back to it and, once the payment arrives, sends the customer there; the payment page is given it too. Not proof of payment. See checkout options.
up to 2048 characters
webhookUrlstring · uriThe
webhookUrlsent when the order was created. Absent when none was sent.metadataobjectThe
metadatasent when the order was created. Absent when none was sent.parentOrderIdstring · uuidOnly on a derived order: the order the customer paid again, or paid after it expired. See derived orders.
createdAtstring · date-timerequiredCreation time, ISO 8601 in UTC. The order expires 7 days later, and card and bank payments close 12 hours before that.
Response headers
Idempotent-Replayedstringtruewhen this response repeats an order that an earlier request with the sameIdempotency-Keyand body created: nothing new was created. Absent on a newly created order. See idempotency.one of
true
Errors: INVALID_REQUEST, INVALID_RECIPIENT_WALLET, WALLET_CONFLICT, PARTNER_PLATFORM_WALLET_CONFLICT, INVALID_SHARES, RECIPIENT_AMOUNT_TOO_LOW, AMOUNT_TOO_LOW, PARTNER_FEE_BELOW_GAS, INVALID_FEE_RATE, UNSUPPORTED_ASSET, CHECKOUT_UNAVAILABLE, UNAUTHORIZED, IDEMPOTENCY_KEY_REUSED, REQUEST_IN_PROGRESS, RATE_LIMITED, INTERNAL_ERROR. See errors.
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"
}curl "https://api.payfiattocrypto.com/v1/orders" \
-H "Authorization: Bearer $PFC_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-A-1002" \
-d '{
"amount": "100.00",
"asset": {
"symbol": "USDC",
"network": "base"
},
"sellerWallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee": {
"rate": "0.01",
"wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
},
"feeMode": "customer"
}'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-1002",
},
body: JSON.stringify({
"amount": "100.00",
"asset": {
"symbol": "USDC",
"network": "base"
},
"sellerWallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee": {
"rate": "0.01",
"wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
},
"feeMode": "customer"
}),
});
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-1002",
},
json={
"amount": "100.00",
"asset": {
"symbol": "USDC",
"network": "base"
},
"sellerWallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee": {
"rate": "0.01",
"wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
},
"feeMode": "customer"
},
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-1002",
],
CURLOPT_POSTFIELDS => json_encode([
"amount" => "100.00",
"asset" => [
"symbol" => "USDC",
"network" => "base",
],
"sellerWallet" => "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee" => [
"rate" => "0.01",
"wallet" => "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359",
],
"feeMode" => "customer",
]),
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": "5d0e8b13-27a4-4c6f-b9e1-8f3a2c7d4e60",
"status": "created",
"deposit": {
"address": "0xdDB1e7363870A65Cb0e5d7F40e725123401f8A75",
"amount": "102.042857",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "100.000000",
"platformFee": "1.020429",
"partnerFee": "1.020428",
"partnerReceives": "1.018428",
"networkFee": "0.004000"
},
"checkout": {
"token": "qdWjCHd2SVK86OL6kUVmfl3Crn1N58vh",
"url": "https://payfiattocrypto.com/c/qdWjCHd2SVK86OL6kUVmfl3Crn1N58vh",
"embedUrl": "https://payfiattocrypto.com/c/qdWjCHd2SVK86OL6kUVmfl3Crn1N58vh?embed=1",
"feeMode": "customer"
},
"createdAt": "2026-11-16T14:21:37.904Z"
}curl "https://api.payfiattocrypto.com/v1/orders" \
-H "Authorization: Bearer $PFC_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-A-1003" \
-d '{
"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"
}
}'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-1003",
},
body: JSON.stringify({
"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"
}
}),
});
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-1003",
},
json={
"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"
}
},
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-1003",
],
CURLOPT_POSTFIELDS => json_encode([
"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",
],
]),
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": "5ef19228-38a2-4985-8835-4bd6585bde9b",
"status": "created",
"deposit": {
"address": "0x9115d945aEe713eE3CA1bCD67589e48428A37694",
"amount": "250.000000",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "242.496000",
"platformFee": "2.500000",
"partnerFee": "5.000000",
"partnerReceives": "4.998000",
"networkFee": "0.006000"
},
"checkout": {
"token": "xI8KuUH2kow847UEvl2eWGxxio5u9w9z",
"url": "https://payfiattocrypto.com/c/xI8KuUH2kow847UEvl2eWGxxio5u9w9z",
"embedUrl": "https://payfiattocrypto.com/c/xI8KuUH2kow847UEvl2eWGxxio5u9w9z?embed=1",
"feeMode": "seller"
},
"createdAt": "2026-11-16T14:33:02.471Z"
}curl "https://api.payfiattocrypto.com/v1/orders" \
-H "Authorization: Bearer $PFC_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-A-1004" \
-d '{
"amount": "100.00",
"asset": {
"symbol": "USDC",
"network": "base"
},
"sellerWallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee": {
"rate": "0.01",
"wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
},
"feeMode": "customer",
"checkout": {
"payer": {
"currency": "EUR"
},
"returnUrl": "https://example.com/orders/A-1004"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto"
}'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-1004",
},
body: JSON.stringify({
"amount": "100.00",
"asset": {
"symbol": "USDC",
"network": "base"
},
"sellerWallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee": {
"rate": "0.01",
"wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
},
"feeMode": "customer",
"checkout": {
"payer": {
"currency": "EUR"
},
"returnUrl": "https://example.com/orders/A-1004"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto"
}),
});
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-1004",
},
json={
"amount": "100.00",
"asset": {
"symbol": "USDC",
"network": "base"
},
"sellerWallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee": {
"rate": "0.01",
"wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
},
"feeMode": "customer",
"checkout": {
"payer": {
"currency": "EUR"
},
"returnUrl": "https://example.com/orders/A-1004"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto"
},
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-1004",
],
CURLOPT_POSTFIELDS => json_encode([
"amount" => "100.00",
"asset" => [
"symbol" => "USDC",
"network" => "base",
],
"sellerWallet" => "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
"partnerFee" => [
"rate" => "0.01",
"wallet" => "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359",
],
"feeMode" => "customer",
"checkout" => [
"payer" => [
"currency" => "EUR",
],
"returnUrl" => "https://example.com/orders/A-1004",
],
"webhookUrl" => "https://example.com/webhooks/payfiattocrypto",
]),
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": "73c1c17f-659a-46cb-83bb-fb1ad9493527",
"status": "created",
"deposit": {
"address": "0x313A851457895669BF33710098FF4b41BcB03Fb8",
"amount": "102.042857",
"asset": {
"symbol": "USDC",
"network": "base",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"breakdown": {
"sellerReceives": "100.000000",
"platformFee": "1.020429",
"partnerFee": "1.020428",
"partnerReceives": "1.018428",
"networkFee": "0.004000"
},
"checkout": {
"token": "9YPipY-bnA2ZSkB7srGLI_ebb2qzxE99",
"url": "https://payfiattocrypto.com/c/9YPipY-bnA2ZSkB7srGLI_ebb2qzxE99",
"embedUrl": "https://payfiattocrypto.com/c/9YPipY-bnA2ZSkB7srGLI_ebb2qzxE99?embed=1",
"feeMode": "customer",
"payer": {
"currency": "EUR"
},
"returnUrl": "https://example.com/orders/A-1004"
},
"webhookUrl": "https://example.com/webhooks/payfiattocrypto",
"createdAt": "2026-11-16T14:40:55.318Z"
}Retrieve an order
/v1/orders/{orderId}API keyReturns the order in the same shape as the creation response, with its current status. Use it to send the customer back to the checkout and to follow the payout.
An order that belongs to another account returns 404 ORDER_NOT_FOUND, exactly like one that does not exist.
Path parameters
orderIdstring · uuidrequiredThe
orderIdreturned at creation.
Headers
AuthorizationstringrequiredBearer <API key>. See authentication.
Response fields
orderIdstring · uuidrequiredThe order id. Use it in
GET /v1/orders/{orderId}.statusstringrequiredCurrent status. See order lifecycle.
one of
created,received,settling,settled,settle_failed,expireddepositobjectrequiredThe order's own wallet and how much must reach it.
Show child fields (3)Hide child fields
addressstring · evm-addressrequiredThe order's own wallet. Customers who pay in crypto send the stablecoin here; checkout payments are delivered here too. Never reused.
amountstring · decimalrequiredExactly how much of the stablecoin must reach the order wallet. The fees in
breakdowncome out of it.assetobjectrequiredStablecoin and network of the deposit and of every payout.
Show child fields (3)Hide child fields
symbolstringrequiredStablecoin symbol.
one of
USDCnetworkstringrequiredNetwork the stablecoin travels on. See supported assets for the valid pairs.
one of
basecontractAddressstring · evm-addressrequiredThe token contract. Only transfers of this contract count as payment.
breakdownobjectrequiredHow the deposit is split:
sellerReceives+platformFee+partnerReceives+networkFee=deposit.amount. See fees.Show child fields (5)Hide child fields
sellerReceivesstring · decimalrequiredNet amount for the seller (all seller wallets together), after the network fee of the seller's own transfers.
platformFeestring · decimalrequiredPlatform fee: 1% of
deposit.amount.partnerFeestring · decimalrequiredYour full commission:
partnerFee.rate×deposit.amount. The network fee of your own transfers is paid out of it; what you actually receive ispartnerReceives.partnerReceivesstring · decimalrequiredWhat your wallet(s) actually receive, all together:
partnerFeeminus the network fee of your own transfers, which is already counted innetworkFee.networkFeestring · decimalrequiredNetwork fee of every payout transfer on this order: the seller's and yours.
checkoutobjectOnly on orders that can be paid by card, bank or digital wallet (USDC on Base). See checkout.
Show child fields (6)Hide child fields
tokenstringrequiredIdentifies the checkout. The hosted page and the widget use it; it only lets someone see the amount and pay.
urlstring · urirequiredThe hosted checkout page. Send the customer to this exact URL. Always present when the order has a
checkout.embedUrlstring · urirequiredThe same page for an
iframeon your site (widget). Always present when the order has acheckout.feeModestringrequiredWho pays the MDR: the order's
feeMode.one of
seller,customerpayerobjectWhat you told us about the customer.
Show child fields (1)Hide child fields
currencystringThe currency the customer pays in:
USD(the default) orEUR; lowercase is accepted. Anything else returns400 INVALID_REQUEST.one of
USD,EUR
returnUrlstring · uriOptional. https URL of your site, used unchanged. The hosted page links back to it and, once the payment arrives, sends the customer there; the payment page is given it too. Not proof of payment. See checkout options.
up to 2048 characters
webhookUrlstring · uriThe
webhookUrlsent when the order was created. Absent when none was sent.metadataobjectThe
metadatasent when the order was created. Absent when none was sent.parentOrderIdstring · uuidOnly on a derived order: the order the customer paid again, or paid after it expired. See derived orders.
createdAtstring · date-timerequiredCreation time, ISO 8601 in UTC. The order expires 7 days later, and card and bank payments close 12 hours before that.
Errors: UNAUTHORIZED, ORDER_NOT_FOUND, RATE_LIMITED, INTERNAL_ERROR. See errors.
curl "https://api.payfiattocrypto.com/v1/orders/aa2c9fc7-0940-4060-9055-e7eaa97440a3" \
-H "Authorization: Bearer $PFC_API_KEY"const response = await fetch("https://api.payfiattocrypto.com/v1/orders/aa2c9fc7-0940-4060-9055-e7eaa97440a3", {
headers: { Authorization: `Bearer ${process.env.PFC_API_KEY}` },
});
const data = await response.json().catch(() => null);
if (!response.ok) {
throw new Error(data?.error ? data.error.code + ": " + data.error.message : "HTTP " + response.status);
}import os
import requests
response = requests.get(
"https://api.payfiattocrypto.com/v1/orders/aa2c9fc7-0940-4060-9055-e7eaa97440a3",
headers={"Authorization": f"Bearer {os.environ['PFC_API_KEY']}"},
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']}")
data = response.json()<?php
$ch = curl_init("https://api.payfiattocrypto.com/v1/orders/aa2c9fc7-0940-4060-9055-e7eaa97440a3");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("PFC_API_KEY")],
CURLOPT_TIMEOUT => 30,
]);
$raw = curl_exec($ch);
if ($raw === false) {
throw new RuntimeException("Network error: " . curl_error($ch));
}
$data = json_decode($raw, true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException(($data["error"]["code"] ?? "HTTP " . $status) . ": " . ($data["error"]["message"] ?? ""));
}{
"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"
}List orders
/v1/ordersAPI keyLists the orders created with your account's keys, newest first. Filter by status and creation time, and page with cursor. See pagination.
Any invalid or unknown query parameter returns 400 INVALID_REQUEST.
Query parameters
statusstringOnly orders in this status.
one of
created,received,settling,settled,settle_failed,expiredfromstring · date-timeCreated at or after this time. ISO 8601 with a time zone, for example
2026-11-01T00:00:00-03:00.tostring · date-timeCreated at or before this time, with a time zone.
frommust not be afterto.limitintegerPage size.
1–100 · default
30cursorstringThe
nextCursorof the previous page, unchanged.up to 512 characters
Headers
AuthorizationstringrequiredBearer <API key>. See authentication.
Response fields
ordersarray of objectsrequiredOrders on this page.
Show child fields (9)Hide child fields
orderIdstring · uuidrequiredThe order id. Use it in
GET /v1/orders/{orderId}.statusstringrequiredCurrent status. See order lifecycle.
one of
created,received,settling,settled,settle_failed,expireddepositobjectrequiredThe order's own wallet and how much must reach it.
Show child fields (3)Hide child fields
addressstring · evm-addressrequiredThe order's own wallet. Customers who pay in crypto send the stablecoin here; checkout payments are delivered here too. Never reused.
amountstring · decimalrequiredExactly how much of the stablecoin must reach the order wallet. The fees in
breakdowncome out of it.assetobjectrequiredStablecoin and network of the deposit and of every payout.
Show child fields (3)Hide child fields
symbolstringrequiredStablecoin symbol.
one of
USDCnetworkstringrequiredNetwork the stablecoin travels on. See supported assets for the valid pairs.
one of
basecontractAddressstring · evm-addressrequiredThe token contract. Only transfers of this contract count as payment.
breakdownobjectrequiredHow the deposit is split:
sellerReceives+platformFee+partnerReceives+networkFee=deposit.amount. See fees.Show child fields (5)Hide child fields
sellerReceivesstring · decimalrequiredNet amount for the seller (all seller wallets together), after the network fee of the seller's own transfers.
platformFeestring · decimalrequiredPlatform fee: 1% of
deposit.amount.partnerFeestring · decimalrequiredYour full commission:
partnerFee.rate×deposit.amount. The network fee of your own transfers is paid out of it; what you actually receive ispartnerReceives.partnerReceivesstring · decimalrequiredWhat your wallet(s) actually receive, all together:
partnerFeeminus the network fee of your own transfers, which is already counted innetworkFee.networkFeestring · decimalrequiredNetwork fee of every payout transfer on this order: the seller's and yours.
checkoutobjectOnly on orders that can be paid by card, bank or digital wallet (USDC on Base). See checkout.
Show child fields (6)Hide child fields
tokenstringrequiredIdentifies the checkout. The hosted page and the widget use it; it only lets someone see the amount and pay.
urlstring · urirequiredThe hosted checkout page. Send the customer to this exact URL. Always present when the order has a
checkout.embedUrlstring · urirequiredThe same page for an
iframeon your site (widget). Always present when the order has acheckout.feeModestringrequiredWho pays the MDR: the order's
feeMode.one of
seller,customerpayerobjectWhat you told us about the customer.
Show child fields (1)Hide child fields
currencystringThe currency the customer pays in:
USD(the default) orEUR; lowercase is accepted. Anything else returns400 INVALID_REQUEST.one of
USD,EUR
returnUrlstring · uriOptional. https URL of your site, used unchanged. The hosted page links back to it and, once the payment arrives, sends the customer there; the payment page is given it too. Not proof of payment. See checkout options.
up to 2048 characters
webhookUrlstring · uriThe
webhookUrlsent when the order was created. Absent when none was sent.metadataobjectThe
metadatasent when the order was created. Absent when none was sent.parentOrderIdstring · uuidOnly on a derived order: the order the customer paid again, or paid after it expired. See derived orders.
createdAtstring · date-timerequiredCreation time, ISO 8601 in UTC. The order expires 7 days later, and card and bank payments close 12 hours before that.
nextCursorstringOpaque cursor for the next page. Absent on the last page.
Errors: INVALID_REQUEST, UNAUTHORIZED, RATE_LIMITED, INTERNAL_ERROR. See errors.
curl "https://api.payfiattocrypto.com/v1/orders?status=settled&limit=50" \
-H "Authorization: Bearer $PFC_API_KEY"const response = await fetch("https://api.payfiattocrypto.com/v1/orders?status=settled&limit=50", {
headers: { Authorization: `Bearer ${process.env.PFC_API_KEY}` },
});
const data = await response.json().catch(() => null);
if (!response.ok) {
throw new Error(data?.error ? data.error.code + ": " + data.error.message : "HTTP " + response.status);
}import os
import requests
response = requests.get(
"https://api.payfiattocrypto.com/v1/orders?status=settled&limit=50",
headers={"Authorization": f"Bearer {os.environ['PFC_API_KEY']}"},
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']}")
data = response.json()<?php
$ch = curl_init("https://api.payfiattocrypto.com/v1/orders?status=settled&limit=50");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("PFC_API_KEY")],
CURLOPT_TIMEOUT => 30,
]);
$raw = curl_exec($ch);
if ($raw === false) {
throw new RuntimeException("Network error: " . curl_error($ch));
}
$data = json_decode($raw, true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException(($data["error"]["code"] ?? "HTTP " . $status) . ": " . ($data["error"]["message"] ?? ""));
}{
"orders": [
{
"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"
}
],
"nextCursor": "eyJjIjoiMjAyNi0xMS0xNlQxNDowNTowOS4xMjBaIiwiaSI6ImFhMmM5ZmM3In0"
}Get the checkout offer
/v1/orders/{orderId}/checkout/offersAPI keyReturns what the customer pays for this order in USD or EUR, split into the order's amount, the service fee and the card processor's fee (0.00 today). Without currency, the order's checkout.payer.currency is used, or USD.
There is one offer, or none when the amount is below the minimum (US$ 10): an empty list, not an error. The amount is calculated when you ask, with the current exchange rate.
The offer does not say whether a payment is already on its way: it still returns a price while one is being confirmed. From 12 hours before the order expires, it returns 409 ORDER_NOT_PAYABLE.
The example is an order in customer mode with amount 100.00 and deposit.amount 102.042857: orderAmount is the amount, and the platform fee, your commission and the network fee are in serviceFee.
Path parameters
orderIdstring · uuidrequiredThe
orderIdreturned at creation.
Query parameters
currencystringCurrency the customer pays in:
USDorEUR, in any case. Without it, the order'scheckout.payer.currency, orUSD. Another three-letter code returns422 CURRENCY_NOT_SUPPORTED.one of
USD,EUR
Headers
AuthorizationstringrequiredBearer <API key>. See authentication.
Response fields
currencystringrequiredThe currency of every amount.
one of
USD,EURoffersarray of objectsrequiredThe offer: one, or none when the amount is below the minimum.
Show child fields (6)Hide child fields
amountstring · decimalrequiredWhat the customer pays, in
currency.currencystringrequiredCurrency of
amount.one of
USD,EURorderAmountstring · decimalrequiredThe order as you created it: its
amount, in the customer's currency, rounded to the cent. Notdeposit.amount: incustomermode the platform fee, your commission and the network fee are inserviceFee.feestring · decimalrequiredAll the fees the customer covers:
serviceFee+processorFee=amount−orderAmount.0.00when the order'sfeeModeisseller.serviceFeestring · decimalrequiredThe service fee: the platform fee, your commission and the network fee, together with the processing fee (the payment provider's MDR, 6.70% + US$ 0.50).
0.00when the order'sfeeModeisseller.processorFeestring · decimalrequiredThe card processor's fee:
0.00today, in either fee mode. The processor is chosen for each payment and its fee is not known in advance, so it is not in the price; when the processor deducts a fee from what it delivers, less reaches the order wallet and the payout is proportional.
Errors: INVALID_REQUEST, UNAUTHORIZED, ORDER_NOT_FOUND, ORDER_NOT_PAYABLE, CURRENCY_NOT_SUPPORTED, RATE_LIMITED, EXCHANGE_RATE_UNAVAILABLE, INTERNAL_ERROR. See errors.
curl "https://api.payfiattocrypto.com/v1/orders/5d0e8b13-27a4-4c6f-b9e1-8f3a2c7d4e60/checkout/offers?currency=USD" \
-H "Authorization: Bearer $PFC_API_KEY"const response = await fetch("https://api.payfiattocrypto.com/v1/orders/5d0e8b13-27a4-4c6f-b9e1-8f3a2c7d4e60/checkout/offers?currency=USD", {
headers: { Authorization: `Bearer ${process.env.PFC_API_KEY}` },
});
const data = await response.json().catch(() => null);
if (!response.ok) {
throw new Error(data?.error ? data.error.code + ": " + data.error.message : "HTTP " + response.status);
}import os
import requests
response = requests.get(
"https://api.payfiattocrypto.com/v1/orders/5d0e8b13-27a4-4c6f-b9e1-8f3a2c7d4e60/checkout/offers?currency=USD",
headers={"Authorization": f"Bearer {os.environ['PFC_API_KEY']}"},
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']}")
data = response.json()<?php
$ch = curl_init("https://api.payfiattocrypto.com/v1/orders/5d0e8b13-27a4-4c6f-b9e1-8f3a2c7d4e60/checkout/offers?currency=USD");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("PFC_API_KEY")],
CURLOPT_TIMEOUT => 30,
]);
$raw = curl_exec($ch);
if ($raw === false) {
throw new RuntimeException("Network error: " . curl_error($ch));
}
$data = json_decode($raw, true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException(($data["error"]["code"] ?? "HTTP " . $status) . ": " . ($data["error"]["message"] ?? ""));
}{
"currency": "USD",
"offers": [
{
"amount": "109.91",
"currency": "USD",
"orderAmount": "100.00",
"fee": "9.91",
"serviceFee": "9.91",
"processorFee": "0.00"
}
]
}Create a ready link
/v1/orders/{orderId}/checkoutAPI keyChecks that the order can be paid, calculates what the customer pays (in currency, or the order's default) and returns url: a link to our page in "pay now" mode. Send it to the customer by email, chat or a button. When the order can be paid, it takes the customer straight to the payment page; otherwise it shows the order's state: a payment in progress, already paid, or expired.
The call opens nothing: the payment opens when the customer opens the link, with the exchange rate of that moment (in USD, the same amount). Call it as often as you need; for a given currency the link is always the same. Once a payment is approved, it returns 409 PAYMENT_IN_PROGRESS.
The body is optional: no body, an empty body (even with Content-Type: application/json) and {} all mean the order's currency, checkout.payer.currency or USD; send {"currency": "EUR"} to choose. The answer is 201 even though nothing is created.
The example continues the order in the offers example.
Path parameters
orderIdstring · uuidrequiredThe
orderIdreturned at creation.
Headers
AuthorizationstringrequiredBearer <API key>. See authentication.
Request body
currencystringCurrency the customer pays in:
USDorEUR, in any case. Without it, the order'scheckout.payer.currency, orUSD. Another three-letter code returns422 CURRENCY_NOT_SUPPORTED.one of
USD,EUR
Response fields
urlstring · urirequiredThe ready link: our page in "pay now" mode. Send the customer to this exact URL; it stays the same for this order and currency.
amountstring · decimalrequiredWhat the customer pays, in
currency.currencystringrequiredCurrency of
amount.one of
USD,EURorderAmountstring · decimalrequiredThe order as you created it: its
amount, in the customer's currency, rounded to the cent. Notdeposit.amount: incustomermode the platform fee, your commission and the network fee are inserviceFee.feestring · decimalrequiredAll the fees the customer covers:
serviceFee+processorFee=amount−orderAmount.0.00when the order'sfeeModeisseller.serviceFeestring · decimalrequiredThe service fee: the platform fee, your commission and the network fee, together with the processing fee (the payment provider's MDR, 6.70% + US$ 0.50).
0.00when the order'sfeeModeisseller.processorFeestring · decimalrequiredThe card processor's fee:
0.00today, in either fee mode. The processor is chosen for each payment and its fee is not known in advance, so it is not in the price; when the processor deducts a fee from what it delivers, less reaches the order wallet and the payout is proportional.
Errors: INVALID_REQUEST, UNAUTHORIZED, ORDER_NOT_FOUND, ORDER_NOT_PAYABLE, PAYMENT_IN_PROGRESS, CURRENCY_NOT_SUPPORTED, AMOUNT_BELOW_MINIMUM, RATE_LIMITED, EXCHANGE_RATE_UNAVAILABLE, INTERNAL_ERROR. See errors.
curl "https://api.payfiattocrypto.com/v1/orders/5d0e8b13-27a4-4c6f-b9e1-8f3a2c7d4e60/checkout" \
-H "Authorization: Bearer $PFC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"currency": "USD"
}'const response = await fetch("https://api.payfiattocrypto.com/v1/orders/5d0e8b13-27a4-4c6f-b9e1-8f3a2c7d4e60/checkout", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PFC_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"currency": "USD"
}),
});
const data = await response.json().catch(() => null);
if (!response.ok) {
throw new Error(data?.error ? data.error.code + ": " + data.error.message : "HTTP " + response.status);
}import os
import requests
response = requests.post(
"https://api.payfiattocrypto.com/v1/orders/5d0e8b13-27a4-4c6f-b9e1-8f3a2c7d4e60/checkout",
headers={"Authorization": f"Bearer {os.environ['PFC_API_KEY']}"},
json={
"currency": "USD"
},
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']}")
data = response.json()<?php
$ch = curl_init("https://api.payfiattocrypto.com/v1/orders/5d0e8b13-27a4-4c6f-b9e1-8f3a2c7d4e60/checkout");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("PFC_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"currency" => "USD",
]),
CURLOPT_TIMEOUT => 30,
]);
$raw = curl_exec($ch);
if ($raw === false) {
throw new RuntimeException("Network error: " . curl_error($ch));
}
$data = json_decode($raw, true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException(($data["error"]["code"] ?? "HTTP " . $status) . ": " . ($data["error"]["message"] ?? ""));
}{
"url": "https://payfiattocrypto.com/c/qdWjCHd2SVK86OL6kUVmfl3Crn1N58vh?pay=USD",
"amount": "109.91",
"currency": "USD",
"orderAmount": "100.00",
"fee": "9.91",
"serviceFee": "9.91",
"processorFee": "0.00"
}