Payments

Cancel RTP

Request cancellation of an unsettled Request-to-Pay (RTP) payment. The payment must still be in a P_INITIATED or P_RECEIVED state; terminal payments cannot be cancelled. A 202 Accepted response means the cancellation request was created and the camt.055 was posted to Raast - the final outcome is asynchronous. Poll the payment and inspect the cancellation status, which progresses from PAYMENT_CANCEL_CREATED to either PAYMENT_CANCEL_ACCEPTED or PAYMENT_CANCEL_REJECTED.

post/v1/aggregators/{raast-aggregator-id}/payments/{payment-id}/cancel

Request

  • Base URL: https://api.getsafepay.com/raastwire
  • URL: https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/payments/{payment-id}/cancel
  • Auth: API key in header X-SFPY-AGGREGATOR-SECRET-KEY

Request body

request_idstring uuid required

Client-supplied UUID v4 idempotency key for the cancellation (exactly 36 characters with hyphens). Must be distinct from the original payment's request id.

reason'PAYMENT_CANCEL_REASON_CUSTOMER_REQUEST' required

Public reason for the cancellation. Only PAYMENT_CANCEL_REASON_CUSTOMER_REQUEST is currently accepted; the remaining reason codes are reserved until Raast confirms support for them.

additional_infostring

Optional free-text context for the cancellation (max 105 characters).

Example request

{
  "request_id": "f0a3b1c2-8d4e-4f6a-9b1c-2d3e4f5a6b7c",
  "reason": "PAYMENT_CANCEL_REASON_CUSTOMER_REQUEST"
}

Response

Cancellation request accepted. The camt.055 has been posted to Raast and the final outcome is delivered asynchronously.

api_versionstring

The current version of the API spec

Example response

{
  "api_version": "v1",
  "data": {
    "token": "pc_3b2a1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
    "payment_id": "pm_96bc0ef4-7857-47fb-a345-c411a23aeb92"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.