v1.4.0
Subscriptions & Saved Cards
Added
- Subscriptions — recurring billing on a schedule.
POST /subscriptionsto create, plus list, detail, cycles, payment-link, update, charge, pause, resume, cancel, and payment-method endpoints (11 in total). Chooseautomaticbilling (RsomPay charges each cycle with dunning retries on failure) ormerchant_managed(you call/chargeyourself). Disabled by default — contact support to enable it for your account. See §15. Subscriptions. - Saved Cards — reuse a customer's card across invoices without ever touching raw card data.
POST /customers/{customer_external_id}/saved-card-tokenissues a one-time retrieval token once a customer opts in on checkout; pass it back ascustomer.saved_card_tokenon a laterPOST /invoicescall. The token (plus card brand/last4) is now also auto-surfaced on your nextGET /invoices/by-referenceorPOST /invoicesresponse after a card is saved, exactly once, with no extra call needed — the explicit issue endpoint still works independently for rotating it on demand. See §14. Saved cards. - Charge with a saved card, server-to-server —
POST /invoices/{reference}/charge-saved-cardcharges an existing invoice directly from your backend using a saved-card token, with no customer visit to checkout. Idempotent onidempotency_key; asynchronous — returns202, confirmed later viapayment.completed/payment.failed. Requires the newclient_invoices.chargepermission. See §14. Saved cards. - New webhook events for the subscription lifecycle:
subscription.created,.activated,.renewed,.payment_failed,.paused,.resumed,.canceled,.completed, and more — full list in §15. - New webhook event
recurring.card_saved, fired once when a customer's card is saved for the first time. - New invoice/settlement webhook events:
payment.expired,payment.refunded,settlement.updated,settlement.paid. - New
data.statusvaluesrefundedandpartially_refunded— see §9. Invoice statuses.
Changed
- Webhook payloads may now include a
payment.reasonfield explaining why a payment failed or expired. - Fixed: a refunded invoice (full or partial) previously reported
data.status: "issued"— identical to a never-paid invoice. It now correctly reportsrefundedorpartially_refunded.