---
title: "Update Request Status"
method: PATCH
path: "/payments/programmable/request/{id}"
tags: ["Programmable"]
---

# Update Request Status

`PATCH /payments/programmable/request/{id}`

## Request

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

Update the status of a request (accept, decline, or cancel).

Required body fields depend on `requestType` and `status`:

| requestType | status | Body |
|---|---|---|
| payment | accepted | One wallet ID: `senderWalletId` **or** `recipientWalletId`, not both |
| payment | declined / cancelled | `status` only |
| fulfillment | any | `status` only — no wallet IDs |
| cancellation | any | `status` only — no wallet IDs |

**Which wallet ID on payment accept?** Depends on who started the programmable payment (stored server-side, not in this request):

- Payer started it → recipient accepts with `recipientWalletId`
- Recipient started it → payer accepts with `senderWalletId`

On payment accept, send the wallet ID for your side of the deal.

## Path parameters

- `id` string, required

## Query parameters

- `requestType` 'payment' | 'fulfillment' | 'cancellation', required

## Request body

- union
  - AcceptPaymentWithSenderWallet: Accept when you are the payer (recipient-initiated payment).
    - `status` 'accepted', required
    - `senderWalletId` string, uuid, required: The wallet ID of the sender.
  - AcceptPaymentWithRecipientWallet: Accept when you are the recipient (payer-initiated payment).
    - `status` 'accepted', required
    - `recipientWalletId` string, uuid, required: The wallet ID of the recipient.
  - DeclineOrCancelRequestBody: Decline or cancel a request.
    - `status` 'declined' | 'cancelled', required
  - SimpleStatusUpdateBody: For fulfillment and cancellation — no wallet IDs needed.
    - `status` 'accepted' | 'declined' | 'cancelled', required

## Response `202`

The request status was updated successfully.

- unknown

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