{
  "openapi": "3.1.0",
  "info": {
    "title": "Pay Fiat to Crypto API",
    "version": "1.0.0",
    "summary": "Stablecoin settlement with automatic split payouts.",
    "description": "REST API to accept payments that settle in USDC on Base. Customers pay by card, bank transfer or digital wallet, in US dollars or euros, through a hosted checkout, a widget or a ready payment link, or send USDC to the order's own wallet. Every payment is split automatically between the seller, your commission and the platform, then paid out on-chain.\n\nGuides: https://payfiattocrypto.com/en/docs. API reference: https://payfiattocrypto.com/en/docs/reference. Markdown for LLMs: https://payfiattocrypto.com/llms-full.txt.",
    "contact": {
      "name": "Support on Telegram",
      "url": "https://t.me/payfiattocrypto"
    }
  },
  "externalDocs": {
    "description": "API documentation",
    "url": "https://payfiattocrypto.com/en/docs"
  },
  "servers": [
    {
      "url": "https://api.payfiattocrypto.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Assets",
      "description": "Supported stablecoins and networks."
    },
    {
      "name": "Orders",
      "description": "Create and follow payment orders."
    },
    {
      "name": "Checkout",
      "description": "Card, bank and digital wallet checkout: what the customer pays, and the ready link."
    }
  ],
  "paths": {
    "/v1/assets": {
      "get": {
        "operationId": "listAssets",
        "tags": [
          "Assets"
        ],
        "summary": "List supported assets",
        "description": "Stablecoins and networks you can use in an order (today, USDC on Base), with minimums and settlement times.\n\nReturns every stablecoin and network pair the API accepts; today there is one, USDC on Base. The list is the same for every account.\n\nRead `settlementSeconds` per network: Base waits for finality on Ethereum, so a payout takes about half an hour.",
        "externalDocs": {
          "url": "https://payfiattocrypto.com/en/docs/reference#get-assets"
        },
        "responses": {
          "200": {
            "description": "The supported assets.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetList"
                },
                "example": {
                  "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."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error. `error.code` is one of: `UNAUTHORIZED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error. `error.code` is one of: `RATE_LIMITED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error. `error.code` is one of: `INTERNAL_ERROR`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders": {
      "post": {
        "operationId": "createOrder",
        "tags": [
          "Orders"
        ],
        "summary": "Create an order",
        "description": "Creates an order and returns its own wallet and, for USDC on Base, its checkout.\n\nCreates 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.\n\nAll 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.\n\nSend 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`.\n\nThe wallets in the examples are placeholders: replace them with wallets you control.",
        "externalDocs": {
          "url": "https://payfiattocrypto.com/en/docs/reference#create-order"
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Strongly recommended. Your unique id for this order, reused on every retry. See [idempotency](https://payfiattocrypto.com/en/docs#idempotency).",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderRequest"
              },
              "examples": {
                "seller": {
                  "summary": "Seller pays the fees",
                  "value": {
                    "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"
                    }
                  }
                },
                "customer": {
                  "summary": "Customer pays the fees",
                  "value": {
                    "amount": "100.00",
                    "asset": {
                      "symbol": "USDC",
                      "network": "base"
                    },
                    "sellerWallet": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
                    "partnerFee": {
                      "rate": "0.01",
                      "wallet": "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
                    },
                    "feeMode": "customer"
                  }
                },
                "split": {
                  "summary": "Split payout",
                  "value": {
                    "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"
                    }
                  }
                },
                "checkout": {
                  "summary": "Checkout options",
                  "value": {
                    "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"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The order was created or, on a retry with the same `Idempotency-Key` and body, found. Both return `201`; only the repeat has the header `Idempotent-Replayed: true`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "Idempotent-Replayed": {
                "description": "`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](https://payfiattocrypto.com/en/docs#idempotency).",
                "required": false,
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "examples": {
                  "seller": {
                    "summary": "Seller pays the fees",
                    "value": {
                      "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"
                    }
                  },
                  "customer": {
                    "summary": "Customer pays the fees",
                    "value": {
                      "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"
                    }
                  },
                  "split": {
                    "summary": "Split payout",
                    "value": {
                      "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"
                    }
                  },
                  "checkout": {
                    "summary": "Checkout options",
                    "value": {
                      "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"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error. `error.code` is one of: `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`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error. `error.code` is one of: `UNAUTHORIZED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error. `error.code` is one of: `IDEMPOTENCY_KEY_REUSED`, `REQUEST_IN_PROGRESS`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the limit. `error.code` is `INVALID_REQUEST`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported `Content-Type`; send `application/json`. `error.code` is `INVALID_REQUEST`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error. `error.code` is one of: `RATE_LIMITED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error. `error.code` is one of: `INTERNAL_ERROR`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listOrders",
        "tags": [
          "Orders"
        ],
        "summary": "List orders",
        "description": "Your orders, newest first, with filters and cursor pagination.\n\nLists the orders created with your account's keys, newest first. Filter by status and creation time, and page with `cursor`. See [pagination](https://payfiattocrypto.com/en/docs#pagination).\n\nAny invalid or unknown query parameter returns `400 INVALID_REQUEST`.",
        "externalDocs": {
          "url": "https://payfiattocrypto.com/en/docs/reference#list-orders"
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only orders in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "created",
                "received",
                "settling",
                "settled",
                "settle_failed",
                "expired"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Created at or after this time. ISO 8601 with a time zone, for example `2026-11-01T00:00:00-03:00`.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Created at or before this time, with a time zone. `from` must not be after `to`.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `nextCursor` of the previous page, unchanged.",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of orders.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderList"
                },
                "example": {
                  "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"
                }
              }
            }
          },
          "400": {
            "description": "Error. `error.code` is one of: `INVALID_REQUEST`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error. `error.code` is one of: `UNAUTHORIZED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error. `error.code` is one of: `RATE_LIMITED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error. `error.code` is one of: `INTERNAL_ERROR`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}": {
      "get": {
        "operationId": "getOrder",
        "tags": [
          "Orders"
        ],
        "summary": "Retrieve an order",
        "description": "Current status, wallet, checkout and breakdown of one order.\n\nReturns 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.\n\nAn order that belongs to another account returns `404 ORDER_NOT_FOUND`, exactly like one that does not exist.",
        "externalDocs": {
          "url": "https://payfiattocrypto.com/en/docs/reference#get-order"
        },
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The `orderId` returned at creation.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The order.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "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"
                }
              }
            }
          },
          "401": {
            "description": "Error. `error.code` is one of: `UNAUTHORIZED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error. `error.code` is one of: `ORDER_NOT_FOUND`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error. `error.code` is one of: `RATE_LIMITED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error. `error.code` is one of: `INTERNAL_ERROR`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/checkout/offers": {
      "get": {
        "operationId": "listCheckoutOffers",
        "tags": [
          "Checkout"
        ],
        "summary": "Get the checkout offer",
        "description": "How much the customer pays, in their currency, before paying.\n\nReturns 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`.\n\nThere 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.\n\nThe 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`.\n\nThe 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`.",
        "externalDocs": {
          "url": "https://payfiattocrypto.com/en/docs/reference#get-checkout-offers"
        },
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The `orderId` returned at creation.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "description": "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`.",
            "schema": {
              "type": "string",
              "enum": [
                "USD",
                "EUR"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The offer for this order.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutOffers"
                },
                "example": {
                  "currency": "USD",
                  "offers": [
                    {
                      "amount": "109.91",
                      "currency": "USD",
                      "orderAmount": "100.00",
                      "fee": "9.91",
                      "serviceFee": "9.91",
                      "processorFee": "0.00"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error. `error.code` is one of: `INVALID_REQUEST`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error. `error.code` is one of: `UNAUTHORIZED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error. `error.code` is one of: `ORDER_NOT_FOUND`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error. `error.code` is one of: `ORDER_NOT_PAYABLE`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error. `error.code` is one of: `CURRENCY_NOT_SUPPORTED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error. `error.code` is one of: `RATE_LIMITED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error. `error.code` is one of: `INTERNAL_ERROR`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error. `error.code` is one of: `EXCHANGE_RATE_UNAVAILABLE`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/checkout": {
      "post": {
        "operationId": "createCheckout",
        "tags": [
          "Checkout"
        ],
        "summary": "Create a ready link",
        "description": "Returns a link that sends the customer straight to the payment page.\n\nChecks 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.\n\nThe 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`.\n\nThe 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.\n\nThe example continues the order in the [offers](https://payfiattocrypto.com/en/docs/reference#get-checkout-offers) example.",
        "externalDocs": {
          "url": "https://payfiattocrypto.com/en/docs/reference#create-checkout"
        },
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The `orderId` returned at creation.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCheckoutRequest"
              },
              "example": {
                "currency": "USD"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The ready link and what the customer pays.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutLink"
                },
                "example": {
                  "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"
                }
              }
            }
          },
          "400": {
            "description": "Error. `error.code` is one of: `INVALID_REQUEST`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error. `error.code` is one of: `UNAUTHORIZED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error. `error.code` is one of: `ORDER_NOT_FOUND`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error. `error.code` is one of: `ORDER_NOT_PAYABLE`, `PAYMENT_IN_PROGRESS`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the limit. `error.code` is `INVALID_REQUEST`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported `Content-Type`; send `application/json`. `error.code` is `INVALID_REQUEST`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error. `error.code` is one of: `CURRENCY_NOT_SUPPORTED`, `AMOUNT_BELOW_MINIMUM`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error. `error.code` is one of: `RATE_LIMITED`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error. `error.code` is one of: `INTERNAL_ERROR`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error. `error.code` is one of: `EXCHANGE_RATE_UNAVAILABLE`.",
            "headers": {
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "orderEvent": {
      "post": {
        "operationId": "receiveOrderEvent",
        "summary": "Order and payment events",
        "description": "Sent to the order's `webhookUrl`. Verify `X-Signature`: HMAC-SHA256 of `t` + \".\" + the raw body, with your account's webhook secret, compared with every `v1` in the header (there can be more than one); accept if any matches. Reject the request when `t` is more than 300 s away from your clock, in either direction. Respond 2xx within 10 s. The body is compact JSON; `data.payment` is present on `payment.*` events only. At-least-once delivery, order not guaranteed. See [webhooks](https://payfiattocrypto.com/en/docs#webhooks).",
        "externalDocs": {
          "url": "https://payfiattocrypto.com/en/docs#webhooks"
        },
        "parameters": [
          {
            "name": "X-Event-Id",
            "in": "header",
            "required": true,
            "description": "Event id; the same on every retry. Skip ids already handled.",
            "schema": {
              "type": "string",
              "pattern": "^evt_[0-9a-f-]{36}$"
            }
          },
          {
            "name": "X-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type, the same as `event` in the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix time of this attempt>,v1=<hex HMAC-SHA256 of t + \".\" + raw body>`: one `t`, then one or more `v1`. For 24 hours after a new API key there is one `v1` per webhook secret, the previous first and the new last. Accept the webhook if any `v1` matches.",
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+(,v1=[0-9a-f]{64})+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "examples": {
                "order.received": {
                  "summary": "order.received",
                  "value": {
                    "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"
                      }
                    }
                  }
                },
                "order.settled": {
                  "summary": "order.settled",
                  "value": {
                    "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"
                      }
                    }
                  }
                },
                "order.settle_failed": {
                  "summary": "order.settle_failed",
                  "value": {
                    "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"
                      }
                    }
                  }
                },
                "order.expired": {
                  "summary": "order.expired",
                  "value": {
                    "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"
                      }
                    }
                  }
                },
                "order.additional_payment": {
                  "summary": "order.additional_payment",
                  "value": {
                    "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"
                      }
                    }
                  }
                },
                "payment.started": {
                  "summary": "payment.started",
                  "value": {
                    "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"
                      }
                    }
                  }
                },
                "payment.completed": {
                  "summary": "payment.completed",
                  "value": {
                    "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx within 10 seconds acknowledges the event."
          },
          "default": {
            "description": "Any other status, a redirect, or no answer within 10 seconds is a failed attempt, retried later with the same `X-Event-Id` and body."
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "RateLimitLimit": {
        "description": "Requests allowed per minute for the calling IP address (120), with or without an API key.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Requests left in the current one-minute window for the calling IP address.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitReset": {
        "description": "Seconds until the current window ends and the quota resets.",
        "schema": {
          "type": "integer"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying. Sent with `429 RATE_LIMITED` only.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key, sent as `Authorization: Bearer <key>`. Get it from the Telegram bot @fiat_to_crypto_bot (/newkey, in a private chat); the same reply carries the webhook signing secret. A new key replaces the previous one, which keeps working for 24 hours; /revoke in the bot stops a key at once."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable, machine-readable code. Branch on this, not on the message; handle an unknown code by its HTTP status.",
                "enum": [
                  "INVALID_REQUEST",
                  "INVALID_RECIPIENT_WALLET",
                  "WALLET_CONFLICT",
                  "PARTNER_PLATFORM_WALLET_CONFLICT",
                  "EMPTY_RECIPIENTS",
                  "INVALID_SHARES",
                  "TOO_MANY_RECIPIENTS",
                  "RECIPIENT_AMOUNT_TOO_LOW",
                  "AMOUNT_TOO_LOW",
                  "PARTNER_FEE_BELOW_GAS",
                  "INVALID_FEE_RATE",
                  "UNSUPPORTED_ASSET",
                  "CHECKOUT_UNAVAILABLE",
                  "UNAUTHORIZED",
                  "ORDER_NOT_FOUND",
                  "NOT_FOUND",
                  "IDEMPOTENCY_KEY_REUSED",
                  "REQUEST_IN_PROGRESS",
                  "ORDER_NOT_PAYABLE",
                  "PAYMENT_IN_PROGRESS",
                  "CURRENCY_NOT_SUPPORTED",
                  "AMOUNT_BELOW_MINIMUM",
                  "RATE_LIMITED",
                  "TOO_MANY_CHECKOUTS",
                  "EXCHANGE_RATE_UNAVAILABLE",
                  "PAYMENTS_UNAVAILABLE",
                  "PAYMENTS_BUSY",
                  "INTERNAL_ERROR"
                ]
              },
              "message": {
                "type": "string",
                "description": "Human-readable explanation, in English."
              },
              "details": {
                "type": "object",
                "properties": {
                  "issues": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "description": "The field, for example `sellerRecipients.1.wallet`."
                        },
                        "message": {
                          "type": "string",
                          "description": "What is wrong, in English."
                        }
                      },
                      "required": [
                        "path",
                        "message"
                      ]
                    },
                    "description": "On schema errors (`INVALID_REQUEST`): one entry per problem."
                  },
                  "field": {
                    "type": "string",
                    "description": "The field the error is about: `metadata`, `webhookUrl`, `checkout.payer` or `checkout.returnUrl` (`INVALID_REQUEST`); `sellerRecipients` or `partnerFee.recipients` (wallet errors)."
                  },
                  "reason": {
                    "type": "string",
                    "description": "Why: an English text for `INVALID_REQUEST`; for `INVALID_RECIPIENT_WALLET`, one of `malformed`, `not_checksummed`, `zero_address`, `token_contract`, `platform_wallet` or `order_wallet`."
                  },
                  "wallet": {
                    "type": "string",
                    "description": "The wallet the error is about (`INVALID_RECIPIENT_WALLET`, `WALLET_CONFLICT`, `RECIPIENT_AMOUNT_TOO_LOW`)."
                  },
                  "minimumTicket": {
                    "type": "string",
                    "description": "`AMOUNT_TOO_LOW` and `PARTNER_FEE_BELOW_GAS`: the smallest `deposit.amount` that would pass. Absent when no amount passes.",
                    "format": "decimal",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  },
                  "minimumRate": {
                    "type": "string",
                    "description": "`PARTNER_FEE_BELOW_GAS`: the smallest `partnerFee.rate` that would pass.",
                    "format": "decimal",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  },
                  "asset": {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "type": "string",
                        "description": "Stablecoin symbol.",
                        "enum": [
                          "USDC"
                        ]
                      },
                      "network": {
                        "type": "string",
                        "description": "Network the stablecoin travels on. See [supported assets](https://payfiattocrypto.com/en/docs#assets) for the valid pairs.",
                        "enum": [
                          "base"
                        ]
                      }
                    },
                    "required": [
                      "symbol",
                      "network"
                    ],
                    "description": "`CHECKOUT_UNAVAILABLE`: the asset and network that were sent."
                  }
                },
                "description": "Extra data for some codes. See [errors](https://payfiattocrypto.com/en/docs#errors)."
              }
            },
            "required": [
              "code",
              "message"
            ],
            "description": "Present on every non-2xx response."
          }
        },
        "required": [
          "error"
        ]
      },
      "AssetList": {
        "type": "object",
        "properties": {
          "assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string",
                  "description": "Stablecoin symbol.",
                  "enum": [
                    "USDC"
                  ]
                },
                "network": {
                  "type": "string",
                  "description": "Network id used in requests.",
                  "enum": [
                    "base"
                  ]
                },
                "name": {
                  "type": "string",
                  "description": "Display name."
                },
                "precision": {
                  "type": "integer",
                  "description": "Decimal places of the token contract."
                },
                "minTicketUsd": {
                  "type": "string",
                  "description": "The smallest `amount` of an order, in US dollars, in either fee mode. The effective minimum can be higher; see [minimums](https://payfiattocrypto.com/en/docs#minimums).",
                  "format": "decimal",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "sellerMinTicketUsd": {
                  "type": "string",
                  "description": "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](https://payfiattocrypto.com/en/docs#minimums).",
                  "format": "decimal",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "settlementSeconds": {
                  "type": "integer",
                  "description": "Typical time from the payment reaching the order wallet to the payout being final, on this network."
                },
                "settlementNote": {
                  "type": "string",
                  "description": "What `settlementSeconds` counts from."
                }
              },
              "required": [
                "symbol",
                "network",
                "name",
                "precision",
                "minTicketUsd",
                "settlementSeconds",
                "settlementNote"
              ]
            },
            "description": "One entry per stablecoin and network pair."
          }
        },
        "required": [
          "assets"
        ]
      },
      "CreateOrderRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "description": "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](https://payfiattocrypto.com/en/docs#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.",
            "format": "decimal",
            "pattern": "^\\d+(\\.\\d{1,6})?$"
          },
          "asset": {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string",
                "description": "Stablecoin symbol.",
                "enum": [
                  "USDC"
                ]
              },
              "network": {
                "type": "string",
                "description": "Network the stablecoin travels on. See [supported assets](https://payfiattocrypto.com/en/docs#assets) for the valid pairs.",
                "enum": [
                  "base"
                ]
              }
            },
            "required": [
              "symbol",
              "network"
            ],
            "additionalProperties": false,
            "description": "Stablecoin and network of every payout."
          },
          "feeMode": {
            "type": "string",
            "description": "Who pays the fees and, at the checkout, the MDR. See [fee modes](https://payfiattocrypto.com/en/docs#fee-modes) and [what the customer pays](https://payfiattocrypto.com/en/docs#checkout-pricing).",
            "enum": [
              "seller",
              "customer"
            ]
          },
          "sellerWallet": {
            "type": "string",
            "description": "The seller's wallet. Send exactly one of `sellerWallet` or `sellerRecipients`.",
            "format": "evm-address",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "sellerRecipients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "wallet": {
                  "type": "string",
                  "description": "Destination wallet, exactly as the wallet shows it (EIP-55 checksummed).",
                  "format": "evm-address",
                  "pattern": "^0x[0-9a-fA-F]{40}$"
                },
                "share": {
                  "type": "string",
                  "description": "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`.",
                  "format": "decimal",
                  "pattern": "^\\d+(\\.\\d+)?$"
                }
              },
              "required": [
                "wallet",
                "share"
              ],
              "additionalProperties": false
            },
            "description": "Split the seller's amount between up to 5 wallets. See [split payouts](https://payfiattocrypto.com/en/docs#split).",
            "minItems": 1,
            "maxItems": 5
          },
          "sellerNotify": {
            "type": "object",
            "properties": {
              "channel": {
                "type": "string",
                "description": "Notification channel.",
                "enum": [
                  "telegram"
                ]
              },
              "id": {
                "type": "string",
                "description": "Numeric Telegram chat id, never a `@username`: positive for a private chat, negative for a group, supergroup or channel. See [notifications](https://payfiattocrypto.com/en/docs#notifications).",
                "pattern": "^-?\\d+$"
              }
            },
            "required": [
              "channel",
              "id"
            ],
            "additionalProperties": false,
            "description": "Optional. Telegram chat that gets this order's messages for the seller: order created, payment received and payout sent."
          },
          "partnerFee": {
            "type": "object",
            "properties": {
              "rate": {
                "type": "string",
                "description": "Fraction of `deposit.amount`, for example `0.02` for 2%. The platform fee and this rate together must stay below 100%.",
                "format": "decimal",
                "pattern": "^\\d+(\\.\\d+)?$"
              },
              "wallet": {
                "type": "string",
                "description": "Your wallet. Send exactly one of `wallet` or `recipients`.",
                "format": "evm-address",
                "pattern": "^0x[0-9a-fA-F]{40}$"
              },
              "recipients": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "wallet": {
                      "type": "string",
                      "description": "Destination wallet, exactly as the wallet shows it (EIP-55 checksummed).",
                      "format": "evm-address",
                      "pattern": "^0x[0-9a-fA-F]{40}$"
                    },
                    "share": {
                      "type": "string",
                      "description": "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`.",
                      "format": "decimal",
                      "pattern": "^\\d+(\\.\\d+)?$"
                    }
                  },
                  "required": [
                    "wallet",
                    "share"
                  ],
                  "additionalProperties": false
                },
                "description": "Split your commission between up to 5 wallets.",
                "minItems": 1,
                "maxItems": 5
              },
              "notify": {
                "type": "object",
                "properties": {
                  "channel": {
                    "type": "string",
                    "description": "Notification channel.",
                    "enum": [
                      "telegram"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Numeric Telegram chat id, never a `@username`: positive for a private chat, negative for a group, supergroup or channel. See [notifications](https://payfiattocrypto.com/en/docs#notifications).",
                    "pattern": "^-?\\d+$"
                  }
                },
                "required": [
                  "channel",
                  "id"
                ],
                "additionalProperties": false,
                "description": "Optional. Telegram chat that gets this order's messages for you."
              }
            },
            "required": [
              "rate"
            ],
            "additionalProperties": false,
            "allOf": [
              {
                "oneOf": [
                  {
                    "required": [
                      "wallet"
                    ]
                  },
                  {
                    "required": [
                      "recipients"
                    ]
                  }
                ]
              }
            ],
            "description": "Your commission on this order, paid to your wallet(s) on every order."
          },
          "checkout": {
            "type": "object",
            "properties": {
              "payer": {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "description": "The currency the customer pays in: `USD` (the default) or `EUR`; lowercase is accepted. Anything else returns `400 INVALID_REQUEST`.",
                    "enum": [
                      "USD",
                      "EUR"
                    ]
                  }
                },
                "additionalProperties": false,
                "description": "Optional. What you already know about the customer."
              },
              "returnUrl": {
                "type": "string",
                "description": "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](https://payfiattocrypto.com/en/docs#checkout-options).",
                "format": "uri",
                "pattern": "^https://",
                "maxLength": 2048
              }
            },
            "additionalProperties": false,
            "description": "Optional checkout options. Only for USDC on Base; see [checkout](https://payfiattocrypto.com/en/docs#checkout)."
          },
          "webhookUrl": {
            "type": "string",
            "description": "Optional. HTTPS URL that receives this order's events: port 443 or 8443, on a public host. See [webhooks](https://payfiattocrypto.com/en/docs#webhooks).",
            "format": "uri",
            "pattern": "^https://",
            "maxLength": 2048
          },
          "metadata": {
            "type": "object",
            "description": "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."
          }
        },
        "required": [
          "amount",
          "asset",
          "feeMode",
          "partnerFee"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "oneOf": [
              {
                "required": [
                  "sellerWallet"
                ]
              },
              {
                "required": [
                  "sellerRecipients"
                ]
              }
            ]
          }
        ]
      },
      "Order": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "description": "The order id. Use it in `GET /v1/orders/{orderId}`.",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "description": "Current status. See [order lifecycle](https://payfiattocrypto.com/en/docs#lifecycle).",
            "enum": [
              "created",
              "received",
              "settling",
              "settled",
              "settle_failed",
              "expired"
            ]
          },
          "deposit": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "description": "The order's own wallet. Customers who pay in crypto send the stablecoin here; checkout payments are delivered here too. Never reused.",
                "format": "evm-address",
                "pattern": "^0x[0-9a-fA-F]{40}$"
              },
              "amount": {
                "type": "string",
                "description": "Exactly how much of the stablecoin must reach the order wallet. The fees in `breakdown` come out of it.",
                "format": "decimal",
                "pattern": "^\\d+(\\.\\d+)?$"
              },
              "asset": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "description": "Stablecoin symbol.",
                    "enum": [
                      "USDC"
                    ]
                  },
                  "network": {
                    "type": "string",
                    "description": "Network the stablecoin travels on. See [supported assets](https://payfiattocrypto.com/en/docs#assets) for the valid pairs.",
                    "enum": [
                      "base"
                    ]
                  },
                  "contractAddress": {
                    "type": "string",
                    "description": "The token contract. Only transfers of this contract count as payment.",
                    "format": "evm-address",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  }
                },
                "required": [
                  "symbol",
                  "network",
                  "contractAddress"
                ],
                "description": "Stablecoin and network of the deposit and of every payout."
              }
            },
            "required": [
              "address",
              "amount",
              "asset"
            ],
            "description": "The order's own wallet and how much must reach it."
          },
          "breakdown": {
            "type": "object",
            "properties": {
              "sellerReceives": {
                "type": "string",
                "description": "Net amount for the seller (all seller wallets together), after the network fee of the seller's own transfers.",
                "format": "decimal",
                "pattern": "^\\d+(\\.\\d+)?$"
              },
              "platformFee": {
                "type": "string",
                "description": "Platform fee: 1% of `deposit.amount`.",
                "format": "decimal",
                "pattern": "^\\d+(\\.\\d+)?$"
              },
              "partnerFee": {
                "type": "string",
                "description": "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`.",
                "format": "decimal",
                "pattern": "^\\d+(\\.\\d+)?$"
              },
              "partnerReceives": {
                "type": "string",
                "description": "What your wallet(s) actually receive, all together: `partnerFee` minus the network fee of your own transfers, which is already counted in `networkFee`.",
                "format": "decimal",
                "pattern": "^\\d+(\\.\\d+)?$"
              },
              "networkFee": {
                "type": "string",
                "description": "Network fee of every payout transfer on this order: the seller's and yours.",
                "format": "decimal",
                "pattern": "^\\d+(\\.\\d+)?$"
              }
            },
            "required": [
              "sellerReceives",
              "platformFee",
              "partnerFee",
              "partnerReceives",
              "networkFee"
            ],
            "description": "How the deposit is split: `sellerReceives` + `platformFee` + `partnerReceives` + `networkFee` = `deposit.amount`. See [fees](https://payfiattocrypto.com/en/docs#fees)."
          },
          "checkout": {
            "type": "object",
            "properties": {
              "token": {
                "type": "string",
                "description": "Identifies the checkout. The hosted page and the widget use it; it only lets someone see the amount and pay.",
                "pattern": "^[A-Za-z0-9_-]{32}$"
              },
              "url": {
                "type": "string",
                "description": "The hosted checkout page. Send the customer to this exact URL. Always present when the order has a `checkout`.",
                "format": "uri"
              },
              "embedUrl": {
                "type": "string",
                "description": "The same page for an `iframe` on your site (widget). Always present when the order has a `checkout`.",
                "format": "uri"
              },
              "feeMode": {
                "type": "string",
                "description": "Who pays the MDR: the order's `feeMode`.",
                "enum": [
                  "seller",
                  "customer"
                ]
              },
              "payer": {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "description": "The currency the customer pays in: `USD` (the default) or `EUR`; lowercase is accepted. Anything else returns `400 INVALID_REQUEST`.",
                    "enum": [
                      "USD",
                      "EUR"
                    ]
                  }
                },
                "description": "What you told us about the customer."
              },
              "returnUrl": {
                "type": "string",
                "description": "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](https://payfiattocrypto.com/en/docs#checkout-options).",
                "format": "uri",
                "pattern": "^https://",
                "maxLength": 2048
              }
            },
            "required": [
              "token",
              "url",
              "embedUrl",
              "feeMode"
            ],
            "description": "Only on orders that can be paid by card, bank or digital wallet (USDC on Base). See [checkout](https://payfiattocrypto.com/en/docs#checkout)."
          },
          "webhookUrl": {
            "type": "string",
            "description": "The `webhookUrl` sent when the order was created. Absent when none was sent.",
            "format": "uri"
          },
          "metadata": {
            "type": "object",
            "description": "The `metadata` sent when the order was created. Absent when none was sent."
          },
          "parentOrderId": {
            "type": "string",
            "description": "Only on a derived order: the order the customer paid again, or paid after it expired. See [derived orders](https://payfiattocrypto.com/en/docs#derived-orders).",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "description": "Creation time, ISO 8601 in UTC. The order expires 7 days later, and card and bank payments close 12 hours before that.",
            "format": "date-time"
          }
        },
        "required": [
          "orderId",
          "status",
          "deposit",
          "breakdown",
          "createdAt"
        ]
      },
      "OrderList": {
        "type": "object",
        "properties": {
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            },
            "description": "Orders on this page."
          },
          "nextCursor": {
            "type": "string",
            "description": "Opaque cursor for the next page. Absent on the last page."
          }
        },
        "required": [
          "orders"
        ]
      },
      "CheckoutOffers": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "description": "The currency of every amount.",
            "enum": [
              "USD",
              "EUR"
            ]
          },
          "offers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "amount": {
                  "type": "string",
                  "description": "What the customer pays, in `currency`.",
                  "format": "decimal",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "currency": {
                  "type": "string",
                  "description": "Currency of `amount`.",
                  "enum": [
                    "USD",
                    "EUR"
                  ]
                },
                "orderAmount": {
                  "type": "string",
                  "description": "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`.",
                  "format": "decimal",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "fee": {
                  "type": "string",
                  "description": "All the fees the customer covers: `serviceFee` + `processorFee` = `amount` − `orderAmount`. `0.00` when the order's `feeMode` is `seller`.",
                  "format": "decimal",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "serviceFee": {
                  "type": "string",
                  "description": "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`.",
                  "format": "decimal",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "processorFee": {
                  "type": "string",
                  "description": "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](https://payfiattocrypto.com/en/docs#amount-differences).",
                  "format": "decimal",
                  "pattern": "^\\d+(\\.\\d+)?$"
                }
              },
              "required": [
                "amount",
                "currency",
                "orderAmount",
                "fee",
                "serviceFee",
                "processorFee"
              ]
            },
            "description": "The offer: one, or none when the amount is below the minimum.",
            "maxItems": 1
          }
        },
        "required": [
          "currency",
          "offers"
        ]
      },
      "CreateCheckoutRequest": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "description": "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`.",
            "enum": [
              "USD",
              "EUR"
            ]
          }
        },
        "additionalProperties": false
      },
      "CheckoutLink": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "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.",
            "format": "uri"
          },
          "amount": {
            "type": "string",
            "description": "What the customer pays, in `currency`.",
            "format": "decimal",
            "pattern": "^\\d+(\\.\\d+)?$"
          },
          "currency": {
            "type": "string",
            "description": "Currency of `amount`.",
            "enum": [
              "USD",
              "EUR"
            ]
          },
          "orderAmount": {
            "type": "string",
            "description": "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`.",
            "format": "decimal",
            "pattern": "^\\d+(\\.\\d+)?$"
          },
          "fee": {
            "type": "string",
            "description": "All the fees the customer covers: `serviceFee` + `processorFee` = `amount` − `orderAmount`. `0.00` when the order's `feeMode` is `seller`.",
            "format": "decimal",
            "pattern": "^\\d+(\\.\\d+)?$"
          },
          "serviceFee": {
            "type": "string",
            "description": "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`.",
            "format": "decimal",
            "pattern": "^\\d+(\\.\\d+)?$"
          },
          "processorFee": {
            "type": "string",
            "description": "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](https://payfiattocrypto.com/en/docs#amount-differences).",
            "format": "decimal",
            "pattern": "^\\d+(\\.\\d+)?$"
          }
        },
        "required": [
          "url",
          "amount",
          "currency",
          "orderAmount",
          "fee",
          "serviceFee",
          "processorFee"
        ]
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Event id, the same as in `X-Event-Id` and on every retry."
          },
          "event": {
            "type": "string",
            "description": "Event type. See [events](https://payfiattocrypto.com/en/docs#webhook-events).",
            "enum": [
              "order.received",
              "order.settled",
              "order.settle_failed",
              "order.expired",
              "order.additional_payment",
              "payment.started",
              "payment.completed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "description": "When the event happened, ISO 8601 in UTC.",
            "format": "date-time"
          },
          "orderId": {
            "type": "string",
            "description": "The order this event is about.",
            "format": "uuid"
          },
          "data": {
            "type": "object",
            "properties": {
              "order": {
                "$ref": "#/components/schemas/Order",
                "description": "The order when the event was created, in the same shape as in [`GET /v1/orders/{orderId}`](https://payfiattocrypto.com/en/docs/reference#get-order)."
              },
              "payment": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The payment's id. A customer who pays again starts another payment. A [derived order](https://payfiattocrypto.com/en/docs#derived-orders) takes the id of the payment it pays out.",
                    "format": "uuid"
                  },
                  "amount": {
                    "type": "string",
                    "description": "What the customer pays, in their currency, as a decimal string: the amount the payment was opened for, the same on `payment.started` and `payment.completed`.",
                    "format": "decimal",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  },
                  "currency": {
                    "type": "string",
                    "description": "Currency the customer pays in, as an ISO 4217 code, for example `EUR`.",
                    "pattern": "^[A-Z]{3}$"
                  }
                },
                "required": [
                  "id",
                  "amount",
                  "currency"
                ],
                "description": "Present on `payment.started` and `payment.completed` only, absent on every `order.*` event: the payment on the payment page."
              }
            },
            "required": [
              "order"
            ],
            "description": "What the event is about."
          }
        },
        "required": [
          "id",
          "event",
          "occurredAt",
          "orderId",
          "data"
        ]
      }
    }
  }
}