{"management":"/api/v1/apps/{appId}/payments/actions/{action}","runtime":"/runtime/v1/payments/{action}","method":"POST","guide":"/docs/payments.md","actions":[{"action":"status","description":"Cached test/live connection status; no provider call.","runtime":false,"access":"app:read","example":{"mode":"test"}},{"action":"account.refresh","description":"Read current Stripe charges, payouts and requirements.","runtime":false,"access":"app:read","example":{"mode":"test"}},{"action":"plans.list","description":"Paginated catalog, including archived entries and Stripe IDs. Render only active plans for new purchases.","runtime":true,"access":"app:read","example":{"mode":"test"}},{"action":"customers.list","description":"Paginated customerRef → Stripe customer mapping for this app and mode. Management only.","runtime":false,"access":"app:read","example":{"mode":"test","limit":25}},{"action":"customers.get","description":"Read name, email and default payment method.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123"}},{"action":"checkout.get","description":"Read status, paymentStatus, paymentId and subscriptionId; verify payment server-side before fulfilment.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123","id":"cs_..."}},{"action":"cards.list","description":"List this customer’s saved cards (brand, last4, expiry; never full details).","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123"}},{"action":"subscriptions.list","description":"Paginated subscription history; runtime is customer-scoped.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123","limit":25}},{"action":"subscriptions.get","description":"Read status, period end, items and pendingUpdate. Wrong-customer objects return 404.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123","id":"sub_..."}},{"action":"transactions.list","description":"Paginated PaymentIntent history, amounts, refund totals and receipt links.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123","limit":25}},{"action":"transactions.get","description":"Read current payment status and refund total.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123","id":"pi_..."}},{"action":"invoices.list","description":"Paginated invoices with amounts, status, hosted payment URL and PDF URL.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123","limit":25}},{"action":"invoices.get","description":"Read an invoice; its hosted URL supports customer payment/authentication.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123","id":"in_..."}},{"action":"refunds.list","description":"List refunds for an owned paymentId.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123","paymentId":"pi_..."}},{"action":"events.list","description":"Cursor feed. after defaults to 0; limit 1–100. Runtime returns customer events and pending:true when an earlier refresh blocks progress. Persist nextAfter only after processing.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123","after":"0","limit":25}},{"action":"events.get","description":"Inspect one event by evt_ ID and its current processing status/summary.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123","id":"evt_..."}},{"action":"access.get","description":"Current Stripe-backed paid features for a customer. Active plus paid latest invoice, or trialing; no paused collection. No automatic one-off purchase grants.","runtime":true,"access":"app:read","example":{"mode":"test","customerRef":"user_123"}},{"action":"customers.upsert","description":"Create a customer once per customerRef; returns existing mapping unchanged if it already exists.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","email":"buyer@example.com","name":"Alex","requestId":"customer-user-123"}},{"action":"customers.update","description":"Update optional name and/or email on a mapped customer.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","email":"new@example.com","requestId":"update-customer-001"}},{"action":"checkout.create","description":"Create Checkout. ui: hosted, embedded or custom. Requires an active plan, customer and charges-enabled account. quantity defaults to 1 (max 1000). returnUrl must belong to this app. Optional trialDays 1–30 is administrator-only. Persist requestId and session ID.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","planCode":"pro-monthly","ui":"custom","returnUrl":"https://YOUR_APP_URL/billing","requestId":"checkout-user-123-001"}},{"action":"checkout.expire","description":"Expire an open checkout and free its subscription checkout slot.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","id":"cs_...","requestId":"expire-session-001"}},{"action":"cards.setup","description":"Create a SetupIntent. Returns clientSecret, publishableKey and stripeAccount for that customer’s browser.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","requestId":"save-card-001"}},{"action":"cards.remove","description":"Detach a card only when the customer has no non-terminal subscription. Use the portal to replace cards otherwise.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","id":"pm_...","requestId":"remove-card-001"}},{"action":"cards.default","description":"Set a customer default invoice payment method. Does not override a subscription-specific default.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","id":"pm_...","requestId":"default-card-001"}},{"action":"portal.create","description":"Create a short-lived customer billing portal URL for payment methods, invoices and cancellation.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","returnUrl":"https://YOUR_APP_URL/billing","requestId":"billing-portal-001"}},{"action":"subscriptions.preview","description":"Estimate the invoice for an immediate prorated plan change. Requires a recurring plan; amounts may change before confirmation.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","id":"sub_...","planCode":"pro-yearly","requestId":"preview-change-001"}},{"action":"subscriptions.update","description":"Apply a confirmed prorated change. An unpaid change remains pending. Read invoices for an authentication/payment link.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","id":"sub_...","planCode":"pro-yearly","confirm":true,"requestId":"change-plan-001"}},{"action":"subscriptions.cancel","description":"confirm:true required. Defaults to period-end cancellation; immediate:true cancels now. No automatic refund.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","id":"sub_...","confirm":true,"immediate":false,"requestId":"cancel-plan-001"}},{"action":"subscriptions.resume","description":"confirm:true required. Remove a scheduled period-end cancellation; cancelled subscriptions cannot resume.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","id":"sub_...","confirm":true,"requestId":"resume-sub-001"}},{"action":"invoices.retry","description":"Retry an open invoice using its saved payment method. confirm:true required; authentication may still be needed via the invoice URL.","runtime":true,"access":"app:write","example":{"mode":"test","customerRef":"user_123","id":"in_...","confirm":true,"requestId":"retry-invoice-001"}},{"action":"onboard","description":"Create a sandbox for testing, or return owner verification for live mode. Country and businessType apply to live accounts.","runtime":false,"access":"app:write; live activation requires owner","example":{"mode":"live","country":"GB","businessType":"individual"}},{"action":"account.session","description":"Owner browser only. Short-lived embedded Stripe account session; never expose to an agent or app customer.","runtime":false,"access":"owner","example":{"mode":"live"}},{"action":"plans.create","description":"Create an immutable price. amount is an integer in currency minor units; interval is month, year or omitted for a one-off. features maps names to booleans or non-negative numeric limits.","runtime":false,"access":"app:write","example":{"mode":"test","code":"pro-monthly","name":"Pro","amount":1500,"currency":"usd","interval":"month","features":{"pro":true,"workspaces":10},"requestId":"plan-pro-monthly-001"}},{"action":"plans.archive","description":"Stop new purchases. Existing subscriptions continue.","runtime":false,"access":"app:write","example":{"mode":"test","planCode":"pro-monthly","requestId":"archive-plan-001"}},{"action":"refunds.create","description":"Administrator only; confirm:true and positive amount required. Refunds move money, do not cancel subscriptions, and do not automatically revoke paid access.","runtime":false,"access":"app:write","example":{"mode":"test","paymentId":"pi_...","amount":500,"confirm":true,"requestId":"refund-order-001"}},{"action":"events.retry","description":"Administrator retry of an event refresh; does not resend or repeat the payment.","runtime":false,"access":"app:write","example":{"mode":"test","id":"evt_...","requestId":"retry-event-001"}}]}