> ## Documentation Index
> Fetch the complete documentation index at: https://partners.elementpay.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a partner order quote

> Create a binding quote for a fiat ↔ crypto order. **Flow:** create a quote → show the returned amounts and payment instructions to the user → accept the `quote_id` with `POST /partner/orders/{quote_id}/accept`. **Discovery before quote:** - `GET /partner/catalog` or `GET /partner/payment-methods` → rails for the corridor. - `GET /partner/catalog?order_type=OnRamp|OffRamp` → `providers[].id` for momo/bank. - `GET /partner/order-requirements` → exact field names (`network_id` required for momo/bank). - `GET /partner/banks` → bank institution UUIDs where applicable. **Payment method by rail:** - **`mobile_money`**: `payment_method.type=mobile_money`, `payment_method.phone_number` (E.164), and `payment_method.network_id` (UUID from catalog `providers[].id`). - **`bank`**: `payment_method.type=bank`, `account_number`, `account_name`, and `payment_method.network_id` (from `GET /partner/banks` or catalog). **OnRamp response** includes `payment_instructions` — show these to the user before accept. `provider` is optional. When omitted, ElementPay auto-routes by corridor. **Quote id formats:** `yc_receive_<id>` (OnRamp), `yc_send_<id>` (OffRamp). The quote expires at `data.expires_at`.

Create a binding quote for a fiat ↔ crypto order.

<Steps>
  <Step title="Create quote">
    `POST` with corridor, customer, and payment method details.
  </Step>

  <Step title="Show pricing">
    Display returned amounts and **payment instructions** to the user (OnRamp).
  </Step>

  <Step title="Accept">
    [`POST /partner/orders/{quote_id}/accept`](/partner/orders/\{quote_id}/accept) when the user confirms.
  </Step>
</Steps>

### Discovery before quote

* [`GET /partner/catalog`](/partner/catalog) or [`GET /partner/payment-methods`](/partner/payment-methods) → rails for the corridor
* [`GET /partner/catalog?order_type=OnRamp`](/partner/catalog) or `OffRamp` → `providers[].id` for momo/bank
* [`GET /partner/order-requirements`](/partner/order-requirements) → exact field names (`network_id` required for momo/bank)
* [`GET /partner/banks`](/partner/banks) → bank institution UUIDs where applicable

### Payment method by rail

**`mobile_money`**

* `payment_method.type=mobile_money`
* `payment_method.phone_number` (E.164)
* `payment_method.network_id` (UUID from catalog `providers[].id`)

**`bank`**

* `payment_method.type=bank`
* `account_number`, `account_name`
* `payment_method.network_id` (from [`GET /partner/banks`](/partner/banks) or catalog)

`provider` is optional — when omitted, ElementPay auto-routes by corridor.

### Quote IDs

* OnRamp: `yc_receive_<id>`
* OffRamp: `yc_send_<id>`

The quote expires at `data.expires_at`.


## OpenAPI

````yaml /api-reference/openapi.json post /partner/orders/quote
openapi: 3.1.0
info:
  title: Element Pay Partner API
  description: >-
    Provider-neutral fiat ↔ crypto ramps for partners. Discover corridors,
    create a binding quote, accept it, and receive webhooks. African local fiat
    (mobile money and bank) is auto-routed by corridor.
  version: 1.0.0
servers:
  - url: https://sandbox.elementpay.net/api/v1
    description: Sandbox
security:
  - APIKeyHeader: []
tags:
  - name: partner
    description: >-
      Corridor discovery, indicative rates, binding quotes, and order acceptance
      (including account currency conversion).
    x-group: Partner
  - name: partner-customers
    description: >-
      Vault KYC: requirements, create, list, get/update, documents, and submit
      (pcus_*).
    x-group: Customers
  - name: partner-customer-accounts
    description: >-
      Customer accounts and funding: open/list/get rails, deposit instructions,
      stablecoin sends, and same-currency fiat book transfers.
    x-group: Customer accounts
paths:
  /partner/orders/quote:
    post:
      tags:
        - partner
      summary: Create a partner order quote
      description: >-
        Create a binding quote for a fiat ↔ crypto order. **Flow:** create a
        quote → show the returned amounts and payment instructions to the user →
        accept the `quote_id` with `POST /partner/orders/{quote_id}/accept`.
        **Discovery before quote:** - `GET /partner/catalog` or `GET
        /partner/payment-methods` → rails for the corridor. - `GET
        /partner/catalog?order_type=OnRamp|OffRamp` → `providers[].id` for
        momo/bank. - `GET /partner/order-requirements` → exact field names
        (`network_id` required for momo/bank). - `GET /partner/banks` → bank
        institution UUIDs where applicable. **Payment method by rail:** -
        **`mobile_money`**: `payment_method.type=mobile_money`,
        `payment_method.phone_number` (E.164), and `payment_method.network_id`
        (UUID from catalog `providers[].id`). - **`bank`**:
        `payment_method.type=bank`, `account_number`, `account_name`, and
        `payment_method.network_id` (from `GET /partner/banks` or catalog).
        **OnRamp response** includes `payment_instructions` — show these to the
        user before accept. `provider` is optional. When omitted, ElementPay
        auto-routes by corridor. **Quote id formats:** `yc_receive_<id>`
        (OnRamp), `yc_send_<id>` (OffRamp). The quote expires at
        `data.expires_at`.
      operationId: partner_order_quote_partner_orders_quote_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerOrderQuoteRequest'
            examples:
              ke_onramp_local_fiat_success:
                summary: KE OnRamp via local fiat rail
                description: >-
                  Customer pays KES by M-PESA and receives the requested
                  stablecoin/network.
                value:
                  order_type: OnRamp
                  currency: KES
                  country: KE
                  local_amount: 800
                  asset:
                    token: '0x833589fcd6edb6e08f4c7c32d4f71b54bdA02913'
                    currency: USDC
                    network: BASE
                  customer:
                    uid: sandbox-ke-onramp-success-001
                    type: user
                    name: Successful Jane Customer
                    country: KE
                    phone: '+2541111111111'
                    address: Nairobi
                    dob: 02/01/1997
                    email: jane@example.com
                    id_number: A1234567
                    id_type: passport
                  payment_method:
                    type: mobile_money
                    phone_number: '+2541111111111'
                    network_id: 7ea6df5c-6bba-46b2-a7e6-f511959e7edb
                  wallet_address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
              ke_onramp_local_fiat_failure:
                summary: KE OnRamp sandbox failure
                description: Sandbox failure case using failure test identity/phone.
                value:
                  rail: local_fiat
                  order_type: OnRamp
                  currency: KES
                  country: KE
                  local_amount: 800
                  asset:
                    token: '0x833589fcd6edb6e08f4c7c32d4f71b54bdA02913'
                    currency: USDC
                    network: BASE
                  customer:
                    uid: sandbox-ke-onramp-failure-001
                    type: user
                    name: Failure Jane Customer
                    country: KE
                    phone: '+2540000000000'
                    address: Nairobi
                    dob: 02/01/1997
                    email: jane@example.com
                    id_number: A1234567
                    id_type: passport
                  payment_method:
                    type: mobile_money
                    phone_number: '+2540000000000'
                    network_id: 7ea6df5c-6bba-46b2-a7e6-f511959e7edb
                    account_name: Failure Jane Customer
                  wallet_address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
              ke_offramp_local_fiat:
                summary: KE OffRamp via local fiat rail (mobile money)
                description: Customer sends Polygon USDT and receives KES by M-PESA.
                value:
                  rail: local_fiat
                  order_type: OffRamp
                  currency: KES
                  country: KE
                  crypto_amount: 20
                  asset:
                    token: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                    currency: USDT
                    network: POLYGON
                  refund_address: '0x3333333333333333333333333333333333333333'
                  customer:
                    uid: sandbox-ke-offramp-success-001
                    type: user
                    name: Successful Jane Customer
                    country: KE
                    phone: '+254712345678'
                    address: Nairobi
                    dob: 02/01/1997
                    email: jane@example.com
                    idNumber: A1234567
                    idType: passport
                  payment_method:
                    type: mobile_money
                    phone_number: '+2541111111111'
                    network_id: 7ea6df5c-6bba-46b2-a7e6-f511959e7edb
                    account_name: Successful Jane Customer
              ng_onramp_bank:
                summary: NG OnRamp — bank transfer (network_id required)
                description: >-
                  Customer pays NGN by bank transfer and receives USDC.
                  `payment_method.network_id` is the UUID from `GET
                  /partner/banks` or catalog (e.g. Access Bank). The quote
                  response includes `payment_instructions` with the account the
                  customer must transfer to.
                value:
                  order_type: OnRamp
                  currency: NGN
                  country: NG
                  local_amount: 5000
                  asset:
                    token: '0x833589fcd6edb6e08f4c7c32d4f71b54bdA02913'
                    currency: USDC
                    network: BASE
                  customer:
                    uid: sandbox-ng-bank-onramp-001
                    type: user
                    name: John Doe
                    country: NG
                    phone: '+2348012345678'
                    address: Lagos
                    dob: 01/01/1990
                    email: john@example.com
                    id_number: A1234567
                    id_type: passport
                    additional_id_number: '12345678901'
                    additional_id_type: bvn
                  payment_method:
                    type: bank
                    account_number: '0123456789'
                    account_name: John Doe
                    network_id: 5f1af11b-305f-4420-8fce-65ed2725a409
                  wallet_address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
              ng_offramp_bank:
                summary: NG OffRamp — bank payout (network_id required)
                description: >-
                  Customer sends USDC and receives NGN to their bank account.
                  `payment_method.network_id` is the UUID from `GET
                  /partner/banks` or catalog for the destination bank (e.g.
                  Access Bank = `5f1af11b-305f-4420-8fce-65ed2725a409`).
                value:
                  order_type: OffRamp
                  currency: NGN
                  country: NG
                  crypto_amount: 20
                  asset:
                    token: '0x833589fcd6edb6e08f4c7c32d4f71b54bdA02913'
                    currency: USDC
                    network: BASE
                  refund_address: '0x3333333333333333333333333333333333333333'
                  customer:
                    uid: sandbox-ng-bank-offramp-001
                    type: user
                    name: John Doe
                    country: NG
                    phone: '+2348012345678'
                    address: Lagos
                    dob: 01/01/1990
                    email: john@example.com
                    id_number: A1234567
                    id_type: passport
                    additional_id_number: '12345678901'
                    additional_id_type: bvn
                  payment_method:
                    type: bank
                    account_number: '0123456789'
                    account_name: John Doe
                    network_id: 5f1af11b-305f-4420-8fce-65ed2725a409
              ke_offramp_institution_bank:
                summary: KE OffRamp — institution (B2B) bank payout
                description: >-
                  Institution OffRamp: same quote shape as retail; required
                  customer fields are uid, business_name, business_id, and email
                  (no DOB / national ID / personal name). business_id is the
                  legal registration or tax id of the paying business — not an
                  Element Pay console id. Bank payee is
                  payment_method.account_name + account_number + network_id
                  (payee may be a different company). Sandbox: include
                  Successful in customer.business_name for auto-credit (do not
                  send on-chain). network_id example is National Bank of Kenya
                  from sandbox catalog.
                value:
                  order_type: OffRamp
                  customer_type: institution
                  currency: KES
                  country: KE
                  crypto_amount: 20
                  asset:
                    token: '0x833589fcd6edb6e08f4c7c32d4f71b54bdA02913'
                    currency: USDC
                    network: BASE
                  refund_address: '0xE1E4E1E4E1E4E1E4E1E4E1E4E1E4E1E4E1E4E1E4'
                  customer:
                    uid: sandbox-ke-inst-offramp-001
                    type: institution
                    business_name: Successful Acme Trading Ltd
                    business_id: PVT-1234567A
                    email: treasury@acme-trading.example
                  payment_method:
                    type: bank
                    account_number: '1111111111'
                    account_name: Acme Payee Holdings Ltd
                    network_id: 30f11b2e-0905-4c09-ba5f-d05aa4e4a11c
        required: true
      responses:
        '200':
          description: Partner order quote created
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Partner order quote created
                data:
                  quote_id: yc_receive_580e04c2-a136-5cca-be54-b49fcf80970c
                  rail: local_fiat
                  status: process
                  order_type: OnRamp
                  route:
                    family: ramp_provider
                    rail: local_fiat
                    direction: payin
                    mode: auto
                    reason: Auto-routed for KE KES OnRamp.
                  expires_at: '2026-05-16T08:13:40.322Z'
                  amounts:
                    rate: 131.69
                    rate_currency: KES
                    user_pays:
                      amount: 800
                      currency: KES
                    user_receives:
                      amount: 5.94999132
                      currency: USDC
                      network: BASE
                    fees:
                      network_fee_usd: 0
                      network_fee_local: 0
                      service_fee_usd: 0.12
                      service_fee_local: 16
                      partner_fee_usd: 0
                      partner_fee_local: 0
                  instructions:
                    available_after_accept: true
                    note: >-
                      Accept this quote to create the local order and receive
                      final payment instructions.
                  audit:
                    rail: local_fiat
                    provider_quote_id: 580e04c2-a136-5cca-be54-b49fcf80970c
                    direction: payin
                    token_symbol: BASE_USDC
                    crypto_currency: USDC
                    crypto_network: BASE
        '400':
          description: Unsupported provider or rail resolution failed
          content:
            application/json:
              example:
                status: error
                message: elementpay partner order routing is not enabled yet
                data:
                  route:
                    family: native
                    direction: payin
                    mode: override
                    reason: 'Provider override requested: rail.'
                    rail: native
        '422':
          description: Validation error
          content:
            application/json:
              example:
                status: error
                message: Missing requirements for selected route
                data:
                  missing_fields:
                    - wallet_address
                    - recipient or customer
                    - source or payment_method
                  route:
                    family: ramp_provider
                    direction: payin
                    mode: auto
                    reason: Selected rail for KE KES OnRamp.
                    rail: local_fiat
        '502':
          description: Provider rejected request or upstream unavailable
          content:
            application/json:
              examples:
                local_fiat_ng_sandbox_500:
                  summary: local fiat rail sandbox upstream 500
                  value:
                    status: error
                    message: Quote request failed
                    data: null
              example:
                status: error
                message: Quote request failed
                data: null
      security:
        - APIKeyHeader: []
components:
  schemas:
    PartnerOrderQuoteRequest:
      properties:
        provider:
          anyOf:
            - type: string
              enum:
                - local fiat rail
                - international bank
                - elementpay
                - native
            - type: 'null'
          title: Provider
          description: >-
            Optional route override. Omit for ElementPay auto-routing. Use
            `elementpay` for native on-chain routes; `local fiat rail` and
            `international bank` for ramp providers.
        order_type:
          enum:
            - OnRamp
            - OffRamp
            - onramp
            - offramp
            - 0
            - 1
          title: Order Type
          description: OnRamp/0 = fiat to crypto. OffRamp/1 = crypto to fiat.
        token:
          anyOf:
            - type: string
            - type: 'null'
          title: Token
          description: >-
            Token contract address or route token hint. local fiat rail
            currently requires Base USDC or Polygon USDT address.
        channel_id:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Channel Id
        channel_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel Type
        sequence_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Sequence Id
        currency:
          anyOf:
            - type: string
              maxLength: 3
              minLength: 3
            - type: 'null'
          title: Currency
        country:
          anyOf:
            - type: string
              maxLength: 2
              minLength: 2
            - type: 'null'
          title: Country
        reason:
          type: string
          title: Reason
          default: other
        customer_uid:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Uid
        customer_type:
          type: string
          enum:
            - retail
            - institution
          title: Customer Type
          default: retail
        asset:
          anyOf:
            - type: object
            - type: 'null'
          title: Asset
          description: >-
            Canonical crypto asset block. Use `token` for contract-address based
            routes and `currency` + `network` for provider currency routes.
        subject_type:
          anyOf:
            - type: string
              enum:
                - user
                - organization
            - type: 'null'
          title: Subject Type
          description: >-
            Stable subject type for providers that require pre-approved PSP
            customer links (for example international bank USD/EUR IBAN payins).
        subject_id:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Subject Id
          description: >-
            Stable subject id used to resolve provider approval/onboarding
            state.
        crypto_currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Crypto Currency
          description: >-
            Provider crypto currency hint, e.g. USDC or USDC_TEST for
            international bank.
        crypto_network:
          anyOf:
            - type: string
            - type: 'null'
          title: Crypto Network
          description: >-
            Provider network hint, e.g. Base or PolygonTestAmoy for
            international bank.
        amount:
          anyOf:
            - type: number
            - type: string
            - type: 'null'
          title: Amount
        local_amount:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Local Amount
        fiat_amount:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Fiat Amount
        crypto_amount:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: string
            - type: 'null'
          title: Crypto Amount
        customer:
          anyOf:
            - type: object
            - type: 'null'
          title: Customer
          description: >-
            Provider-neutral customer details. Retail: personal KYC fields
            (name, dob, id_number, …). Institution (`type: institution` with
            top-level `customer_type: institution`): `uid`, `business_name`,
            `business_id` (legal registration/tax id of the paying business),
            and `email` — no DOB / national ID / personal name. Used to derive
            provider party details when provider-specific fields are omitted.
        payment_method:
          anyOf:
            - type: object
            - type: 'null'
          title: Payment Method
          description: >-
            Provider-neutral fiat rail. For ``type: mobile_money`` use
            ``phone_number`` (MSISDN) and ``network_id`` (institution UUID from
            catalog ``providers[].id``). For ``type: bank`` use
            ``account_number``, ``account_name``, and ``network_id`` (UUID from
            ``GET /banks`` or catalog). Do not use top-level legacy fields.
        recipient:
          anyOf:
            - type: object
            - type: 'null'
          title: Recipient
        source:
          anyOf:
            - type: object
            - type: 'null'
          title: Source
        sender:
          anyOf:
            - type: object
            - type: 'null'
          title: Sender
        destination:
          anyOf:
            - type: object
            - type: 'null'
          title: Destination
        wallet_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Wallet Address
        wallet_tag:
          anyOf:
            - type: string
            - type: 'null'
          title: Wallet Tag
        refund_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Refund Address
        sender_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Sender Address
        refund_to_source_address:
          type: boolean
          title: Refund To Source Address
          default: false
        redirect_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Redirect Url
      type: object
      required:
        - order_type
      title: PartnerOrderQuoteRequest
      description: >-
        Generic partner quote request for the `quote -> accept -> webhook` flow.
        `provider` is optional. When omitted, the partner order router selects
        the route from country, currency, order type, payment method, asset, and
        amount. New partner integrations should use the canonical `asset`,
        `customer`, and `payment_method` blocks. For local fiat rail momo/bank,
        ``payment_method.network_id`` is required (catalog or ``GET /banks``).
        For mobile money MSISDN, use ``payment_method.phone_number`` only — do
        not fall back to ``customer.phone``. Legacy provider-specific blocks
        (``destination``, etc.) are still accepted and mapped to the canonical
        request fields.
      examples:
        - asset:
            currency: USDC
            network: BASE
            token: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
          country: KE
          currency: KES
          customer:
            address: Nairobi
            country: KE
            dob: 02/01/1997
            email: jane@example.com
            id_number: A1234567
            id_type: passport
            name: Successful Jane Customer
            phone: '+2541111111111'
            type: user
            uid: sandbox-ke-onramp-success-001
          local_amount: 800
          order_type: OnRamp
          payment_method:
            network_id: 7ea6df5c-6bba-46b2-a7e6-f511959e7edb
            phone_number: '+2541111111111'
            type: mobile_money
          wallet_address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
        - asset:
            currency: USDT
            network: POLYGON
            token: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
          country: KE
          crypto_amount: 20
          currency: KES
          customer:
            address: Nairobi
            country: KE
            dob: 02/01/1997
            email: jane@example.com
            idNumber: A1234567
            idType: passport
            name: Successful Jane Customer
            phone: '+254712345678'
            type: user
            uid: sandbox-ke-offramp-success-001
          order_type: OffRamp
          payment_method:
            account_name: Successful Jane Customer
            network_id: 7ea6df5c-6bba-46b2-a7e6-f511959e7edb
            phone_number: '+2541111111111'
            type: mobile_money
          rail: local_fiat
          refund_address: '0x3333333333333333333333333333333333333333'
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````