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

     1  //
     2  //
     3  // File generated from our OpenAPI spec
     4  //
     5  //
     6  
     7  package stripe
     8  
     9  // Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
    10  type TestHelpersIssuingAuthorizationAmountDetailsParams struct {
    11  	// The ATM withdrawal fee.
    12  	ATMFee *int64 `form:"atm_fee"`
    13  	// The amount of cash requested by the cardholder.
    14  	CashbackAmount *int64 `form:"cashback_amount"`
    15  }
    16  
    17  // Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
    18  type TestHelpersIssuingAuthorizationMerchantDataParams struct {
    19  	// A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
    20  	Category *string `form:"category"`
    21  	// City where the seller is located
    22  	City *string `form:"city"`
    23  	// Country where the seller is located
    24  	Country *string `form:"country"`
    25  	// Name of the seller
    26  	Name *string `form:"name"`
    27  	// Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
    28  	NetworkID *string `form:"network_id"`
    29  	// Postal code where the seller is located
    30  	PostalCode *string `form:"postal_code"`
    31  	// State where the seller is located
    32  	State *string `form:"state"`
    33  	// An ID assigned by the seller to the location of the sale.
    34  	TerminalID *string `form:"terminal_id"`
    35  	// URL provided by the merchant on a 3DS request
    36  	URL *string `form:"url"`
    37  }
    38  
    39  // Details about the authorization, such as identifiers, set by the card network.
    40  type TestHelpersIssuingAuthorizationNetworkDataParams struct {
    41  	// Identifier assigned to the acquirer by the card network.
    42  	AcquiringInstitutionID *string `form:"acquiring_institution_id"`
    43  }
    44  
    45  // The exemption applied to this authorization.
    46  type TestHelpersIssuingAuthorizationVerificationDataAuthenticationExemptionParams struct {
    47  	// The entity that requested the exemption, either the acquiring merchant or the Issuing user.
    48  	ClaimedBy *string `form:"claimed_by"`
    49  	// The specific exemption claimed for this authorization.
    50  	Type *string `form:"type"`
    51  }
    52  
    53  // 3D Secure details.
    54  type TestHelpersIssuingAuthorizationVerificationDataThreeDSecureParams struct {
    55  	// The outcome of the 3D Secure authentication request.
    56  	Result *string `form:"result"`
    57  }
    58  
    59  // Verifications that Stripe performed on information that the cardholder provided to the merchant.
    60  type TestHelpersIssuingAuthorizationVerificationDataParams struct {
    61  	// Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`.
    62  	AddressLine1Check *string `form:"address_line1_check"`
    63  	// Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`.
    64  	AddressPostalCodeCheck *string `form:"address_postal_code_check"`
    65  	// The exemption applied to this authorization.
    66  	AuthenticationExemption *TestHelpersIssuingAuthorizationVerificationDataAuthenticationExemptionParams `form:"authentication_exemption"`
    67  	// Whether the cardholder provided a CVC and if it matched Stripe's record.
    68  	CVCCheck *string `form:"cvc_check"`
    69  	// Whether the cardholder provided an expiry date and if it matched Stripe's record.
    70  	ExpiryCheck *string `form:"expiry_check"`
    71  	// 3D Secure details.
    72  	ThreeDSecure *TestHelpersIssuingAuthorizationVerificationDataThreeDSecureParams `form:"three_d_secure"`
    73  }
    74  
    75  // Create a test-mode authorization.
    76  type TestHelpersIssuingAuthorizationParams struct {
    77  	Params `form:"*"`
    78  	// The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
    79  	Amount *int64 `form:"amount"`
    80  	// Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
    81  	AmountDetails *TestHelpersIssuingAuthorizationAmountDetailsParams `form:"amount_details"`
    82  	// How the card details were provided. Defaults to online.
    83  	AuthorizationMethod *string `form:"authorization_method"`
    84  	// Card associated with this authorization.
    85  	Card *string `form:"card"`
    86  	// The currency of the authorization. If not provided, defaults to the currency of the card. 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).
    87  	Currency *string `form:"currency"`
    88  	// Specifies which fields in the response should be expanded.
    89  	Expand []*string `form:"expand"`
    90  	// If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
    91  	IsAmountControllable *bool `form:"is_amount_controllable"`
    92  	// Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
    93  	MerchantData *TestHelpersIssuingAuthorizationMerchantDataParams `form:"merchant_data"`
    94  	// Details about the authorization, such as identifiers, set by the card network.
    95  	NetworkData *TestHelpersIssuingAuthorizationNetworkDataParams `form:"network_data"`
    96  	// Verifications that Stripe performed on information that the cardholder provided to the merchant.
    97  	VerificationData *TestHelpersIssuingAuthorizationVerificationDataParams `form:"verification_data"`
    98  	// The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
    99  	Wallet *string `form:"wallet"`
   100  }
   101  
   102  // AddExpand appends a new field to expand.
   103  func (p *TestHelpersIssuingAuthorizationParams) AddExpand(f string) {
   104  	p.Expand = append(p.Expand, &f)
   105  }
   106  
   107  // The legs of the trip.
   108  type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightSegmentParams struct {
   109  	// The three-letter IATA airport code of the flight's destination.
   110  	ArrivalAirportCode *string `form:"arrival_airport_code"`
   111  	// The airline carrier code.
   112  	Carrier *string `form:"carrier"`
   113  	// The three-letter IATA airport code that the flight departed from.
   114  	DepartureAirportCode *string `form:"departure_airport_code"`
   115  	// The flight number.
   116  	FlightNumber *string `form:"flight_number"`
   117  	// The flight's service class.
   118  	ServiceClass *string `form:"service_class"`
   119  	// Whether a stopover is allowed on this flight.
   120  	StopoverAllowed *bool `form:"stopover_allowed"`
   121  }
   122  
   123  // Information about the flight that was purchased with this transaction.
   124  type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightParams struct {
   125  	// The time that the flight departed.
   126  	DepartureAt *int64 `form:"departure_at"`
   127  	// The name of the passenger.
   128  	PassengerName *string `form:"passenger_name"`
   129  	// Whether the ticket is refundable.
   130  	Refundable *bool `form:"refundable"`
   131  	// The legs of the trip.
   132  	Segments []*TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightSegmentParams `form:"segments"`
   133  	// The travel agency that issued the ticket.
   134  	TravelAgency *string `form:"travel_agency"`
   135  }
   136  
   137  // Information about fuel that was purchased with this transaction.
   138  type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFuelParams struct {
   139  	// The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
   140  	Type *string `form:"type"`
   141  	// The units for `volume_decimal`. One of `us_gallon` or `liter`.
   142  	Unit *string `form:"unit"`
   143  	// The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
   144  	UnitCostDecimal *float64 `form:"unit_cost_decimal,high_precision"`
   145  	// The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places.
   146  	VolumeDecimal *float64 `form:"volume_decimal,high_precision"`
   147  }
   148  
   149  // Information about lodging that was purchased with this transaction.
   150  type TestHelpersIssuingAuthorizationCapturePurchaseDetailsLodgingParams struct {
   151  	// The time of checking into the lodging.
   152  	CheckInAt *int64 `form:"check_in_at"`
   153  	// The number of nights stayed at the lodging.
   154  	Nights *int64 `form:"nights"`
   155  }
   156  
   157  // The line items in the purchase.
   158  type TestHelpersIssuingAuthorizationCapturePurchaseDetailsReceiptParams struct {
   159  	Description *string  `form:"description"`
   160  	Quantity    *float64 `form:"quantity,high_precision"`
   161  	Total       *int64   `form:"total"`
   162  	UnitCost    *int64   `form:"unit_cost"`
   163  }
   164  
   165  // Additional purchase information that is optionally provided by the merchant.
   166  type TestHelpersIssuingAuthorizationCapturePurchaseDetailsParams struct {
   167  	// Information about the flight that was purchased with this transaction.
   168  	Flight *TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightParams `form:"flight"`
   169  	// Information about fuel that was purchased with this transaction.
   170  	Fuel *TestHelpersIssuingAuthorizationCapturePurchaseDetailsFuelParams `form:"fuel"`
   171  	// Information about lodging that was purchased with this transaction.
   172  	Lodging *TestHelpersIssuingAuthorizationCapturePurchaseDetailsLodgingParams `form:"lodging"`
   173  	// The line items in the purchase.
   174  	Receipt []*TestHelpersIssuingAuthorizationCapturePurchaseDetailsReceiptParams `form:"receipt"`
   175  	// A merchant-specific order number.
   176  	Reference *string `form:"reference"`
   177  }
   178  
   179  // Capture a test-mode authorization.
   180  type TestHelpersIssuingAuthorizationCaptureParams struct {
   181  	Params `form:"*"`
   182  	// The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
   183  	CaptureAmount *int64 `form:"capture_amount"`
   184  	// Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows.
   185  	CloseAuthorization *bool `form:"close_authorization"`
   186  	// Specifies which fields in the response should be expanded.
   187  	Expand []*string `form:"expand"`
   188  	// Additional purchase information that is optionally provided by the merchant.
   189  	PurchaseDetails *TestHelpersIssuingAuthorizationCapturePurchaseDetailsParams `form:"purchase_details"`
   190  }
   191  
   192  // AddExpand appends a new field to expand.
   193  func (p *TestHelpersIssuingAuthorizationCaptureParams) AddExpand(f string) {
   194  	p.Expand = append(p.Expand, &f)
   195  }
   196  
   197  // Expire a test-mode Authorization.
   198  type TestHelpersIssuingAuthorizationExpireParams struct {
   199  	Params `form:"*"`
   200  	// Specifies which fields in the response should be expanded.
   201  	Expand []*string `form:"expand"`
   202  }
   203  
   204  // AddExpand appends a new field to expand.
   205  func (p *TestHelpersIssuingAuthorizationExpireParams) AddExpand(f string) {
   206  	p.Expand = append(p.Expand, &f)
   207  }
   208  
   209  // Increment a test-mode Authorization.
   210  type TestHelpersIssuingAuthorizationIncrementParams struct {
   211  	Params `form:"*"`
   212  	// Specifies which fields in the response should be expanded.
   213  	Expand []*string `form:"expand"`
   214  	// The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
   215  	IncrementAmount *int64 `form:"increment_amount"`
   216  	// If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
   217  	IsAmountControllable *bool `form:"is_amount_controllable"`
   218  }
   219  
   220  // AddExpand appends a new field to expand.
   221  func (p *TestHelpersIssuingAuthorizationIncrementParams) AddExpand(f string) {
   222  	p.Expand = append(p.Expand, &f)
   223  }
   224  
   225  // Reverse a test-mode Authorization.
   226  type TestHelpersIssuingAuthorizationReverseParams struct {
   227  	Params `form:"*"`
   228  	// Specifies which fields in the response should be expanded.
   229  	Expand []*string `form:"expand"`
   230  	// The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
   231  	ReverseAmount *int64 `form:"reverse_amount"`
   232  }
   233  
   234  // AddExpand appends a new field to expand.
   235  func (p *TestHelpersIssuingAuthorizationReverseParams) AddExpand(f string) {
   236  	p.Expand = append(p.Expand, &f)
   237  }