Net::API::Stripe::Payment::Source - A Stripe Payment Source Object
my $source = $stripe->source({ account => $account_object, account_holder_name => 'John Doe', account_holder_type => 'individual', active => $stripe->true, # Or maybe more simply you pass a Net::API::Stripe::Address object # address => $address_object address_line1 => '1-2-3 Kudan-Minami, Chiyoda-ku', address_line2 => 'Big Bldg 12F', address_city => 'Tokyo', address_state => undef, address_zip => '123-4567', address_country => 'jp', amount => 2000, brand => 'Visa', card => $card_object, country => 'jp', currency => 'jpy', description => 'Primary source for customer', email => 'john.doe@example.com', exp_month => 4, exp_year => 2030, funding => 'debit', metadata => { transaction_id => 123, customer_id => 456 }, name => 'John Doe', statement_descriptor => 'Big Corp Services', type => 'card', });
See documentation in Net::API::Stripe for example to make api calls to Stripe to create those objects.
v0.100.0
Source objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like a Card object: once chargeable, they can be charged, or can be attached to customers.
Stripe states this approach for card is deprecated in favour or PaymentIntent: https://stripe.com/docs/sources/cards
Creates a new Net::API::Stripe::Payment::Source object.
Unique identifier for the object.
String representing the object’s type. Objects of the same type share the same value.
The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
When expanded, this is a Net::API::Stripe::Connect::Account
The name of the person or business that owns the bank account.
The type of entity that holds the account. This can be either individual or company.
If type is set to ach_credit_transfer, this is a Net::API::Stripe::Payment::Source::ACHCreditTransfer object.
ach_credit_transfer
It is not very clear in the Stripe API, but in the type property, they mention "An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method (https://stripe.com/docs/sources) used." :/
If type is set to ach_debit, this is a Net::API::Stripe::Payment::Source::ACHDebit object.
ach_debit
True when this bitcoin receiver has received a non-zero amount of bitcoin.
This is a helper method. Provided with either a Net::API::Stripe::Address object or a hash with same properties, this will assign all the address_* properties by calling its method.
City/District/Suburb/Town/Village.
Billing address country, if provided when creating card.
Address line 1 (Street address/PO Box/Company name).
If address_line1 was provided, results of the check: pass, fail, unavailable, or unchecked.
Address line 2 (Apartment/Suite/Unit/Building).
State/County/Province/Region.
ZIP or postal code.
If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked.
If type is set to alipay, this is a Net::API::Stripe::Payment::Method::Details::Alipay object.
alipay
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use sources.
The amount of currency to which bitcoin_amount_received has been converted.
A set of available payout methods for this card. Will be either ["standard"] or ["standard", "instant"]. Only values from this set should be passed as the method when creating a transfer.
If type is set to bancontact, this is a Net::API::Stripe::Payment::Method::Details::BanContact object.
bancontact
Name of the bank associated with the routing number (e.g., WELLS FARGO).
The amount of bitcoin that the customer should send to fill the receiver. The bitcoin_amount is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin.
The amount of bitcoin that has been sent by the customer to this receiver.
This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets).
Card brand. Can be American Express, Diners Club, Discover, JCB, MasterCard, UnionPay, Visa, or Unknown.
If type is set to card, this is a Net::API::Stripe::Payment::Card object. See also https://stripe.com/docs/sources/cards.
card
If type is set to card_present, this is a Net::API::Stripe::Payment::Method::Details::CardPresent object.
card_present
The client secret of the source. Used for client-side retrieval using a publishable key.
Information related to the code verification flow. Present if the source is authenticated by a verification code (flow is code_verification).
This is a Net::API::Stripe::Payment::Source::CodeVerification object.
Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you’ve collected.
Time at which the object was created. Measured in seconds since the Unix epoch.
Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use sources.
The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. If it is expanded, this would be a Net::API::Stripe::Customer object.
If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked.
An arbitrary string attached to the object. Often useful for displaying to users.
(For tokenized numbers only.) The last four digits of the device account number.
The customer’s email address, set by the API call that creates the receiver.
If type is set to eps, this is a Net::API::Stripe::Payment::Method::Details::EPS object.
eps
Two-digit number representing the card’s expiration month.
Four-digit number representing the card’s expiration year.
This flag is initially false and updates to true when the customer sends the bitcoin_amount to this receiver.
Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example.
The authentication flow of the source. flow is one of redirect, receiver, code_verification, none.
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
Card funding type. Can be credit, debit, prepaid, or unknown.
If type is set to giropay, this is a Net::API::Stripe::Payment::Method::Details::Giropay object.
giropay
If type is set to ideal, this is a Net::API::Stripe::Payment::Method::Details::Ideal object.
ideal
A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver.
If type is set to klarna, this is a Net::API::Stripe::Payment::Method::Details::Klarna object.
klarna
The last four digits of the card.
Set 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.
If type is set to multibanco, this is a Net::API::Stripe::Payment::Method::Details::MultiBanco object.
multibanco
Cardholder name.
If type is set to p24, this is a Net::API::Stripe::Payment::Method::Details::P24 object.
p24
The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key.
Information about the owner of the payment instrument that may be used or required by particular source types.
This is a Net::API::Stripe::Payment::Source::Owner object.
If the Alipay account object is not reusable, the exact amount that you can create a charge for.
If the Alipay account object is not reusable, the exact currency that you can create a charge for.
Information related to the receiver flow. Present if the source is a receiver (flow is receiver).
This is a Net::API::Stripe::Payment::Source::Receiver object.
The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead.
When expanded, this is a Net::API::Stripe::Customer.
Information related to the redirect flow. Present if the source is authenticated by a redirect (flow is redirect).
This is a Net::API::Stripe::Payment::Source::Redirect object.
True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment.
The refund address of this bitcoin receiver.
The routing transit number for the bank account.
If type is set to sofort, this is a Net::API::Stripe::Payment::Details::Sofort virtual object, ie it is created dynamically by "set_get_hash_as_object" in Nodule::Generic
sofort
Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. This is a Net::API::Stripe::Order object.
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.
Three-letter ISO currency code, in lowercase. Must be a supported currency.
The email address of the customer placing the order.
List of items constituting the order. This is an array of Net::API::Stripe::Order::Item objects.
The shipping address for the order. Present if the order is for goods to be shipped. This is a Net::API::Stripe::Shipping object
Extra information about a source. This will appear on your customer’s statement every time you charge the source.
The status of the source, one of canceled, chargeable, consumed, failed, or pending. Only chargeable sources can be used to create a charge.
If type is set to stripe_account, this is a Net::API::Stripe::Payment::Method::Details::StripeAccount object.
stripe_account
If the card number is tokenized, this is the method that was used. Can be apple_pay or google_pay.
A list (Net::API::Stripe::List) of Net::API::Stripe::Bitcoin::Transaction object
The type of the source. The type is a payment method, one of ach_credit_transfer, ach_debit, alipay, bancontact, card, card_present, eps, giropay, ideal, multibanco, klarna, p24, sepa_debit, sofort, three_d_secure, or wechat. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method (https://stripe.com/docs/sources) used.
This receiver contains uncaptured funds that can be used for a payment or refunded.
Either reusable or single_use. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
Whether this Alipay account object has ever been used for a payment.
Indicate if this source is used for payment.
The username for the Alipay account.
If "type" is set to wechat, this is a Net::API::Stripe::Payment::Method::Details::WeChat object.
wechat
{ "id": "src_fake123456789", "object": "source", "ach_credit_transfer": { "account_number": "test_52796e3294dc", "routing_number": "110000000", "fingerprint": "anvbmbvmnbvmab", "bank_name": "TEST BANK", "swift_code": "TSTEZ122" }, "amount": null, "client_secret": "src_client_secret_fake123456789", "created": 1571314413, "currency": "jpy", "flow": "receiver", "livemode": false, "metadata": {}, "owner": { "address": null, "email": "jenny.rosen@example.com", "name": null, "phone": null, "verified_address": null, "verified_email": null, "verified_name": null, "verified_phone": null }, "receiver": { "address": "121042882-38381234567890123", "amount_charged": 0, "amount_received": 0, "amount_returned": 0, "refund_attributes_method": "email", "refund_attributes_status": "missing" }, "statement_descriptor": null, "status": "pending", "type": "ach_credit_transfer", "usage": "reusable" }
Initial version
When being viewed by a platform, cards and bank accounts created on behalf of connected accounts will have a fingerprint that is universal across all connected accounts. For accounts that are not connect platforms, there will be no change.
Jacques Deguest <jack@deguest.jp>
Stripe API documentation:
https://stripe.com/docs/api/sources, https://stripe.com/docs/sources, https://stripe.com/docs/sources/customers
Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.
To install Net::API::Stripe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::API::Stripe
CPAN shell
perl -MCPAN -e shell install Net::API::Stripe
For more information on module installation, please visit the detailed CPAN module installation guide.