Skip to main content
The Cancel Payment endpoint allows you to cancel a payment that has not yet entered processing. Once a payment transitions out of pending status, it can no longer be cancelled — on-chain settlement will have already begun and the funds will be in transit. If you need to recover funds from a payment that has already begun processing, contact RemitFlex Support.
Cancellations are only possible while the payment status is pending. Attempting to cancel a payment with any other status — including processing, settled, or delivered — will return a 422 Unprocessable Entity error.

Path Parameters

id
string
required
The unique payment identifier, prefixed with pmt_ (e.g., pmt_01HX4N3RABCDEF). This is the id field returned when the payment was created.

Response

On success, the API returns the full payment object with status updated to "cancelled" and updated_at reflecting the cancellation timestamp.
id
string
Unique payment identifier with prefix pmt_.
status
string
Will be "cancelled" upon successful cancellation.
amount
number
The source payment amount originally submitted.
currency
string
Source stablecoin used for the payment.
destination_currency
string
Target currency the recipient would have received.
converted_amount
number
The originally calculated destination amount. For cancelled payments, no funds are delivered.
exchange_rate
number
The exchange rate that was applied at the time of creation.
fee
number
Fee denominated in currency. Fees are not charged for payments cancelled while in pending status.
recipient
object
Recipient details associated with the payment.
reference
string
The internal reference you provided at creation, if any.
corridor
string
The corridor identifier used to route the payment.
created_at
string
ISO 8601 timestamp of when the payment was originally created.
updated_at
string
ISO 8601 timestamp of the cancellation.
estimated_delivery
string
ISO 8601 timestamp of the originally projected delivery time. For cancelled payments, delivery will not occur.

Examples

curl -X DELETE https://api.remitflex.com/v1/payments/pmt_01HX4N3RABCDEF \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "pmt_01HX4N3RABCDEF",
  "status": "cancelled",
  "amount": 500,
  "currency": "USDC",
  "destination_currency": "EUR",
  "converted_amount": 461.25,
  "exchange_rate": 0.9225,
  "fee": 0,
  "corridor": "US-EU",
  "recipient": {
    "name": "Maria Garcia",
    "account_number": "ES9121000418401234567891",
    "bank_country": "ES"
  },
  "reference": "Invoice #INV-2024-001",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:31:45Z",
  "estimated_delivery": "2024-01-15T14:30:00Z"
}

Error Responses

If the payment has already progressed past pending, the API returns a 422 Unprocessable Entity error.
{
  "error": {
    "code": "PAYMENT_NOT_CANCELLABLE",
    "message": "Payment pmt_01HX4N3RABCDEF cannot be cancelled because it is already processing."
  }
}
If the payment ID does not exist or does not belong to your account, the API returns a 404 Not Found error.
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Payment pmt_01HX4N3RABCDEF not found."
  }
}