github.com/stripe/stripe-go/v76@v76.25.0/testhelpers_confirmationtoken.go (about)

     1  //
     2  //
     3  // File generated from our OpenAPI spec
     4  //
     5  //
     6  
     7  package stripe
     8  
     9  // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
    10  type TestHelpersConfirmationTokenPaymentMethodDataACSSDebitParams struct {
    11  	// Customer's bank account number.
    12  	AccountNumber *string `form:"account_number"`
    13  	// Institution number of the customer's bank.
    14  	InstitutionNumber *string `form:"institution_number"`
    15  	// Transit number of the customer's bank.
    16  	TransitNumber *string `form:"transit_number"`
    17  }
    18  
    19  // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
    20  type TestHelpersConfirmationTokenPaymentMethodDataAffirmParams struct{}
    21  
    22  // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
    23  type TestHelpersConfirmationTokenPaymentMethodDataAfterpayClearpayParams struct{}
    24  
    25  // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
    26  type TestHelpersConfirmationTokenPaymentMethodDataAlipayParams struct{}
    27  
    28  // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
    29  type TestHelpersConfirmationTokenPaymentMethodDataAUBECSDebitParams struct {
    30  	// The account number for the bank account.
    31  	AccountNumber *string `form:"account_number"`
    32  	// Bank-State-Branch number of the bank account.
    33  	BSBNumber *string `form:"bsb_number"`
    34  }
    35  
    36  // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
    37  type TestHelpersConfirmationTokenPaymentMethodDataBACSDebitParams struct {
    38  	// Account number of the bank account that the funds will be debited from.
    39  	AccountNumber *string `form:"account_number"`
    40  	// Sort code of the bank account. (e.g., `10-20-30`)
    41  	SortCode *string `form:"sort_code"`
    42  }
    43  
    44  // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
    45  type TestHelpersConfirmationTokenPaymentMethodDataBancontactParams struct{}
    46  
    47  // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
    48  type TestHelpersConfirmationTokenPaymentMethodDataBillingDetailsParams struct {
    49  	// Billing address.
    50  	Address *AddressParams `form:"address"`
    51  	// Email address.
    52  	Email *string `form:"email"`
    53  	// Full name.
    54  	Name *string `form:"name"`
    55  	// Billing phone number (including extension).
    56  	Phone *string `form:"phone"`
    57  }
    58  
    59  // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
    60  type TestHelpersConfirmationTokenPaymentMethodDataBLIKParams struct{}
    61  
    62  // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
    63  type TestHelpersConfirmationTokenPaymentMethodDataBoletoParams struct {
    64  	// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
    65  	TaxID *string `form:"tax_id"`
    66  }
    67  
    68  // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
    69  type TestHelpersConfirmationTokenPaymentMethodDataCashAppParams struct{}
    70  
    71  // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
    72  type TestHelpersConfirmationTokenPaymentMethodDataCustomerBalanceParams struct{}
    73  
    74  // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
    75  type TestHelpersConfirmationTokenPaymentMethodDataEPSParams struct {
    76  	// The customer's bank.
    77  	Bank *string `form:"bank"`
    78  }
    79  
    80  // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
    81  type TestHelpersConfirmationTokenPaymentMethodDataFPXParams struct {
    82  	// Account holder type for FPX transaction
    83  	AccountHolderType *string `form:"account_holder_type"`
    84  	// The customer's bank.
    85  	Bank *string `form:"bank"`
    86  }
    87  
    88  // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
    89  type TestHelpersConfirmationTokenPaymentMethodDataGiropayParams struct{}
    90  
    91  // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
    92  type TestHelpersConfirmationTokenPaymentMethodDataGrabpayParams struct{}
    93  
    94  // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
    95  type TestHelpersConfirmationTokenPaymentMethodDataIDEALParams struct {
    96  	// The customer's bank.
    97  	Bank *string `form:"bank"`
    98  }
    99  
   100  // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
   101  type TestHelpersConfirmationTokenPaymentMethodDataInteracPresentParams struct{}
   102  
   103  // Customer's date of birth
   104  type TestHelpersConfirmationTokenPaymentMethodDataKlarnaDOBParams struct {
   105  	// The day of birth, between 1 and 31.
   106  	Day *int64 `form:"day"`
   107  	// The month of birth, between 1 and 12.
   108  	Month *int64 `form:"month"`
   109  	// The four-digit year of birth.
   110  	Year *int64 `form:"year"`
   111  }
   112  
   113  // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
   114  type TestHelpersConfirmationTokenPaymentMethodDataKlarnaParams struct {
   115  	// Customer's date of birth
   116  	DOB *TestHelpersConfirmationTokenPaymentMethodDataKlarnaDOBParams `form:"dob"`
   117  }
   118  
   119  // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
   120  type TestHelpersConfirmationTokenPaymentMethodDataKonbiniParams struct{}
   121  
   122  // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
   123  type TestHelpersConfirmationTokenPaymentMethodDataLinkParams struct{}
   124  
   125  // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
   126  type TestHelpersConfirmationTokenPaymentMethodDataMobilepayParams struct{}
   127  
   128  // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
   129  type TestHelpersConfirmationTokenPaymentMethodDataOXXOParams struct{}
   130  
   131  // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
   132  type TestHelpersConfirmationTokenPaymentMethodDataP24Params struct {
   133  	// The customer's bank.
   134  	Bank *string `form:"bank"`
   135  }
   136  
   137  // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
   138  type TestHelpersConfirmationTokenPaymentMethodDataPayNowParams struct{}
   139  
   140  // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
   141  type TestHelpersConfirmationTokenPaymentMethodDataPaypalParams struct{}
   142  
   143  // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
   144  type TestHelpersConfirmationTokenPaymentMethodDataPixParams struct{}
   145  
   146  // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
   147  type TestHelpersConfirmationTokenPaymentMethodDataPromptPayParams struct{}
   148  
   149  // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
   150  type TestHelpersConfirmationTokenPaymentMethodDataRadarOptionsParams struct {
   151  	// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
   152  	Session *string `form:"session"`
   153  }
   154  
   155  // If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
   156  type TestHelpersConfirmationTokenPaymentMethodDataRevolutPayParams struct{}
   157  
   158  // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
   159  type TestHelpersConfirmationTokenPaymentMethodDataSEPADebitParams struct {
   160  	// IBAN of the bank account.
   161  	IBAN *string `form:"iban"`
   162  }
   163  
   164  // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
   165  type TestHelpersConfirmationTokenPaymentMethodDataSofortParams struct {
   166  	// Two-letter ISO code representing the country the bank account is located in.
   167  	Country *string `form:"country"`
   168  }
   169  
   170  // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
   171  type TestHelpersConfirmationTokenPaymentMethodDataSwishParams struct{}
   172  
   173  // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
   174  type TestHelpersConfirmationTokenPaymentMethodDataUSBankAccountParams struct {
   175  	// Account holder type: individual or company.
   176  	AccountHolderType *string `form:"account_holder_type"`
   177  	// Account number of the bank account.
   178  	AccountNumber *string `form:"account_number"`
   179  	// Account type: checkings or savings. Defaults to checking if omitted.
   180  	AccountType *string `form:"account_type"`
   181  	// The ID of a Financial Connections Account to use as a payment method.
   182  	FinancialConnectionsAccount *string `form:"financial_connections_account"`
   183  	// Routing number of the bank account.
   184  	RoutingNumber *string `form:"routing_number"`
   185  }
   186  
   187  // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
   188  type TestHelpersConfirmationTokenPaymentMethodDataWeChatPayParams struct{}
   189  
   190  // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
   191  type TestHelpersConfirmationTokenPaymentMethodDataZipParams struct{}
   192  
   193  // If provided, this hash will be used to create a PaymentMethod.
   194  type TestHelpersConfirmationTokenPaymentMethodDataParams struct {
   195  	// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
   196  	ACSSDebit *TestHelpersConfirmationTokenPaymentMethodDataACSSDebitParams `form:"acss_debit"`
   197  	// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
   198  	Affirm *TestHelpersConfirmationTokenPaymentMethodDataAffirmParams `form:"affirm"`
   199  	// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
   200  	AfterpayClearpay *TestHelpersConfirmationTokenPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"`
   201  	// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
   202  	Alipay *TestHelpersConfirmationTokenPaymentMethodDataAlipayParams `form:"alipay"`
   203  	// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
   204  	AUBECSDebit *TestHelpersConfirmationTokenPaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"`
   205  	// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
   206  	BACSDebit *TestHelpersConfirmationTokenPaymentMethodDataBACSDebitParams `form:"bacs_debit"`
   207  	// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
   208  	Bancontact *TestHelpersConfirmationTokenPaymentMethodDataBancontactParams `form:"bancontact"`
   209  	// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
   210  	BillingDetails *TestHelpersConfirmationTokenPaymentMethodDataBillingDetailsParams `form:"billing_details"`
   211  	// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
   212  	BLIK *TestHelpersConfirmationTokenPaymentMethodDataBLIKParams `form:"blik"`
   213  	// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
   214  	Boleto *TestHelpersConfirmationTokenPaymentMethodDataBoletoParams `form:"boleto"`
   215  	// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
   216  	CashApp *TestHelpersConfirmationTokenPaymentMethodDataCashAppParams `form:"cashapp"`
   217  	// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
   218  	CustomerBalance *TestHelpersConfirmationTokenPaymentMethodDataCustomerBalanceParams `form:"customer_balance"`
   219  	// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
   220  	EPS *TestHelpersConfirmationTokenPaymentMethodDataEPSParams `form:"eps"`
   221  	// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
   222  	FPX *TestHelpersConfirmationTokenPaymentMethodDataFPXParams `form:"fpx"`
   223  	// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
   224  	Giropay *TestHelpersConfirmationTokenPaymentMethodDataGiropayParams `form:"giropay"`
   225  	// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
   226  	Grabpay *TestHelpersConfirmationTokenPaymentMethodDataGrabpayParams `form:"grabpay"`
   227  	// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
   228  	IDEAL *TestHelpersConfirmationTokenPaymentMethodDataIDEALParams `form:"ideal"`
   229  	// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
   230  	InteracPresent *TestHelpersConfirmationTokenPaymentMethodDataInteracPresentParams `form:"interac_present"`
   231  	// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
   232  	Klarna *TestHelpersConfirmationTokenPaymentMethodDataKlarnaParams `form:"klarna"`
   233  	// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
   234  	Konbini *TestHelpersConfirmationTokenPaymentMethodDataKonbiniParams `form:"konbini"`
   235  	// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
   236  	Link *TestHelpersConfirmationTokenPaymentMethodDataLinkParams `form:"link"`
   237  	// Set of [key-value pairs](https://stripe.com/docs/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`.
   238  	Metadata map[string]string `form:"metadata"`
   239  	// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
   240  	Mobilepay *TestHelpersConfirmationTokenPaymentMethodDataMobilepayParams `form:"mobilepay"`
   241  	// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
   242  	OXXO *TestHelpersConfirmationTokenPaymentMethodDataOXXOParams `form:"oxxo"`
   243  	// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
   244  	P24 *TestHelpersConfirmationTokenPaymentMethodDataP24Params `form:"p24"`
   245  	// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
   246  	PayNow *TestHelpersConfirmationTokenPaymentMethodDataPayNowParams `form:"paynow"`
   247  	// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
   248  	Paypal *TestHelpersConfirmationTokenPaymentMethodDataPaypalParams `form:"paypal"`
   249  	// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
   250  	Pix *TestHelpersConfirmationTokenPaymentMethodDataPixParams `form:"pix"`
   251  	// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
   252  	PromptPay *TestHelpersConfirmationTokenPaymentMethodDataPromptPayParams `form:"promptpay"`
   253  	// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
   254  	RadarOptions *TestHelpersConfirmationTokenPaymentMethodDataRadarOptionsParams `form:"radar_options"`
   255  	// If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
   256  	RevolutPay *TestHelpersConfirmationTokenPaymentMethodDataRevolutPayParams `form:"revolut_pay"`
   257  	// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
   258  	SEPADebit *TestHelpersConfirmationTokenPaymentMethodDataSEPADebitParams `form:"sepa_debit"`
   259  	// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
   260  	Sofort *TestHelpersConfirmationTokenPaymentMethodDataSofortParams `form:"sofort"`
   261  	// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
   262  	Swish *TestHelpersConfirmationTokenPaymentMethodDataSwishParams `form:"swish"`
   263  	// 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.
   264  	Type *string `form:"type"`
   265  	// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
   266  	USBankAccount *TestHelpersConfirmationTokenPaymentMethodDataUSBankAccountParams `form:"us_bank_account"`
   267  	// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
   268  	WeChatPay *TestHelpersConfirmationTokenPaymentMethodDataWeChatPayParams `form:"wechat_pay"`
   269  	// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
   270  	Zip *TestHelpersConfirmationTokenPaymentMethodDataZipParams `form:"zip"`
   271  }
   272  
   273  // AddMetadata adds a new key-value pair to the Metadata.
   274  func (p *TestHelpersConfirmationTokenPaymentMethodDataParams) AddMetadata(key string, value string) {
   275  	if p.Metadata == nil {
   276  		p.Metadata = make(map[string]string)
   277  	}
   278  
   279  	p.Metadata[key] = value
   280  }
   281  
   282  // Shipping information for this ConfirmationToken.
   283  type TestHelpersConfirmationTokenShippingParams struct {
   284  	// Shipping address
   285  	Address *AddressParams `form:"address"`
   286  	// Recipient name.
   287  	Name *string `form:"name"`
   288  	// Recipient phone (including extension)
   289  	Phone *string `form:"phone"`
   290  }
   291  
   292  // Creates a test mode Confirmation Token server side for your integration tests.
   293  type TestHelpersConfirmationTokenParams struct {
   294  	Params `form:"*"`
   295  	// Specifies which fields in the response should be expanded.
   296  	Expand []*string `form:"expand"`
   297  	// ID of an existing PaymentMethod.
   298  	PaymentMethod *string `form:"payment_method"`
   299  	// If provided, this hash will be used to create a PaymentMethod.
   300  	PaymentMethodData *TestHelpersConfirmationTokenPaymentMethodDataParams `form:"payment_method_data"`
   301  	// Return URL used to confirm the Intent.
   302  	ReturnURL *string `form:"return_url"`
   303  	// Indicates that you intend to make future payments with this ConfirmationToken's payment method.
   304  	//
   305  	// The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
   306  	SetupFutureUsage *string `form:"setup_future_usage"`
   307  	// Shipping information for this ConfirmationToken.
   308  	Shipping *TestHelpersConfirmationTokenShippingParams `form:"shipping"`
   309  }
   310  
   311  // AddExpand appends a new field to expand.
   312  func (p *TestHelpersConfirmationTokenParams) AddExpand(f string) {
   313  	p.Expand = append(p.Expand, &f)
   314  }