Skip to main content
POST
Cancel a payment link
Cancellation is permanent. Cancelled links cannot be reactivated - create a new link to accept payments again. Only ACTIVE links can be cancelled.
Returns the cancelled payment link with status: "CANCELLED", cancelled_at populated, and cancellation_reason if a reason was provided.

Authorizations

X-API-Key
string
header
required

API key enabled for the requested payment-link operation and associated with an eligible partner, merchant, or branch account.

Headers

Idempotency-Key
string

Optional and validated when supplied. Cancel does not currently persist or replay a prior response. Same charset as Create: letters, digits, dot (.), hyphen (-), underscore (_); 8–64 characters.

Required string length: 8 - 64
Pattern: ^[A-Za-z0-9._-]{8,64}$

Path Parameters

id
string<uuid>
required

The payment link ID (UUID v7).

Body

application/json
reason
string

Optional reason for cancellation. String, max 500 characters. Returned as cancellation_reason.

Maximum string length: 500
Example:

"Customer requested cancellation"

Response

The cancelled payment link

The payment link object returned by all endpoints.

id
string<uuid>
required

Unique identifier (UUID v7). Use this in API paths and for tracking.

Example:

"550e8400-e29b-41d4-a716-446655440000"

type
enum<string>
required

Payment-link usage model. ONE_TIME accepts one successful payment; MULTI_USE can accept multiple successful payments.

Available options:
ONE_TIME,
MULTI_USE
merchant_branch_reference_number
string
required

Reference number of the branch this link belongs to.

Example:

"SH-ANG-001"

currency
string
required

ISO 4217 currency code.

Example:

"PHP"

amount
integer<int64>
required

Payment amount in the currency's smallest unit (for PHP, centavos). 150000 = PHP 1,500.00.

Example:

150000

line_items
object[]
required

Items the customer is paying for.

description
string | null
required

Merchant-defined description displayed to the customer.

Example:

"Order for wireless earbuds"

status
enum<string>
required

Current payment-link lifecycle status.

Available options:
ACTIVE,
CONSUMED,
EXPIRED,
CANCELLED
expires_at
string<date-time>
required

RFC 3339 timestamp. When the link stops accepting payments.

Example:

"2026-07-18T00:00:00Z"

url
string<uri>
required

The URL to share with customers. Read-only.

Example:

"https://pay.sbx.moduluslabs.io/550e8400-e29b-41d4-a716-446655440000"

max_uses
integer | null
required

Maximum number of successful payments allowed. null means unlimited. ONE_TIME links always have a value of 1.

Example:

10

successful_payment_count
integer
required

Number of successful payments completed so far.

Example:

3

metadata
object
required

Merchant key-value pairs. Max 50 keys, key max 40 Unicode characters, value max 500 Unicode characters, and max 10,000 serialized bytes.

created_at
string<date-time>
required

RFC 3339 timestamp. When the link was created.

Example:

"2026-06-18T10:30:00Z"

updated_at
string<date-time>
required

RFC 3339 timestamp. When the link was last modified.

Example:

"2026-06-18T14:22:00Z"

cancelled_at
string<date-time> | null
required

RFC 3339 timestamp. When the link was cancelled. null if not cancelled.

cancellation_reason
string | null
required

Reason for cancellation. null if not cancelled.

Maximum string length: 500
order_reference
string | null

Merchant's internal order reference for reconciliation.

Maximum string length: 100
Example:

"ORD-2026-0618-001"

redirect_urls
object | null

Customer redirect destinations for successful, declined, or expired outcomes. null when no redirects are configured.