Stripe.Services.PaymentRecordService (tiger_stripe v0.1.10)

Copy Markdown View Source

PaymentRecord

A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. For example, you can create a Payment Record to model a payment made on a different payment processor, in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or more Payment Attempt Records, which represent individual attempts made on a payment network.

Summary

Functions

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

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

Report a payment

Report a new Payment Record. You may report a Payment Record as it is initialized and later report updates through the other report_* methods, or report Payment Records in a terminal state directly, through this method.

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

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

Report a payment attempt

Report a new payment attempt on the specified Payment Record. A new payment attempt can only be specified if all other payment attempts are canceled or failed.

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

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

Report payment attempt canceled

Report that the most recent payment attempt on the specified Payment Record was canceled.

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

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

Report payment attempt failed

Report that the most recent payment attempt on the specified Payment Record failed or errored.

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

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

Report payment attempt guaranteed

Report that the most recent payment attempt on the specified Payment Record was guaranteed.

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

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

Report payment attempt informational

Report informational updates on the specified Payment Record.

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

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

Report a refund

Report that the most recent payment attempt on the specified Payment Record was refunded.

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

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

Retrieve a Payment Record

Retrieves a Payment Record with the given ID