Payments

Cancel a payment request

Cancels an unpaid payment request: the underlying payment intent is canceled and the request moves to canceled. A request that is already paid, canceled, or expired returns 409.

post/v3/payment_requests/{paymentRequestId}/cancel

Request

  • Base URL: https://api.linqapp.com/api/partner
  • URL: https://api.linqapp.com/api/partner/v3/payment_requests/{paymentRequestId}/cancel
  • Auth: HTTP bearer

Path parameters

paymentRequestIdstring uuid required

Unique identifier of the payment request

Response

Payment request canceled

idstring uuid required

Unique identifier of the payment request.

objectstring required
status'requested' | 'succeeded' | 'canceled' | 'expired' required

Lifecycle status of the payment request.

mode'payment' | 'subscription' required

Whether this request collects a one-time charge or starts a subscription.

amountinteger required

What the recipient is charged at checkout, in the currency's minor units. In subscription mode this is the first invoice's amount due — all items after any discounts are applied — so a discount that covers the whole invoice returns 0 and checkout shows $0.00.

currencystring required
price_idstring

Subscription mode — the recurring price this request subscribes to.

interval'day' | 'week' | 'month' | 'year'

Subscription mode — how often the subscription renews.

interval_countinteger

Subscription mode — intervals per renewal (e.g. 3 + month = quarterly).

quantityinteger

Subscription mode — units of the price subscribed to.

trial_endstring date-time

Subscription mode — when the free trial ends and the first charge happens. Present only on trial requests; paid_at/succeeded mean the payment method was collected (no funds move until this time).

descriptionstring
metadataobject
rail'stripe' | 'natural'

The rail this request settled on.

checkout_urlstring required

URL the recipient opens to pay: https://zero.linqapp.com/pay/{slug}?session=..., where {slug} is your partner checkout slug.

created_atstring date-time required
updated_atstring date-time
expires_atstring date-time

When an unpaid request auto-expires.

paid_atstring date-time

When the request was paid. Absent until it succeeds.

Example response

{
  "object": "payment_request",
  "amount": 497,
  "currency": "usd",
  "discount": {
    "coupon": "LAUNCH50",
    "promotion_code": "promo_1QAbCdEfGhIjKlMn",
    "label": "15 OFF FIRST MONTH"
  },
  "stripe": {
    "payment_intent_id": "pi_3QAbCdEfGhIjKlMn",
    "customer_id": "cus_QAbCdEfGhIjKlMn",
    "subscription_id": "sub_1QAbCdEfGhIjKlMn"
  },
  "checkout_url": "https://zero.linqapp.com/pay/tomo?session=tok_abc123"
}

Changes

No recorded changes to this operation across all 1 revision of this API.