| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# File generated from our OpenAPI spec |
| 3 |
from stripe._request_options import RequestOptions |
| 4 |
from typing import Dict, List |
| 5 |
from typing_extensions import Literal, NotRequired, TypedDict |
| 6 |
|
| 7 |
|
| 8 |
class OutboundPaymentCreateParams(RequestOptions): |
| 9 |
amount: int |
| 10 |
""" |
| 11 |
Amount (in cents) to be transferred. |
| 12 |
""" |
| 13 |
currency: str |
| 14 |
""" |
| 15 |
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). |
| 16 |
""" |
| 17 |
customer: NotRequired[str] |
| 18 |
""" |
| 19 |
ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. |
| 20 |
""" |
| 21 |
description: NotRequired[str] |
| 22 |
""" |
| 23 |
An arbitrary string attached to the object. Often useful for displaying to users. |
| 24 |
""" |
| 25 |
destination_payment_method: NotRequired[str] |
| 26 |
""" |
| 27 |
The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. |
| 28 |
""" |
| 29 |
destination_payment_method_data: NotRequired[ |
| 30 |
"OutboundPaymentCreateParamsDestinationPaymentMethodData" |
| 31 |
] |
| 32 |
""" |
| 33 |
Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. |
| 34 |
""" |
| 35 |
destination_payment_method_options: NotRequired[ |
| 36 |
"OutboundPaymentCreateParamsDestinationPaymentMethodOptions" |
| 37 |
] |
| 38 |
""" |
| 39 |
Payment method-specific configuration for this OutboundPayment. |
| 40 |
""" |
| 41 |
end_user_details: NotRequired["OutboundPaymentCreateParamsEndUserDetails"] |
| 42 |
""" |
| 43 |
End user details. |
| 44 |
""" |
| 45 |
expand: NotRequired[List[str]] |
| 46 |
""" |
| 47 |
Specifies which fields in the response should be expanded. |
| 48 |
""" |
| 49 |
financial_account: str |
| 50 |
""" |
| 51 |
The FinancialAccount to pull funds from. |
| 52 |
""" |
| 53 |
metadata: NotRequired[Dict[str, str]] |
| 54 |
""" |
| 55 |
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
| 56 |
""" |
| 57 |
statement_descriptor: NotRequired[str] |
| 58 |
""" |
| 59 |
The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. Can only include -#.$&*, spaces, and alphanumeric characters. The default value is "payment". |
| 60 |
""" |
| 61 |
|
| 62 |
|
| 63 |
class OutboundPaymentCreateParamsDestinationPaymentMethodData(TypedDict): |
| 64 |
billing_details: NotRequired[ |
| 65 |
"OutboundPaymentCreateParamsDestinationPaymentMethodDataBillingDetails" |
| 66 |
] |
| 67 |
""" |
| 68 |
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. |
| 69 |
""" |
| 70 |
financial_account: NotRequired[str] |
| 71 |
""" |
| 72 |
Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. |
| 73 |
""" |
| 74 |
metadata: NotRequired[Dict[str, str]] |
| 75 |
""" |
| 76 |
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
| 77 |
""" |
| 78 |
type: Literal["financial_account", "us_bank_account"] |
| 79 |
""" |
| 80 |
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. |
| 81 |
""" |
| 82 |
us_bank_account: NotRequired[ |
| 83 |
"OutboundPaymentCreateParamsDestinationPaymentMethodDataUsBankAccount" |
| 84 |
] |
| 85 |
""" |
| 86 |
Required hash if type is set to `us_bank_account`. |
| 87 |
""" |
| 88 |
|
| 89 |
|
| 90 |
class OutboundPaymentCreateParamsDestinationPaymentMethodDataBillingDetails( |
| 91 |
TypedDict, |
| 92 |
): |
| 93 |
address: NotRequired[ |
| 94 |
"Literal['']|OutboundPaymentCreateParamsDestinationPaymentMethodDataBillingDetailsAddress" |
| 95 |
] |
| 96 |
""" |
| 97 |
Billing address. |
| 98 |
""" |
| 99 |
email: NotRequired["Literal['']|str"] |
| 100 |
""" |
| 101 |
Email address. |
| 102 |
""" |
| 103 |
name: NotRequired["Literal['']|str"] |
| 104 |
""" |
| 105 |
Full name. |
| 106 |
""" |
| 107 |
phone: NotRequired["Literal['']|str"] |
| 108 |
""" |
| 109 |
Billing phone number (including extension). |
| 110 |
""" |
| 111 |
|
| 112 |
|
| 113 |
class OutboundPaymentCreateParamsDestinationPaymentMethodDataBillingDetailsAddress( |
| 114 |
TypedDict, |
| 115 |
): |
| 116 |
city: NotRequired[str] |
| 117 |
""" |
| 118 |
City, district, suburb, town, or village. |
| 119 |
""" |
| 120 |
country: NotRequired[str] |
| 121 |
""" |
| 122 |
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
| 123 |
""" |
| 124 |
line1: NotRequired[str] |
| 125 |
""" |
| 126 |
Address line 1, such as the street, PO Box, or company name. |
| 127 |
""" |
| 128 |
line2: NotRequired[str] |
| 129 |
""" |
| 130 |
Address line 2, such as the apartment, suite, unit, or building. |
| 131 |
""" |
| 132 |
postal_code: NotRequired[str] |
| 133 |
""" |
| 134 |
ZIP or postal code. |
| 135 |
""" |
| 136 |
state: NotRequired[str] |
| 137 |
""" |
| 138 |
State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). |
| 139 |
""" |
| 140 |
|
| 141 |
|
| 142 |
class OutboundPaymentCreateParamsDestinationPaymentMethodDataUsBankAccount( |
| 143 |
TypedDict, |
| 144 |
): |
| 145 |
account_holder_type: NotRequired[Literal["company", "individual"]] |
| 146 |
""" |
| 147 |
Account holder type: individual or company. |
| 148 |
""" |
| 149 |
account_number: NotRequired[str] |
| 150 |
""" |
| 151 |
Account number of the bank account. |
| 152 |
""" |
| 153 |
account_type: NotRequired[Literal["checking", "savings"]] |
| 154 |
""" |
| 155 |
Account type: checkings or savings. Defaults to checking if omitted. |
| 156 |
""" |
| 157 |
financial_connections_account: NotRequired[str] |
| 158 |
""" |
| 159 |
The ID of a Financial Connections Account to use as a payment method. |
| 160 |
""" |
| 161 |
routing_number: NotRequired[str] |
| 162 |
""" |
| 163 |
Routing number of the bank account. |
| 164 |
""" |
| 165 |
|
| 166 |
|
| 167 |
class OutboundPaymentCreateParamsDestinationPaymentMethodOptions(TypedDict): |
| 168 |
us_bank_account: NotRequired[ |
| 169 |
"Literal['']|OutboundPaymentCreateParamsDestinationPaymentMethodOptionsUsBankAccount" |
| 170 |
] |
| 171 |
""" |
| 172 |
Optional fields for `us_bank_account`. |
| 173 |
""" |
| 174 |
|
| 175 |
|
| 176 |
class OutboundPaymentCreateParamsDestinationPaymentMethodOptionsUsBankAccount( |
| 177 |
TypedDict, |
| 178 |
): |
| 179 |
network: NotRequired[Literal["ach", "us_domestic_wire"]] |
| 180 |
""" |
| 181 |
Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. |
| 182 |
""" |
| 183 |
|
| 184 |
|
| 185 |
class OutboundPaymentCreateParamsEndUserDetails(TypedDict): |
| 186 |
ip_address: NotRequired[str] |
| 187 |
""" |
| 188 |
IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. |
| 189 |
""" |
| 190 |
present: bool |
| 191 |
""" |
| 192 |
`True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. |
| 193 |
""" |