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

# Pay escrow (buy)

> Fund an escrow (works for standard and milestone escrows; a milestone escrow is funded in full here). The amount charged is the escrow amount plus the buyer's fee share. `escrowDetails.escrowId` may be an array to fund multiple escrows. Requires the `customer-id` header (the buyer).



## OpenAPI

````yaml openapi.json POST /v1/payment/escrow
openapi: 3.0.3
info:
  title: Payluk ThirdParty API
  version: 1.0.0
  description: >-
    Merchant / Business API for the Payluk escrow and payments platform.


    All routes are mounted under `/v1` and authenticated with a secret key.
    Every response uses the standard envelope `{ status, message, data }`.
  contact:
    name: Payluk Developer Support
    email: support@payluk.ng
    url: https://payluk.ng
servers:
  - url: https://staging.api.payluk.ng
    description: 'Staging: use sk_test_ keys here for safe testing'
  - url: https://api.payluk.ng
    description: 'Production: use sk_live_ keys'
security:
  - bearerAuth: []
tags:
  - name: Escrow
    description: Create and manage standard escrow payment links.
  - name: Milestone Escrow
    description: Escrows that release funds in parts as milestones are confirmed.
  - name: Vault Escrow
    description: >-
      Merchant-only pooled-stake escrows: customers stake from their wallets and
      the merchant declares the winner.
  - name: Categories
    description: Organise escrows into merchant-defined categories.
  - name: Merchant Customers
    description: Manage the buyers and sellers that transact under your merchant account.
  - name: Disputes
    description: Confirm deliveries, raise disputes and resolve them.
  - name: Payments
    description: Fund wallets and escrows, verify references and manage payout details.
  - name: Debit Cards
    description: List and remove customers' saved debit cards.
  - name: Crypto Whitelist
    description: Manage whitelisted crypto withdrawal addresses.
  - name: Misc
    description: Supporting reference data.
paths:
  /v1/payment/escrow:
    post:
      tags:
        - Payments
      summary: Pay escrow (buy)
      description: >-
        Fund an escrow (works for standard and milestone escrows; a milestone
        escrow is funded in full here). The amount charged is the escrow amount
        plus the buyer's fee share. `escrowDetails.escrowId` may be an array to
        fund multiple escrows. Requires the `customer-id` header (the buyer).
      operationId: payEscrow
      parameters:
        - $ref: '#/components/parameters/CustomerIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
                - reference
                - transactionType
                - escrowDetails
              properties:
                amount:
                  type: number
                  minimum: 1000
                  description: >-
                    Total amount to charge the buyer. Must equal the escrow
                    amount plus the buyer's fee share, otherwise the request is
                    rejected with "Amount mismatch".
                  example: 10503.75
                reference:
                  type: string
                  description: Your unique reference for this payment.
                  example: ESC_REF_98765
                transactionType:
                  type: string
                  enum:
                    - escrow
                  default: escrow
                  example: escrow
                gateway:
                  type: string
                  enum:
                    - card
                    - wallet
                  default: card
                  description: >-
                    Funding source. 'wallet' debits the buyer's Payluk wallet,
                    'card' charges a debit card.
                  example: wallet
                cardId:
                  type: string
                  description: >-
                    Saved card identifier. Only used when gateway is 'card' and
                    paying with an existing saved card.
                currency:
                  type: string
                  default: NGN
                  description: Optional. Defaults to NGN.
                escrowDetails:
                  type: object
                  required:
                    - escrowId
                  properties:
                    escrowId:
                      type: string
                      description: The ID of the escrow to fund.
                      example: 665f1b2c9a1e4d0012ab3c10
            examples:
              wallet:
                summary: Fund an escrow from wallet
                value:
                  amount: 10503.75
                  reference: ESC_REF_98765
                  transactionType: escrow
                  gateway: wallet
                  escrowDetails:
                    escrowId: 665f1b2c9a1e4d0012ab3c10
              card:
                summary: Fund an escrow with a saved card
                value:
                  amount: 10503.75
                  reference: ESC_REF_98765
                  transactionType: escrow
                  gateway: card
                  cardId: 6931a06f41d1b69f94b1c617
                  escrowDetails:
                    escrowId: 665f1b2c9a1e4d0012ab3c10
      responses:
        '200':
          description: Escrow funded.
          content:
            application/json:
              example:
                status: 200
                message: Payment intent verified successfully
                data:
                  id: 6a3cdafd734e96016b22736b
                  amount: 1030
                  reference: rthyjyutj
                  fee: 0
                  transactionType: escrow
                  currency: NGN
                  transferDetails: null
                  cardId: null
                  walletDetails: null
                  blockchainDetails: null
                  withdrawalDetails: null
                  escrowDetails:
                    beneficiary:
                      name: firsty fhgvj
                      phone: '09022331122'
                    description: details
                    amount: 1000
                    fee: 30
                    paymentToken: PY_TIrNY1CD3836
                    purpose: multi-purpose escrow item
                    channel: API
                    callbackUrl: null
                  metadata: null
                  status: success
                  creditType: debit
                  createdAt: '2026-06-25T07:38:38.003Z'
                  updatedAt: '2026-06-25T07:38:39.329Z'
        '400':
          description: You can only buy to your merchant's escrow.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                status: 400
                message: You can only buy to your merchant's escrow
                data: {}
        '401':
          description: Buying disabled for this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                status: 401
                message: >-
                  Your account has been disabled from buying, please contact
                  support
                data: {}
components:
  parameters:
    CustomerIdHeader:
      name: customer-id
      in: header
      required: true
      description: The merchant customer this request acts on behalf of.
      schema:
        type: string
      example: 665f1b2c9a1e4d0012ab3c01
  schemas:
    ApiError:
      type: object
      description: Standard error envelope.
      properties:
        status:
          type: integer
          example: 400
        message:
          type: string
          example: Action not allowed
        data:
          type: object
          example: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret key as a Bearer token. The key prefix selects the
        environment: `sk_test_...` (test) or `sk_live_...` (live).

````