---
title: "Create Programmable Payment Request"
method: POST
path: "/payments/programmable"
tags: ["Programmable"]
---

# Create Programmable Payment Request

`POST /payments/programmable`

## Request

- Base URL: `https://openapi.n3xt.io`
- URL: `https://openapi.n3xt.io/payments/programmable`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/n3xt/apis/n3xt-api-documentation/docs/payments/programmable/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a programmable payment request.

Required body fields depend on the `initiator` query parameter:

| initiator | Body schema | Required fields |
|---|---|---|
| `recipient` | RecipientRequestPayload | counterPartyId, recipientWalletId, amount |
| `payer` | PayerRequestPayload | counterPartyId, senderWalletId, amount |

Optional on both: `feeAmount`, `description`. Optional business override: `recipientBusinessId` (recipient) or `senderBusinessId` (payer) — if omitted, derived from the wallet ID.

- `initiator=recipient` — you (recipient) request payment from the counterparty.
- `initiator=payer` — you (payer) offer to pay the counterparty.

## Query parameters

- `initiator` 'recipient' | 'payer', required

## Request body

- union
  - RecipientRequestPayload: Request body when \`initiator=recipient\`.
    - `counterPartyId` string, uuid, required: The business ID of the counterparty.
    - `recipientWalletId` string, uuid, required: The wallet ID of the recipient (your wallet).
    - `recipientBusinessId` string, uuid: The business ID of the recipient. Derived from recipientWalletId when omitted.
    - `amount` string, required: The amount of the payment.
    - `feeAmount` string: The fee amount for the payment.
    - `description` string: A description for the payment.
  - PayerRequestPayload: Request body when \`initiator=payer\`.
    - `counterPartyId` string, uuid, required: The business ID of the counterparty.
    - `senderWalletId` string, uuid, required: The wallet ID of the sender (your wallet).
    - `senderBusinessId` string, uuid: The business ID of the sender. Derived from senderWalletId when omitted.
    - `amount` string, required: The amount of the payment.
    - `feeAmount` string: The fee amount for the payment.
    - `description` string: A description for the payment.

## Response `202`

Request Accepted

- union
  - object
    - `id` string, required
  - ErrorResponse
    - `error` string, required

## Other responses

- `400`: Bad Request - Invalid request parameters.
- `401`: Unauthorized - Invalid or missing authentication token.
- `403`: Forbidden - Insufficient permissions to perform this action.
- `404`: Not Found - Requested resource was not found.
- `422`: Unprocessable Entity - Validation failed for the request body.
- `500`: Internal Server Error - An unexpected error occurred while processing the request.

---

[API](https://skmtc.dev/n3xt/apis/n3xt-api-documentation.md) - [All operations](https://skmtc.dev/n3xt/apis/n3xt-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/n3xt/apis/n3xt-api-documentation/revisions/c634c45cd5b4?raw)
