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

# Create Payout

> Creates a payout for a remittance-user flow — identical to Create Payout, with a required remitter_id.

<Prompt description="Create Remittance Payout" actions={["cursor"]}>
  Integrate the DollarPe Create Remittance Payout endpoint to complete a remittance-user off-ramp (crypto → fiat) order.

  Endpoint: POST /remittance-payout/initiate
  Base URL: [https://api.dollarpe.in](https://api.dollarpe.in) (production) | [https://sandbox.dollarpe.in](https://sandbox.dollarpe.in) (sandbox)

  Auth headers required on every request:

  * X-API-KEY: your API key
  * X-TIMESTAMP: current Unix time in seconds
  * X-SIGNATURE: Base64(HMAC-SHA256(X-API-KEY + X-TIMESTAMP + sortedJSONBody, apiSecret))

  Remittance payout flow:

  1. POST /customer/create (alpha\_3\_country\_code: "IND") → get customer\_id
  2. POST /kyc/remittance-beneficiary-kyc → complete the beneficiary's PAN-only KYC
  3. POST /bank/create → add the beneficiary's bank account → get bank\_id
  4. POST /kyc/remitter/create → register the sending party → get remitter\_id
  5. POST /remittance-payout/quotation with receiving\_amount → get quotation\_id
  6. POST /remittance-payout/initiate → create the order (link to quotation\_id, include remitter\_id)
  7. Poll GET /payout/{payout_id} or listen to webhooks for status updates

  CRITICAL: Deposits to wrong addresses or unsupported asset/blockchain pairs are permanent and non-recoverable. Validate the wallet address and blockchain before initiating.

  Funding: on the prefunding flow, no funding reference is needed — the payout debits the prefunded balance. On the non-prefunding flow, pass transaction\_hash (on-chain deposit). client\_reference\_id is optional.

  Task: Write a typed function that:

  1. Accepts quotation\_id, customer\_id, remitter\_id, optional client\_reference\_id, and transaction\_hash on the non-prefunding flow
  2. Builds signed auth headers
  3. POSTs to /remittance-payout/initiate
  4. Returns payout\_id and initial status
  5. Handles 400 errors (expired/duplicate quotation, missing remitter\_id or funding reference)

  Language: TypeScript
</Prompt>

## Error Codes and Messages

| API Status Code | Response                                      | Reason                                                                            |
| --------------- | --------------------------------------------- | --------------------------------------------------------------------------------- |
| 400             | Bad Request                                   | `remitter_id` (or another required field) is missing                              |
| 400             | Client Reference ID already exists            | Client Reference ID already exists                                                |
| 400             | Quotation is not found                        | Quotation does not exist or does not belong to this organization                  |
| 400             | Quotation has expired                         | Quotation has expired                                                             |
| 400             | Quotation is already linked to another payout | Quotation is already linked to another payout                                     |
| 400             | Unable to process payout. Please try again.   | The partner order-creation step failed; the payout is rolled back and not created |
| 500             | Internal Server Error                         | Internal Server Error                                                             |


## OpenAPI

````yaml POST /remittance-payout/initiate
openapi: 3.1.0
info:
  title: DollarPe API
  description: API for DollarPe - Customer, Payout, and Webhook services
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://sandbox.dollarpe.xyz/pos/api/v1
    description: Payout API Base URL
    variables:
      base_url:
        default: https://sandbox.dollarpe.xyz
  - url: https://sandbox.dollarpe.xyz/cms/api/v1
    description: Customer API Base URL
    variables:
      base_url:
        default: https://sandbox.dollarpe.xyz
security:
  - ApiKeyAuth: []
    TimestampAuth: []
    SignatureAuth: []
tags:
  - name: Customer
    description: Customer related operations
    x-displayName: Customer
    x-traitTag: true
  - name: Payout
    description: Payout related operations
  - name: Webhooks
    description: Webhook related operations
  - name: Widget
    description: Hosted buy/sell widget session initialization
paths:
  /remittance-payout/initiate:
    post:
      tags:
        - Payout
      description: >-
        Creates a payout for a remittance-user flow. Identical to Create Payout
        (same quotation validation, flow handling, and response shape) with one
        addition: a required remitter_id, referencing a remitter created via
        POST /kyc/remitter/create. Link it to a quotation created via POST
        /remittance-payout/quotation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - quotation_id
                - customer_id
                - remitter_id
              properties:
                quotation_id:
                  type: string
                  format: uuid
                  description: >-
                    The unique identifier of the quotation, obtained from POST
                    /remittance-payout/quotation
                  example: 2e104290-07c8-49f1-a5ca-0d27f0078f8a
                customer_id:
                  type: string
                  format: uuid
                  description: The unique identifier of the customer
                  example: def8b740-99f9-4cba-bc9e-99de57e927b4
                remitter_id:
                  type: string
                  format: uuid
                  description: >-
                    The unique identifier of the remitter, obtained from POST
                    /kyc/remitter/create. Stored on the payout for
                    record-keeping and echoed back in the response; not sent to
                    any partner call.
                  example: e14fa86f-2a5e-437a-a031-949c68ade933
                client_reference_id:
                  type: string
                  description: Optional client reference ID for tracking.
                  example: testUser123
                transaction_hash:
                  type: string
                  description: >-
                    On-chain transaction hash of the crypto deposit. Required
                    for organizations not on the prefunding flow; omit on the
                    prefunding flow (the payout debits the prefunded balance).
                  example: ''
      responses:
        '201':
          description: Remittance payout created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Success
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 5b75096f-de8d-44b4-9230-d94e6948abb6
                      quotation_id:
                        type: string
                        format: uuid
                        example: 2e104290-07c8-49f1-a5ca-0d27f0078f8a
                      customer_id:
                        type: string
                        format: uuid
                        example: def8b740-99f9-4cba-bc9e-99de57e927b4
                      remitter_id:
                        type: string
                        format: uuid
                        description: >-
                          The remitter linked to this payout, as submitted in
                          the request.
                        example: e14fa86f-2a5e-437a-a031-949c68ade933
                      bank_id:
                        type: string
                        format: uuid
                        example: e75f62f0-db9e-4904-8103-d6f14f67f5dc
                      asset:
                        type: string
                        example: USDT
                      fiat:
                        type: string
                        example: INR
                      rate:
                        type: number
                        format: float
                        example: 82.5
                      sending_amount:
                        type: number
                        format: float
                        example: 51
                      receiving_amount:
                        type: number
                        format: float
                        example: 4144.6
                      client_reference_id:
                        type: string
                        example: testUser123
                      fees:
                        type: object
                        properties:
                          client_fee_fiat:
                            type: number
                            format: float
                            example: 450
                          client_fee_crypto:
                            type: number
                            format: float
                            example: 5
                          dollarpe_fee:
                            type: number
                            format: float
                            example: 450
                          pg_fee:
                            type: number
                            format: float
                            example: 18
                          client_gst_fiat:
                            type: number
                            format: float
                            example: 81
                          client_gst_crypto:
                            type: number
                            format: float
                            example: 0.9
                          dollarpe_gst:
                            type: number
                            format: float
                            example: 81
                          pg_gst:
                            type: number
                            format: float
                            example: 81
                          tds:
                            type: number
                            format: float
                            example: 889.17
                          gross_effective_exchange_rate:
                            type: number
                            format: float
                            example: 88.92
                      status:
                        type: string
                        example: PROCESSING
                      created_at:
                        type: string
                        format: date-time
                        example: '2026-07-02T11:42:35.031177Z'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Bad Request
                  err_code:
                    type: string
                    example: REQ_FIELD_MISSING
                  errors:
                    type: object
                    properties:
                      remitter_id:
                        type: array
                        items:
                          type: string
                        example:
                          - This field is required.
                  data:
                    type: 'null'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Internal Server Error
                  err_code:
                    type: string
                    example: SYS_INTERNAL_ERROR
                  errors:
                    type: string
                    example: Unexpected error occurred. Please try again later.
                  data:
                    type: 'null'
      servers:
        - url: https://sandbox.dollarpe.xyz/pos/api/v1
          description: Remittance Payout API Base URL
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API Key for authentication
    TimestampAuth:
      type: apiKey
      in: header
      name: X-TIMESTAMP
      description: Current timestamp in seconds since epoch
    SignatureAuth:
      type: apiKey
      in: header
      name: X-SIGNATURE
      description: HMAC SHA256 signature of the request encoded in Base64

````