put https://staging-api.capa.fi/api/partner/v2/transactions//cancel
Cancels a previously created on-ramp or off-ramp transaction.
Cancellation is only allowed if the transaction has not yet received the funds.
π Headers
Header | Description |
---|---|
partner-api-key | API key associated with your partner account. Required. See API Key Generation Guide. |
This endpoint requires authentication using a valid
partner-api-key
.
π₯ Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | β | The unique ID of the transaction to cancel. Must be owned by the authenticated partner and in a cancellable state. |
π¨ Example Request
curl --request PUT \
--url https://staging-api.capa.fi/api/partner/v2/transactions/8374f327-38bd-4b0b-b8a7-2524599eb903/cancel \
--header 'accept: application/json' \
--header 'partner-api-key: {{API-KEY}}'
π€ Response Body
Field | Type | Description |
---|---|---|
success | boolean | Indicates whether the cancellation was successful. |
data | object | Contains the updated transaction object after cancellation. |
The returned transaction object will have its
status
updated to"CANCELLED"
.
π Example Response
{
"success": true,
"data": {
"id": "0483907e-ca31-432c-8234-fc401a921ef9",
"userId": "d3127f5f-ff64-47f9-a9cc-ff603862eca6",
"status": "CANCELLED",
}
}
β οΈ Important Notes & Requirements
- β
Only transactions in a cancellable state can be cancelled (e.g.,
PENDING
,BANK_TRANSFER_PENDING
,CRYPTO_NOT_RECEIVED
). - β Completed or locked transactions cannot be cancelled.
- π The transaction must belong to the authenticated partner account.
- π Cancelling an off-ramp transaction may abort a pending withdrawal attempt (if not yet initiated).
- This operation is idempotent: calling it multiple times will not cause errors once cancelled.
β
Use Cases
- Abort abandoned payments: Allow your users to cancel stuck or forgotten on-ramp flows.
- Back-office controls: Let your support or finance team reverse a pending transaction before execution.
- Automatic timeout flows: Integrate cancellation after X minutes of inactivity via cron jobs or watchdog logic.