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 In: header
In: header
Path Parameters
Unique identifier (UUID) of the payment.
uuidRequest 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
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 }}Get payment details GET
Retrieve detailed information about a specific payment by its ID. Returns the full payment object including associated user, order, subscription, charges, and invoice details.
Get Customer Portal URL GET
Resolve the deep-link path into a buyer's self-service portal for the given type. This only computes *where* a buyer would land — it does not authenticate them or mint a token. The buyer still needs to sign in to the portal separately (their own magic link) before the link resolves to anything. If the workspace has configured a custom subscription-management URL (Settings), every subscriptions-* type returns that URL instead of a Fungies portal path — checked before every other rule below, so the override stays reachable even when a rule below would otherwise refuse a Fungies portal link. Unless that override applies: refuses with 401 if called with a test-mode key — portal links are live-only, since the only way onto a test storefront is a preview token this endpoint has no merchant session to mint; refuses with 401 if the customer portal is disabled for the workspace (Settings). orderNumber accepts either the order number shown in the dashboard or the id returned by other v0 endpoints, and is resolved against this workspace's own orders — a value that does not exist returns 404. cartOfferId and offerId are not checked against the calling workspace's own data — a value that does not exist still returns a 200 with a plausible-looking link. The buyer's sign-in on the portal page itself is what actually confirms ownership.