Parameters for source create.
Summary
Types
@type mandate() :: %{ optional(:acceptance) => mandate_acceptance() | nil, optional(:amount) => map() | nil, optional(:currency) => String.t() | nil, optional(:interval) => String.t() | nil, optional(:notification_method) => String.t() | nil, optional(String.t()) => term() }
acceptance- The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.amount- The amount specified by the mandate. (Leave null for a mandate covering all amounts)currency- The currency specified by the mandate. (Must matchcurrencyof the source) Format: ISO 4217 currency code.interval- The interval of debits permitted by the mandate. Eitherone_time(just permitting a single debit),scheduled(with debits on an agreed schedule or for clearly-defined events), orvariable(for debits with any frequency) Possible values:one_time,scheduled,variable. Max length: 5000.notification_method- The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Eitheremail(an email is sent directly to the customer),manual(asource.mandate_notificationevent is sent to your webhooks endpoint and you should handle the notification) ornone(the underlying debit network does not require any notification). Possible values:deprecated_none,email,manual,none,stripe_email. Max length: 5000.
@type mandate_acceptance() :: %{ optional(:date) => integer() | nil, optional(:ip) => String.t() | nil, optional(:offline) => mandate_acceptance_offline() | nil, optional(:online) => mandate_acceptance_online() | nil, optional(:status) => String.t() | nil, optional(:type) => String.t() | nil, optional(:user_agent) => String.t() | nil, optional(String.t()) => term() }
date- The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. Format: Unix timestamp.ip- The IP address from which the mandate was accepted or refused by the customer.offline- The parameters required to store a mandate accepted offline. Should only be set ifmandate[type]isofflineonline- The parameters required to store a mandate accepted online. Should only be set ifmandate[type]isonlinestatus- The status of the mandate acceptance. Eitheraccepted(the mandate was accepted) orrefused(the mandate was refused). Possible values:accepted,pending,refused,revoked. Max length: 5000.type- The type of acceptance information included with the mandate. EitheronlineorofflinePossible values:offline,online. Max length: 5000.user_agent- The user agent of the browser from which the mandate was accepted or refused by the customer. Max length: 5000.
@type mandate_acceptance_offline() :: %{ optional(:contact_email) => String.t() | nil, optional(String.t()) => term() }
contact_email- An email to contact you with if a copy of the mandate is requested, required iftypeisoffline.
@type mandate_acceptance_online() :: %{ optional(:date) => integer() | nil, optional(:ip) => String.t() | nil, optional(:user_agent) => String.t() | nil, optional(String.t()) => term() }
date- The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. Format: Unix timestamp.ip- The IP address from which the mandate was accepted or refused by the customer.user_agent- The user agent of the browser from which the mandate was accepted or refused by the customer. Max length: 5000.
@type owner() :: %{ optional(:address) => owner_address() | nil, optional(:email) => String.t() | nil, optional(:name) => String.t() | nil, optional(:phone) => String.t() | nil, optional(String.t()) => term() }
address- Owner's address.email- Owner's email address.name- Owner's full name. Max length: 5000.phone- Owner's phone number. Max length: 5000.
@type owner_address() :: %{ optional(:city) => String.t() | nil, optional(:country) => String.t() | nil, optional(:line1) => String.t() | nil, optional(:line2) => String.t() | nil, optional(:postal_code) => String.t() | nil, optional(:state) => String.t() | nil, optional(String.t()) => term() }
city- City, district, suburb, town, or village. Max length: 5000.country- Two-letter country code (ISO 3166-1 alpha-2). Max length: 5000.line1- Address line 1, such as the street, PO Box, or company name. Max length: 5000.line2- Address line 2, such as the apartment, suite, unit, or building. Max length: 5000.postal_code- ZIP or postal code. Max length: 5000.state- State, county, province, or region (ISO 3166-2). Max length: 5000.
@type receiver() :: %{ optional(:refund_attributes_method) => String.t() | nil, optional(String.t()) => term() }
refund_attributes_method- The method Stripe should use to request information needed to process a refund or mispayment. Eitheremail(an email is sent directly to the customer) ormanual(asource.refund_attributes_requiredevent is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. Possible values:email,manual,none. Max length: 5000.
return_url- The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application.
@type source_order() :: %{ optional(:items) => [source_order_items()] | nil, optional(:shipping) => source_order_shipping() | nil, optional(String.t()) => term() }
items- List of items constituting the order.shipping- Shipping address for the order. Required if any of the SKUs are for products that haveshippableset to true.
@type source_order_items() :: %{ optional(:amount) => integer() | nil, optional(:currency) => String.t() | nil, optional(:description) => String.t() | nil, optional(:parent) => String.t() | nil, optional(:quantity) => integer() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
amountcurrency- Format: ISO 4217 currency code.description- Max length: 1000.parent- The ID of the SKU being ordered. Max length: 5000.quantity- The quantity of this order item. When type issku, this is the number of instances of the SKU to be ordered.type- Possible values:discount,shipping,sku,tax. Max length: 5000.
@type source_order_shipping() :: %{ optional(:address) => source_order_shipping_address() | nil, optional(:carrier) => String.t() | nil, optional(:name) => String.t() | nil, optional(:phone) => String.t() | nil, optional(:tracking_number) => String.t() | nil, optional(String.t()) => term() }
address- Shipping address.carrier- The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. Max length: 5000.name- Recipient name. Max length: 5000.phone- Recipient phone (including extension). Max length: 5000.tracking_number- The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. Max length: 5000.
@type source_order_shipping_address() :: %{ optional(:city) => String.t() | nil, optional(:country) => String.t() | nil, optional(:line1) => String.t() | nil, optional(:line2) => String.t() | nil, optional(:postal_code) => String.t() | nil, optional(:state) => String.t() | nil, optional(String.t()) => term() }
city- City, district, suburb, town, or village. Max length: 5000.country- Two-letter country code (ISO 3166-1 alpha-2). Max length: 5000.line1- Address line 1, such as the street, PO Box, or company name. Max length: 5000.line2- Address line 2, such as the apartment, suite, unit, or building. Max length: 5000.postal_code- ZIP or postal code. Max length: 5000.state- State, county, province, or region (ISO 3166-2). Max length: 5000.
@type t() :: %Stripe.Params.SourceCreateParams{ amount: integer() | nil, currency: String.t() | nil, customer: String.t() | nil, expand: [String.t()] | nil, flow: String.t() | nil, mandate: mandate() | nil, metadata: %{required(String.t()) => String.t()} | nil, original_source: String.t() | nil, owner: owner() | nil, receiver: receiver() | nil, redirect: redirect() | nil, source_order: source_order() | nil, statement_descriptor: String.t() | nil, token: String.t() | nil, type: String.t() | nil, usage: String.t() | nil }
amount- Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required forsingle_usesources. Not supported forreceivertype sources, where charge amount may not be specified until funds land.currency- Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Format: ISO 4217 currency code.customer- TheCustomerto whom the original source is attached to. Must be set when the original source is not aSource(e.g.,Card). Max length: 500.expand- Specifies which fields in the response should be expanded.flow- The authenticationflowof the source to create.flowis one ofredirect,receiver,code_verification,none. It is generally inferred unless a type supports multiple flows. Possible values:code_verification,none,receiver,redirect. Max length: 5000.mandate- Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.metadataoriginal_source- The source to share. Max length: 5000.owner- Information about the owner of the payment instrument that may be used or required by particular source types.receiver- Optional parameters for the receiver flow. Can be set only if the source is a receiver (flowisreceiver).redirect- Parameters required for the redirect flow. Required if the source is authenticated by a redirect (flowisredirect).source_order- Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.statement_descriptor- An arbitrary string to be displayed on your customer's statement. As an example, if your website isRunCluband the item you're charging for is a race ticket, you may want to specify astatement_descriptorofRunClub 5K race ticket.While many payment types will display this information, some may not display it at all. Max length: 5000.token- An optional token used to create the source. When passed, token properties will override source parameters. Max length: 5000.type- Thetypeof the source to create. Required unlesscustomerandoriginal_sourceare specified (see the Cloning card Sources guide) Max length: 5000.usage- Possible values:reusable,single_use. Max length: 5000.