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

# Add recipient payment detail

> Adds routing to a recipient: which route, and the exact fields that route requires. Values are validated against the route’s own field descriptors, then encrypted. Only a masked identifier ever comes back.

## `fields` is defined by the route, not by you

Read the route first — [`GET /v1/transfer-corridors`](/api-reference/currencies-and-countries/discover-transfer-corridors) or [`GET /v1/currencies/{code}/routes`](/api-reference/currencies-and-countries/list-routes-for-a-currency) — and send exactly the keys its `fieldDescriptors` name. Each value is checked for presence, length, and pattern, and **a key the route does not define is rejected** rather than ignored.

Every failure comes back at once, in `errors`, each entry naming the field and why:

```json
{
  "statusCode": 422,
  "message": "Payment detail validation failed.",
  "code": "payment_detail_invalid",
  "errors": [
    { "field": "accountNumber", "path": ["fields", "accountNumber"], "code": "too_small", "message": "accountNumber is too short." },
    { "field": "swiftBic", "path": ["fields", "swiftBic"], "code": "unrecognized_field", "message": "swiftBic is not accepted for this route." }
  ]
}
```

## Defaults

The first detail added to a recipient becomes the default whatever `isDefault` says. Setting `isDefault` on a later one moves the default to it.

## Institution names

For a route with `institutionDirectoryEnabled`, submit the institution code in `fields` and Sakawave resolves the canonical name. Sending `institutionName` yourself is pointless there.

## Error codes

| Status | `code` | Cause |
| - | - | - |
| `400` | `validation_failed` | The recipient identifier is not a ULID. |
| `404` | `transfer_route_not_found` | No active route with that id delivers to that currency. |
| `422` | `payment_detail_invalid` | A routing field is missing, malformed, or not accepted; the route does not serve the country; or a bank-transfer route needs a `country` you did not send. |
| `401` | `INVALID_API_KEY` | The key is missing, invalid, inactive, expired, from the other environment, or blocked by its IP allowlist. |
| `404` | `recipient_not_found` | No such recipient for this business, or it has been deleted. |
| `429` | `api_key_rate_limit_exceeded` | The per-minute limit for this key was exceeded. All of these operations share a 120-per-minute allowance. |


## OpenAPI

````yaml /openapi.json post /v1/transfer-recipients/{recipientId}/payment-details
openapi: 3.1.0
info:
  title: Sakawave Business API
  version: 1.0.0-draft
  summary: >-
    Accounts, transfers, FX quotes, and transaction reconciliation for Sakawave
    businesses.
  description: >-
    Generated from the public NestJS controllers and their Zod request schemas.
    Public URLs and policy statements remain draft until the Phase 1 contract
    checklist is approved.
  contact:
    name: Sakawave API Support
    email: api-support@sakawave.example
servers:
  - url: https://sandbox-api.sakawave.example
    description: Sandbox (default)
  - url: https://api.sakawave.example
    description: Live
security:
  - bearerAuth: []
tags:
  - name: Bill payments
    description: Browse the biller catalog, validate a customer, and pay a bill.
  - name: Cards
    description: Issue, fund, and control USD virtual and disposable cards.
  - name: eSIM
    description: >-
      Sell mobile data abroad: browse the catalog, buy an eSIM, and manage it
      once installed.
  - name: Currencies and countries
    description: >-
      Reference data: what may be held, what may be sent where, and which
      jurisdictions are served.
  - name: Customers
    description: Create and manage customers of your business.
  - name: Accounts
    description: >-
      Open business and customer accounts, and issue the destinations that fund
      them.
  - name: Transfer destinations
    description: Resolve temporary destinations and saved recipients.
  - name: FX quotes
    description: Create and retrieve time-limited cross-currency quotes.
  - name: Transfers
    description: Preview, create, and monitor transfers.
  - name: Transactions
    description: Read ledger entries for reconciliation.
paths:
  /v1/transfer-recipients/{recipientId}/payment-details:
    post:
      tags:
        - Transfer destinations
      summary: Add recipient payment detail
      description: >-
        Adds routing to a recipient: which route, and the exact fields that
        route requires. Values are validated against the route’s own field
        descriptors, then encrypted. Only a masked identifier ever comes back.
      operationId: createRecipientPaymentDetail
      parameters:
        - name: recipientId
          in: path
          required: true
          description: Saved recipient ULID.
          schema:
            $ref: '#/components/schemas/Ulid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentDetailRequest'
            example:
              routeId: 01K2Z3AB4M5N6P7Q8RSTVWXYZA
              currency: KES
              country: KE
              accountHolderName: Ada Okafor
              fields:
                bankCode: '001'
                accountNumber: '0123456789'
              isDefault: true
      responses:
        '201':
          description: Successful response.
          headers:
            X-Request-ID:
              description: >-
                The request identifier assigned by Sakawave. Include it in
                support requests.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentDetailResponse'
              example:
                id: 01K2Z3AB4Q5R6S7T8VWXYZABCD
                recipientId: 01K2Z3AB4G5H6J7K8MNPQRSTVW
                routeId: 01K2Z3AB4M5N6P7Q8RSTVWXYZA
                paymentMethod: bank-transfer
                currency: KES
                country: KE
                accountHolderName: Ada Okafor
                institutionName: Example Bank
                maskedIdentifier: •••• 6789
                isDefault: true
                providerLocked: false
                createdAt: '2026-08-14T09:06:00.000Z'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          $ref: '#/components/responses/ConflictError'
        '422':
          $ref: '#/components/responses/UnprocessableError'
        '429':
          $ref: '#/components/responses/RateLimitError'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    Ulid:
      type: string
      minLength: 26
      maxLength: 26
      pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
      example: 01K2Z3AB4C5D6E7F8G9HJKMNPQ
      description: A 26-character ULID.
    CreatePaymentDetailRequest:
      type: object
      additionalProperties: false
      properties:
        routeId:
          $ref: '#/components/schemas/Ulid'
          description: >-
            A route id from GET /v1/currencies/{code}/routes or GET
            /v1/transfer-corridors.
        currency:
          $ref: '#/components/schemas/DestinationCurrency'
        country:
          type: string
          minLength: 2
          maxLength: 2
          description: >-
            Required for a bank-transfer route that is not already scoped to one
            country. Uppercased on the way in.
        accountHolderName:
          type: string
          minLength: 2
          maxLength: 200
        institutionName:
          type: string
          maxLength: 160
          description: >-
            Ignored for directory-backed routes, where Sakawave resolves the
            name from the institution code.
        fields:
          type: object
          additionalProperties:
            type: string
            minLength: 1
            maxLength: 200
          description: >-
            The routing values for this route, keyed exactly as the route’s
            fieldDescriptors name them. A key the route does not define is
            rejected.
        isDefault:
          type: boolean
          default: false
          description: >-
            The first detail on a recipient becomes the default whatever this
            says.
      required:
        - routeId
        - currency
        - accountHolderName
        - fields
    PaymentDetailResponse:
      type: object
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Ulid'
        recipientId:
          $ref: '#/components/schemas/Ulid'
        routeId:
          $ref: '#/components/schemas/Ulid'
        paymentMethod:
          type: string
          enum:
            - bank-transfer
            - momo-transfer
        currency:
          $ref: '#/components/schemas/DestinationCurrency'
        country:
          anyOf:
            - type: string
              minLength: 2
              maxLength: 2
            - type: 'null'
        accountHolderName:
          type: string
        institutionName:
          anyOf:
            - type: string
            - type: 'null'
        maskedIdentifier:
          type: string
          description: The last four characters of the routing identifier, masked.
        isDefault:
          type: boolean
        providerLocked:
          type: boolean
          description: >-
            True when the provider holds the routing fields and they cannot be
            edited here.
        createdAt:
          $ref: '#/components/schemas/IsoTimestamp'
      required:
        - id
        - recipientId
        - routeId
        - paymentMethod
        - currency
        - country
        - accountHolderName
        - institutionName
        - maskedIdentifier
        - isDefault
        - providerLocked
        - createdAt
    DestinationCurrency:
      type: string
      enum:
        - NGN
        - USD
        - GBP
        - EUR
        - GHS
        - ZAR
        - UGX
        - CAD
        - MXN
        - AED
        - AUD
        - SGD
        - HKD
        - KES
        - TZS
        - BRL
        - CNY
        - XAF
        - PHP
        - USDC
    IsoTimestamp:
      type: string
      format: date-time
      example: '2026-08-14T09:00:00.000Z'
    RequestError:
      anyOf:
        - $ref: '#/components/schemas/ValidationError'
        - $ref: '#/components/schemas/Error'
      description: >-
        Either a field-level validation failure carrying an errors array, or a
        rule the request broke, identified by code.
    Error:
      type: object
      additionalProperties: true
      properties:
        statusCode:
          type: integer
        message:
          type: string
          description: >-
            A sentence suitable for a log or a support conversation, not for a
            user interface.
        code:
          type: string
          description: >-
            The stable machine-readable reason. Branch on this, never on the
            message.
      required:
        - message
        - code
      description: >-
        An error body. Individual errors may add context fields alongside these
        three.
    UnprocessableError:
      type: object
      additionalProperties: true
      properties:
        statusCode:
          const: 422
        message:
          type: string
        code:
          type: string
          enum:
            - payment_detail_invalid
            - recipient_profile_incomplete
          description: >-
            Present on validation refusals. Absent on tier denials, which carry
            `reason` instead.
        reason:
          type: string
          enum:
            - daily_outflow_limit_exceeded
            - wallet_cap_exceeded
          description: Present on tier denials.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ValidationFailure'
        currency:
          $ref: '#/components/schemas/AssetCode'
        currentTier:
          type: integer
          enum:
            - 1
            - 2
            - 3
        limit:
          type: integer
          description: The allowance, in minor units.
        spentToday:
          type: integer
          description: Already spent inside the current daily window, in minor units.
        remaining:
          type: integer
          description: What is left of the allowance, in minor units.
        attempted:
          type: integer
          description: What this request asked for, in minor units.
      required:
        - statusCode
        - message
      description: >-
        A refusal the caller can act on. Individual reasons add context fields
        alongside these.
    RateLimitError:
      type: object
      additionalProperties: false
      properties:
        statusCode:
          const: 429
        message:
          type: string
        code:
          const: api_key_rate_limit_exceeded
        retryAfterSeconds:
          type: integer
          minimum: 1
      required:
        - statusCode
        - message
        - code
        - retryAfterSeconds
    ValidationError:
      type: object
      additionalProperties: false
      properties:
        statusCode:
          const: 400
        message:
          type: string
          description: The single failure, or a count when more than one field failed.
        code:
          const: validation_failed
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ValidationFailure'
      required:
        - statusCode
        - message
        - code
        - errors
    ValidationFailure:
      type: object
      additionalProperties: false
      properties:
        message:
          type: string
        field:
          type: string
        code:
          type: string
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
      required:
        - message
        - field
        - code
        - path
    AssetCode:
      type: string
      enum:
        - NGN
        - USD
        - GBP
        - EUR
        - GHS
        - ZAR
        - UGX
        - CAD
        - MXN
        - AED
        - BTC
        - ETH
        - USDT
        - USDC
  responses:
    ValidationError:
      description: >-
        The request was rejected before it was acted on. Field failures list
        every failing field.
      headers:
        X-Request-ID:
          description: >-
            The request identifier assigned by Sakawave. Include it in support
            requests.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestError'
          example:
            statusCode: 400
            message: Must be a valid identifier.
            code: validation_failed
            errors:
              - message: Must be a valid identifier.
                field: accountId
                code: custom
                path:
                  - accountId
    AuthenticationError:
      description: >-
        The API key is missing, invalid, inactive, expired, for another
        environment, or blocked by its IP allowlist.
      headers:
        X-Request-ID:
          description: >-
            The request identifier assigned by Sakawave. Include it in support
            requests.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            code: INVALID_API_KEY
            message: Invalid or inactive API credentials.
    NotFoundError:
      description: The requested resource was not found for this business.
      headers:
        X-Request-ID:
          description: >-
            The request identifier assigned by Sakawave. Include it in support
            requests.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 404
            code: resource_not_found
            message: Resource not found.
    ConflictError:
      description: The request conflicts with the current resource state.
      headers:
        X-Request-ID:
          description: >-
            The request identifier assigned by Sakawave. Include it in support
            requests.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 409
            code: resource_conflict
            message: The request conflicts with the current resource state.
    UnprocessableError:
      description: The request was well formed but cannot be acted on.
      headers:
        X-Request-ID:
          description: >-
            The request identifier assigned by Sakawave. Include it in support
            requests.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnprocessableError'
          example:
            statusCode: 422
            message: Payment detail validation failed.
            code: payment_detail_invalid
            errors:
              - message: Account number is required.
                field: accountNumber
                code: required
                path:
                  - fields
                  - accountNumber
    RateLimitError:
      description: The API key rate limit was exceeded.
      headers:
        X-Request-ID:
          description: >-
            The request identifier assigned by Sakawave. Include it in support
            requests.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
          example:
            statusCode: 429
            message: Too many API requests. Try again later.
            code: api_key_rate_limit_exceeded
            retryAfterSeconds: 17
    ServerError:
      description: An unexpected server error occurred.
      headers:
        X-Request-ID:
          description: >-
            The request identifier assigned by Sakawave. Include it in support
            requests.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 500
            code: internal_server_error
            message: An unexpected error occurred.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sakawave API key
      description: >-
        A secret API key, sent as `Authorization: Bearer sk_test_…` in sandbox
        or `Bearer sk_live_…` in live.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.