> ## 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 Remitter

> Creates the remitter (sending party) record required before requesting a remittance payout quotation.

<Prompt description="Create Remitter" actions={["cursor"]}>
  Integrate the DollarPe Create Remitter endpoint into my application.

  Endpoint: POST /kyc/remitter/create
  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

  Task: Write a typed function that:

  1. Accepts the remitter's first\_name, last\_name, nationality, city, source\_of\_funds, id\_type, and id\_number
  2. Builds the signed auth headers
  3. Calls POST /kyc/remitter/create
  4. Returns the remitter's id and status
  5. Handles 400 (missing/invalid fields) and 500 errors

  Language: TypeScript
</Prompt>

<Note>
  Creating a remitter is idempotent: submitting the same `id_type` + `id_number` for your organization again returns the existing remitter's `id` instead of creating a duplicate record.
</Note>

<Note>
  `customer_id` is **not** part of this request. A remitter is a standalone record — it is not linked to one of your existing Customers.
</Note>

## Field notes

* `source_of_funds` is a fixed enum (`salary`, `savings`, `gifts`, `business_income`, `investment_proceeds`, and others) — invalid values are rejected.
* `id_type` is a fixed enum of supported identity document types: `PASSPORT`, `DRIVING_LICENCE`, `BENEFICIARY_ID`, `PAN_CARD`, `AADHAAR_CARD`, `AIRLINE_STAFF_CARD`, `BUSINESS_REGISTRATION_NO_BR`, `CENTRAL_BANK_LICENCE`, `ACRA` — invalid values are rejected.
* `nationality` must be a 3-letter alpha code (format-checked only, e.g. `IND`, `AUS`).

## Error Codes and Messages

| API Status Code | Response              | Reason                                                               |
| --------------- | --------------------- | -------------------------------------------------------------------- |
| 400             | Bad Request           | A required field is missing                                          |
| 400             | Bad Request           | `source_of_funds` is not one of the accepted values                  |
| 400             | Bad Request           | `id_type` is not one of the accepted values                          |
| 400             | Bad Request           | `first_name`, `last_name`, or `city` contains unsupported characters |
| 400             | Bad Request           | `nationality` is not a 3-letter alpha code                           |
| 500             | Internal Server Error | Internal Server Error                                                |


## OpenAPI

````yaml POST /kyc/remitter/create
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:
  /kyc/remitter/create:
    post:
      tags:
        - KYC
      description: >-
        Creates (idempotently) a remitter record used as the sending party on a
        remittance payout quotation. Re-submitting the same id_type/id_number
        for an organization returns the existing remitter instead of creating a
        duplicate.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - first_name
                - last_name
                - nationality
                - city
                - source_of_funds
                - id_type
                - id_number
              properties:
                client_reference_id:
                  type: string
                  description: >-
                    Optional client-supplied reference for tracking. Max 255
                    characters.
                  example: remitter-ref-001
                first_name:
                  type: string
                  description: >-
                    Letters, spaces, apostrophes, and hyphens only. 1-100
                    characters.
                  example: Siva
                last_name:
                  type: string
                  description: >-
                    Letters, spaces, apostrophes, and hyphens only. 1-100
                    characters.
                  example: Raj
                nationality:
                  type: string
                  description: >-
                    3-letter alpha country code (format-checked, uppercased on
                    save; not validated against an ISO-3166 list).
                  example: IND
                city:
                  type: string
                  description: >-
                    Letters, spaces, apostrophes, and hyphens only. 2-50
                    characters.
                  example: Sydney
                source_of_funds:
                  type: string
                  description: Fixed enum of accepted funding sources.
                  enum:
                    - business_income
                    - esops
                    - gambling_proceeds
                    - gifts
                    - government_benefits
                    - inheritance
                    - investment_loans
                    - investment_proceeds
                    - pension_retirement
                    - salary
                    - sale_of_assets_real_estate
                    - savings
                    - someone_else_funds
                    - credit_card
                    - crypto_currencies
                    - final_settlement
                    - funds_from_dividend_payouts
                    - funds_from_schemes_and_raffles
                    - gift_from_family_and_friends
                    - loan_from_bank
                    - other_sources
                  example: gifts
                id_type:
                  type: string
                  description: Type of identity document used for id_number.
                  enum:
                    - PASSPORT
                    - DRIVING_LICENCE
                    - BENEFICIARY_ID
                    - PAN_CARD
                    - AADHAAR_CARD
                    - AIRLINE_STAFF_CARD
                    - BUSINESS_REGISTRATION_NO_BR
                    - CENTRAL_BANK_LICENCE
                    - ACRA
                  example: PAN_CARD
                id_number:
                  type: string
                  description: Alphanumeric and hyphens only. 6-20 characters.
                  example: AZL4546
      responses:
        '200':
          description: Remitter created (or existing matching remitter returned)
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Remitter created
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: >-
                          Pass this value as remitter_id on remittance payout
                          requests.
                        example: e14fa86f-2a5e-437a-a031-949c68ade933
                      type:
                        type: string
                        example: PERSONAL
                      status:
                        type: string
                        description: >-
                          Remitter verification status as reported by the
                          partner vendor.
                        example: ACTIVE
                      client_reference_id:
                        type: string
                        example: remitter-ref-001
                      details:
                        type: object
                        description: >-
                          Raw remitter details snapshot passed through from the
                          partner vendor. Shape is vendor-defined and not
                          guaranteed stable.
                        additionalProperties: true
        '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
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    example:
                      id_number:
                        - This field is required.
                  data:
                    type: 'null'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Internal Server Error
                  data:
                    type: 'null'
                  err_code:
                    type: string
                    example: SYS_INTERNAL_ERROR
                  errors:
                    type: string
                    example: Unexpected error occurred. Please try again later.
      servers:
        - url: https://sandbox.dollarpe.xyz/cms/api/v1
          description: KYC 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

````