Cancels the payment session with the given ID. A session can only be cancelled while it is still pending.
Responses
-
Session cancelled. The webhook with
event_type: payment.session.cancelledwill follow asynchronously. -
session_not_pending— the session is already in a terminal state.session_expired— the session is past itsexpires_atand the expiry job hasn't flipped it yet. -
Missing or invalid API key.
-
Session not found.
POST
/api/v1/payment/sessions/{session}/cancel
curl \
--request POST 'https://api.1099policy.com/api/v1/payment/sessions/{session}/cancel'
Response examples (200)
{
"cancelled_at": 42,
"completed_at": 1713369924,
"contractor_id": "cn_Ehb3bYa",
"created": 1646818364,
"expires_at": 1713371724,
"id": "string",
"processor": "checkout",
"return_url": "https://app.yourplatform.com/settings/billing/return",
"status": "pending",
"url": "https://my.1099policy.com/payment/setup/live_<token>"
}