diff --git a/types/2020-03-02/Accounts.d.ts b/types/2020-03-02/Accounts.d.ts index 99ed9b8dfa..b31890365c 100644 --- a/types/2020-03-02/Accounts.d.ts +++ b/types/2020-03-02/Accounts.d.ts @@ -2159,6 +2159,7 @@ declare module 'stripe' { /** * Updates the metadata, account holder name, and account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design. + * * You can re-enable a disabled bank account by performing an update call without providing any arguments or changes. */ updateExternalAccount( diff --git a/types/2020-03-02/BalanceTransactions.d.ts b/types/2020-03-02/BalanceTransactions.d.ts index 607bc9f465..5fe8df77b0 100644 --- a/types/2020-03-02/BalanceTransactions.d.ts +++ b/types/2020-03-02/BalanceTransactions.d.ts @@ -92,7 +92,7 @@ declare module 'stripe' { status: string; /** - * Transaction type: `adjustment`, `advance`, `advance_funding`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. + * Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. */ type: BalanceTransaction.Type; } @@ -129,6 +129,7 @@ declare module 'stripe' { | 'adjustment' | 'advance' | 'advance_funding' + | 'anticipation_repayment' | 'application_fee' | 'application_fee_refund' | 'charge' @@ -191,7 +192,7 @@ declare module 'stripe' { source?: string; /** - * Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + * Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ type?: string; } diff --git a/types/2020-03-02/BillingPortal/Sessions.d.ts b/types/2020-03-02/BillingPortal/Sessions.d.ts index acd1d7168c..fd82646936 100644 --- a/types/2020-03-02/BillingPortal/Sessions.d.ts +++ b/types/2020-03-02/BillingPortal/Sessions.d.ts @@ -60,7 +60,7 @@ declare module 'stripe' { class SessionsResource { /** - * Creates a session of the self-serve Portal. + * Creates a session of the self-serve portal. */ create( params: SessionCreateParams, diff --git a/types/2020-03-02/Charges.d.ts b/types/2020-03-02/Charges.d.ts index afacc9b853..a730990bf8 100644 --- a/types/2020-03-02/Charges.d.ts +++ b/types/2020-03-02/Charges.d.ts @@ -401,6 +401,8 @@ declare module 'stripe' { ideal?: PaymentMethodDetails.Ideal; + interac_present?: PaymentMethodDetails.InteracPresent; + klarna?: PaymentMethodDetails.Klarna; multibanco?: PaymentMethodDetails.Multibanco; @@ -1067,6 +1069,122 @@ declare module 'stripe' { | 'TRIONL2U'; } + 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 (`/`). + */ + 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; + + /** + * Authorization response cryptogram. + */ + emv_auth_data: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number | null; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number | null; + + /** + * 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. + */ + 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; + + /** + * The last four digits of the card. + */ + last4: string | null; + + /** + * Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + network: string | null; + + /** + * How were card details read in this transaction. Can be contact_emv, contactless_emv, magnetic_stripe_fallback, magnetic_stripe_track2, or contactless_magstripe_mode + */ + read_method: string | null; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ + receipt: InteracPresent.Receipt | null; + } + + namespace InteracPresent { + interface Receipt { + /** + * For Interac transactions - the source account type of the funds + */ + account_type?: string; + + /** + * EMV tag 9F26, cryptogram generated by the integrated circuit chip. + */ + application_cryptogram: string | null; + + /** + * Mnenomic of the Application Identifier. + */ + application_preferred_name: string | null; + + /** + * Identifier for this transaction. + */ + authorization_code: string | null; + + /** + * EMV tag 8A. A code returned by the card issuer. + */ + authorization_response_code: string | null; + + /** + * How the cardholder verified ownership of the card. + */ + cardholder_verification_method: string | null; + + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + dedicated_file_name: string | null; + + /** + * The outcome of a series of EMV functions performed by the card reader. + */ + terminal_verification_results: string | null; + + /** + * An indication of various EMV functions performed during the transaction. + */ + transaction_status_information: string | null; + } + } + interface Klarna {} interface Multibanco { diff --git a/types/2020-03-02/Checkout/Sessions.d.ts b/types/2020-03-02/Checkout/Sessions.d.ts index a63e47c29b..0e7fa0a356 100644 --- a/types/2020-03-02/Checkout/Sessions.d.ts +++ b/types/2020-03-02/Checkout/Sessions.d.ts @@ -58,9 +58,9 @@ declare module 'stripe' { display_items?: Array; /** - * The line items purchased by the customer. [Expand](https://stripe.com/docs/api/expanding_objects) this field to include it in the response. + * The line items purchased by the customer. */ - line_items?: ApiList | null; + line_items?: ApiList; /** * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -150,7 +150,7 @@ declare module 'stripe' { * * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/billing/subscriptions/products-and-prices). + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/billing/prices-guide). */ plan?: Stripe.Plan; @@ -509,7 +509,7 @@ declare module 'stripe' { * is complete. * If you'd like access to the Checkout Session for the successful * payment, read more about it in our guide on [fulfilling your payments - * with webhooks](https://stripe.com/docs/payments/checkout/fulfillment#webhooks). + * with webhooks](https://stripe.com/docs/payments/checkout/accept-a-payment#payment-success). */ success_url: string; diff --git a/types/2020-03-02/CreditNotes.d.ts b/types/2020-03-02/CreditNotes.d.ts index ea2d7b44fa..c07f82bb5e 100644 --- a/types/2020-03-02/CreditNotes.d.ts +++ b/types/2020-03-02/CreditNotes.d.ts @@ -434,9 +434,9 @@ declare module 'stripe' { * in any combination of the following: * * - * Refund: create a new refund (using refund_amount) or link an existing refund (using refund). - * Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. - * Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). + * Refund: create a new refund (using refund_amount) or link an existing refund (using refund). + * Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. + * Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). * * * For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total. diff --git a/types/2020-03-02/Issuing/Transactions.d.ts b/types/2020-03-02/Issuing/Transactions.d.ts index 7093920a02..3c00294900 100644 --- a/types/2020-03-02/Issuing/Transactions.d.ts +++ b/types/2020-03-02/Issuing/Transactions.d.ts @@ -179,7 +179,7 @@ declare module 'stripe' { namespace Flight { interface Segment { /** - * The flight's destination airport code. + * The three-letter IATA airport code of the flight's destination. */ arrival_airport_code: string | null; @@ -189,7 +189,7 @@ declare module 'stripe' { carrier: string | null; /** - * The airport code that the flight departed from. + * The three-letter IATA airport code that the flight departed from. */ departure_airport_code: string | null; diff --git a/types/2020-03-02/PaymentMethods.d.ts b/types/2020-03-02/PaymentMethods.d.ts index 6a1a60bd27..e96b366394 100644 --- a/types/2020-03-02/PaymentMethods.d.ts +++ b/types/2020-03-02/PaymentMethods.d.ts @@ -36,6 +36,8 @@ declare module 'stripe' { ideal?: PaymentMethod.Ideal; + interac_present?: PaymentMethod.InteracPresent; + /** * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -355,6 +357,8 @@ declare module 'stripe' { | 'TRIONL2U'; } + interface InteracPresent {} + interface SepaDebit { /** * Bank code of bank associated with the bank account. @@ -427,6 +431,11 @@ declare module 'stripe' { */ ideal?: PaymentMethodCreateParams.Ideal; + /** + * If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + */ + interac_present?: PaymentMethodCreateParams.InteracPresent; + /** * 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -604,6 +613,8 @@ declare module 'stripe' { | 'van_lanschot'; } + interface InteracPresent {} + interface SepaDebit { /** * IBAN of the bank account. diff --git a/types/2020-03-02/Prices.d.ts b/types/2020-03-02/Prices.d.ts index b7a81e68ba..916ce89309 100644 --- a/types/2020-03-02/Prices.d.ts +++ b/types/2020-03-02/Prices.d.ts @@ -69,7 +69,7 @@ declare module 'stripe' { /** * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers: Array | null; + tiers?: Array; /** * Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. diff --git a/types/2020-03-02/Reporting/ReportRuns.d.ts b/types/2020-03-02/Reporting/ReportRuns.d.ts index 39b3df9812..2e5a6bb751 100644 --- a/types/2020-03-02/Reporting/ReportRuns.d.ts +++ b/types/2020-03-02/Reporting/ReportRuns.d.ts @@ -166,6 +166,7 @@ declare module 'stripe' { type ReportingCategory = | 'advance' | 'advance_funding' + | 'anticipation_repayment' | 'charge' | 'charge_failure' | 'connect_collection_transfer' diff --git a/types/2020-03-02/SubscriptionItems.d.ts b/types/2020-03-02/SubscriptionItems.d.ts index fbf7212080..fa54dc10cd 100644 --- a/types/2020-03-02/SubscriptionItems.d.ts +++ b/types/2020-03-02/SubscriptionItems.d.ts @@ -39,7 +39,7 @@ declare module 'stripe' { * * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/billing/subscriptions/products-and-prices). + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/billing/prices-guide). */ plan: Stripe.Plan; diff --git a/types/2020-03-02/SubscriptionSchedules.d.ts b/types/2020-03-02/SubscriptionSchedules.d.ts index 5d22b7916f..c200d76ccf 100644 --- a/types/2020-03-02/SubscriptionSchedules.d.ts +++ b/types/2020-03-02/SubscriptionSchedules.d.ts @@ -115,6 +115,11 @@ declare module 'stripe' { * The subscription schedule's default invoice settings. */ invoice_settings: DefaultSettings.InvoiceSettings | null; + + /** + * The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ + transfer_data?: DefaultSettings.TransferData | null; } namespace DefaultSettings { @@ -138,6 +143,18 @@ declare module 'stripe' { */ days_until_due: number | null; } + + interface TransferData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount_percent: number | null; + + /** + * The account where funds from the payment will be transferred to upon payment success. + */ + destination: string | Stripe.Account; + } } type EndBehavior = 'cancel' | 'none' | 'release' | 'renew'; @@ -208,6 +225,11 @@ declare module 'stripe' { */ tax_percent: number | null; + /** + * The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ + transfer_data?: Phase.TransferData | null; + /** * When the trial ends within the phase. */ @@ -288,6 +310,18 @@ declare module 'stripe' { | 'always_invoice' | 'create_prorations' | 'none'; + + interface TransferData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount_percent: number | null; + + /** + * The account where funds from the payment will be transferred to upon payment success. + */ + destination: string | Stripe.Account; + } } type Status = @@ -361,6 +395,11 @@ declare module 'stripe' { * All invoices will be billed using the specified settings. */ invoice_settings?: DefaultSettings.InvoiceSettings; + + /** + * The data with which to automatically create a Transfer for each of the subscription's invoices. + */ + transfer_data?: DefaultSettings.TransferData | null; } namespace DefaultSettings { @@ -384,6 +423,18 @@ declare module 'stripe' { */ days_until_due?: number; } + + interface TransferData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount_percent?: number; + + /** + * ID of an existing, connected Stripe account. + */ + destination: string; + } } type EndBehavior = 'cancel' | 'none' | 'release' | 'renew'; @@ -454,6 +505,11 @@ declare module 'stripe' { */ tax_percent?: number; + /** + * The data with which to automatically create a Transfer for each of the subscription's invoices. + */ + transfer_data?: Phase.TransferData; + /** * If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. */ @@ -618,6 +674,18 @@ declare module 'stripe' { | 'always_invoice' | 'create_prorations' | 'none'; + + interface TransferData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount_percent?: number; + + /** + * ID of an existing, connected Stripe account. + */ + destination: string; + } } } @@ -686,6 +754,11 @@ declare module 'stripe' { * All invoices will be billed using the specified settings. */ invoice_settings?: DefaultSettings.InvoiceSettings; + + /** + * The data with which to automatically create a Transfer for each of the subscription's invoices. + */ + transfer_data?: DefaultSettings.TransferData | null; } namespace DefaultSettings { @@ -709,6 +782,18 @@ declare module 'stripe' { */ days_until_due?: number; } + + interface TransferData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount_percent?: number; + + /** + * ID of an existing, connected Stripe account. + */ + destination: string; + } } type EndBehavior = 'cancel' | 'none' | 'release' | 'renew'; @@ -784,6 +869,11 @@ declare module 'stripe' { */ tax_percent?: number; + /** + * The data with which to automatically create a Transfer for each of the subscription's invoices. + */ + transfer_data?: Phase.TransferData; + /** * If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. */ @@ -948,6 +1038,18 @@ declare module 'stripe' { | 'always_invoice' | 'create_prorations' | 'none'; + + interface TransferData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount_percent?: number; + + /** + * ID of an existing, connected Stripe account. + */ + destination: string; + } } type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';