Skip to main content
POST
/
payment-attempts
/
{id}
/
abort
Abort a payment attempt
curl --request POST \
  --url https://api.sandbox.primer.io/payment-attempts/{id}/abort \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-API-VERSION: <x-api-version>' \
  --data '
{
  "reason": "fraud-check-failed"
}
'
{
  "paymentAttemptId": "6c5d3a30-3c2e-4f55-9d8e-5b3d5e3a5c7f"
}

Authorizations

X-API-KEY
string
header
required

Headers

X-API-VERSION
string
required

Specifies the version of the API to use. This must be set to 2.4.

Example:

"2.4"

Path Parameters

id
string<uuid>
required

ID of the payment attempt to abort.

Body

application/json
reason
string

Optional free-text reason for aborting the payment attempt, recorded for your own records. Useful for observability into abort patterns. Do not include cardholder data.

Maximum string length: 512

Response

Successful Response

paymentAttemptId
string<uuid>
required

ID of the aborted payment attempt.