stripe
Version:
Stripe API wrapper
1,043 lines • 110 kB
TypeScript
import { StripeResource } from '../StripeResource.js';
import { Application } from './Applications.js';
import { ApplicationFee } from './ApplicationFees.js';
import { BalanceTransaction } from './BalanceTransactions.js';
import { Customer, DeletedCustomer } from './Customers.js';
import { Account } from './Accounts.js';
import { PaymentIntent } from './PaymentIntents.js';
import { Refund } from './Refunds.js';
import { Review } from './Reviews.js';
import { CustomerSource } from './CustomerSources.js';
import { Transfer } from './Transfers.js';
import { PaymentMethod } from './PaymentMethods.js';
import { Mandate } from './Mandates.js';
import { Emptyable, MetadataParam, AddressParam, PaginationParams, RangeQueryParam, Metadata, Address } from '../shared.js';
import { RequestOptions, ApiListPromise, Response, ApiList, ApiSearchResultPromise } from '../lib.js';
export declare class ChargeResource extends StripeResource {
/**
* Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first.
*/
list(params?: ChargeListParams, options?: RequestOptions): ApiListPromise<Charge>;
/**
* This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents)
* to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
* object used to request payment.
*/
create(params?: ChargeCreateParams, options?: RequestOptions): Promise<Response<Charge>>;
/**
* Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.
*/
retrieve(id: string, params?: ChargeRetrieveParams, options?: RequestOptions): Promise<Response<Charge>>;
/**
* Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
*/
update(id: string, params?: ChargeUpdateParams, options?: RequestOptions): Promise<Response<Charge>>;
/**
* Search for charges you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
* Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
* conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
* to an hour behind during outages. Search functionality is not available to merchants in India.
*/
search(params: ChargeSearchParams, options?: RequestOptions): ApiSearchResultPromise<Charge>;
/**
* Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
*
* Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
*
* Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
*/
capture(id: string, params?: ChargeCaptureParams, options?: RequestOptions): Promise<Response<Charge>>;
}
export interface Charge {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'charge';
/**
* Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
*/
amount: number;
/**
* Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
*/
amount_captured: number;
/**
* Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
*/
amount_refunded: number;
/**
* ID of the Connect application that created the charge.
*/
application: string | Application | null;
/**
* The application fee (if any) for the charge. [See the Connect documentation](https://docs.stripe.com/connect/direct-charges#collect-fees) for details.
*/
application_fee: string | ApplicationFee | null;
/**
* The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://docs.stripe.com/connect/direct-charges#collect-fees) for details.
*/
application_fee_amount: number | null;
/**
* Authorization code on the charge.
*/
authorization_code?: string;
/**
* ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
*/
balance_transaction: string | BalanceTransaction | null;
billing_details: Charge.BillingDetails;
/**
* The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments.
*/
calculated_statement_descriptor: string | null;
/**
* If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
*/
captured: boolean;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency: string;
/**
* ID of the customer this charge is for if one exists.
*/
customer: string | Customer | DeletedCustomer | null;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string | null;
/**
* Whether the charge has been disputed.
*/
disputed: boolean;
/**
* ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
*/
failure_balance_transaction: string | BalanceTransaction | null;
/**
* Error code explaining reason for charge failure if available (see [the errors section](https://docs.stripe.com/error-codes) for a list of codes).
*/
failure_code: string | null;
/**
* Message to user further explaining reason for charge failure if available.
*/
failure_message: string | null;
/**
* Information on fraud assessments for the charge.
*/
fraud_details: Charge.FraudDetails | null;
level3?: Charge.Level3;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata;
/**
* The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://docs.stripe.com/connect/separate-charges-and-transfers) for details.
*/
on_behalf_of: string | Account | null;
/**
* Details about whether the payment was accepted, and why. See [understanding declines](https://docs.stripe.com/declines) for details.
*/
outcome: Charge.Outcome | null;
/**
* `true` if the charge succeeded, or was successfully authorized for later capture.
*/
paid: boolean;
/**
* ID of the PaymentIntent associated with this charge, if one exists.
*/
payment_intent: string | PaymentIntent | null;
/**
* ID of the payment method used in this charge.
*/
payment_method: string | null;
/**
* Details about the payment method at the time of the transaction.
*/
payment_method_details: Charge.PaymentMethodDetails | null;
presentment_details?: Charge.PresentmentDetails;
/**
* Options to configure Radar. See [Radar Session](https://docs.stripe.com/radar/radar-session) for more information.
*/
radar_options?: Charge.RadarOptions;
/**
* This is the email address that the receipt for this charge was sent to.
*/
receipt_email: string | null;
/**
* This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent.
*/
receipt_number: string | null;
/**
* This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
*/
receipt_url: string | null;
/**
* Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
*/
refunded: boolean;
/**
* A list of refunds that have been applied to the charge.
*/
refunds?: ApiList<Refund> | null;
/**
* ID of the review associated with this charge if one exists.
*/
review: string | Review | null;
/**
* Shipping information for the charge.
*/
shipping: Charge.Shipping | null;
/**
* This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead.
*/
source: CustomerSource | null;
/**
* The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details.
*/
source_transfer: string | Transfer | null;
/**
* For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
*
* For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
*/
statement_descriptor: string | null;
/**
* Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
*/
statement_descriptor_suffix: string | null;
/**
* The status of the payment is either `succeeded`, `pending`, or `failed`.
*/
status: Charge.Status;
/**
* ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).
*/
transfer?: string | Transfer;
/**
* An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details.
*/
transfer_data: Charge.TransferData | null;
/**
* A string that identifies this transaction as part of a group. See the [Connect documentation](https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options) for details.
*/
transfer_group: string | null;
}
export declare namespace Charge {
interface BillingDetails {
/**
* Billing address.
*/
address: Address | null;
/**
* Email address.
*/
email: string | null;
/**
* Full name.
*/
name: string | null;
/**
* Billing phone number (including extension).
*/
phone: string | null;
/**
* Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
*/
tax_id: string | null;
}
interface FraudDetails {
/**
* Assessments from Stripe. If set, the value is `fraudulent`.
*/
stripe_report?: string;
/**
* Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.
*/
user_report?: string;
}
interface Level3 {
customer_reference?: string;
line_items: Array<Level3.LineItem>;
merchant_reference: string;
shipping_address_zip?: string;
shipping_amount?: number;
shipping_from_zip?: string;
}
interface Outcome {
/**
* An enumerated value providing a more detailed explanation on [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines).
*/
advice_code: Outcome.AdviceCode | null;
/**
* For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error.
*/
network_advice_code: string | null;
/**
* For charges declined by the network, an alphanumeric code which indicates the reason the charge failed.
*/
network_decline_code: string | null;
/**
* Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://docs.stripe.com/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement.
*/
network_status: string | null;
/**
* An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges blocked because the payment is unlikely to be authorized have the value `low_probability_of_authorization`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://docs.stripe.com/declines) for more details.
*/
reason: string | null;
/**
* Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.
*/
risk_level?: string;
/**
* Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.
*/
risk_score?: number;
/**
* The ID of the Radar rule that matched the payment, if applicable.
*/
rule?: string | Outcome.Rule;
/**
* A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.
*/
seller_message: string | null;
/**
* Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://docs.stripe.com/declines) and [Radar reviews](https://docs.stripe.com/radar/reviews) for details.
*/
type: string;
}
interface PaymentMethodDetails {
ach_credit_transfer?: PaymentMethodDetails.AchCreditTransfer;
ach_debit?: PaymentMethodDetails.AchDebit;
acss_debit?: PaymentMethodDetails.AcssDebit;
affirm?: PaymentMethodDetails.Affirm;
afterpay_clearpay?: PaymentMethodDetails.AfterpayClearpay;
alipay?: PaymentMethodDetails.Alipay;
alma?: PaymentMethodDetails.Alma;
amazon_pay?: PaymentMethodDetails.AmazonPay;
au_becs_debit?: PaymentMethodDetails.AuBecsDebit;
bacs_debit?: PaymentMethodDetails.BacsDebit;
bancontact?: PaymentMethodDetails.Bancontact;
billie?: PaymentMethodDetails.Billie;
blik?: PaymentMethodDetails.Blik;
boleto?: PaymentMethodDetails.Boleto;
card?: PaymentMethodDetails.Card;
card_present?: PaymentMethodDetails.CardPresent;
cashapp?: PaymentMethodDetails.Cashapp;
crypto?: PaymentMethodDetails.Crypto;
customer_balance?: PaymentMethodDetails.CustomerBalance;
eps?: PaymentMethodDetails.Eps;
fpx?: PaymentMethodDetails.Fpx;
giropay?: PaymentMethodDetails.Giropay;
grabpay?: PaymentMethodDetails.Grabpay;
ideal?: PaymentMethodDetails.Ideal;
interac_present?: PaymentMethodDetails.InteracPresent;
kakao_pay?: PaymentMethodDetails.KakaoPay;
klarna?: PaymentMethodDetails.Klarna;
konbini?: PaymentMethodDetails.Konbini;
kr_card?: PaymentMethodDetails.KrCard;
link?: PaymentMethodDetails.Link;
mb_way?: PaymentMethodDetails.MbWay;
mobilepay?: PaymentMethodDetails.Mobilepay;
multibanco?: PaymentMethodDetails.Multibanco;
naver_pay?: PaymentMethodDetails.NaverPay;
nz_bank_account?: PaymentMethodDetails.NzBankAccount;
oxxo?: PaymentMethodDetails.Oxxo;
p24?: PaymentMethodDetails.P24;
pay_by_bank?: PaymentMethodDetails.PayByBank;
payco?: PaymentMethodDetails.Payco;
paynow?: PaymentMethodDetails.Paynow;
paypal?: PaymentMethodDetails.Paypal;
payto?: PaymentMethodDetails.Payto;
pix?: PaymentMethodDetails.Pix;
promptpay?: PaymentMethodDetails.Promptpay;
revolut_pay?: PaymentMethodDetails.RevolutPay;
samsung_pay?: PaymentMethodDetails.SamsungPay;
satispay?: PaymentMethodDetails.Satispay;
sepa_credit_transfer?: PaymentMethodDetails.SepaCreditTransfer;
sepa_debit?: PaymentMethodDetails.SepaDebit;
sofort?: PaymentMethodDetails.Sofort;
stripe_account?: PaymentMethodDetails.StripeAccount;
swish?: PaymentMethodDetails.Swish;
twint?: PaymentMethodDetails.Twint;
/**
* The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type) for the full list of possible types.
* An additional hash is included on `payment_method_details` with a name matching this value.
* It contains information specific to the payment method.
*/
type: string;
upi?: PaymentMethodDetails.Upi;
us_bank_account?: PaymentMethodDetails.UsBankAccount;
wechat?: PaymentMethodDetails.Wechat;
wechat_pay?: PaymentMethodDetails.WechatPay;
zip?: PaymentMethodDetails.Zip;
}
interface PresentmentDetails {
/**
* Amount intended to be collected by this payment, denominated in `presentment_currency`.
*/
presentment_amount: number;
/**
* Currency presented to the customer during payment.
*/
presentment_currency: string;
}
interface RadarOptions {
/**
* A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
*/
session?: string;
}
interface Shipping {
address?: Address;
/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
*/
carrier?: string | null;
/**
* Recipient name.
*/
name?: string;
/**
* Recipient phone (including extension).
*/
phone?: string | null;
/**
* 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.
*/
tracking_number?: string | null;
}
type Status = 'failed' | 'pending' | 'succeeded';
interface TransferData {
/**
* The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
*/
amount: number | null;
/**
* ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.
*/
destination: string | Account;
}
namespace Level3 {
interface LineItem {
discount_amount: number | null;
product_code: string;
product_description: string;
quantity: number | null;
tax_amount: number | null;
unit_cost: number | null;
}
}
namespace Outcome {
type AdviceCode = 'confirm_card_data' | 'do_not_try_again' | 'try_again_later';
interface Rule {
/**
* The action taken on the payment.
*/
action: string;
/**
* Unique identifier for the object.
*/
id: string;
/**
* The predicate to evaluate the payment against.
*/
predicate: string;
}
}
namespace PaymentMethodDetails {
interface AchCreditTransfer {
/**
* Account number to transfer funds to.
*/
account_number: string | null;
/**
* Name of the bank associated with the routing number.
*/
bank_name: string | null;
/**
* Routing transit number for the bank account to transfer funds to.
*/
routing_number: string | null;
/**
* SWIFT code of the bank associated with the routing number.
*/
swift_code: string | null;
}
interface AchDebit {
/**
* Type of entity that holds the account. This can be either `individual` or `company`.
*/
account_holder_type: AchDebit.AccountHolderType | null;
/**
* Name of the bank associated with the bank account.
*/
bank_name: string | null;
/**
* Two-letter ISO code representing the country the bank account is located in.
*/
country: string | null;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four digits of the bank account number.
*/
last4: string | null;
/**
* Routing transit number of the bank account.
*/
routing_number: string | null;
}
interface AcssDebit {
/**
* Name of the bank associated with the bank account.
*/
bank_name: string | null;
/**
* Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.
*/
expected_debit_date?: string;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Institution number of the bank account
*/
institution_number: string | null;
/**
* Last four digits of the bank account number.
*/
last4: string | null;
/**
* ID of the mandate used to make this payment.
*/
mandate?: string;
/**
* Transit number of the bank account.
*/
transit_number: string | null;
}
interface Affirm {
/**
* ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.
*/
location?: string;
/**
* ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.
*/
reader?: string;
/**
* The Affirm transaction ID associated with this payment.
*/
transaction_id: string | null;
}
interface AfterpayClearpay {
/**
* The Afterpay order ID associated with this payment intent.
*/
order_id: string | null;
/**
* Order identifier shown to the merchant in Afterpay's online portal.
*/
reference: string | null;
}
interface Alipay {
/**
* Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
*/
buyer_id?: string;
/**
* Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
*/
fingerprint: string | null;
/**
* Transaction ID of this particular Alipay transaction.
*/
transaction_id: string | null;
}
interface Alma {
installments?: Alma.Installments;
/**
* The Alma transaction ID associated with this payment.
*/
transaction_id: string | null;
}
interface AmazonPay {
funding?: AmazonPay.Funding;
/**
* The Amazon Pay transaction ID associated with this payment.
*/
transaction_id: string | null;
}
interface AuBecsDebit {
/**
* Bank-State-Branch number of the bank account.
*/
bsb_number: string | null;
/**
* Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.
*/
expected_debit_date?: string;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four digits of the bank account number.
*/
last4: string | null;
/**
* ID of the mandate used to make this payment.
*/
mandate?: string;
}
interface BacsDebit {
/**
* Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.
*/
expected_debit_date?: string;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four digits of the bank account number.
*/
last4: string | null;
/**
* ID of the mandate used to make this payment.
*/
mandate: string | null;
/**
* Sort code of the bank account. (e.g., `10-20-30`)
*/
sort_code: string | null;
}
interface Bancontact {
/**
* Bank code of bank associated with the bank account.
*/
bank_code: string | null;
/**
* Name of the bank associated with the bank account.
*/
bank_name: string | null;
/**
* Bank Identifier Code of the bank associated with the bank account.
*/
bic: string | null;
/**
* The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
*/
generated_sepa_debit: string | PaymentMethod | null;
/**
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
*/
generated_sepa_debit_mandate: string | Mandate | null;
/**
* Last four characters of the IBAN.
*/
iban_last4: string | null;
/**
* Preferred language of the Bancontact authorization page that the customer is redirected to.
* Can be one of `en`, `de`, `fr`, or `nl`
*/
preferred_language: Bancontact.PreferredLanguage | null;
/**
* Owner's verified full name. Values are verified or provided by Bancontact directly
* (if supported) at the time of authorization or settlement. They cannot be set or mutated.
*/
verified_name: string | null;
}
interface Billie {
/**
* The Billie transaction ID associated with this payment.
*/
transaction_id: string | null;
}
interface Blik {
/**
* A unique and immutable identifier assigned by BLIK to every buyer.
*/
buyer_id: string | null;
}
interface Boleto {
/**
* The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)
*/
tax_id: string;
}
interface Card {
/**
* The authorized amount.
*/
amount_authorized: number | null;
/**
* Authorization code on the charge.
*/
authorization_code: string | null;
/**
* Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
*/
brand: string | null;
/**
* When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
*/
capture_before?: number;
/**
* Check results by Card networks on Card address and CVC at time of payment.
*/
checks: Card.Checks | null;
/**
* 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.
*/
country: string | null;
/**
* A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
*/
description?: string | null;
/**
* Two-digit number representing the card's expiration month.
*/
exp_month: number;
/**
* Four-digit number representing the card's expiration year.
*/
exp_year: number;
extended_authorization?: Card.ExtendedAuthorization;
/**
* 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. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
*
* *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
*/
fingerprint?: string | null;
/**
* Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
*/
funding: string | null;
/**
* Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
*/
iin?: string | null;
incremental_authorization?: Card.IncrementalAuthorization;
/**
* Installment details for this payment.
*
* For more information, see the [installments integration guide](https://docs.stripe.com/payments/installments).
*/
installments: Card.Installments | null;
/**
* The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
*/
issuer?: string | null;
/**
* The last four digits of the card.
*/
last4: string | null;
/**
* ID of the mandate used to make this payment or created by it.
*/
mandate: string | null;
/**
* True if this payment was marked as MOTO and out of scope for SCA.
*/
moto?: boolean | null;
multicapture?: Card.Multicapture;
/**
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
network: string | null;
/**
* If this card has network token credentials, this contains the details of the network token credentials.
*/
network_token?: Card.NetworkToken | null;
/**
* This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
*/
network_transaction_id: string | null;
overcapture?: Card.Overcapture;
/**
* Status of a card based on the card issuer.
*/
regulated_status: Card.RegulatedStatus | null;
/**
* Populated if this transaction used 3D Secure authentication.
*/
three_d_secure: Card.ThreeDSecure | null;
/**
* If this Card is part of a card wallet, this contains the details of the card wallet.
*/
wallet: Card.Wallet | null;
}
interface CardPresent {
/**
* The authorized amount
*/
amount_authorized: number | null;
/**
* Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
*/
brand: string | null;
/**
* The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
*/
brand_product: string | null;
/**
* When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
*/
capture_before?: number;
/**
* The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
*/
cardholder_name: string | null;
/**
* 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.
*/
country: string | null;
/**
* A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
*/
description?: string | null;
/**
* Authorization response cryptogram.
*/
emv_auth_data: string | null;
/**
* Two-digit number representing the card's expiration month.
*/
exp_month: number;
/**
* Four-digit number representing the card's expiration year.
*/
exp_year: number;
/**
* 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. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
*
* *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
*/
fingerprint: string | null;
/**
* Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
*/
funding: string | null;
/**
* ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
*/
generated_card: string | null;
/**
* Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
*/
iin?: string | null;
/**
* Whether this [PaymentIntent](https://docs.stripe.com/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
*/
incremental_authorization_supported: boolean;
/**
* The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
*/
issuer?: string | null;
/**
* The last four digits of the card.
*/
last4: string | null;
/**
* ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.
*/
location?: string;
/**
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
network: string | null;
/**
* This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
*/
network_transaction_id: string | null;
/**
* Details about payments collected offline.
*/
offline: CardPresent.Offline | null;
/**
* Defines whether the authorized amount can be over-captured or not
*/
overcapture_supported: boolean;
/**
* The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.
*/
preferred_locales: Array<string> | null;
/**
* How card details were read in this transaction.
*/
read_method: CardPresent.ReadMethod | null;
/**
* ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.
*/
reader?: string;
/**
* A collection of fields required to be displayed on receipts. Only required for EMV transactions.
*/
receipt: CardPresent.Receipt | null;
wallet?: CardPresent.Wallet;
}
interface Cashapp {
/**
* A unique and immutable identifier assigned by Cash App to every buyer.
*/
buyer_id: string | null;
/**
* A public identifier for buyers using Cash App.
*/
cashtag: string | null;
/**
* A unique and immutable identifier of payments assigned by Cash App
*/
transaction_id: string | null;
}
interface Crypto {
/**
* The wallet address of the customer.
*/
buyer_address?: string;
/**
* The blockchain network that the transaction was sent on.
*/
network?: Crypto.Network;
/**
* The token currency that the transaction was sent with.
*/
token_currency?: Crypto.TokenCurrency;
/**
* The blockchain transaction hash of the crypto payment.
*/
transaction_hash?: string;
}
interface CustomerBalance {
}
interface Eps {
/**
* The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
*/
bank: Eps.Bank | null;
/**
* Owner's verified full name. Values are verified or provided by EPS directly
* (if supported) at the time of authorization or settlement. They cannot be set or mutated.
* EPS rarely provides this information so the attribute is usually empty.
*/
verified_name: string | null;
}
interface Fpx {
/**
* Account holder type, if provided. Can be one of `individual` or `company`.
*/
account_holder_type: Fpx.AccountHolderType | null;
/**
* The customer's bank. Can be one of `affin_bank`, `agrobank`, `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`, `pb_enterprise`, or `bank_of_china`.
*/
bank: Fpx.Bank;
/**
* Unique transaction id generated by FPX for every request from the merchant
*/
transaction_id: string | null;
}
interface Giropay {
/**
* Bank code of bank associated with the bank account.
*/
bank_code: string | null;
/**
* Name of the bank associated with the bank account.
*/
bank_name: string | null;
/**
* Bank Identifier Code of the bank associated with the bank account.
*/
bic: string | null;
/**
* Owner's verified full name. Values are verified or provided by Giropay directly
* (if supported) at the time of authorization or settlement. They cannot be set or mutated.
* Giropay rarely provides this information so the attribute is usually empty.
*/
verified_name: string | null;
}
interface Grabpay {
/**
* Unique transaction id generated by GrabPay
*/
transaction_id: string | null;
}
interface Ideal {
/**
* The customer's bank. Can be one of `abn_amro`, `adyen`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `mollie`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
*/
bank: Ideal.Bank | null;
/**
* The Bank Identifier Code of the customer's bank.
*/
bic: Ideal.Bic | null;
/**
* The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
*/
generated_sepa_debit: string | PaymentMethod | null;
/**
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
*/
generated_sepa_debit_mandate: string | Mandate | null;
/**
* Last four characters of the IBAN.
*/
iban_last4: string | null;
/**
* Unique transaction ID generated by iDEAL.
*/
transaction_id: string | null;
/**
* Owner's verified full name. Values are verified or provided by iDEAL directly
* (if supported) at the time of authorization or settlement. They cannot be set or mutated.
*/
verified_name: string | null;
}
interface InteracPresent {
/**
* Card brand. Can be `interac`, `mastercard` or `visa`.
*/
brand: string | null;
/**
* The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
*/
cardholder_name: string | null;
/**
* 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.
*/
country: string | null;
/**
* A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
*/
description?: string | null;
/**
* Authorization response cryptogram.
*/
emv_auth_data: string | null;
/**
* Two-digit number representing the card's expiration month.
*/
exp_month: number;
/**
* Four-digit number representing the card's expiration year.
*/
exp_year: number;
/**
* 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. For payment methods that tokenize card informat