livery_stripe_checkout (livery_stripe v0.1.0)
View SourceStripe Checkout Sessions API.
subscription_session/2 is the friendpaste flow: a hosted subscription
checkout for a single price, with success/cancel URLs and metadata.
Summary
Functions
Create a subscription-mode checkout session for a single price, mirroring friendpaste's billing flow.
Functions
-spec create_session(livery_client:client(), map() | list()) -> {ok, map()} | {error, term()}.
-spec expire_session(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.
-spec retrieve_session(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.
-spec subscription_session(livery_client:client(), map()) -> {ok, map()} | {error, term()}.
Create a subscription-mode checkout session for a single price, mirroring friendpaste's billing flow.
Params requires customer, price, success_url, cancel_url, and
accepts optional quantity (default 1) and metadata.