Net::API::Stripe::Payment::Method - A Stripe Payment Method Object
my $pm = $stripe->payment_method({ billing_details => $billing_details_object, card => $card_object, metadata => { transaction_id => 123, customer_id => 456 }, type => 'card', });
See documentation in Net::API::Stripe for example to make api calls to Stripe to create those objects.
v0.3.0
PaymentMethod objects represent your customer's payment instruments. They can be used with PaymentIntents (https://stripe.com/docs/payments/payment-intents) to collect payments or saved to Customer objects to store instrument details for future payments.
Creates a new Net::API::Stripe::Payment::Method object. It may also take an hash like arguments, that also are method of the same name.
Unique identifier for the object.
String representing the object’s type. Objects of the same type share the same value.
If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
The Stripe API docs does not document any hash properties. There is some information about possible attributes here
If this is an au_becs_debit PaymentMethod, this hash contains details about the bank account.
Six-digit number identifying bank and branch associated with this bank account.
Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
Last four digits of the bank account number.
If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
It has the following properties:
The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.
The unique reference identifying the mandate on the Bacs network.
Sort code of the bank account. (e.g., `10-20-30`)
The URL that will contain the mandate that the customer has signed.
If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
The Stripe API docs does not document any hash properties.
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
This is a Net::API::Stripe::Billing::Details object.
If this is a boleto PaymentMethod, this hash contains details about the Boleto payment method.
boleto
fingerprint
tax_id
Uniquely identifies the customer tax id (CNPJ or CPF)
If this is a card PaymentMethod, this hash contains details about the card.
This is a Net::API::Stripe::Connect::ExternalAccount::Card object.
If this is an card_present PaymentMethod, this hash contains details about the Card Present payment method.
Time at which the object was created. Measured in seconds since the Unix epoch.
The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
If this is an fpx PaymentMethod, this hash contains details about the FPX payment method.
The customer’s bank, if provided. Can be one of affin_bank, alliance_bank, ambank, bank_islam, bank_muamalat, bank_rakyat, bsn, cimb, hong_leong_bank, hsbc, kfh, maybank2u, ocbc, public_bank, rhb, standard_chartered, uob, deutsche_bank, maybank2e, or pb_enterprise.
If this is a giropay PaymentMethod, this hash contains details about the Giropay payment method.
giropay
If this is a grabpay PaymentMethod, this hash contains details about the GrabPay payment method.
grabpay
This is just a property with an empty hash. There are a few instances of this on Stripe api documentation.
If this is an ideal PaymentMethod, this hash contains details about the iDEAL payment method.
The customer’s bank, if provided. Can be one of abn_amro, asn_bank, bunq, handelsbanken, ing, knab, moneyou, rabobank, regiobank, sns_bank, triodos_bank, or van_lanschot.
The Bank Identifier Code of the customer’s bank, if the bank was provided.
If this is an interac_present PaymentMethod, this hash contains details about the Interac Present payment method.
interac_present
If this is a klarna PaymentMethod, this hash contains details about the Klarna payment method.
klarna
This is a Net::API::Stripe::Connect::Person object.
If this is an Link PaymentMethod, this hash contains details about the Link payment method.
Link
email
Account owner's email address.
persistent_token
Token used for persistent Link logins.
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
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 this is an oxxo PaymentMethod, this hash contains details about the OXXO payment method.
oxxo
The Stripe API docs now has the following properties:
he number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
If this is a p24 PaymentMethod, this hash contains details about the P24 payment method.
p24
The customer's bank, if provided.
If this is a paynow PaymentMethod, this hash contains details about the PayNow payment method.
paynow
If this is a promptpay PaymentMethod, this hash contains details about the PromptPay payment method.
promptpay
Options to configure Radar. See Radar Session for more information.
This is a Net::API::Stripe::Fraud::Review object.
If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA debit bank account.
This is a Net::API::Stripe::Connect::ExternalAccount::Card object which uses the following properties:
Bank code of bank associated with the bank account.
Branch code of bank associated with the bank account.
Two-letter ISO code representing the country the bank account is located in.
Information about the object that generated this PaymentMethod.
The ID of the Charge that generated this PaymentMethod, if any.
The ID of the SetupAttempt that generated this PaymentMethod, if any.
Last four characters of the IBAN.
If this is a sofort PaymentMethod, this hash contains details about the SOFORT payment method.
sofort
Preferred language of the Bancontact authorization page that the customer is redirected to.
The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
Possible enum values: card, fpx, ideal, sepa_debit
If this is an us_bank_account PaymentMethod, this hash contains details about the US bank account payment method.
us_bank_account
This is a Net::API::Stripe::Connect::ExternalAccount::Bank object.
If this is an wechat_pay PaymentMethod, this hash contains details about the wechat_pay payment method.
wechat_pay
{ "id": "pm_123456789", "object": "payment_method", "billing_details": { "address": { "city": "Anytown", "country": "US", "line1": "1234 Main street", "line2": null, "postal_code": "123456", "state": null }, "email": "jenny@example.com", "name": null, "phone": "+15555555555" }, "card": { "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": null }, "country": "US", "exp_month": 8, "exp_year": 2020, "fingerprint": "kabvjbjcnbmbcmn", "funding": "credit", "generated_from": null, "last4": "4242", "three_d_secure_usage": { "supported": true }, "wallet": null }, "created": 123456789, "customer": null, "livemode": false, "metadata": { "order_id": "123456789" }, "type": "card" }
Initial version
Added properties ideal and sepa_debit
Jacques Deguest <jack@deguest.jp>
Stripe API documentation:
https://stripe.com/docs/api/payment_methods, https://stripe.com/docs/payments/payment-methods, https://stripe.com/docs/payments/cards/reusing-cards
Copyright (c) 2020-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.