PaperTiger.Resources.PaymentLink (PaperTiger v1.1.0)

Copy Markdown View Source

Handles Payment Link resource endpoints and deterministic hosted browser flow.

Summary

Functions

Browser-accessible Payment Link endpoint.

Deterministic success page used by Payment Links without redirect completion.

Creates a Payment Link.

Lists a Payment Link's line items with Stripe-style cursor pagination.

Lists Payment Links.

Retrieves a Payment Link.

Updates a Payment Link.

Functions

browser_checkout(conn, id)

@spec browser_checkout(Plug.Conn.t(), String.t()) :: Plug.Conn.t()

Browser-accessible Payment Link endpoint.

PaperTiger creates a Checkout Session from the Payment Link and redirects to the existing checkout auto-completion URL. Visiting that URL completes the payment/subscription side effects and redirects to the configured success URL.

browser_complete(conn, id)

@spec browser_complete(Plug.Conn.t(), String.t()) :: Plug.Conn.t()

Deterministic success page used by Payment Links without redirect completion.

create(conn)

@spec create(Plug.Conn.t()) :: Plug.Conn.t()

Creates a Payment Link.

line_items(conn, id)

@spec line_items(Plug.Conn.t(), String.t()) :: Plug.Conn.t()

Lists a Payment Link's line items with Stripe-style cursor pagination.

list(conn)

@spec list(Plug.Conn.t()) :: Plug.Conn.t()

Lists Payment Links.

retrieve(conn, id)

@spec retrieve(Plug.Conn.t(), String.t()) :: Plug.Conn.t()

Retrieves a Payment Link.

update(conn, id)

@spec update(Plug.Conn.t(), String.t()) :: Plug.Conn.t()

Updates a Payment Link.