OuiPay
API ReferenceTransactions

Cancel a transaction

POST /v1/transactions/{id}/cancel : cancel a pending transaction.

POST /v1/transactions/{id}/cancel

Headers

HeaderRequiredValue
AuthorizationyesBearer sk_...

Path params

ParamTypeNotes
idstringTransaction ULID

What can be cancelled

Only pending transactions: before the provider leg is submitted. A processing transaction cannot be cancelled (the provider may already have it); wait for the webhook or check status.

Request

curl -X POST https://api.ouipay.com/v1/transactions/01M2S18.../cancel \
  -H "Authorization: Bearer sk_test_..."

Response 200

The transaction with status: "failed" and failure.code = "CANCELLED". Any hold on funds is released.

Errors

HTTPerror.codeCause
404NOT_FOUNDNo such transaction
409CONFLICTNot in a cancellable state

On this page