stripe
18 blocks in 7 groups. Open a block for its pins, an example and how it behaves.
checkout
- create checkout
stripeconnectionv15.0.0Creates a Stripe Checkout Session and returns the url of Stripe's hosted payment page to redirect the customer to — or, withui modeset toembedded, a client secret for mounting Checkout inline on your own page. No card data reaches this cluster. Either wireline_items, or giveamount+product namefor a one-off price that needs nothing set up in Stripe first. - get checkout
stripeconnectionv15.0.0Reads back a Checkout Session to answer did they pay. Branch on thepaidpin, not onstatus— a session reaches statuscompletein subscription and setup modes where no money moved at all.
credits
- create refund
stripeconnectionv15.0.0Sends money back to whatever the customer paid with. Leaveamountempty to refund the whole payment. This is one of the two ways to credit someone — it moves real money out of the account. The other is create credit note, which settles against a future invoice instead. - create credit note
stripeconnectionv15.0.0Credits a customer against an invoice — the accounting way to give a subscriber a month back without refunding their card.credit_balance(the default) puts the amount on their Stripe balance so it comes off their next invoice;refundalso sends the money back;out_of_bandjust records that you settled it elsewhere. The invoice id comes off get subscription aslatest invoice id, or off list invoices. - list invoices
stripeconnectionv15.0.0The billing history for a customer or a subscription, newest first. Set at least one of the two filters — unfiltered this would walk the whole account. Thelatest invoicepins are the shortcut for "credit their last month".
customers
- create customer
stripeconnectionv15.0.0Creates the Stripe customer that saved cards, subscriptions and invoices hang off. Stripe enforces no uniqueness — creating this twice for one person gives them two billing histories and two sets of saved cards, so wire anidempotency keyfrom your own user GUID. - get customer
stripeconnectionv15.0.0Reads a Stripe customer. A customer deleted in Stripe comes back as a tombstone rather than an error — this block reports that asCUSTOMER_DELETEDinstead of handing back an almost-empty object that looks live.
payments
- create payment
stripeconnectionv15.0.0Creates a PaymentIntent — the route for a custom card form, where the page confirms with Stripe.js using theclient secret. For a hosted payment page use create checkout instead. Also the way to charge a card already on file, withoff session. - list payment methods
stripeconnectionv15.0.0The cards and mandates a customer has saved, for a "pay with a card on file" screen. Each entry carries alabelso a picker can be rendered without digging through the nested object. - get payment
stripeconnectionv15.0.0Answers did this payment succeed, and what did they pay with. The payment method pins come off the charge, so they report the method actually used rather than the ones that were offered. - cancel payment
stripeconnectionv15.0.0Cancels a payment that has not completed. A payment that already succeeded cannot be cancelled — refund it instead.
stripe
subscriptions
- resume subscription
stripeconnectionv15.0.0Renews a subscription that was going to stop: clearscancels at period end, and lifts a pause if one is set. A subscription that has already ended cannot be resumed by anything — the block says so rather than failing obscurely, and a new subscription has to be created. - create subscription
stripeconnectionv15.0.0Starts recurring billing for a customer who already has a payment method on file. To collect the card and subscribe in one step, use create checkout insubscriptionmode instead. - get subscription
stripeconnectionv15.0.0Reads a subscription — whether it is active, when the paid-for period ends, and whether it is set to run out. Also where thelatest invoice ida credit note needs comes from. - cancel subscription
stripeconnectionv15.0.0Cancels a subscription. By default at the end of the paid-for period: the customer keeps their access until it runs out, the subscription stays active withcancels at period endset, and resume subscription undoes it. Tickimmediatelyto stop access now — that is irreversible, and unlessprorateis set the customer is not credited for the unused time. - update subscription
stripeconnectionv15.0.0Upgrades, downgrades or re-quantities a subscription.proration behaviourdecides what happens to the part of the term already paid for:create_prorationscredits the unused time and bills the new plan pro rata on the next invoice,always_invoicebills it straight away,noneleaves the customer on the old amount until the term ends. Changing the plan needs the subscription item's id, which this block looks up for you when you give a price id.