Pay Fiat to Crypto
API

API reference

Every endpoint of the Pay Fiat to Crypto API: parameters, request and response fields, errors, and request and response examples in cURL, JavaScript, Python and PHP.

Live: get your API key from our Telegram bot

Base URL

https://api.payfiattocrypto.com

API reference

MethodPathDescription
GET/v1/assetsStablecoins and networks you can use in an order (today, USDC on Base), with minimums and settlement times.
POST/v1/ordersCreates 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/ordersYour orders, newest first, with filters and cursor pagination.
GET/v1/orders/{orderId}/checkout/offersHow much the customer pays, in their currency, before paying.
POST/v1/orders/{orderId}/checkoutReturns a link that sends the customer straight to the payment page.

List supported assets

GET/v1/assetsAPI key

Returns 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 objectsrequired

    One entry per stablecoin and network pair.

    Show child fields (8)
    • symbolstringrequired

      Stablecoin symbol.

      one of USDC

    • networkstringrequired

      Network id used in requests.

      one of base

    • namestringrequired

      Display name.

    • precisionintegerrequired

      Decimal places of the token contract.

    • minTicketUsdstring · decimalrequired

      The smallest amount of an order, in US dollars, in either fee mode. The effective minimum can be higher; see minimums.

    • sellerMinTicketUsdstring · decimal

      Only on the stablecoin that gets a card checkout, and only when card costs push the smallest seller-mode order above minTicketUsd: that minimum. Absent today. Below it, creating a seller-mode order returns AMOUNT_TOO_LOW. See minimums.

    • settlementSecondsintegerrequired

      Typical time from the payment reaching the order wallet to the payout being final, on this network.

    • settlementNotestringrequired

      What settlementSeconds counts from.

Errors: UNAUTHORIZED, RATE_LIMITED, INTERNAL_ERROR. See errors.

curl "https://api.payfiattocrypto.com/v1/assets" \
  -H "Authorization: Bearer $PFC_API_KEY"
Response · 200 OK
{
  "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

POST/v1/ordersAPI key

Creates 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

  • Authorizationstringrequired

    Bearer <API key>. See authentication.

  • Idempotency-Keystring

    Strongly recommended. Your unique id for this order, reused on every retry. See idempotency.

    1–255 characters

Request body

  • amountstring · decimalrequired

    Amount 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). With feeMode: "seller" it is what must reach the order wallet, and the fees come out of it. With feeMode: "customer" it is what the seller receives, and the deposit grows to cover the fees.

  • assetobjectrequired

    Stablecoin and network of every payout.

    Show child fields (2)
    • symbolstringrequired

      Stablecoin symbol.

      one of USDC

    • networkstringrequired

      Network the stablecoin travels on. See supported assets for the valid pairs.

      one of base

  • feeModestringrequired

    Who pays the fees and, at the checkout, the MDR. See fee modes and what the customer pays.

    one of seller, customer

  • sellerWalletstring · evm-address

    The seller's wallet. Send exactly one of sellerWallet or sellerRecipients.

  • sellerRecipientsarray of objects

    Split the seller's amount between up to 5 wallets. See split payouts.

    1–5 items

    Show child fields (2)
    • walletstring · evm-addressrequired

      Destination wallet, exactly as the wallet shows it (EIP-55 checksummed).

    • sharestring · decimalrequired

      Fraction of the group's amount, for example 0.7, with at most 39 decimal places. The shares of a group add up to exactly 1.

  • sellerNotifyobject

    Optional. Telegram chat that gets this order's messages for the seller: order created, payment received and payout sent.

    Show child fields (2)
    • channelstringrequired

      Notification channel.

      one of telegram

    • idstringrequired

      Numeric Telegram chat id, never a @username: positive for a private chat, negative for a group, supergroup or channel. See notifications.

  • partnerFeeobjectrequired

    Your commission on this order, paid to your wallet(s) on every order.

    Show child fields (4)
    • ratestring · decimalrequired

      Fraction of deposit.amount, for example 0.02 for 2%. The platform fee and this rate together must stay below 100%.

    • walletstring · evm-address

      Your wallet. Send exactly one of wallet or recipients.

    • recipientsarray of objects

      Split your commission between up to 5 wallets.

      1–5 items

      Show child fields (2)
      • walletstring · evm-addressrequired

        Destination wallet, exactly as the wallet shows it (EIP-55 checksummed).

      • sharestring · decimalrequired

        Fraction of the group's amount, for example 0.7, with at most 39 decimal places. The shares of a group add up to exactly 1.

    • notifyobject

      Optional. Telegram chat that gets this order's messages for you.

      Show child fields (2)
      • channelstringrequired

        Notification channel.

        one of telegram

      • idstringrequired

        Numeric Telegram chat id, never a @username: positive for a private chat, negative for a group, supergroup or channel. See notifications.

  • checkoutobject

    Optional checkout options. Only for USDC on Base; see checkout.

    Show child fields (2)
    • payerobject

      Optional. What you already know about the customer.

      Show child fields (1)
      • currencystring

        The currency the customer pays in: USD (the default) or EUR; lowercase is accepted. Anything else returns 400 INVALID_REQUEST.

        one of USD, EUR

    • returnUrlstring · uri

      Optional. 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 · uri

    Optional. HTTPS URL that receives this order's events: port 443 or 8443, on a public host. See webhooks.

    up to 2048 characters

  • metadataobject

    Optional. 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 \u0000 and 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 · uuidrequired

    The order id. Use it in GET /v1/orders/{orderId}.

  • statusstringrequired

    Current status. See order lifecycle.

    one of created, received, settling, settled, settle_failed, expired

  • depositobjectrequired

    The order's own wallet and how much must reach it.

    Show child fields (3)
    • addressstring · evm-addressrequired

      The order's own wallet. Customers who pay in crypto send the stablecoin here; checkout payments are delivered here too. Never reused.

    • amountstring · decimalrequired

      Exactly how much of the stablecoin must reach the order wallet. The fees in breakdown come out of it.

    • assetobjectrequired

      Stablecoin and network of the deposit and of every payout.

      Show child fields (3)
      • symbolstringrequired

        Stablecoin symbol.

        one of USDC

      • networkstringrequired

        Network the stablecoin travels on. See supported assets for the valid pairs.

        one of base

      • contractAddressstring · evm-addressrequired

        The token contract. Only transfers of this contract count as payment.

  • breakdownobjectrequired

    How the deposit is split: sellerReceives + platformFee + partnerReceives + networkFee = deposit.amount. See fees.

    Show child fields (5)
    • sellerReceivesstring · decimalrequired

      Net amount for the seller (all seller wallets together), after the network fee of the seller's own transfers.

    • platformFeestring · decimalrequired

      Platform fee: 1% of deposit.amount.

    • partnerFeestring · decimalrequired

      Your full commission: partnerFee.rate × deposit.amount. The network fee of your own transfers is paid out of it; what you actually receive is partnerReceives.

    • partnerReceivesstring · decimalrequired

      What your wallet(s) actually receive, all together: partnerFee minus the network fee of your own transfers, which is already counted in networkFee.

    • networkFeestring · decimalrequired

      Network fee of every payout transfer on this order: the seller's and yours.

  • checkoutobject

    Only on orders that can be paid by card, bank or digital wallet (USDC on Base). See checkout.

    Show child fields (6)
    • tokenstringrequired

      Identifies the checkout. The hosted page and the widget use it; it only lets someone see the amount and pay.

    • urlstring · urirequired

      The hosted checkout page. Send the customer to this exact URL. Always present when the order has a checkout.

    • embedUrlstring · urirequired

      The same page for an iframe on your site (widget). Always present when the order has a checkout.

    • feeModestringrequired

      Who pays the MDR: the order's feeMode.

      one of seller, customer

    • payerobject

      What you told us about the customer.

      Show child fields (1)
      • currencystring

        The currency the customer pays in: USD (the default) or EUR; lowercase is accepted. Anything else returns 400 INVALID_REQUEST.

        one of USD, EUR

    • returnUrlstring · uri

      Optional. 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 · uri

    The webhookUrl sent when the order was created. Absent when none was sent.

  • metadataobject

    The metadata sent when the order was created. Absent when none was sent.

  • parentOrderIdstring · uuid

    Only on a derived order: the order the customer paid again, or paid after it expired. See derived orders.

  • createdAtstring · date-timerequired

    Creation time, ISO 8601 in UTC. The order expires 7 days later, and card and bank payments close 12 hours before that.

Response headers

  • Idempotent-Replayedstring

    true when this response repeats an order that an earlier request with the same Idempotency-Key and 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"
    }
  }'
Response · 201 Created
{
  "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"
}

Retrieve an order

GET/v1/orders/{orderId}API key

Returns 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 · uuidrequired

    The orderId returned at creation.

Headers

Response fields

  • orderIdstring · uuidrequired

    The order id. Use it in GET /v1/orders/{orderId}.

  • statusstringrequired

    Current status. See order lifecycle.

    one of created, received, settling, settled, settle_failed, expired

  • depositobjectrequired

    The order's own wallet and how much must reach it.

    Show child fields (3)
    • addressstring · evm-addressrequired

      The order's own wallet. Customers who pay in crypto send the stablecoin here; checkout payments are delivered here too. Never reused.

    • amountstring · decimalrequired

      Exactly how much of the stablecoin must reach the order wallet. The fees in breakdown come out of it.

    • assetobjectrequired

      Stablecoin and network of the deposit and of every payout.

      Show child fields (3)
      • symbolstringrequired

        Stablecoin symbol.

        one of USDC

      • networkstringrequired

        Network the stablecoin travels on. See supported assets for the valid pairs.

        one of base

      • contractAddressstring · evm-addressrequired

        The token contract. Only transfers of this contract count as payment.

  • breakdownobjectrequired

    How the deposit is split: sellerReceives + platformFee + partnerReceives + networkFee = deposit.amount. See fees.

    Show child fields (5)
    • sellerReceivesstring · decimalrequired

      Net amount for the seller (all seller wallets together), after the network fee of the seller's own transfers.

    • platformFeestring · decimalrequired

      Platform fee: 1% of deposit.amount.

    • partnerFeestring · decimalrequired

      Your full commission: partnerFee.rate × deposit.amount. The network fee of your own transfers is paid out of it; what you actually receive is partnerReceives.

    • partnerReceivesstring · decimalrequired

      What your wallet(s) actually receive, all together: partnerFee minus the network fee of your own transfers, which is already counted in networkFee.

    • networkFeestring · decimalrequired

      Network fee of every payout transfer on this order: the seller's and yours.

  • checkoutobject

    Only on orders that can be paid by card, bank or digital wallet (USDC on Base). See checkout.

    Show child fields (6)
    • tokenstringrequired

      Identifies the checkout. The hosted page and the widget use it; it only lets someone see the amount and pay.

    • urlstring · urirequired

      The hosted checkout page. Send the customer to this exact URL. Always present when the order has a checkout.

    • embedUrlstring · urirequired

      The same page for an iframe on your site (widget). Always present when the order has a checkout.

    • feeModestringrequired

      Who pays the MDR: the order's feeMode.

      one of seller, customer

    • payerobject

      What you told us about the customer.

      Show child fields (1)
      • currencystring

        The currency the customer pays in: USD (the default) or EUR; lowercase is accepted. Anything else returns 400 INVALID_REQUEST.

        one of USD, EUR

    • returnUrlstring · uri

      Optional. 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 · uri

    The webhookUrl sent when the order was created. Absent when none was sent.

  • metadataobject

    The metadata sent when the order was created. Absent when none was sent.

  • parentOrderIdstring · uuid

    Only on a derived order: the order the customer paid again, or paid after it expired. See derived orders.

  • createdAtstring · date-timerequired

    Creation 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"
Response · 200 OK
{
  "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

GET/v1/ordersAPI key

Lists 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

  • statusstring

    Only orders in this status.

    one of created, received, settling, settled, settle_failed, expired

  • fromstring · date-time

    Created at or after this time. ISO 8601 with a time zone, for example 2026-11-01T00:00:00-03:00.

  • tostring · date-time

    Created at or before this time, with a time zone. from must not be after to.

  • limitinteger

    Page size.

    1–100 · default 30

  • cursorstring

    The nextCursor of the previous page, unchanged.

    up to 512 characters

Headers

Response fields

  • ordersarray of objectsrequired

    Orders on this page.

    Show child fields (9)
    • orderIdstring · uuidrequired

      The order id. Use it in GET /v1/orders/{orderId}.

    • statusstringrequired

      Current status. See order lifecycle.

      one of created, received, settling, settled, settle_failed, expired

    • depositobjectrequired

      The order's own wallet and how much must reach it.

      Show child fields (3)
      • addressstring · evm-addressrequired

        The order's own wallet. Customers who pay in crypto send the stablecoin here; checkout payments are delivered here too. Never reused.

      • amountstring · decimalrequired

        Exactly how much of the stablecoin must reach the order wallet. The fees in breakdown come out of it.

      • assetobjectrequired

        Stablecoin and network of the deposit and of every payout.

        Show child fields (3)
        • symbolstringrequired

          Stablecoin symbol.

          one of USDC

        • networkstringrequired

          Network the stablecoin travels on. See supported assets for the valid pairs.

          one of base

        • contractAddressstring · evm-addressrequired

          The token contract. Only transfers of this contract count as payment.

    • breakdownobjectrequired

      How the deposit is split: sellerReceives + platformFee + partnerReceives + networkFee = deposit.amount. See fees.

      Show child fields (5)
      • sellerReceivesstring · decimalrequired

        Net amount for the seller (all seller wallets together), after the network fee of the seller's own transfers.

      • platformFeestring · decimalrequired

        Platform fee: 1% of deposit.amount.

      • partnerFeestring · decimalrequired

        Your full commission: partnerFee.rate × deposit.amount. The network fee of your own transfers is paid out of it; what you actually receive is partnerReceives.

      • partnerReceivesstring · decimalrequired

        What your wallet(s) actually receive, all together: partnerFee minus the network fee of your own transfers, which is already counted in networkFee.

      • networkFeestring · decimalrequired

        Network fee of every payout transfer on this order: the seller's and yours.

    • checkoutobject

      Only on orders that can be paid by card, bank or digital wallet (USDC on Base). See checkout.

      Show child fields (6)
      • tokenstringrequired

        Identifies the checkout. The hosted page and the widget use it; it only lets someone see the amount and pay.

      • urlstring · urirequired

        The hosted checkout page. Send the customer to this exact URL. Always present when the order has a checkout.

      • embedUrlstring · urirequired

        The same page for an iframe on your site (widget). Always present when the order has a checkout.

      • feeModestringrequired

        Who pays the MDR: the order's feeMode.

        one of seller, customer

      • payerobject

        What you told us about the customer.

        Show child fields (1)
        • currencystring

          The currency the customer pays in: USD (the default) or EUR; lowercase is accepted. Anything else returns 400 INVALID_REQUEST.

          one of USD, EUR

      • returnUrlstring · uri

        Optional. 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 · uri

      The webhookUrl sent when the order was created. Absent when none was sent.

    • metadataobject

      The metadata sent when the order was created. Absent when none was sent.

    • parentOrderIdstring · uuid

      Only on a derived order: the order the customer paid again, or paid after it expired. See derived orders.

    • createdAtstring · date-timerequired

      Creation time, ISO 8601 in UTC. The order expires 7 days later, and card and bank payments close 12 hours before that.

  • nextCursorstring

    Opaque 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"
Response · 200 OK
{
  "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

GET/v1/orders/{orderId}/checkout/offersAPI key

Returns 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 · uuidrequired

    The orderId returned at creation.

Query parameters

  • currencystring

    Currency the customer pays in: USD or EUR, in any case. Without it, the order's checkout.payer.currency, or USD. Another three-letter code returns 422 CURRENCY_NOT_SUPPORTED.

    one of USD, EUR

Headers

Response fields

  • currencystringrequired

    The currency of every amount.

    one of USD, EUR

  • offersarray of objectsrequired

    The offer: one, or none when the amount is below the minimum.

    Show child fields (6)
    • amountstring · decimalrequired

      What the customer pays, in currency.

    • currencystringrequired

      Currency of amount.

      one of USD, EUR

    • orderAmountstring · decimalrequired

      The order as you created it: its amount, in the customer's currency, rounded to the cent. Not deposit.amount: in customer mode the platform fee, your commission and the network fee are in serviceFee.

    • feestring · decimalrequired

      All the fees the customer covers: serviceFee + processorFee = amount − orderAmount. 0.00 when the order's feeMode is seller.

    • serviceFeestring · decimalrequired

      The 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.00 when the order's feeMode is seller.

    • processorFeestring · decimalrequired

      The card processor's fee: 0.00 today, 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"
Response · 200 OK
{
  "currency": "USD",
  "offers": [
    {
      "amount": "109.91",
      "currency": "USD",
      "orderAmount": "100.00",
      "fee": "9.91",
      "serviceFee": "9.91",
      "processorFee": "0.00"
    }
  ]
}

Create a ready link

POST/v1/orders/{orderId}/checkoutAPI key

Checks 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 · uuidrequired

    The orderId returned at creation.

Headers

Request body

  • currencystring

    Currency the customer pays in: USD or EUR, in any case. Without it, the order's checkout.payer.currency, or USD. Another three-letter code returns 422 CURRENCY_NOT_SUPPORTED.

    one of USD, EUR

Response fields

  • urlstring · urirequired

    The 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 · decimalrequired

    What the customer pays, in currency.

  • currencystringrequired

    Currency of amount.

    one of USD, EUR

  • orderAmountstring · decimalrequired

    The order as you created it: its amount, in the customer's currency, rounded to the cent. Not deposit.amount: in customer mode the platform fee, your commission and the network fee are in serviceFee.

  • feestring · decimalrequired

    All the fees the customer covers: serviceFee + processorFee = amount − orderAmount. 0.00 when the order's feeMode is seller.

  • serviceFeestring · decimalrequired

    The 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.00 when the order's feeMode is seller.

  • processorFeestring · decimalrequired

    The card processor's fee: 0.00 today, 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"
  }'
Response · 201 Created
{
  "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"
}

This page as MarkdownOpenAPI 3.1