StripeElixir.Services.InvoicePaymentService (stripe_elixir v0.1.0)

Copy Markdown View Source

InvoicesInvoicePayment

Invoice Payments represent payments made against invoices. Invoice Payments can be accessed in two ways:

  1. By expanding the payments field on the Invoice resource.
  2. By using the Invoice Payment retrieve and list endpoints.

Invoice Payments include the mapping between payment objects, such as Payment Intent, and Invoices. This resource and its endpoints allows you to easily track if a payment is associated with a specific invoice and monitor the allocation details of the payments.

Summary

Functions

list(client, params \\ %{}, opts \\ [])

@spec list(StripeElixir.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

List all payments for an invoice

When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments.

retrieve(client, invoice_payment, params \\ %{}, opts \\ [])

@spec retrieve(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Retrieve an InvoicePayment

Retrieves the invoice payment with the given ID.