Skip to main content
POST
/
v1
/
transfers
/
{transferId}
/
cancel
Cancel a Transfer
curl --request POST \
  --url https://plugin-br-bank-transfer.sandbox.lerian.net/v1/transfers/{transferId}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Idempotency: <x-idempotency>' \
  --header 'X-Tenant-Id: <x-tenant-id>' \
  --data '
{
  "reason": "User requested cancellation"
}
'
{
  "transferId": "019c96a0-ab10-7cde-f1a2-0e1f2a3b4c5d",
  "status": "CANCELLED",
  "cancelledAt": "2026-02-01T15:35:00-03:00"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. The token must include a tenantId claim that matches the X-Tenant-Id header.

Headers

X-Tenant-Id
string<uuid>
required

Organization ID used as the tenant identifier. All data is scoped to this organization. Must match the JWT tenantId claim when authentication is enabled.

X-Idempotency
string
required

Required idempotency key for safe retries. Use a UUID v4 or unique business identifier. If the same key is sent again and the original request was already processed, the cached response is returned.

See Retries and idempotency for details.

Maximum string length: 255

Path Parameters

transferId
string<uuid>
required

The unique identifier of the transfer to cancel.

Body

application/json
reason
string

The reason for the cancellation.

Maximum string length: 500

Response

Indicates that the transfer was successfully cancelled and funds were released.

The response includes the X-Idempotency-Replayed header.

If the value is false, the transaction was just processed. If the value is true, the response is a replay of a previously processed request.

See Retries and idempotency for more details.

transferId
string<uuid>
required
Example:

"019c96a0-ab10-7cde-f1a2-0e1f2a3b4c5d"

status
enum<string>
required
Available options:
CANCELLED
Example:

"CANCELLED"

cancelledAt
string<date-time>
required
Example:

"2026-02-01T15:35:00-03:00"