Skip to main content
POST
Cancel a payment

Overview

Cancel a pending or failed payment. Use this when a payment should not be collected—for example, when a subscription was ended early or a billing adjustment is needed.
Cancelling a payment removes it from collection. This action cannot be undone. For refunds of already-paid payments, use your payment processor’s refund functionality.

Common Use Cases

  • Early Termination: Subscription ended before payment due
  • Billing Adjustment: Correcting overcharges or errors
  • Customer Goodwill: Waiving a payment as a courtesy
  • Duplicate Payments: Removing duplicate scheduled payments
  • Subscription Cancelled: Associated subscription was cancelled

Request Fields

Example Request

What Happens

When you cancel a payment:
  1. Payment status changes to cancelled
  2. Cannot be collected or marked as paid
  3. Subscription metrics may be updated
  4. Reason recorded for audit trail

Which Payments Can Be Cancelled

Example: Cancel Due to Early Return

Example: Cancel with Customer Reason

Error Handling

Authorizations

Authorization
string
header
required

API key obtained from FlexPortal dashboard

Headers

Tenant-ID
string
required

Your tenant identifier

Path Parameters

paymentId
string
required

The payment ID

Body

application/json
reason
string
required
Minimum string length: 1

Response

Payment cancelled

success
enum<boolean>
required
Available options:
true
message
string
required
payment
object
required