livery_stripe_checkout (livery_stripe v0.1.0)

View Source

Stripe 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

create_session(Client, Params)

-spec create_session(livery_client:client(), map() | list()) -> {ok, map()} | {error, term()}.

expire_session(Client, Id)

-spec expire_session(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.

retrieve_session(Client, Id)

-spec retrieve_session(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.

subscription_session(Client, Params)

-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.