Getnet DocsGetnet Docs

Cancels a payment intent.

PATCH/payment-intent/{payment_intent_id}

Cancels (expires) a payment intent that has not yet been paid. This is the only update operation available on a payment intent through the public API.

Path Parameters

payment_intent_idstringrequired

Payment intent unique identifier

Body application/json

status"cancelled"required

New status for the payment intent. Only `cancelled` is allowed, used to cancel/expire a payment intent that has not yet been paid.

Response

No content. Payment intent cancelled successfully.

Bad request. Only required fields are validated.

codestring

Unique alphanumeric human readable error code

messagestring

Brief summary of the reported issue

detailsobject[]

Array of errors. The object type varies depending on the error context.

Unauthorized

codestring

Unique alphanumeric human readable error code

messagestring

Brief summary of the reported issue

detailsobject[]

Array of errors. The object type varies depending on the error context.

Not found

codestring

Unique alphanumeric human readable error code

messagestring

Brief summary of the reported issue

detailsobject[]

Array of errors. The object type varies depending on the error context.

Unprocessable entity. Potential business error.

codestring

Unique alphanumeric human readable error code

messagestring

Brief summary of the reported issue

detailsobject[]

Array of errors. The object type varies depending on the error context.

Internal server error

messagestring

Brief summary of the reported issue

detailsobject[]

Array of errors. The object type varies depending on the error context.

Request
curl -X PATCH "https://api-sbx.pre.globalgetnet.com/dpy/web-checkout/v1/payment-intent/<payment_intent_id>" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "cancelled"
}'
Response
(no body)