View Source Stripe.PaymentRecord (stripity_stripe v3.3.1)
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
Types
The billing address associated with the method of payment.
A positive integer in the smallest currency unit representing how much of this payment to refund. Can refund only up to the remaining, unrefunded amount of the payment.
The amount you initially requested for this payment.
The billing details associated with the method of payment.
Information about the custom (user-defined) payment method used to make this payment.
Customer information for this payment.
Information about the payment attempt failure.
Information about the payment attempt guarantee.
Information about the Payment Method debited for this payment.
Processor information for this refund.
Information about the payment attempt refund.
Shipping information for this payment.
The payment_record type.
Functions
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 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 that the most recent payment attempt on the specified Payment Record was canceled.
Report that the most recent payment attempt on the specified Payment Record failed or errored.
Report that the most recent payment attempt on the specified Payment Record was guaranteed.
Report informational updates on the specified Payment Record.
Report that the most recent payment attempt on the specified Payment Record was refunded.
Retrieves a Payment Record with the given ID
Types
@type address() :: %{ optional(:city) => binary(), optional(:country) => binary(), optional(:line1) => binary(), optional(:line2) => binary(), optional(:postal_code) => binary(), optional(:state) => binary() }
The billing address associated with the method of payment.
A positive integer in the smallest currency unit representing how much of this payment to refund. Can refund only up to the remaining, unrefunded amount of the payment.
The amount you initially requested for this payment.
@type billing_details() :: %{ optional(:address) => address(), optional(:email) => binary(), optional(:name) => binary(), optional(:phone) => binary() }
The billing details associated with the method of payment.
Information about the custom (user-defined) payment method used to make this payment.
@type customer_details() :: %{ optional(:customer) => binary(), optional(:email) => binary(), optional(:name) => binary(), optional(:phone) => binary() }
Customer information for this payment.
@type failed() :: %{optional(:failed_at) => integer()}
Information about the payment attempt failure.
@type guaranteed() :: %{optional(:guaranteed_at) => integer()}
Information about the payment attempt guarantee.
@type payment_method_details() :: %{ optional(:billing_details) => billing_details(), optional(:custom) => custom(), optional(:payment_method) => binary(), optional(:type) => :custom }
Information about the Payment Method debited for this payment.
@type processor_details() :: %{ optional(:custom) => custom(), optional(:type) => :custom }
Processor information for this refund.
@type refunded() :: %{optional(:refunded_at) => integer()}
Information about the payment attempt refund.
@type shipping_details() :: %{ optional(:address) => address(), optional(:name) => binary(), optional(:phone) => binary() }
Shipping information for this payment.
@type t() :: %Stripe.PaymentRecord{ amount: term(), amount_authorized: term(), amount_canceled: term(), amount_failed: term(), amount_guaranteed: term(), amount_refunded: term(), amount_requested: term(), application: binary() | nil, created: integer(), customer_details: term() | nil, customer_presence: binary() | nil, description: binary() | nil, id: binary(), latest_payment_attempt_record: binary() | nil, livemode: boolean(), metadata: term(), object: binary(), payment_method_details: term() | nil, processor_details: term(), shipping_details: term() | nil }
The payment_record type.
amountamount_authorizedamount_canceledamount_failedamount_guaranteedamount_refundedamount_requestedapplicationID of the Connect application that created the PaymentRecord.createdTime at which the object was created. Measured in seconds since the Unix epoch.customer_detailsCustomer information for this payment.customer_presenceIndicates whether the customer was present in your checkout flow during this payment.descriptionAn arbitrary string attached to the object. Often useful for displaying to users.idUnique identifier for the object.latest_payment_attempt_recordID of the latest Payment Attempt Record attached to this Payment Record.livemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.metadataSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.objectString representing the object's type. Objects of the same type share the same value.payment_method_detailsInformation about the Payment Method debited for this payment.processor_detailsshipping_detailsShipping information for this payment.
Functions
@spec report_payment( params :: %{ optional(:amount_requested) => amount_requested(), optional(:customer_details) => customer_details(), optional(:customer_presence) => :off_session | :on_session, optional(:description) => binary(), optional(:expand) => [binary()], optional(:failed) => failed(), optional(:guaranteed) => guaranteed(), optional(:initiated_at) => integer(), optional(:metadata) => %{optional(binary()) => binary()} | binary(), optional(:outcome) => :failed | :guaranteed, optional(:payment_method_details) => payment_method_details(), optional(:processor_details) => processor_details(), optional(:shipping_details) => shipping_details() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
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.
#### Details * Method: `post` * Path: `/v1/payment_records/report_payment`@spec report_payment_attempt( id :: binary(), params :: %{ optional(:description) => binary(), optional(:expand) => [binary()], optional(:failed) => failed(), optional(:guaranteed) => guaranteed(), optional(:initiated_at) => integer(), optional(:metadata) => %{optional(binary()) => binary()} | binary(), optional(:outcome) => :failed | :guaranteed, optional(:payment_method_details) => payment_method_details(), optional(:shipping_details) => shipping_details() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
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.
#### Details * Method: `post` * Path: `/v1/payment_records/{id}/report_payment_attempt`@spec report_payment_attempt_canceled( id :: binary(), params :: %{ optional(:canceled_at) => integer(), optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()} | binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Report that the most recent payment attempt on the specified Payment Record was canceled.
#### Details * Method: `post` * Path: `/v1/payment_records/{id}/report_payment_attempt_canceled`@spec report_payment_attempt_failed( id :: binary(), params :: %{ optional(:expand) => [binary()], optional(:failed_at) => integer(), optional(:metadata) => %{optional(binary()) => binary()} | binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Report that the most recent payment attempt on the specified Payment Record failed or errored.
#### Details * Method: `post` * Path: `/v1/payment_records/{id}/report_payment_attempt_failed`@spec report_payment_attempt_guaranteed( id :: binary(), params :: %{ optional(:expand) => [binary()], optional(:guaranteed_at) => integer(), optional(:metadata) => %{optional(binary()) => binary()} | binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Report that the most recent payment attempt on the specified Payment Record was guaranteed.
#### Details * Method: `post` * Path: `/v1/payment_records/{id}/report_payment_attempt_guaranteed`report_payment_attempt_informational(id, params \\ %{}, opts \\ [])
View Source@spec report_payment_attempt_informational( id :: binary(), params :: %{ optional(:customer_details) => customer_details(), optional(:description) => binary() | binary(), optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()} | binary(), optional(:shipping_details) => shipping_details() | binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Report informational updates on the specified Payment Record.
Details
- Method:
post - Path:
/v1/payment_records/{id}/report_payment_attempt_informational
@spec report_refund( id :: binary(), params :: %{ optional(:amount) => amount(), optional(:expand) => [binary()], optional(:initiated_at) => integer(), optional(:metadata) => %{optional(binary()) => binary()} | binary(), optional(:outcome) => :refunded, optional(:processor_details) => processor_details(), optional(:refunded) => refunded() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Report that the most recent payment attempt on the specified Payment Record was refunded.
#### Details * Method: `post` * Path: `/v1/payment_records/{id}/report_refund`@spec retrieve( id :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves a Payment Record with the given ID
Details
- Method:
get - Path:
/v1/payment_records/{id}