Skip to main content
PUT
/
api
/
partner
/
v2
/
transactions
/
{id}
/
cancel
cURL
curl --request PUT \
  --url https://staging-api.capa.fi/api/partner/v2/transactions/{id}/cancel \
  --header 'partner-api-key: <partner-api-key>'
{
  "success": true,
  "data": {
    "id": "<string>",
    "userId": "<string>",
    "status": "<string>"
  }
}
Cancels a previously created on-ramp or off-ramp transaction.
Cancellation is only allowed if the transaction has not yet received the funds.

🔐 Headers

HeaderDescription
partner-api-keyAPI key associated with your partner account. Required. See API Key Generation Guide.
This endpoint requires authentication using a valid partner-api-key.

📥 Path Parameters

ParameterTypeRequiredDescription
idstringThe unique ID of the transaction to cancel. Must be owned by the authenticated partner and in a cancellable state.

📨 Example Request

HTTP
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

FieldTypeDescription
successbooleanIndicates whether the cancellation was successful.
dataobjectContains the updated transaction object after cancellation.
The returned transaction object will have its status updated to "CANCELLED".

📘 Example Response

JSON
{
  "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.

Headers

partner-api-key
string
required

Api key for the affiliated partner that is performing the request

Path Parameters

id
string
required

Transaction identifier

Example:

"8374f327-38bd-4b0b-b8a7-2524599eb903"

Response

200 - application/json
success
boolean
Example:

true

data
object
I