Close an open payment context.
POST /api/v1/vouchers/contexts/:contextId/context-close
Closes a context, preventing any new vouchers from being reserved against it. Existing vouchers in the context are unaffected.
Parameters
Path
| Name | Type | Required | Description |
|---|---|---|---|
contextId | string | Yes | The context ID to close |
Body
| Name | Type | Required | Description |
|---|---|---|---|
payeeId | string or null | Yes | The payee ID (exactly 64 characters), or null if no payee was involved |
Request example
Response
Response schema
Returns the updated context object with statusCLOSED.
Example response
Error responses
| Status | Code | Description |
|---|---|---|
400 | already_closed | The context is already closed |
401 | unauthorized | Missing or invalid bearer token |
404 | not_found | Context not found |