Payments

Cancel a pending payment

Request cancellation of a payment that is still pending — for example to abort an in-progress checkout before it completes. Only payments with status PENDING are eligible; any other status (including PAID, FAILED, CANCELLED, REFUNDED, PARTIALLY_REFUNDED, UNPAID, and EXPIRED) returns an error. Currently only Stripe-processed payments are supported — PayPal payments and subscription plan-change payments cannot be cancelled through this endpoint. This only requests cancellation from the payment processor; it does not mark the payment as cancelled immediately. The payment's status updates to CANCELLED once the processor confirms the cancellation asynchronously.

Authorization

Public key Secret key
x-fngs-public-key<token>

In: header

x-fngs-secret-key<token>

In: header

Path Parameters

paymentId*string

Unique identifier (UUID) of the payment.

Formatuuid

Request Body

application/json

PATCH /v0/payments/:paymentId/cancel Request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

PATCH
/v0/payments/{paymentId}/cancel
curl -X PATCH "https://example.com/v0/payments/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel" \  -H "Content-Type: application/json" \  -d '{}'
{  "status": "success",  "data": {    "success": true  }}