Documentation ¶
Overview ¶
Package stripe provides the binding for Stripe REST APIs.
Index ¶
- Constants
- Variables
- func Bool(v bool) *bool
- func BoolSlice(v []bool) []*bool
- func BoolValue(v *bool) bool
- func Float64(v float64) *float64
- func Float64Slice(v []float64) []*float64
- func Float64Value(v *float64) float64
- func FormatURLPath(format string, params ...string) string
- func Int64(v int64) *int64
- func Int64Slice(v []int64) []*int64
- func Int64Value(v *int64) int64
- func NewIdempotencyKey() string
- func ParseID(data []byte) (string, bool)
- func SetAppInfo(info *AppInfo)
- func SetBackend(backend SupportedBackend, b Backend)
- func SetHTTPClient(client *http.Client)
- func String(v string) *string
- func StringSlice(v []string) []*string
- func StringValue(v *string) string
- type APIError
- type APIResource
- type APIResponse
- type APIStream
- type Account
- type AccountBusinessProfile
- type AccountBusinessProfileMonthlyEstimatedRevenue
- type AccountBusinessProfileMonthlyEstimatedRevenueParams
- type AccountBusinessProfileParams
- type AccountBusinessType
- type AccountCapabilities
- type AccountCapabilitiesACSSDebitPaymentsParams
- type AccountCapabilitiesAUBECSDebitPaymentsParams
- type AccountCapabilitiesAffirmPaymentsParams
- type AccountCapabilitiesAfterpayClearpayPaymentsParams
- type AccountCapabilitiesBACSDebitPaymentsParams
- type AccountCapabilitiesBLIKPaymentsParams
- type AccountCapabilitiesBancontactPaymentsParams
- type AccountCapabilitiesBankTransferPaymentsParams
- type AccountCapabilitiesBoletoPaymentsParams
- type AccountCapabilitiesCardIssuingParams
- type AccountCapabilitiesCardPaymentsParams
- type AccountCapabilitiesCartesBancairesPaymentsParams
- type AccountCapabilitiesCashAppPaymentsParams
- type AccountCapabilitiesEPSPaymentsParams
- type AccountCapabilitiesFPXPaymentsParams
- type AccountCapabilitiesGiropayPaymentsParams
- type AccountCapabilitiesGrabpayPaymentsParams
- type AccountCapabilitiesIDEALPaymentsParams
- type AccountCapabilitiesIndiaInternationalPaymentsParams
- type AccountCapabilitiesJCBPaymentsParams
- type AccountCapabilitiesKlarnaPaymentsParams
- type AccountCapabilitiesKonbiniPaymentsParams
- type AccountCapabilitiesLegacyPaymentsParams
- type AccountCapabilitiesLinkPaymentsParams
- type AccountCapabilitiesOXXOPaymentsParams
- type AccountCapabilitiesP24PaymentsParams
- type AccountCapabilitiesParams
- type AccountCapabilitiesPayNowPaymentsParams
- type AccountCapabilitiesPromptPayPaymentsParams
- type AccountCapabilitiesSEPADebitPaymentsParams
- type AccountCapabilitiesSofortPaymentsParams
- type AccountCapabilitiesTaxReportingUS1099KParams
- type AccountCapabilitiesTaxReportingUS1099MISCParams
- type AccountCapabilitiesTransfersParams
- type AccountCapabilitiesTreasuryParams
- type AccountCapabilitiesUSBankAccountACHPaymentsParams
- type AccountCapabilitiesZipPaymentsParams
- type AccountCapabilityStatus
- type AccountCompany
- type AccountCompanyAddressKana
- type AccountCompanyAddressKanaParams
- type AccountCompanyAddressKanji
- type AccountCompanyAddressKanjiParams
- type AccountCompanyOwnershipDeclaration
- type AccountCompanyOwnershipDeclarationParams
- type AccountCompanyParams
- type AccountCompanyStructure
- type AccountCompanyVerification
- type AccountCompanyVerificationDocument
- type AccountCompanyVerificationDocumentDetailsCode
- type AccountCompanyVerificationDocumentParams
- type AccountCompanyVerificationParams
- type AccountController
- type AccountControllerType
- type AccountDocumentsBankAccountOwnershipVerificationParams
- type AccountDocumentsCompanyLicenseParams
- type AccountDocumentsCompanyMemorandumOfAssociationParams
- type AccountDocumentsCompanyMinisterialDecreeParams
- type AccountDocumentsCompanyRegistrationVerificationParams
- type AccountDocumentsCompanyTaxIDVerificationParams
- type AccountDocumentsParams
- type AccountDocumentsProofOfRegistrationParams
- type AccountExternalAccount
- type AccountExternalAccountList
- type AccountExternalAccountParams
- type AccountExternalAccountType
- type AccountFutureRequirements
- type AccountFutureRequirementsAlternative
- type AccountFutureRequirementsError
- type AccountLink
- type AccountLinkCollect
- type AccountLinkParams
- type AccountLinkType
- type AccountList
- type AccountListParams
- type AccountParams
- type AccountRejectParams
- type AccountRequirements
- type AccountRequirementsAlternative
- type AccountRequirementsDisabledReason
- type AccountRequirementsError
- type AccountSession
- type AccountSessionComponents
- type AccountSessionComponentsAccountOnboarding
- type AccountSessionComponentsAccountOnboardingParams
- type AccountSessionComponentsParams
- type AccountSessionParams
- type AccountSettings
- type AccountSettingsBACSDebitPayments
- type AccountSettingsBACSDebitPaymentsParams
- type AccountSettingsBranding
- type AccountSettingsBrandingParams
- type AccountSettingsCardIssuing
- type AccountSettingsCardIssuingParams
- type AccountSettingsCardIssuingTOSAcceptance
- type AccountSettingsCardIssuingTOSAcceptanceParams
- type AccountSettingsCardPayments
- type AccountSettingsCardPaymentsDeclineOn
- type AccountSettingsCardPaymentsDeclineOnParams
- type AccountSettingsCardPaymentsParams
- type AccountSettingsDashboard
- type AccountSettingsParams
- type AccountSettingsPayments
- type AccountSettingsPaymentsParams
- type AccountSettingsPayouts
- type AccountSettingsPayoutsParams
- type AccountSettingsPayoutsSchedule
- type AccountSettingsPayoutsScheduleInterval
- type AccountSettingsPayoutsScheduleParams
- type AccountSettingsSEPADebitPayments
- type AccountSettingsTreasury
- type AccountSettingsTreasuryParams
- type AccountSettingsTreasuryTOSAcceptance
- type AccountSettingsTreasuryTOSAcceptanceParams
- type AccountTOSAcceptance
- type AccountTOSAcceptanceParams
- type AccountTOSAcceptanceServiceAgreement
- type AccountType
- type Address
- type AddressParams
- type Amount
- type AppInfo
- type ApplePayDomain
- type ApplePayDomainList
- type ApplePayDomainListParams
- type ApplePayDomainParams
- type Application
- type ApplicationFee
- type ApplicationFeeList
- type ApplicationFeeListParams
- type ApplicationFeeParams
- type AppsSecret
- type AppsSecretDeleteWhereParams
- type AppsSecretDeleteWhereScopeParams
- type AppsSecretFindParams
- type AppsSecretFindScopeParams
- type AppsSecretList
- type AppsSecretListParams
- type AppsSecretListScopeParams
- type AppsSecretParams
- type AppsSecretScope
- type AppsSecretScopeParams
- type AppsSecretScopeType
- type AuthorizeURLParams
- type Backend
- type BackendConfig
- type BackendImplementation
- func (s *BackendImplementation) Call(method, path, key string, params ParamsContainer, v LastResponseSetter) error
- func (s *BackendImplementation) CallMultipart(method, path, key, boundary string, body *bytes.Buffer, params *Params, ...) error
- func (s *BackendImplementation) CallRaw(method, path, key string, form *form.Values, params *Params, ...) error
- func (s *BackendImplementation) CallStreaming(method, path, key string, params ParamsContainer, ...) error
- func (s *BackendImplementation) Do(req *http.Request, body *bytes.Buffer, v LastResponseSetter) error
- func (s *BackendImplementation) DoStreaming(req *http.Request, body *bytes.Buffer, v StreamingLastResponseSetter) error
- func (s *BackendImplementation) NewRequest(method, path, key, contentType string, params *Params) (*http.Request, error)
- func (s *BackendImplementation) ResponseToError(res *http.Response, resBody []byte) error
- func (s *BackendImplementation) SetMaxNetworkRetries(maxNetworkRetries int64)
- func (s *BackendImplementation) SetNetworkRetriesSleep(sleep bool)
- func (s *BackendImplementation) UnmarshalJSONVerbose(statusCode int, body []byte, v interface{}) error
- type Backends
- type Balance
- type BalanceIssuing
- type BalanceParams
- type BalanceSourceType
- type BalanceTransaction
- type BalanceTransactionFeeDetail
- type BalanceTransactionList
- type BalanceTransactionListParams
- type BalanceTransactionParams
- type BalanceTransactionReportingCategory
- type BalanceTransactionSource
- type BalanceTransactionSourceType
- type BalanceTransactionStatus
- type BalanceTransactionType
- type BankAccount
- type BankAccountAccountHolderType
- type BankAccountAvailablePayoutMethod
- type BankAccountDocumentsBankAccountOwnershipVerificationParams
- type BankAccountDocumentsParams
- type BankAccountFutureRequirements
- type BankAccountFutureRequirementsError
- type BankAccountFutureRequirementsErrorCode
- type BankAccountList
- type BankAccountListParams
- type BankAccountParams
- type BankAccountRequirements
- type BankAccountRequirementsError
- type BankAccountRequirementsErrorCode
- type BankAccountStatus
- type BillingPortalConfiguration
- type BillingPortalConfigurationBusinessProfile
- type BillingPortalConfigurationBusinessProfileParams
- type BillingPortalConfigurationFeatures
- type BillingPortalConfigurationFeaturesCustomerUpdate
- type BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate
- type BillingPortalConfigurationFeaturesCustomerUpdateParams
- type BillingPortalConfigurationFeaturesInvoiceHistory
- type BillingPortalConfigurationFeaturesInvoiceHistoryParams
- type BillingPortalConfigurationFeaturesParams
- type BillingPortalConfigurationFeaturesPaymentMethodUpdate
- type BillingPortalConfigurationFeaturesPaymentMethodUpdateParams
- type BillingPortalConfigurationFeaturesSubscriptionCancel
- type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReason
- type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption
- type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonParams
- type BillingPortalConfigurationFeaturesSubscriptionCancelMode
- type BillingPortalConfigurationFeaturesSubscriptionCancelParams
- type BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior
- type BillingPortalConfigurationFeaturesSubscriptionPause
- type BillingPortalConfigurationFeaturesSubscriptionPauseParams
- type BillingPortalConfigurationFeaturesSubscriptionUpdate
- type BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate
- type BillingPortalConfigurationFeaturesSubscriptionUpdateParams
- type BillingPortalConfigurationFeaturesSubscriptionUpdateProduct
- type BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams
- type BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior
- type BillingPortalConfigurationList
- type BillingPortalConfigurationListParams
- type BillingPortalConfigurationLoginPage
- type BillingPortalConfigurationLoginPageParams
- type BillingPortalConfigurationParams
- type BillingPortalSession
- type BillingPortalSessionFlow
- type BillingPortalSessionFlowAfterCompletion
- type BillingPortalSessionFlowAfterCompletionHostedConfirmation
- type BillingPortalSessionFlowAfterCompletionRedirect
- type BillingPortalSessionFlowAfterCompletionType
- type BillingPortalSessionFlowDataAfterCompletionHostedConfirmationParams
- type BillingPortalSessionFlowDataAfterCompletionParams
- type BillingPortalSessionFlowDataAfterCompletionRedirectParams
- type BillingPortalSessionFlowDataParams
- type BillingPortalSessionFlowDataSubscriptionCancelParams
- type BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams
- type BillingPortalSessionFlowDataSubscriptionCancelRetentionParams
- type BillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscountParams
- type BillingPortalSessionFlowDataSubscriptionUpdateConfirmItemParams
- type BillingPortalSessionFlowDataSubscriptionUpdateConfirmParams
- type BillingPortalSessionFlowDataSubscriptionUpdateParams
- type BillingPortalSessionFlowSubscriptionCancel
- type BillingPortalSessionFlowSubscriptionCancelRetention
- type BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer
- type BillingPortalSessionFlowSubscriptionCancelRetentionType
- type BillingPortalSessionFlowSubscriptionUpdate
- type BillingPortalSessionFlowSubscriptionUpdateConfirm
- type BillingPortalSessionFlowSubscriptionUpdateConfirmDiscount
- type BillingPortalSessionFlowSubscriptionUpdateConfirmItem
- type BillingPortalSessionFlowType
- type BillingPortalSessionParams
- type Capability
- type CapabilityDisabledReason
- type CapabilityFutureRequirements
- type CapabilityFutureRequirementsAlternative
- type CapabilityFutureRequirementsError
- type CapabilityList
- type CapabilityListParams
- type CapabilityParams
- type CapabilityRequirements
- type CapabilityRequirementsAlternative
- type CapabilityStatus
- type Card
- type CardAddressLine1Check
- type CardAddressZipCheck
- type CardAvailablePayoutMethod
- type CardBrand
- type CardCVCCheck
- type CardError
- type CardFunding
- type CardList
- type CardListParams
- type CardOwnerParams
- type CardParams
- type CardTokenizationMethod
- type CashBalance
- type CashBalanceParams
- type CashBalanceSettings
- type CashBalanceSettingsParams
- type CashBalanceSettingsReconciliationMode
- type Charge
- type ChargeBillingDetails
- type ChargeCaptureParams
- type ChargeCaptureTransferDataParams
- type ChargeDestinationParams
- type ChargeFraudDetails
- type ChargeFraudDetailsParams
- type ChargeFraudStripeReport
- type ChargeFraudUserReport
- type ChargeLevel3
- type ChargeLevel3LineItem
- type ChargeLevel3LineItemParams
- type ChargeLevel3Params
- type ChargeList
- type ChargeListParams
- type ChargeOutcome
- type ChargeOutcomeRule
- type ChargeParams
- type ChargePaymentMethodDetails
- type ChargePaymentMethodDetailsACHCreditTransfer
- type ChargePaymentMethodDetailsACHDebit
- type ChargePaymentMethodDetailsACSSDebit
- type ChargePaymentMethodDetailsAUBECSDebit
- type ChargePaymentMethodDetailsAffirm
- type ChargePaymentMethodDetailsAfterpayClearpay
- type ChargePaymentMethodDetailsAlipay
- type ChargePaymentMethodDetailsBACSDebit
- type ChargePaymentMethodDetailsBLIK
- type ChargePaymentMethodDetailsBancontact
- type ChargePaymentMethodDetailsBoleto
- type ChargePaymentMethodDetailsCard
- type ChargePaymentMethodDetailsCardChecks
- type ChargePaymentMethodDetailsCardChecksAddressLine1Check
- type ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck
- type ChargePaymentMethodDetailsCardChecksCVCCheck
- type ChargePaymentMethodDetailsCardExtendedAuthorization
- type ChargePaymentMethodDetailsCardExtendedAuthorizationStatus
- type ChargePaymentMethodDetailsCardIncrementalAuthorization
- type ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus
- type ChargePaymentMethodDetailsCardInstallments
- type ChargePaymentMethodDetailsCardMulticapture
- type ChargePaymentMethodDetailsCardMulticaptureStatus
- type ChargePaymentMethodDetailsCardNetwork
- type ChargePaymentMethodDetailsCardNetworkToken
- type ChargePaymentMethodDetailsCardOvercapture
- type ChargePaymentMethodDetailsCardOvercaptureStatus
- type ChargePaymentMethodDetailsCardPresent
- type ChargePaymentMethodDetailsCardPresentNetwork
- type ChargePaymentMethodDetailsCardPresentReceipt
- type ChargePaymentMethodDetailsCardPresentReceiptAccountType
- type ChargePaymentMethodDetailsCardThreeDSecure
- type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow
- type ChargePaymentMethodDetailsCardThreeDSecureResult
- type ChargePaymentMethodDetailsCardThreeDSecureResultReason
- type ChargePaymentMethodDetailsCardWallet
- type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout
- type ChargePaymentMethodDetailsCardWalletApplePay
- type ChargePaymentMethodDetailsCardWalletGooglePay
- type ChargePaymentMethodDetailsCardWalletLink
- type ChargePaymentMethodDetailsCardWalletMasterpass
- type ChargePaymentMethodDetailsCardWalletSamsungPay
- type ChargePaymentMethodDetailsCardWalletVisaCheckout
- type ChargePaymentMethodDetailsCashApp
- type ChargePaymentMethodDetailsCustomerBalance
- type ChargePaymentMethodDetailsEPS
- type ChargePaymentMethodDetailsFPX
- type ChargePaymentMethodDetailsGiropay
- type ChargePaymentMethodDetailsGrabpay
- type ChargePaymentMethodDetailsIDEAL
- type ChargePaymentMethodDetailsInteracPresent
- type ChargePaymentMethodDetailsInteracPresentReceipt
- type ChargePaymentMethodDetailsKlarna
- type ChargePaymentMethodDetailsKlarnaPaymentMethodCategory
- type ChargePaymentMethodDetailsKonbini
- type ChargePaymentMethodDetailsKonbiniStore
- type ChargePaymentMethodDetailsKonbiniStoreChain
- type ChargePaymentMethodDetailsLink
- type ChargePaymentMethodDetailsMultibanco
- type ChargePaymentMethodDetailsOXXO
- type ChargePaymentMethodDetailsP24
- type ChargePaymentMethodDetailsPayNow
- type ChargePaymentMethodDetailsPaypal
- type ChargePaymentMethodDetailsPaypalSellerProtection
- type ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory
- type ChargePaymentMethodDetailsPaypalSellerProtectionStatus
- type ChargePaymentMethodDetailsPix
- type ChargePaymentMethodDetailsPromptPay
- type ChargePaymentMethodDetailsSEPACreditTransfer
- type ChargePaymentMethodDetailsSEPADebit
- type ChargePaymentMethodDetailsSofort
- type ChargePaymentMethodDetailsStripeAccount
- type ChargePaymentMethodDetailsType
- type ChargePaymentMethodDetailsUSBankAccount
- type ChargePaymentMethodDetailsUSBankAccountAccountHolderType
- type ChargePaymentMethodDetailsUSBankAccountAccountType
- type ChargePaymentMethodDetailsWeChat
- type ChargePaymentMethodDetailsWeChatPay
- type ChargePaymentMethodDetailsZip
- type ChargeRadarOptions
- type ChargeRadarOptionsParams
- type ChargeSearchParams
- type ChargeSearchResult
- type ChargeStatus
- type ChargeTransferData
- type ChargeTransferDataParams
- type CheckoutSession
- type CheckoutSessionAfterExpiration
- type CheckoutSessionAfterExpirationParams
- type CheckoutSessionAfterExpirationRecovery
- type CheckoutSessionAfterExpirationRecoveryParams
- type CheckoutSessionAutomaticTax
- type CheckoutSessionAutomaticTaxParams
- type CheckoutSessionAutomaticTaxStatus
- type CheckoutSessionBillingAddressCollection
- type CheckoutSessionConsent
- type CheckoutSessionConsentCollection
- type CheckoutSessionConsentCollectionParams
- type CheckoutSessionConsentCollectionPromotions
- type CheckoutSessionConsentCollectionTermsOfService
- type CheckoutSessionConsentPromotions
- type CheckoutSessionConsentTermsOfService
- type CheckoutSessionCurrencyConversion
- type CheckoutSessionCustomField
- type CheckoutSessionCustomFieldDropdown
- type CheckoutSessionCustomFieldDropdownOption
- type CheckoutSessionCustomFieldDropdownOptionParams
- type CheckoutSessionCustomFieldDropdownParams
- type CheckoutSessionCustomFieldLabel
- type CheckoutSessionCustomFieldLabelParams
- type CheckoutSessionCustomFieldLabelType
- type CheckoutSessionCustomFieldNumeric
- type CheckoutSessionCustomFieldNumericParams
- type CheckoutSessionCustomFieldParams
- type CheckoutSessionCustomFieldText
- type CheckoutSessionCustomFieldTextParams
- type CheckoutSessionCustomFieldType
- type CheckoutSessionCustomText
- type CheckoutSessionCustomTextParams
- type CheckoutSessionCustomTextShippingAddress
- type CheckoutSessionCustomTextShippingAddressParams
- type CheckoutSessionCustomTextSubmit
- type CheckoutSessionCustomTextSubmitParams
- type CheckoutSessionCustomTextTermsOfServiceAcceptance
- type CheckoutSessionCustomTextTermsOfServiceAcceptanceParams
- type CheckoutSessionCustomerCreation
- type CheckoutSessionCustomerDetails
- type CheckoutSessionCustomerDetailsTaxExempt
- type CheckoutSessionCustomerDetailsTaxID
- type CheckoutSessionCustomerDetailsTaxIDType
- type CheckoutSessionCustomerUpdateParams
- type CheckoutSessionDiscountParams
- type CheckoutSessionExpireParams
- type CheckoutSessionInvoiceCreation
- type CheckoutSessionInvoiceCreationInvoiceData
- type CheckoutSessionInvoiceCreationInvoiceDataCustomField
- type CheckoutSessionInvoiceCreationInvoiceDataCustomFieldParams
- type CheckoutSessionInvoiceCreationInvoiceDataParams
- type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptions
- type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsParams
- type CheckoutSessionInvoiceCreationParams
- type CheckoutSessionLineItemAdjustableQuantityParams
- type CheckoutSessionLineItemParams
- type CheckoutSessionLineItemPriceDataParams
- type CheckoutSessionLineItemPriceDataProductDataParams
- type CheckoutSessionLineItemPriceDataRecurringParams
- type CheckoutSessionList
- type CheckoutSessionListCustomerDetailsParams
- type CheckoutSessionListLineItemsParams
- type CheckoutSessionListParams
- type CheckoutSessionMode
- type CheckoutSessionParams
- type CheckoutSessionPaymentIntentDataParams
- type CheckoutSessionPaymentIntentDataTransferDataParams
- type CheckoutSessionPaymentMethodCollection
- type CheckoutSessionPaymentMethodConfigurationDetails
- type CheckoutSessionPaymentMethodOptions
- type CheckoutSessionPaymentMethodOptionsACSSDebit
- type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptions
- type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor
- type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsParams
- type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule
- type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType
- type CheckoutSessionPaymentMethodOptionsACSSDebitParams
- type CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod
- type CheckoutSessionPaymentMethodOptionsAUBECSDebit
- type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams
- type CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsAffirm
- type CheckoutSessionPaymentMethodOptionsAffirmParams
- type CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsAfterpayClearpay
- type CheckoutSessionPaymentMethodOptionsAfterpayClearpayParams
- type CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsAlipay
- type CheckoutSessionPaymentMethodOptionsAlipayParams
- type CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsBACSDebit
- type CheckoutSessionPaymentMethodOptionsBACSDebitParams
- type CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsBancontact
- type CheckoutSessionPaymentMethodOptionsBancontactParams
- type CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsBoleto
- type CheckoutSessionPaymentMethodOptionsBoletoParams
- type CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsCard
- type CheckoutSessionPaymentMethodOptionsCardInstallments
- type CheckoutSessionPaymentMethodOptionsCardInstallmentsParams
- type CheckoutSessionPaymentMethodOptionsCardParams
- type CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsCashApp
- type CheckoutSessionPaymentMethodOptionsCashAppParams
- type CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsCustomerBalance
- type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer
- type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer
- type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams
- type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferParams
- type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType
- type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType
- type CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType
- type CheckoutSessionPaymentMethodOptionsCustomerBalanceParams
- type CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsEPS
- type CheckoutSessionPaymentMethodOptionsEPSParams
- type CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsFPX
- type CheckoutSessionPaymentMethodOptionsFPXParams
- type CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsGiropay
- type CheckoutSessionPaymentMethodOptionsGiropayParams
- type CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsGrabpay
- type CheckoutSessionPaymentMethodOptionsGrabpayParams
- type CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsIDEAL
- type CheckoutSessionPaymentMethodOptionsIDEALParams
- type CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsKlarna
- type CheckoutSessionPaymentMethodOptionsKlarnaParams
- type CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsKonbini
- type CheckoutSessionPaymentMethodOptionsKonbiniParams
- type CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsLink
- type CheckoutSessionPaymentMethodOptionsLinkParams
- type CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsOXXO
- type CheckoutSessionPaymentMethodOptionsOXXOParams
- type CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsP24
- type CheckoutSessionPaymentMethodOptionsP24Params
- type CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsParams
- type CheckoutSessionPaymentMethodOptionsPayNow
- type CheckoutSessionPaymentMethodOptionsPayNowParams
- type CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsPaypalParams
- type CheckoutSessionPaymentMethodOptionsPix
- type CheckoutSessionPaymentMethodOptionsPixParams
- type CheckoutSessionPaymentMethodOptionsSEPADebit
- type CheckoutSessionPaymentMethodOptionsSEPADebitParams
- type CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsSofort
- type CheckoutSessionPaymentMethodOptionsSofortParams
- type CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsUSBankAccount
- type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections
- type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsParams
- type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission
- type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch
- type CheckoutSessionPaymentMethodOptionsUSBankAccountParams
- type CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage
- type CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod
- type CheckoutSessionPaymentMethodOptionsWeChatPayParams
- type CheckoutSessionPaymentStatus
- type CheckoutSessionPhoneNumberCollection
- type CheckoutSessionPhoneNumberCollectionParams
- type CheckoutSessionRedirectOnCompletion
- type CheckoutSessionSetupIntentDataParams
- type CheckoutSessionShippingAddressCollection
- type CheckoutSessionShippingAddressCollectionParams
- type CheckoutSessionShippingCost
- type CheckoutSessionShippingCostTax
- type CheckoutSessionShippingCostTaxTaxabilityReason
- type CheckoutSessionShippingOption
- type CheckoutSessionShippingOptionParams
- type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMaximumParams
- type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMinimumParams
- type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateParams
- type CheckoutSessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams
- type CheckoutSessionShippingOptionShippingRateDataFixedAmountParams
- type CheckoutSessionShippingOptionShippingRateDataParams
- type CheckoutSessionStatus
- type CheckoutSessionSubmitType
- type CheckoutSessionSubscriptionDataParams
- type CheckoutSessionSubscriptionDataTransferDataParams
- type CheckoutSessionSubscriptionDataTrialSettingsEndBehaviorParams
- type CheckoutSessionSubscriptionDataTrialSettingsParams
- type CheckoutSessionTaxIDCollection
- type CheckoutSessionTaxIDCollectionParams
- type CheckoutSessionTotalDetails
- type CheckoutSessionTotalDetailsBreakdown
- type CheckoutSessionTotalDetailsBreakdownDiscount
- type CheckoutSessionTotalDetailsBreakdownTax
- type CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason
- type CheckoutSessionUIMode
- type ConnectCollectionTransfer
- type Country
- type CountrySpec
- type CountrySpecList
- type CountrySpecListParams
- type CountrySpecParams
- type Coupon
- type CouponAppliesTo
- type CouponAppliesToParams
- type CouponCurrencyOptions
- type CouponCurrencyOptionsParams
- type CouponDuration
- type CouponList
- type CouponListParams
- type CouponParams
- type CreditNote
- type CreditNoteDiscountAmount
- type CreditNoteLineItem
- type CreditNoteLineItemDiscountAmount
- type CreditNoteLineItemList
- type CreditNoteLineItemType
- type CreditNoteLineParams
- type CreditNoteList
- type CreditNoteListLinesParams
- type CreditNoteListParams
- type CreditNoteParams
- type CreditNotePreviewLineParams
- type CreditNotePreviewLinesLineParams
- type CreditNotePreviewLinesParams
- type CreditNotePreviewLinesShippingCostParams
- type CreditNotePreviewParams
- type CreditNotePreviewShippingCostParams
- type CreditNoteReason
- type CreditNoteShippingCost
- type CreditNoteShippingCostParams
- type CreditNoteShippingCostTax
- type CreditNoteShippingCostTaxTaxabilityReason
- type CreditNoteStatus
- type CreditNoteTaxAmount
- type CreditNoteTaxAmountTaxabilityReason
- type CreditNoteType
- type CreditNoteVoidCreditNoteParams
- type Currency
- type Customer
- type CustomerBalanceTransaction
- type CustomerBalanceTransactionList
- type CustomerBalanceTransactionListParams
- type CustomerBalanceTransactionParams
- type CustomerBalanceTransactionType
- type CustomerCashBalanceParams
- type CustomerCashBalanceSettingsParams
- type CustomerCashBalanceTransaction
- type CustomerCashBalanceTransactionAdjustedForOverdraft
- type CustomerCashBalanceTransactionAppliedToPayment
- type CustomerCashBalanceTransactionFunded
- type CustomerCashBalanceTransactionFundedBankTransfer
- type CustomerCashBalanceTransactionFundedBankTransferEUBankTransfer
- type CustomerCashBalanceTransactionFundedBankTransferGBBankTransfer
- type CustomerCashBalanceTransactionFundedBankTransferJPBankTransfer
- type CustomerCashBalanceTransactionFundedBankTransferType
- type CustomerCashBalanceTransactionFundedBankTransferUSBankTransfer
- type CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork
- type CustomerCashBalanceTransactionList
- type CustomerCashBalanceTransactionListParams
- type CustomerCashBalanceTransactionParams
- type CustomerCashBalanceTransactionRefundedFromPayment
- type CustomerCashBalanceTransactionType
- type CustomerCashBalanceTransactionUnappliedFromPayment
- type CustomerCreateFundingInstructionsBankTransferEUBankTransferParams
- type CustomerCreateFundingInstructionsBankTransferParams
- type CustomerCreateFundingInstructionsParams
- type CustomerDeleteDiscountParams
- type CustomerInvoiceSettings
- type CustomerInvoiceSettingsCustomField
- type CustomerInvoiceSettingsCustomFieldParams
- type CustomerInvoiceSettingsParams
- type CustomerInvoiceSettingsRenderingOptions
- type CustomerInvoiceSettingsRenderingOptionsParams
- type CustomerList
- type CustomerListParams
- type CustomerListPaymentMethodsParams
- type CustomerParams
- type CustomerRetrievePaymentMethodParams
- type CustomerSearchParams
- type CustomerSearchResult
- type CustomerShippingParams
- type CustomerTax
- type CustomerTaxAutomaticTax
- type CustomerTaxExempt
- type CustomerTaxIDDataParams
- type CustomerTaxLocation
- type CustomerTaxLocationSource
- type CustomerTaxParams
- type Deauthorize
- type DeauthorizeParams
- type DeclineCode
- type Discount
- type Dispute
- type DisputeEvidence
- type DisputeEvidenceDetails
- type DisputeEvidenceParams
- type DisputeList
- type DisputeListParams
- type DisputeParams
- type DisputePaymentMethodDetails
- type DisputePaymentMethodDetailsCard
- type DisputePaymentMethodDetailsType
- type DisputeReason
- type DisputeStatus
- type EphemeralKey
- type EphemeralKeyParams
- type Error
- type ErrorCode
- type ErrorType
- type Event
- type EventData
- type EventList
- type EventListParams
- type EventParams
- type EventRequest
- type EventType
- type ExtraValues
- type FeeRefund
- type FeeRefundList
- type FeeRefundListParams
- type FeeRefundParams
- type File
- type FileFileLinkDataParams
- type FileLink
- type FileLinkList
- type FileLinkListParams
- type FileLinkParams
- type FileList
- type FileListParams
- type FileParams
- type FilePurpose
- type Filters
- type FinancialConnectionsAccount
- type FinancialConnectionsAccountAccountHolder
- type FinancialConnectionsAccountAccountHolderType
- type FinancialConnectionsAccountBalance
- type FinancialConnectionsAccountBalanceCash
- type FinancialConnectionsAccountBalanceCredit
- type FinancialConnectionsAccountBalanceRefresh
- type FinancialConnectionsAccountBalanceRefreshStatus
- type FinancialConnectionsAccountBalanceType
- type FinancialConnectionsAccountCategory
- type FinancialConnectionsAccountDisconnectParams
- type FinancialConnectionsAccountList
- type FinancialConnectionsAccountListAccountHolderParams
- type FinancialConnectionsAccountListOwnersParams
- type FinancialConnectionsAccountListParams
- type FinancialConnectionsAccountOwner
- type FinancialConnectionsAccountOwnerList
- type FinancialConnectionsAccountOwnership
- type FinancialConnectionsAccountOwnershipRefresh
- type FinancialConnectionsAccountOwnershipRefreshStatus
- type FinancialConnectionsAccountParams
- type FinancialConnectionsAccountPermission
- type FinancialConnectionsAccountRefreshParams
- type FinancialConnectionsAccountStatus
- type FinancialConnectionsAccountSubcategory
- type FinancialConnectionsAccountSupportedPaymentMethodType
- type FinancialConnectionsSession
- type FinancialConnectionsSessionAccountHolder
- type FinancialConnectionsSessionAccountHolderParams
- type FinancialConnectionsSessionAccountHolderType
- type FinancialConnectionsSessionFilters
- type FinancialConnectionsSessionFiltersParams
- type FinancialConnectionsSessionParams
- type FinancialConnectionsSessionPermission
- type FinancialConnectionsSessionPrefetch
- type FundingInstructions
- type FundingInstructionsBankTransfer
- type FundingInstructionsBankTransferFinancialAddress
- type FundingInstructionsBankTransferFinancialAddressIBAN
- type FundingInstructionsBankTransferFinancialAddressSortCode
- type FundingInstructionsBankTransferFinancialAddressSpei
- type FundingInstructionsBankTransferFinancialAddressSupportedNetwork
- type FundingInstructionsBankTransferFinancialAddressType
- type FundingInstructionsBankTransferFinancialAddressZengin
- type FundingInstructionsBankTransferType
- type FundingInstructionsFundingType
- type IdempotencyError
- type IdentityVerificationReport
- type IdentityVerificationReportDocument
- type IdentityVerificationReportDocumentDOB
- type IdentityVerificationReportDocumentError
- type IdentityVerificationReportDocumentErrorCode
- type IdentityVerificationReportDocumentExpirationDate
- type IdentityVerificationReportDocumentIssuedDate
- type IdentityVerificationReportDocumentStatus
- type IdentityVerificationReportDocumentType
- type IdentityVerificationReportIDNumber
- type IdentityVerificationReportIDNumberDOB
- type IdentityVerificationReportIDNumberError
- type IdentityVerificationReportIDNumberErrorCode
- type IdentityVerificationReportIDNumberIDNumberType
- type IdentityVerificationReportIDNumberStatus
- type IdentityVerificationReportList
- type IdentityVerificationReportListParams
- type IdentityVerificationReportOptions
- type IdentityVerificationReportOptionsDocument
- type IdentityVerificationReportOptionsDocumentAllowedType
- type IdentityVerificationReportOptionsIDNumber
- type IdentityVerificationReportParams
- type IdentityVerificationReportSelfie
- type IdentityVerificationReportSelfieError
- type IdentityVerificationReportSelfieErrorCode
- type IdentityVerificationReportSelfieStatus
- type IdentityVerificationReportType
- type IdentityVerificationSession
- type IdentityVerificationSessionCancelParams
- type IdentityVerificationSessionLastError
- type IdentityVerificationSessionLastErrorCode
- type IdentityVerificationSessionList
- type IdentityVerificationSessionListParams
- type IdentityVerificationSessionOptions
- type IdentityVerificationSessionOptionsDocument
- type IdentityVerificationSessionOptionsDocumentAllowedType
- type IdentityVerificationSessionOptionsDocumentParams
- type IdentityVerificationSessionOptionsIDNumber
- type IdentityVerificationSessionOptionsParams
- type IdentityVerificationSessionParams
- type IdentityVerificationSessionRedactParams
- type IdentityVerificationSessionRedaction
- type IdentityVerificationSessionRedactionStatus
- type IdentityVerificationSessionStatus
- type IdentityVerificationSessionType
- type IdentityVerificationSessionVerifiedOutputs
- type IdentityVerificationSessionVerifiedOutputsDOB
- type IdentityVerificationSessionVerifiedOutputsIDNumberType
- type InvalidRequestError
- type Invoice
- type InvoiceAutomaticTax
- type InvoiceAutomaticTaxParams
- type InvoiceAutomaticTaxStatus
- type InvoiceBillingReason
- type InvoiceCollectionMethod
- type InvoiceCustomField
- type InvoiceCustomFieldParams
- type InvoiceCustomerTaxID
- type InvoiceDiscountParams
- type InvoiceFinalizeInvoiceParams
- type InvoiceFromInvoice
- type InvoiceFromInvoiceParams
- type InvoiceItem
- type InvoiceItemDiscountParams
- type InvoiceItemList
- type InvoiceItemListParams
- type InvoiceItemParams
- type InvoiceItemPeriodParams
- type InvoiceItemPriceDataParams
- type InvoiceLineItem
- type InvoiceLineItemDiscountAmount
- type InvoiceLineItemList
- type InvoiceLineItemProrationDetails
- type InvoiceLineItemProrationDetailsCreditedItems
- type InvoiceLineItemType
- type InvoiceList
- type InvoiceListLinesParams
- type InvoiceListParams
- type InvoiceMarkUncollectibleParams
- type InvoiceParams
- type InvoicePayParams
- type InvoicePaymentSettings
- type InvoicePaymentSettingsParams
- type InvoicePaymentSettingsPaymentMethodOptions
- type InvoicePaymentSettingsPaymentMethodOptionsACSSDebit
- type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions
- type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams
- type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType
- type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitParams
- type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod
- type InvoicePaymentSettingsPaymentMethodOptionsBancontact
- type InvoicePaymentSettingsPaymentMethodOptionsBancontactParams
- type InvoicePaymentSettingsPaymentMethodOptionsCard
- type InvoicePaymentSettingsPaymentMethodOptionsCardInstallments
- type InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsParams
- type InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams
- type InvoicePaymentSettingsPaymentMethodOptionsCardParams
- type InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure
- type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance
- type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer
- type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer
- type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams
- type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams
- type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType
- type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceParams
- type InvoicePaymentSettingsPaymentMethodOptionsKonbini
- type InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams
- type InvoicePaymentSettingsPaymentMethodOptionsParams
- type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccount
- type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections
- type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams
- type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission
- type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch
- type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountParams
- type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod
- type InvoicePaymentSettingsPaymentMethodType
- type InvoiceRendering
- type InvoiceRenderingOptions
- type InvoiceRenderingOptionsParams
- type InvoiceRenderingPDF
- type InvoiceRenderingPDFPageSize
- type InvoiceRenderingPDFParams
- type InvoiceRenderingParams
- type InvoiceSearchParams
- type InvoiceSearchResult
- type InvoiceSendInvoiceParams
- type InvoiceShippingCost
- type InvoiceShippingCostParams
- type InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumParams
- type InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumParams
- type InvoiceShippingCostShippingRateDataDeliveryEstimateParams
- type InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsParams
- type InvoiceShippingCostShippingRateDataFixedAmountParams
- type InvoiceShippingCostShippingRateDataParams
- type InvoiceShippingCostTax
- type InvoiceShippingCostTaxTaxabilityReason
- type InvoiceShippingDetailsParams
- type InvoiceStatus
- type InvoiceStatusTransitions
- type InvoiceSubscriptionDetails
- type InvoiceThresholdReason
- type InvoiceThresholdReasonItemReason
- type InvoiceTotalDiscountAmount
- type InvoiceTotalTaxAmount
- type InvoiceTotalTaxAmountTaxabilityReason
- type InvoiceTransferData
- type InvoiceTransferDataParams
- type InvoiceUpcomingAutomaticTaxParams
- type InvoiceUpcomingCustomerDetailsParams
- type InvoiceUpcomingCustomerDetailsShippingParams
- type InvoiceUpcomingCustomerDetailsTaxIDParams
- type InvoiceUpcomingCustomerDetailsTaxParams
- type InvoiceUpcomingInvoiceItemParams
- type InvoiceUpcomingInvoiceItemPeriodParams
- type InvoiceUpcomingLinesAutomaticTaxParams
- type InvoiceUpcomingLinesCustomerDetailsParams
- type InvoiceUpcomingLinesCustomerDetailsShippingParams
- type InvoiceUpcomingLinesCustomerDetailsTaxIDParams
- type InvoiceUpcomingLinesCustomerDetailsTaxParams
- type InvoiceUpcomingLinesDiscountParams
- type InvoiceUpcomingLinesInvoiceItemDiscountParams
- type InvoiceUpcomingLinesInvoiceItemParams
- type InvoiceUpcomingLinesInvoiceItemPeriodParams
- type InvoiceUpcomingLinesInvoiceItemPriceDataParams
- type InvoiceUpcomingLinesParams
- type InvoiceUpcomingLinesSubscriptionItemBillingThresholdsParams
- type InvoiceUpcomingLinesSubscriptionItemParams
- type InvoiceUpcomingLinesSubscriptionItemPriceDataParams
- type InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringParams
- type InvoiceUpcomingParams
- type InvoiceVoidInvoiceParams
- type IssuingAuthorization
- type IssuingAuthorizationAmountDetails
- type IssuingAuthorizationApproveParams
- type IssuingAuthorizationAuthorizationMethod
- type IssuingAuthorizationDeclineParams
- type IssuingAuthorizationList
- type IssuingAuthorizationListParams
- type IssuingAuthorizationMerchantData
- type IssuingAuthorizationNetworkData
- type IssuingAuthorizationParams
- type IssuingAuthorizationPendingRequest
- type IssuingAuthorizationRequestHistory
- type IssuingAuthorizationRequestHistoryReason
- type IssuingAuthorizationStatus
- type IssuingAuthorizationTreasury
- type IssuingAuthorizationVerificationData
- type IssuingAuthorizationVerificationDataCheck
- type IssuingAuthorizationWallet
- type IssuingCard
- type IssuingCardCancellationReason
- type IssuingCardList
- type IssuingCardListParams
- type IssuingCardPINParams
- type IssuingCardParams
- type IssuingCardReplacementReason
- type IssuingCardShipping
- type IssuingCardShippingCarrier
- type IssuingCardShippingCustoms
- type IssuingCardShippingCustomsParams
- type IssuingCardShippingParams
- type IssuingCardShippingService
- type IssuingCardShippingStatus
- type IssuingCardShippingType
- type IssuingCardSpendingControls
- type IssuingCardSpendingControlsParams
- type IssuingCardSpendingControlsSpendingLimit
- type IssuingCardSpendingControlsSpendingLimitInterval
- type IssuingCardSpendingControlsSpendingLimitParams
- type IssuingCardStatus
- type IssuingCardType
- type IssuingCardWallets
- type IssuingCardWalletsApplePay
- type IssuingCardWalletsApplePayIneligibleReason
- type IssuingCardWalletsGooglePay
- type IssuingCardWalletsGooglePayIneligibleReason
- type IssuingCardholder
- type IssuingCardholderBilling
- type IssuingCardholderBillingParams
- type IssuingCardholderCompany
- type IssuingCardholderCompanyParams
- type IssuingCardholderIndividual
- type IssuingCardholderIndividualCardIssuing
- type IssuingCardholderIndividualCardIssuingParams
- type IssuingCardholderIndividualCardIssuingUserTermsAcceptance
- type IssuingCardholderIndividualCardIssuingUserTermsAcceptanceParams
- type IssuingCardholderIndividualDOB
- type IssuingCardholderIndividualDOBParams
- type IssuingCardholderIndividualParams
- type IssuingCardholderIndividualVerification
- type IssuingCardholderIndividualVerificationDocument
- type IssuingCardholderIndividualVerificationDocumentParams
- type IssuingCardholderIndividualVerificationParams
- type IssuingCardholderList
- type IssuingCardholderListParams
- type IssuingCardholderParams
- type IssuingCardholderPreferredLocale
- type IssuingCardholderRequirements
- type IssuingCardholderRequirementsDisabledReason
- type IssuingCardholderSpendingControls
- type IssuingCardholderSpendingControlsParams
- type IssuingCardholderSpendingControlsSpendingLimit
- type IssuingCardholderSpendingControlsSpendingLimitInterval
- type IssuingCardholderSpendingControlsSpendingLimitParams
- type IssuingCardholderStatus
- type IssuingCardholderType
- type IssuingDispute
- type IssuingDisputeEvidence
- type IssuingDisputeEvidenceCanceled
- type IssuingDisputeEvidenceCanceledParams
- type IssuingDisputeEvidenceCanceledProductType
- type IssuingDisputeEvidenceCanceledReturnStatus
- type IssuingDisputeEvidenceDuplicate
- type IssuingDisputeEvidenceDuplicateParams
- type IssuingDisputeEvidenceFraudulent
- type IssuingDisputeEvidenceFraudulentParams
- type IssuingDisputeEvidenceMerchandiseNotAsDescribed
- type IssuingDisputeEvidenceMerchandiseNotAsDescribedParams
- type IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus
- type IssuingDisputeEvidenceNotReceived
- type IssuingDisputeEvidenceNotReceivedParams
- type IssuingDisputeEvidenceNotReceivedProductType
- type IssuingDisputeEvidenceOther
- type IssuingDisputeEvidenceOtherParams
- type IssuingDisputeEvidenceOtherProductType
- type IssuingDisputeEvidenceParams
- type IssuingDisputeEvidenceReason
- type IssuingDisputeEvidenceServiceNotAsDescribed
- type IssuingDisputeEvidenceServiceNotAsDescribedParams
- type IssuingDisputeList
- type IssuingDisputeListParams
- type IssuingDisputeParams
- type IssuingDisputeStatus
- type IssuingDisputeSubmitParams
- type IssuingDisputeTreasury
- type IssuingDisputeTreasuryParams
- type IssuingToken
- type IssuingTokenList
- type IssuingTokenListParams
- type IssuingTokenNetwork
- type IssuingTokenNetworkData
- type IssuingTokenNetworkDataDevice
- type IssuingTokenNetworkDataDeviceType
- type IssuingTokenNetworkDataMastercard
- type IssuingTokenNetworkDataType
- type IssuingTokenNetworkDataVisa
- type IssuingTokenNetworkDataWalletProvider
- type IssuingTokenNetworkDataWalletProviderCardNumberSource
- type IssuingTokenNetworkDataWalletProviderCardholderAddress
- type IssuingTokenNetworkDataWalletProviderReasonCode
- type IssuingTokenNetworkDataWalletProviderSuggestedDecision
- type IssuingTokenParams
- type IssuingTokenStatus
- type IssuingTokenWalletProvider
- type IssuingTransaction
- type IssuingTransactionAmountDetails
- type IssuingTransactionList
- type IssuingTransactionListParams
- type IssuingTransactionParams
- type IssuingTransactionPurchaseDetails
- type IssuingTransactionPurchaseDetailsFlight
- type IssuingTransactionPurchaseDetailsFlightSegment
- type IssuingTransactionPurchaseDetailsFuel
- type IssuingTransactionPurchaseDetailsFuelType
- type IssuingTransactionPurchaseDetailsFuelUnit
- type IssuingTransactionPurchaseDetailsLodging
- type IssuingTransactionPurchaseDetailsReceipt
- type IssuingTransactionTreasury
- type IssuingTransactionType
- type IssuingTransactionWallet
- type Iter
- type LastResponseSetter
- type Level
- type LeveledLogger
- type LeveledLoggerInterface
- type LineItem
- type LineItemDiscount
- type LineItemList
- type LineItemTax
- type LineItemTaxTaxabilityReason
- type ListContainer
- type ListMeta
- type ListParams
- type ListParamsContainer
- type LoginLink
- type LoginLinkParams
- type Mandate
- type MandateCustomerAcceptance
- type MandateCustomerAcceptanceOffline
- type MandateCustomerAcceptanceOnline
- type MandateCustomerAcceptanceType
- type MandateMultiUse
- type MandateParams
- type MandatePaymentMethodDetails
- type MandatePaymentMethodDetailsACSSDebit
- type MandatePaymentMethodDetailsACSSDebitDefaultFor
- type MandatePaymentMethodDetailsACSSDebitPaymentSchedule
- type MandatePaymentMethodDetailsACSSDebitTransactionType
- type MandatePaymentMethodDetailsAUBECSDebit
- type MandatePaymentMethodDetailsBACSDebit
- type MandatePaymentMethodDetailsBACSDebitNetworkStatus
- type MandatePaymentMethodDetailsCard
- type MandatePaymentMethodDetailsCashApp
- type MandatePaymentMethodDetailsLink
- type MandatePaymentMethodDetailsPaypal
- type MandatePaymentMethodDetailsSEPADebit
- type MandatePaymentMethodDetailsType
- type MandatePaymentMethodDetailsUSBankAccount
- type MandateSingleUse
- type MandateStatus
- type MandateType
- type OAuthScopeType
- type OAuthStripeUserBusinessType
- type OAuthStripeUserGender
- type OAuthStripeUserParams
- type OAuthToken
- type OAuthTokenParams
- type OAuthTokenType
- type Params
- type ParamsContainer
- type PaymentIntent
- type PaymentIntentAmountDetails
- type PaymentIntentAmountDetailsTip
- type PaymentIntentApplyCustomerBalanceParams
- type PaymentIntentAutomaticPaymentMethods
- type PaymentIntentAutomaticPaymentMethodsAllowRedirects
- type PaymentIntentAutomaticPaymentMethodsParams
- type PaymentIntentCancelParams
- type PaymentIntentCancellationReason
- type PaymentIntentCaptureMethod
- type PaymentIntentCaptureParams
- type PaymentIntentConfirmParams
- type PaymentIntentConfirmRadarOptionsParams
- type PaymentIntentConfirmationMethod
- type PaymentIntentIncrementAuthorizationParams
- type PaymentIntentIncrementAuthorizationTransferDataParams
- type PaymentIntentList
- type PaymentIntentListParams
- type PaymentIntentMandateDataCustomerAcceptanceOfflineParams
- type PaymentIntentMandateDataCustomerAcceptanceOnlineParams
- type PaymentIntentMandateDataCustomerAcceptanceParams
- type PaymentIntentMandateDataParams
- type PaymentIntentNextAction
- type PaymentIntentNextActionAlipayHandleRedirect
- type PaymentIntentNextActionBoletoDisplayDetails
- type PaymentIntentNextActionCardAwaitNotification
- type PaymentIntentNextActionCashAppHandleRedirectOrDisplayQRCode
- type PaymentIntentNextActionCashAppHandleRedirectOrDisplayQRCodeQRCode
- type PaymentIntentNextActionDisplayBankTransferInstructions
- type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress
- type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIBAN
- type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode
- type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei
- type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork
- type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType
- type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin
- type PaymentIntentNextActionDisplayBankTransferInstructionsType
- type PaymentIntentNextActionKonbiniDisplayDetails
- type PaymentIntentNextActionKonbiniDisplayDetailsStores
- type PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilyMart
- type PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson
- type PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop
- type PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart
- type PaymentIntentNextActionOXXODisplayDetails
- type PaymentIntentNextActionPayNowDisplayQRCode
- type PaymentIntentNextActionPixDisplayQRCode
- type PaymentIntentNextActionPromptPayDisplayQRCode
- type PaymentIntentNextActionRedirectToURL
- type PaymentIntentNextActionType
- type PaymentIntentNextActionUseStripeSDK
- type PaymentIntentNextActionVerifyWithMicrodeposits
- type PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType
- type PaymentIntentNextActionWeChatPayDisplayQRCode
- type PaymentIntentNextActionWeChatPayRedirectToAndroidApp
- type PaymentIntentNextActionWeChatPayRedirectToIOSApp
- type PaymentIntentParams
- type PaymentIntentPaymentMethodConfigurationDetails
- type PaymentIntentPaymentMethodDataAffirmParams
- type PaymentIntentPaymentMethodDataBLIKParams
- type PaymentIntentPaymentMethodDataBillingDetailsParams
- type PaymentIntentPaymentMethodDataCashAppParams
- type PaymentIntentPaymentMethodDataCustomerBalanceParams
- type PaymentIntentPaymentMethodDataKonbiniParams
- type PaymentIntentPaymentMethodDataLinkParams
- type PaymentIntentPaymentMethodDataParams
- type PaymentIntentPaymentMethodDataPayNowParams
- type PaymentIntentPaymentMethodDataPaypalParams
- type PaymentIntentPaymentMethodDataPixParams
- type PaymentIntentPaymentMethodDataPromptPayParams
- type PaymentIntentPaymentMethodDataRadarOptionsParams
- type PaymentIntentPaymentMethodDataUSBankAccountParams
- type PaymentIntentPaymentMethodDataZipParams
- type PaymentIntentPaymentMethodOptions
- type PaymentIntentPaymentMethodOptionsACSSDebit
- type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptions
- type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsParams
- type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule
- type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType
- type PaymentIntentPaymentMethodOptionsACSSDebitParams
- type PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod
- type PaymentIntentPaymentMethodOptionsAUBECSDebit
- type PaymentIntentPaymentMethodOptionsAUBECSDebitParams
- type PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsAffirm
- type PaymentIntentPaymentMethodOptionsAffirmCaptureMethod
- type PaymentIntentPaymentMethodOptionsAffirmParams
- type PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsAfterpayClearpay
- type PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod
- type PaymentIntentPaymentMethodOptionsAfterpayClearpayParams
- type PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage
- type PaymentIntentPaymentMethodOptionsAlipay
- type PaymentIntentPaymentMethodOptionsAlipayParams
- type PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage
- type PaymentIntentPaymentMethodOptionsBACSDebit
- type PaymentIntentPaymentMethodOptionsBACSDebitParams
- type PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsBLIK
- type PaymentIntentPaymentMethodOptionsBLIKParams
- type PaymentIntentPaymentMethodOptionsBancontact
- type PaymentIntentPaymentMethodOptionsBancontactParams
- type PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsBoleto
- type PaymentIntentPaymentMethodOptionsBoletoParams
- type PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsCard
- type PaymentIntentPaymentMethodOptionsCardCaptureMethod
- type PaymentIntentPaymentMethodOptionsCardInstallments
- type PaymentIntentPaymentMethodOptionsCardInstallmentsParams
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlan
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType
- type PaymentIntentPaymentMethodOptionsCardMandateOptions
- type PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType
- type PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval
- type PaymentIntentPaymentMethodOptionsCardMandateOptionsParams
- type PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType
- type PaymentIntentPaymentMethodOptionsCardNetwork
- type PaymentIntentPaymentMethodOptionsCardParams
- type PaymentIntentPaymentMethodOptionsCardPresent
- type PaymentIntentPaymentMethodOptionsCardPresentParams
- type PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization
- type PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization
- type PaymentIntentPaymentMethodOptionsCardRequestMulticapture
- type PaymentIntentPaymentMethodOptionsCardRequestOvercapture
- type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure
- type PaymentIntentPaymentMethodOptionsCardSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsCashApp
- type PaymentIntentPaymentMethodOptionsCashAppCaptureMethod
- type PaymentIntentPaymentMethodOptionsCashAppParams
- type PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsCustomerBalance
- type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer
- type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer
- type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams
- type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferParams
- type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType
- type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType
- type PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType
- type PaymentIntentPaymentMethodOptionsCustomerBalanceParams
- type PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsEPS
- type PaymentIntentPaymentMethodOptionsEPSParams
- type PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsFPX
- type PaymentIntentPaymentMethodOptionsFPXParams
- type PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsGiropay
- type PaymentIntentPaymentMethodOptionsGiropayParams
- type PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage
- type PaymentIntentPaymentMethodOptionsGrabpay
- type PaymentIntentPaymentMethodOptionsGrabpayParams
- type PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage
- type PaymentIntentPaymentMethodOptionsIDEAL
- type PaymentIntentPaymentMethodOptionsIDEALParams
- type PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsInteracPresent
- type PaymentIntentPaymentMethodOptionsInteracPresentParams
- type PaymentIntentPaymentMethodOptionsKlarna
- type PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod
- type PaymentIntentPaymentMethodOptionsKlarnaParams
- type PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsKonbini
- type PaymentIntentPaymentMethodOptionsKonbiniParams
- type PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsLink
- type PaymentIntentPaymentMethodOptionsLinkCaptureMethod
- type PaymentIntentPaymentMethodOptionsLinkParams
- type PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsOXXO
- type PaymentIntentPaymentMethodOptionsOXXOParams
- type PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsP24
- type PaymentIntentPaymentMethodOptionsP24Params
- type PaymentIntentPaymentMethodOptionsP24SetupFutureUsage
- type PaymentIntentPaymentMethodOptionsParams
- type PaymentIntentPaymentMethodOptionsPayNow
- type PaymentIntentPaymentMethodOptionsPayNowParams
- type PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsPaypal
- type PaymentIntentPaymentMethodOptionsPaypalCaptureMethod
- type PaymentIntentPaymentMethodOptionsPaypalParams
- type PaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsPix
- type PaymentIntentPaymentMethodOptionsPixParams
- type PaymentIntentPaymentMethodOptionsPixSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsPromptPay
- type PaymentIntentPaymentMethodOptionsPromptPayParams
- type PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage
- type PaymentIntentPaymentMethodOptionsSEPADebit
- type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptions
- type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptionsParams
- type PaymentIntentPaymentMethodOptionsSEPADebitParams
- type PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsSofort
- type PaymentIntentPaymentMethodOptionsSofortParams
- type PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsUSBankAccount
- type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections
- type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams
- type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission
- type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch
- type PaymentIntentPaymentMethodOptionsUSBankAccountNetworksParams
- type PaymentIntentPaymentMethodOptionsUSBankAccountParams
- type PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed
- type PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage
- type PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod
- type PaymentIntentPaymentMethodOptionsWeChatPay
- type PaymentIntentPaymentMethodOptionsWeChatPayClient
- type PaymentIntentPaymentMethodOptionsWeChatPayParams
- type PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage
- type PaymentIntentPaymentMethodOptionsZip
- type PaymentIntentPaymentMethodOptionsZipParams
- type PaymentIntentPaymentMethodOptionsZipSetupFutureUsage
- type PaymentIntentProcessing
- type PaymentIntentProcessingCard
- type PaymentIntentProcessingCardCustomerNotification
- type PaymentIntentProcessingType
- type PaymentIntentRadarOptionsParams
- type PaymentIntentSearchParams
- type PaymentIntentSearchResult
- type PaymentIntentSetupFutureUsage
- type PaymentIntentStatus
- type PaymentIntentTransferData
- type PaymentIntentTransferDataParams
- type PaymentIntentVerifyMicrodepositsParams
- type PaymentLink
- type PaymentLinkAfterCompletion
- type PaymentLinkAfterCompletionHostedConfirmation
- type PaymentLinkAfterCompletionHostedConfirmationParams
- type PaymentLinkAfterCompletionParams
- type PaymentLinkAfterCompletionRedirect
- type PaymentLinkAfterCompletionRedirectParams
- type PaymentLinkAfterCompletionType
- type PaymentLinkAutomaticTax
- type PaymentLinkAutomaticTaxParams
- type PaymentLinkBillingAddressCollection
- type PaymentLinkConsentCollection
- type PaymentLinkConsentCollectionParams
- type PaymentLinkConsentCollectionPromotions
- type PaymentLinkConsentCollectionTermsOfService
- type PaymentLinkCustomField
- type PaymentLinkCustomFieldDropdown
- type PaymentLinkCustomFieldDropdownOption
- type PaymentLinkCustomFieldDropdownOptionParams
- type PaymentLinkCustomFieldDropdownParams
- type PaymentLinkCustomFieldLabel
- type PaymentLinkCustomFieldLabelParams
- type PaymentLinkCustomFieldLabelType
- type PaymentLinkCustomFieldNumeric
- type PaymentLinkCustomFieldNumericParams
- type PaymentLinkCustomFieldParams
- type PaymentLinkCustomFieldText
- type PaymentLinkCustomFieldTextParams
- type PaymentLinkCustomFieldType
- type PaymentLinkCustomText
- type PaymentLinkCustomTextParams
- type PaymentLinkCustomTextShippingAddress
- type PaymentLinkCustomTextShippingAddressParams
- type PaymentLinkCustomTextSubmit
- type PaymentLinkCustomTextSubmitParams
- type PaymentLinkCustomTextTermsOfServiceAcceptance
- type PaymentLinkCustomTextTermsOfServiceAcceptanceParams
- type PaymentLinkCustomerCreation
- type PaymentLinkInvoiceCreation
- type PaymentLinkInvoiceCreationInvoiceData
- type PaymentLinkInvoiceCreationInvoiceDataCustomField
- type PaymentLinkInvoiceCreationInvoiceDataCustomFieldParams
- type PaymentLinkInvoiceCreationInvoiceDataParams
- type PaymentLinkInvoiceCreationInvoiceDataRenderingOptions
- type PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsParams
- type PaymentLinkInvoiceCreationParams
- type PaymentLinkLineItemAdjustableQuantityParams
- type PaymentLinkLineItemParams
- type PaymentLinkList
- type PaymentLinkListLineItemsParams
- type PaymentLinkListParams
- type PaymentLinkParams
- type PaymentLinkPaymentIntentData
- type PaymentLinkPaymentIntentDataCaptureMethod
- type PaymentLinkPaymentIntentDataParams
- type PaymentLinkPaymentIntentDataSetupFutureUsage
- type PaymentLinkPaymentMethodCollection
- type PaymentLinkPaymentMethodType
- type PaymentLinkPhoneNumberCollection
- type PaymentLinkPhoneNumberCollectionParams
- type PaymentLinkShippingAddressCollection
- type PaymentLinkShippingAddressCollectionParams
- type PaymentLinkShippingOption
- type PaymentLinkShippingOptionParams
- type PaymentLinkSubmitType
- type PaymentLinkSubscriptionData
- type PaymentLinkSubscriptionDataParams
- type PaymentLinkTaxIDCollection
- type PaymentLinkTaxIDCollectionParams
- type PaymentLinkTransferData
- type PaymentLinkTransferDataParams
- type PaymentMethod
- type PaymentMethodACSSDebit
- type PaymentMethodACSSDebitParams
- type PaymentMethodAUBECSDebit
- type PaymentMethodAUBECSDebitParams
- type PaymentMethodAffirm
- type PaymentMethodAffirmParams
- type PaymentMethodAfterpayClearpay
- type PaymentMethodAfterpayClearpayParams
- type PaymentMethodAlipay
- type PaymentMethodAlipayParams
- type PaymentMethodAttachParams
- type PaymentMethodBACSDebit
- type PaymentMethodBACSDebitParams
- type PaymentMethodBLIK
- type PaymentMethodBLIKParams
- type PaymentMethodBancontact
- type PaymentMethodBancontactParams
- type PaymentMethodBillingDetails
- type PaymentMethodBillingDetailsParams
- type PaymentMethodBoleto
- type PaymentMethodBoletoParams
- type PaymentMethodCard
- type PaymentMethodCardBrand
- type PaymentMethodCardChecks
- type PaymentMethodCardChecksAddressLine1Check
- type PaymentMethodCardChecksAddressPostalCodeCheck
- type PaymentMethodCardChecksCVCCheck
- type PaymentMethodCardNetworks
- type PaymentMethodCardNetworksAvailable
- type PaymentMethodCardNetworksPreferred
- type PaymentMethodCardParams
- type PaymentMethodCardPresent
- type PaymentMethodCardPresentNetworks
- type PaymentMethodCardPresentReadMethod
- type PaymentMethodCardThreeDSecureUsage
- type PaymentMethodCardWallet
- type PaymentMethodCardWalletAmexExpressCheckout
- type PaymentMethodCardWalletApplePay
- type PaymentMethodCardWalletGooglePay
- type PaymentMethodCardWalletLink
- type PaymentMethodCardWalletMasterpass
- type PaymentMethodCardWalletSamsungPay
- type PaymentMethodCardWalletType
- type PaymentMethodCardWalletVisaCheckout
- type PaymentMethodCashApp
- type PaymentMethodCashAppParams
- type PaymentMethodConfiguration
- type PaymentMethodConfigurationACSSDebit
- type PaymentMethodConfigurationACSSDebitDisplayPreference
- type PaymentMethodConfigurationACSSDebitDisplayPreferenceParams
- type PaymentMethodConfigurationACSSDebitDisplayPreferencePreference
- type PaymentMethodConfigurationACSSDebitDisplayPreferenceValue
- type PaymentMethodConfigurationACSSDebitParams
- type PaymentMethodConfigurationAUBECSDebit
- type PaymentMethodConfigurationAUBECSDebitDisplayPreference
- type PaymentMethodConfigurationAUBECSDebitDisplayPreferenceParams
- type PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreference
- type PaymentMethodConfigurationAUBECSDebitDisplayPreferenceValue
- type PaymentMethodConfigurationAUBECSDebitParams
- type PaymentMethodConfigurationAffirm
- type PaymentMethodConfigurationAffirmDisplayPreference
- type PaymentMethodConfigurationAffirmDisplayPreferenceParams
- type PaymentMethodConfigurationAffirmDisplayPreferencePreference
- type PaymentMethodConfigurationAffirmDisplayPreferenceValue
- type PaymentMethodConfigurationAffirmParams
- type PaymentMethodConfigurationAfterpayClearpay
- type PaymentMethodConfigurationAfterpayClearpayDisplayPreference
- type PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceParams
- type PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreference
- type PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceValue
- type PaymentMethodConfigurationAfterpayClearpayParams
- type PaymentMethodConfigurationAlipay
- type PaymentMethodConfigurationAlipayDisplayPreference
- type PaymentMethodConfigurationAlipayDisplayPreferenceParams
- type PaymentMethodConfigurationAlipayDisplayPreferencePreference
- type PaymentMethodConfigurationAlipayDisplayPreferenceValue
- type PaymentMethodConfigurationAlipayParams
- type PaymentMethodConfigurationApplePay
- type PaymentMethodConfigurationApplePayDisplayPreference
- type PaymentMethodConfigurationApplePayDisplayPreferenceParams
- type PaymentMethodConfigurationApplePayDisplayPreferencePreference
- type PaymentMethodConfigurationApplePayDisplayPreferenceValue
- type PaymentMethodConfigurationApplePayLaterDisplayPreferenceParams
- type PaymentMethodConfigurationApplePayLaterParams
- type PaymentMethodConfigurationApplePayParams
- type PaymentMethodConfigurationBACSDebit
- type PaymentMethodConfigurationBACSDebitDisplayPreference
- type PaymentMethodConfigurationBACSDebitDisplayPreferenceParams
- type PaymentMethodConfigurationBACSDebitDisplayPreferencePreference
- type PaymentMethodConfigurationBACSDebitDisplayPreferenceValue
- type PaymentMethodConfigurationBACSDebitParams
- type PaymentMethodConfigurationBLIK
- type PaymentMethodConfigurationBLIKDisplayPreference
- type PaymentMethodConfigurationBLIKDisplayPreferenceParams
- type PaymentMethodConfigurationBLIKDisplayPreferencePreference
- type PaymentMethodConfigurationBLIKDisplayPreferenceValue
- type PaymentMethodConfigurationBLIKParams
- type PaymentMethodConfigurationBancontact
- type PaymentMethodConfigurationBancontactDisplayPreference
- type PaymentMethodConfigurationBancontactDisplayPreferenceParams
- type PaymentMethodConfigurationBancontactDisplayPreferencePreference
- type PaymentMethodConfigurationBancontactDisplayPreferenceValue
- type PaymentMethodConfigurationBancontactParams
- type PaymentMethodConfigurationBoleto
- type PaymentMethodConfigurationBoletoDisplayPreference
- type PaymentMethodConfigurationBoletoDisplayPreferenceParams
- type PaymentMethodConfigurationBoletoDisplayPreferencePreference
- type PaymentMethodConfigurationBoletoDisplayPreferenceValue
- type PaymentMethodConfigurationBoletoParams
- type PaymentMethodConfigurationCard
- type PaymentMethodConfigurationCardDisplayPreference
- type PaymentMethodConfigurationCardDisplayPreferenceParams
- type PaymentMethodConfigurationCardDisplayPreferencePreference
- type PaymentMethodConfigurationCardDisplayPreferenceValue
- type PaymentMethodConfigurationCardParams
- type PaymentMethodConfigurationCartesBancaires
- type PaymentMethodConfigurationCartesBancairesDisplayPreference
- type PaymentMethodConfigurationCartesBancairesDisplayPreferenceParams
- type PaymentMethodConfigurationCartesBancairesDisplayPreferencePreference
- type PaymentMethodConfigurationCartesBancairesDisplayPreferenceValue
- type PaymentMethodConfigurationCartesBancairesParams
- type PaymentMethodConfigurationCashApp
- type PaymentMethodConfigurationCashAppDisplayPreference
- type PaymentMethodConfigurationCashAppDisplayPreferenceParams
- type PaymentMethodConfigurationCashAppDisplayPreferencePreference
- type PaymentMethodConfigurationCashAppDisplayPreferenceValue
- type PaymentMethodConfigurationCashAppParams
- type PaymentMethodConfigurationEPS
- type PaymentMethodConfigurationEPSDisplayPreference
- type PaymentMethodConfigurationEPSDisplayPreferenceParams
- type PaymentMethodConfigurationEPSDisplayPreferencePreference
- type PaymentMethodConfigurationEPSDisplayPreferenceValue
- type PaymentMethodConfigurationEPSParams
- type PaymentMethodConfigurationFPX
- type PaymentMethodConfigurationFPXDisplayPreference
- type PaymentMethodConfigurationFPXDisplayPreferenceParams
- type PaymentMethodConfigurationFPXDisplayPreferencePreference
- type PaymentMethodConfigurationFPXDisplayPreferenceValue
- type PaymentMethodConfigurationFPXParams
- type PaymentMethodConfigurationGiropay
- type PaymentMethodConfigurationGiropayDisplayPreference
- type PaymentMethodConfigurationGiropayDisplayPreferenceParams
- type PaymentMethodConfigurationGiropayDisplayPreferencePreference
- type PaymentMethodConfigurationGiropayDisplayPreferenceValue
- type PaymentMethodConfigurationGiropayParams
- type PaymentMethodConfigurationGooglePay
- type PaymentMethodConfigurationGooglePayDisplayPreference
- type PaymentMethodConfigurationGooglePayDisplayPreferenceParams
- type PaymentMethodConfigurationGooglePayDisplayPreferencePreference
- type PaymentMethodConfigurationGooglePayDisplayPreferenceValue
- type PaymentMethodConfigurationGooglePayParams
- type PaymentMethodConfigurationGrabpay
- type PaymentMethodConfigurationGrabpayDisplayPreference
- type PaymentMethodConfigurationGrabpayDisplayPreferenceParams
- type PaymentMethodConfigurationGrabpayDisplayPreferencePreference
- type PaymentMethodConfigurationGrabpayDisplayPreferenceValue
- type PaymentMethodConfigurationGrabpayParams
- type PaymentMethodConfigurationIDBankTransfer
- type PaymentMethodConfigurationIDBankTransferDisplayPreference
- type PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference
- type PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue
- type PaymentMethodConfigurationIDEAL
- type PaymentMethodConfigurationIDEALDisplayPreference
- type PaymentMethodConfigurationIDEALDisplayPreferenceParams
- type PaymentMethodConfigurationIDEALDisplayPreferencePreference
- type PaymentMethodConfigurationIDEALDisplayPreferenceValue
- type PaymentMethodConfigurationIDEALParams
- type PaymentMethodConfigurationJCB
- type PaymentMethodConfigurationJCBDisplayPreference
- type PaymentMethodConfigurationJCBDisplayPreferenceParams
- type PaymentMethodConfigurationJCBDisplayPreferencePreference
- type PaymentMethodConfigurationJCBDisplayPreferenceValue
- type PaymentMethodConfigurationJCBParams
- type PaymentMethodConfigurationKlarna
- type PaymentMethodConfigurationKlarnaDisplayPreference
- type PaymentMethodConfigurationKlarnaDisplayPreferenceParams
- type PaymentMethodConfigurationKlarnaDisplayPreferencePreference
- type PaymentMethodConfigurationKlarnaDisplayPreferenceValue
- type PaymentMethodConfigurationKlarnaParams
- type PaymentMethodConfigurationKonbini
- type PaymentMethodConfigurationKonbiniDisplayPreference
- type PaymentMethodConfigurationKonbiniDisplayPreferenceParams
- type PaymentMethodConfigurationKonbiniDisplayPreferencePreference
- type PaymentMethodConfigurationKonbiniDisplayPreferenceValue
- type PaymentMethodConfigurationKonbiniParams
- type PaymentMethodConfigurationLink
- type PaymentMethodConfigurationLinkDisplayPreference
- type PaymentMethodConfigurationLinkDisplayPreferenceParams
- type PaymentMethodConfigurationLinkDisplayPreferencePreference
- type PaymentMethodConfigurationLinkDisplayPreferenceValue
- type PaymentMethodConfigurationLinkParams
- type PaymentMethodConfigurationList
- type PaymentMethodConfigurationListParams
- type PaymentMethodConfigurationMultibanco
- type PaymentMethodConfigurationMultibancoDisplayPreference
- type PaymentMethodConfigurationMultibancoDisplayPreferencePreference
- type PaymentMethodConfigurationMultibancoDisplayPreferenceValue
- type PaymentMethodConfigurationNetbanking
- type PaymentMethodConfigurationNetbankingDisplayPreference
- type PaymentMethodConfigurationNetbankingDisplayPreferencePreference
- type PaymentMethodConfigurationNetbankingDisplayPreferenceValue
- type PaymentMethodConfigurationOXXO
- type PaymentMethodConfigurationOXXODisplayPreference
- type PaymentMethodConfigurationOXXODisplayPreferenceParams
- type PaymentMethodConfigurationOXXODisplayPreferencePreference
- type PaymentMethodConfigurationOXXODisplayPreferenceValue
- type PaymentMethodConfigurationOXXOParams
- type PaymentMethodConfigurationP24
- type PaymentMethodConfigurationP24DisplayPreference
- type PaymentMethodConfigurationP24DisplayPreferenceParams
- type PaymentMethodConfigurationP24DisplayPreferencePreference
- type PaymentMethodConfigurationP24DisplayPreferenceValue
- type PaymentMethodConfigurationP24Params
- type PaymentMethodConfigurationParams
- type PaymentMethodConfigurationPayByBank
- type PaymentMethodConfigurationPayByBankDisplayPreference
- type PaymentMethodConfigurationPayByBankDisplayPreferencePreference
- type PaymentMethodConfigurationPayByBankDisplayPreferenceValue
- type PaymentMethodConfigurationPayNow
- type PaymentMethodConfigurationPayNowDisplayPreference
- type PaymentMethodConfigurationPayNowDisplayPreferenceParams
- type PaymentMethodConfigurationPayNowDisplayPreferencePreference
- type PaymentMethodConfigurationPayNowDisplayPreferenceValue
- type PaymentMethodConfigurationPayNowParams
- type PaymentMethodConfigurationPaypal
- type PaymentMethodConfigurationPaypalDisplayPreference
- type PaymentMethodConfigurationPaypalDisplayPreferenceParams
- type PaymentMethodConfigurationPaypalDisplayPreferencePreference
- type PaymentMethodConfigurationPaypalDisplayPreferenceValue
- type PaymentMethodConfigurationPaypalParams
- type PaymentMethodConfigurationPromptPay
- type PaymentMethodConfigurationPromptPayDisplayPreference
- type PaymentMethodConfigurationPromptPayDisplayPreferenceParams
- type PaymentMethodConfigurationPromptPayDisplayPreferencePreference
- type PaymentMethodConfigurationPromptPayDisplayPreferenceValue
- type PaymentMethodConfigurationPromptPayParams
- type PaymentMethodConfigurationSEPADebit
- type PaymentMethodConfigurationSEPADebitDisplayPreference
- type PaymentMethodConfigurationSEPADebitDisplayPreferenceParams
- type PaymentMethodConfigurationSEPADebitDisplayPreferencePreference
- type PaymentMethodConfigurationSEPADebitDisplayPreferenceValue
- type PaymentMethodConfigurationSEPADebitParams
- type PaymentMethodConfigurationSofort
- type PaymentMethodConfigurationSofortDisplayPreference
- type PaymentMethodConfigurationSofortDisplayPreferenceParams
- type PaymentMethodConfigurationSofortDisplayPreferencePreference
- type PaymentMethodConfigurationSofortDisplayPreferenceValue
- type PaymentMethodConfigurationSofortParams
- type PaymentMethodConfigurationUSBankAccount
- type PaymentMethodConfigurationUSBankAccountDisplayPreference
- type PaymentMethodConfigurationUSBankAccountDisplayPreferenceParams
- type PaymentMethodConfigurationUSBankAccountDisplayPreferencePreference
- type PaymentMethodConfigurationUSBankAccountDisplayPreferenceValue
- type PaymentMethodConfigurationUSBankAccountParams
- type PaymentMethodConfigurationUpi
- type PaymentMethodConfigurationUpiDisplayPreference
- type PaymentMethodConfigurationUpiDisplayPreferencePreference
- type PaymentMethodConfigurationUpiDisplayPreferenceValue
- type PaymentMethodConfigurationWeChatPay
- type PaymentMethodConfigurationWeChatPayDisplayPreference
- type PaymentMethodConfigurationWeChatPayDisplayPreferenceParams
- type PaymentMethodConfigurationWeChatPayDisplayPreferencePreference
- type PaymentMethodConfigurationWeChatPayDisplayPreferenceValue
- type PaymentMethodConfigurationWeChatPayParams
- type PaymentMethodCustomerBalance
- type PaymentMethodCustomerBalanceParams
- type PaymentMethodDetachParams
- type PaymentMethodDomain
- type PaymentMethodDomainApplePay
- type PaymentMethodDomainApplePayStatus
- type PaymentMethodDomainApplePayStatusDetails
- type PaymentMethodDomainGooglePay
- type PaymentMethodDomainGooglePayStatus
- type PaymentMethodDomainGooglePayStatusDetails
- type PaymentMethodDomainLink
- type PaymentMethodDomainLinkStatus
- type PaymentMethodDomainLinkStatusDetails
- type PaymentMethodDomainList
- type PaymentMethodDomainListParams
- type PaymentMethodDomainParams
- type PaymentMethodDomainPaypal
- type PaymentMethodDomainPaypalStatus
- type PaymentMethodDomainPaypalStatusDetails
- type PaymentMethodDomainValidateParams
- type PaymentMethodEPS
- type PaymentMethodEPSParams
- type PaymentMethodFPX
- type PaymentMethodFPXAccountHolderType
- type PaymentMethodFPXParams
- type PaymentMethodGiropay
- type PaymentMethodGiropayParams
- type PaymentMethodGrabpay
- type PaymentMethodGrabpayParams
- type PaymentMethodIDEAL
- type PaymentMethodIDEALParams
- type PaymentMethodInteracPresent
- type PaymentMethodInteracPresentNetworks
- type PaymentMethodInteracPresentParams
- type PaymentMethodInteracPresentReadMethod
- type PaymentMethodKlarna
- type PaymentMethodKlarnaDOB
- type PaymentMethodKlarnaDOBParams
- type PaymentMethodKlarnaParams
- type PaymentMethodKonbini
- type PaymentMethodKonbiniParams
- type PaymentMethodLink
- type PaymentMethodLinkParams
- type PaymentMethodList
- type PaymentMethodListParams
- type PaymentMethodOXXO
- type PaymentMethodOXXOParams
- type PaymentMethodP24
- type PaymentMethodP24Params
- type PaymentMethodParams
- type PaymentMethodPayNow
- type PaymentMethodPayNowParams
- type PaymentMethodPaypal
- type PaymentMethodPaypalParams
- type PaymentMethodPix
- type PaymentMethodPixParams
- type PaymentMethodPromptPay
- type PaymentMethodPromptPayParams
- type PaymentMethodRadarOptions
- type PaymentMethodRadarOptionsParams
- type PaymentMethodSEPADebit
- type PaymentMethodSEPADebitGeneratedFrom
- type PaymentMethodSEPADebitParams
- type PaymentMethodSofort
- type PaymentMethodSofortParams
- type PaymentMethodType
- type PaymentMethodUSBankAccount
- type PaymentMethodUSBankAccountAccountHolderType
- type PaymentMethodUSBankAccountAccountType
- type PaymentMethodUSBankAccountNetworks
- type PaymentMethodUSBankAccountNetworksSupported
- type PaymentMethodUSBankAccountParams
- type PaymentMethodUSBankAccountStatusDetails
- type PaymentMethodUSBankAccountStatusDetailsBlocked
- type PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode
- type PaymentMethodUSBankAccountStatusDetailsBlockedReason
- type PaymentMethodWeChatPay
- type PaymentMethodWeChatPayParams
- type PaymentMethodZip
- type PaymentMethodZipParams
- type PaymentSource
- type PaymentSourceList
- type PaymentSourceListParams
- type PaymentSourceOwnerParams
- type PaymentSourceParams
- type PaymentSourceSourceParams
- type PaymentSourceType
- type PaymentSourceVerifyParams
- type Payout
- type PayoutDestination
- type PayoutDestinationType
- type PayoutFailureCode
- type PayoutList
- type PayoutListParams
- type PayoutMethodType
- type PayoutParams
- type PayoutReconciliationStatus
- type PayoutReverseParams
- type PayoutSourceType
- type PayoutStatus
- type PayoutType
- type Period
- type Person
- type PersonAddressKana
- type PersonAddressKanaParams
- type PersonAddressKanji
- type PersonAddressKanjiParams
- type PersonDOB
- type PersonDOBParams
- type PersonDocumentsCompanyAuthorizationParams
- type PersonDocumentsParams
- type PersonDocumentsPassportParams
- type PersonDocumentsVisaParams
- type PersonFutureRequirements
- type PersonFutureRequirementsAlternative
- type PersonFutureRequirementsError
- type PersonList
- type PersonListParams
- type PersonListRelationshipParams
- type PersonParams
- type PersonPoliticalExposure
- type PersonRelationship
- type PersonRelationshipParams
- type PersonRequirements
- type PersonRequirementsAlternative
- type PersonVerification
- type PersonVerificationDetailsCode
- type PersonVerificationDocument
- type PersonVerificationDocumentDetailsCode
- type PersonVerificationDocumentParams
- type PersonVerificationParams
- type PersonVerificationStatus
- type Plan
- type PlanAggregateUsage
- type PlanBillingScheme
- type PlanInterval
- type PlanList
- type PlanListParams
- type PlanParams
- type PlanProductParams
- type PlanTier
- type PlanTierParams
- type PlanTiersMode
- type PlanTransformUsage
- type PlanTransformUsageParams
- type PlanTransformUsageRound
- type PlanUsageType
- type PlatformTaxFee
- type Price
- type PriceBillingScheme
- type PriceCurrencyOptions
- type PriceCurrencyOptionsCustomUnitAmount
- type PriceCurrencyOptionsCustomUnitAmountParams
- type PriceCurrencyOptionsParams
- type PriceCurrencyOptionsTaxBehavior
- type PriceCurrencyOptionsTier
- type PriceCurrencyOptionsTierParams
- type PriceCustomUnitAmount
- type PriceCustomUnitAmountParams
- type PriceList
- type PriceListParams
- type PriceListRecurringParams
- type PriceParams
- type PriceProductDataParams
- type PriceRecurring
- type PriceRecurringAggregateUsage
- type PriceRecurringInterval
- type PriceRecurringParams
- type PriceRecurringUsageType
- type PriceSearchParams
- type PriceSearchResult
- type PriceTaxBehavior
- type PriceTier
- type PriceTierParams
- type PriceTiersMode
- type PriceTransformQuantity
- type PriceTransformQuantityParams
- type PriceTransformQuantityRound
- type PriceType
- type Product
- type ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountParams
- type ProductDefaultPriceDataCurrencyOptionsParams
- type ProductDefaultPriceDataCurrencyOptionsTierParams
- type ProductDefaultPriceDataParams
- type ProductDefaultPriceDataRecurringParams
- type ProductFeature
- type ProductFeatureParams
- type ProductList
- type ProductListParams
- type ProductPackageDimensions
- type ProductPackageDimensionsParams
- type ProductParams
- type ProductSearchParams
- type ProductSearchResult
- type ProductType
- type PromotionCode
- type PromotionCodeList
- type PromotionCodeListParams
- type PromotionCodeParams
- type PromotionCodeRestrictions
- type PromotionCodeRestrictionsCurrencyOptions
- type PromotionCodeRestrictionsCurrencyOptionsParams
- type PromotionCodeRestrictionsParams
- type Query
- type Quote
- type QuoteAcceptParams
- type QuoteAutomaticTax
- type QuoteAutomaticTaxParams
- type QuoteAutomaticTaxStatus
- type QuoteCancelParams
- type QuoteCollectionMethod
- type QuoteComputed
- type QuoteComputedRecurring
- type QuoteComputedRecurringInterval
- type QuoteComputedRecurringTotalDetails
- type QuoteComputedRecurringTotalDetailsBreakdown
- type QuoteComputedRecurringTotalDetailsBreakdownDiscount
- type QuoteComputedRecurringTotalDetailsBreakdownTax
- type QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason
- type QuoteComputedUpfront
- type QuoteComputedUpfrontTotalDetails
- type QuoteComputedUpfrontTotalDetailsBreakdown
- type QuoteComputedUpfrontTotalDetailsBreakdownDiscount
- type QuoteComputedUpfrontTotalDetailsBreakdownTax
- type QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason
- type QuoteDiscountParams
- type QuoteFinalizeQuoteParams
- type QuoteFromQuote
- type QuoteFromQuoteParams
- type QuoteInvoiceSettings
- type QuoteInvoiceSettingsParams
- type QuoteLineItemParams
- type QuoteLineItemPriceDataParams
- type QuoteLineItemPriceDataRecurringParams
- type QuoteList
- type QuoteListComputedUpfrontLineItemsParams
- type QuoteListLineItemsParams
- type QuoteListParams
- type QuotePDFParams
- type QuoteParams
- type QuoteStatus
- type QuoteStatusTransitions
- type QuoteSubscriptionData
- type QuoteSubscriptionDataParams
- type QuoteTotalDetails
- type QuoteTotalDetailsBreakdown
- type QuoteTotalDetailsBreakdownDiscount
- type QuoteTotalDetailsBreakdownTax
- type QuoteTotalDetailsBreakdownTaxTaxabilityReason
- type QuoteTransferData
- type QuoteTransferDataParams
- type RadarEarlyFraudWarning
- type RadarEarlyFraudWarningFraudType
- type RadarEarlyFraudWarningList
- type RadarEarlyFraudWarningListParams
- type RadarEarlyFraudWarningParams
- type RadarValueList
- type RadarValueListItem
- type RadarValueListItemList
- type RadarValueListItemListParams
- type RadarValueListItemParams
- type RadarValueListItemType
- type RadarValueListList
- type RadarValueListListParams
- type RadarValueListParams
- type RangeQueryParams
- type Refund
- type RefundCancelParams
- type RefundFailureReason
- type RefundList
- type RefundListParams
- type RefundNextAction
- type RefundNextActionDisplayDetails
- type RefundNextActionDisplayDetailsEmailSent
- type RefundParams
- type RefundReason
- type RefundStatus
- type ReportingReportRun
- type ReportingReportRunList
- type ReportingReportRunListParams
- type ReportingReportRunParameters
- type ReportingReportRunParametersParams
- type ReportingReportRunParams
- type ReportingReportRunStatus
- type ReportingReportType
- type ReportingReportTypeList
- type ReportingReportTypeListParams
- type ReportingReportTypeParams
- type ReserveTransaction
- type Review
- type ReviewApproveParams
- type ReviewClosedReason
- type ReviewIPAddressLocation
- type ReviewList
- type ReviewListParams
- type ReviewOpenedReason
- type ReviewParams
- type ReviewReason
- type ReviewSession
- type SearchContainer
- type SearchIter
- type SearchMeta
- type SearchParams
- type SearchParamsContainer
- type SearchQuery
- type SetupAttempt
- type SetupAttemptFlowDirection
- type SetupAttemptList
- type SetupAttemptListParams
- type SetupAttemptPaymentMethodDetails
- type SetupAttemptPaymentMethodDetailsACSSDebit
- type SetupAttemptPaymentMethodDetailsAUBECSDebit
- type SetupAttemptPaymentMethodDetailsBACSDebit
- type SetupAttemptPaymentMethodDetailsBancontact
- type SetupAttemptPaymentMethodDetailsBoleto
- type SetupAttemptPaymentMethodDetailsCard
- type SetupAttemptPaymentMethodDetailsCardChecks
- type SetupAttemptPaymentMethodDetailsCardPresent
- type SetupAttemptPaymentMethodDetailsCardThreeDSecure
- type SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow
- type SetupAttemptPaymentMethodDetailsCardThreeDSecureResult
- type SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason
- type SetupAttemptPaymentMethodDetailsCardWallet
- type SetupAttemptPaymentMethodDetailsCardWalletApplePay
- type SetupAttemptPaymentMethodDetailsCardWalletGooglePay
- type SetupAttemptPaymentMethodDetailsCardWalletType
- type SetupAttemptPaymentMethodDetailsCashApp
- type SetupAttemptPaymentMethodDetailsIDEAL
- type SetupAttemptPaymentMethodDetailsKlarna
- type SetupAttemptPaymentMethodDetailsLink
- type SetupAttemptPaymentMethodDetailsPaypal
- type SetupAttemptPaymentMethodDetailsSEPADebit
- type SetupAttemptPaymentMethodDetailsSofort
- type SetupAttemptPaymentMethodDetailsType
- type SetupAttemptPaymentMethodDetailsUSBankAccount
- type SetupAttemptStatus
- type SetupAttemptUsage
- type SetupIntent
- type SetupIntentAutomaticPaymentMethods
- type SetupIntentAutomaticPaymentMethodsAllowRedirects
- type SetupIntentAutomaticPaymentMethodsParams
- type SetupIntentCancelParams
- type SetupIntentCancellationReason
- type SetupIntentConfirmParams
- type SetupIntentConfirmPaymentMethodDataACSSDebitParams
- type SetupIntentConfirmPaymentMethodDataAUBECSDebitParams
- type SetupIntentConfirmPaymentMethodDataAffirmParams
- type SetupIntentConfirmPaymentMethodDataAfterpayClearpayParams
- type SetupIntentConfirmPaymentMethodDataAlipayParams
- type SetupIntentConfirmPaymentMethodDataBACSDebitParams
- type SetupIntentConfirmPaymentMethodDataBLIKParams
- type SetupIntentConfirmPaymentMethodDataBancontactParams
- type SetupIntentConfirmPaymentMethodDataBillingDetailsParams
- type SetupIntentConfirmPaymentMethodDataBoletoParams
- type SetupIntentConfirmPaymentMethodDataCashAppParams
- type SetupIntentConfirmPaymentMethodDataCustomerBalanceParams
- type SetupIntentConfirmPaymentMethodDataEPSParams
- type SetupIntentConfirmPaymentMethodDataFPXParams
- type SetupIntentConfirmPaymentMethodDataGiropayParams
- type SetupIntentConfirmPaymentMethodDataGrabpayParams
- type SetupIntentConfirmPaymentMethodDataIDEALParams
- type SetupIntentConfirmPaymentMethodDataInteracPresentParams
- type SetupIntentConfirmPaymentMethodDataKlarnaDOBParams
- type SetupIntentConfirmPaymentMethodDataKlarnaParams
- type SetupIntentConfirmPaymentMethodDataKonbiniParams
- type SetupIntentConfirmPaymentMethodDataLinkParams
- type SetupIntentConfirmPaymentMethodDataOXXOParams
- type SetupIntentConfirmPaymentMethodDataP24Params
- type SetupIntentConfirmPaymentMethodDataParams
- type SetupIntentConfirmPaymentMethodDataPayNowParams
- type SetupIntentConfirmPaymentMethodDataPaypalParams
- type SetupIntentConfirmPaymentMethodDataPixParams
- type SetupIntentConfirmPaymentMethodDataPromptPayParams
- type SetupIntentConfirmPaymentMethodDataRadarOptionsParams
- type SetupIntentConfirmPaymentMethodDataSEPADebitParams
- type SetupIntentConfirmPaymentMethodDataSofortParams
- type SetupIntentConfirmPaymentMethodDataUSBankAccountParams
- type SetupIntentConfirmPaymentMethodDataWeChatPayParams
- type SetupIntentConfirmPaymentMethodDataZipParams
- type SetupIntentFlowDirection
- type SetupIntentList
- type SetupIntentListParams
- type SetupIntentMandateDataCustomerAcceptanceOfflineParams
- type SetupIntentMandateDataCustomerAcceptanceOnlineParams
- type SetupIntentMandateDataCustomerAcceptanceParams
- type SetupIntentMandateDataParams
- type SetupIntentNextAction
- type SetupIntentNextActionCashAppHandleRedirectOrDisplayQRCode
- type SetupIntentNextActionCashAppHandleRedirectOrDisplayQRCodeQRCode
- type SetupIntentNextActionRedirectToURL
- type SetupIntentNextActionType
- type SetupIntentNextActionUseStripeSDK
- type SetupIntentNextActionVerifyWithMicrodeposits
- type SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType
- type SetupIntentParams
- type SetupIntentPaymentMethodConfigurationDetails
- type SetupIntentPaymentMethodDataACSSDebitParams
- type SetupIntentPaymentMethodDataAUBECSDebitParams
- type SetupIntentPaymentMethodDataAffirmParams
- type SetupIntentPaymentMethodDataAfterpayClearpayParams
- type SetupIntentPaymentMethodDataAlipayParams
- type SetupIntentPaymentMethodDataBACSDebitParams
- type SetupIntentPaymentMethodDataBLIKParams
- type SetupIntentPaymentMethodDataBancontactParams
- type SetupIntentPaymentMethodDataBillingDetailsParams
- type SetupIntentPaymentMethodDataBoletoParams
- type SetupIntentPaymentMethodDataCashAppParams
- type SetupIntentPaymentMethodDataCustomerBalanceParams
- type SetupIntentPaymentMethodDataEPSParams
- type SetupIntentPaymentMethodDataFPXParams
- type SetupIntentPaymentMethodDataGiropayParams
- type SetupIntentPaymentMethodDataGrabpayParams
- type SetupIntentPaymentMethodDataIDEALParams
- type SetupIntentPaymentMethodDataInteracPresentParams
- type SetupIntentPaymentMethodDataKlarnaDOBParams
- type SetupIntentPaymentMethodDataKlarnaParams
- type SetupIntentPaymentMethodDataKonbiniParams
- type SetupIntentPaymentMethodDataLinkParams
- type SetupIntentPaymentMethodDataOXXOParams
- type SetupIntentPaymentMethodDataP24Params
- type SetupIntentPaymentMethodDataParams
- type SetupIntentPaymentMethodDataPayNowParams
- type SetupIntentPaymentMethodDataPaypalParams
- type SetupIntentPaymentMethodDataPixParams
- type SetupIntentPaymentMethodDataPromptPayParams
- type SetupIntentPaymentMethodDataRadarOptionsParams
- type SetupIntentPaymentMethodDataSEPADebitParams
- type SetupIntentPaymentMethodDataSofortParams
- type SetupIntentPaymentMethodDataUSBankAccountParams
- type SetupIntentPaymentMethodDataWeChatPayParams
- type SetupIntentPaymentMethodDataZipParams
- type SetupIntentPaymentMethodOptions
- type SetupIntentPaymentMethodOptionsACSSDebit
- type SetupIntentPaymentMethodOptionsACSSDebitCurrency
- type SetupIntentPaymentMethodOptionsACSSDebitMandateOptions
- type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor
- type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsParams
- type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule
- type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType
- type SetupIntentPaymentMethodOptionsACSSDebitParams
- type SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod
- type SetupIntentPaymentMethodOptionsCard
- type SetupIntentPaymentMethodOptionsCardMandateOptions
- type SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType
- type SetupIntentPaymentMethodOptionsCardMandateOptionsInterval
- type SetupIntentPaymentMethodOptionsCardMandateOptionsParams
- type SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType
- type SetupIntentPaymentMethodOptionsCardNetwork
- type SetupIntentPaymentMethodOptionsCardParams
- type SetupIntentPaymentMethodOptionsCardRequestThreeDSecure
- type SetupIntentPaymentMethodOptionsLink
- type SetupIntentPaymentMethodOptionsLinkParams
- type SetupIntentPaymentMethodOptionsParams
- type SetupIntentPaymentMethodOptionsPaypal
- type SetupIntentPaymentMethodOptionsPaypalParams
- type SetupIntentPaymentMethodOptionsSEPADebit
- type SetupIntentPaymentMethodOptionsSEPADebitMandateOptions
- type SetupIntentPaymentMethodOptionsSEPADebitMandateOptionsParams
- type SetupIntentPaymentMethodOptionsSEPADebitParams
- type SetupIntentPaymentMethodOptionsUSBankAccount
- type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnections
- type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams
- type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission
- type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch
- type SetupIntentPaymentMethodOptionsUSBankAccountNetworksParams
- type SetupIntentPaymentMethodOptionsUSBankAccountParams
- type SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod
- type SetupIntentSingleUseParams
- type SetupIntentStatus
- type SetupIntentUsage
- type SetupIntentVerifyMicrodepositsParams
- type ShippingDetails
- type ShippingDetailsParams
- type ShippingRate
- type ShippingRateDeliveryEstimate
- type ShippingRateDeliveryEstimateMaximum
- type ShippingRateDeliveryEstimateMaximumParams
- type ShippingRateDeliveryEstimateMaximumUnit
- type ShippingRateDeliveryEstimateMinimum
- type ShippingRateDeliveryEstimateMinimumParams
- type ShippingRateDeliveryEstimateMinimumUnit
- type ShippingRateDeliveryEstimateParams
- type ShippingRateFixedAmount
- type ShippingRateFixedAmountCurrencyOptions
- type ShippingRateFixedAmountCurrencyOptionsParams
- type ShippingRateFixedAmountCurrencyOptionsTaxBehavior
- type ShippingRateFixedAmountParams
- type ShippingRateList
- type ShippingRateListParams
- type ShippingRateParams
- type ShippingRateTaxBehavior
- type ShippingRateType
- type SigmaScheduledQueryRun
- type SigmaScheduledQueryRunError
- type SigmaScheduledQueryRunList
- type SigmaScheduledQueryRunListParams
- type SigmaScheduledQueryRunParams
- type SigmaScheduledQueryRunStatus
- type Source
- type SourceACHCreditTransfer
- type SourceACHDebit
- type SourceACSSDebit
- type SourceAUBECSDebit
- type SourceAlipay
- type SourceBancontact
- type SourceCard
- type SourceCardPresent
- type SourceCodeVerification
- type SourceCodeVerificationStatus
- type SourceDetachParams
- type SourceEPS
- type SourceFlow
- type SourceGiropay
- type SourceIDEAL
- type SourceKlarna
- type SourceMandateAcceptanceOfflineParams
- type SourceMandateAcceptanceOnlineParams
- type SourceMandateAcceptanceParams
- type SourceMandateParams
- type SourceMultibanco
- type SourceOwner
- type SourceOwnerParams
- type SourceP24
- type SourceParams
- type SourceReceiver
- type SourceReceiverParams
- type SourceReceiverRefundAttributesMethod
- type SourceReceiverRefundAttributesStatus
- type SourceRedirect
- type SourceRedirectFailureReason
- type SourceRedirectParams
- type SourceRedirectStatus
- type SourceSEPACreditTransfer
- type SourceSEPADebit
- type SourceSofort
- type SourceSourceOrder
- type SourceSourceOrderItem
- type SourceSourceOrderItemParams
- type SourceSourceOrderItemType
- type SourceSourceOrderParams
- type SourceStatus
- type SourceThreeDSecure
- type SourceTransaction
- type SourceTransactionACHCreditTransfer
- type SourceTransactionCHFCreditTransfer
- type SourceTransactionGBPCreditTransfer
- type SourceTransactionList
- type SourceTransactionListParams
- type SourceTransactionPaperCheck
- type SourceTransactionSEPACreditTransfer
- type SourceUsage
- type SourceWeChat
- type StreamingAPIResponse
- type StreamingLastResponseSetter
- type Subscription
- type SubscriptionAddInvoiceItemParams
- type SubscriptionAutomaticTax
- type SubscriptionAutomaticTaxParams
- type SubscriptionBillingThresholds
- type SubscriptionBillingThresholdsParams
- type SubscriptionCancelCancellationDetailsParams
- type SubscriptionCancelParams
- type SubscriptionCancellationDetails
- type SubscriptionCancellationDetailsFeedback
- type SubscriptionCancellationDetailsParams
- type SubscriptionCancellationDetailsReason
- type SubscriptionCollectionMethod
- type SubscriptionDeleteDiscountParams
- type SubscriptionItem
- type SubscriptionItemBillingThresholds
- type SubscriptionItemBillingThresholdsParams
- type SubscriptionItemList
- type SubscriptionItemListParams
- type SubscriptionItemParams
- type SubscriptionItemPriceDataParams
- type SubscriptionItemPriceDataRecurringParams
- type SubscriptionItemUsageRecordSummariesParams
- type SubscriptionItemsParams
- type SubscriptionList
- type SubscriptionListAutomaticTaxParams
- type SubscriptionListParams
- type SubscriptionParams
- type SubscriptionPauseCollection
- type SubscriptionPauseCollectionBehavior
- type SubscriptionPauseCollectionParams
- type SubscriptionPaymentSettings
- type SubscriptionPaymentSettingsParams
- type SubscriptionPaymentSettingsPaymentMethodOptions
- type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebit
- type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions
- type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType
- type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod
- type SubscriptionPaymentSettingsPaymentMethodOptionsBancontact
- type SubscriptionPaymentSettingsPaymentMethodOptionsBancontactParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsCard
- type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions
- type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType
- type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork
- type SubscriptionPaymentSettingsPaymentMethodOptionsCardParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure
- type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance
- type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer
- type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer
- type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType
- type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsKonbini
- type SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccount
- type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections
- type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission
- type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch
- type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountParams
- type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod
- type SubscriptionPaymentSettingsPaymentMethodType
- type SubscriptionPaymentSettingsSaveDefaultPaymentMethod
- type SubscriptionPendingInvoiceItemInterval
- type SubscriptionPendingInvoiceItemIntervalInterval
- type SubscriptionPendingInvoiceItemIntervalParams
- type SubscriptionPendingUpdate
- type SubscriptionResumeParams
- type SubscriptionSchedule
- type SubscriptionScheduleCancelParams
- type SubscriptionScheduleCurrentPhase
- type SubscriptionScheduleDefaultSettings
- type SubscriptionScheduleDefaultSettingsBillingCycleAnchor
- type SubscriptionScheduleDefaultSettingsInvoiceSettings
- type SubscriptionScheduleDefaultSettingsInvoiceSettingsParams
- type SubscriptionScheduleDefaultSettingsParams
- type SubscriptionScheduleEndBehavior
- type SubscriptionScheduleList
- type SubscriptionScheduleListParams
- type SubscriptionScheduleParams
- type SubscriptionSchedulePhase
- type SubscriptionSchedulePhaseAddInvoiceItem
- type SubscriptionSchedulePhaseAddInvoiceItemParams
- type SubscriptionSchedulePhaseAutomaticTaxParams
- type SubscriptionSchedulePhaseBillingCycleAnchor
- type SubscriptionSchedulePhaseInvoiceSettings
- type SubscriptionSchedulePhaseInvoiceSettingsParams
- type SubscriptionSchedulePhaseItem
- type SubscriptionSchedulePhaseItemParams
- type SubscriptionSchedulePhaseParams
- type SubscriptionSchedulePhaseProrationBehavior
- type SubscriptionScheduleReleaseParams
- type SubscriptionScheduleStatus
- type SubscriptionSearchParams
- type SubscriptionSearchResult
- type SubscriptionStatus
- type SubscriptionTransferData
- type SubscriptionTransferDataParams
- type SubscriptionTrialSettings
- type SubscriptionTrialSettingsEndBehavior
- type SubscriptionTrialSettingsEndBehaviorMissingPaymentMethod
- type SubscriptionTrialSettingsEndBehaviorParams
- type SubscriptionTrialSettingsParams
- type SupportedBackend
- type TaxCalculation
- type TaxCalculationCustomerDetails
- type TaxCalculationCustomerDetailsAddressSource
- type TaxCalculationCustomerDetailsParams
- type TaxCalculationCustomerDetailsTaxID
- type TaxCalculationCustomerDetailsTaxIDParams
- type TaxCalculationCustomerDetailsTaxIDType
- type TaxCalculationCustomerDetailsTaxabilityOverride
- type TaxCalculationLineItem
- type TaxCalculationLineItemList
- type TaxCalculationLineItemParams
- type TaxCalculationLineItemTaxBehavior
- type TaxCalculationLineItemTaxBreakdown
- type TaxCalculationLineItemTaxBreakdownJurisdiction
- type TaxCalculationLineItemTaxBreakdownJurisdictionLevel
- type TaxCalculationLineItemTaxBreakdownSourcing
- type TaxCalculationLineItemTaxBreakdownTaxRateDetails
- type TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType
- type TaxCalculationLineItemTaxBreakdownTaxabilityReason
- type TaxCalculationListLineItemsParams
- type TaxCalculationParams
- type TaxCalculationShippingCost
- type TaxCalculationShippingCostParams
- type TaxCalculationShippingCostTaxBehavior
- type TaxCalculationShippingCostTaxBreakdown
- type TaxCalculationShippingCostTaxBreakdownJurisdiction
- type TaxCalculationShippingCostTaxBreakdownJurisdictionLevel
- type TaxCalculationShippingCostTaxBreakdownSourcing
- type TaxCalculationShippingCostTaxBreakdownTaxRateDetails
- type TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType
- type TaxCalculationShippingCostTaxBreakdownTaxabilityReason
- type TaxCalculationTaxBreakdown
- type TaxCalculationTaxBreakdownTaxRateDetails
- type TaxCalculationTaxBreakdownTaxRateDetailsTaxType
- type TaxCalculationTaxBreakdownTaxabilityReason
- type TaxCode
- type TaxCodeList
- type TaxCodeListParams
- type TaxCodeParams
- type TaxDeductedAtSource
- type TaxID
- type TaxIDList
- type TaxIDListParams
- type TaxIDParams
- type TaxIDType
- type TaxIDVerification
- type TaxIDVerificationStatus
- type TaxRate
- type TaxRateList
- type TaxRateListParams
- type TaxRateParams
- type TaxRateTaxType
- type TaxSettings
- type TaxSettingsDefaults
- type TaxSettingsDefaultsParams
- type TaxSettingsDefaultsTaxBehavior
- type TaxSettingsHeadOffice
- type TaxSettingsHeadOfficeParams
- type TaxSettingsParams
- type TaxSettingsStatus
- type TaxSettingsStatusDetails
- type TaxSettingsStatusDetailsActive
- type TaxSettingsStatusDetailsPending
- type TaxTransaction
- type TaxTransactionCreateFromCalculationParams
- type TaxTransactionCreateReversalLineItemParams
- type TaxTransactionCreateReversalParams
- type TaxTransactionCreateReversalShippingCostParams
- type TaxTransactionCustomerDetails
- type TaxTransactionCustomerDetailsAddressSource
- type TaxTransactionCustomerDetailsTaxID
- type TaxTransactionCustomerDetailsTaxIDType
- type TaxTransactionCustomerDetailsTaxabilityOverride
- type TaxTransactionLineItem
- type TaxTransactionLineItemList
- type TaxTransactionLineItemReversal
- type TaxTransactionLineItemTaxBehavior
- type TaxTransactionLineItemType
- type TaxTransactionListLineItemsParams
- type TaxTransactionParams
- type TaxTransactionReversal
- type TaxTransactionShippingCost
- type TaxTransactionShippingCostTaxBehavior
- type TaxTransactionShippingCostTaxBreakdown
- type TaxTransactionShippingCostTaxBreakdownJurisdiction
- type TaxTransactionShippingCostTaxBreakdownJurisdictionLevel
- type TaxTransactionShippingCostTaxBreakdownSourcing
- type TaxTransactionShippingCostTaxBreakdownTaxRateDetails
- type TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType
- type TaxTransactionShippingCostTaxBreakdownTaxabilityReason
- type TaxTransactionType
- type TerminalConfiguration
- type TerminalConfigurationBBPOSWisePOSE
- type TerminalConfigurationBBPOSWisePOSEParams
- type TerminalConfigurationList
- type TerminalConfigurationListParams
- type TerminalConfigurationOffline
- type TerminalConfigurationOfflineParams
- type TerminalConfigurationParams
- type TerminalConfigurationTipping
- type TerminalConfigurationTippingAUD
- type TerminalConfigurationTippingAUDParams
- type TerminalConfigurationTippingCAD
- type TerminalConfigurationTippingCADParams
- type TerminalConfigurationTippingCHF
- type TerminalConfigurationTippingCHFParams
- type TerminalConfigurationTippingCZK
- type TerminalConfigurationTippingCZKParams
- type TerminalConfigurationTippingDKK
- type TerminalConfigurationTippingDKKParams
- type TerminalConfigurationTippingEUR
- type TerminalConfigurationTippingEURParams
- type TerminalConfigurationTippingGBP
- type TerminalConfigurationTippingGBPParams
- type TerminalConfigurationTippingHKD
- type TerminalConfigurationTippingHKDParams
- type TerminalConfigurationTippingMYR
- type TerminalConfigurationTippingMYRParams
- type TerminalConfigurationTippingNOK
- type TerminalConfigurationTippingNOKParams
- type TerminalConfigurationTippingNZD
- type TerminalConfigurationTippingNZDParams
- type TerminalConfigurationTippingParams
- type TerminalConfigurationTippingSEK
- type TerminalConfigurationTippingSEKParams
- type TerminalConfigurationTippingSGD
- type TerminalConfigurationTippingSGDParams
- type TerminalConfigurationTippingUSD
- type TerminalConfigurationTippingUSDParams
- type TerminalConfigurationVerifoneP400
- type TerminalConfigurationVerifoneP400Params
- type TerminalConnectionToken
- type TerminalConnectionTokenParams
- type TerminalLocation
- type TerminalLocationList
- type TerminalLocationListParams
- type TerminalLocationParams
- type TerminalReader
- type TerminalReaderAction
- type TerminalReaderActionProcessPaymentIntent
- type TerminalReaderActionProcessPaymentIntentProcessConfig
- type TerminalReaderActionProcessPaymentIntentProcessConfigTipping
- type TerminalReaderActionProcessSetupIntent
- type TerminalReaderActionProcessSetupIntentProcessConfig
- type TerminalReaderActionRefundPayment
- type TerminalReaderActionRefundPaymentReason
- type TerminalReaderActionSetReaderDisplay
- type TerminalReaderActionSetReaderDisplayCart
- type TerminalReaderActionSetReaderDisplayCartLineItem
- type TerminalReaderActionSetReaderDisplayType
- type TerminalReaderActionStatus
- type TerminalReaderActionType
- type TerminalReaderCancelActionParams
- type TerminalReaderDeviceType
- type TerminalReaderList
- type TerminalReaderListParams
- type TerminalReaderParams
- type TerminalReaderProcessPaymentIntentParams
- type TerminalReaderProcessPaymentIntentProcessConfigParams
- type TerminalReaderProcessPaymentIntentProcessConfigTippingParams
- type TerminalReaderProcessSetupIntentParams
- type TerminalReaderProcessSetupIntentProcessConfigParams
- type TerminalReaderRefundPaymentParams
- type TerminalReaderSetReaderDisplayCartLineItemParams
- type TerminalReaderSetReaderDisplayCartParams
- type TerminalReaderSetReaderDisplayParams
- type TestHelpersCustomerFundCashBalanceParams
- type TestHelpersIssuingAuthorizationAmountDetailsParams
- type TestHelpersIssuingAuthorizationCaptureParams
- type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightParams
- type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightSegmentParams
- type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFuelParams
- type TestHelpersIssuingAuthorizationCapturePurchaseDetailsLodgingParams
- type TestHelpersIssuingAuthorizationCapturePurchaseDetailsParams
- type TestHelpersIssuingAuthorizationCapturePurchaseDetailsReceiptParams
- type TestHelpersIssuingAuthorizationExpireParams
- type TestHelpersIssuingAuthorizationIncrementParams
- type TestHelpersIssuingAuthorizationMerchantDataParams
- type TestHelpersIssuingAuthorizationNetworkDataParams
- type TestHelpersIssuingAuthorizationParams
- type TestHelpersIssuingAuthorizationReverseParams
- type TestHelpersIssuingAuthorizationVerificationDataParams
- type TestHelpersIssuingCardDeliverCardParams
- type TestHelpersIssuingCardFailCardParams
- type TestHelpersIssuingCardReturnCardParams
- type TestHelpersIssuingCardShipCardParams
- type TestHelpersIssuingTransactionCreateForceCaptureMerchantDataParams
- type TestHelpersIssuingTransactionCreateForceCaptureParams
- type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightParams
- type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightSegmentParams
- type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFuelParams
- type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsLodgingParams
- type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsParams
- type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsReceiptParams
- type TestHelpersIssuingTransactionCreateUnlinkedRefundMerchantDataParams
- type TestHelpersIssuingTransactionCreateUnlinkedRefundParams
- type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightParams
- type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightSegmentParams
- type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFuelParams
- type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsLodgingParams
- type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsParams
- type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsReceiptParams
- type TestHelpersIssuingTransactionRefundParams
- type TestHelpersRefundExpireParams
- type TestHelpersTerminalReaderPresentPaymentMethodCardPresentParams
- type TestHelpersTerminalReaderPresentPaymentMethodInteracPresentParams
- type TestHelpersTerminalReaderPresentPaymentMethodParams
- type TestHelpersTestClock
- type TestHelpersTestClockAdvanceParams
- type TestHelpersTestClockList
- type TestHelpersTestClockListParams
- type TestHelpersTestClockParams
- type TestHelpersTestClockStatus
- type TestHelpersTreasuryInboundTransferFailFailureDetailsParams
- type TestHelpersTreasuryInboundTransferFailParams
- type TestHelpersTreasuryInboundTransferReturnInboundTransferParams
- type TestHelpersTreasuryInboundTransferSucceedParams
- type TestHelpersTreasuryOutboundPaymentFailParams
- type TestHelpersTreasuryOutboundPaymentPostParams
- type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentParams
- type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentReturnedDetailsParams
- type TestHelpersTreasuryOutboundTransferFailParams
- type TestHelpersTreasuryOutboundTransferPostParams
- type TestHelpersTreasuryOutboundTransferReturnOutboundTransferParams
- type TestHelpersTreasuryOutboundTransferReturnOutboundTransferReturnedDetailsParams
- type TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsParams
- type TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccountParams
- type TestHelpersTreasuryReceivedCreditParams
- type TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsParams
- type TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccountParams
- type TestHelpersTreasuryReceivedDebitParams
- type Token
- type TokenAccountParams
- type TokenCVCUpdateParams
- type TokenPIIParams
- type TokenParams
- type TokenType
- type Topup
- type TopupList
- type TopupListParams
- type TopupParams
- type TopupStatus
- type Transfer
- type TransferList
- type TransferListParams
- type TransferParams
- type TransferReversal
- type TransferReversalList
- type TransferReversalListParams
- type TransferReversalParams
- type TransferSourceType
- type TreasuryCreditReversal
- type TreasuryCreditReversalList
- type TreasuryCreditReversalListParams
- type TreasuryCreditReversalNetwork
- type TreasuryCreditReversalParams
- type TreasuryCreditReversalStatus
- type TreasuryCreditReversalStatusTransitions
- type TreasuryDebitReversal
- type TreasuryDebitReversalLinkedFlows
- type TreasuryDebitReversalList
- type TreasuryDebitReversalListParams
- type TreasuryDebitReversalNetwork
- type TreasuryDebitReversalParams
- type TreasuryDebitReversalStatus
- type TreasuryDebitReversalStatusTransitions
- type TreasuryFinancialAccount
- type TreasuryFinancialAccountActiveFeature
- type TreasuryFinancialAccountBalance
- type TreasuryFinancialAccountFeatures
- type TreasuryFinancialAccountFeaturesCardIssuing
- type TreasuryFinancialAccountFeaturesCardIssuingParams
- type TreasuryFinancialAccountFeaturesCardIssuingStatus
- type TreasuryFinancialAccountFeaturesCardIssuingStatusDetail
- type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode
- type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution
- type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction
- type TreasuryFinancialAccountFeaturesDepositInsurance
- type TreasuryFinancialAccountFeaturesDepositInsuranceParams
- type TreasuryFinancialAccountFeaturesDepositInsuranceStatus
- type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetail
- type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode
- type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution
- type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction
- type TreasuryFinancialAccountFeaturesFinancialAddresses
- type TreasuryFinancialAccountFeaturesFinancialAddressesABA
- type TreasuryFinancialAccountFeaturesFinancialAddressesABAParams
- type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatus
- type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetail
- type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode
- type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolution
- type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailRestriction
- type TreasuryFinancialAccountFeaturesFinancialAddressesParams
- type TreasuryFinancialAccountFeaturesInboundTransfers
- type TreasuryFinancialAccountFeaturesInboundTransfersACH
- type TreasuryFinancialAccountFeaturesInboundTransfersACHParams
- type TreasuryFinancialAccountFeaturesInboundTransfersACHStatus
- type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetail
- type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode
- type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution
- type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction
- type TreasuryFinancialAccountFeaturesInboundTransfersParams
- type TreasuryFinancialAccountFeaturesIntraStripeFlows
- type TreasuryFinancialAccountFeaturesIntraStripeFlowsParams
- type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus
- type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetail
- type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode
- type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution
- type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction
- type TreasuryFinancialAccountFeaturesOutboundPayments
- type TreasuryFinancialAccountFeaturesOutboundPaymentsACH
- type TreasuryFinancialAccountFeaturesOutboundPaymentsACHParams
- type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus
- type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetail
- type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode
- type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution
- type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction
- type TreasuryFinancialAccountFeaturesOutboundPaymentsParams
- type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWire
- type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireParams
- type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus
- type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetail
- type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode
- type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution
- type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction
- type TreasuryFinancialAccountFeaturesOutboundTransfers
- type TreasuryFinancialAccountFeaturesOutboundTransfersACH
- type TreasuryFinancialAccountFeaturesOutboundTransfersACHParams
- type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus
- type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetail
- type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode
- type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution
- type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction
- type TreasuryFinancialAccountFeaturesOutboundTransfersParams
- type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWire
- type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireParams
- type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus
- type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetail
- type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode
- type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution
- type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction
- type TreasuryFinancialAccountFeaturesParams
- type TreasuryFinancialAccountFinancialAddress
- type TreasuryFinancialAccountFinancialAddressABA
- type TreasuryFinancialAccountFinancialAddressSupportedNetwork
- type TreasuryFinancialAccountFinancialAddressType
- type TreasuryFinancialAccountList
- type TreasuryFinancialAccountListParams
- type TreasuryFinancialAccountParams
- type TreasuryFinancialAccountPendingFeature
- type TreasuryFinancialAccountPlatformRestrictions
- type TreasuryFinancialAccountPlatformRestrictionsInboundFlows
- type TreasuryFinancialAccountPlatformRestrictionsOutboundFlows
- type TreasuryFinancialAccountPlatformRestrictionsParams
- type TreasuryFinancialAccountRestrictedFeature
- type TreasuryFinancialAccountRetrieveFeaturesParams
- type TreasuryFinancialAccountStatus
- type TreasuryFinancialAccountStatusDetails
- type TreasuryFinancialAccountStatusDetailsClosed
- type TreasuryFinancialAccountStatusDetailsClosedReason
- type TreasuryFinancialAccountUpdateFeaturesCardIssuingParams
- type TreasuryFinancialAccountUpdateFeaturesDepositInsuranceParams
- type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesABAParams
- type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesParams
- type TreasuryFinancialAccountUpdateFeaturesInboundTransfersACHParams
- type TreasuryFinancialAccountUpdateFeaturesInboundTransfersParams
- type TreasuryFinancialAccountUpdateFeaturesIntraStripeFlowsParams
- type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsACHParams
- type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsParams
- type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsUSDomesticWireParams
- type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersACHParams
- type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersParams
- type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersUSDomesticWireParams
- type TreasuryFinancialAccountUpdateFeaturesParams
- type TreasuryInboundTransfer
- type TreasuryInboundTransferCancelParams
- type TreasuryInboundTransferFailureDetails
- type TreasuryInboundTransferFailureDetailsCode
- type TreasuryInboundTransferLinkedFlows
- type TreasuryInboundTransferList
- type TreasuryInboundTransferListParams
- type TreasuryInboundTransferOriginPaymentMethodDetails
- type TreasuryInboundTransferOriginPaymentMethodDetailsBillingDetails
- type TreasuryInboundTransferOriginPaymentMethodDetailsType
- type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccount
- type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType
- type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType
- type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork
- type TreasuryInboundTransferParams
- type TreasuryInboundTransferStatus
- type TreasuryInboundTransferStatusTransitions
- type TreasuryOutboundPayment
- type TreasuryOutboundPaymentCancelParams
- type TreasuryOutboundPaymentDestinationPaymentMethodDataBillingDetailsParams
- type TreasuryOutboundPaymentDestinationPaymentMethodDataParams
- type TreasuryOutboundPaymentDestinationPaymentMethodDataUSBankAccountParams
- type TreasuryOutboundPaymentDestinationPaymentMethodDetails
- type TreasuryOutboundPaymentDestinationPaymentMethodDetailsBillingDetails
- type TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccount
- type TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork
- type TreasuryOutboundPaymentDestinationPaymentMethodDetailsType
- type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccount
- type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType
- type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType
- type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork
- type TreasuryOutboundPaymentDestinationPaymentMethodOptionsParams
- type TreasuryOutboundPaymentDestinationPaymentMethodOptionsUSBankAccountParams
- type TreasuryOutboundPaymentEndUserDetails
- type TreasuryOutboundPaymentEndUserDetailsParams
- type TreasuryOutboundPaymentList
- type TreasuryOutboundPaymentListParams
- type TreasuryOutboundPaymentParams
- type TreasuryOutboundPaymentReturnedDetails
- type TreasuryOutboundPaymentReturnedDetailsCode
- type TreasuryOutboundPaymentStatus
- type TreasuryOutboundPaymentStatusTransitions
- type TreasuryOutboundTransfer
- type TreasuryOutboundTransferCancelParams
- type TreasuryOutboundTransferDestinationPaymentMethodDetails
- type TreasuryOutboundTransferDestinationPaymentMethodDetailsBillingDetails
- type TreasuryOutboundTransferDestinationPaymentMethodDetailsType
- type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccount
- type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType
- type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType
- type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork
- type TreasuryOutboundTransferDestinationPaymentMethodOptionsParams
- type TreasuryOutboundTransferDestinationPaymentMethodOptionsUSBankAccountParams
- type TreasuryOutboundTransferList
- type TreasuryOutboundTransferListParams
- type TreasuryOutboundTransferParams
- type TreasuryOutboundTransferReturnedDetails
- type TreasuryOutboundTransferReturnedDetailsCode
- type TreasuryOutboundTransferStatus
- type TreasuryOutboundTransferStatusTransitions
- type TreasuryReceivedCredit
- type TreasuryReceivedCreditFailureCode
- type TreasuryReceivedCreditInitiatingPaymentMethodDetails
- type TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance
- type TreasuryReceivedCreditInitiatingPaymentMethodDetailsBillingDetails
- type TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount
- type TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork
- type TreasuryReceivedCreditInitiatingPaymentMethodDetailsType
- type TreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccount
- type TreasuryReceivedCreditLinkedFlows
- type TreasuryReceivedCreditLinkedFlowsSourceFlowDetails
- type TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType
- type TreasuryReceivedCreditList
- type TreasuryReceivedCreditListLinkedFlowsParams
- type TreasuryReceivedCreditListParams
- type TreasuryReceivedCreditNetwork
- type TreasuryReceivedCreditParams
- type TreasuryReceivedCreditReversalDetails
- type TreasuryReceivedCreditReversalDetailsRestrictedReason
- type TreasuryReceivedCreditStatus
- type TreasuryReceivedDebit
- type TreasuryReceivedDebitFailureCode
- type TreasuryReceivedDebitInitiatingPaymentMethodDetails
- type TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance
- type TreasuryReceivedDebitInitiatingPaymentMethodDetailsBillingDetails
- type TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount
- type TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork
- type TreasuryReceivedDebitInitiatingPaymentMethodDetailsType
- type TreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccount
- type TreasuryReceivedDebitLinkedFlows
- type TreasuryReceivedDebitList
- type TreasuryReceivedDebitListParams
- type TreasuryReceivedDebitNetwork
- type TreasuryReceivedDebitParams
- type TreasuryReceivedDebitReversalDetails
- type TreasuryReceivedDebitReversalDetailsRestrictedReason
- type TreasuryReceivedDebitStatus
- type TreasuryTransaction
- type TreasuryTransactionBalanceImpact
- type TreasuryTransactionEntry
- type TreasuryTransactionEntryBalanceImpact
- type TreasuryTransactionEntryFlowDetails
- type TreasuryTransactionEntryFlowDetailsType
- type TreasuryTransactionEntryFlowType
- type TreasuryTransactionEntryList
- type TreasuryTransactionEntryListParams
- type TreasuryTransactionEntryParams
- type TreasuryTransactionEntryType
- type TreasuryTransactionFlowDetails
- type TreasuryTransactionFlowDetailsType
- type TreasuryTransactionFlowType
- type TreasuryTransactionList
- type TreasuryTransactionListParams
- type TreasuryTransactionListStatusTransitionsParams
- type TreasuryTransactionParams
- type TreasuryTransactionStatus
- type TreasuryTransactionStatusTransitions
- type UsageRecord
- type UsageRecordParams
- type UsageRecordSummary
- type UsageRecordSummaryList
- type UsageRecordSummaryListParams
- type VerificationFieldsList
- type WebhookEndpoint
- type WebhookEndpointList
- type WebhookEndpointListParams
- type WebhookEndpointParams
Examples ¶
Constants ¶
const ( EndingBefore = "ending_before" StartingAfter = "starting_after" )
Contains constants for the names of parameters used for pagination in list APIs.
const ( // APIVersion is the currently supported API version APIVersion string = apiVersion // APIBackend is a constant representing the API service backend. APIBackend SupportedBackend = "api" // APIURL is the URL of the API service backend. APIURL string = "https://api.stripe.com" // ClientVersion is the version of the stripe-go library being used. ClientVersion string = clientversion // ConnectURL is the URL for OAuth. ConnectURL string = "https://connect.stripe.com" // ConnectBackend is a constant representing the connect service backend for // OAuth. ConnectBackend SupportedBackend = "connect" // DefaultMaxNetworkRetries is the default maximum number of retries made // by a Stripe client. DefaultMaxNetworkRetries int64 = 2 // UnknownPlatform is the string returned as the system name if we couldn't get // one from `uname`. UnknownPlatform string = "unknown platform" // UploadsBackend is a constant representing the uploads service backend. UploadsBackend SupportedBackend = "uploads" // UploadsURL is the URL of the uploads service backend. UploadsURL string = "https://files.stripe.com" )
const ( UsageRecordActionIncrement string = "increment" UsageRecordActionSet string = "set" )
Possible values for the action parameter on usage record creation.
const (
Page = "page"
)
Contains constants for the names of parameters used for pagination in search APIs.
Variables ¶
var EnableTelemetry = true
EnableTelemetry is a global override for enabling client telemetry, which sends request performance metrics to Stripe via the `X-Stripe-Client-Telemetry` header. If set to true, all clients will send telemetry metrics. Defaults to true.
Telemetry can also be disabled on a per-client basis by instead creating a `BackendConfig` with `EnableTelemetry: false`.
var Key string
Key is the Stripe API key used globally in the binding.
Functions ¶
func BoolValue ¶
BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.
func Float64Slice ¶
Float64Slice returns a slice of float64 pointers given a slice of float64s.
func Float64Value ¶
Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.
func FormatURLPath ¶
FormatURLPath takes a format string (of the kind used in the fmt package) representing a URL path with a number of parameters that belong in the path and returns a formatted string.
This is mostly a pass through to Sprintf. It exists to make it it impossible to accidentally provide a parameter type that would be formatted improperly; for example, a string pointer instead of a string.
It also URL-escapes every given parameter. This usually isn't necessary for a standard Stripe ID, but is needed in places where user-provided IDs are allowed, like in coupons or plans. We apply it broadly for extra safety.
func Int64Slice ¶
Int64Slice returns a slice of int64 pointers given a slice of int64s.
func Int64Value ¶
Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.
func NewIdempotencyKey ¶
func NewIdempotencyKey() string
NewIdempotencyKey generates a new idempotency key that can be used on a request.
func ParseID ¶
ParseID attempts to parse a string scalar from a given JSON value which is still encoded as []byte. If the value was a string, it returns the string along with true as the second return value. If not, false is returned as the second return value.
The purpose of this function is to detect whether a given value in a response from the Stripe API is a string ID or an expanded object.
func SetBackend ¶
func SetBackend(backend SupportedBackend, b Backend)
SetBackend sets the backend used in the binding.
func SetHTTPClient ¶
SetHTTPClient overrides the default HTTP client. This is useful if you're running in a Google AppEngine environment where the http.DefaultClient is not available.
func StringSlice ¶
StringSlice returns a slice of string pointers given a slice of strings.
func StringValue ¶
StringValue returns the value of the string pointer passed in or "" if the pointer is nil.
Types ¶
type APIError ¶
type APIError struct {
// contains filtered or unexported fields
}
APIError is a catch all for any errors not covered by other types (and should be extremely uncommon).
type APIResource ¶
type APIResource struct {
LastResponse *APIResponse `json:"-"`
}
APIResource is a type assigned to structs that may come from Stripe API endpoints and contains facilities common to all of them.
func (*APIResource) SetLastResponse ¶
func (r *APIResource) SetLastResponse(response *APIResponse)
SetLastResponse sets the HTTP response that returned the API resource.
type APIResponse ¶
type APIResponse struct { // Header contain a map of all HTTP header keys to values. Its behavior and // caveats are identical to that of http.Header. Header http.Header // IdempotencyKey contains the idempotency key used with this request. // Idempotency keys are a Stripe-specific concept that helps guarantee that // requests that fail and need to be retried are not duplicated. IdempotencyKey string // RawJSON contains the response body as raw bytes. RawJSON []byte // RequestID contains a string that uniquely identifies the Stripe request. // Used for debugging or support purposes. RequestID string // Status is a status code and message. e.g. "200 OK" Status string // StatusCode is a status code as integer. e.g. 200 StatusCode int }
APIResponse encapsulates some common features of a response from the Stripe API.
type APIStream ¶
type APIStream struct {
LastResponse *StreamingAPIResponse
}
APIStream is a type assigned to streaming responses that may come from Stripe API
func (*APIStream) SetLastResponse ¶
func (r *APIStream) SetLastResponse(response *StreamingAPIResponse)
SetLastResponse sets the HTTP response that returned the API resource.
type Account ¶
type Account struct { APIResource // Business information about the account. BusinessProfile *AccountBusinessProfile `json:"business_profile"` // The business type. BusinessType AccountBusinessType `json:"business_type"` Capabilities *AccountCapabilities `json:"capabilities"` // Whether the account can create live charges. ChargesEnabled bool `json:"charges_enabled"` Company *AccountCompany `json:"company"` Controller *AccountController `json:"controller"` // The account's country. Country string `json:"country"` // Time at which the account was connected. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). DefaultCurrency Currency `json:"default_currency"` Deleted bool `json:"deleted"` // Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. DetailsSubmitted bool `json:"details_submitted"` // An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. Email string `json:"email"` // External accounts (bank accounts and debit cards) currently attached to this account ExternalAccounts *AccountExternalAccountList `json:"external_accounts"` FutureRequirements *AccountFutureRequirements `json:"future_requirements"` // Unique identifier for the object. ID string `json:"id"` // This is an object representing a person associated with a Stripe account. // // A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. // See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps. // // Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information) Individual *Person `json:"individual"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Whether Stripe can send payouts to this account. PayoutsEnabled bool `json:"payouts_enabled"` Requirements *AccountRequirements `json:"requirements"` // Options for customizing how the account functions within Stripe. Settings *AccountSettings `json:"settings"` TOSAcceptance *AccountTOSAcceptance `json:"tos_acceptance"` // The Stripe account type. Can be `standard`, `express`, or `custom`. Type AccountType `json:"type"` }
This is an object representing a Stripe account. You can retrieve it to see properties on the account like its current requirements or if the account is enabled to make live charges or receive payouts.
For Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that account has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links) for a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express** below. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).
func (*Account) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of an Account. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type AccountBusinessProfile ¶
type AccountBusinessProfile struct { // [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. MCC string `json:"mcc"` MonthlyEstimatedRevenue *AccountBusinessProfileMonthlyEstimatedRevenue `json:"monthly_estimated_revenue"` // The customer-facing business name. Name string `json:"name"` // Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. ProductDescription string `json:"product_description"` // A publicly available mailing address for sending support issues to. SupportAddress *Address `json:"support_address"` // A publicly available email address for sending support issues to. SupportEmail string `json:"support_email"` // A publicly available phone number to call with support issues. SupportPhone string `json:"support_phone"` // A publicly available website for handling support issues. SupportURL string `json:"support_url"` // The business's publicly available website. URL string `json:"url"` }
Business information about the account.
type AccountBusinessProfileMonthlyEstimatedRevenue ¶
type AccountBusinessProfileMonthlyEstimatedRevenue struct { // A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount int64 `json:"amount"` // 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 Currency `json:"currency"` }
type AccountBusinessProfileMonthlyEstimatedRevenueParams ¶
type AccountBusinessProfileMonthlyEstimatedRevenueParams struct { // A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount *int64 `form:"amount"` // 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 `form:"currency"` }
An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
type AccountBusinessProfileParams ¶
type AccountBusinessProfileParams struct { // [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. MCC *string `form:"mcc"` // An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. MonthlyEstimatedRevenue *AccountBusinessProfileMonthlyEstimatedRevenueParams `form:"monthly_estimated_revenue"` // The customer-facing business name. Name *string `form:"name"` // Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. ProductDescription *string `form:"product_description"` // A publicly available mailing address for sending support issues to. SupportAddress *AddressParams `form:"support_address"` // A publicly available email address for sending support issues to. SupportEmail *string `form:"support_email"` // A publicly available phone number to call with support issues. SupportPhone *string `form:"support_phone"` // A publicly available website for handling support issues. SupportURL *string `form:"support_url"` // The business's publicly available website. URL *string `form:"url"` }
Business information about the account.
type AccountBusinessType ¶
type AccountBusinessType string
The business type.
const ( AccountBusinessTypeCompany AccountBusinessType = "company" AccountBusinessTypeGovernmentEntity AccountBusinessType = "government_entity" AccountBusinessTypeIndividual AccountBusinessType = "individual" AccountBusinessTypeNonProfit AccountBusinessType = "non_profit" )
List of values that AccountBusinessType can take
type AccountCapabilities ¶
type AccountCapabilities struct { // The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. ACSSDebitPayments AccountCapabilityStatus `json:"acss_debit_payments"` // The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. AffirmPayments AccountCapabilityStatus `json:"affirm_payments"` // The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. AfterpayClearpayPayments AccountCapabilityStatus `json:"afterpay_clearpay_payments"` // The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. AUBECSDebitPayments AccountCapabilityStatus `json:"au_becs_debit_payments"` // The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. BACSDebitPayments AccountCapabilityStatus `json:"bacs_debit_payments"` // The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. BancontactPayments AccountCapabilityStatus `json:"bancontact_payments"` // The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. BankTransferPayments AccountCapabilityStatus `json:"bank_transfer_payments"` // The status of the blik payments capability of the account, or whether the account can directly process blik charges. BLIKPayments AccountCapabilityStatus `json:"blik_payments"` // The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. BoletoPayments AccountCapabilityStatus `json:"boleto_payments"` // The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards CardIssuing AccountCapabilityStatus `json:"card_issuing"` // The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. CardPayments AccountCapabilityStatus `json:"card_payments"` // The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. CartesBancairesPayments AccountCapabilityStatus `json:"cartes_bancaires_payments"` // The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. CashAppPayments AccountCapabilityStatus `json:"cashapp_payments"` // The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. EPSPayments AccountCapabilityStatus `json:"eps_payments"` // The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. FPXPayments AccountCapabilityStatus `json:"fpx_payments"` // The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. GiropayPayments AccountCapabilityStatus `json:"giropay_payments"` // The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. GrabpayPayments AccountCapabilityStatus `json:"grabpay_payments"` // The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. IDEALPayments AccountCapabilityStatus `json:"ideal_payments"` // The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. IndiaInternationalPayments AccountCapabilityStatus `json:"india_international_payments"` // The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. JCBPayments AccountCapabilityStatus `json:"jcb_payments"` // The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. KlarnaPayments AccountCapabilityStatus `json:"klarna_payments"` // The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. KonbiniPayments AccountCapabilityStatus `json:"konbini_payments"` // The status of the legacy payments capability of the account. LegacyPayments AccountCapabilityStatus `json:"legacy_payments"` // The status of the link_payments capability of the account, or whether the account can directly process Link charges. LinkPayments AccountCapabilityStatus `json:"link_payments"` // The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. OXXOPayments AccountCapabilityStatus `json:"oxxo_payments"` // The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. P24Payments AccountCapabilityStatus `json:"p24_payments"` // The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. PayNowPayments AccountCapabilityStatus `json:"paynow_payments"` // The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. PromptPayPayments AccountCapabilityStatus `json:"promptpay_payments"` // The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. SEPADebitPayments AccountCapabilityStatus `json:"sepa_debit_payments"` // The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. SofortPayments AccountCapabilityStatus `json:"sofort_payments"` // The status of the tax reporting 1099-K (US) capability of the account. TaxReportingUS1099K AccountCapabilityStatus `json:"tax_reporting_us_1099_k"` // The status of the tax reporting 1099-MISC (US) capability of the account. TaxReportingUS1099MISC AccountCapabilityStatus `json:"tax_reporting_us_1099_misc"` // The status of the transfers capability of the account, or whether your platform can transfer funds to the account. Transfers AccountCapabilityStatus `json:"transfers"` // The status of the banking capability, or whether the account can have bank accounts. Treasury AccountCapabilityStatus `json:"treasury"` // The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. USBankAccountACHPayments AccountCapabilityStatus `json:"us_bank_account_ach_payments"` // The status of the Zip capability of the account, or whether the account can directly process Zip charges. ZipPayments AccountCapabilityStatus `json:"zip_payments"` }
type AccountCapabilitiesACSSDebitPaymentsParams ¶
type AccountCapabilitiesACSSDebitPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The acss_debit_payments capability.
type AccountCapabilitiesAUBECSDebitPaymentsParams ¶
type AccountCapabilitiesAUBECSDebitPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The au_becs_debit_payments capability.
type AccountCapabilitiesAffirmPaymentsParams ¶
type AccountCapabilitiesAffirmPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The affirm_payments capability.
type AccountCapabilitiesAfterpayClearpayPaymentsParams ¶
type AccountCapabilitiesAfterpayClearpayPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The afterpay_clearpay_payments capability.
type AccountCapabilitiesBACSDebitPaymentsParams ¶
type AccountCapabilitiesBACSDebitPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The bacs_debit_payments capability.
type AccountCapabilitiesBLIKPaymentsParams ¶
type AccountCapabilitiesBLIKPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The blik_payments capability.
type AccountCapabilitiesBancontactPaymentsParams ¶
type AccountCapabilitiesBancontactPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The bancontact_payments capability.
type AccountCapabilitiesBankTransferPaymentsParams ¶
type AccountCapabilitiesBankTransferPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The bank_transfer_payments capability.
type AccountCapabilitiesBoletoPaymentsParams ¶
type AccountCapabilitiesBoletoPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The boleto_payments capability.
type AccountCapabilitiesCardIssuingParams ¶
type AccountCapabilitiesCardIssuingParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The card_issuing capability.
type AccountCapabilitiesCardPaymentsParams ¶
type AccountCapabilitiesCardPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The card_payments capability.
type AccountCapabilitiesCartesBancairesPaymentsParams ¶
type AccountCapabilitiesCartesBancairesPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The cartes_bancaires_payments capability.
type AccountCapabilitiesCashAppPaymentsParams ¶
type AccountCapabilitiesCashAppPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The cashapp_payments capability.
type AccountCapabilitiesEPSPaymentsParams ¶
type AccountCapabilitiesEPSPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The eps_payments capability.
type AccountCapabilitiesFPXPaymentsParams ¶
type AccountCapabilitiesFPXPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The fpx_payments capability.
type AccountCapabilitiesGiropayPaymentsParams ¶
type AccountCapabilitiesGiropayPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The giropay_payments capability.
type AccountCapabilitiesGrabpayPaymentsParams ¶
type AccountCapabilitiesGrabpayPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The grabpay_payments capability.
type AccountCapabilitiesIDEALPaymentsParams ¶
type AccountCapabilitiesIDEALPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The ideal_payments capability.
type AccountCapabilitiesIndiaInternationalPaymentsParams ¶
type AccountCapabilitiesIndiaInternationalPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The india_international_payments capability.
type AccountCapabilitiesJCBPaymentsParams ¶
type AccountCapabilitiesJCBPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The jcb_payments capability.
type AccountCapabilitiesKlarnaPaymentsParams ¶
type AccountCapabilitiesKlarnaPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The klarna_payments capability.
type AccountCapabilitiesKonbiniPaymentsParams ¶
type AccountCapabilitiesKonbiniPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The konbini_payments capability.
type AccountCapabilitiesLegacyPaymentsParams ¶
type AccountCapabilitiesLegacyPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The legacy_payments capability.
type AccountCapabilitiesLinkPaymentsParams ¶
type AccountCapabilitiesLinkPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The link_payments capability.
type AccountCapabilitiesOXXOPaymentsParams ¶
type AccountCapabilitiesOXXOPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The oxxo_payments capability.
type AccountCapabilitiesP24PaymentsParams ¶
type AccountCapabilitiesP24PaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The p24_payments capability.
type AccountCapabilitiesParams ¶
type AccountCapabilitiesParams struct { // The acss_debit_payments capability. ACSSDebitPayments *AccountCapabilitiesACSSDebitPaymentsParams `form:"acss_debit_payments"` // The affirm_payments capability. AffirmPayments *AccountCapabilitiesAffirmPaymentsParams `form:"affirm_payments"` // The afterpay_clearpay_payments capability. AfterpayClearpayPayments *AccountCapabilitiesAfterpayClearpayPaymentsParams `form:"afterpay_clearpay_payments"` // The au_becs_debit_payments capability. AUBECSDebitPayments *AccountCapabilitiesAUBECSDebitPaymentsParams `form:"au_becs_debit_payments"` // The bacs_debit_payments capability. BACSDebitPayments *AccountCapabilitiesBACSDebitPaymentsParams `form:"bacs_debit_payments"` // The bancontact_payments capability. BancontactPayments *AccountCapabilitiesBancontactPaymentsParams `form:"bancontact_payments"` // The bank_transfer_payments capability. BankTransferPayments *AccountCapabilitiesBankTransferPaymentsParams `form:"bank_transfer_payments"` // The blik_payments capability. BLIKPayments *AccountCapabilitiesBLIKPaymentsParams `form:"blik_payments"` // The boleto_payments capability. BoletoPayments *AccountCapabilitiesBoletoPaymentsParams `form:"boleto_payments"` // The card_issuing capability. CardIssuing *AccountCapabilitiesCardIssuingParams `form:"card_issuing"` // The card_payments capability. CardPayments *AccountCapabilitiesCardPaymentsParams `form:"card_payments"` // The cartes_bancaires_payments capability. CartesBancairesPayments *AccountCapabilitiesCartesBancairesPaymentsParams `form:"cartes_bancaires_payments"` // The cashapp_payments capability. CashAppPayments *AccountCapabilitiesCashAppPaymentsParams `form:"cashapp_payments"` // The eps_payments capability. EPSPayments *AccountCapabilitiesEPSPaymentsParams `form:"eps_payments"` // The fpx_payments capability. FPXPayments *AccountCapabilitiesFPXPaymentsParams `form:"fpx_payments"` // The giropay_payments capability. GiropayPayments *AccountCapabilitiesGiropayPaymentsParams `form:"giropay_payments"` // The grabpay_payments capability. GrabpayPayments *AccountCapabilitiesGrabpayPaymentsParams `form:"grabpay_payments"` // The ideal_payments capability. IDEALPayments *AccountCapabilitiesIDEALPaymentsParams `form:"ideal_payments"` // The india_international_payments capability. IndiaInternationalPayments *AccountCapabilitiesIndiaInternationalPaymentsParams `form:"india_international_payments"` // The jcb_payments capability. JCBPayments *AccountCapabilitiesJCBPaymentsParams `form:"jcb_payments"` // The klarna_payments capability. KlarnaPayments *AccountCapabilitiesKlarnaPaymentsParams `form:"klarna_payments"` // The konbini_payments capability. KonbiniPayments *AccountCapabilitiesKonbiniPaymentsParams `form:"konbini_payments"` // The legacy_payments capability. LegacyPayments *AccountCapabilitiesLegacyPaymentsParams `form:"legacy_payments"` // The link_payments capability. LinkPayments *AccountCapabilitiesLinkPaymentsParams `form:"link_payments"` // The oxxo_payments capability. OXXOPayments *AccountCapabilitiesOXXOPaymentsParams `form:"oxxo_payments"` // The p24_payments capability. P24Payments *AccountCapabilitiesP24PaymentsParams `form:"p24_payments"` // The paynow_payments capability. PayNowPayments *AccountCapabilitiesPayNowPaymentsParams `form:"paynow_payments"` // The promptpay_payments capability. PromptPayPayments *AccountCapabilitiesPromptPayPaymentsParams `form:"promptpay_payments"` // The sepa_debit_payments capability. SEPADebitPayments *AccountCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments"` // The sofort_payments capability. SofortPayments *AccountCapabilitiesSofortPaymentsParams `form:"sofort_payments"` // The tax_reporting_us_1099_k capability. TaxReportingUS1099K *AccountCapabilitiesTaxReportingUS1099KParams `form:"tax_reporting_us_1099_k"` // The tax_reporting_us_1099_misc capability. TaxReportingUS1099MISC *AccountCapabilitiesTaxReportingUS1099MISCParams `form:"tax_reporting_us_1099_misc"` // The transfers capability. Transfers *AccountCapabilitiesTransfersParams `form:"transfers"` // The treasury capability. Treasury *AccountCapabilitiesTreasuryParams `form:"treasury"` // The us_bank_account_ach_payments capability. USBankAccountACHPayments *AccountCapabilitiesUSBankAccountACHPaymentsParams `form:"us_bank_account_ach_payments"` // The zip_payments capability. ZipPayments *AccountCapabilitiesZipPaymentsParams `form:"zip_payments"` }
Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.
type AccountCapabilitiesPayNowPaymentsParams ¶
type AccountCapabilitiesPayNowPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The paynow_payments capability.
type AccountCapabilitiesPromptPayPaymentsParams ¶
type AccountCapabilitiesPromptPayPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The promptpay_payments capability.
type AccountCapabilitiesSEPADebitPaymentsParams ¶
type AccountCapabilitiesSEPADebitPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The sepa_debit_payments capability.
type AccountCapabilitiesSofortPaymentsParams ¶
type AccountCapabilitiesSofortPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The sofort_payments capability.
type AccountCapabilitiesTaxReportingUS1099KParams ¶
type AccountCapabilitiesTaxReportingUS1099KParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The tax_reporting_us_1099_k capability.
type AccountCapabilitiesTaxReportingUS1099MISCParams ¶
type AccountCapabilitiesTaxReportingUS1099MISCParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The tax_reporting_us_1099_misc capability.
type AccountCapabilitiesTransfersParams ¶
type AccountCapabilitiesTransfersParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The transfers capability.
type AccountCapabilitiesTreasuryParams ¶
type AccountCapabilitiesTreasuryParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The treasury capability.
type AccountCapabilitiesUSBankAccountACHPaymentsParams ¶
type AccountCapabilitiesUSBankAccountACHPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The us_bank_account_ach_payments capability.
type AccountCapabilitiesZipPaymentsParams ¶
type AccountCapabilitiesZipPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. Requested *bool `form:"requested"` }
The zip_payments capability.
type AccountCapabilityStatus ¶
type AccountCapabilityStatus string
The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges.
const ( AccountCapabilityStatusActive AccountCapabilityStatus = "active" AccountCapabilityStatusInactive AccountCapabilityStatus = "inactive" AccountCapabilityStatusPending AccountCapabilityStatus = "pending" )
List of values that AccountCapabilityStatus can take
type AccountCompany ¶
type AccountCompany struct { Address *Address `json:"address"` // The Kana variation of the company's primary address (Japan only). AddressKana *AccountCompanyAddressKana `json:"address_kana"` // The Kanji variation of the company's primary address (Japan only). AddressKanji *AccountCompanyAddressKanji `json:"address_kanji"` // Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). DirectorsProvided bool `json:"directors_provided"` // Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. ExecutivesProvided bool `json:"executives_provided"` // The export license ID number of the company, also referred as Import Export Code (India only). ExportLicenseID string `json:"export_license_id"` // The purpose code to use for export transactions (India only). ExportPurposeCode string `json:"export_purpose_code"` // The company's legal name. Name string `json:"name"` // The Kana variation of the company's legal name (Japan only). NameKana string `json:"name_kana"` // The Kanji variation of the company's legal name (Japan only). NameKanji string `json:"name_kanji"` // This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. OwnershipDeclaration *AccountCompanyOwnershipDeclaration `json:"ownership_declaration"` // Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). OwnersProvided bool `json:"owners_provided"` // The company's phone number (used for verification). Phone string `json:"phone"` // The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. Structure AccountCompanyStructure `json:"structure"` // Whether the company's business ID number was provided. TaxIDProvided bool `json:"tax_id_provided"` // The jurisdiction in which the `tax_id` is registered (Germany-based companies only). TaxIDRegistrar string `json:"tax_id_registrar"` // Whether the company's business VAT number was provided. VATIDProvided bool `json:"vat_id_provided"` // Information on the verification state of the company. Verification *AccountCompanyVerification `json:"verification"` }
type AccountCompanyAddressKana ¶
type AccountCompanyAddressKana struct { // City/Ward. City string `json:"city"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // Block/Building number. Line1 string `json:"line1"` // Building details. Line2 string `json:"line2"` // ZIP or postal code. PostalCode string `json:"postal_code"` // Prefecture. State string `json:"state"` // Town/cho-me. Town string `json:"town"` }
The Kana variation of the company's primary address (Japan only).
type AccountCompanyAddressKanaParams ¶
type AccountCompanyAddressKanaParams struct { // City or ward. City *string `form:"city"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country *string `form:"country"` // Block or building number. Line1 *string `form:"line1"` // Building details. Line2 *string `form:"line2"` // Postal code. PostalCode *string `form:"postal_code"` // Prefecture. State *string `form:"state"` // Town or cho-me. Town *string `form:"town"` }
The Kana variation of the company's primary address (Japan only).
type AccountCompanyAddressKanji ¶
type AccountCompanyAddressKanji struct { // City/Ward. City string `json:"city"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // Block/Building number. Line1 string `json:"line1"` // Building details. Line2 string `json:"line2"` // ZIP or postal code. PostalCode string `json:"postal_code"` // Prefecture. State string `json:"state"` // Town/cho-me. Town string `json:"town"` }
The Kanji variation of the company's primary address (Japan only).
type AccountCompanyAddressKanjiParams ¶
type AccountCompanyAddressKanjiParams struct { // City or ward. City *string `form:"city"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country *string `form:"country"` // Block or building number. Line1 *string `form:"line1"` // Building details. Line2 *string `form:"line2"` // Postal code. PostalCode *string `form:"postal_code"` // Prefecture. State *string `form:"state"` // Town or cho-me. Town *string `form:"town"` }
The Kanji variation of the company's primary address (Japan only).
type AccountCompanyOwnershipDeclaration ¶
type AccountCompanyOwnershipDeclaration struct { // The Unix timestamp marking when the beneficial owner attestation was made. Date int64 `json:"date"` // The IP address from which the beneficial owner attestation was made. IP string `json:"ip"` // The user-agent string from the browser where the beneficial owner attestation was made. UserAgent string `json:"user_agent"` }
This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
type AccountCompanyOwnershipDeclarationParams ¶
type AccountCompanyOwnershipDeclarationParams struct { // The Unix timestamp marking when the beneficial owner attestation was made. Date *int64 `form:"date"` // The IP address from which the beneficial owner attestation was made. IP *string `form:"ip"` // The user agent of the browser from which the beneficial owner attestation was made. UserAgent *string `form:"user_agent"` }
This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
type AccountCompanyParams ¶
type AccountCompanyParams struct { // The company's primary address. Address *AddressParams `form:"address"` // The Kana variation of the company's primary address (Japan only). AddressKana *AccountCompanyAddressKanaParams `form:"address_kana"` // The Kanji variation of the company's primary address (Japan only). AddressKanji *AccountCompanyAddressKanjiParams `form:"address_kanji"` // Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. DirectorsProvided *bool `form:"directors_provided"` // Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement. ExecutivesProvided *bool `form:"executives_provided"` // The export license ID number of the company, also referred as Import Export Code (India only). ExportLicenseID *string `form:"export_license_id"` // The purpose code to use for export transactions (India only). ExportPurposeCode *string `form:"export_purpose_code"` // The company's legal name. Name *string `form:"name"` // The Kana variation of the company's legal name (Japan only). NameKana *string `form:"name_kana"` // The Kanji variation of the company's legal name (Japan only). NameKanji *string `form:"name_kanji"` // This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. OwnershipDeclaration *AccountCompanyOwnershipDeclarationParams `form:"ownership_declaration"` // This parameter can only be used on Token creation. OwnershipDeclarationShownAndSigned *bool `form:"ownership_declaration_shown_and_signed"` // Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.owner` requirement. OwnersProvided *bool `form:"owners_provided"` // The company's phone number (used for verification). Phone *string `form:"phone"` // The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). RegistrationNumber *string `form:"registration_number"` // The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. Structure *string `form:"structure"` // The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) TaxID *string `form:"tax_id"` // The jurisdiction in which the `tax_id` is registered (Germany-based companies only). TaxIDRegistrar *string `form:"tax_id_registrar"` // The VAT number of the company. VATID *string `form:"vat_id"` // Information on the verification state of the company. Verification *AccountCompanyVerificationParams `form:"verification"` }
Information about the company or business. This field is available for any `business_type`.
type AccountCompanyStructure ¶
type AccountCompanyStructure string
The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
const ( AccountCompanyStructureFreeZoneEstablishment AccountCompanyStructure = "free_zone_establishment" AccountCompanyStructureFreeZoneLLC AccountCompanyStructure = "free_zone_llc" AccountCompanyStructureGovernmentInstrumentality AccountCompanyStructure = "government_instrumentality" AccountCompanyStructureGovernmentalUnit AccountCompanyStructure = "governmental_unit" AccountCompanyStructureIncorporatedNonProfit AccountCompanyStructure = "incorporated_non_profit" AccountCompanyStructureIncorporatedPartnership AccountCompanyStructure = "incorporated_partnership" AccountCompanyStructureLimitedLiabilityPartnership AccountCompanyStructure = "limited_liability_partnership" AccountCompanyStructureLLC AccountCompanyStructure = "llc" AccountCompanyStructureMultiMemberLLC AccountCompanyStructure = "multi_member_llc" AccountCompanyStructurePrivateCompany AccountCompanyStructure = "private_company" AccountCompanyStructurePrivateCorporation AccountCompanyStructure = "private_corporation" AccountCompanyStructurePrivatePartnership AccountCompanyStructure = "private_partnership" AccountCompanyStructurePublicCompany AccountCompanyStructure = "public_company" AccountCompanyStructurePublicCorporation AccountCompanyStructure = "public_corporation" AccountCompanyStructurePublicPartnership AccountCompanyStructure = "public_partnership" AccountCompanyStructureSingleMemberLLC AccountCompanyStructure = "single_member_llc" AccountCompanyStructureSoleEstablishment AccountCompanyStructure = "sole_establishment" AccountCompanyStructureSoleProprietorship AccountCompanyStructure = "sole_proprietorship" AccountCompanyStructureTaxExemptGovernmentInstrumentality AccountCompanyStructure = "tax_exempt_government_instrumentality" AccountCompanyStructureUnincorporatedAssociation AccountCompanyStructure = "unincorporated_association" AccountCompanyStructureUnincorporatedNonProfit AccountCompanyStructure = "unincorporated_non_profit" AccountCompanyStructureUnincorporatedPartnership AccountCompanyStructure = "unincorporated_partnership" )
List of values that AccountCompanyStructure can take
type AccountCompanyVerification ¶
type AccountCompanyVerification struct {
Document *AccountCompanyVerificationDocument `json:"document"`
}
Information on the verification state of the company.
type AccountCompanyVerificationDocument ¶
type AccountCompanyVerificationDocument struct { // The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. Back *File `json:"back"` // A user-displayable string describing the verification state of this document. Details string `json:"details"` // One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. DetailsCode AccountCompanyVerificationDocumentDetailsCode `json:"details_code"` // The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. Front *File `json:"front"` }
type AccountCompanyVerificationDocumentDetailsCode ¶
type AccountCompanyVerificationDocumentDetailsCode string
One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document.
const ( AccountCompanyVerificationDocumentDetailsCodeDocumentCorrupt AccountCompanyVerificationDocumentDetailsCode = "document_corrupt" AccountCompanyVerificationDocumentDetailsCodeDocumentExpired AccountCompanyVerificationDocumentDetailsCode = "document_expired" AccountCompanyVerificationDocumentDetailsCodeDocumentFailedCopy AccountCompanyVerificationDocumentDetailsCode = "document_failed_copy" AccountCompanyVerificationDocumentDetailsCodeDocumentFailedOther AccountCompanyVerificationDocumentDetailsCode = "document_failed_other" AccountCompanyVerificationDocumentDetailsCodeDocumentFailedTestMode AccountCompanyVerificationDocumentDetailsCode = "document_failed_test_mode" AccountCompanyVerificationDocumentDetailsCodeDocumentFailedGreyscale AccountCompanyVerificationDocumentDetailsCode = "document_failed_greyscale" AccountCompanyVerificationDocumentDetailsCodeDocumentFraudulent AccountCompanyVerificationDocumentDetailsCode = "document_fraudulent" AccountCompanyVerificationDocumentDetailsCodeDocumentInvalid AccountCompanyVerificationDocumentDetailsCode = "document_invalid" AccountCompanyVerificationDocumentDetailsCodeDocumentIncomplete AccountCompanyVerificationDocumentDetailsCode = "document_incomplete" AccountCompanyVerificationDocumentDetailsCodeDocumentManipulated AccountCompanyVerificationDocumentDetailsCode = "document_manipulated" AccountCompanyVerificationDocumentDetailsCodeDocumentNotReadable AccountCompanyVerificationDocumentDetailsCode = "document_not_readable" AccountCompanyVerificationDocumentDetailsCodeDocumentNotUploaded AccountCompanyVerificationDocumentDetailsCode = "document_not_uploaded" AccountCompanyVerificationDocumentDetailsCodeDocumentTooLarge AccountCompanyVerificationDocumentDetailsCode = "document_too_large" AccountCompanyVerificationDocumentDetailsCodeDocumentTypeNotSupported AccountCompanyVerificationDocumentDetailsCode = "document_type_not_supported" )
List of values that AccountCompanyVerificationDocumentDetailsCode can take
type AccountCompanyVerificationDocumentParams ¶
type AccountCompanyVerificationDocumentParams struct { // The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. Back *string `form:"back"` // The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. Front *string `form:"front"` }
A document verifying the business.
type AccountCompanyVerificationParams ¶
type AccountCompanyVerificationParams struct { // A document verifying the business. Document *AccountCompanyVerificationDocumentParams `form:"document"` }
Information on the verification state of the company.
type AccountController ¶
type AccountController struct { // `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. IsController bool `json:"is_controller"` // The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. Type AccountControllerType `json:"type"` }
type AccountControllerType ¶
type AccountControllerType string
The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself.
const ( AccountControllerTypeAccount AccountControllerType = "account" AccountControllerTypeApplication AccountControllerType = "application" )
List of values that AccountControllerType can take
type AccountDocumentsBankAccountOwnershipVerificationParams ¶
type AccountDocumentsBankAccountOwnershipVerificationParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check.
type AccountDocumentsCompanyLicenseParams ¶
type AccountDocumentsCompanyLicenseParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
One or more documents that demonstrate proof of a company's license to operate.
type AccountDocumentsCompanyMemorandumOfAssociationParams ¶
type AccountDocumentsCompanyMemorandumOfAssociationParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
One or more documents showing the company's Memorandum of Association.
type AccountDocumentsCompanyMinisterialDecreeParams ¶
type AccountDocumentsCompanyMinisterialDecreeParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
(Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
type AccountDocumentsCompanyRegistrationVerificationParams ¶
type AccountDocumentsCompanyRegistrationVerificationParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
type AccountDocumentsCompanyTaxIDVerificationParams ¶
type AccountDocumentsCompanyTaxIDVerificationParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
One or more documents that demonstrate proof of a company's tax ID.
type AccountDocumentsParams ¶
type AccountDocumentsParams struct { // One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. BankAccountOwnershipVerification *AccountDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"` // One or more documents that demonstrate proof of a company's license to operate. CompanyLicense *AccountDocumentsCompanyLicenseParams `form:"company_license"` // One or more documents showing the company's Memorandum of Association. CompanyMemorandumOfAssociation *AccountDocumentsCompanyMemorandumOfAssociationParams `form:"company_memorandum_of_association"` // (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. CompanyMinisterialDecree *AccountDocumentsCompanyMinisterialDecreeParams `form:"company_ministerial_decree"` // One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. CompanyRegistrationVerification *AccountDocumentsCompanyRegistrationVerificationParams `form:"company_registration_verification"` // One or more documents that demonstrate proof of a company's tax ID. CompanyTaxIDVerification *AccountDocumentsCompanyTaxIDVerificationParams `form:"company_tax_id_verification"` // One or more documents showing the company's proof of registration with the national business registry. ProofOfRegistration *AccountDocumentsProofOfRegistrationParams `form:"proof_of_registration"` }
Documents that may be submitted to satisfy various informational requests.
type AccountDocumentsProofOfRegistrationParams ¶
type AccountDocumentsProofOfRegistrationParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
One or more documents showing the company's proof of registration with the national business registry.
type AccountExternalAccount ¶
type AccountExternalAccount struct { ID string `json:"id"` Type AccountExternalAccountType `json:"object"` BankAccount *BankAccount `json:"-"` Card *Card `json:"-"` }
func (*AccountExternalAccount) UnmarshalJSON ¶
func (a *AccountExternalAccount) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an AccountExternalAccount. This custom unmarshaling is needed because the specific type of AccountExternalAccount it refers to is specified in the JSON
type AccountExternalAccountList ¶
type AccountExternalAccountList struct { APIResource ListMeta // Values contains any external accounts (bank accounts and/or cards) // currently attached to this account. Data []*AccountExternalAccount `json:"data"` }
AccountExternalAccountList is a list of external accounts that may be either bank accounts or cards.
type AccountExternalAccountParams ¶
type AccountExternalAccountParams struct { Params `form:"*"` AccountNumber *string `form:"account_number"` AccountHolderName *string `form:"account_holder_name"` AccountHolderType *string `form:"account_holder_type"` Country *string `form:"country"` Currency *string `form:"currency"` RoutingNumber *string `form:"routing_number"` Token *string `form:"token"` }
AccountExternalAccountParams are the parameters allowed to reference an external account when creating an account. It should either have Token set or everything else.
func (*AccountExternalAccountParams) AppendTo ¶
func (p *AccountExternalAccountParams) AppendTo(body *form.Values, keyParts []string)
AppendTo implements custom encoding logic for AccountExternalAccountParams so that we can send the special required `object` field up along with the other specified parameters or the token value.
type AccountExternalAccountType ¶
type AccountExternalAccountType string
const ( AccountExternalAccountTypeBankAccount AccountExternalAccountType = "bank_account" AccountExternalAccountTypeCard AccountExternalAccountType = "card" )
List of values that AccountExternalAccountType can take
type AccountFutureRequirements ¶
type AccountFutureRequirements struct { // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. Alternatives []*AccountFutureRequirementsAlternative `json:"alternatives"` // Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. CurrentDeadline int64 `json:"current_deadline"` // Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. CurrentlyDue []string `json:"currently_due"` // This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. DisabledReason string `json:"disabled_reason"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*AccountFutureRequirementsError `json:"errors"` // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. PastDue []string `json:"past_due"` // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. PendingVerification []string `json:"pending_verification"` }
type AccountFutureRequirementsAlternative ¶
type AccountFutureRequirementsAlternative struct { // Fields that can be provided to satisfy all fields in `original_fields_due`. AlternativeFieldsDue []string `json:"alternative_fields_due"` // Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. OriginalFieldsDue []string `json:"original_fields_due"` }
Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
type AccountFutureRequirementsError ¶
type AccountFutureRequirementsError struct { // The code for the type of error. Code string `json:"code"` // An informative message that indicates the error type and provides additional details about the error. Reason string `json:"reason"` // The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. Requirement string `json:"requirement"` }
Fields that are `currently_due` and need to be collected again because validation or verification failed.
type AccountLink ¶
type AccountLink struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The timestamp at which this account link will expire. ExpiresAt int64 `json:"expires_at"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The URL for the account link. URL string `json:"url"` }
Account Links are the means by which a Connect platform grants a connected account permission to access Stripe-hosted applications, such as Connect Onboarding.
Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding)
type AccountLinkCollect ¶
type AccountLinkCollect string
AccountLinkCollect describes what information the platform wants to collect with the account link.
const ( AccountLinkCollectCurrentlyDue AccountLinkCollect = "currently_due" AccountLinkCollectEventuallyDue AccountLinkCollect = "eventually_due" )
List of values that AccountLinkCollect can take.
type AccountLinkParams ¶
type AccountLinkParams struct { Params `form:"*"` // The identifier of the account to create an account link for. Account *string `form:"account"` // Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. Collect *string `form:"collect"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. RefreshURL *string `form:"refresh_url"` // The URL that the user will be redirected to upon leaving or completing the linked flow. ReturnURL *string `form:"return_url"` // The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. Type *string `form:"type"` }
Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
func (*AccountLinkParams) AddExpand ¶
func (p *AccountLinkParams) AddExpand(f string)
AddExpand appends a new field to expand.
type AccountLinkType ¶
type AccountLinkType string
AccountLinkType is the type of an account link.
const ( AccountLinkTypeAccountOnboarding AccountLinkType = "account_onboarding" AccountLinkTypeAccountUpdate AccountLinkType = "account_update" )
List of values that AccountLinkType can take.
type AccountList ¶
type AccountList struct { APIResource ListMeta Data []*Account `json:"data"` }
AccountList is a list of Accounts as retrieved from a list endpoint.
type AccountListParams ¶
type AccountListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.
func (*AccountListParams) AddExpand ¶
func (p *AccountListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type AccountParams ¶
type AccountParams struct { Params `form:"*"` // An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. AccountToken *string `form:"account_token"` // Business information about the account. BusinessProfile *AccountBusinessProfileParams `form:"business_profile"` // The business type. BusinessType *string `form:"business_type"` // Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. Capabilities *AccountCapabilitiesParams `form:"capabilities"` // Information about the company or business. This field is available for any `business_type`. Company *AccountCompanyParams `form:"company"` // The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. Country *string `form:"country"` // Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). DefaultCurrency *string `form:"default_currency"` // Documents that may be submitted to satisfy various informational requests. Documents *AccountDocumentsParams `form:"documents"` // The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. Email *string `form:"email"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation. // // By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. ExternalAccount *AccountExternalAccountParams `form:"external_account"` // Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Individual *PersonParams `form:"individual"` // 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`. Metadata map[string]string `form:"metadata"` // Options for customizing how the account functions within Stripe. Settings *AccountSettingsParams `form:"settings"` // Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). TOSAcceptance *AccountTOSAcceptanceParams `form:"tos_acceptance"` // The type of Stripe account to create. May be one of `custom`, `express` or `standard`. Type *string `form:"type"` }
Retrieves the details of an account.
func (*AccountParams) AddExpand ¶
func (p *AccountParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*AccountParams) AddMetadata ¶
func (p *AccountParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type AccountRejectParams ¶
type AccountRejectParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. Reason *string `form:"reason"` }
With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
func (*AccountRejectParams) AddExpand ¶
func (p *AccountRejectParams) AddExpand(f string)
AddExpand appends a new field to expand.
type AccountRequirements ¶
type AccountRequirements struct { // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. Alternatives []*AccountRequirementsAlternative `json:"alternatives"` // Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. CurrentDeadline int64 `json:"current_deadline"` // Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. CurrentlyDue []string `json:"currently_due"` // If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. DisabledReason AccountRequirementsDisabledReason `json:"disabled_reason"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*AccountRequirementsError `json:"errors"` // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. PastDue []string `json:"past_due"` // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. PendingVerification []string `json:"pending_verification"` }
type AccountRequirementsAlternative ¶
type AccountRequirementsAlternative struct { // Fields that can be provided to satisfy all fields in `original_fields_due`. AlternativeFieldsDue []string `json:"alternative_fields_due"` // Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. OriginalFieldsDue []string `json:"original_fields_due"` }
Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
type AccountRequirementsDisabledReason ¶
type AccountRequirementsDisabledReason string
If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.
const ( AccountRequirementsDisabledReasonFieldsNeeded AccountRequirementsDisabledReason = "fields_needed" AccountRequirementsDisabledReasonListed AccountRequirementsDisabledReason = "listed" AccountRequirementsDisabledReasonOther AccountRequirementsDisabledReason = "other" AccountRequirementsDisabledReasonRejectedFraud AccountRequirementsDisabledReason = "rejected.fraud" AccountRequirementsDisabledReasonRejectedListed AccountRequirementsDisabledReason = "rejected.listed" AccountRequirementsDisabledReasonRejectedOther AccountRequirementsDisabledReason = "rejected.other" AccountRequirementsDisabledReasonRejectedTermsOfService AccountRequirementsDisabledReason = "rejected.terms_of_service" AccountRequirementsDisabledReasonUnderReview AccountRequirementsDisabledReason = "under_review" )
List of values that AccountRequirementsDisabledReason can take
type AccountRequirementsError ¶
type AccountRequirementsError struct { // The code for the type of error. Code string `json:"code"` // An informative message that indicates the error type and provides additional details about the error. Reason string `json:"reason"` // The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. Requirement string `json:"requirement"` }
Fields that are `currently_due` and need to be collected again because validation or verification failed.
type AccountSession ¶ added in v75.3.0
type AccountSession struct { APIResource // The ID of the account the AccountSession was created for Account string `json:"account"` // The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. // // The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. // // Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. ClientSecret string `json:"client_secret"` Components *AccountSessionComponents `json:"components"` // The timestamp at which this AccountSession will expire. ExpiresAt int64 `json:"expires_at"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` }
An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.
We recommend that you create an AccountSession each time you need to display an embedded component to your user. Do not save AccountSessions to your database as they expire relatively quickly, and cannot be used more than once.
Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
type AccountSessionComponents ¶ added in v75.3.0
type AccountSessionComponents struct {
AccountOnboarding *AccountSessionComponentsAccountOnboarding `json:"account_onboarding"`
}
type AccountSessionComponentsAccountOnboarding ¶ added in v75.3.0
type AccountSessionComponentsAccountOnboarding struct { // Whether the embedded component is enabled. Enabled bool `json:"enabled"` }
type AccountSessionComponentsAccountOnboardingParams ¶ added in v75.3.0
type AccountSessionComponentsAccountOnboardingParams struct { // Whether the embedded component is enabled. Enabled *bool `form:"enabled"` }
Configuration for the account onboarding embedded component.
type AccountSessionComponentsParams ¶ added in v75.3.0
type AccountSessionComponentsParams struct { // Configuration for the account onboarding embedded component. AccountOnboarding *AccountSessionComponentsAccountOnboardingParams `form:"account_onboarding"` }
Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
type AccountSessionParams ¶ added in v75.3.0
type AccountSessionParams struct { Params `form:"*"` // The identifier of the account to create an Account Session for. Account *string `form:"account"` // Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). Components *AccountSessionComponentsParams `form:"components"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
func (*AccountSessionParams) AddExpand ¶ added in v75.3.0
func (p *AccountSessionParams) AddExpand(f string)
AddExpand appends a new field to expand.
type AccountSettings ¶
type AccountSettings struct { BACSDebitPayments *AccountSettingsBACSDebitPayments `json:"bacs_debit_payments"` Branding *AccountSettingsBranding `json:"branding"` CardIssuing *AccountSettingsCardIssuing `json:"card_issuing"` CardPayments *AccountSettingsCardPayments `json:"card_payments"` Dashboard *AccountSettingsDashboard `json:"dashboard"` Payments *AccountSettingsPayments `json:"payments"` Payouts *AccountSettingsPayouts `json:"payouts"` SEPADebitPayments *AccountSettingsSEPADebitPayments `json:"sepa_debit_payments"` Treasury *AccountSettingsTreasury `json:"treasury"` }
Options for customizing how the account functions within Stripe.
type AccountSettingsBACSDebitPayments ¶
type AccountSettingsBACSDebitPayments struct { // The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this will appear on the mandate, and as the statement descriptor. DisplayName string `json:"display_name"` }
type AccountSettingsBACSDebitPaymentsParams ¶
type AccountSettingsBACSDebitPaymentsParams struct {
DisplayName *string `form:"display_name"`
}
type AccountSettingsBranding ¶
type AccountSettingsBranding struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. Icon *File `json:"icon"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. Logo *File `json:"logo"` // A CSS hex color value representing the primary branding color for this account PrimaryColor string `json:"primary_color"` // A CSS hex color value representing the secondary branding color for this account SecondaryColor string `json:"secondary_color"` }
type AccountSettingsBrandingParams ¶
type AccountSettingsBrandingParams struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. Icon *string `form:"icon"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. Logo *string `form:"logo"` // A CSS hex color value representing the primary branding color for this account. PrimaryColor *string `form:"primary_color"` // A CSS hex color value representing the secondary branding color for this account. SecondaryColor *string `form:"secondary_color"` }
Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
type AccountSettingsCardIssuing ¶
type AccountSettingsCardIssuing struct {
TOSAcceptance *AccountSettingsCardIssuingTOSAcceptance `json:"tos_acceptance"`
}
type AccountSettingsCardIssuingParams ¶
type AccountSettingsCardIssuingParams struct { // Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance). TOSAcceptance *AccountSettingsCardIssuingTOSAcceptanceParams `form:"tos_acceptance"` }
Settings specific to the account's use of the Card Issuing product.
type AccountSettingsCardIssuingTOSAcceptance ¶
type AccountSettingsCardIssuingTOSAcceptance struct { // The Unix timestamp marking when the account representative accepted the service agreement. Date int64 `json:"date"` // The IP address from which the account representative accepted the service agreement. IP string `json:"ip"` // The user agent of the browser from which the account representative accepted the service agreement. UserAgent string `json:"user_agent"` }
type AccountSettingsCardIssuingTOSAcceptanceParams ¶
type AccountSettingsCardIssuingTOSAcceptanceParams struct { // The Unix timestamp marking when the account representative accepted the service agreement. Date *int64 `form:"date"` // The IP address from which the account representative accepted the service agreement. IP *string `form:"ip"` // The user agent of the browser from which the account representative accepted the service agreement. UserAgent *string `form:"user_agent"` }
Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance).
type AccountSettingsCardPayments ¶
type AccountSettingsCardPayments struct { DeclineOn *AccountSettingsCardPaymentsDeclineOn `json:"decline_on"` // The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. StatementDescriptorPrefix string `json:"statement_descriptor_prefix"` // The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. StatementDescriptorPrefixKana string `json:"statement_descriptor_prefix_kana"` // The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. StatementDescriptorPrefixKanji string `json:"statement_descriptor_prefix_kanji"` }
type AccountSettingsCardPaymentsDeclineOn ¶
type AccountSettingsCardPaymentsDeclineOn struct { // Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. AVSFailure bool `json:"avs_failure"` // Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. CVCFailure bool `json:"cvc_failure"` }
type AccountSettingsCardPaymentsDeclineOnParams ¶
type AccountSettingsCardPaymentsDeclineOnParams struct { // Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. AVSFailure *bool `form:"avs_failure"` // Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. CVCFailure *bool `form:"cvc_failure"` }
Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
type AccountSettingsCardPaymentsParams ¶
type AccountSettingsCardPaymentsParams struct { // Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. DeclineOn *AccountSettingsCardPaymentsDeclineOnParams `form:"decline_on"` // The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. StatementDescriptorPrefix *string `form:"statement_descriptor_prefix"` // The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. StatementDescriptorPrefixKana *string `form:"statement_descriptor_prefix_kana"` // The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. StatementDescriptorPrefixKanji *string `form:"statement_descriptor_prefix_kanji"` }
Settings specific to card charging on the account.
type AccountSettingsDashboard ¶
type AccountSettingsDashboard struct { // The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. DisplayName string `json:"display_name"` // The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Timezone string `json:"timezone"` }
type AccountSettingsParams ¶
type AccountSettingsParams struct { BACSDebitPayments *AccountSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"` // Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. Branding *AccountSettingsBrandingParams `form:"branding"` // Settings specific to the account's use of the Card Issuing product. CardIssuing *AccountSettingsCardIssuingParams `form:"card_issuing"` // Settings specific to card charging on the account. CardPayments *AccountSettingsCardPaymentsParams `form:"card_payments"` // Settings that apply across payment methods for charging on the account. Payments *AccountSettingsPaymentsParams `form:"payments"` // Settings specific to the account's payouts. Payouts *AccountSettingsPayoutsParams `form:"payouts"` // Settings specific to the account's Treasury FinancialAccounts. Treasury *AccountSettingsTreasuryParams `form:"treasury"` }
Options for customizing how the account functions within Stripe.
type AccountSettingsPayments ¶
type AccountSettingsPayments struct { // The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. StatementDescriptor string `json:"statement_descriptor"` // The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only) StatementDescriptorKana string `json:"statement_descriptor_kana"` // The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) StatementDescriptorKanji string `json:"statement_descriptor_kanji"` // The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. StatementDescriptorPrefixKana string `json:"statement_descriptor_prefix_kana"` // The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. StatementDescriptorPrefixKanji string `json:"statement_descriptor_prefix_kanji"` }
type AccountSettingsPaymentsParams ¶
type AccountSettingsPaymentsParams struct { // The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. StatementDescriptor *string `form:"statement_descriptor"` // The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). StatementDescriptorKana *string `form:"statement_descriptor_kana"` // The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). StatementDescriptorKanji *string `form:"statement_descriptor_kanji"` }
Settings that apply across payment methods for charging on the account.
type AccountSettingsPayouts ¶
type AccountSettingsPayouts struct { // A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`. DebitNegativeBalances bool `json:"debit_negative_balances"` Schedule *AccountSettingsPayoutsSchedule `json:"schedule"` // The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. StatementDescriptor string `json:"statement_descriptor"` }
type AccountSettingsPayoutsParams ¶
type AccountSettingsPayoutsParams struct { // A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). DebitNegativeBalances *bool `form:"debit_negative_balances"` // Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation. Schedule *AccountSettingsPayoutsScheduleParams `form:"schedule"` // The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. StatementDescriptor *string `form:"statement_descriptor"` }
Settings specific to the account's payouts.
type AccountSettingsPayoutsSchedule ¶
type AccountSettingsPayoutsSchedule struct { // The number of days charges for the account will be held before being paid out. DelayDays int64 `json:"delay_days"` // How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. Interval AccountSettingsPayoutsScheduleInterval `json:"interval"` // The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. MonthlyAnchor int64 `json:"monthly_anchor"` // The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. WeeklyAnchor string `json:"weekly_anchor"` }
type AccountSettingsPayoutsScheduleInterval ¶
type AccountSettingsPayoutsScheduleInterval string
How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.
const ( AccountSettingsPayoutsScheduleIntervalDaily AccountSettingsPayoutsScheduleInterval = "daily" AccountSettingsPayoutsScheduleIntervalManual AccountSettingsPayoutsScheduleInterval = "manual" AccountSettingsPayoutsScheduleIntervalMonthly AccountSettingsPayoutsScheduleInterval = "monthly" AccountSettingsPayoutsScheduleIntervalWeekly AccountSettingsPayoutsScheduleInterval = "weekly" )
List of values that AccountSettingsPayoutsScheduleInterval can take
type AccountSettingsPayoutsScheduleParams ¶
type AccountSettingsPayoutsScheduleParams struct { // The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://stripe.com/docs/connect/manage-payout-schedule). DelayDays *int64 `form:"delay_days"` DelayDaysMinimum *bool `form:"-"` // See custom AppendTo // How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. Interval *string `form:"interval"` // The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. MonthlyAnchor *int64 `form:"monthly_anchor"` // The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) WeeklyAnchor *string `form:"weekly_anchor"` }
Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation.
type AccountSettingsSEPADebitPayments ¶
type AccountSettingsSEPADebitPayments struct { // SEPA creditor identifier that identifies the company making the payment. CreditorID string `json:"creditor_id"` }
type AccountSettingsTreasury ¶
type AccountSettingsTreasury struct {
TOSAcceptance *AccountSettingsTreasuryTOSAcceptance `json:"tos_acceptance"`
}
type AccountSettingsTreasuryParams ¶
type AccountSettingsTreasuryParams struct { // Details on the account's acceptance of the Stripe Treasury Services Agreement. TOSAcceptance *AccountSettingsTreasuryTOSAcceptanceParams `form:"tos_acceptance"` }
Settings specific to the account's Treasury FinancialAccounts.
type AccountSettingsTreasuryTOSAcceptance ¶
type AccountSettingsTreasuryTOSAcceptance struct { // The Unix timestamp marking when the account representative accepted the service agreement. Date int64 `json:"date"` // The IP address from which the account representative accepted the service agreement. IP string `json:"ip"` // The user agent of the browser from which the account representative accepted the service agreement. UserAgent string `json:"user_agent"` }
type AccountSettingsTreasuryTOSAcceptanceParams ¶
type AccountSettingsTreasuryTOSAcceptanceParams struct { // The Unix timestamp marking when the account representative accepted the service agreement. Date *int64 `form:"date"` // The IP address from which the account representative accepted the service agreement. IP *string `form:"ip"` // The user agent of the browser from which the account representative accepted the service agreement. UserAgent *string `form:"user_agent"` }
Details on the account's acceptance of the Stripe Treasury Services Agreement.
type AccountTOSAcceptance ¶
type AccountTOSAcceptance struct { // The Unix timestamp marking when the account representative accepted their service agreement Date int64 `json:"date"` // The IP address from which the account representative accepted their service agreement IP string `json:"ip"` // The user's service agreement type ServiceAgreement AccountTOSAcceptanceServiceAgreement `json:"service_agreement"` // The user agent of the browser from which the account representative accepted their service agreement UserAgent string `json:"user_agent"` }
type AccountTOSAcceptanceParams ¶
type AccountTOSAcceptanceParams struct { // The Unix timestamp marking when the account representative accepted their service agreement. Date *int64 `form:"date"` // The IP address from which the account representative accepted their service agreement. IP *string `form:"ip"` // The user's service agreement type. ServiceAgreement *string `form:"service_agreement"` // The user agent of the browser from which the account representative accepted their service agreement. UserAgent *string `form:"user_agent"` }
Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance).
type AccountTOSAcceptanceServiceAgreement ¶
type AccountTOSAcceptanceServiceAgreement string
The user's service agreement type
const ( AccountTOSAcceptanceServiceAgreementFull AccountTOSAcceptanceServiceAgreement = "full" AccountTOSAcceptanceServiceAgreementRecipient AccountTOSAcceptanceServiceAgreement = "recipient" )
List of values that AccountTOSAcceptanceServiceAgreement can take
type AccountType ¶
type AccountType string
The Stripe account type. Can be `standard`, `express`, or `custom`.
const ( AccountTypeCustom AccountType = "custom" AccountTypeExpress AccountType = "express" AccountTypeStandard AccountType = "standard" )
List of values that AccountType can take
type Address ¶
type Address struct { City string `json:"city"` Country string `json:"country"` Line1 string `json:"line1"` Line2 string `json:"line2"` PostalCode string `json:"postal_code"` State string `json:"state"` }
Address describes common properties for an Address hash.
type AddressParams ¶
type AddressParams struct { City *string `form:"city"` Country *string `form:"country"` Line1 *string `form:"line1"` Line2 *string `form:"line2"` PostalCode *string `form:"postal_code"` State *string `form:"state"` }
AddressParams describes the common parameters for an Address.
type Amount ¶
type Amount struct { // Balance amount. Amount int64 `json:"amount"` // 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 Currency `json:"currency"` SourceTypes map[BalanceSourceType]int64 `json:"source_types"` }
Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property.
type AppInfo ¶
type AppInfo struct { Name string `json:"name"` PartnerID string `json:"partner_id"` URL string `json:"url"` Version string `json:"version"` }
AppInfo contains information about the "app" which this integration belongs to. This should be reserved for plugins that wish to identify themselves with Stripe.
type ApplePayDomain ¶
type ApplePayDomain struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` Deleted bool `json:"deleted"` DomainName string `json:"domain_name"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` }
type ApplePayDomainList ¶
type ApplePayDomainList struct { APIResource ListMeta Data []*ApplePayDomain `json:"data"` }
ApplePayDomainList is a list of ApplePayDomains as retrieved from a list endpoint.
type ApplePayDomainListParams ¶
type ApplePayDomainListParams struct { ListParams `form:"*"` DomainName *string `form:"domain_name"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
List apple pay domains.
func (*ApplePayDomainListParams) AddExpand ¶
func (p *ApplePayDomainListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ApplePayDomainParams ¶
type ApplePayDomainParams struct { Params `form:"*"` DomainName *string `form:"domain_name"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Create an apple pay domain.
func (*ApplePayDomainParams) AddExpand ¶
func (p *ApplePayDomainParams) AddExpand(f string)
AddExpand appends a new field to expand.
type Application ¶
type Application struct { Deleted bool `json:"deleted"` // Unique identifier for the object. ID string `json:"id"` // The name of the application. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` }
func (*Application) UnmarshalJSON ¶
func (a *Application) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an Application. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type ApplicationFee ¶
type ApplicationFee struct { APIResource // ID of the Stripe account this fee was taken from. Account *Account `json:"account"` // Amount earned, in cents (or local equivalent). Amount int64 `json:"amount"` // Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) AmountRefunded int64 `json:"amount_refunded"` // ID of the Connect application that earned the fee. Application *Application `json:"application"` // Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). BalanceTransaction *BalanceTransaction `json:"balance_transaction"` // ID of the charge that the application fee was taken from. Charge *Charge `json:"charge"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. OriginatingTransaction *Charge `json:"originating_transaction"` // Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. Refunded bool `json:"refunded"` // A list of refunds that have been applied to the fee. Refunds *FeeRefundList `json:"refunds"` }
func (*ApplicationFee) UnmarshalJSON ¶
func (a *ApplicationFee) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an ApplicationFee. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type ApplicationFeeList ¶
type ApplicationFeeList struct { APIResource ListMeta Data []*ApplicationFee `json:"data"` }
ApplicationFeeList is a list of ApplicationFees as retrieved from a list endpoint.
type ApplicationFeeListParams ¶
type ApplicationFeeListParams struct { ListParams `form:"*"` // Only return application fees for the charge specified by this charge ID. Charge *string `form:"charge"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
func (*ApplicationFeeListParams) AddExpand ¶
func (p *ApplicationFeeListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ApplicationFeeParams ¶
type ApplicationFeeParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.
func (*ApplicationFeeParams) AddExpand ¶
func (p *ApplicationFeeParams) AddExpand(f string)
AddExpand appends a new field to expand.
type AppsSecret ¶
type AppsSecret struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // If true, indicates that this secret has been deleted Deleted bool `json:"deleted"` // The Unix timestamp for the expiry time of the secret, after which the secret deletes. ExpiresAt int64 `json:"expires_at"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // A name for the secret that's unique within the scope. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The plaintext secret value to be stored. Payload string `json:"payload"` Scope *AppsSecretScope `json:"scope"` }
Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.
The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.
All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key.
A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects)
type AppsSecretDeleteWhereParams ¶
type AppsSecretDeleteWhereParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A name for the secret that's unique within the scope. Name *string `form:"name"` // Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. Scope *AppsSecretDeleteWhereScopeParams `form:"scope"` }
Deletes a secret from the secret store by name and scope.
func (*AppsSecretDeleteWhereParams) AddExpand ¶
func (p *AppsSecretDeleteWhereParams) AddExpand(f string)
AddExpand appends a new field to expand.
type AppsSecretDeleteWhereScopeParams ¶
type AppsSecretDeleteWhereScopeParams struct { // The secret scope type. Type *string `form:"type"` // The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. User *string `form:"user"` }
Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
type AppsSecretFindParams ¶
type AppsSecretFindParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A name for the secret that's unique within the scope. Name *string `form:"name"` // Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. Scope *AppsSecretFindScopeParams `form:"scope"` }
Finds a secret in the secret store by name and scope.
func (*AppsSecretFindParams) AddExpand ¶
func (p *AppsSecretFindParams) AddExpand(f string)
AddExpand appends a new field to expand.
type AppsSecretFindScopeParams ¶
type AppsSecretFindScopeParams struct { // The secret scope type. Type *string `form:"type"` // The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. User *string `form:"user"` }
Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
type AppsSecretList ¶
type AppsSecretList struct { APIResource ListMeta Data []*AppsSecret `json:"data"` }
AppsSecretList is a list of Secrets as retrieved from a list endpoint.
type AppsSecretListParams ¶
type AppsSecretListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. Scope *AppsSecretListScopeParams `form:"scope"` }
List all secrets stored on the given scope.
func (*AppsSecretListParams) AddExpand ¶
func (p *AppsSecretListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type AppsSecretListScopeParams ¶
type AppsSecretListScopeParams struct { // The secret scope type. Type *string `form:"type"` // The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. User *string `form:"user"` }
Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
type AppsSecretParams ¶
type AppsSecretParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The Unix timestamp for the expiry time of the secret, after which the secret deletes. ExpiresAt *int64 `form:"expires_at"` // A name for the secret that's unique within the scope. Name *string `form:"name"` // The plaintext secret value to be stored. Payload *string `form:"payload"` // Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. Scope *AppsSecretScopeParams `form:"scope"` }
Create or replace a secret in the secret store.
func (*AppsSecretParams) AddExpand ¶
func (p *AppsSecretParams) AddExpand(f string)
AddExpand appends a new field to expand.
type AppsSecretScope ¶
type AppsSecretScope struct { // The secret scope type. Type AppsSecretScopeType `json:"type"` // The user ID, if type is set to "user" User string `json:"user"` }
type AppsSecretScopeParams ¶
type AppsSecretScopeParams struct { // The secret scope type. Type *string `form:"type"` // The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. User *string `form:"user"` }
Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
type AppsSecretScopeType ¶
type AppsSecretScopeType string
The secret scope type.
const ( AppsSecretScopeTypeAccount AppsSecretScopeType = "account" AppsSecretScopeTypeUser AppsSecretScopeType = "user" )
List of values that AppsSecretScopeType can take
type AuthorizeURLParams ¶
type AuthorizeURLParams struct { Params `form:"*"` AlwaysPrompt *bool `form:"always_prompt"` ClientID *string `form:"client_id"` RedirectURI *string `form:"redirect_uri"` ResponseType *string `form:"response_type"` Scope *string `form:"scope"` State *string `form:"state"` StripeLanding *string `form:"stripe_landing"` StripeUser *OAuthStripeUserParams `form:"stripe_user"` SuggestedCapabilities []*string `form:"suggested_capabilities"` // Express is not sent as a parameter, but is used to modify the authorize URL // path to use the express OAuth path. Express *bool `form:"-"` }
AuthorizeURLParams for creating OAuth AuthorizeURLs.
type Backend ¶
type Backend interface { Call(method, path, key string, params ParamsContainer, v LastResponseSetter) error CallStreaming(method, path, key string, params ParamsContainer, v StreamingLastResponseSetter) error CallRaw(method, path, key string, body *form.Values, params *Params, v LastResponseSetter) error CallMultipart(method, path, key, boundary string, body *bytes.Buffer, params *Params, v LastResponseSetter) error SetMaxNetworkRetries(maxNetworkRetries int64) }
Backend is an interface for making calls against a Stripe service. This interface exists to enable mocking for during testing if needed.
func GetBackend ¶
func GetBackend(backendType SupportedBackend) Backend
GetBackend returns one of the library's supported backends based off of the given argument.
It returns an existing default backend if one's already been created.
func GetBackendWithConfig ¶
func GetBackendWithConfig(backendType SupportedBackend, config *BackendConfig) Backend
GetBackendWithConfig is the same as GetBackend except that it can be given a configuration struct that will configure certain aspects of the backend that's return.
type BackendConfig ¶
type BackendConfig struct { // EnableTelemetry allows request metrics (request id and duration) to be sent // to Stripe in subsequent requests via the `X-Stripe-Client-Telemetry` header. // // This value is a pointer to allow us to differentiate an unset versus // empty value. Use stripe.Bool for an easy way to set this value. // // Defaults to false. EnableTelemetry *bool // HTTPClient is an HTTP client instance to use when making API requests. // // If left unset, it'll be set to a default HTTP client for the package. HTTPClient *http.Client // LeveledLogger is the logger that the backend will use to log errors, // warnings, and informational messages. // // LeveledLoggerInterface is implemented by LeveledLogger, and one can be // initialized at the desired level of logging. LeveledLoggerInterface // also provides out-of-the-box compatibility with a Logrus Logger, but may // require a thin shim for use with other logging libraries that use less // standard conventions like Zap. // // Defaults to DefaultLeveledLogger. // // To set a logger that logs nothing, set this to a stripe.LeveledLogger // with a Level of LevelNull (simply setting this field to nil will not // work). LeveledLogger LeveledLoggerInterface // MaxNetworkRetries sets maximum number of times that the library will // retry requests that appear to have failed due to an intermittent // problem. // // This value is a pointer to allow us to differentiate an unset versus // empty value. Use stripe.Int64 for an easy way to set this value. // // Defaults to DefaultMaxNetworkRetries (2). MaxNetworkRetries *int64 // URL is the base URL to use for API paths. // // This value is a pointer to allow us to differentiate an unset versus // empty value. Use stripe.String for an easy way to set this value. // // If left empty, it'll be set to the default for the SupportedBackend. URL *string }
BackendConfig is used to configure a new Stripe backend.
type BackendImplementation ¶
type BackendImplementation struct { Type SupportedBackend URL string HTTPClient *http.Client LeveledLogger LeveledLoggerInterface MaxNetworkRetries int64 // contains filtered or unexported fields }
BackendImplementation is the internal implementation for making HTTP calls to Stripe.
The public use of this struct is deprecated. It will be unexported in a future version.
func (*BackendImplementation) Call ¶
func (s *BackendImplementation) Call(method, path, key string, params ParamsContainer, v LastResponseSetter) error
Call is the Backend.Call implementation for invoking Stripe APIs.
func (*BackendImplementation) CallMultipart ¶
func (s *BackendImplementation) CallMultipart(method, path, key, boundary string, body *bytes.Buffer, params *Params, v LastResponseSetter) error
CallMultipart is the Backend.CallMultipart implementation for invoking Stripe APIs.
func (*BackendImplementation) CallRaw ¶
func (s *BackendImplementation) CallRaw(method, path, key string, form *form.Values, params *Params, v LastResponseSetter) error
CallRaw is the implementation for invoking Stripe APIs internally without a backend.
func (*BackendImplementation) CallStreaming ¶
func (s *BackendImplementation) CallStreaming(method, path, key string, params ParamsContainer, v StreamingLastResponseSetter) error
CallStreaming is the Backend.Call implementation for invoking Stripe APIs without buffering the response into memory.
func (*BackendImplementation) Do ¶
func (s *BackendImplementation) Do(req *http.Request, body *bytes.Buffer, v LastResponseSetter) error
Do is used by Call to execute an API request and parse the response. It uses the backend's HTTP client to execute the request and unmarshals the response into v. It also handles unmarshaling errors returned by the API.
func (*BackendImplementation) DoStreaming ¶
func (s *BackendImplementation) DoStreaming(req *http.Request, body *bytes.Buffer, v StreamingLastResponseSetter) error
DoStreaming is used by CallStreaming to execute an API request. It uses the backend's HTTP client to execure the request. In successful cases, it sets a StreamingLastResponse onto v, but in unsuccessful cases handles unmarshaling errors returned by the API.
func (*BackendImplementation) NewRequest ¶
func (s *BackendImplementation) NewRequest(method, path, key, contentType string, params *Params) (*http.Request, error)
NewRequest is used by Call to generate an http.Request. It handles encoding parameters and attaching the appropriate headers.
func (*BackendImplementation) ResponseToError ¶
func (s *BackendImplementation) ResponseToError(res *http.Response, resBody []byte) error
ResponseToError converts a stripe response to an Error.
func (*BackendImplementation) SetMaxNetworkRetries ¶
func (s *BackendImplementation) SetMaxNetworkRetries(maxNetworkRetries int64)
SetMaxNetworkRetries sets max number of retries on failed requests
This function is deprecated. Please use GetBackendWithConfig instead.
func (*BackendImplementation) SetNetworkRetriesSleep ¶
func (s *BackendImplementation) SetNetworkRetriesSleep(sleep bool)
SetNetworkRetriesSleep allows the normal sleep between network retries to be enabled or disabled.
This function is available for internal testing only and should never be used in production.
func (*BackendImplementation) UnmarshalJSONVerbose ¶
func (s *BackendImplementation) UnmarshalJSONVerbose(statusCode int, body []byte, v interface{}) error
UnmarshalJSONVerbose unmarshals JSON, but in case of a failure logs and produces a more descriptive error.
type Backends ¶
type Backends struct {
API, Connect, Uploads Backend
// contains filtered or unexported fields
}
Backends are the currently supported endpoints.
func NewBackends ¶
NewBackends creates a new set of backends with the given HTTP client.
func NewBackendsWithConfig ¶ added in v75.11.0
func NewBackendsWithConfig(config *BackendConfig) *Backends
NewBackendsWithConfig creates a new set of backends with the given config for all backends. Useful for setting up client with a custom logger and http client.
type Balance ¶
type Balance struct { APIResource // Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. Available []*Amount `json:"available"` // Funds held due to negative balances on connected Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. ConnectReserved []*Amount `json:"connect_reserved"` // Funds that you can pay out using Instant Payouts. InstantAvailable []*Amount `json:"instant_available"` Issuing *BalanceIssuing `json:"issuing"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. Pending []*Amount `json:"pending"` }
This is an object representing your Stripe balance. You can retrieve it to see the balance currently on your Stripe account.
You can also retrieve the balance history, which contains a list of [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance (charges, payouts, and so forth).
The available and pending amounts for each currency are broken down further by payment source types.
Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances)
type BalanceIssuing ¶
type BalanceIssuing struct { // Funds that are available for use. Available []*Amount `json:"available"` }
type BalanceParams ¶
type BalanceParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the current account balance, based on the authentication that was used to make the request.
For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances).
func (*BalanceParams) AddExpand ¶
func (p *BalanceParams) AddExpand(f string)
AddExpand appends a new field to expand.
type BalanceSourceType ¶
type BalanceSourceType string
BalanceSourceType is the list of allowed values for the balance amount's source_type field keys.
const ( BalanceSourceTypeBankAccount BalanceSourceType = "bank_account" BalanceSourceTypeCard BalanceSourceType = "card" BalanceSourceTypeFPX BalanceSourceType = "fpx" )
List of values that BalanceSourceType can take.
type BalanceTransaction ¶
type BalanceTransaction struct { APIResource // Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. Amount int64 `json:"amount"` // The date that the transaction's net funds become available in the Stripe balance. AvailableOn int64 `json:"available_on"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. ExchangeRate float64 `json:"exchange_rate"` // Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. Fee int64 `json:"fee"` // Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. FeeDetails []*BalanceTransactionFeeDetail `json:"fee_details"` // Unique identifier for the object. ID string `json:"id"` // Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` Net int64 `json:"net"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. ReportingCategory BalanceTransactionReportingCategory `json:"reporting_category"` // This transaction relates to the Stripe object. Source *BalanceTransactionSource `json:"source"` // The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. Status BalanceTransactionStatus `json:"status"` // Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `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 about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. Type BalanceTransactionType `json:"type"` }
Balance transactions represent funds moving through your Stripe account. Stripe creates them for every type of transaction that enters or leaves your Stripe account balance.
Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)
func (*BalanceTransaction) UnmarshalJSON ¶
func (b *BalanceTransaction) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a BalanceTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type BalanceTransactionFeeDetail ¶
type BalanceTransactionFeeDetail struct { // Amount of the fee, in cents. Amount int64 `json:"amount"` // ID of the Connect application that earned the fee. Application string `json:"application"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. Type string `json:"type"` }
Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
type BalanceTransactionList ¶
type BalanceTransactionList struct { APIResource ListMeta Data []*BalanceTransaction `json:"data"` }
BalanceTransactionList is a list of BalanceTransactions as retrieved from a list endpoint.
type BalanceTransactionListParams ¶
type BalanceTransactionListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Only return transactions in a certain currency. 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 `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. Payout *string `form:"payout"` // Only returns the original transaction. Source *string `form:"source"` // Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `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 `form:"type"` }
Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
func (*BalanceTransactionListParams) AddExpand ¶
func (p *BalanceTransactionListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type BalanceTransactionParams ¶
type BalanceTransactionParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the balance transaction with the given ID.
Note that this endpoint previously used the path /v1/balance/history/:id.
func (*BalanceTransactionParams) AddExpand ¶
func (p *BalanceTransactionParams) AddExpand(f string)
AddExpand appends a new field to expand.
type BalanceTransactionReportingCategory ¶
type BalanceTransactionReportingCategory string
Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
const ( BalanceTransactionReportingCategoryAdvance BalanceTransactionReportingCategory = "advance" BalanceTransactionReportingCategoryAdvanceFunding BalanceTransactionReportingCategory = "advance_funding" BalanceTransactionReportingCategoryCharge BalanceTransactionReportingCategory = "charge" BalanceTransactionReportingCategoryChargeFailure BalanceTransactionReportingCategory = "charge_failure" BalanceTransactionReportingCategoryConnectCollectionTransfer BalanceTransactionReportingCategory = "connect_collection_transfer" BalanceTransactionReportingCategoryConnectReservedFunds BalanceTransactionReportingCategory = "connect_reserved_funds" BalanceTransactionReportingCategoryDispute BalanceTransactionReportingCategory = "dispute" BalanceTransactionReportingCategoryDisputeReversal BalanceTransactionReportingCategory = "dispute_reversal" BalanceTransactionReportingCategoryFee BalanceTransactionReportingCategory = "fee" BalanceTransactionReportingCategoryIssuingAuthorizationHold BalanceTransactionReportingCategory = "issuing_authorization_hold" BalanceTransactionReportingCategoryIssuingAuthorizationRelease BalanceTransactionReportingCategory = "issuing_authorization_release" BalanceTransactionReportingCategoryIssuingTransaction BalanceTransactionReportingCategory = "issuing_transaction" BalanceTransactionReportingCategoryOtherAdjustment BalanceTransactionReportingCategory = "other_adjustment" BalanceTransactionReportingCategoryPartialCaptureReversal BalanceTransactionReportingCategory = "partial_capture_reversal" BalanceTransactionReportingCategoryPayout BalanceTransactionReportingCategory = "payout" BalanceTransactionReportingCategoryPayoutReversal BalanceTransactionReportingCategory = "payout_reversal" BalanceTransactionReportingCategoryPlatformEarning BalanceTransactionReportingCategory = "platform_earning" BalanceTransactionReportingCategoryPlatformEarningRefund BalanceTransactionReportingCategory = "platform_earning_refund" BalanceTransactionReportingCategoryRefund BalanceTransactionReportingCategory = "refund" BalanceTransactionReportingCategoryRefundFailure BalanceTransactionReportingCategory = "refund_failure" BalanceTransactionReportingCategoryRiskReservedFunds BalanceTransactionReportingCategory = "risk_reserved_funds" BalanceTransactionReportingCategoryTax BalanceTransactionReportingCategory = "tax" BalanceTransactionReportingCategoryTopup BalanceTransactionReportingCategory = "topup" BalanceTransactionReportingCategoryTopupReversal BalanceTransactionReportingCategory = "topup_reversal" BalanceTransactionReportingCategoryTransfer BalanceTransactionReportingCategory = "transfer" BalanceTransactionReportingCategoryTransferReversal BalanceTransactionReportingCategory = "transfer_reversal" )
List of values that BalanceTransactionReportingCategory can take
type BalanceTransactionSource ¶
type BalanceTransactionSource struct { ID string `json:"id"` Type BalanceTransactionSourceType `json:"object"` ApplicationFee *ApplicationFee `json:"-"` Charge *Charge `json:"-"` ConnectCollectionTransfer *ConnectCollectionTransfer `json:"-"` CustomerCashBalanceTransaction *CustomerCashBalanceTransaction `json:"-"` Dispute *Dispute `json:"-"` FeeRefund *FeeRefund `json:"-"` IssuingAuthorization *IssuingAuthorization `json:"-"` IssuingDispute *IssuingDispute `json:"-"` IssuingTransaction *IssuingTransaction `json:"-"` Payout *Payout `json:"-"` PlatformTaxFee *PlatformTaxFee `json:"-"` Refund *Refund `json:"-"` ReserveTransaction *ReserveTransaction `json:"-"` TaxDeductedAtSource *TaxDeductedAtSource `json:"-"` Topup *Topup `json:"-"` Transfer *Transfer `json:"-"` TransferReversal *TransferReversal `json:"-"` }
func (*BalanceTransactionSource) UnmarshalJSON ¶
func (b *BalanceTransactionSource) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a BalanceTransactionSource. This custom unmarshaling is needed because the specific type of BalanceTransactionSource it refers to is specified in the JSON
type BalanceTransactionSourceType ¶
type BalanceTransactionSourceType string
const ( BalanceTransactionSourceTypeApplicationFee BalanceTransactionSourceType = "application_fee" BalanceTransactionSourceTypeCharge BalanceTransactionSourceType = "charge" BalanceTransactionSourceTypeConnectCollectionTransfer BalanceTransactionSourceType = "connect_collection_transfer" BalanceTransactionSourceTypeCustomerCashBalanceTransaction BalanceTransactionSourceType = "customer_cash_balance_transaction" BalanceTransactionSourceTypeDispute BalanceTransactionSourceType = "dispute" BalanceTransactionSourceTypeFeeRefund BalanceTransactionSourceType = "fee_refund" BalanceTransactionSourceTypeIssuingAuthorization BalanceTransactionSourceType = "issuing.authorization" BalanceTransactionSourceTypeIssuingDispute BalanceTransactionSourceType = "issuing.dispute" BalanceTransactionSourceTypeIssuingTransaction BalanceTransactionSourceType = "issuing.transaction" BalanceTransactionSourceTypePayout BalanceTransactionSourceType = "payout" BalanceTransactionSourceTypePlatformTaxFee BalanceTransactionSourceType = "platform_tax_fee" BalanceTransactionSourceTypeRefund BalanceTransactionSourceType = "refund" BalanceTransactionSourceTypeReserveTransaction BalanceTransactionSourceType = "reserve_transaction" BalanceTransactionSourceTypeTaxDeductedAtSource BalanceTransactionSourceType = "tax_deducted_at_source" BalanceTransactionSourceTypeTopup BalanceTransactionSourceType = "topup" BalanceTransactionSourceTypeTransfer BalanceTransactionSourceType = "transfer" BalanceTransactionSourceTypeTransferReversal BalanceTransactionSourceType = "transfer_reversal" )
List of values that BalanceTransactionSourceType can take
type BalanceTransactionStatus ¶
type BalanceTransactionStatus string
The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.
const ( BalanceTransactionStatusAvailable BalanceTransactionStatus = "available" BalanceTransactionStatusPending BalanceTransactionStatus = "pending" )
List of values that BalanceTransactionStatus can take
type BalanceTransactionType ¶
type BalanceTransactionType string
Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `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 about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
const ( BalanceTransactionTypeAdjustment BalanceTransactionType = "adjustment" BalanceTransactionTypeAdvance BalanceTransactionType = "advance" BalanceTransactionTypeAdvanceFunding BalanceTransactionType = "advance_funding" BalanceTransactionTypeAnticipationRepayment BalanceTransactionType = "anticipation_repayment" BalanceTransactionTypeApplicationFee BalanceTransactionType = "application_fee" BalanceTransactionTypeApplicationFeeRefund BalanceTransactionType = "application_fee_refund" BalanceTransactionTypeCharge BalanceTransactionType = "charge" BalanceTransactionTypeConnectCollectionTransfer BalanceTransactionType = "connect_collection_transfer" BalanceTransactionTypeContribution BalanceTransactionType = "contribution" BalanceTransactionTypeIssuingAuthorizationHold BalanceTransactionType = "issuing_authorization_hold" BalanceTransactionTypeIssuingAuthorizationRelease BalanceTransactionType = "issuing_authorization_release" BalanceTransactionTypeIssuingDispute BalanceTransactionType = "issuing_dispute" BalanceTransactionTypeIssuingTransaction BalanceTransactionType = "issuing_transaction" BalanceTransactionTypeObligationInbound BalanceTransactionType = "obligation_inbound" BalanceTransactionTypeObligationOutbound BalanceTransactionType = "obligation_outbound" BalanceTransactionTypeObligationPayout BalanceTransactionType = "obligation_payout" BalanceTransactionTypeObligationPayoutFailure BalanceTransactionType = "obligation_payout_failure" BalanceTransactionTypeObligationReversalInbound BalanceTransactionType = "obligation_reversal_inbound" BalanceTransactionTypeObligationReversalOutbound BalanceTransactionType = "obligation_reversal_outbound" BalanceTransactionTypePayment BalanceTransactionType = "payment" BalanceTransactionTypePaymentFailureRefund BalanceTransactionType = "payment_failure_refund" BalanceTransactionTypePaymentRefund BalanceTransactionType = "payment_refund" BalanceTransactionTypePaymentReversal BalanceTransactionType = "payment_reversal" BalanceTransactionTypePayout BalanceTransactionType = "payout" BalanceTransactionTypePayoutCancel BalanceTransactionType = "payout_cancel" BalanceTransactionTypePayoutFailure BalanceTransactionType = "payout_failure" BalanceTransactionTypeRefund BalanceTransactionType = "refund" BalanceTransactionTypeRefundFailure BalanceTransactionType = "refund_failure" BalanceTransactionTypeReserveTransaction BalanceTransactionType = "reserve_transaction" BalanceTransactionTypeReservedFunds BalanceTransactionType = "reserved_funds" BalanceTransactionTypeStripeFee BalanceTransactionType = "stripe_fee" BalanceTransactionTypeStripeFxFee BalanceTransactionType = "stripe_fx_fee" BalanceTransactionTypeTaxFee BalanceTransactionType = "tax_fee" BalanceTransactionTypeTopup BalanceTransactionType = "topup" BalanceTransactionTypeTopupReversal BalanceTransactionType = "topup_reversal" BalanceTransactionTypeTransfer BalanceTransactionType = "transfer" BalanceTransactionTypeTransferCancel BalanceTransactionType = "transfer_cancel" BalanceTransactionTypeTransferFailure BalanceTransactionType = "transfer_failure" BalanceTransactionTypeTransferRefund BalanceTransactionType = "transfer_refund" )
List of values that BalanceTransactionType can take
type BankAccount ¶
type BankAccount struct { APIResource // The ID of the account that the bank account is associated with. Account *Account `json:"account"` // The name of the person or business that owns the bank account. AccountHolderName string `json:"account_holder_name"` // The type of entity that holds the account. This can be either `individual` or `company`. AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"` // The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. AccountType string `json:"account_type"` // A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. AvailablePayoutMethods []BankAccountAvailablePayoutMethod `json:"available_payout_methods"` // Name of the bank associated with the routing number (e.g., `WELLS FARGO`). BankName string `json:"bank_name"` // Two-letter ISO code representing the country the bank account is located in. Country string `json:"country"` // Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. Currency Currency `json:"currency"` // The ID of the customer that the bank account is associated with. Customer *Customer `json:"customer"` // Whether this bank account is the default external account for its currency. DefaultForCurrency bool `json:"default_for_currency"` Deleted bool `json:"deleted"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. FutureRequirements *BankAccountFutureRequirements `json:"future_requirements"` // Unique identifier for the object. ID string `json:"id"` // The last four digits of the bank account number. Last4 string `json:"last4"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Information about the requirements for the bank account, including what information needs to be collected. Requirements *BankAccountRequirements `json:"requirements"` // The routing transit number for the bank account. RoutingNumber string `json:"routing_number"` // For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated. // // For external accounts, possible values are `new`, `errored` and `verification_failed`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. Status BankAccountStatus `json:"status"` }
These bank accounts are payment methods on `Customer` objects.
On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). They can be bank accounts or debit cards as well, and are documented in the links above.
Related guide: [Bank debits and transfers](https://stripe.com/docs/payments/bank-debits-transfers)
func (*BankAccount) UnmarshalJSON ¶
func (b *BankAccount) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a BankAccount. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type BankAccountAccountHolderType ¶
type BankAccountAccountHolderType string
The type of entity that holds the account. This can be either `individual` or `company`.
const ( BankAccountAccountHolderTypeCompany BankAccountAccountHolderType = "company" BankAccountAccountHolderTypeIndividual BankAccountAccountHolderType = "individual" )
List of values that BankAccountAccountHolderType can take
type BankAccountAvailablePayoutMethod ¶
type BankAccountAvailablePayoutMethod string
A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.
const ( BankAccountAvailablePayoutMethodInstant BankAccountAvailablePayoutMethod = "instant" BankAccountAvailablePayoutMethodStandard BankAccountAvailablePayoutMethod = "standard" )
List of values that BankAccountAvailablePayoutMethod can take
type BankAccountDocumentsBankAccountOwnershipVerificationParams ¶
type BankAccountDocumentsBankAccountOwnershipVerificationParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check.
type BankAccountDocumentsParams ¶
type BankAccountDocumentsParams struct { // One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. BankAccountOwnershipVerification *BankAccountDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"` }
Documents that may be submitted to satisfy various informational requests.
type BankAccountFutureRequirements ¶
type BankAccountFutureRequirements struct { // Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. CurrentlyDue []string `json:"currently_due"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*BankAccountFutureRequirementsError `json:"errors"` // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. PastDue []string `json:"past_due"` // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. PendingVerification []string `json:"pending_verification"` }
Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
type BankAccountFutureRequirementsError ¶
type BankAccountFutureRequirementsError struct { // The code for the type of error. Code BankAccountFutureRequirementsErrorCode `json:"code"` // An informative message that indicates the error type and provides additional details about the error. Reason string `json:"reason"` // The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. Requirement string `json:"requirement"` }
Fields that are `currently_due` and need to be collected again because validation or verification failed.
type BankAccountFutureRequirementsErrorCode ¶
type BankAccountFutureRequirementsErrorCode string
The code for the type of error.
const ( BankAccountFutureRequirementsErrorCodeInvalidAddressCityStatePostalCode BankAccountFutureRequirementsErrorCode = "invalid_address_city_state_postal_code" BankAccountFutureRequirementsErrorCodeInvalidDOBAgeUnder18 BankAccountFutureRequirementsErrorCode = "invalid_dob_age_under_18" BankAccountFutureRequirementsErrorCodeInvalidRepresentativeCountry BankAccountFutureRequirementsErrorCode = "invalid_representative_country" BankAccountFutureRequirementsErrorCodeInvalidStreetAddress BankAccountFutureRequirementsErrorCode = "invalid_street_address" BankAccountFutureRequirementsErrorCodeInvalidTOSAcceptance BankAccountFutureRequirementsErrorCode = "invalid_tos_acceptance" BankAccountFutureRequirementsErrorCodeInvalidValueOther BankAccountFutureRequirementsErrorCode = "invalid_value_other" BankAccountFutureRequirementsErrorCodeVerificationDirectorsMismatch BankAccountFutureRequirementsErrorCode = "verification_directors_mismatch" BankAccountFutureRequirementsErrorCodeVerificationDocumentAddressMismatch BankAccountFutureRequirementsErrorCode = "verification_document_address_mismatch" BankAccountFutureRequirementsErrorCodeVerificationDocumentAddressMissing BankAccountFutureRequirementsErrorCode = "verification_document_address_missing" BankAccountFutureRequirementsErrorCodeVerificationDocumentCorrupt BankAccountFutureRequirementsErrorCode = "verification_document_corrupt" BankAccountFutureRequirementsErrorCodeVerificationDocumentCountryNotSupported BankAccountFutureRequirementsErrorCode = "verification_document_country_not_supported" BankAccountFutureRequirementsErrorCodeVerificationDocumentDirectorsMismatch BankAccountFutureRequirementsErrorCode = "verification_document_directors_mismatch" BankAccountFutureRequirementsErrorCodeVerificationDocumentDOBMismatch BankAccountFutureRequirementsErrorCode = "verification_document_dob_mismatch" BankAccountFutureRequirementsErrorCodeVerificationDocumentDuplicateType BankAccountFutureRequirementsErrorCode = "verification_document_duplicate_type" BankAccountFutureRequirementsErrorCodeVerificationDocumentExpired BankAccountFutureRequirementsErrorCode = "verification_document_expired" BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedCopy BankAccountFutureRequirementsErrorCode = "verification_document_failed_copy" BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedGreyscale BankAccountFutureRequirementsErrorCode = "verification_document_failed_greyscale" BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedOther BankAccountFutureRequirementsErrorCode = "verification_document_failed_other" BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedTestMode BankAccountFutureRequirementsErrorCode = "verification_document_failed_test_mode" BankAccountFutureRequirementsErrorCodeVerificationDocumentFraudulent BankAccountFutureRequirementsErrorCode = "verification_document_fraudulent" BankAccountFutureRequirementsErrorCodeVerificationDocumentIDNumberMismatch BankAccountFutureRequirementsErrorCode = "verification_document_id_number_mismatch" BankAccountFutureRequirementsErrorCodeVerificationDocumentIDNumberMissing BankAccountFutureRequirementsErrorCode = "verification_document_id_number_missing" BankAccountFutureRequirementsErrorCodeVerificationDocumentIncomplete BankAccountFutureRequirementsErrorCode = "verification_document_incomplete" BankAccountFutureRequirementsErrorCodeVerificationDocumentInvalid BankAccountFutureRequirementsErrorCode = "verification_document_invalid" BankAccountFutureRequirementsErrorCodeVerificationDocumentIssueOrExpiryDateMissing BankAccountFutureRequirementsErrorCode = "verification_document_issue_or_expiry_date_missing" BankAccountFutureRequirementsErrorCodeVerificationDocumentManipulated BankAccountFutureRequirementsErrorCode = "verification_document_manipulated" BankAccountFutureRequirementsErrorCodeVerificationDocumentMissingBack BankAccountFutureRequirementsErrorCode = "verification_document_missing_back" BankAccountFutureRequirementsErrorCodeVerificationDocumentMissingFront BankAccountFutureRequirementsErrorCode = "verification_document_missing_front" BankAccountFutureRequirementsErrorCodeVerificationDocumentNameMismatch BankAccountFutureRequirementsErrorCode = "verification_document_name_mismatch" BankAccountFutureRequirementsErrorCodeVerificationDocumentNameMissing BankAccountFutureRequirementsErrorCode = "verification_document_name_missing" BankAccountFutureRequirementsErrorCodeVerificationDocumentNationalityMismatch BankAccountFutureRequirementsErrorCode = "verification_document_nationality_mismatch" BankAccountFutureRequirementsErrorCodeVerificationDocumentNotReadable BankAccountFutureRequirementsErrorCode = "verification_document_not_readable" BankAccountFutureRequirementsErrorCodeVerificationDocumentNotSigned BankAccountFutureRequirementsErrorCode = "verification_document_not_signed" BankAccountFutureRequirementsErrorCodeVerificationDocumentNotUploaded BankAccountFutureRequirementsErrorCode = "verification_document_not_uploaded" BankAccountFutureRequirementsErrorCodeVerificationDocumentPhotoMismatch BankAccountFutureRequirementsErrorCode = "verification_document_photo_mismatch" BankAccountFutureRequirementsErrorCodeVerificationDocumentTooLarge BankAccountFutureRequirementsErrorCode = "verification_document_too_large" BankAccountFutureRequirementsErrorCodeVerificationDocumentTypeNotSupported BankAccountFutureRequirementsErrorCode = "verification_document_type_not_supported" BankAccountFutureRequirementsErrorCodeVerificationExtraneousDirectors BankAccountFutureRequirementsErrorCode = "verification_extraneous_directors" BankAccountFutureRequirementsErrorCodeVerificationFailedAddressMatch BankAccountFutureRequirementsErrorCode = "verification_failed_address_match" BankAccountFutureRequirementsErrorCodeVerificationFailedBusinessIecNumber BankAccountFutureRequirementsErrorCode = "verification_failed_business_iec_number" BankAccountFutureRequirementsErrorCodeVerificationFailedDocumentMatch BankAccountFutureRequirementsErrorCode = "verification_failed_document_match" BankAccountFutureRequirementsErrorCodeVerificationFailedIDNumberMatch BankAccountFutureRequirementsErrorCode = "verification_failed_id_number_match" BankAccountFutureRequirementsErrorCodeVerificationFailedKeyedIdentity BankAccountFutureRequirementsErrorCode = "verification_failed_keyed_identity" BankAccountFutureRequirementsErrorCodeVerificationFailedKeyedMatch BankAccountFutureRequirementsErrorCode = "verification_failed_keyed_match" BankAccountFutureRequirementsErrorCodeVerificationFailedNameMatch BankAccountFutureRequirementsErrorCode = "verification_failed_name_match" BankAccountFutureRequirementsErrorCodeVerificationFailedOther BankAccountFutureRequirementsErrorCode = "verification_failed_other" BankAccountFutureRequirementsErrorCodeVerificationFailedResidentialAddress BankAccountFutureRequirementsErrorCode = "verification_failed_residential_address" BankAccountFutureRequirementsErrorCodeVerificationFailedTaxIDMatch BankAccountFutureRequirementsErrorCode = "verification_failed_tax_id_match" BankAccountFutureRequirementsErrorCodeVerificationFailedTaxIDNotIssued BankAccountFutureRequirementsErrorCode = "verification_failed_tax_id_not_issued" BankAccountFutureRequirementsErrorCodeVerificationMissingDirectors BankAccountFutureRequirementsErrorCode = "verification_missing_directors" BankAccountFutureRequirementsErrorCodeVerificationMissingExecutives BankAccountFutureRequirementsErrorCode = "verification_missing_executives" BankAccountFutureRequirementsErrorCodeVerificationMissingOwners BankAccountFutureRequirementsErrorCode = "verification_missing_owners" BankAccountFutureRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountFutureRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations" )
List of values that BankAccountFutureRequirementsErrorCode can take
type BankAccountList ¶
type BankAccountList struct { APIResource ListMeta Data []*BankAccount `json:"data"` }
BankAccountList is a list of BankAccounts as retrieved from a list endpoint.
type BankAccountListParams ¶
type BankAccountListParams struct { ListParams `form:"*"` // The identifier of the parent account under which the bank accounts are // nested. Either Account or Customer should be populated. Account *string `form:"-"` // Included in URL // The identifier of the parent customer under which the bank accounts are // nested. Either Account or Customer should be populated. Customer *string `form:"-"` // Included in URL }
type BankAccountParams ¶
type BankAccountParams struct { Params `form:"*"` Customer *string `form:"-"` // Included in URL // Token is a token referencing an external account like one returned from // Stripe.js. Token *string `form:"-"` // Included in URL // Account is the identifier of the parent account under which bank // accounts are nested. Account *string `form:"-"` // Included in URL // The name of the person or business that owns the bank account. AccountHolderName *string `form:"account_holder_name"` // The type of entity that holds the account. This can be either `individual` or `company`. AccountHolderType *string `form:"account_holder_type"` // The account number for the bank account, in string form. Must be a checking account. AccountNumber *string `form:"account_number"` // The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. AccountType *string `form:"account_type"` // City/District/Suburb/Town/Village. AddressCity *string `form:"address_city"` // Billing address country, if provided when creating card. AddressCountry *string `form:"address_country"` // Address line 1 (Street address/PO Box/Company name). AddressLine1 *string `form:"address_line1"` // Address line 2 (Apartment/Suite/Unit/Building). AddressLine2 *string `form:"address_line2"` // State/County/Province/Region. AddressState *string `form:"address_state"` // ZIP or postal code. AddressZip *string `form:"address_zip"` // The country in which the bank account is located. Country *string `form:"country"` // The currency the bank account is in. This must be a country/currency pairing that [Stripe supports](https://stripe.com/docs/payouts). Currency *string `form:"currency"` // When set to true, this becomes the default external account for its currency. DefaultForCurrency *bool `form:"default_for_currency"` // Documents that may be submitted to satisfy various informational requests. Documents *BankAccountDocumentsParams `form:"documents"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Two digit number representing the card's expiration month. ExpMonth *string `form:"exp_month"` // Four digit number representing the card's expiration year. ExpYear *string `form:"exp_year"` // 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`. Metadata map[string]string `form:"metadata"` // Cardholder name. Name *string `form:"name"` // The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. RoutingNumber *string `form:"routing_number"` // ID is used when tokenizing a bank account for shared customers ID *string `form:"*"` }
Updates the metadata, account holder name, 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.
func (*BankAccountParams) AddExpand ¶
func (p *BankAccountParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*BankAccountParams) AddMetadata ¶
func (p *BankAccountParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
func (*BankAccountParams) AppendToAsSourceOrExternalAccount ¶
func (p *BankAccountParams) AppendToAsSourceOrExternalAccount(body *form.Values)
AppendToAsSourceOrExternalAccount appends the given BankAccountParams as either a source or external account.
It may look like an AppendTo from the form package, but it's not, and is only used in the special case where we use `bankaccount.New`. It's needed because we have some weird encoding logic here that can't be handled by the form package (and it's special enough that it wouldn't be desirable to have it do so).
This is not a pattern that we want to push forward, and this largely exists because the bank accounts endpoint is a little unusual. There is one other resource like it, which is cards.
type BankAccountRequirements ¶
type BankAccountRequirements struct { // Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. CurrentlyDue []string `json:"currently_due"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*BankAccountRequirementsError `json:"errors"` // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. PastDue []string `json:"past_due"` // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. PendingVerification []string `json:"pending_verification"` }
Information about the requirements for the bank account, including what information needs to be collected.
type BankAccountRequirementsError ¶
type BankAccountRequirementsError struct { // The code for the type of error. Code BankAccountRequirementsErrorCode `json:"code"` // An informative message that indicates the error type and provides additional details about the error. Reason string `json:"reason"` // The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. Requirement string `json:"requirement"` }
Fields that are `currently_due` and need to be collected again because validation or verification failed.
type BankAccountRequirementsErrorCode ¶
type BankAccountRequirementsErrorCode string
The code for the type of error.
const ( BankAccountRequirementsErrorCodeInvalidAddressCityStatePostalCode BankAccountRequirementsErrorCode = "invalid_address_city_state_postal_code" BankAccountRequirementsErrorCodeInvalidDOBAgeUnder18 BankAccountRequirementsErrorCode = "invalid_dob_age_under_18" BankAccountRequirementsErrorCodeInvalidRepresentativeCountry BankAccountRequirementsErrorCode = "invalid_representative_country" BankAccountRequirementsErrorCodeInvalidStreetAddress BankAccountRequirementsErrorCode = "invalid_street_address" BankAccountRequirementsErrorCodeInvalidTOSAcceptance BankAccountRequirementsErrorCode = "invalid_tos_acceptance" BankAccountRequirementsErrorCodeInvalidValueOther BankAccountRequirementsErrorCode = "invalid_value_other" BankAccountRequirementsErrorCodeVerificationDirectorsMismatch BankAccountRequirementsErrorCode = "verification_directors_mismatch" BankAccountRequirementsErrorCodeVerificationDocumentAddressMismatch BankAccountRequirementsErrorCode = "verification_document_address_mismatch" BankAccountRequirementsErrorCodeVerificationDocumentAddressMissing BankAccountRequirementsErrorCode = "verification_document_address_missing" BankAccountRequirementsErrorCodeVerificationDocumentCorrupt BankAccountRequirementsErrorCode = "verification_document_corrupt" BankAccountRequirementsErrorCodeVerificationDocumentCountryNotSupported BankAccountRequirementsErrorCode = "verification_document_country_not_supported" BankAccountRequirementsErrorCodeVerificationDocumentDirectorsMismatch BankAccountRequirementsErrorCode = "verification_document_directors_mismatch" BankAccountRequirementsErrorCodeVerificationDocumentDOBMismatch BankAccountRequirementsErrorCode = "verification_document_dob_mismatch" BankAccountRequirementsErrorCodeVerificationDocumentDuplicateType BankAccountRequirementsErrorCode = "verification_document_duplicate_type" BankAccountRequirementsErrorCodeVerificationDocumentExpired BankAccountRequirementsErrorCode = "verification_document_expired" BankAccountRequirementsErrorCodeVerificationDocumentFailedCopy BankAccountRequirementsErrorCode = "verification_document_failed_copy" BankAccountRequirementsErrorCodeVerificationDocumentFailedGreyscale BankAccountRequirementsErrorCode = "verification_document_failed_greyscale" BankAccountRequirementsErrorCodeVerificationDocumentFailedOther BankAccountRequirementsErrorCode = "verification_document_failed_other" BankAccountRequirementsErrorCodeVerificationDocumentFailedTestMode BankAccountRequirementsErrorCode = "verification_document_failed_test_mode" BankAccountRequirementsErrorCodeVerificationDocumentFraudulent BankAccountRequirementsErrorCode = "verification_document_fraudulent" BankAccountRequirementsErrorCodeVerificationDocumentIDNumberMismatch BankAccountRequirementsErrorCode = "verification_document_id_number_mismatch" BankAccountRequirementsErrorCodeVerificationDocumentIDNumberMissing BankAccountRequirementsErrorCode = "verification_document_id_number_missing" BankAccountRequirementsErrorCodeVerificationDocumentIncomplete BankAccountRequirementsErrorCode = "verification_document_incomplete" BankAccountRequirementsErrorCodeVerificationDocumentInvalid BankAccountRequirementsErrorCode = "verification_document_invalid" BankAccountRequirementsErrorCodeVerificationDocumentIssueOrExpiryDateMissing BankAccountRequirementsErrorCode = "verification_document_issue_or_expiry_date_missing" BankAccountRequirementsErrorCodeVerificationDocumentManipulated BankAccountRequirementsErrorCode = "verification_document_manipulated" BankAccountRequirementsErrorCodeVerificationDocumentMissingBack BankAccountRequirementsErrorCode = "verification_document_missing_back" BankAccountRequirementsErrorCodeVerificationDocumentMissingFront BankAccountRequirementsErrorCode = "verification_document_missing_front" BankAccountRequirementsErrorCodeVerificationDocumentNameMismatch BankAccountRequirementsErrorCode = "verification_document_name_mismatch" BankAccountRequirementsErrorCodeVerificationDocumentNameMissing BankAccountRequirementsErrorCode = "verification_document_name_missing" BankAccountRequirementsErrorCodeVerificationDocumentNationalityMismatch BankAccountRequirementsErrorCode = "verification_document_nationality_mismatch" BankAccountRequirementsErrorCodeVerificationDocumentNotReadable BankAccountRequirementsErrorCode = "verification_document_not_readable" BankAccountRequirementsErrorCodeVerificationDocumentNotSigned BankAccountRequirementsErrorCode = "verification_document_not_signed" BankAccountRequirementsErrorCodeVerificationDocumentNotUploaded BankAccountRequirementsErrorCode = "verification_document_not_uploaded" BankAccountRequirementsErrorCodeVerificationDocumentPhotoMismatch BankAccountRequirementsErrorCode = "verification_document_photo_mismatch" BankAccountRequirementsErrorCodeVerificationDocumentTooLarge BankAccountRequirementsErrorCode = "verification_document_too_large" BankAccountRequirementsErrorCodeVerificationDocumentTypeNotSupported BankAccountRequirementsErrorCode = "verification_document_type_not_supported" BankAccountRequirementsErrorCodeVerificationExtraneousDirectors BankAccountRequirementsErrorCode = "verification_extraneous_directors" BankAccountRequirementsErrorCodeVerificationFailedAddressMatch BankAccountRequirementsErrorCode = "verification_failed_address_match" BankAccountRequirementsErrorCodeVerificationFailedBusinessIecNumber BankAccountRequirementsErrorCode = "verification_failed_business_iec_number" BankAccountRequirementsErrorCodeVerificationFailedDocumentMatch BankAccountRequirementsErrorCode = "verification_failed_document_match" BankAccountRequirementsErrorCodeVerificationFailedIDNumberMatch BankAccountRequirementsErrorCode = "verification_failed_id_number_match" BankAccountRequirementsErrorCodeVerificationFailedKeyedIdentity BankAccountRequirementsErrorCode = "verification_failed_keyed_identity" BankAccountRequirementsErrorCodeVerificationFailedKeyedMatch BankAccountRequirementsErrorCode = "verification_failed_keyed_match" BankAccountRequirementsErrorCodeVerificationFailedNameMatch BankAccountRequirementsErrorCode = "verification_failed_name_match" BankAccountRequirementsErrorCodeVerificationFailedOther BankAccountRequirementsErrorCode = "verification_failed_other" BankAccountRequirementsErrorCodeVerificationFailedResidentialAddress BankAccountRequirementsErrorCode = "verification_failed_residential_address" BankAccountRequirementsErrorCodeVerificationFailedTaxIDMatch BankAccountRequirementsErrorCode = "verification_failed_tax_id_match" BankAccountRequirementsErrorCodeVerificationFailedTaxIDNotIssued BankAccountRequirementsErrorCode = "verification_failed_tax_id_not_issued" BankAccountRequirementsErrorCodeVerificationMissingDirectors BankAccountRequirementsErrorCode = "verification_missing_directors" BankAccountRequirementsErrorCodeVerificationMissingExecutives BankAccountRequirementsErrorCode = "verification_missing_executives" BankAccountRequirementsErrorCodeVerificationMissingOwners BankAccountRequirementsErrorCode = "verification_missing_owners" BankAccountRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations" )
List of values that BankAccountRequirementsErrorCode can take
type BankAccountStatus ¶
type BankAccountStatus string
For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.
For external accounts, possible values are `new`, `errored` and `verification_failed`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
const ( BankAccountStatusErrored BankAccountStatus = "errored" BankAccountStatusNew BankAccountStatus = "new" BankAccountStatusValidated BankAccountStatus = "validated" BankAccountStatusVerificationFailed BankAccountStatus = "verification_failed" BankAccountStatusVerified BankAccountStatus = "verified" )
List of values that BankAccountStatus can take
type BillingPortalConfiguration ¶
type BillingPortalConfiguration struct { APIResource // Whether the configuration is active and can be used to create portal sessions. Active bool `json:"active"` // ID of the Connect Application that created the configuration. Application *Application `json:"application"` BusinessProfile *BillingPortalConfigurationBusinessProfile `json:"business_profile"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. DefaultReturnURL string `json:"default_return_url"` Features *BillingPortalConfigurationFeatures `json:"features"` // Unique identifier for the object. ID string `json:"id"` // Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. IsDefault bool `json:"is_default"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` LoginPage *BillingPortalConfigurationLoginPage `json:"login_page"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Time at which the object was last updated. Measured in seconds since the Unix epoch. Updated int64 `json:"updated"` }
A portal configuration describes the functionality and behavior of a portal session.
func (*BillingPortalConfiguration) UnmarshalJSON ¶
func (b *BillingPortalConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a BillingPortalConfiguration. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type BillingPortalConfigurationBusinessProfile ¶
type BillingPortalConfigurationBusinessProfile struct { // The messaging shown to customers in the portal. Headline string `json:"headline"` // A link to the business's publicly available privacy policy. PrivacyPolicyURL string `json:"privacy_policy_url"` // A link to the business's publicly available terms of service. TermsOfServiceURL string `json:"terms_of_service_url"` }
type BillingPortalConfigurationBusinessProfileParams ¶
type BillingPortalConfigurationBusinessProfileParams struct { // The messaging shown to customers in the portal. Headline *string `form:"headline"` // A link to the business's publicly available privacy policy. PrivacyPolicyURL *string `form:"privacy_policy_url"` // A link to the business's publicly available terms of service. TermsOfServiceURL *string `form:"terms_of_service_url"` }
The business information shown to customers in the portal.
type BillingPortalConfigurationFeatures ¶
type BillingPortalConfigurationFeatures struct { CustomerUpdate *BillingPortalConfigurationFeaturesCustomerUpdate `json:"customer_update"` InvoiceHistory *BillingPortalConfigurationFeaturesInvoiceHistory `json:"invoice_history"` PaymentMethodUpdate *BillingPortalConfigurationFeaturesPaymentMethodUpdate `json:"payment_method_update"` SubscriptionCancel *BillingPortalConfigurationFeaturesSubscriptionCancel `json:"subscription_cancel"` SubscriptionPause *BillingPortalConfigurationFeaturesSubscriptionPause `json:"subscription_pause"` SubscriptionUpdate *BillingPortalConfigurationFeaturesSubscriptionUpdate `json:"subscription_update"` }
type BillingPortalConfigurationFeaturesCustomerUpdate ¶
type BillingPortalConfigurationFeaturesCustomerUpdate struct { // The types of customer updates that are supported. When empty, customers are not updateable. AllowedUpdates []BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate `json:"allowed_updates"` // Whether the feature is enabled. Enabled bool `json:"enabled"` }
type BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate ¶
type BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate string
The types of customer updates that are supported. When empty, customers are not updateable.
const ( BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateAddress BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "address" BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateEmail BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "email" BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateName BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "name" BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdatePhone BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "phone" BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateShipping BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "shipping" BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateTaxID BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "tax_id" )
List of values that BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate can take
type BillingPortalConfigurationFeaturesCustomerUpdateParams ¶
type BillingPortalConfigurationFeaturesCustomerUpdateParams struct { // The types of customer updates that are supported. When empty, customers are not updateable. AllowedUpdates []*string `form:"allowed_updates"` // Whether the feature is enabled. Enabled *bool `form:"enabled"` }
Information about updating the customer details in the portal.
type BillingPortalConfigurationFeaturesInvoiceHistory ¶
type BillingPortalConfigurationFeaturesInvoiceHistory struct { // Whether the feature is enabled. Enabled bool `json:"enabled"` }
type BillingPortalConfigurationFeaturesInvoiceHistoryParams ¶
type BillingPortalConfigurationFeaturesInvoiceHistoryParams struct { // Whether the feature is enabled. Enabled *bool `form:"enabled"` }
Information about showing the billing history in the portal.
type BillingPortalConfigurationFeaturesParams ¶
type BillingPortalConfigurationFeaturesParams struct { // Information about updating the customer details in the portal. CustomerUpdate *BillingPortalConfigurationFeaturesCustomerUpdateParams `form:"customer_update"` // Information about showing the billing history in the portal. InvoiceHistory *BillingPortalConfigurationFeaturesInvoiceHistoryParams `form:"invoice_history"` // Information about updating payment methods in the portal. PaymentMethodUpdate *BillingPortalConfigurationFeaturesPaymentMethodUpdateParams `form:"payment_method_update"` // Information about canceling subscriptions in the portal. SubscriptionCancel *BillingPortalConfigurationFeaturesSubscriptionCancelParams `form:"subscription_cancel"` // Information about pausing subscriptions in the portal. SubscriptionPause *BillingPortalConfigurationFeaturesSubscriptionPauseParams `form:"subscription_pause"` // Information about updating subscriptions in the portal. SubscriptionUpdate *BillingPortalConfigurationFeaturesSubscriptionUpdateParams `form:"subscription_update"` }
Information about the features available in the portal.
type BillingPortalConfigurationFeaturesPaymentMethodUpdate ¶
type BillingPortalConfigurationFeaturesPaymentMethodUpdate struct { // Whether the feature is enabled. Enabled bool `json:"enabled"` }
type BillingPortalConfigurationFeaturesPaymentMethodUpdateParams ¶
type BillingPortalConfigurationFeaturesPaymentMethodUpdateParams struct { // Whether the feature is enabled. Enabled *bool `form:"enabled"` }
Information about updating payment methods in the portal.
type BillingPortalConfigurationFeaturesSubscriptionCancel ¶
type BillingPortalConfigurationFeaturesSubscriptionCancel struct { CancellationReason *BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReason `json:"cancellation_reason"` // Whether the feature is enabled. Enabled bool `json:"enabled"` // Whether to cancel subscriptions immediately or at the end of the billing period. Mode BillingPortalConfigurationFeaturesSubscriptionCancelMode `json:"mode"` // Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. ProrationBehavior BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior `json:"proration_behavior"` }
type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReason ¶
type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReason struct { // Whether the feature is enabled. Enabled bool `json:"enabled"` // Which cancellation reasons will be given as options to the customer. Options []BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption `json:"options"` }
type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption ¶
type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption string
Which cancellation reasons will be given as options to the customer.
const ( BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionCustomerService BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "customer_service" BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionLowQuality BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "low_quality" BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionMissingFeatures BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "missing_features" BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionOther BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "other" BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionSwitchedService BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "switched_service" BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionTooComplex BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "too_complex" BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionTooExpensive BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "too_expensive" BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionUnused BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "unused" )
List of values that BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption can take
type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonParams ¶
type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonParams struct { // Whether the feature is enabled. Enabled *bool `form:"enabled"` // Which cancellation reasons will be given as options to the customer. Options []*string `form:"options"` }
Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
type BillingPortalConfigurationFeaturesSubscriptionCancelMode ¶
type BillingPortalConfigurationFeaturesSubscriptionCancelMode string
Whether to cancel subscriptions immediately or at the end of the billing period.
const ( BillingPortalConfigurationFeaturesSubscriptionCancelModeAtPeriodEnd BillingPortalConfigurationFeaturesSubscriptionCancelMode = "at_period_end" BillingPortalConfigurationFeaturesSubscriptionCancelModeImmediately BillingPortalConfigurationFeaturesSubscriptionCancelMode = "immediately" )
List of values that BillingPortalConfigurationFeaturesSubscriptionCancelMode can take
type BillingPortalConfigurationFeaturesSubscriptionCancelParams ¶
type BillingPortalConfigurationFeaturesSubscriptionCancelParams struct { // Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer CancellationReason *BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonParams `form:"cancellation_reason"` // Whether the feature is enabled. Enabled *bool `form:"enabled"` // Whether to cancel subscriptions immediately or at the end of the billing period. Mode *string `form:"mode"` // Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. ProrationBehavior *string `form:"proration_behavior"` }
Information about canceling subscriptions in the portal.
type BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior ¶
type BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior string
Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.
const ( BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorAlwaysInvoice BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "always_invoice" BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorCreateProrations BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "create_prorations" BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorNone BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "none" )
List of values that BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior can take
type BillingPortalConfigurationFeaturesSubscriptionPause ¶
type BillingPortalConfigurationFeaturesSubscriptionPause struct { // Whether the feature is enabled. Enabled bool `json:"enabled"` }
type BillingPortalConfigurationFeaturesSubscriptionPauseParams ¶
type BillingPortalConfigurationFeaturesSubscriptionPauseParams struct { // Whether the feature is enabled. Enabled *bool `form:"enabled"` }
Information about pausing subscriptions in the portal.
type BillingPortalConfigurationFeaturesSubscriptionUpdate ¶
type BillingPortalConfigurationFeaturesSubscriptionUpdate struct { // The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. DefaultAllowedUpdates []BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate `json:"default_allowed_updates"` // Whether the feature is enabled. Enabled bool `json:"enabled"` // The list of products that support subscription updates. Products []*BillingPortalConfigurationFeaturesSubscriptionUpdateProduct `json:"products"` // Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. ProrationBehavior BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior `json:"proration_behavior"` }
type BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate ¶
type BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate string
The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.
const ( BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdatePrice BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate = "price" BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdatePromotionCode BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate = "promotion_code" BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdateQuantity BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate = "quantity" )
List of values that BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate can take
type BillingPortalConfigurationFeaturesSubscriptionUpdateParams ¶
type BillingPortalConfigurationFeaturesSubscriptionUpdateParams struct { // The types of subscription updates that are supported. When empty, subscriptions are not updateable. DefaultAllowedUpdates []*string `form:"default_allowed_updates"` // Whether the feature is enabled. Enabled *bool `form:"enabled"` // The list of products that support subscription updates. Products []*BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams `form:"products"` // Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. ProrationBehavior *string `form:"proration_behavior"` }
Information about updating subscriptions in the portal.
type BillingPortalConfigurationFeaturesSubscriptionUpdateProduct ¶
type BillingPortalConfigurationFeaturesSubscriptionUpdateProduct struct { // The list of price IDs which, when subscribed to, a subscription can be updated. Prices []string `json:"prices"` // The product ID. Product string `json:"product"` }
The list of products that support subscription updates.
type BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams ¶
type BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams struct { // The list of price IDs for the product that a subscription can be updated to. Prices []*string `form:"prices"` // The product id. Product *string `form:"product"` }
The list of products that support subscription updates.
type BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior ¶
type BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior string
Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
const ( BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehaviorAlwaysInvoice BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior = "always_invoice" BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehaviorCreateProrations BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior = "create_prorations" BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehaviorNone BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior = "none" )
List of values that BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior can take
type BillingPortalConfigurationList ¶
type BillingPortalConfigurationList struct { APIResource ListMeta Data []*BillingPortalConfiguration `json:"data"` }
BillingPortalConfigurationList is a list of Configurations as retrieved from a list endpoint.
type BillingPortalConfigurationListParams ¶
type BillingPortalConfigurationListParams struct { ListParams `form:"*"` // Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). Active *bool `form:"active"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). IsDefault *bool `form:"is_default"` }
Returns a list of configurations that describe the functionality of the customer portal.
func (*BillingPortalConfigurationListParams) AddExpand ¶
func (p *BillingPortalConfigurationListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type BillingPortalConfigurationLoginPage ¶
type BillingPortalConfigurationLoginPage struct { // If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. // // If `false`, the previously generated `url`, if any, will be deactivated. Enabled bool `json:"enabled"` // A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. URL string `json:"url"` }
type BillingPortalConfigurationLoginPageParams ¶
type BillingPortalConfigurationLoginPageParams struct { // Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. // // Set to `false` to deactivate the `login_page.url`. Enabled *bool `form:"enabled"` }
The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
type BillingPortalConfigurationParams ¶
type BillingPortalConfigurationParams struct { Params `form:"*"` // Whether the configuration is active and can be used to create portal sessions. Active *bool `form:"active"` // The business information shown to customers in the portal. BusinessProfile *BillingPortalConfigurationBusinessProfileParams `form:"business_profile"` // The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. DefaultReturnURL *string `form:"default_return_url"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Information about the features available in the portal. Features *BillingPortalConfigurationFeaturesParams `form:"features"` // The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). LoginPage *BillingPortalConfigurationLoginPageParams `form:"login_page"` // 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`. Metadata map[string]string `form:"metadata"` }
Creates a configuration that describes the functionality and behavior of a PortalSession
func (*BillingPortalConfigurationParams) AddExpand ¶
func (p *BillingPortalConfigurationParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*BillingPortalConfigurationParams) AddMetadata ¶
func (p *BillingPortalConfigurationParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type BillingPortalSession ¶
type BillingPortalSession struct { APIResource // The configuration used by this session, describing the features available. Configuration *BillingPortalConfiguration `json:"configuration"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The ID of the customer for this session. Customer string `json:"customer"` // Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. Flow *BillingPortalSessionFlow `json:"flow"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. Locale string `json:"locale"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. OnBehalfOf string `json:"on_behalf_of"` // The URL to redirect customers to when they click on the portal's link to return to your website. ReturnURL string `json:"return_url"` // The short-lived URL of the session that gives customers access to the customer portal. URL string `json:"url"` }
The Billing customer portal is a Stripe-hosted UI for subscription and billing management.
A portal configuration describes the functionality and features that you want to provide to your customers through the portal.
A portal session describes the instantiation of the customer portal for a particular customer. By visiting the session's URL, the customer can manage their subscriptions and billing details. For security reasons, sessions are short-lived and will expire if the customer does not visit the URL. Create sessions on-demand when customers intend to manage their subscriptions and billing details.
Learn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal).
type BillingPortalSessionFlow ¶
type BillingPortalSessionFlow struct { AfterCompletion *BillingPortalSessionFlowAfterCompletion `json:"after_completion"` // Configuration when `flow.type=subscription_cancel`. SubscriptionCancel *BillingPortalSessionFlowSubscriptionCancel `json:"subscription_cancel"` // Configuration when `flow.type=subscription_update`. SubscriptionUpdate *BillingPortalSessionFlowSubscriptionUpdate `json:"subscription_update"` // Configuration when `flow.type=subscription_update_confirm`. SubscriptionUpdateConfirm *BillingPortalSessionFlowSubscriptionUpdateConfirm `json:"subscription_update_confirm"` // Type of flow that the customer will go through. Type BillingPortalSessionFlowType `json:"type"` }
Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
type BillingPortalSessionFlowAfterCompletion ¶
type BillingPortalSessionFlowAfterCompletion struct { // Configuration when `after_completion.type=hosted_confirmation`. HostedConfirmation *BillingPortalSessionFlowAfterCompletionHostedConfirmation `json:"hosted_confirmation"` // Configuration when `after_completion.type=redirect`. Redirect *BillingPortalSessionFlowAfterCompletionRedirect `json:"redirect"` // The specified type of behavior after the flow is completed. Type BillingPortalSessionFlowAfterCompletionType `json:"type"` }
type BillingPortalSessionFlowAfterCompletionHostedConfirmation ¶
type BillingPortalSessionFlowAfterCompletionHostedConfirmation struct { // A custom message to display to the customer after the flow is completed. CustomMessage string `json:"custom_message"` }
Configuration when `after_completion.type=hosted_confirmation`.
type BillingPortalSessionFlowAfterCompletionRedirect ¶
type BillingPortalSessionFlowAfterCompletionRedirect struct { // The URL the customer will be redirected to after the flow is completed. ReturnURL string `json:"return_url"` }
Configuration when `after_completion.type=redirect`.
type BillingPortalSessionFlowAfterCompletionType ¶
type BillingPortalSessionFlowAfterCompletionType string
The specified type of behavior after the flow is completed.
const ( BillingPortalSessionFlowAfterCompletionTypeHostedConfirmation BillingPortalSessionFlowAfterCompletionType = "hosted_confirmation" BillingPortalSessionFlowAfterCompletionTypePortalHomepage BillingPortalSessionFlowAfterCompletionType = "portal_homepage" BillingPortalSessionFlowAfterCompletionTypeRedirect BillingPortalSessionFlowAfterCompletionType = "redirect" )
List of values that BillingPortalSessionFlowAfterCompletionType can take
type BillingPortalSessionFlowDataAfterCompletionHostedConfirmationParams ¶
type BillingPortalSessionFlowDataAfterCompletionHostedConfirmationParams struct { // A custom message to display to the customer after the flow is completed. CustomMessage *string `form:"custom_message"` }
Configuration when `after_completion.type=hosted_confirmation`.
type BillingPortalSessionFlowDataAfterCompletionParams ¶
type BillingPortalSessionFlowDataAfterCompletionParams struct { // Configuration when `after_completion.type=hosted_confirmation`. HostedConfirmation *BillingPortalSessionFlowDataAfterCompletionHostedConfirmationParams `form:"hosted_confirmation"` // Configuration when `after_completion.type=redirect`. Redirect *BillingPortalSessionFlowDataAfterCompletionRedirectParams `form:"redirect"` // The specified behavior after the flow is completed. Type *string `form:"type"` }
Behavior after the flow is completed.
type BillingPortalSessionFlowDataAfterCompletionRedirectParams ¶
type BillingPortalSessionFlowDataAfterCompletionRedirectParams struct { // The URL the customer will be redirected to after the flow is completed. ReturnURL *string `form:"return_url"` }
Configuration when `after_completion.type=redirect`.
type BillingPortalSessionFlowDataParams ¶
type BillingPortalSessionFlowDataParams struct { // Behavior after the flow is completed. AfterCompletion *BillingPortalSessionFlowDataAfterCompletionParams `form:"after_completion"` // Configuration when `flow_data.type=subscription_cancel`. SubscriptionCancel *BillingPortalSessionFlowDataSubscriptionCancelParams `form:"subscription_cancel"` // Configuration when `flow_data.type=subscription_update`. SubscriptionUpdate *BillingPortalSessionFlowDataSubscriptionUpdateParams `form:"subscription_update"` // Configuration when `flow_data.type=subscription_update_confirm`. SubscriptionUpdateConfirm *BillingPortalSessionFlowDataSubscriptionUpdateConfirmParams `form:"subscription_update_confirm"` // Type of flow that the customer will go through. Type *string `form:"type"` }
Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
type BillingPortalSessionFlowDataSubscriptionCancelParams ¶
type BillingPortalSessionFlowDataSubscriptionCancelParams struct { // Specify a retention strategy to be used in the cancellation flow. Retention *BillingPortalSessionFlowDataSubscriptionCancelRetentionParams `form:"retention"` // The ID of the subscription to be canceled. Subscription *string `form:"subscription"` }
Configuration when `flow_data.type=subscription_cancel`.
type BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams ¶ added in v75.2.0
type BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams struct { // The ID of the coupon to be offered. Coupon *string `form:"coupon"` }
Configuration when `retention.type=coupon_offer`.
type BillingPortalSessionFlowDataSubscriptionCancelRetentionParams ¶ added in v75.2.0
type BillingPortalSessionFlowDataSubscriptionCancelRetentionParams struct { // Configuration when `retention.type=coupon_offer`. CouponOffer *BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams `form:"coupon_offer"` // Type of retention strategy to use with the customer. Type *string `form:"type"` }
Specify a retention strategy to be used in the cancellation flow.
type BillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscountParams ¶
type BillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscountParams struct { // The ID of the coupon to apply to this subscription update. Coupon *string `form:"coupon"` // The ID of a promotion code to apply to this subscription update. PromotionCode *string `form:"promotion_code"` }
The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
type BillingPortalSessionFlowDataSubscriptionUpdateConfirmItemParams ¶
type BillingPortalSessionFlowDataSubscriptionUpdateConfirmItemParams struct { // The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. ID *string `form:"id"` // The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). Price *string `form:"price"` // [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. Quantity *int64 `form:"quantity"` }
The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
type BillingPortalSessionFlowDataSubscriptionUpdateConfirmParams ¶
type BillingPortalSessionFlowDataSubscriptionUpdateConfirmParams struct { // The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. Discounts []*BillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscountParams `form:"discounts"` // The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. Items []*BillingPortalSessionFlowDataSubscriptionUpdateConfirmItemParams `form:"items"` // The ID of the subscription to be updated. Subscription *string `form:"subscription"` }
Configuration when `flow_data.type=subscription_update_confirm`.
type BillingPortalSessionFlowDataSubscriptionUpdateParams ¶
type BillingPortalSessionFlowDataSubscriptionUpdateParams struct { // The ID of the subscription to be updated. Subscription *string `form:"subscription"` }
Configuration when `flow_data.type=subscription_update`.
type BillingPortalSessionFlowSubscriptionCancel ¶
type BillingPortalSessionFlowSubscriptionCancel struct { // Specify a retention strategy to be used in the cancellation flow. Retention *BillingPortalSessionFlowSubscriptionCancelRetention `json:"retention"` // The ID of the subscription to be canceled. Subscription string `json:"subscription"` }
Configuration when `flow.type=subscription_cancel`.
type BillingPortalSessionFlowSubscriptionCancelRetention ¶ added in v75.2.0
type BillingPortalSessionFlowSubscriptionCancelRetention struct { // Configuration when `retention.type=coupon_offer`. CouponOffer *BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer `json:"coupon_offer"` // Type of retention strategy that will be used. Type BillingPortalSessionFlowSubscriptionCancelRetentionType `json:"type"` }
Specify a retention strategy to be used in the cancellation flow.
type BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer ¶ added in v75.2.0
type BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer struct { // The ID of the coupon to be offered. Coupon string `json:"coupon"` }
Configuration when `retention.type=coupon_offer`.
type BillingPortalSessionFlowSubscriptionCancelRetentionType ¶ added in v75.2.0
type BillingPortalSessionFlowSubscriptionCancelRetentionType string
Type of retention strategy that will be used.
const (
BillingPortalSessionFlowSubscriptionCancelRetentionTypeCouponOffer BillingPortalSessionFlowSubscriptionCancelRetentionType = "coupon_offer"
)
List of values that BillingPortalSessionFlowSubscriptionCancelRetentionType can take
type BillingPortalSessionFlowSubscriptionUpdate ¶
type BillingPortalSessionFlowSubscriptionUpdate struct { // The ID of the subscription to be updated. Subscription string `json:"subscription"` }
Configuration when `flow.type=subscription_update`.
type BillingPortalSessionFlowSubscriptionUpdateConfirm ¶
type BillingPortalSessionFlowSubscriptionUpdateConfirm struct { // The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. Discounts []*BillingPortalSessionFlowSubscriptionUpdateConfirmDiscount `json:"discounts"` // The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. Items []*BillingPortalSessionFlowSubscriptionUpdateConfirmItem `json:"items"` // The ID of the subscription to be updated. Subscription string `json:"subscription"` }
Configuration when `flow.type=subscription_update_confirm`.
type BillingPortalSessionFlowSubscriptionUpdateConfirmDiscount ¶
type BillingPortalSessionFlowSubscriptionUpdateConfirmDiscount struct { // The ID of the coupon to apply to this subscription update. Coupon string `json:"coupon"` // The ID of a promotion code to apply to this subscription update. PromotionCode string `json:"promotion_code"` }
The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
type BillingPortalSessionFlowSubscriptionUpdateConfirmItem ¶
type BillingPortalSessionFlowSubscriptionUpdateConfirmItem struct { // The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. ID string `json:"id"` // The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). Price string `json:"price"` // [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. Quantity int64 `json:"quantity"` }
The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
type BillingPortalSessionFlowType ¶
type BillingPortalSessionFlowType string
Type of flow that the customer will go through.
const ( BillingPortalSessionFlowTypePaymentMethodUpdate BillingPortalSessionFlowType = "payment_method_update" BillingPortalSessionFlowTypeSubscriptionCancel BillingPortalSessionFlowType = "subscription_cancel" BillingPortalSessionFlowTypeSubscriptionUpdate BillingPortalSessionFlowType = "subscription_update" BillingPortalSessionFlowTypeSubscriptionUpdateConfirm BillingPortalSessionFlowType = "subscription_update_confirm" )
List of values that BillingPortalSessionFlowType can take
type BillingPortalSessionParams ¶
type BillingPortalSessionParams struct { Params `form:"*"` // The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. Configuration *string `form:"configuration"` // The ID of an existing customer. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. FlowData *BillingPortalSessionFlowDataParams `form:"flow_data"` // The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. Locale *string `form:"locale"` // The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. OnBehalfOf *string `form:"on_behalf_of"` // The default URL to redirect customers to when they click on the portal's link to return to your website. ReturnURL *string `form:"return_url"` }
Creates a session of the customer portal.
func (*BillingPortalSessionParams) AddExpand ¶
func (p *BillingPortalSessionParams) AddExpand(f string)
AddExpand appends a new field to expand.
type Capability ¶
type Capability struct { APIResource // The account for which the capability enables functionality. Account *Account `json:"account"` FutureRequirements *CapabilityFutureRequirements `json:"future_requirements"` // The identifier for the capability. ID string `json:"id"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Whether the capability has been requested. Requested bool `json:"requested"` // Time at which the capability was requested. Measured in seconds since the Unix epoch. RequestedAt int64 `json:"requested_at"` Requirements *CapabilityRequirements `json:"requirements"` // The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`. Status CapabilityStatus `json:"status"` }
This is an object representing a capability for a Stripe account.
Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities)
type CapabilityDisabledReason ¶
type CapabilityDisabledReason string
If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.
`rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service:
- [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses)
If you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
const ( CapabilityDisabledReasonPendingOnboarding CapabilityDisabledReason = "pending.onboarding" CapabilityDisabledReasonPendingReview CapabilityDisabledReason = "pending.review" CapabilityDisabledReasonRejectedFraud CapabilityDisabledReason = "rejected_fraud" CapabilityDisabledReasonRejectedListed CapabilityDisabledReason = "rejected.listed" CapabilityDisabledReasonRejectedOther CapabilityDisabledReason = "rejected.other" CapabilityDisabledReasonRequirementsFieldsNeeded CapabilityDisabledReason = "requirement.fields_needed" )
List of values that CapabilityDisabledReason can take
type CapabilityFutureRequirements ¶
type CapabilityFutureRequirements struct { // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. Alternatives []*CapabilityFutureRequirementsAlternative `json:"alternatives"` // Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. CurrentDeadline int64 `json:"current_deadline"` // Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. CurrentlyDue []string `json:"currently_due"` // This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. DisabledReason string `json:"disabled_reason"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*CapabilityFutureRequirementsError `json:"errors"` // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. PastDue []string `json:"past_due"` // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. PendingVerification []string `json:"pending_verification"` }
type CapabilityFutureRequirementsAlternative ¶
type CapabilityFutureRequirementsAlternative struct { // Fields that can be provided to satisfy all fields in `original_fields_due`. AlternativeFieldsDue []string `json:"alternative_fields_due"` // Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. OriginalFieldsDue []string `json:"original_fields_due"` }
Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
type CapabilityFutureRequirementsError ¶
type CapabilityFutureRequirementsError struct { // The code for the type of error. Code string `json:"code"` // An informative message that indicates the error type and provides additional details about the error. Reason string `json:"reason"` // The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. Requirement string `json:"requirement"` }
Fields that are `currently_due` and need to be collected again because validation or verification failed.
type CapabilityList ¶
type CapabilityList struct { APIResource ListMeta Data []*Capability `json:"data"` }
CapabilityList is a list of Capabilities as retrieved from a list endpoint.
type CapabilityListParams ¶
type CapabilityListParams struct { ListParams `form:"*"` Account *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.
func (*CapabilityListParams) AddExpand ¶
func (p *CapabilityListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CapabilityParams ¶
type CapabilityParams struct { Params `form:"*"` Account *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. // // If a capability isn't permanent, you can remove it from the account by passing false. Most capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. Requested *bool `form:"requested"` }
Retrieves information about the specified Account Capability.
func (*CapabilityParams) AddExpand ¶
func (p *CapabilityParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CapabilityRequirements ¶
type CapabilityRequirements struct { // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. Alternatives []*CapabilityRequirementsAlternative `json:"alternatives"` // Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected. CurrentDeadline int64 `json:"current_deadline"` // Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. CurrentlyDue []string `json:"currently_due"` // If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. // // `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service: // // - [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses) // // If you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance. DisabledReason CapabilityDisabledReason `json:"disabled_reason"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*AccountRequirementsError `json:"errors"` // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. PastDue []string `json:"past_due"` // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. PendingVerification []string `json:"pending_verification"` }
type CapabilityRequirementsAlternative ¶
type CapabilityRequirementsAlternative struct { // Fields that can be provided to satisfy all fields in `original_fields_due`. AlternativeFieldsDue []string `json:"alternative_fields_due"` // Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. OriginalFieldsDue []string `json:"original_fields_due"` }
Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
type CapabilityStatus ¶
type CapabilityStatus string
The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`.
const ( CapabilityStatusActive CapabilityStatus = "active" CapabilityStatusDisabled CapabilityStatus = "disabled" CapabilityStatusInactive CapabilityStatus = "inactive" CapabilityStatusPending CapabilityStatus = "pending" CapabilityStatusUnrequested CapabilityStatus = "unrequested" )
List of values that CapabilityStatus can take
type Card ¶
type Card struct { APIResource // The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. Account *Account `json:"account"` // City/District/Suburb/Town/Village. AddressCity string `json:"address_city"` // Billing address country, if provided when creating card. AddressCountry string `json:"address_country"` // Address line 1 (Street address/PO Box/Company name). AddressLine1 string `json:"address_line1"` // If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. AddressLine1Check CardAddressLine1Check `json:"address_line1_check"` // Address line 2 (Apartment/Suite/Unit/Building). AddressLine2 string `json:"address_line2"` // State/County/Province/Region. AddressState string `json:"address_state"` // ZIP or postal code. AddressZip string `json:"address_zip"` // If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. AddressZipCheck CardAddressZipCheck `json:"address_zip_check"` // A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. AvailablePayoutMethods []CardAvailablePayoutMethod `json:"available_payout_methods"` // Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. Brand CardBrand `json:"brand"` // 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 `json:"country"` // Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. Currency Currency `json:"currency"` // The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. Customer *Customer `json:"customer"` // If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). CVCCheck CardCVCCheck `json:"cvc_check"` // Whether this card is the default external account for its currency. DefaultForCurrency bool `json:"default_for_currency"` Deleted bool `json:"deleted"` // Description is a succinct summary of the card's information. // // Please note that this field is for internal use only and is not returned // as part of standard API requests. // 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 `json:"description"` // (For tokenized numbers only.) The last four digits of the device account number. DynamicLast4 string `json:"dynamic_last4"` // Two-digit number representing the card's expiration month. ExpMonth int64 `json:"exp_month"` // Four-digit number representing the card's expiration year. ExpYear int64 `json:"exp_year"` // 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 `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding CardFunding `json:"funding"` // Unique identifier for the object. ID string `json:"id"` // IIN is the card's "Issuer Identification Number". // // Please note that this field is for internal use only and is not returned // as part of standard API requests. // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) IIN string `json:"iin"` // Issuer is a bank or financial institution that provides the card. // // Please note that this field is for internal use only and is not returned // as part of standard API requests. // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) Issuer string `json:"issuer"` // The last four digits of the card. Last4 string `json:"last4"` // 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. Metadata map[string]string `json:"metadata"` // Cardholder name. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. Status string `json:"status"` // If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. TokenizationMethod CardTokenizationMethod `json:"tokenization_method"` }
You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.
Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)
func (*Card) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Card. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type CardAddressLine1Check ¶
type CardAddressLine1Check string
If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
const ( CardAddressLine1CheckFail CardAddressLine1Check = "fail" CardAddressLine1CheckPass CardAddressLine1Check = "pass" CardAddressLine1CheckUnchecked CardAddressLine1Check = "unchecked" )
List of values that CardAddressLine1Check can take
type CardAddressZipCheck ¶
type CardAddressZipCheck string
If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
const ( CardAddressZipCheckFail CardAddressZipCheck = "fail" CardAddressZipCheckPass CardAddressZipCheck = "pass" CardAddressZipCheckUnchecked CardAddressZipCheck = "unchecked" )
List of values that CardAddressZipCheck can take
type CardAvailablePayoutMethod ¶
type CardAvailablePayoutMethod string
A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.
const ( CardAvailablePayoutMethodInstant CardAvailablePayoutMethod = "instant" CardAvailablePayoutMethodStandard CardAvailablePayoutMethod = "standard" )
List of values that CardAvailablePayoutMethod can take
type CardBrand ¶
type CardBrand string
Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
const ( CardBrandAmericanExpress CardBrand = "American Express" CardBrandDiscover CardBrand = "Discover" CardBrandDinersClub CardBrand = "Diners Club" CardBrandJCB CardBrand = "JCB" CardBrandMasterCard CardBrand = "MasterCard" CardBrandUnknown CardBrand = "Unknown" CardBrandUnionPay CardBrand = "UnionPay" CardBrandVisa CardBrand = "Visa" )
List of values that CardBrand can take
type CardCVCCheck ¶
type CardCVCCheck string
If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).
const ( CardCVCCheckFail CardCVCCheck = "fail" CardCVCCheckPass CardCVCCheck = "pass" CardCVCCheckUnchecked CardCVCCheck = "unchecked" )
List of values that CardCVCCheck can take
type CardError ¶
type CardError struct { // DeclineCode is a code indicating a card issuer's reason for declining a // card (if they provided one). DeclineCode DeclineCode `json:"decline_code,omitempty"` // contains filtered or unexported fields }
CardError are the most common type of error you should expect to handle. They result when the user enters a card that can't be charged for some reason.
type CardFunding ¶
type CardFunding string
Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
const ( CardFundingCredit CardFunding = "credit" CardFundingDebit CardFunding = "debit" CardFundingPrepaid CardFunding = "prepaid" CardFundingUnknown CardFunding = "unknown" )
List of values that CardFunding can take
type CardList ¶
type CardList struct { APIResource ListMeta Data []*Card `json:"data"` }
CardList is a list of Cards as retrieved from a list endpoint.
type CardListParams ¶
type CardListParams struct { ListParams `form:"*"` Account *string `form:"-"` // Included in URL Customer *string `form:"-"` // Included in URL }
type CardOwnerParams ¶
type CardOwnerParams struct { // Owner's address. Address *AddressParams `form:"address"` // Owner's email address. Email *string `form:"email"` // Owner's full name. Name *string `form:"name"` // Owner's phone number. Phone *string `form:"phone"` }
type CardParams ¶
type CardParams struct { Params `form:"*"` Account *string `form:"-"` // Included in URL Token *string `form:"-"` // Included in URL Customer *string `form:"-"` // Included in URL // The name of the person or business that owns the bank account. AccountHolderName *string `form:"account_holder_name"` // The type of entity that holds the account. This can be either `individual` or `company`. AccountHolderType *string `form:"account_holder_type"` // City/District/Suburb/Town/Village. AddressCity *string `form:"address_city"` // Billing address country, if provided when creating card. AddressCountry *string `form:"address_country"` // Address line 1 (Street address/PO Box/Company name). AddressLine1 *string `form:"address_line1"` // Address line 2 (Apartment/Suite/Unit/Building). AddressLine2 *string `form:"address_line2"` // State/County/Province/Region. AddressState *string `form:"address_state"` // ZIP or postal code. AddressZip *string `form:"address_zip"` // Required when adding a card to an account (not applicable to customers or recipients). The card (which must be a debit card) can be used as a transfer destination for funds in this currency. Currency *string `form:"currency"` // Card security code. Highly recommended to always include this value, but it's required only for accounts based in European countries. CVC *string `form:"cvc"` // Applicable only on accounts (not customers or recipients). If you set this to `true` (or if this is the first external account being added in this currency), this card will become the default external account for its currency. DefaultForCurrency *bool `form:"default_for_currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Two digit number representing the card's expiration month. ExpMonth *string `form:"exp_month"` // Four digit number representing the card's expiration year. ExpYear *string `form:"exp_year"` // 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`. Metadata map[string]string `form:"metadata"` // Cardholder name. Name *string `form:"name"` // The card number, as a string without any separators. Number *string `form:"number"` Owner *CardOwnerParams `form:"owner"` // ID is used when tokenizing a card for shared customers ID string `form:"*"` }
Update a specified source for a given customer.
func (*CardParams) AddExpand ¶
func (p *CardParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*CardParams) AddMetadata ¶
func (p *CardParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
func (*CardParams) AppendToAsCardSourceOrExternalAccount ¶
func (p *CardParams) AppendToAsCardSourceOrExternalAccount(body *form.Values, keyParts []string)
AppendToAsCardSourceOrExternalAccount appends the given CardParams as either a card or external account.
It may look like an AppendTo from the form package, but it's not, and is only used in the special case where we use `card.New`. It's needed because we have some weird encoding logic here that can't be handled by the form package (and it's special enough that it wouldn't be desirable to have it do so).
This is not a pattern that we want to push forward, and this largely exists because the cards endpoint is a little unusual. There is one other resource like it, which is bank account.
type CardTokenizationMethod ¶
type CardTokenizationMethod string
If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null.
const ( CardTokenizationMethodAndroidPay CardTokenizationMethod = "android_pay" CardTokenizationMethodApplePay CardTokenizationMethod = "apple_pay" )
List of values that CardTokenizationMethod can take
type CashBalance ¶
type CashBalance struct { APIResource // A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Available map[string]int64 `json:"available"` // The ID of the customer whose cash balance this object represents. Customer string `json:"customer"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` Settings *CashBalanceSettings `json:"settings"` }
A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
type CashBalanceParams ¶
type CashBalanceParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A hash of settings for this cash balance. Settings *CashBalanceSettingsParams `form:"settings"` Customer *string `form:"-"` // Included in URL }
Retrieves a customer's cash balance.
func (*CashBalanceParams) AddExpand ¶
func (p *CashBalanceParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CashBalanceSettings ¶
type CashBalanceSettings struct { // The configuration for how funds that land in the customer cash balance are reconciled. ReconciliationMode CashBalanceSettingsReconciliationMode `json:"reconciliation_mode"` // A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance UsingMerchantDefault bool `json:"using_merchant_default"` }
type CashBalanceSettingsParams ¶
type CashBalanceSettingsParams struct { // Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). ReconciliationMode *string `form:"reconciliation_mode"` }
A hash of settings for this cash balance.
type CashBalanceSettingsReconciliationMode ¶
type CashBalanceSettingsReconciliationMode string
The configuration for how funds that land in the customer cash balance are reconciled.
const ( CashBalanceSettingsReconciliationModeAutomatic CashBalanceSettingsReconciliationMode = "automatic" CashBalanceSettingsReconciliationModeManual CashBalanceSettingsReconciliationMode = "manual" )
List of values that CashBalanceSettingsReconciliationMode can take
type Charge ¶
type Charge struct { APIResource // Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/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://stripe.com/docs/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 int64 `json:"amount"` // Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). AmountCaptured int64 `json:"amount_captured"` // Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). AmountRefunded int64 `json:"amount_refunded"` // ID of the Connect application that created the charge. Application *Application `json:"application"` // The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. ApplicationFee *ApplicationFee `json:"application_fee"` // The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. ApplicationFeeAmount int64 `json:"application_fee_amount"` // Authorization code on the charge. AuthorizationCode string `json:"authorization_code"` // ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). BalanceTransaction *BalanceTransaction `json:"balance_transaction"` BillingDetails *ChargeBillingDetails `json:"billing_details"` // 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. CalculatedStatementDescriptor string `json:"calculated_statement_descriptor"` // If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. Captured bool `json:"captured"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // ID of the customer this charge is for if one exists. Customer *Customer `json:"customer"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // Whether the charge has been disputed. Disputed bool `json:"disputed"` // ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"` // Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). FailureCode string `json:"failure_code"` // Message to user further explaining reason for charge failure if available. FailureMessage string `json:"failure_message"` // Information on fraud assessments for the charge. FraudDetails *ChargeFraudDetails `json:"fraud_details"` // Unique identifier for the object. ID string `json:"id"` // ID of the invoice this charge is for if one exists. Invoice *Invoice `json:"invoice"` Level3 *ChargeLevel3 `json:"level3"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. OnBehalfOf *Account `json:"on_behalf_of"` // Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. Outcome *ChargeOutcome `json:"outcome"` // `true` if the charge succeeded, or was successfully authorized for later capture. Paid bool `json:"paid"` // ID of the PaymentIntent associated with this charge, if one exists. PaymentIntent *PaymentIntent `json:"payment_intent"` // ID of the payment method used in this charge. PaymentMethod string `json:"payment_method"` // Details about the payment method at the time of the transaction. PaymentMethodDetails *ChargePaymentMethodDetails `json:"payment_method_details"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *ChargeRadarOptions `json:"radar_options"` // This is the email address that the receipt for this charge was sent to. ReceiptEmail string `json:"receipt_email"` // 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. ReceiptNumber string `json:"receipt_number"` // 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. ReceiptURL string `json:"receipt_url"` // Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. Refunded bool `json:"refunded"` // A list of refunds that have been applied to the charge. Refunds *RefundList `json:"refunds"` // ID of the review associated with this charge if one exists. Review *Review `json:"review"` // Shipping information for the charge. Shipping *ShippingDetails `json:"shipping"` // 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 *PaymentSource `json:"source"` // The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. SourceTransfer *Transfer `json:"source_transfer"` // For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. StatementDescriptor string `json:"statement_descriptor"` // Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. StatementDescriptorSuffix string `json:"statement_descriptor_suffix"` // The status of the payment is either `succeeded`, `pending`, or `failed`. Status ChargeStatus `json:"status"` // ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). Transfer *Transfer `json:"transfer"` // An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. TransferData *ChargeTransferData `json:"transfer_data"` // A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. TransferGroup string `json:"transfer_group"` }
The `Charge` object represents a single attempt to move money into your Stripe account. PaymentIntent confirmation is the most common way to create Charges, but transferring money to a different Stripe account through Connect also creates Charges. Some legacy payment flows create Charges directly, which is not recommended for new integrations.
Example (Get) ¶
package main import ( "log" stripe "github.com/stripe/stripe-go/v75" "github.com/stripe/stripe-go/v75/charge" ) func main() { stripe.Key = "sk_key" params := &stripe.ChargeParams{} params.AddExpand("customer") params.AddExpand("application") params.AddExpand("balance_transaction") ch, err := charge.Get("ch_example_id", params) if err != nil { log.Fatal(err) } if ch.Application != nil { log.Fatal(err) } log.Printf("%v\n", ch.ID) }
Output:
Example (New) ¶
package main import ( "log" stripe "github.com/stripe/stripe-go/v75" "github.com/stripe/stripe-go/v75/charge" ) func main() { stripe.Key = "sk_key" params := &stripe.ChargeParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), } params.SetSource("tok_visa") params.AddMetadata("key", "value") ch, err := charge.New(params) if err != nil { log.Fatal(err) } log.Printf("%v\n", ch.ID) }
Output:
func (*Charge) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Charge. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type ChargeBillingDetails ¶
type ChargeCaptureParams ¶
type ChargeCaptureParams struct { Params `form:"*"` // The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Amount *int64 `form:"amount"` // An application fee to add on to this charge. ApplicationFee *int64 `form:"application_fee"` // An application fee amount to add on to this charge, which must be less than or equal to the original amount. ApplicationFeeAmount *int64 `form:"application_fee_amount"` ExchangeRate *float64 `form:"exchange_rate"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. ReceiptEmail *string `form:"receipt_email"` // For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. StatementDescriptor *string `form:"statement_descriptor"` // Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` // An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. TransferData *ChargeCaptureTransferDataParams `form:"transfer_data"` // A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. TransferGroup *string `form:"transfer_group"` }
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://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://stripe.com/docs/api/payment_intents/capture).
func (*ChargeCaptureParams) AddExpand ¶
func (p *ChargeCaptureParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ChargeCaptureTransferDataParams ¶
type ChargeCaptureTransferDataParams struct { // The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. Amount *int64 `form:"amount"` }
An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
type ChargeDestinationParams ¶
type ChargeDestinationParams struct { // ID of an existing, connected Stripe account. Account *string `form:"account"` // The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount. Amount *int64 `form:"amount"` }
type ChargeFraudDetails ¶
type ChargeFraudDetails struct { // Assessments from Stripe. If set, the value is `fraudulent`. StripeReport ChargeFraudStripeReport `json:"stripe_report"` // Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. UserReport ChargeFraudUserReport `json:"user_report"` }
Information on fraud assessments for the charge.
type ChargeFraudDetailsParams ¶
type ChargeFraudDetailsParams struct { // Either `safe` or `fraudulent`. UserReport *string `form:"user_report"` }
A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.
type ChargeFraudStripeReport ¶
type ChargeFraudStripeReport string
Assessments from Stripe. If set, the value is `fraudulent`.
const (
ChargeFraudStripeReportFraudulent ChargeFraudStripeReport = "fraudulent"
)
List of values that ChargeFraudStripeReport can take
type ChargeFraudUserReport ¶
type ChargeFraudUserReport string
Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.
const ( ChargeFraudUserReportFraudulent ChargeFraudUserReport = "fraudulent" ChargeFraudUserReportSafe ChargeFraudUserReport = "safe" )
List of values that ChargeFraudUserReport can take
type ChargeLevel3 ¶
type ChargeLevel3 struct { CustomerReference string `json:"customer_reference"` LineItems []*ChargeLevel3LineItem `json:"line_items"` MerchantReference string `json:"merchant_reference"` ShippingAddressZip string `json:"shipping_address_zip"` ShippingAmount int64 `json:"shipping_amount"` ShippingFromZip string `json:"shipping_from_zip"` }
type ChargeLevel3LineItem ¶
type ChargeLevel3Params ¶
type ChargeLevel3Params struct { CustomerReference *string `form:"customer_reference"` LineItems []*ChargeLevel3LineItemParams `form:"line_items"` MerchantReference *string `form:"merchant_reference"` ShippingAddressZip *string `form:"shipping_address_zip"` ShippingAmount *int64 `form:"shipping_amount"` ShippingFromZip *string `form:"shipping_from_zip"` }
type ChargeList ¶
type ChargeList struct { APIResource ListMeta Data []*Charge `json:"data"` }
ChargeList is a list of Charges as retrieved from a list endpoint.
type ChargeListParams ¶
type ChargeListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Only return charges for the customer specified by this customer ID. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. PaymentIntent *string `form:"payment_intent"` // Only return charges for this transfer group. TransferGroup *string `form:"transfer_group"` }
Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first.
func (*ChargeListParams) AddExpand ¶
func (p *ChargeListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ChargeOutcome ¶
type ChargeOutcome struct { // 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://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. NetworkStatus string `json:"network_status"` // 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 authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. Reason string `json:"reason"` // 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. RiskLevel string `json:"risk_level"` // 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. RiskScore int64 `json:"risk_score"` // The ID of the Radar rule that matched the payment, if applicable. Rule *ChargeOutcomeRule `json:"rule"` // A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. SellerMessage string `json:"seller_message"` // Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. Type string `json:"type"` }
Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.
type ChargeOutcomeRule ¶
type ChargeOutcomeRule struct { // The action taken on the payment. Action string `json:"action"` // Unique identifier for the object. ID string `json:"id"` // The predicate to evaluate the payment against. Predicate string `json:"predicate"` }
The ID of the Radar rule that matched the payment, if applicable.
func (*ChargeOutcomeRule) UnmarshalJSON ¶
func (c *ChargeOutcomeRule) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a ChargeOutcomeRule. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type ChargeParams ¶
type ChargeParams struct { Params `form:"*"` // Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/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://stripe.com/docs/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 *int64 `form:"amount"` ApplicationFee *int64 `form:"application_fee"` // A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). ApplicationFeeAmount *int64 `form:"application_fee_amount"` // Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. Capture *bool `form:"capture"` // 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 `form:"currency"` // The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. Customer *string `form:"customer"` // An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. Description *string `form:"description"` Destination *ChargeDestinationParams `form:"destination"` ExchangeRate *float64 `form:"exchange_rate"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. FraudDetails *ChargeFraudDetailsParams `form:"fraud_details"` Level3 *ChargeLevel3Params `form:"level3"` // 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`. Metadata map[string]string `form:"metadata"` // The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). OnBehalfOf *string `form:"on_behalf_of"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *ChargeRadarOptionsParams `form:"radar_options"` // The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). ReceiptEmail *string `form:"receipt_email"` // Shipping information for the charge. Helps prevent fraud on charges for physical goods. Shipping *ShippingDetailsParams `form:"shipping"` Source *PaymentSourceSourceParams `form:"*"` // PaymentSourceSourceParams has custom encoding so brought to top level with "*" // For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. StatementDescriptor *string `form:"statement_descriptor"` // Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` // An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. TransferData *ChargeTransferDataParams `form:"transfer_data"` // A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. TransferGroup *string `form:"transfer_group"` }
Use the [Payment Intents API](https://stripe.com/docs/api/payment_intents) to initiate a new payment instead of using this method. Confirmation of the PaymentIntent creates the Charge object used to request payment, so this method is limited to legacy integrations.
func (*ChargeParams) AddExpand ¶
func (p *ChargeParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*ChargeParams) AddMetadata ¶
func (p *ChargeParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
func (*ChargeParams) SetSource ¶
func (p *ChargeParams) SetSource(sp interface{}) error
SetSource adds valid sources to a ChargeParams object, returning an error for unsupported sources.
type ChargePaymentMethodDetails ¶
type ChargePaymentMethodDetails struct { ACHCreditTransfer *ChargePaymentMethodDetailsACHCreditTransfer `json:"ach_credit_transfer"` ACHDebit *ChargePaymentMethodDetailsACHDebit `json:"ach_debit"` ACSSDebit *ChargePaymentMethodDetailsACSSDebit `json:"acss_debit"` Affirm *ChargePaymentMethodDetailsAffirm `json:"affirm"` AfterpayClearpay *ChargePaymentMethodDetailsAfterpayClearpay `json:"afterpay_clearpay"` Alipay *ChargePaymentMethodDetailsAlipay `json:"alipay"` AUBECSDebit *ChargePaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"` BACSDebit *ChargePaymentMethodDetailsBACSDebit `json:"bacs_debit"` Bancontact *ChargePaymentMethodDetailsBancontact `json:"bancontact"` BLIK *ChargePaymentMethodDetailsBLIK `json:"blik"` Boleto *ChargePaymentMethodDetailsBoleto `json:"boleto"` Card *ChargePaymentMethodDetailsCard `json:"card"` CardPresent *ChargePaymentMethodDetailsCardPresent `json:"card_present"` CashApp *ChargePaymentMethodDetailsCashApp `json:"cashapp"` CustomerBalance *ChargePaymentMethodDetailsCustomerBalance `json:"customer_balance"` EPS *ChargePaymentMethodDetailsEPS `json:"eps"` FPX *ChargePaymentMethodDetailsFPX `json:"fpx"` Giropay *ChargePaymentMethodDetailsGiropay `json:"giropay"` Grabpay *ChargePaymentMethodDetailsGrabpay `json:"grabpay"` IDEAL *ChargePaymentMethodDetailsIDEAL `json:"ideal"` InteracPresent *ChargePaymentMethodDetailsInteracPresent `json:"interac_present"` Klarna *ChargePaymentMethodDetailsKlarna `json:"klarna"` Konbini *ChargePaymentMethodDetailsKonbini `json:"konbini"` Link *ChargePaymentMethodDetailsLink `json:"link"` Multibanco *ChargePaymentMethodDetailsMultibanco `json:"multibanco"` OXXO *ChargePaymentMethodDetailsOXXO `json:"oxxo"` P24 *ChargePaymentMethodDetailsP24 `json:"p24"` PayNow *ChargePaymentMethodDetailsPayNow `json:"paynow"` Paypal *ChargePaymentMethodDetailsPaypal `json:"paypal"` Pix *ChargePaymentMethodDetailsPix `json:"pix"` PromptPay *ChargePaymentMethodDetailsPromptPay `json:"promptpay"` SEPACreditTransfer *ChargePaymentMethodDetailsSEPACreditTransfer `json:"sepa_credit_transfer"` SEPADebit *ChargePaymentMethodDetailsSEPADebit `json:"sepa_debit"` Sofort *ChargePaymentMethodDetailsSofort `json:"sofort"` StripeAccount *ChargePaymentMethodDetailsStripeAccount `json:"stripe_account"` // The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. // An additional hash is included on `payment_method_details` with a name matching this value. // It contains information specific to the payment method. Type ChargePaymentMethodDetailsType `json:"type"` USBankAccount *ChargePaymentMethodDetailsUSBankAccount `json:"us_bank_account"` WeChat *ChargePaymentMethodDetailsWeChat `json:"wechat"` WeChatPay *ChargePaymentMethodDetailsWeChatPay `json:"wechat_pay"` Zip *ChargePaymentMethodDetailsZip `json:"zip"` }
Details about the payment method at the time of the transaction.
type ChargePaymentMethodDetailsACHCreditTransfer ¶
type ChargePaymentMethodDetailsACHCreditTransfer struct { // Account number to transfer funds to. AccountNumber string `json:"account_number"` // Name of the bank associated with the routing number. BankName string `json:"bank_name"` // Routing transit number for the bank account to transfer funds to. RoutingNumber string `json:"routing_number"` // SWIFT code of the bank associated with the routing number. SwiftCode string `json:"swift_code"` }
type ChargePaymentMethodDetailsACHDebit ¶
type ChargePaymentMethodDetailsACHDebit struct { // Type of entity that holds the account. This can be either `individual` or `company`. AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"` // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Two-letter ISO code representing the country the bank account is located in. Country string `json:"country"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four digits of the bank account number. Last4 string `json:"last4"` // Routing transit number of the bank account. RoutingNumber string `json:"routing_number"` }
type ChargePaymentMethodDetailsACSSDebit ¶
type ChargePaymentMethodDetailsACSSDebit struct { // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Institution number of the bank account InstitutionNumber string `json:"institution_number"` // Last four digits of the bank account number. Last4 string `json:"last4"` // ID of the mandate used to make this payment. Mandate string `json:"mandate"` // Transit number of the bank account. TransitNumber string `json:"transit_number"` }
type ChargePaymentMethodDetailsAUBECSDebit ¶
type ChargePaymentMethodDetailsAUBECSDebit struct { // Bank-State-Branch number of the bank account. BSBNumber string `json:"bsb_number"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four digits of the bank account number. Last4 string `json:"last4"` // ID of the mandate used to make this payment. Mandate string `json:"mandate"` }
type ChargePaymentMethodDetailsAffirm ¶
type ChargePaymentMethodDetailsAffirm struct{}
type ChargePaymentMethodDetailsAlipay ¶
type ChargePaymentMethodDetailsAlipay struct { // Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. BuyerID string `json:"buyer_id"` // Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. Fingerprint string `json:"fingerprint"` // Transaction ID of this particular Alipay transaction. TransactionID string `json:"transaction_id"` }
type ChargePaymentMethodDetailsBACSDebit ¶
type ChargePaymentMethodDetailsBACSDebit struct { // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four digits of the bank account number. Last4 string `json:"last4"` // ID of the mandate used to make this payment. Mandate string `json:"mandate"` // Sort code of the bank account. (e.g., `10-20-30`) SortCode string `json:"sort_code"` }
type ChargePaymentMethodDetailsBLIK ¶
type ChargePaymentMethodDetailsBLIK struct{}
type ChargePaymentMethodDetailsBancontact ¶
type ChargePaymentMethodDetailsBancontact struct { // Bank code of bank associated with the bank account. BankCode string `json:"bank_code"` // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Bank Identifier Code of the bank associated with the bank account. BIC string `json:"bic"` // The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"` // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"` // Last four characters of the IBAN. IBANLast4 string `json:"iban_last4"` // Preferred language of the Bancontact authorization page that the customer is redirected to. // Can be one of `en`, `de`, `fr`, or `nl` PreferredLanguage string `json:"preferred_language"` // 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. VerifiedName string `json:"verified_name"` }
type ChargePaymentMethodDetailsBoleto ¶
type ChargePaymentMethodDetailsBoleto struct { // The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) TaxID string `json:"tax_id"` }
type ChargePaymentMethodDetailsCard ¶
type ChargePaymentMethodDetailsCard struct { // The authorized amount. AmountAuthorized int64 `json:"amount_authorized"` // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand PaymentMethodCardBrand `json:"brand"` // Check results by Card networks on Card address and CVC at time of payment. Checks *ChargePaymentMethodDetailsCardChecks `json:"checks"` // 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 `json:"country"` // Two-digit number representing the card's expiration month. ExpMonth int64 `json:"exp_month"` // Four-digit number representing the card's expiration year. ExpYear int64 `json:"exp_year"` ExtendedAuthorization *ChargePaymentMethodDetailsCardExtendedAuthorization `json:"extended_authorization"` // 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 `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding CardFunding `json:"funding"` IncrementalAuthorization *ChargePaymentMethodDetailsCardIncrementalAuthorization `json:"incremental_authorization"` // Installment details for this payment (Mexico only). // // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). Installments *ChargePaymentMethodDetailsCardInstallments `json:"installments"` // The last four digits of the card. Last4 string `json:"last4"` // ID of the mandate used to make this payment or created by it. Mandate string `json:"mandate"` // True if this payment was marked as MOTO and out of scope for SCA. MOTO bool `json:"moto"` Multicapture *ChargePaymentMethodDetailsCardMulticapture `json:"multicapture"` // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network ChargePaymentMethodDetailsCardNetwork `json:"network"` // If this card has network token credentials, this contains the details of the network token credentials. NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"` Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` // Populated if this transaction used 3D Secure authentication. ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"` // If this Card is part of a card wallet, this contains the details of the card wallet. Wallet *ChargePaymentMethodDetailsCardWallet `json:"wallet"` // Please note that the fields below are for internal use only and are not returned // as part of standard API requests. // 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 `json:"description"` // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) IIN string `json:"iin"` // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) Issuer string `json:"issuer"` }
type ChargePaymentMethodDetailsCardChecks ¶
type ChargePaymentMethodDetailsCardChecks struct { // If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. AddressLine1Check ChargePaymentMethodDetailsCardChecksAddressLine1Check `json:"address_line1_check"` // If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. AddressPostalCodeCheck ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck `json:"address_postal_code_check"` // If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. CVCCheck ChargePaymentMethodDetailsCardChecksCVCCheck `json:"cvc_check"` }
Check results by Card networks on Card address and CVC at time of payment.
type ChargePaymentMethodDetailsCardChecksAddressLine1Check ¶
type ChargePaymentMethodDetailsCardChecksAddressLine1Check string
If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
const ( ChargePaymentMethodDetailsCardChecksAddressLine1CheckFail ChargePaymentMethodDetailsCardChecksAddressLine1Check = "fail" ChargePaymentMethodDetailsCardChecksAddressLine1CheckPass ChargePaymentMethodDetailsCardChecksAddressLine1Check = "pass" ChargePaymentMethodDetailsCardChecksAddressLine1CheckUnchecked ChargePaymentMethodDetailsCardChecksAddressLine1Check = "unchecked" )
List of values that ChargePaymentMethodDetailsCardChecksAddressLine1Check can take
type ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck ¶
type ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck string
If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
const ( ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckFail ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "fail" ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckPass ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "pass" ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckUnchecked ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "unchecked" )
List of values that ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck can take
type ChargePaymentMethodDetailsCardChecksCVCCheck ¶
type ChargePaymentMethodDetailsCardChecksCVCCheck string
If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
const ( ChargePaymentMethodDetailsCardChecksCVCCheckFail ChargePaymentMethodDetailsCardChecksCVCCheck = "fail" ChargePaymentMethodDetailsCardChecksCVCCheckPass ChargePaymentMethodDetailsCardChecksCVCCheck = "pass" ChargePaymentMethodDetailsCardChecksCVCCheckUnchecked ChargePaymentMethodDetailsCardChecksCVCCheck = "unchecked" )
List of values that ChargePaymentMethodDetailsCardChecksCVCCheck can take
type ChargePaymentMethodDetailsCardExtendedAuthorization ¶ added in v75.9.0
type ChargePaymentMethodDetailsCardExtendedAuthorization struct { // Indicates whether or not the capture window is extended beyond the standard authorization. Status ChargePaymentMethodDetailsCardExtendedAuthorizationStatus `json:"status"` }
type ChargePaymentMethodDetailsCardExtendedAuthorizationStatus ¶ added in v75.9.0
type ChargePaymentMethodDetailsCardExtendedAuthorizationStatus string
Indicates whether or not the capture window is extended beyond the standard authorization.
const ( ChargePaymentMethodDetailsCardExtendedAuthorizationStatusDisabled ChargePaymentMethodDetailsCardExtendedAuthorizationStatus = "disabled" ChargePaymentMethodDetailsCardExtendedAuthorizationStatusEnabled ChargePaymentMethodDetailsCardExtendedAuthorizationStatus = "enabled" )
List of values that ChargePaymentMethodDetailsCardExtendedAuthorizationStatus can take
type ChargePaymentMethodDetailsCardIncrementalAuthorization ¶ added in v75.9.0
type ChargePaymentMethodDetailsCardIncrementalAuthorization struct { // Indicates whether or not the incremental authorization feature is supported. Status ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus `json:"status"` }
type ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus ¶ added in v75.9.0
type ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus string
Indicates whether or not the incremental authorization feature is supported.
const ( ChargePaymentMethodDetailsCardIncrementalAuthorizationStatusAvailable ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus = "available" )
List of values that ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus can take
type ChargePaymentMethodDetailsCardInstallments ¶
type ChargePaymentMethodDetailsCardInstallments struct { // Installment plan selected for the payment. Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"` }
Installment details for this payment (Mexico only).
For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
type ChargePaymentMethodDetailsCardMulticapture ¶ added in v75.9.0
type ChargePaymentMethodDetailsCardMulticapture struct { // Indicates whether or not multiple captures are supported. Status ChargePaymentMethodDetailsCardMulticaptureStatus `json:"status"` }
type ChargePaymentMethodDetailsCardMulticaptureStatus ¶ added in v75.9.0
type ChargePaymentMethodDetailsCardMulticaptureStatus string
Indicates whether or not multiple captures are supported.
const ( ChargePaymentMethodDetailsCardMulticaptureStatusAvailable ChargePaymentMethodDetailsCardMulticaptureStatus = "available" )
List of values that ChargePaymentMethodDetailsCardMulticaptureStatus can take
type ChargePaymentMethodDetailsCardNetwork ¶
type ChargePaymentMethodDetailsCardNetwork string
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
const ( ChargePaymentMethodDetailsCardNetworkAmex ChargePaymentMethodDetailsCardNetwork = "amex" ChargePaymentMethodDetailsCardNetworkCartesBancaires ChargePaymentMethodDetailsCardNetwork = "cartes_bancaires" ChargePaymentMethodDetailsCardNetworkDiners ChargePaymentMethodDetailsCardNetwork = "diners" ChargePaymentMethodDetailsCardNetworkDiscover ChargePaymentMethodDetailsCardNetwork = "discover" ChargePaymentMethodDetailsCardNetworkInterac ChargePaymentMethodDetailsCardNetwork = "interac" ChargePaymentMethodDetailsCardNetworkJCB ChargePaymentMethodDetailsCardNetwork = "jcb" ChargePaymentMethodDetailsCardNetworkMastercard ChargePaymentMethodDetailsCardNetwork = "mastercard" ChargePaymentMethodDetailsCardNetworkUnionpay ChargePaymentMethodDetailsCardNetwork = "unionpay" ChargePaymentMethodDetailsCardNetworkVisa ChargePaymentMethodDetailsCardNetwork = "visa" ChargePaymentMethodDetailsCardNetworkUnknown ChargePaymentMethodDetailsCardNetwork = "unknown" )
List of values that ChargePaymentMethodDetailsCardNetwork can take
type ChargePaymentMethodDetailsCardNetworkToken ¶
type ChargePaymentMethodDetailsCardNetworkToken struct { // Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. Used bool `json:"used"` }
If this card has network token credentials, this contains the details of the network token credentials.
type ChargePaymentMethodDetailsCardOvercapture ¶ added in v75.9.0
type ChargePaymentMethodDetailsCardOvercapture struct { // The maximum amount that can be captured. MaximumAmountCapturable int64 `json:"maximum_amount_capturable"` // Indicates whether or not the authorized amount can be over-captured. Status ChargePaymentMethodDetailsCardOvercaptureStatus `json:"status"` }
type ChargePaymentMethodDetailsCardOvercaptureStatus ¶ added in v75.9.0
type ChargePaymentMethodDetailsCardOvercaptureStatus string
Indicates whether or not the authorized amount can be over-captured.
const ( ChargePaymentMethodDetailsCardOvercaptureStatusAvailable ChargePaymentMethodDetailsCardOvercaptureStatus = "available" )
List of values that ChargePaymentMethodDetailsCardOvercaptureStatus can take
type ChargePaymentMethodDetailsCardPresent ¶
type ChargePaymentMethodDetailsCardPresent struct { // The authorized amount AmountAuthorized int64 `json:"amount_authorized"` // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand PaymentMethodCardBrand `json:"brand"` // When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. CaptureBefore int64 `json:"capture_before"` // 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. CardholderName string `json:"cardholder_name"` // 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 `json:"country"` // Authorization response cryptogram. EmvAuthData string `json:"emv_auth_data"` // Two-digit number representing the card's expiration month. ExpMonth int64 `json:"exp_month"` // Four-digit number representing the card's expiration year. ExpYear int64 `json:"exp_year"` // 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 `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding CardFunding `json:"funding"` // 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. GeneratedCard string `json:"generated_card"` // Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). IncrementalAuthorizationSupported bool `json:"incremental_authorization_supported"` // The last four digits of the card. Last4 string `json:"last4"` // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network ChargePaymentMethodDetailsCardPresentNetwork `json:"network"` // Defines whether the authorized amount can be over-captured or not OvercaptureSupported bool `json:"overcapture_supported"` // How card details were read in this transaction. ReadMethod string `json:"read_method"` // A collection of fields required to be displayed on receipts. Only required for EMV transactions. Receipt *ChargePaymentMethodDetailsCardPresentReceipt `json:"receipt"` // Please note that the fields below are for internal use only and are not returned // as part of standard API requests. // 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 `json:"description"` // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) IIN string `json:"iin"` // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) Issuer string `json:"issuer"` }
type ChargePaymentMethodDetailsCardPresentNetwork ¶
type ChargePaymentMethodDetailsCardPresentNetwork string
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
const ( ChargePaymentMethodDetailsCardPresentNetworkAmex ChargePaymentMethodDetailsCardPresentNetwork = "amex" ChargePaymentMethodDetailsCardPresentNetworkCartesBancaires ChargePaymentMethodDetailsCardPresentNetwork = "cartes_bancaires" ChargePaymentMethodDetailsCardPresentNetworkDiners ChargePaymentMethodDetailsCardPresentNetwork = "diners" ChargePaymentMethodDetailsCardPresentNetworkDiscover ChargePaymentMethodDetailsCardPresentNetwork = "discover" ChargePaymentMethodDetailsCardPresentNetworkInterac ChargePaymentMethodDetailsCardPresentNetwork = "interac" ChargePaymentMethodDetailsCardPresentNetworkJCB ChargePaymentMethodDetailsCardPresentNetwork = "jcb" ChargePaymentMethodDetailsCardPresentNetworkMastercard ChargePaymentMethodDetailsCardPresentNetwork = "mastercard" ChargePaymentMethodDetailsCardPresentNetworkUnionpay ChargePaymentMethodDetailsCardPresentNetwork = "unionpay" ChargePaymentMethodDetailsCardPresentNetworkVisa ChargePaymentMethodDetailsCardPresentNetwork = "visa" ChargePaymentMethodDetailsCardPresentNetworkUnknown ChargePaymentMethodDetailsCardPresentNetwork = "unknown" )
List of values that ChargePaymentMethodDetailsCardPresentNetwork can take
type ChargePaymentMethodDetailsCardPresentReceipt ¶
type ChargePaymentMethodDetailsCardPresentReceipt struct { // The type of account being debited or credited AccountType ChargePaymentMethodDetailsCardPresentReceiptAccountType `json:"account_type"` // EMV tag 9F26, cryptogram generated by the integrated circuit chip. ApplicationCryptogram string `json:"application_cryptogram"` // Mnenomic of the Application Identifier. ApplicationPreferredName string `json:"application_preferred_name"` // Identifier for this transaction. AuthorizationCode string `json:"authorization_code"` // EMV tag 8A. A code returned by the card issuer. AuthorizationResponseCode string `json:"authorization_response_code"` // How the cardholder verified ownership of the card. CardholderVerificationMethod string `json:"cardholder_verification_method"` // EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. DedicatedFileName string `json:"dedicated_file_name"` // The outcome of a series of EMV functions performed by the card reader. TerminalVerificationResults string `json:"terminal_verification_results"` // An indication of various EMV functions performed during the transaction. TransactionStatusInformation string `json:"transaction_status_information"` }
A collection of fields required to be displayed on receipts. Only required for EMV transactions.
type ChargePaymentMethodDetailsCardPresentReceiptAccountType ¶
type ChargePaymentMethodDetailsCardPresentReceiptAccountType string
The type of account being debited or credited
const ( ChargePaymentMethodDetailsCardPresentReceiptAccountTypeChecking ChargePaymentMethodDetailsCardPresentReceiptAccountType = "checking" ChargePaymentMethodDetailsCardPresentReceiptAccountTypeCredit ChargePaymentMethodDetailsCardPresentReceiptAccountType = "credit" ChargePaymentMethodDetailsCardPresentReceiptAccountTypePrepaid ChargePaymentMethodDetailsCardPresentReceiptAccountType = "prepaid" ChargePaymentMethodDetailsCardPresentReceiptAccountTypeUnknown ChargePaymentMethodDetailsCardPresentReceiptAccountType = "unknown" )
List of values that ChargePaymentMethodDetailsCardPresentReceiptAccountType can take
type ChargePaymentMethodDetailsCardThreeDSecure ¶
type ChargePaymentMethodDetailsCardThreeDSecure struct { // For authenticated transactions: how the customer was authenticated by // the issuing bank. AuthenticationFlow ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow `json:"authentication_flow"` // Indicates the outcome of 3D Secure authentication. Result ChargePaymentMethodDetailsCardThreeDSecureResult `json:"result"` // Additional information about why 3D Secure succeeded or failed based // on the `result`. ResultReason ChargePaymentMethodDetailsCardThreeDSecureResultReason `json:"result_reason"` // The version of 3D Secure that was used. Version string `json:"version"` }
Populated if this transaction used 3D Secure authentication.
type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow ¶
type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow string
For authenticated transactions: how the customer was authenticated by the issuing bank.
const ( ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowChallenge ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "challenge" ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowFrictionless ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "frictionless" )
List of values that ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow can take
type ChargePaymentMethodDetailsCardThreeDSecureResult ¶
type ChargePaymentMethodDetailsCardThreeDSecureResult string
Indicates the outcome of 3D Secure authentication.
const ( ChargePaymentMethodDetailsCardThreeDSecureResultAttemptAcknowledged ChargePaymentMethodDetailsCardThreeDSecureResult = "attempt_acknowledged" ChargePaymentMethodDetailsCardThreeDSecureResultAuthenticated ChargePaymentMethodDetailsCardThreeDSecureResult = "authenticated" ChargePaymentMethodDetailsCardThreeDSecureResultExempted ChargePaymentMethodDetailsCardThreeDSecureResult = "exempted" ChargePaymentMethodDetailsCardThreeDSecureResultFailed ChargePaymentMethodDetailsCardThreeDSecureResult = "failed" ChargePaymentMethodDetailsCardThreeDSecureResultNotSupported ChargePaymentMethodDetailsCardThreeDSecureResult = "not_supported" ChargePaymentMethodDetailsCardThreeDSecureResultProcessingError ChargePaymentMethodDetailsCardThreeDSecureResult = "processing_error" )
List of values that ChargePaymentMethodDetailsCardThreeDSecureResult can take
type ChargePaymentMethodDetailsCardThreeDSecureResultReason ¶
type ChargePaymentMethodDetailsCardThreeDSecureResultReason string
Additional information about why 3D Secure succeeded or failed based on the `result`.
const ( ChargePaymentMethodDetailsCardThreeDSecureResultReasonAbandoned ChargePaymentMethodDetailsCardThreeDSecureResultReason = "abandoned" ChargePaymentMethodDetailsCardThreeDSecureResultReasonBypassed ChargePaymentMethodDetailsCardThreeDSecureResultReason = "bypassed" ChargePaymentMethodDetailsCardThreeDSecureResultReasonCanceled ChargePaymentMethodDetailsCardThreeDSecureResultReason = "canceled" ChargePaymentMethodDetailsCardThreeDSecureResultReasonCardNotEnrolled ChargePaymentMethodDetailsCardThreeDSecureResultReason = "card_not_enrolled" ChargePaymentMethodDetailsCardThreeDSecureResultReasonNetworkNotSupported ChargePaymentMethodDetailsCardThreeDSecureResultReason = "network_not_supported" ChargePaymentMethodDetailsCardThreeDSecureResultReasonProtocolError ChargePaymentMethodDetailsCardThreeDSecureResultReason = "protocol_error" ChargePaymentMethodDetailsCardThreeDSecureResultReasonRejected ChargePaymentMethodDetailsCardThreeDSecureResultReason = "rejected" )
List of values that ChargePaymentMethodDetailsCardThreeDSecureResultReason can take
type ChargePaymentMethodDetailsCardWallet ¶
type ChargePaymentMethodDetailsCardWallet struct { AmexExpressCheckout *ChargePaymentMethodDetailsCardWalletAmexExpressCheckout `json:"amex_express_checkout"` ApplePay *ChargePaymentMethodDetailsCardWalletApplePay `json:"apple_pay"` // (For tokenized numbers only.) The last four digits of the device account number. DynamicLast4 string `json:"dynamic_last4"` GooglePay *ChargePaymentMethodDetailsCardWalletGooglePay `json:"google_pay"` Link *ChargePaymentMethodDetailsCardWalletLink `json:"link"` Masterpass *ChargePaymentMethodDetailsCardWalletMasterpass `json:"masterpass"` SamsungPay *ChargePaymentMethodDetailsCardWalletSamsungPay `json:"samsung_pay"` // The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. Type PaymentMethodCardWalletType `json:"type"` VisaCheckout *ChargePaymentMethodDetailsCardWalletVisaCheckout `json:"visa_checkout"` }
If this Card is part of a card wallet, this contains the details of the card wallet.
type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout ¶
type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout struct{}
type ChargePaymentMethodDetailsCardWalletApplePay ¶
type ChargePaymentMethodDetailsCardWalletApplePay struct{}
type ChargePaymentMethodDetailsCardWalletGooglePay ¶
type ChargePaymentMethodDetailsCardWalletGooglePay struct{}
type ChargePaymentMethodDetailsCardWalletLink ¶
type ChargePaymentMethodDetailsCardWalletLink struct{}
type ChargePaymentMethodDetailsCardWalletMasterpass ¶
type ChargePaymentMethodDetailsCardWalletMasterpass struct { // Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. BillingAddress *Address `json:"billing_address"` // Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. Email string `json:"email"` // Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. Name string `json:"name"` // Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. ShippingAddress *Address `json:"shipping_address"` }
type ChargePaymentMethodDetailsCardWalletSamsungPay ¶
type ChargePaymentMethodDetailsCardWalletSamsungPay struct{}
type ChargePaymentMethodDetailsCardWalletVisaCheckout ¶
type ChargePaymentMethodDetailsCardWalletVisaCheckout struct { // Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. BillingAddress *Address `json:"billing_address"` // Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. Email string `json:"email"` // Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. Name string `json:"name"` // Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. ShippingAddress *Address `json:"shipping_address"` }
type ChargePaymentMethodDetailsCustomerBalance ¶
type ChargePaymentMethodDetailsCustomerBalance struct{}
type ChargePaymentMethodDetailsEPS ¶
type ChargePaymentMethodDetailsEPS struct { // 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 string `json:"bank"` // 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. VerifiedName string `json:"verified_name"` }
type ChargePaymentMethodDetailsFPX ¶
type ChargePaymentMethodDetailsFPX struct { // Account holder type, if provided. Can be one of `individual` or `company`. AccountHolderType PaymentMethodFPXAccountHolderType `json:"account_holder_type"` // 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 string `json:"bank"` // Unique transaction id generated by FPX for every request from the merchant TransactionID string `json:"transaction_id"` }
type ChargePaymentMethodDetailsGiropay ¶
type ChargePaymentMethodDetailsGiropay struct { // Bank code of bank associated with the bank account. BankCode string `json:"bank_code"` // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Bank Identifier Code of the bank associated with the bank account. BIC string `json:"bic"` // 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. VerifiedName string `json:"verified_name"` }
type ChargePaymentMethodDetailsGrabpay ¶
type ChargePaymentMethodDetailsGrabpay struct { // Unique transaction id generated by GrabPay TransactionID string `json:"transaction_id"` }
type ChargePaymentMethodDetailsIDEAL ¶
type ChargePaymentMethodDetailsIDEAL struct { // The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. Bank string `json:"bank"` // The Bank Identifier Code of the customer's bank. BIC string `json:"bic"` // The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"` // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"` // Last four characters of the IBAN. IBANLast4 string `json:"iban_last4"` // 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. VerifiedName string `json:"verified_name"` }
type ChargePaymentMethodDetailsInteracPresent ¶
type ChargePaymentMethodDetailsInteracPresent struct { // Card brand. Can be `interac`, `mastercard` or `visa`. Brand string `json:"brand"` // 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. CardholderName string `json:"cardholder_name"` // 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 `json:"country"` // Authorization response cryptogram. EmvAuthData string `json:"emv_auth_data"` // Two-digit number representing the card's expiration month. ExpMonth int64 `json:"exp_month"` // Four-digit number representing the card's expiration year. ExpYear int64 `json:"exp_year"` // 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 `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding string `json:"funding"` // 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. GeneratedCard string `json:"generated_card"` // The last four digits of the card. Last4 string `json:"last4"` // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network string `json:"network"` // EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. PreferredLocales []string `json:"preferred_locales"` // How card details were read in this transaction. ReadMethod string `json:"read_method"` // A collection of fields required to be displayed on receipts. Only required for EMV transactions. Receipt *ChargePaymentMethodDetailsInteracPresentReceipt `json:"receipt"` // Please note that the fields below are for internal use only and are not returned // as part of standard API requests. // 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 `json:"description"` // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) IIN string `json:"iin"` // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) Issuer string `json:"issuer"` }
type ChargePaymentMethodDetailsInteracPresentReceipt ¶
type ChargePaymentMethodDetailsInteracPresentReceipt struct { // The type of account being debited or credited AccountType string `json:"account_type"` // EMV tag 9F26, cryptogram generated by the integrated circuit chip. ApplicationCryptogram string `json:"application_cryptogram"` // Mnenomic of the Application Identifier. ApplicationPreferredName string `json:"application_preferred_name"` // Identifier for this transaction. AuthorizationCode string `json:"authorization_code"` // EMV tag 8A. A code returned by the card issuer. AuthorizationResponseCode string `json:"authorization_response_code"` // How the cardholder verified ownership of the card. CardholderVerificationMethod string `json:"cardholder_verification_method"` // EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. DedicatedFileName string `json:"dedicated_file_name"` // The outcome of a series of EMV functions performed by the card reader. TerminalVerificationResults string `json:"terminal_verification_results"` // An indication of various EMV functions performed during the transaction. TransactionStatusInformation string `json:"transaction_status_information"` }
A collection of fields required to be displayed on receipts. Only required for EMV transactions.
type ChargePaymentMethodDetailsKlarna ¶
type ChargePaymentMethodDetailsKlarna struct { // The Klarna payment method used for this transaction. // Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` PaymentMethodCategory ChargePaymentMethodDetailsKlarnaPaymentMethodCategory `json:"payment_method_category"` // Preferred language of the Klarna authorization page that the customer is redirected to. // Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` PreferredLocale string `json:"preferred_locale"` }
type ChargePaymentMethodDetailsKlarnaPaymentMethodCategory ¶
type ChargePaymentMethodDetailsKlarnaPaymentMethodCategory string
The Klarna payment method used for this transaction. Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
const ( ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayLater ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_later" ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayNow ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_now" ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayWithFinancing ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_with_financing" ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayInInstallments ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_in_installments" )
List of values that ChargePaymentMethodDetailsKlarnaPaymentMethodCategory can take
type ChargePaymentMethodDetailsKonbini ¶
type ChargePaymentMethodDetailsKonbini struct { // If the payment succeeded, this contains the details of the convenience store where the payment was completed. Store *ChargePaymentMethodDetailsKonbiniStore `json:"store"` }
type ChargePaymentMethodDetailsKonbiniStore ¶
type ChargePaymentMethodDetailsKonbiniStore struct { // The name of the convenience store chain where the payment was completed. Chain ChargePaymentMethodDetailsKonbiniStoreChain `json:"chain"` }
If the payment succeeded, this contains the details of the convenience store where the payment was completed.
type ChargePaymentMethodDetailsKonbiniStoreChain ¶
type ChargePaymentMethodDetailsKonbiniStoreChain string
The name of the convenience store chain where the payment was completed.
const ( ChargePaymentMethodDetailsKonbiniStoreChainFamilyMart ChargePaymentMethodDetailsKonbiniStoreChain = "familymart" ChargePaymentMethodDetailsKonbiniStoreChainLawson ChargePaymentMethodDetailsKonbiniStoreChain = "lawson" ChargePaymentMethodDetailsKonbiniStoreChainMinistop ChargePaymentMethodDetailsKonbiniStoreChain = "ministop" ChargePaymentMethodDetailsKonbiniStoreChainSeicomart ChargePaymentMethodDetailsKonbiniStoreChain = "seicomart" )
List of values that ChargePaymentMethodDetailsKonbiniStoreChain can take
type ChargePaymentMethodDetailsLink ¶
type ChargePaymentMethodDetailsLink struct { // Two-letter ISO code representing the funding source country beneath the Link payment. // You could use this attribute to get a sense of international fees. Country string `json:"country"` }
type ChargePaymentMethodDetailsOXXO ¶
type ChargePaymentMethodDetailsOXXO struct { // OXXO reference number Number string `json:"number"` }
type ChargePaymentMethodDetailsP24 ¶
type ChargePaymentMethodDetailsP24 struct { // The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. Bank string `json:"bank"` // Unique reference for this Przelewy24 payment. Reference string `json:"reference"` // Owner's verified full name. Values are verified or provided by Przelewy24 directly // (if supported) at the time of authorization or settlement. They cannot be set or mutated. // Przelewy24 rarely provides this information so the attribute is usually empty. VerifiedName string `json:"verified_name"` }
type ChargePaymentMethodDetailsPayNow ¶
type ChargePaymentMethodDetailsPayNow struct { // Reference number associated with this PayNow payment Reference string `json:"reference"` }
type ChargePaymentMethodDetailsPaypal ¶
type ChargePaymentMethodDetailsPaypal struct { // Owner's email. Values are provided by PayPal directly // (if supported) at the time of authorization or settlement. They cannot be set or mutated. PayerEmail string `json:"payer_email"` // PayPal account PayerID. This identifier uniquely identifies the PayPal customer. PayerID string `json:"payer_id"` // Owner's full name. Values provided by PayPal directly // (if supported) at the time of authorization or settlement. They cannot be set or mutated. PayerName string `json:"payer_name"` // The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. SellerProtection *ChargePaymentMethodDetailsPaypalSellerProtection `json:"seller_protection"` // A unique ID generated by PayPal for this transaction. TransactionID string `json:"transaction_id"` }
type ChargePaymentMethodDetailsPaypalSellerProtection ¶
type ChargePaymentMethodDetailsPaypalSellerProtection struct { // An array of conditions that are covered for the transaction, if applicable. DisputeCategories []ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory `json:"dispute_categories"` // Indicates whether the transaction is eligible for PayPal's seller protection. Status ChargePaymentMethodDetailsPaypalSellerProtectionStatus `json:"status"` }
The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.
type ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory ¶
type ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory string
An array of conditions that are covered for the transaction, if applicable.
const ( ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategoryFraudulent ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory = "fraudulent" ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategoryProductNotReceived ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory = "product_not_received" )
List of values that ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory can take
type ChargePaymentMethodDetailsPaypalSellerProtectionStatus ¶
type ChargePaymentMethodDetailsPaypalSellerProtectionStatus string
Indicates whether the transaction is eligible for PayPal's seller protection.
const ( ChargePaymentMethodDetailsPaypalSellerProtectionStatusEligible ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "eligible" ChargePaymentMethodDetailsPaypalSellerProtectionStatusNotEligible ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "not_eligible" ChargePaymentMethodDetailsPaypalSellerProtectionStatusPartiallyEligible ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "partially_eligible" )
List of values that ChargePaymentMethodDetailsPaypalSellerProtectionStatus can take
type ChargePaymentMethodDetailsPix ¶
type ChargePaymentMethodDetailsPix struct { // Unique transaction id generated by BCB BankTransactionID string `json:"bank_transaction_id"` }
type ChargePaymentMethodDetailsPromptPay ¶
type ChargePaymentMethodDetailsPromptPay struct { // Bill reference generated by PromptPay Reference string `json:"reference"` }
type ChargePaymentMethodDetailsSEPACreditTransfer ¶
type ChargePaymentMethodDetailsSEPACreditTransfer struct { // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Bank Identifier Code of the bank associated with the bank account. BIC string `json:"bic"` // IBAN of the bank account to transfer funds to. IBAN string `json:"iban"` }
type ChargePaymentMethodDetailsSEPADebit ¶
type ChargePaymentMethodDetailsSEPADebit struct { // Bank code of bank associated with the bank account. BankCode string `json:"bank_code"` // Branch code of bank associated with the bank account. BranchCode string `json:"branch_code"` // Two-letter ISO code representing the country the bank account is located in. Country string `json:"country"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four characters of the IBAN. Last4 string `json:"last4"` // ID of the mandate used to make this payment. Mandate string `json:"mandate"` }
type ChargePaymentMethodDetailsSofort ¶
type ChargePaymentMethodDetailsSofort struct { // Bank code of bank associated with the bank account. BankCode string `json:"bank_code"` // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Bank Identifier Code of the bank associated with the bank account. BIC string `json:"bic"` // Two-letter ISO code representing the country the bank account is located in. Country string `json:"country"` // The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"` // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"` // Last four characters of the IBAN. IBANLast4 string `json:"iban_last4"` // Preferred language of the SOFORT authorization page that the customer is redirected to. // Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` PreferredLanguage string `json:"preferred_language"` // Owner's verified full name. Values are verified or provided by SOFORT directly // (if supported) at the time of authorization or settlement. They cannot be set or mutated. VerifiedName string `json:"verified_name"` }
type ChargePaymentMethodDetailsStripeAccount ¶
type ChargePaymentMethodDetailsStripeAccount struct{}
type ChargePaymentMethodDetailsType ¶
type ChargePaymentMethodDetailsType string
The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. An additional hash is included on `payment_method_details` with a name matching this value. It contains information specific to the payment method.
const ( ChargePaymentMethodDetailsTypeACHCreditTransfer ChargePaymentMethodDetailsType = "ach_credit_transfer" ChargePaymentMethodDetailsTypeACHDebit ChargePaymentMethodDetailsType = "ach_debit" ChargePaymentMethodDetailsTypeACSSDebit ChargePaymentMethodDetailsType = "acss_debit" ChargePaymentMethodDetailsTypeAlipay ChargePaymentMethodDetailsType = "alipay" ChargePaymentMethodDetailsTypeAUBECSDebit ChargePaymentMethodDetailsType = "au_becs_debit" ChargePaymentMethodDetailsTypeBACSDebit ChargePaymentMethodDetailsType = "bacs_debit" ChargePaymentMethodDetailsTypeBancontact ChargePaymentMethodDetailsType = "bancontact" ChargePaymentMethodDetailsTypeCard ChargePaymentMethodDetailsType = "card" ChargePaymentMethodDetailsTypeCardPresent ChargePaymentMethodDetailsType = "card_present" ChargePaymentMethodDetailsTypeEPS ChargePaymentMethodDetailsType = "eps" ChargePaymentMethodDetailsTypeFPX ChargePaymentMethodDetailsType = "fpx" ChargePaymentMethodDetailsTypeGiropay ChargePaymentMethodDetailsType = "giropay" ChargePaymentMethodDetailsTypeGrabpay ChargePaymentMethodDetailsType = "grabpay" ChargePaymentMethodDetailsTypeIDEAL ChargePaymentMethodDetailsType = "ideal" ChargePaymentMethodDetailsTypeInteracPresent ChargePaymentMethodDetailsType = "interac_present" ChargePaymentMethodDetailsTypeKlarna ChargePaymentMethodDetailsType = "klarna" ChargePaymentMethodDetailsTypeMultibanco ChargePaymentMethodDetailsType = "multibanco" ChargePaymentMethodDetailsTypeP24 ChargePaymentMethodDetailsType = "p24" ChargePaymentMethodDetailsTypeSEPADebit ChargePaymentMethodDetailsType = "sepa_debit" ChargePaymentMethodDetailsTypeSofort ChargePaymentMethodDetailsType = "sofort" ChargePaymentMethodDetailsTypeStripeAccount ChargePaymentMethodDetailsType = "stripe_account" ChargePaymentMethodDetailsTypeWeChat ChargePaymentMethodDetailsType = "wechat" )
List of values that ChargePaymentMethodDetailsType can take
type ChargePaymentMethodDetailsUSBankAccount ¶
type ChargePaymentMethodDetailsUSBankAccount struct { // Account holder type: individual or company. AccountHolderType ChargePaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"` // Account type: checkings or savings. Defaults to checking if omitted. AccountType ChargePaymentMethodDetailsUSBankAccountAccountType `json:"account_type"` // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four digits of the bank account number. Last4 string `json:"last4"` // Routing number of the bank account. RoutingNumber string `json:"routing_number"` }
type ChargePaymentMethodDetailsUSBankAccountAccountHolderType ¶
type ChargePaymentMethodDetailsUSBankAccountAccountHolderType string
Account holder type: individual or company.
const ( ChargePaymentMethodDetailsUSBankAccountAccountHolderTypeCompany ChargePaymentMethodDetailsUSBankAccountAccountHolderType = "company" ChargePaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual ChargePaymentMethodDetailsUSBankAccountAccountHolderType = "individual" )
List of values that ChargePaymentMethodDetailsUSBankAccountAccountHolderType can take
type ChargePaymentMethodDetailsUSBankAccountAccountType ¶
type ChargePaymentMethodDetailsUSBankAccountAccountType string
Account type: checkings or savings. Defaults to checking if omitted.
const ( ChargePaymentMethodDetailsUSBankAccountAccountTypeChecking ChargePaymentMethodDetailsUSBankAccountAccountType = "checking" ChargePaymentMethodDetailsUSBankAccountAccountTypeSavings ChargePaymentMethodDetailsUSBankAccountAccountType = "savings" )
List of values that ChargePaymentMethodDetailsUSBankAccountAccountType can take
type ChargePaymentMethodDetailsWeChat ¶
type ChargePaymentMethodDetailsWeChat struct{}
type ChargePaymentMethodDetailsWeChatPay ¶
type ChargePaymentMethodDetailsWeChatPay struct { // Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. Fingerprint string `json:"fingerprint"` // Transaction ID of this particular WeChat Pay transaction. TransactionID string `json:"transaction_id"` }
type ChargePaymentMethodDetailsZip ¶
type ChargePaymentMethodDetailsZip struct{}
type ChargeRadarOptions ¶
type ChargeRadarOptions struct { // 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. Session string `json:"session"` }
Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
type ChargeRadarOptionsParams ¶
type ChargeRadarOptionsParams struct { // 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. Session *string `form:"session"` }
Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
type ChargeSearchParams ¶
type ChargeSearchParams struct { SearchParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. Page *string `form:"page"` }
Search for charges you've previously created using Stripe's [Search Query Language](https://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.
func (*ChargeSearchParams) AddExpand ¶
func (p *ChargeSearchParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ChargeSearchResult ¶
type ChargeSearchResult struct { APIResource SearchMeta Data []*Charge `json:"data"` }
ChargeSearchResult is a list of Charge search results as retrieved from a search endpoint.
type ChargeStatus ¶
type ChargeStatus string
The status of the payment is either `succeeded`, `pending`, or `failed`.
const ( ChargeStatusFailed ChargeStatus = "failed" ChargeStatusPending ChargeStatus = "pending" ChargeStatusSucceeded ChargeStatus = "succeeded" )
List of values that ChargeStatus can take
type ChargeTransferData ¶
type ChargeTransferData struct { // The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. Amount int64 `json:"amount"` // ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. Destination *Account `json:"destination"` }
An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
type ChargeTransferDataParams ¶
type ChargeTransferDataParams struct { // The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. Amount *int64 `form:"amount"` // This parameter can only be used on Charge creation. // ID of an existing, connected Stripe account. Destination *string `form:"destination"` }
An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
type CheckoutSession ¶
type CheckoutSession struct { APIResource // When set, provides configuration for actions to take if this Checkout Session expires. AfterExpiration *CheckoutSessionAfterExpiration `json:"after_expiration"` // Enables user redeemable promotion codes. AllowPromotionCodes bool `json:"allow_promotion_codes"` // Total of all items before discounts or taxes are applied. AmountSubtotal int64 `json:"amount_subtotal"` // Total of all items after discounts and taxes are applied. AmountTotal int64 `json:"amount_total"` AutomaticTax *CheckoutSessionAutomaticTax `json:"automatic_tax"` // Describes whether Checkout should collect the customer's billing address. BillingAddressCollection CheckoutSessionBillingAddressCollection `json:"billing_address_collection"` // If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. CancelURL string `json:"cancel_url"` // A unique string to reference the Checkout Session. This can be a // customer ID, a cart ID, or similar, and can be used to reconcile the // Session with your internal systems. ClientReferenceID string `json:"client_reference_id"` // Client secret to be used when initializing Stripe.js embedded checkout. ClientSecret string `json:"client_secret"` // Results of `consent_collection` for this session. Consent *CheckoutSessionConsent `json:"consent"` // When set, provides configuration for the Checkout Session to gather active consent from customers. ConsentCollection *CheckoutSessionConsentCollection `json:"consent_collection"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // Currency conversion details for automatic currency conversion sessions CurrencyConversion *CheckoutSessionCurrencyConversion `json:"currency_conversion"` // The ID of the customer for this Session. // For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout // will create a new customer object based on information provided // during the payment flow unless an existing customer was provided when // the Session was created. Customer *Customer `json:"customer"` // Configure whether a Checkout Session creates a Customer when the Checkout Session completes. CustomerCreation CheckoutSessionCustomerCreation `json:"customer_creation"` // The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. CustomerDetails *CheckoutSessionCustomerDetails `json:"customer_details"` // If provided, this value will be used when the Customer object is created. // If not provided, customers will be asked to enter their email address. // Use this parameter to prefill customer data if you already have an email // on file. To access information about the customer once the payment flow is // complete, use the `customer` attribute. CustomerEmail string `json:"customer_email"` // Collect additional information from your customer using custom fields. Up to 2 fields are supported. CustomFields []*CheckoutSessionCustomField `json:"custom_fields"` CustomText *CheckoutSessionCustomText `json:"custom_text"` // The timestamp at which the Checkout Session will expire. ExpiresAt int64 `json:"expires_at"` // Unique identifier for the object. ID string `json:"id"` // ID of the invoice created by the Checkout Session, if it exists. Invoice *Invoice `json:"invoice"` // Details on the state of invoice creation for the Checkout Session. InvoiceCreation *CheckoutSessionInvoiceCreation `json:"invoice_creation"` // The line items purchased by the customer. LineItems *LineItemList `json:"line_items"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. Locale string `json:"locale"` // 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. Metadata map[string]string `json:"metadata"` // The mode of the Checkout Session. Mode CheckoutSessionMode `json:"mode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The ID of the PaymentIntent for Checkout Sessions in `payment` mode. PaymentIntent *PaymentIntent `json:"payment_intent"` // The ID of the Payment Link that created this Session. PaymentLink *PaymentLink `json:"payment_link"` // Configure whether a Checkout Session should collect a payment method. PaymentMethodCollection CheckoutSessionPaymentMethodCollection `json:"payment_method_collection"` // Information about the payment method configuration used for this Checkout session if using dynamic payment methods. PaymentMethodConfigurationDetails *CheckoutSessionPaymentMethodConfigurationDetails `json:"payment_method_configuration_details"` // Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. PaymentMethodOptions *CheckoutSessionPaymentMethodOptions `json:"payment_method_options"` // A list of the types of payment methods (e.g. card) this Checkout // Session is allowed to accept. PaymentMethodTypes []string `json:"payment_method_types"` // The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. // You can use this value to decide when to fulfill your customer's order. PaymentStatus CheckoutSessionPaymentStatus `json:"payment_status"` PhoneNumberCollection *CheckoutSessionPhoneNumberCollection `json:"phone_number_collection"` // The ID of the original expired Checkout Session that triggered the recovery flow. RecoveredFrom string `json:"recovered_from"` // Applies to Checkout Sessions with `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method. RedirectOnCompletion CheckoutSessionRedirectOnCompletion `json:"redirect_on_completion"` // Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. ReturnURL string `json:"return_url"` // The ID of the SetupIntent for Checkout Sessions in `setup` mode. SetupIntent *SetupIntent `json:"setup_intent"` // When set, provides configuration for Checkout to collect a shipping address from a customer. ShippingAddressCollection *CheckoutSessionShippingAddressCollection `json:"shipping_address_collection"` // The details of the customer cost of shipping, including the customer chosen ShippingRate. ShippingCost *CheckoutSessionShippingCost `json:"shipping_cost"` // Shipping information for this Checkout Session. ShippingDetails *ShippingDetails `json:"shipping_details"` // The shipping rate options applied to this Session. ShippingOptions []*CheckoutSessionShippingOption `json:"shipping_options"` // The status of the Checkout Session, one of `open`, `complete`, or `expired`. Status CheckoutSessionStatus `json:"status"` // Describes the type of transaction being performed by Checkout in order to customize // relevant text on the page, such as the submit button. `submit_type` can only be // specified on Checkout Sessions in `payment` mode, but not Checkout Sessions // in `subscription` or `setup` mode. SubmitType CheckoutSessionSubmitType `json:"submit_type"` // The ID of the subscription for Checkout Sessions in `subscription` mode. Subscription *Subscription `json:"subscription"` // The URL the customer will be directed to after the payment or // subscription creation is successful. SuccessURL string `json:"success_url"` TaxIDCollection *CheckoutSessionTaxIDCollection `json:"tax_id_collection"` // Tax and discount details for the computed total amount. TotalDetails *CheckoutSessionTotalDetails `json:"total_details"` // The UI mode of the Session. Can be `hosted` (default) or `embedded`. UIMode CheckoutSessionUIMode `json:"ui_mode"` // The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you're using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it'll use `checkout.stripe.com.` // This value is only present when the session is active. URL string `json:"url"` }
A Checkout Session represents your customer's session as they pay for one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a new Session each time your customer attempts to pay.
Once payment is successful, the Checkout Session will contain a reference to the Customer(https://stripe.com/docs/api/customers), and either the successful PaymentIntent(https://stripe.com/docs/api/payment_intents) or an active Subscription(https://stripe.com/docs/api/subscriptions).
You can create a Checkout Session on your server and redirect to its URL to begin Checkout.
Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)
type CheckoutSessionAfterExpiration ¶
type CheckoutSessionAfterExpiration struct { // When set, configuration used to recover the Checkout Session on expiry. Recovery *CheckoutSessionAfterExpirationRecovery `json:"recovery"` }
When set, provides configuration for actions to take if this Checkout Session expires.
type CheckoutSessionAfterExpirationParams ¶
type CheckoutSessionAfterExpirationParams struct { // Configure a Checkout Session that can be used to recover an expired session. Recovery *CheckoutSessionAfterExpirationRecoveryParams `form:"recovery"` }
Configure actions after a Checkout Session has expired.
type CheckoutSessionAfterExpirationRecovery ¶
type CheckoutSessionAfterExpirationRecovery struct { // Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` AllowPromotionCodes bool `json:"allow_promotion_codes"` // If `true`, a recovery url will be generated to recover this Checkout Session if it // expires before a transaction is completed. It will be attached to the // Checkout Session object upon expiration. Enabled bool `json:"enabled"` // The timestamp at which the recovery URL will expire. ExpiresAt int64 `json:"expires_at"` // URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session URL string `json:"url"` }
When set, configuration used to recover the Checkout Session on expiry.
type CheckoutSessionAfterExpirationRecoveryParams ¶
type CheckoutSessionAfterExpirationRecoveryParams struct { // Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` AllowPromotionCodes *bool `form:"allow_promotion_codes"` // If `true`, a recovery URL will be generated to recover this Checkout Session if it // expires before a successful transaction is completed. It will be attached to the // Checkout Session object upon expiration. Enabled *bool `form:"enabled"` }
Configure a Checkout Session that can be used to recover an expired session.
type CheckoutSessionAutomaticTax ¶
type CheckoutSessionAutomaticTax struct { // Indicates whether automatic tax is enabled for the session Enabled bool `json:"enabled"` // The status of the most recent automated tax calculation for this session. Status CheckoutSessionAutomaticTaxStatus `json:"status"` }
type CheckoutSessionAutomaticTaxParams ¶
type CheckoutSessionAutomaticTaxParams struct { // Set to true to enable automatic taxes. Enabled *bool `form:"enabled"` }
Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
type CheckoutSessionAutomaticTaxStatus ¶
type CheckoutSessionAutomaticTaxStatus string
The status of the most recent automated tax calculation for this session.
const ( CheckoutSessionAutomaticTaxStatusComplete CheckoutSessionAutomaticTaxStatus = "complete" CheckoutSessionAutomaticTaxStatusFailed CheckoutSessionAutomaticTaxStatus = "failed" CheckoutSessionAutomaticTaxStatusRequiresLocationInputs CheckoutSessionAutomaticTaxStatus = "requires_location_inputs" )
List of values that CheckoutSessionAutomaticTaxStatus can take
type CheckoutSessionBillingAddressCollection ¶
type CheckoutSessionBillingAddressCollection string
Describes whether Checkout should collect the customer's billing address.
const ( CheckoutSessionBillingAddressCollectionAuto CheckoutSessionBillingAddressCollection = "auto" CheckoutSessionBillingAddressCollectionRequired CheckoutSessionBillingAddressCollection = "required" )
List of values that CheckoutSessionBillingAddressCollection can take
type CheckoutSessionConsent ¶
type CheckoutSessionConsent struct { // If `opt_in`, the customer consents to receiving promotional communications // from the merchant about this Checkout Session. Promotions CheckoutSessionConsentPromotions `json:"promotions"` // If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. TermsOfService CheckoutSessionConsentTermsOfService `json:"terms_of_service"` }
Results of `consent_collection` for this session.
type CheckoutSessionConsentCollection ¶
type CheckoutSessionConsentCollection struct { // If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout // Session will determine whether to display an option to opt into promotional communication // from the merchant depending on the customer's locale. Only available to US merchants. Promotions CheckoutSessionConsentCollectionPromotions `json:"promotions"` // If set to `required`, it requires customers to accept the terms of service before being able to pay. TermsOfService CheckoutSessionConsentCollectionTermsOfService `json:"terms_of_service"` }
When set, provides configuration for the Checkout Session to gather active consent from customers.
type CheckoutSessionConsentCollectionParams ¶
type CheckoutSessionConsentCollectionParams struct { // If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout // Session will determine whether to display an option to opt into promotional communication // from the merchant depending on the customer's locale. Only available to US merchants. Promotions *string `form:"promotions"` // If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. // There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). TermsOfService *string `form:"terms_of_service"` }
Configure fields for the Checkout Session to gather active consent from customers.
type CheckoutSessionConsentCollectionPromotions ¶
type CheckoutSessionConsentCollectionPromotions string
If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale. Only available to US merchants.
const ( CheckoutSessionConsentCollectionPromotionsAuto CheckoutSessionConsentCollectionPromotions = "auto" CheckoutSessionConsentCollectionPromotionsNone CheckoutSessionConsentCollectionPromotions = "none" )
List of values that CheckoutSessionConsentCollectionPromotions can take
type CheckoutSessionConsentCollectionTermsOfService ¶
type CheckoutSessionConsentCollectionTermsOfService string
If set to `required`, it requires customers to accept the terms of service before being able to pay.
const ( CheckoutSessionConsentCollectionTermsOfServiceNone CheckoutSessionConsentCollectionTermsOfService = "none" CheckoutSessionConsentCollectionTermsOfServiceRequired CheckoutSessionConsentCollectionTermsOfService = "required" )
List of values that CheckoutSessionConsentCollectionTermsOfService can take
type CheckoutSessionConsentPromotions ¶
type CheckoutSessionConsentPromotions string
If `opt_in`, the customer consents to receiving promotional communications from the merchant about this Checkout Session.
const ( CheckoutSessionConsentPromotionsOptIn CheckoutSessionConsentPromotions = "opt_in" CheckoutSessionConsentPromotionsOptOut CheckoutSessionConsentPromotions = "opt_out" )
List of values that CheckoutSessionConsentPromotions can take
type CheckoutSessionConsentTermsOfService ¶
type CheckoutSessionConsentTermsOfService string
If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.
const (
CheckoutSessionConsentTermsOfServiceAccepted CheckoutSessionConsentTermsOfService = "accepted"
)
List of values that CheckoutSessionConsentTermsOfService can take
type CheckoutSessionCurrencyConversion ¶
type CheckoutSessionCurrencyConversion struct { // Total of all items in source currency before discounts or taxes are applied. AmountSubtotal int64 `json:"amount_subtotal"` // Total of all items in source currency after discounts and taxes are applied. AmountTotal int64 `json:"amount_total"` // Exchange rate used to convert source currency amounts to customer currency amounts FxRate float64 `json:"fx_rate,string"` // Creation currency of the CheckoutSession before localization SourceCurrency Currency `json:"source_currency"` }
Currency conversion details for automatic currency conversion sessions
type CheckoutSessionCustomField ¶
type CheckoutSessionCustomField struct { Dropdown *CheckoutSessionCustomFieldDropdown `json:"dropdown"` // String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. Key string `json:"key"` Label *CheckoutSessionCustomFieldLabel `json:"label"` Numeric *CheckoutSessionCustomFieldNumeric `json:"numeric"` // Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. Optional bool `json:"optional"` Text *CheckoutSessionCustomFieldText `json:"text"` // The type of the field. Type CheckoutSessionCustomFieldType `json:"type"` }
Collect additional information from your customer using custom fields. Up to 2 fields are supported.
type CheckoutSessionCustomFieldDropdown ¶
type CheckoutSessionCustomFieldDropdown struct { // The options available for the customer to select. Up to 200 options allowed. Options []*CheckoutSessionCustomFieldDropdownOption `json:"options"` // The option selected by the customer. This will be the `value` for the option. Value string `json:"value"` }
type CheckoutSessionCustomFieldDropdownOption ¶
type CheckoutSessionCustomFieldDropdownOption struct { // The label for the option, displayed to the customer. Up to 100 characters. Label string `json:"label"` // The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. Value string `json:"value"` }
The options available for the customer to select. Up to 200 options allowed.
type CheckoutSessionCustomFieldDropdownOptionParams ¶
type CheckoutSessionCustomFieldDropdownOptionParams struct { // The label for the option, displayed to the customer. Up to 100 characters. Label *string `form:"label"` // The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. Value *string `form:"value"` }
The options available for the customer to select. Up to 200 options allowed.
type CheckoutSessionCustomFieldDropdownParams ¶
type CheckoutSessionCustomFieldDropdownParams struct { // The options available for the customer to select. Up to 200 options allowed. Options []*CheckoutSessionCustomFieldDropdownOptionParams `form:"options"` }
Configuration for `type=dropdown` fields.
type CheckoutSessionCustomFieldLabel ¶
type CheckoutSessionCustomFieldLabel struct { // Custom text for the label, displayed to the customer. Up to 50 characters. Custom string `json:"custom"` // The type of the label. Type CheckoutSessionCustomFieldLabelType `json:"type"` }
type CheckoutSessionCustomFieldLabelParams ¶
type CheckoutSessionCustomFieldLabelParams struct { // Custom text for the label, displayed to the customer. Up to 50 characters. Custom *string `form:"custom"` // The type of the label. Type *string `form:"type"` }
The label for the field, displayed to the customer.
type CheckoutSessionCustomFieldLabelType ¶
type CheckoutSessionCustomFieldLabelType string
The type of the label.
const (
CheckoutSessionCustomFieldLabelTypeCustom CheckoutSessionCustomFieldLabelType = "custom"
)
List of values that CheckoutSessionCustomFieldLabelType can take
type CheckoutSessionCustomFieldNumeric ¶
type CheckoutSessionCustomFieldNumeric struct { // The maximum character length constraint for the customer's input. MaximumLength int64 `json:"maximum_length"` // The minimum character length requirement for the customer's input. MinimumLength int64 `json:"minimum_length"` // The value entered by the customer, containing only digits. Value string `json:"value"` }
type CheckoutSessionCustomFieldNumericParams ¶
type CheckoutSessionCustomFieldNumericParams struct { // The maximum character length constraint for the customer's input. MaximumLength *int64 `form:"maximum_length"` // The minimum character length requirement for the customer's input. MinimumLength *int64 `form:"minimum_length"` }
Configuration for `type=numeric` fields.
type CheckoutSessionCustomFieldParams ¶
type CheckoutSessionCustomFieldParams struct { // Configuration for `type=dropdown` fields. Dropdown *CheckoutSessionCustomFieldDropdownParams `form:"dropdown"` // String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. Key *string `form:"key"` // The label for the field, displayed to the customer. Label *CheckoutSessionCustomFieldLabelParams `form:"label"` // Configuration for `type=numeric` fields. Numeric *CheckoutSessionCustomFieldNumericParams `form:"numeric"` // Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. Optional *bool `form:"optional"` // Configuration for `type=text` fields. Text *CheckoutSessionCustomFieldTextParams `form:"text"` // The type of the field. Type *string `form:"type"` }
Collect additional information from your customer using custom fields. Up to 2 fields are supported.
type CheckoutSessionCustomFieldText ¶
type CheckoutSessionCustomFieldText struct { // The maximum character length constraint for the customer's input. MaximumLength int64 `json:"maximum_length"` // The minimum character length requirement for the customer's input. MinimumLength int64 `json:"minimum_length"` // The value entered by the customer. Value string `json:"value"` }
type CheckoutSessionCustomFieldTextParams ¶
type CheckoutSessionCustomFieldTextParams struct { // The maximum character length constraint for the customer's input. MaximumLength *int64 `form:"maximum_length"` // The minimum character length requirement for the customer's input. MinimumLength *int64 `form:"minimum_length"` }
Configuration for `type=text` fields.
type CheckoutSessionCustomFieldType ¶
type CheckoutSessionCustomFieldType string
The type of the field.
const ( CheckoutSessionCustomFieldTypeDropdown CheckoutSessionCustomFieldType = "dropdown" CheckoutSessionCustomFieldTypeNumeric CheckoutSessionCustomFieldType = "numeric" CheckoutSessionCustomFieldTypeText CheckoutSessionCustomFieldType = "text" )
List of values that CheckoutSessionCustomFieldType can take
type CheckoutSessionCustomText ¶
type CheckoutSessionCustomText struct { // Custom text that should be displayed alongside shipping address collection. ShippingAddress *CheckoutSessionCustomTextShippingAddress `json:"shipping_address"` // Custom text that should be displayed alongside the payment confirmation button. Submit *CheckoutSessionCustomTextSubmit `json:"submit"` // Custom text that should be displayed in place of the default terms of service agreement text. TermsOfServiceAcceptance *CheckoutSessionCustomTextTermsOfServiceAcceptance `json:"terms_of_service_acceptance"` }
type CheckoutSessionCustomTextParams ¶
type CheckoutSessionCustomTextParams struct { // Custom text that should be displayed alongside shipping address collection. ShippingAddress *CheckoutSessionCustomTextShippingAddressParams `form:"shipping_address"` // Custom text that should be displayed alongside the payment confirmation button. Submit *CheckoutSessionCustomTextSubmitParams `form:"submit"` // Custom text that should be displayed in place of the default terms of service agreement text. TermsOfServiceAcceptance *CheckoutSessionCustomTextTermsOfServiceAcceptanceParams `form:"terms_of_service_acceptance"` }
Display additional text for your customers using custom text.
type CheckoutSessionCustomTextShippingAddress ¶
type CheckoutSessionCustomTextShippingAddress struct { // Text may be up to 1200 characters in length. Message string `json:"message"` }
Custom text that should be displayed alongside shipping address collection.
type CheckoutSessionCustomTextShippingAddressParams ¶
type CheckoutSessionCustomTextShippingAddressParams struct { // Text may be up to 1200 characters in length. Message *string `form:"message"` }
Custom text that should be displayed alongside shipping address collection.
type CheckoutSessionCustomTextSubmit ¶
type CheckoutSessionCustomTextSubmit struct { // Text may be up to 1200 characters in length. Message string `json:"message"` }
Custom text that should be displayed alongside the payment confirmation button.
type CheckoutSessionCustomTextSubmitParams ¶
type CheckoutSessionCustomTextSubmitParams struct { // Text may be up to 1200 characters in length. Message *string `form:"message"` }
Custom text that should be displayed alongside the payment confirmation button.
type CheckoutSessionCustomTextTermsOfServiceAcceptance ¶ added in v75.7.0
type CheckoutSessionCustomTextTermsOfServiceAcceptance struct { // Text may be up to 1200 characters in length. Message string `json:"message"` }
Custom text that should be displayed in place of the default terms of service agreement text.
type CheckoutSessionCustomTextTermsOfServiceAcceptanceParams ¶ added in v75.7.0
type CheckoutSessionCustomTextTermsOfServiceAcceptanceParams struct { // Text may be up to 1200 characters in length. Message *string `form:"message"` }
Custom text that should be displayed in place of the default terms of service agreement text.
type CheckoutSessionCustomerCreation ¶
type CheckoutSessionCustomerCreation string
Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
const ( CheckoutSessionCustomerCreationAlways CheckoutSessionCustomerCreation = "always" CheckoutSessionCustomerCreationIfRequired CheckoutSessionCustomerCreation = "if_required" )
List of values that CheckoutSessionCustomerCreation can take
type CheckoutSessionCustomerDetails ¶
type CheckoutSessionCustomerDetails struct { // The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. Address *Address `json:"address"` // The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. // Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. Email string `json:"email"` // The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. Name string `json:"name"` // The customer's phone number after a completed Checkout Session. Phone string `json:"phone"` // The customer's tax exempt status after a completed Checkout Session. TaxExempt CheckoutSessionCustomerDetailsTaxExempt `json:"tax_exempt"` // The customer's tax IDs after a completed Checkout Session. TaxIDs []*CheckoutSessionCustomerDetailsTaxID `json:"tax_ids"` }
The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.
type CheckoutSessionCustomerDetailsTaxExempt ¶
type CheckoutSessionCustomerDetailsTaxExempt string
The customer's tax exempt status after a completed Checkout Session.
const ( CheckoutSessionCustomerDetailsTaxExemptExempt CheckoutSessionCustomerDetailsTaxExempt = "exempt" CheckoutSessionCustomerDetailsTaxExemptNone CheckoutSessionCustomerDetailsTaxExempt = "none" CheckoutSessionCustomerDetailsTaxExemptReverse CheckoutSessionCustomerDetailsTaxExempt = "reverse" )
List of values that CheckoutSessionCustomerDetailsTaxExempt can take
type CheckoutSessionCustomerDetailsTaxID ¶
type CheckoutSessionCustomerDetailsTaxID struct { // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown` Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` }
The customer's tax IDs after a completed Checkout Session.
type CheckoutSessionCustomerDetailsTaxIDType ¶
type CheckoutSessionCustomerDetailsTaxIDType string
The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`
const ( CheckoutSessionCustomerDetailsTaxIDTypeADNRT CheckoutSessionCustomerDetailsTaxIDType = "ad_nrt" CheckoutSessionCustomerDetailsTaxIDTypeAETRN CheckoutSessionCustomerDetailsTaxIDType = "ae_trn" CheckoutSessionCustomerDetailsTaxIDTypeARCUIT CheckoutSessionCustomerDetailsTaxIDType = "ar_cuit" CheckoutSessionCustomerDetailsTaxIDTypeAUABN CheckoutSessionCustomerDetailsTaxIDType = "au_abn" CheckoutSessionCustomerDetailsTaxIDTypeAUARN CheckoutSessionCustomerDetailsTaxIDType = "au_arn" CheckoutSessionCustomerDetailsTaxIDTypeBGUIC CheckoutSessionCustomerDetailsTaxIDType = "bg_uic" CheckoutSessionCustomerDetailsTaxIDTypeBOTIN CheckoutSessionCustomerDetailsTaxIDType = "bo_tin" CheckoutSessionCustomerDetailsTaxIDTypeBRCNPJ CheckoutSessionCustomerDetailsTaxIDType = "br_cnpj" CheckoutSessionCustomerDetailsTaxIDTypeBRCPF CheckoutSessionCustomerDetailsTaxIDType = "br_cpf" CheckoutSessionCustomerDetailsTaxIDTypeCABN CheckoutSessionCustomerDetailsTaxIDType = "ca_bn" CheckoutSessionCustomerDetailsTaxIDTypeCAGSTHST CheckoutSessionCustomerDetailsTaxIDType = "ca_gst_hst" CheckoutSessionCustomerDetailsTaxIDTypeCAPSTBC CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_bc" CheckoutSessionCustomerDetailsTaxIDTypeCAPSTMB CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_mb" CheckoutSessionCustomerDetailsTaxIDTypeCAPSTSK CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_sk" CheckoutSessionCustomerDetailsTaxIDTypeCAQST CheckoutSessionCustomerDetailsTaxIDType = "ca_qst" CheckoutSessionCustomerDetailsTaxIDTypeCHVAT CheckoutSessionCustomerDetailsTaxIDType = "ch_vat" CheckoutSessionCustomerDetailsTaxIDTypeCLTIN CheckoutSessionCustomerDetailsTaxIDType = "cl_tin" CheckoutSessionCustomerDetailsTaxIDTypeCNTIN CheckoutSessionCustomerDetailsTaxIDType = "cn_tin" CheckoutSessionCustomerDetailsTaxIDTypeCONIT CheckoutSessionCustomerDetailsTaxIDType = "co_nit" CheckoutSessionCustomerDetailsTaxIDTypeCRTIN CheckoutSessionCustomerDetailsTaxIDType = "cr_tin" CheckoutSessionCustomerDetailsTaxIDTypeDORCN CheckoutSessionCustomerDetailsTaxIDType = "do_rcn" CheckoutSessionCustomerDetailsTaxIDTypeECRUC CheckoutSessionCustomerDetailsTaxIDType = "ec_ruc" CheckoutSessionCustomerDetailsTaxIDTypeEGTIN CheckoutSessionCustomerDetailsTaxIDType = "eg_tin" CheckoutSessionCustomerDetailsTaxIDTypeESCIF CheckoutSessionCustomerDetailsTaxIDType = "es_cif" CheckoutSessionCustomerDetailsTaxIDTypeEUOSSVAT CheckoutSessionCustomerDetailsTaxIDType = "eu_oss_vat" CheckoutSessionCustomerDetailsTaxIDTypeEUVAT CheckoutSessionCustomerDetailsTaxIDType = "eu_vat" CheckoutSessionCustomerDetailsTaxIDTypeGBVAT CheckoutSessionCustomerDetailsTaxIDType = "gb_vat" CheckoutSessionCustomerDetailsTaxIDTypeGEVAT CheckoutSessionCustomerDetailsTaxIDType = "ge_vat" CheckoutSessionCustomerDetailsTaxIDTypeHKBR CheckoutSessionCustomerDetailsTaxIDType = "hk_br" CheckoutSessionCustomerDetailsTaxIDTypeHUTIN CheckoutSessionCustomerDetailsTaxIDType = "hu_tin" CheckoutSessionCustomerDetailsTaxIDTypeIDNPWP CheckoutSessionCustomerDetailsTaxIDType = "id_npwp" CheckoutSessionCustomerDetailsTaxIDTypeILVAT CheckoutSessionCustomerDetailsTaxIDType = "il_vat" CheckoutSessionCustomerDetailsTaxIDTypeINGST CheckoutSessionCustomerDetailsTaxIDType = "in_gst" CheckoutSessionCustomerDetailsTaxIDTypeISVAT CheckoutSessionCustomerDetailsTaxIDType = "is_vat" CheckoutSessionCustomerDetailsTaxIDTypeJPCN CheckoutSessionCustomerDetailsTaxIDType = "jp_cn" CheckoutSessionCustomerDetailsTaxIDTypeJPRN CheckoutSessionCustomerDetailsTaxIDType = "jp_rn" CheckoutSessionCustomerDetailsTaxIDTypeJPTRN CheckoutSessionCustomerDetailsTaxIDType = "jp_trn" CheckoutSessionCustomerDetailsTaxIDTypeKEPIN CheckoutSessionCustomerDetailsTaxIDType = "ke_pin" CheckoutSessionCustomerDetailsTaxIDTypeKRBRN CheckoutSessionCustomerDetailsTaxIDType = "kr_brn" CheckoutSessionCustomerDetailsTaxIDTypeLIUID CheckoutSessionCustomerDetailsTaxIDType = "li_uid" CheckoutSessionCustomerDetailsTaxIDTypeMXRFC CheckoutSessionCustomerDetailsTaxIDType = "mx_rfc" CheckoutSessionCustomerDetailsTaxIDTypeMYFRP CheckoutSessionCustomerDetailsTaxIDType = "my_frp" CheckoutSessionCustomerDetailsTaxIDTypeMYITN CheckoutSessionCustomerDetailsTaxIDType = "my_itn" CheckoutSessionCustomerDetailsTaxIDTypeMYSST CheckoutSessionCustomerDetailsTaxIDType = "my_sst" CheckoutSessionCustomerDetailsTaxIDTypeNOVAT CheckoutSessionCustomerDetailsTaxIDType = "no_vat" CheckoutSessionCustomerDetailsTaxIDTypeNZGST CheckoutSessionCustomerDetailsTaxIDType = "nz_gst" CheckoutSessionCustomerDetailsTaxIDTypePERUC CheckoutSessionCustomerDetailsTaxIDType = "pe_ruc" CheckoutSessionCustomerDetailsTaxIDTypePHTIN CheckoutSessionCustomerDetailsTaxIDType = "ph_tin" CheckoutSessionCustomerDetailsTaxIDTypeROTIN CheckoutSessionCustomerDetailsTaxIDType = "ro_tin" CheckoutSessionCustomerDetailsTaxIDTypeRSPIB CheckoutSessionCustomerDetailsTaxIDType = "rs_pib" CheckoutSessionCustomerDetailsTaxIDTypeRUINN CheckoutSessionCustomerDetailsTaxIDType = "ru_inn" CheckoutSessionCustomerDetailsTaxIDTypeRUKPP CheckoutSessionCustomerDetailsTaxIDType = "ru_kpp" CheckoutSessionCustomerDetailsTaxIDTypeSAVAT CheckoutSessionCustomerDetailsTaxIDType = "sa_vat" CheckoutSessionCustomerDetailsTaxIDTypeSGGST CheckoutSessionCustomerDetailsTaxIDType = "sg_gst" CheckoutSessionCustomerDetailsTaxIDTypeSGUEN CheckoutSessionCustomerDetailsTaxIDType = "sg_uen" CheckoutSessionCustomerDetailsTaxIDTypeSITIN CheckoutSessionCustomerDetailsTaxIDType = "si_tin" CheckoutSessionCustomerDetailsTaxIDTypeSVNIT CheckoutSessionCustomerDetailsTaxIDType = "sv_nit" CheckoutSessionCustomerDetailsTaxIDTypeTHVAT CheckoutSessionCustomerDetailsTaxIDType = "th_vat" CheckoutSessionCustomerDetailsTaxIDTypeTRTIN CheckoutSessionCustomerDetailsTaxIDType = "tr_tin" CheckoutSessionCustomerDetailsTaxIDTypeTWVAT CheckoutSessionCustomerDetailsTaxIDType = "tw_vat" CheckoutSessionCustomerDetailsTaxIDTypeUAVAT CheckoutSessionCustomerDetailsTaxIDType = "ua_vat" CheckoutSessionCustomerDetailsTaxIDTypeUnknown CheckoutSessionCustomerDetailsTaxIDType = "unknown" CheckoutSessionCustomerDetailsTaxIDTypeUSEIN CheckoutSessionCustomerDetailsTaxIDType = "us_ein" CheckoutSessionCustomerDetailsTaxIDTypeUYRUC CheckoutSessionCustomerDetailsTaxIDType = "uy_ruc" CheckoutSessionCustomerDetailsTaxIDTypeVERIF CheckoutSessionCustomerDetailsTaxIDType = "ve_rif" CheckoutSessionCustomerDetailsTaxIDTypeVNTIN CheckoutSessionCustomerDetailsTaxIDType = "vn_tin" CheckoutSessionCustomerDetailsTaxIDTypeZAVAT CheckoutSessionCustomerDetailsTaxIDType = "za_vat" )
List of values that CheckoutSessionCustomerDetailsTaxIDType can take
type CheckoutSessionCustomerUpdateParams ¶
type CheckoutSessionCustomerUpdateParams struct { // Describes whether Checkout saves the billing address onto `customer.address`. // To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. Address *string `form:"address"` // Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. Name *string `form:"name"` // Describes whether Checkout saves shipping information onto `customer.shipping`. // To collect shipping information, use `shipping_address_collection`. Defaults to `never`. Shipping *string `form:"shipping"` }
Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
type CheckoutSessionDiscountParams ¶
type CheckoutSessionDiscountParams struct { // The ID of the coupon to apply to this Session. Coupon *string `form:"coupon"` // The ID of a promotion code to apply to this Session. PromotionCode *string `form:"promotion_code"` }
The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
type CheckoutSessionExpireParams ¶
type CheckoutSessionExpireParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
A Session can be expired when it is in one of these statuses: open
After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.
func (*CheckoutSessionExpireParams) AddExpand ¶
func (p *CheckoutSessionExpireParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CheckoutSessionInvoiceCreation ¶
type CheckoutSessionInvoiceCreation struct { // Indicates whether invoice creation is enabled for the Checkout Session. Enabled bool `json:"enabled"` InvoiceData *CheckoutSessionInvoiceCreationInvoiceData `json:"invoice_data"` }
Details on the state of invoice creation for the Checkout Session.
type CheckoutSessionInvoiceCreationInvoiceData ¶
type CheckoutSessionInvoiceCreationInvoiceData struct { // The account tax IDs associated with the invoice. AccountTaxIDs []*TaxID `json:"account_tax_ids"` // Custom fields displayed on the invoice. CustomFields []*CheckoutSessionInvoiceCreationInvoiceDataCustomField `json:"custom_fields"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` Footer string `json:"footer"` // 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. Metadata map[string]string `json:"metadata"` // Options for invoice PDF rendering. RenderingOptions *CheckoutSessionInvoiceCreationInvoiceDataRenderingOptions `json:"rendering_options"` }
type CheckoutSessionInvoiceCreationInvoiceDataCustomField ¶
type CheckoutSessionInvoiceCreationInvoiceDataCustomField struct { // The name of the custom field. Name string `json:"name"` // The value of the custom field. Value string `json:"value"` }
Custom fields displayed on the invoice.
type CheckoutSessionInvoiceCreationInvoiceDataCustomFieldParams ¶
type CheckoutSessionInvoiceCreationInvoiceDataCustomFieldParams struct { // The name of the custom field. This may be up to 30 characters. Name *string `form:"name"` // The value of the custom field. This may be up to 30 characters. Value *string `form:"value"` }
Default custom fields to be displayed on invoices for this customer.
type CheckoutSessionInvoiceCreationInvoiceDataParams ¶
type CheckoutSessionInvoiceCreationInvoiceDataParams struct { // The account tax IDs associated with the invoice. AccountTaxIDs []*string `form:"account_tax_ids"` // Default custom fields to be displayed on invoices for this customer. CustomFields []*CheckoutSessionInvoiceCreationInvoiceDataCustomFieldParams `form:"custom_fields"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` Footer *string `form:"footer"` // 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`. Metadata map[string]string `form:"metadata"` // Default options for invoice PDF rendering for this customer. RenderingOptions *CheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsParams `form:"rendering_options"` }
Parameters passed when creating invoices for payment-mode Checkout Sessions.
func (*CheckoutSessionInvoiceCreationInvoiceDataParams) AddMetadata ¶
func (p *CheckoutSessionInvoiceCreationInvoiceDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptions ¶
type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptions struct { // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. AmountTaxDisplay string `json:"amount_tax_display"` }
Options for invoice PDF rendering.
type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsParams ¶
type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsParams struct { // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. AmountTaxDisplay *string `form:"amount_tax_display"` }
Default options for invoice PDF rendering for this customer.
type CheckoutSessionInvoiceCreationParams ¶
type CheckoutSessionInvoiceCreationParams struct { // Set to `true` to enable invoice creation. Enabled *bool `form:"enabled"` // Parameters passed when creating invoices for payment-mode Checkout Sessions. InvoiceData *CheckoutSessionInvoiceCreationInvoiceDataParams `form:"invoice_data"` }
Generate a post-purchase Invoice for one-time payments.
type CheckoutSessionLineItemAdjustableQuantityParams ¶
type CheckoutSessionLineItemAdjustableQuantityParams struct { // Set to true if the quantity can be adjusted to any non-negative integer. By default customers will be able to remove the line item by setting the quantity to 0. Enabled *bool `form:"enabled"` // The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. Maximum *int64 `form:"maximum"` // The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. Minimum *int64 `form:"minimum"` }
When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
type CheckoutSessionLineItemParams ¶
type CheckoutSessionLineItemParams struct { // When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. AdjustableQuantity *CheckoutSessionLineItemAdjustableQuantityParams `form:"adjustable_quantity"` // The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. DynamicTaxRates []*string `form:"dynamic_tax_rates"` // The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. PriceData *CheckoutSessionLineItemPriceDataParams `form:"price_data"` // The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. Quantity *int64 `form:"quantity"` // The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. TaxRates []*string `form:"tax_rates"` }
A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
type CheckoutSessionLineItemPriceDataParams ¶
type CheckoutSessionLineItemPriceDataParams struct { // 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 `form:"currency"` // The ID of the product that this price will belong to. One of `product` or `product_data` is required. Product *string `form:"product"` // Data used to generate a new product object inline. One of `product` or `product_data` is required. ProductData *CheckoutSessionLineItemPriceDataProductDataParams `form:"product_data"` // The recurring components of a price such as `interval` and `interval_count`. Recurring *CheckoutSessionLineItemPriceDataRecurringParams `form:"recurring"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
type CheckoutSessionLineItemPriceDataProductDataParams ¶
type CheckoutSessionLineItemPriceDataProductDataParams struct { // The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. Description *string `form:"description"` // A list of up to 8 URLs of images for this product, meant to be displayable to the customer. Images []*string `form:"images"` // 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`. Metadata map[string]string `form:"metadata"` // The product's name, meant to be displayable to the customer. Name *string `form:"name"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. TaxCode *string `form:"tax_code"` }
Data used to generate a new product object inline. One of `product` or `product_data` is required.
func (*CheckoutSessionLineItemPriceDataProductDataParams) AddMetadata ¶
func (p *CheckoutSessionLineItemPriceDataProductDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CheckoutSessionLineItemPriceDataRecurringParams ¶
type CheckoutSessionLineItemPriceDataRecurringParams struct { // Specifies billing frequency. Either `day`, `week`, `month` or `year`. Interval *string `form:"interval"` // The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). IntervalCount *int64 `form:"interval_count"` }
The recurring components of a price such as `interval` and `interval_count`.
type CheckoutSessionList ¶
type CheckoutSessionList struct { APIResource ListMeta Data []*CheckoutSession `json:"data"` }
CheckoutSessionList is a list of Sessions as retrieved from a list endpoint.
type CheckoutSessionListCustomerDetailsParams ¶
type CheckoutSessionListCustomerDetailsParams struct { // Customer's email address. Email *string `form:"email"` }
Only return the Checkout Sessions for the Customer details specified.
type CheckoutSessionListLineItemsParams ¶
type CheckoutSessionListLineItemsParams struct { ListParams `form:"*"` Session *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
func (*CheckoutSessionListLineItemsParams) AddExpand ¶
func (p *CheckoutSessionListLineItemsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CheckoutSessionListParams ¶
type CheckoutSessionListParams struct { ListParams `form:"*"` // Only return the Checkout Sessions for the Customer specified. Customer *string `form:"customer"` // Only return the Checkout Sessions for the Customer details specified. CustomerDetails *CheckoutSessionListCustomerDetailsParams `form:"customer_details"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return the Checkout Session for the PaymentIntent specified. PaymentIntent *string `form:"payment_intent"` // Only return the Checkout Sessions for the Payment Link specified. PaymentLink *string `form:"payment_link"` // Only return the Checkout Session for the subscription specified. Subscription *string `form:"subscription"` }
Returns a list of Checkout Sessions.
func (*CheckoutSessionListParams) AddExpand ¶
func (p *CheckoutSessionListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CheckoutSessionMode ¶
type CheckoutSessionMode string
The mode of the Checkout Session.
const ( CheckoutSessionModePayment CheckoutSessionMode = "payment" CheckoutSessionModeSetup CheckoutSessionMode = "setup" CheckoutSessionModeSubscription CheckoutSessionMode = "subscription" )
List of values that CheckoutSessionMode can take
type CheckoutSessionParams ¶
type CheckoutSessionParams struct { Params `form:"*"` // Configure actions after a Checkout Session has expired. AfterExpiration *CheckoutSessionAfterExpirationParams `form:"after_expiration"` // Enables user redeemable promotion codes. AllowPromotionCodes *bool `form:"allow_promotion_codes"` // Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. AutomaticTax *CheckoutSessionAutomaticTaxParams `form:"automatic_tax"` // Specify whether Checkout should collect the customer's billing address. BillingAddressCollection *string `form:"billing_address_collection"` // If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. CancelURL *string `form:"cancel_url"` // A unique string to reference the Checkout Session. This can be a // customer ID, a cart ID, or similar, and can be used to reconcile the // session with your internal systems. ClientReferenceID *string `form:"client_reference_id"` // Configure fields for the Checkout Session to gather active consent from customers. ConsentCollection *CheckoutSessionConsentCollectionParams `form:"consent_collection"` // 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 `form:"currency"` // ID of an existing Customer, if one exists. In `payment` mode, the customer's most recent card // payment method will be used to prefill the email, name, card details, and billing address // on the Checkout page. In `subscription` mode, the customer's [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) // will be used if it's a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. // // If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. // If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. // // If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. // // You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. Customer *string `form:"customer"` // Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. // // When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout // with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). // // Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers) // in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. // // Can only be set in `payment` and `setup` mode. CustomerCreation *string `form:"customer_creation"` // If provided, this value will be used when the Customer object is created. // If not provided, customers will be asked to enter their email address. // Use this parameter to prefill customer data if you already have an email // on file. To access information about the customer once a session is // complete, use the `customer` field. CustomerEmail *string `form:"customer_email"` // Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. CustomerUpdate *CheckoutSessionCustomerUpdateParams `form:"customer_update"` // Collect additional information from your customer using custom fields. Up to 2 fields are supported. CustomFields []*CheckoutSessionCustomFieldParams `form:"custom_fields"` // Display additional text for your customers using custom text. CustomText *CheckoutSessionCustomTextParams `form:"custom_text"` // The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. Discounts []*CheckoutSessionDiscountParams `form:"discounts"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. ExpiresAt *int64 `form:"expires_at"` // Generate a post-purchase Invoice for one-time payments. InvoiceCreation *CheckoutSessionInvoiceCreationParams `form:"invoice_creation"` // A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). // // For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. // // For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. LineItems []*CheckoutSessionLineItemParams `form:"line_items"` // The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. Locale *string `form:"locale"` // 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`. Metadata map[string]string `form:"metadata"` // The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. Mode *string `form:"mode"` // A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. PaymentIntentData *CheckoutSessionPaymentIntentDataParams `form:"payment_intent_data"` // Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. // This may occur if the Checkout Session includes a free trial or a discount. // // Can only be set in `subscription` mode. // // If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). PaymentMethodCollection *string `form:"payment_method_collection"` // The ID of the payment method configuration to use with this Checkout session. PaymentMethodConfiguration *string `form:"payment_method_configuration"` // Payment-method-specific configuration. PaymentMethodOptions *CheckoutSessionPaymentMethodOptionsParams `form:"payment_method_options"` // A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. // // In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). // It is required in `setup` mode. // // Read more about the supported payment methods and their requirements in our [payment // method details guide](https://stripe.com/docs/payments/checkout/payment-methods). // // If multiple payment methods are passed, Checkout will dynamically reorder them to // prioritize the most relevant payment methods based on the customer's location and // other characteristics. PaymentMethodTypes []*string `form:"payment_method_types"` // Controls phone number collection settings for the session. // // We recommend that you review your privacy policy and check with your legal contacts // before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). PhoneNumberCollection *CheckoutSessionPhoneNumberCollectionParams `form:"phone_number_collection"` // This parameter applies to `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method. RedirectOnCompletion *string `form:"redirect_on_completion"` // The URL to redirect your customer back to after they authenticate or cancel their payment on the // payment method's app or site. This parameter is required if ui_mode is `embedded` // and redirect-based payment methods are enabled on the session. ReturnURL *string `form:"return_url"` // A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. SetupIntentData *CheckoutSessionSetupIntentDataParams `form:"setup_intent_data"` // When set, provides configuration for Checkout to collect a shipping address from a customer. ShippingAddressCollection *CheckoutSessionShippingAddressCollectionParams `form:"shipping_address_collection"` // The shipping rate options to apply to this Session. Up to a maximum of 5. ShippingOptions []*CheckoutSessionShippingOptionParams `form:"shipping_options"` // Describes the type of transaction being performed by Checkout in order to customize // relevant text on the page, such as the submit button. `submit_type` can only be // specified on Checkout Sessions in `payment` mode, but not Checkout Sessions // in `subscription` or `setup` mode. SubmitType *string `form:"submit_type"` // A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. SubscriptionData *CheckoutSessionSubscriptionDataParams `form:"subscription_data"` // The URL to which Stripe should send customers when payment or setup // is complete. // If you'd like to use information from the successful Checkout Session on your page, // read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). SuccessURL *string `form:"success_url"` // Controls tax ID collection settings for the session. TaxIDCollection *CheckoutSessionTaxIDCollectionParams `form:"tax_id_collection"` // `ui_mode` can be `hosted` or `embedded`. The default is `hosted`. UIMode *string `form:"ui_mode"` }
Creates a Session object.
func (*CheckoutSessionParams) AddExpand ¶
func (p *CheckoutSessionParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*CheckoutSessionParams) AddMetadata ¶
func (p *CheckoutSessionParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CheckoutSessionPaymentIntentDataParams ¶
type CheckoutSessionPaymentIntentDataParams struct { // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). ApplicationFeeAmount *int64 `form:"application_fee_amount"` // Controls when the funds will be captured from the customer's account. CaptureMethod *string `form:"capture_method"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // 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`. Metadata map[string]string `form:"metadata"` // The Stripe account ID for which these funds are intended. For details, // see the PaymentIntents [use case for connected // accounts](https://stripe.com/docs/payments/connected-accounts). OnBehalfOf *string `form:"on_behalf_of"` // Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). ReceiptEmail *string `form:"receipt_email"` // Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment // method collected by this Checkout Session. // // When setting this to `on_session`, Checkout will show a notice to the // customer that their payment details will be saved. // // When setting this to `off_session`, Checkout will show a notice to the // customer that their payment details will be saved and used for future // payments. // // If a Customer has been provided or Checkout creates a new Customer, // Checkout will attach the payment method to the Customer. // // If Checkout does not create a Customer, the payment method is not attached // to a Customer. To reuse the payment method, you can retrieve it from the // Checkout Session's PaymentIntent. // // When processing card payments, Checkout also uses `setup_future_usage` // to dynamically optimize your payment flow and comply with regional // legislation and network rules, such as SCA. SetupFutureUsage *string `form:"setup_future_usage"` // Shipping information for this payment. Shipping *ShippingDetailsParams `form:"shipping"` // Extra information about the payment. This will appear on your // customer's statement when this payment succeeds in creating a charge. StatementDescriptor *string `form:"statement_descriptor"` // Provides information about the charge that customers see on their statements. Concatenated with the // prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete // statement descriptor. Maximum 22 characters for the concatenated descriptor. StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` // The parameters used to automatically create a Transfer when the payment succeeds. // For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). TransferData *CheckoutSessionPaymentIntentDataTransferDataParams `form:"transfer_data"` // A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. TransferGroup *string `form:"transfer_group"` }
A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
func (*CheckoutSessionPaymentIntentDataParams) AddMetadata ¶
func (p *CheckoutSessionPaymentIntentDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CheckoutSessionPaymentIntentDataTransferDataParams ¶
type CheckoutSessionPaymentIntentDataTransferDataParams struct { // The amount that will be transferred automatically when a charge succeeds. Amount *int64 `form:"amount"` // If specified, successful charges will be attributed to the destination // account for tax reporting, and the funds from charges will be transferred // to the destination account. The ID of the resulting transfer will be // returned on the successful charge's `transfer` field. Destination *string `form:"destination"` }
The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
type CheckoutSessionPaymentMethodCollection ¶
type CheckoutSessionPaymentMethodCollection string
Configure whether a Checkout Session should collect a payment method.
const ( CheckoutSessionPaymentMethodCollectionAlways CheckoutSessionPaymentMethodCollection = "always" CheckoutSessionPaymentMethodCollectionIfRequired CheckoutSessionPaymentMethodCollection = "if_required" )
List of values that CheckoutSessionPaymentMethodCollection can take
type CheckoutSessionPaymentMethodConfigurationDetails ¶ added in v75.6.0
type CheckoutSessionPaymentMethodConfigurationDetails struct { // ID of the payment method configuration used. ID string `json:"id"` // ID of the parent payment method configuration used. Parent string `json:"parent"` }
Information about the payment method configuration used for this Checkout session if using dynamic payment methods.
type CheckoutSessionPaymentMethodOptions ¶
type CheckoutSessionPaymentMethodOptions struct { ACSSDebit *CheckoutSessionPaymentMethodOptionsACSSDebit `json:"acss_debit"` Affirm *CheckoutSessionPaymentMethodOptionsAffirm `json:"affirm"` AfterpayClearpay *CheckoutSessionPaymentMethodOptionsAfterpayClearpay `json:"afterpay_clearpay"` Alipay *CheckoutSessionPaymentMethodOptionsAlipay `json:"alipay"` AUBECSDebit *CheckoutSessionPaymentMethodOptionsAUBECSDebit `json:"au_becs_debit"` BACSDebit *CheckoutSessionPaymentMethodOptionsBACSDebit `json:"bacs_debit"` Bancontact *CheckoutSessionPaymentMethodOptionsBancontact `json:"bancontact"` Boleto *CheckoutSessionPaymentMethodOptionsBoleto `json:"boleto"` Card *CheckoutSessionPaymentMethodOptionsCard `json:"card"` CashApp *CheckoutSessionPaymentMethodOptionsCashApp `json:"cashapp"` CustomerBalance *CheckoutSessionPaymentMethodOptionsCustomerBalance `json:"customer_balance"` EPS *CheckoutSessionPaymentMethodOptionsEPS `json:"eps"` FPX *CheckoutSessionPaymentMethodOptionsFPX `json:"fpx"` Giropay *CheckoutSessionPaymentMethodOptionsGiropay `json:"giropay"` Grabpay *CheckoutSessionPaymentMethodOptionsGrabpay `json:"grabpay"` IDEAL *CheckoutSessionPaymentMethodOptionsIDEAL `json:"ideal"` Klarna *CheckoutSessionPaymentMethodOptionsKlarna `json:"klarna"` Konbini *CheckoutSessionPaymentMethodOptionsKonbini `json:"konbini"` Link *CheckoutSessionPaymentMethodOptionsLink `json:"link"` OXXO *CheckoutSessionPaymentMethodOptionsOXXO `json:"oxxo"` P24 *CheckoutSessionPaymentMethodOptionsP24 `json:"p24"` PayNow *CheckoutSessionPaymentMethodOptionsPayNow `json:"paynow"` Pix *CheckoutSessionPaymentMethodOptionsPix `json:"pix"` SEPADebit *CheckoutSessionPaymentMethodOptionsSEPADebit `json:"sepa_debit"` Sofort *CheckoutSessionPaymentMethodOptionsSofort `json:"sofort"` USBankAccount *CheckoutSessionPaymentMethodOptionsUSBankAccount `json:"us_bank_account"` }
Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
type CheckoutSessionPaymentMethodOptionsACSSDebit ¶
type CheckoutSessionPaymentMethodOptionsACSSDebit struct { Currency string `json:"currency"` MandateOptions *CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage `json:"setup_future_usage"` // Bank account verification method. VerificationMethod CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"` }
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptions ¶
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptions struct { // A URL for custom mandate text CustomMandateURL string `json:"custom_mandate_url"` // List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. DefaultFor []CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor `json:"default_for"` // Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. IntervalDescription string `json:"interval_description"` // Payment schedule for the mandate. PaymentSchedule CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule `json:"payment_schedule"` // Transaction type of the mandate. TransactionType CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"` }
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor ¶
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor string
List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.
const ( CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultForInvoice CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "invoice" CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultForSubscription CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "subscription" )
List of values that CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor can take
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsParams ¶
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsParams struct { // A URL for custom mandate text to render during confirmation step. // The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, // or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. CustomMandateURL *string `form:"custom_mandate_url"` // List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. DefaultFor []*string `form:"default_for"` // Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. IntervalDescription *string `form:"interval_description"` // Payment schedule for the mandate. PaymentSchedule *string `form:"payment_schedule"` // Transaction type of the mandate. TransactionType *string `form:"transaction_type"` }
Additional fields for Mandate creation
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule ¶
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule string
Payment schedule for the mandate.
const ( CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleCombined CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "combined" CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleInterval CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "interval" CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleSporadic CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "sporadic" )
List of values that CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule can take
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType ¶
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string
Transaction type of the mandate.
const ( CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business" CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal" )
List of values that CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take
type CheckoutSessionPaymentMethodOptionsACSSDebitParams ¶
type CheckoutSessionPaymentMethodOptionsACSSDebitParams struct { // 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). This is only accepted for Checkout Sessions in `setup` mode. Currency *string `form:"currency"` // Additional fields for Mandate creation MandateOptions *CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` // Verification method for the intent VerificationMethod *string `form:"verification_method"` }
contains details about the ACSS Debit payment method options.
type CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage = "none" CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage = "off_session" CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage = "on_session" )
List of values that CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod ¶
type CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod string
Bank account verification method.
const ( CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethodAutomatic CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod = "automatic" CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethodInstant CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod = "instant" CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits" )
List of values that CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod can take
type CheckoutSessionPaymentMethodOptionsAUBECSDebit ¶
type CheckoutSessionPaymentMethodOptionsAUBECSDebit struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams ¶
type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the AU Becs Debit payment method options.
type CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsAffirm ¶
type CheckoutSessionPaymentMethodOptionsAffirm struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsAffirmParams ¶
type CheckoutSessionPaymentMethodOptionsAffirmParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Affirm payment method options.
type CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsAfterpayClearpay ¶
type CheckoutSessionPaymentMethodOptionsAfterpayClearpay struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsAfterpayClearpayParams ¶
type CheckoutSessionPaymentMethodOptionsAfterpayClearpayParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Afterpay Clearpay payment method options.
type CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsAlipay ¶
type CheckoutSessionPaymentMethodOptionsAlipay struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsAlipayParams ¶
type CheckoutSessionPaymentMethodOptionsAlipayParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Alipay payment method options.
type CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsBACSDebit ¶
type CheckoutSessionPaymentMethodOptionsBACSDebit struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsBACSDebitParams ¶
type CheckoutSessionPaymentMethodOptionsBACSDebitParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Bacs Debit payment method options.
type CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage = "none" CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage = "off_session" CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage = "on_session" )
List of values that CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsBancontact ¶
type CheckoutSessionPaymentMethodOptionsBancontact struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsBancontactParams ¶
type CheckoutSessionPaymentMethodOptionsBancontactParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Bancontact payment method options.
type CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsBoleto ¶
type CheckoutSessionPaymentMethodOptionsBoleto struct { // The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. ExpiresAfterDays int64 `json:"expires_after_days"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsBoletoParams ¶
type CheckoutSessionPaymentMethodOptionsBoletoParams struct { // The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. ExpiresAfterDays *int64 `form:"expires_after_days"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Boleto payment method options.
type CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage = "none" CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage = "off_session" CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage = "on_session" )
List of values that CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsCard ¶
type CheckoutSessionPaymentMethodOptionsCard struct { Installments *CheckoutSessionPaymentMethodOptionsCardInstallments `json:"installments"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage `json:"setup_future_usage"` // Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. StatementDescriptorSuffixKana string `json:"statement_descriptor_suffix_kana"` // Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. StatementDescriptorSuffixKanji string `json:"statement_descriptor_suffix_kanji"` }
type CheckoutSessionPaymentMethodOptionsCardInstallments ¶
type CheckoutSessionPaymentMethodOptionsCardInstallments struct { // Indicates if installments are enabled Enabled bool `json:"enabled"` }
type CheckoutSessionPaymentMethodOptionsCardInstallmentsParams ¶
type CheckoutSessionPaymentMethodOptionsCardInstallmentsParams struct { // Setting to true enables installments for this Checkout Session. // Setting to false will prevent any installment plan from applying to a payment. Enabled *bool `form:"enabled"` }
Installment options for card payments
type CheckoutSessionPaymentMethodOptionsCardParams ¶
type CheckoutSessionPaymentMethodOptionsCardParams struct { // Installment options for card payments Installments *CheckoutSessionPaymentMethodOptionsCardInstallmentsParams `form:"installments"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` // Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. StatementDescriptorSuffixKana *string `form:"statement_descriptor_suffix_kana"` // Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. StatementDescriptorSuffixKanji *string `form:"statement_descriptor_suffix_kanji"` }
contains details about the Card payment method options.
type CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "none" CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "off_session" CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "on_session" )
List of values that CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsCashApp ¶
type CheckoutSessionPaymentMethodOptionsCashApp struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsCashAppParams ¶
type CheckoutSessionPaymentMethodOptionsCashAppParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Cashapp Pay payment method options.
type CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsCustomerBalance ¶
type CheckoutSessionPaymentMethodOptionsCustomerBalance struct { BankTransfer *CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer `json:"bank_transfer"` // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. FundingType CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer ¶
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer struct { EUBankTransfer *CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer `json:"eu_bank_transfer"` // List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. // // Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. RequestedAddressTypes []CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType `json:"requested_address_types"` // The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. Type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType `json:"type"` }
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer ¶
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct { // The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. Country string `json:"country"` }
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams ¶
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams struct { // The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. Country *string `form:"country"` }
Configuration for eu_bank_transfer funding type.
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferParams ¶
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferParams struct { // Configuration for eu_bank_transfer funding type. EUBankTransfer *CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"` // List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. // // Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. RequestedAddressTypes []*string `form:"requested_address_types"` // The list of bank transfer types that this PaymentIntent is allowed to use for funding. Type *string `form:"type"` }
Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType ¶
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType string
List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
const ( CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeABA CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "aba" CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeIBAN CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "iban" CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSEPA CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sepa" CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSortCode CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sort_code" CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSpei CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "spei" CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSwift CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "swift" CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeZengin CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "zengin" )
List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType can take
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType ¶
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType string
The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
const ( CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeEUBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "eu_bank_transfer" CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeGBBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "gb_bank_transfer" CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeJPBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "jp_bank_transfer" CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeMXBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "mx_bank_transfer" CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeUSBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "us_bank_transfer" )
List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType can take
type CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType ¶
type CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType string
The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
const (
CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingTypeBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType = "bank_transfer"
)
List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType can take
type CheckoutSessionPaymentMethodOptionsCustomerBalanceParams ¶
type CheckoutSessionPaymentMethodOptionsCustomerBalanceParams struct { // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. BankTransfer *CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"` // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. FundingType *string `form:"funding_type"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Customer Balance payment method options.
type CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsEPS ¶
type CheckoutSessionPaymentMethodOptionsEPS struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsEPSParams ¶
type CheckoutSessionPaymentMethodOptionsEPSParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the EPS payment method options.
type CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsFPX ¶
type CheckoutSessionPaymentMethodOptionsFPX struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsFPXParams ¶
type CheckoutSessionPaymentMethodOptionsFPXParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the FPX payment method options.
type CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsGiropay ¶
type CheckoutSessionPaymentMethodOptionsGiropay struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsGiropayParams ¶
type CheckoutSessionPaymentMethodOptionsGiropayParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Giropay payment method options.
type CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsGrabpay ¶
type CheckoutSessionPaymentMethodOptionsGrabpay struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsGrabpayParams ¶
type CheckoutSessionPaymentMethodOptionsGrabpayParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Grabpay payment method options.
type CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsIDEAL ¶
type CheckoutSessionPaymentMethodOptionsIDEAL struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsIDEALParams ¶
type CheckoutSessionPaymentMethodOptionsIDEALParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Ideal payment method options.
type CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsKlarna ¶
type CheckoutSessionPaymentMethodOptionsKlarna struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsKlarnaParams ¶
type CheckoutSessionPaymentMethodOptionsKlarnaParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Klarna payment method options.
type CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage = "none" CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage = "off_session" CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage = "on_session" )
List of values that CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsKonbini ¶
type CheckoutSessionPaymentMethodOptionsKonbini struct { // The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. ExpiresAfterDays int64 `json:"expires_after_days"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsKonbiniParams ¶
type CheckoutSessionPaymentMethodOptionsKonbiniParams struct { // The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. ExpiresAfterDays *int64 `form:"expires_after_days"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Konbini payment method options.
type CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsLink ¶
type CheckoutSessionPaymentMethodOptionsLink struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsLinkParams ¶
type CheckoutSessionPaymentMethodOptionsLinkParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Link payment method options.
type CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage = "none" CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage = "off_session" )
List of values that CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsOXXO ¶
type CheckoutSessionPaymentMethodOptionsOXXO struct { // The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. ExpiresAfterDays int64 `json:"expires_after_days"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsOXXOParams ¶
type CheckoutSessionPaymentMethodOptionsOXXOParams struct { // The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. ExpiresAfterDays *int64 `form:"expires_after_days"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the OXXO payment method options.
type CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsP24 ¶
type CheckoutSessionPaymentMethodOptionsP24 struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsP24Params ¶
type CheckoutSessionPaymentMethodOptionsP24Params struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` // Confirm that the payer has accepted the P24 terms and conditions. TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"` }
contains details about the P24 payment method options.
type CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsP24SetupFutureUsageNone CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsParams ¶
type CheckoutSessionPaymentMethodOptionsParams struct { // contains details about the ACSS Debit payment method options. ACSSDebit *CheckoutSessionPaymentMethodOptionsACSSDebitParams `form:"acss_debit"` // contains details about the Affirm payment method options. Affirm *CheckoutSessionPaymentMethodOptionsAffirmParams `form:"affirm"` // contains details about the Afterpay Clearpay payment method options. AfterpayClearpay *CheckoutSessionPaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"` // contains details about the Alipay payment method options. Alipay *CheckoutSessionPaymentMethodOptionsAlipayParams `form:"alipay"` // contains details about the AU Becs Debit payment method options. AUBECSDebit *CheckoutSessionPaymentMethodOptionsAUBECSDebitParams `form:"au_becs_debit"` // contains details about the Bacs Debit payment method options. BACSDebit *CheckoutSessionPaymentMethodOptionsBACSDebitParams `form:"bacs_debit"` // contains details about the Bancontact payment method options. Bancontact *CheckoutSessionPaymentMethodOptionsBancontactParams `form:"bancontact"` // contains details about the Boleto payment method options. Boleto *CheckoutSessionPaymentMethodOptionsBoletoParams `form:"boleto"` // contains details about the Card payment method options. Card *CheckoutSessionPaymentMethodOptionsCardParams `form:"card"` // contains details about the Cashapp Pay payment method options. CashApp *CheckoutSessionPaymentMethodOptionsCashAppParams `form:"cashapp"` // contains details about the Customer Balance payment method options. CustomerBalance *CheckoutSessionPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"` // contains details about the EPS payment method options. EPS *CheckoutSessionPaymentMethodOptionsEPSParams `form:"eps"` // contains details about the FPX payment method options. FPX *CheckoutSessionPaymentMethodOptionsFPXParams `form:"fpx"` // contains details about the Giropay payment method options. Giropay *CheckoutSessionPaymentMethodOptionsGiropayParams `form:"giropay"` // contains details about the Grabpay payment method options. Grabpay *CheckoutSessionPaymentMethodOptionsGrabpayParams `form:"grabpay"` // contains details about the Ideal payment method options. IDEAL *CheckoutSessionPaymentMethodOptionsIDEALParams `form:"ideal"` // contains details about the Klarna payment method options. Klarna *CheckoutSessionPaymentMethodOptionsKlarnaParams `form:"klarna"` // contains details about the Konbini payment method options. Konbini *CheckoutSessionPaymentMethodOptionsKonbiniParams `form:"konbini"` // contains details about the Link payment method options. Link *CheckoutSessionPaymentMethodOptionsLinkParams `form:"link"` // contains details about the OXXO payment method options. OXXO *CheckoutSessionPaymentMethodOptionsOXXOParams `form:"oxxo"` // contains details about the P24 payment method options. P24 *CheckoutSessionPaymentMethodOptionsP24Params `form:"p24"` // contains details about the PayNow payment method options. PayNow *CheckoutSessionPaymentMethodOptionsPayNowParams `form:"paynow"` // contains details about the PayPal payment method options. Paypal *CheckoutSessionPaymentMethodOptionsPaypalParams `form:"paypal"` // contains details about the Pix payment method options. Pix *CheckoutSessionPaymentMethodOptionsPixParams `form:"pix"` // contains details about the Sepa Debit payment method options. SEPADebit *CheckoutSessionPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"` // contains details about the Sofort payment method options. Sofort *CheckoutSessionPaymentMethodOptionsSofortParams `form:"sofort"` // contains details about the Us Bank Account payment method options. USBankAccount *CheckoutSessionPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"` // contains details about the WeChat Pay payment method options. WeChatPay *CheckoutSessionPaymentMethodOptionsWeChatPayParams `form:"wechat_pay"` }
Payment-method-specific configuration.
type CheckoutSessionPaymentMethodOptionsPayNow ¶
type CheckoutSessionPaymentMethodOptionsPayNow struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsPayNowParams ¶
type CheckoutSessionPaymentMethodOptionsPayNowParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the PayNow payment method options.
type CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsPaypalParams ¶
type CheckoutSessionPaymentMethodOptionsPaypalParams struct { // Controls when the funds will be captured from the customer's account. CaptureMethod *string `form:"capture_method"` // [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. PreferredLocale *string `form:"preferred_locale"` // A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. Reference *string `form:"reference"` // The risk correlation ID for an on-session payment using a saved PayPal payment method. RiskCorrelationID *string `form:"risk_correlation_id"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the PayPal payment method options.
type CheckoutSessionPaymentMethodOptionsPix ¶
type CheckoutSessionPaymentMethodOptionsPix struct { // The number of seconds after which Pix payment will expire. ExpiresAfterSeconds int64 `json:"expires_after_seconds"` }
type CheckoutSessionPaymentMethodOptionsPixParams ¶
type CheckoutSessionPaymentMethodOptionsPixParams struct { // The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. ExpiresAfterSeconds *int64 `form:"expires_after_seconds"` }
contains details about the Pix payment method options.
type CheckoutSessionPaymentMethodOptionsSEPADebit ¶
type CheckoutSessionPaymentMethodOptionsSEPADebit struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsSEPADebitParams ¶
type CheckoutSessionPaymentMethodOptionsSEPADebitParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Sepa Debit payment method options.
type CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "none" CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "off_session" CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "on_session" )
List of values that CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsSofort ¶
type CheckoutSessionPaymentMethodOptionsSofort struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage `json:"setup_future_usage"` }
type CheckoutSessionPaymentMethodOptionsSofortParams ¶
type CheckoutSessionPaymentMethodOptionsSofortParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the Sofort payment method options.
type CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage = "none"
)
List of values that CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsUSBankAccount ¶
type CheckoutSessionPaymentMethodOptionsUSBankAccount struct { FinancialConnections *CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage `json:"setup_future_usage"` // Bank account verification method. VerificationMethod CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"` }
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections ¶
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` // Data features requested to be retrieved upon account creation. Prefetch []CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL string `json:"return_url"` }
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsParams ¶
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. Permissions []*string `form:"permissions"` // List of data features that you would like to retrieve upon account creation. Prefetch []*string `form:"prefetch"` }
Additional fields for Financial Connections Session creation
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission ¶
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string
The list of permissions to request. The `payment_method` permission must be included.
const ( CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances" CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "ownership" CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method" CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" )
List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch ¶ added in v75.2.0
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string
Data features requested to be retrieved upon account creation.
const (
CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances"
)
List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take
type CheckoutSessionPaymentMethodOptionsUSBankAccountParams ¶
type CheckoutSessionPaymentMethodOptionsUSBankAccountParams struct { // Additional fields for Financial Connections Session creation FinancialConnections *CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` // Verification method for the intent VerificationMethod *string `form:"verification_method"` }
contains details about the Us Bank Account payment method options.
type CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage ¶
type CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage = "none" CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage = "off_session" CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage = "on_session" )
List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage can take
type CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod ¶
type CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod string
Bank account verification method.
const ( CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic" CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethodInstant CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod = "instant" )
List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod can take
type CheckoutSessionPaymentMethodOptionsWeChatPayParams ¶
type CheckoutSessionPaymentMethodOptionsWeChatPayParams struct { // The app ID registered with WeChat Pay. Only required when client is ios or android. AppID *string `form:"app_id"` // The client type that the end customer will pay from Client *string `form:"client"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage *string `form:"setup_future_usage"` }
contains details about the WeChat Pay payment method options.
type CheckoutSessionPaymentStatus ¶
type CheckoutSessionPaymentStatus string
The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. You can use this value to decide when to fulfill your customer's order.
const ( CheckoutSessionPaymentStatusNoPaymentRequired CheckoutSessionPaymentStatus = "no_payment_required" CheckoutSessionPaymentStatusPaid CheckoutSessionPaymentStatus = "paid" CheckoutSessionPaymentStatusUnpaid CheckoutSessionPaymentStatus = "unpaid" )
List of values that CheckoutSessionPaymentStatus can take
type CheckoutSessionPhoneNumberCollection ¶
type CheckoutSessionPhoneNumberCollection struct { // Indicates whether phone number collection is enabled for the session Enabled bool `json:"enabled"` }
type CheckoutSessionPhoneNumberCollectionParams ¶
type CheckoutSessionPhoneNumberCollectionParams struct { // Set to `true` to enable phone number collection. Enabled *bool `form:"enabled"` }
Controls phone number collection settings for the session.
We recommend that you review your privacy policy and check with your legal contacts before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).
type CheckoutSessionRedirectOnCompletion ¶ added in v75.10.0
type CheckoutSessionRedirectOnCompletion string
Applies to Checkout Sessions with `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method.
const ( CheckoutSessionRedirectOnCompletionAlways CheckoutSessionRedirectOnCompletion = "always" CheckoutSessionRedirectOnCompletionIfRequired CheckoutSessionRedirectOnCompletion = "if_required" CheckoutSessionRedirectOnCompletionNever CheckoutSessionRedirectOnCompletion = "never" )
List of values that CheckoutSessionRedirectOnCompletion can take
type CheckoutSessionSetupIntentDataParams ¶
type CheckoutSessionSetupIntentDataParams struct { // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // 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`. Metadata map[string]string `form:"metadata"` // The Stripe account for which the setup is intended. OnBehalfOf *string `form:"on_behalf_of"` }
A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
func (*CheckoutSessionSetupIntentDataParams) AddMetadata ¶
func (p *CheckoutSessionSetupIntentDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CheckoutSessionShippingAddressCollection ¶
type CheckoutSessionShippingAddressCollection struct { // An array of two-letter ISO country codes representing which countries Checkout should provide as options for // shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. AllowedCountries []string `json:"allowed_countries"` }
When set, provides configuration for Checkout to collect a shipping address from a customer.
type CheckoutSessionShippingAddressCollectionParams ¶
type CheckoutSessionShippingAddressCollectionParams struct { // An array of two-letter ISO country codes representing which countries Checkout should provide as options for // shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. AllowedCountries []*string `form:"allowed_countries"` }
When set, provides configuration for Checkout to collect a shipping address from a customer.
type CheckoutSessionShippingCost ¶
type CheckoutSessionShippingCost struct { // Total shipping cost before any discounts or taxes are applied. AmountSubtotal int64 `json:"amount_subtotal"` // Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. AmountTax int64 `json:"amount_tax"` // Total shipping cost after discounts and taxes are applied. AmountTotal int64 `json:"amount_total"` // The ID of the ShippingRate for this order. ShippingRate *ShippingRate `json:"shipping_rate"` // The taxes applied to the shipping rate. Taxes []*CheckoutSessionShippingCostTax `json:"taxes"` }
The details of the customer cost of shipping, including the customer chosen ShippingRate.
type CheckoutSessionShippingCostTax ¶
type CheckoutSessionShippingCostTax struct { // Amount of tax applied for this rate. Amount int64 `json:"amount"` // Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. // // Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason CheckoutSessionShippingCostTaxTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` }
The taxes applied to the shipping rate.
type CheckoutSessionShippingCostTaxTaxabilityReason ¶
type CheckoutSessionShippingCostTaxTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( CheckoutSessionShippingCostTaxTaxabilityReasonCustomerExempt CheckoutSessionShippingCostTaxTaxabilityReason = "customer_exempt" CheckoutSessionShippingCostTaxTaxabilityReasonNotCollecting CheckoutSessionShippingCostTaxTaxabilityReason = "not_collecting" CheckoutSessionShippingCostTaxTaxabilityReasonNotSubjectToTax CheckoutSessionShippingCostTaxTaxabilityReason = "not_subject_to_tax" CheckoutSessionShippingCostTaxTaxabilityReasonNotSupported CheckoutSessionShippingCostTaxTaxabilityReason = "not_supported" CheckoutSessionShippingCostTaxTaxabilityReasonPortionProductExempt CheckoutSessionShippingCostTaxTaxabilityReason = "portion_product_exempt" CheckoutSessionShippingCostTaxTaxabilityReasonPortionReducedRated CheckoutSessionShippingCostTaxTaxabilityReason = "portion_reduced_rated" CheckoutSessionShippingCostTaxTaxabilityReasonPortionStandardRated CheckoutSessionShippingCostTaxTaxabilityReason = "portion_standard_rated" CheckoutSessionShippingCostTaxTaxabilityReasonProductExempt CheckoutSessionShippingCostTaxTaxabilityReason = "product_exempt" CheckoutSessionShippingCostTaxTaxabilityReasonProductExemptHoliday CheckoutSessionShippingCostTaxTaxabilityReason = "product_exempt_holiday" CheckoutSessionShippingCostTaxTaxabilityReasonProportionallyRated CheckoutSessionShippingCostTaxTaxabilityReason = "proportionally_rated" CheckoutSessionShippingCostTaxTaxabilityReasonReducedRated CheckoutSessionShippingCostTaxTaxabilityReason = "reduced_rated" CheckoutSessionShippingCostTaxTaxabilityReasonReverseCharge CheckoutSessionShippingCostTaxTaxabilityReason = "reverse_charge" CheckoutSessionShippingCostTaxTaxabilityReasonStandardRated CheckoutSessionShippingCostTaxTaxabilityReason = "standard_rated" CheckoutSessionShippingCostTaxTaxabilityReasonTaxableBasisReduced CheckoutSessionShippingCostTaxTaxabilityReason = "taxable_basis_reduced" CheckoutSessionShippingCostTaxTaxabilityReasonZeroRated CheckoutSessionShippingCostTaxTaxabilityReason = "zero_rated" )
List of values that CheckoutSessionShippingCostTaxTaxabilityReason can take
type CheckoutSessionShippingOption ¶
type CheckoutSessionShippingOption struct { // A non-negative integer in cents representing how much to charge. ShippingAmount int64 `json:"shipping_amount"` // The shipping rate. ShippingRate *ShippingRate `json:"shipping_rate"` }
The shipping rate options applied to this Session.
type CheckoutSessionShippingOptionParams ¶
type CheckoutSessionShippingOptionParams struct { // The ID of the Shipping Rate to use for this shipping option. ShippingRate *string `form:"shipping_rate"` // Parameters to be passed to Shipping Rate creation for this shipping option ShippingRateData *CheckoutSessionShippingOptionShippingRateDataParams `form:"shipping_rate_data"` }
The shipping rate options to apply to this Session. Up to a maximum of 5.
type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMaximumParams ¶
type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMaximumParams struct { // A unit of time. Unit *string `form:"unit"` // Must be greater than 0. Value *int64 `form:"value"` }
The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMinimumParams ¶
type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMinimumParams struct { // A unit of time. Unit *string `form:"unit"` // Must be greater than 0. Value *int64 `form:"value"` }
The lower bound of the estimated range. If empty, represents no lower bound.
type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateParams ¶
type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateParams struct { // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. Maximum *CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMaximumParams `form:"maximum"` // The lower bound of the estimated range. If empty, represents no lower bound. Minimum *CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMinimumParams `form:"minimum"` }
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
type CheckoutSessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams ¶
type CheckoutSessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams struct { // A non-negative integer in cents representing how much to charge. Amount *int64 `form:"amount"` // Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. TaxBehavior *string `form:"tax_behavior"` }
Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type CheckoutSessionShippingOptionShippingRateDataFixedAmountParams ¶
type CheckoutSessionShippingOptionShippingRateDataFixedAmountParams struct { // A non-negative integer in cents representing how much to charge. Amount *int64 `form:"amount"` // 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 `form:"currency"` // Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*CheckoutSessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams `form:"currency_options"` }
Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
type CheckoutSessionShippingOptionShippingRateDataParams ¶
type CheckoutSessionShippingOptionShippingRateDataParams struct { // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. DeliveryEstimate *CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateParams `form:"delivery_estimate"` // The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. DisplayName *string `form:"display_name"` // Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. FixedAmount *CheckoutSessionShippingOptionShippingRateDataFixedAmountParams `form:"fixed_amount"` // 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`. Metadata map[string]string `form:"metadata"` // Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. TaxCode *string `form:"tax_code"` // The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. Type *string `form:"type"` }
Parameters to be passed to Shipping Rate creation for this shipping option
func (*CheckoutSessionShippingOptionShippingRateDataParams) AddMetadata ¶
func (p *CheckoutSessionShippingOptionShippingRateDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CheckoutSessionStatus ¶
type CheckoutSessionStatus string
The status of the Checkout Session, one of `open`, `complete`, or `expired`.
const ( CheckoutSessionStatusComplete CheckoutSessionStatus = "complete" CheckoutSessionStatusExpired CheckoutSessionStatus = "expired" CheckoutSessionStatusOpen CheckoutSessionStatus = "open" )
List of values that CheckoutSessionStatus can take
type CheckoutSessionSubmitType ¶
type CheckoutSessionSubmitType string
Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. `submit_type` can only be specified on Checkout Sessions in `payment` mode, but not Checkout Sessions in `subscription` or `setup` mode.
const ( CheckoutSessionSubmitTypeAuto CheckoutSessionSubmitType = "auto" CheckoutSessionSubmitTypeBook CheckoutSessionSubmitType = "book" CheckoutSessionSubmitTypeDonate CheckoutSessionSubmitType = "donate" CheckoutSessionSubmitTypePay CheckoutSessionSubmitType = "pay" )
List of values that CheckoutSessionSubmitType can take
type CheckoutSessionSubscriptionDataParams ¶
type CheckoutSessionSubscriptionDataParams struct { // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). ApplicationFeePercent *float64 `form:"application_fee_percent"` // A future timestamp to anchor the subscription's billing cycle for new subscriptions. BillingCycleAnchor *int64 `form:"billing_cycle_anchor"` // The tax rates that will apply to any subscription item that does not have // `tax_rates` set. Invoices created will have their `default_tax_rates` populated // from the subscription. DefaultTaxRates []*string `form:"default_tax_rates"` // The subscription's description, meant to be displayable to the customer. // Use this field to optionally store an explanation of the subscription // for rendering in the [customer portal](https://stripe.com/docs/customer-management). Description *string `form:"description"` // 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`. Metadata map[string]string `form:"metadata"` // The account on behalf of which to charge, for each of the subscription's invoices. OnBehalfOf *string `form:"on_behalf_of"` // Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. ProrationBehavior *string `form:"proration_behavior"` // If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. TransferData *CheckoutSessionSubscriptionDataTransferDataParams `form:"transfer_data"` // Unix timestamp representing the end of the trial period the customer // will get before being charged for the first time. Has to be at least // 48 hours in the future. TrialEnd *int64 `form:"trial_end"` // Integer representing the number of trial period days before the // customer is charged for the first time. Has to be at least 1. TrialPeriodDays *int64 `form:"trial_period_days"` // Settings related to subscription trials. TrialSettings *CheckoutSessionSubscriptionDataTrialSettingsParams `form:"trial_settings"` }
A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
func (*CheckoutSessionSubscriptionDataParams) AddMetadata ¶
func (p *CheckoutSessionSubscriptionDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CheckoutSessionSubscriptionDataTransferDataParams ¶
type CheckoutSessionSubscriptionDataTransferDataParams struct { // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. AmountPercent *float64 `form:"amount_percent"` // ID of an existing, connected Stripe account. Destination *string `form:"destination"` }
If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
type CheckoutSessionSubscriptionDataTrialSettingsEndBehaviorParams ¶
type CheckoutSessionSubscriptionDataTrialSettingsEndBehaviorParams struct { // Indicates how the subscription should change when the trial ends if the user did not provide a payment method. MissingPaymentMethod *string `form:"missing_payment_method"` }
Defines how the subscription should behave when the user's free trial ends.
type CheckoutSessionSubscriptionDataTrialSettingsParams ¶
type CheckoutSessionSubscriptionDataTrialSettingsParams struct { // Defines how the subscription should behave when the user's free trial ends. EndBehavior *CheckoutSessionSubscriptionDataTrialSettingsEndBehaviorParams `form:"end_behavior"` }
Settings related to subscription trials.
type CheckoutSessionTaxIDCollection ¶
type CheckoutSessionTaxIDCollection struct { // Indicates whether tax ID collection is enabled for the session Enabled bool `json:"enabled"` }
type CheckoutSessionTaxIDCollectionParams ¶
type CheckoutSessionTaxIDCollectionParams struct { // Set to true to enable Tax ID collection. Enabled *bool `form:"enabled"` }
Controls tax ID collection settings for the session.
type CheckoutSessionTotalDetails ¶
type CheckoutSessionTotalDetails struct { // This is the sum of all the discounts. AmountDiscount int64 `json:"amount_discount"` // This is the sum of all the shipping amounts. AmountShipping int64 `json:"amount_shipping"` // This is the sum of all the tax amounts. AmountTax int64 `json:"amount_tax"` Breakdown *CheckoutSessionTotalDetailsBreakdown `json:"breakdown"` }
Tax and discount details for the computed total amount.
type CheckoutSessionTotalDetailsBreakdown ¶
type CheckoutSessionTotalDetailsBreakdown struct { // The aggregated discounts. Discounts []*CheckoutSessionTotalDetailsBreakdownDiscount `json:"discounts"` // The aggregated tax amounts by rate. Taxes []*CheckoutSessionTotalDetailsBreakdownTax `json:"taxes"` }
type CheckoutSessionTotalDetailsBreakdownDiscount ¶
type CheckoutSessionTotalDetailsBreakdownDiscount struct { // The amount discounted. Amount int64 `json:"amount"` // A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). // It contains information about when the discount began, when it will end, and what it is applied to. // // Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) Discount *Discount `json:"discount"` }
The aggregated discounts.
type CheckoutSessionTotalDetailsBreakdownTax ¶
type CheckoutSessionTotalDetailsBreakdownTax struct { // Amount of tax applied for this rate. Amount int64 `json:"amount"` // Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. // // Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` }
The aggregated tax amounts by rate.
type CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason ¶
type CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotSupported CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_supported" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProductExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonReducedRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonStandardRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced" CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonZeroRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated" )
List of values that CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason can take
type CheckoutSessionUIMode ¶ added in v75.10.0
type CheckoutSessionUIMode string
The UI mode of the Session. Can be `hosted` (default) or `embedded`.
const ( CheckoutSessionUIModeEmbedded CheckoutSessionUIMode = "embedded" CheckoutSessionUIModeHosted CheckoutSessionUIMode = "hosted" )
List of values that CheckoutSessionUIMode can take
type ConnectCollectionTransfer ¶
type ConnectCollectionTransfer struct { // Amount transferred, in cents (or local equivalent). Amount int64 `json:"amount"` // 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 Currency `json:"currency"` // ID of the account that funds are being collected for. Destination *Account `json:"destination"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` }
func (*ConnectCollectionTransfer) UnmarshalJSON ¶
func (c *ConnectCollectionTransfer) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a ConnectCollectionTransfer. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type CountrySpec ¶
type CountrySpec struct { APIResource // The default currency for this country. This applies to both payment methods and bank accounts. DefaultCurrency Currency `json:"default_currency"` // Unique identifier for the object. Represented as the ISO country code for this country. ID string `json:"id"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Currencies that can be accepted in the specific country (for transfers). SupportedBankAccountCurrencies map[Currency][]Country `json:"supported_bank_account_currencies"` // Currencies that can be accepted in the specified country (for payments). SupportedPaymentCurrencies []Currency `json:"supported_payment_currencies"` // Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). SupportedPaymentMethods []string `json:"supported_payment_methods"` // Countries that can accept transfers from the specified country. SupportedTransferCountries []string `json:"supported_transfer_countries"` VerificationFields map[AccountBusinessType]*VerificationFieldsList `json:"verification_fields"` }
Stripe needs to collect certain pieces of information about each account created. These requirements can differ depending on the account's country. The Country Specs API makes these rules available to your integration.
You can also view the information from this API call as [an online guide](https://stripe.com/docs/connect/required-verification-information).
type CountrySpecList ¶
type CountrySpecList struct { APIResource ListMeta Data []*CountrySpec `json:"data"` }
CountrySpecList is a list of CountrySpecs as retrieved from a list endpoint.
type CountrySpecListParams ¶
type CountrySpecListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Lists all Country Spec objects available in the API.
func (*CountrySpecListParams) AddExpand ¶
func (p *CountrySpecListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CountrySpecParams ¶
type CountrySpecParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a Country Spec for a given Country code.
func (*CountrySpecParams) AddExpand ¶
func (p *CountrySpecParams) AddExpand(f string)
AddExpand appends a new field to expand.
type Coupon ¶
type Coupon struct { APIResource // Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. AmountOff int64 `json:"amount_off"` AppliesTo *CouponAppliesTo `json:"applies_to"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. Currency Currency `json:"currency"` // Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*CouponCurrencyOptions `json:"currency_options"` Deleted bool `json:"deleted"` // One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. Duration CouponDuration `json:"duration"` // If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. DurationInMonths int64 `json:"duration_in_months"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. MaxRedemptions int64 `json:"max_redemptions"` // 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. Metadata map[string]string `json:"metadata"` // Name of the coupon displayed to customers on for instance invoices or receipts. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. PercentOff float64 `json:"percent_off"` // Date after which the coupon can no longer be redeemed. RedeemBy int64 `json:"redeem_by"` // Number of times this coupon has been applied to a customer. TimesRedeemed int64 `json:"times_redeemed"` // Taking account of the above properties, whether this coupon can still be applied to a customer. Valid bool `json:"valid"` }
A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
func (*Coupon) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Coupon. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type CouponAppliesTo ¶
type CouponAppliesTo struct { // A list of product IDs this coupon applies to Products []string `json:"products"` }
type CouponAppliesToParams ¶
type CouponAppliesToParams struct { // An array of Product IDs that this Coupon will apply to. Products []*string `form:"products"` }
A hash containing directions for what this Coupon will apply discounts to.
type CouponCurrencyOptions ¶
type CouponCurrencyOptions struct { // Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. AmountOff int64 `json:"amount_off"` }
Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type CouponCurrencyOptionsParams ¶
type CouponCurrencyOptionsParams struct { // A positive integer representing the amount to subtract from an invoice total. AmountOff *int64 `form:"amount_off"` }
Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type CouponDuration ¶
type CouponDuration string
One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.
const ( CouponDurationForever CouponDuration = "forever" CouponDurationOnce CouponDuration = "once" CouponDurationRepeating CouponDuration = "repeating" )
List of values that CouponDuration can take
type CouponList ¶
type CouponList struct { APIResource ListMeta Data []*Coupon `json:"data"` }
CouponList is a list of Coupons as retrieved from a list endpoint.
type CouponListParams ¶
type CouponListParams struct { ListParams `form:"*"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. Created *int64 `form:"created"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of your coupons.
func (*CouponListParams) AddExpand ¶
func (p *CouponListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CouponParams ¶
type CouponParams struct { Params `form:"*"` // A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). AmountOff *int64 `form:"amount_off"` // A hash containing directions for what this Coupon will apply discounts to. AppliesTo *CouponAppliesToParams `form:"applies_to"` // Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). Currency *string `form:"currency"` // Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*CouponCurrencyOptionsParams `form:"currency_options"` // Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. Duration *string `form:"duration"` // Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. DurationInMonths *int64 `form:"duration_in_months"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. ID *string `form:"id"` // A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. MaxRedemptions *int64 `form:"max_redemptions"` // 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`. Metadata map[string]string `form:"metadata"` // Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. Name *string `form:"name"` // A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). PercentOff *float64 `form:"percent_off"` // Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. RedeemBy *int64 `form:"redeem_by"` }
You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.
func (*CouponParams) AddExpand ¶
func (p *CouponParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*CouponParams) AddMetadata ¶
func (p *CouponParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CreditNote ¶
type CreditNote struct { APIResource // The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. Amount int64 `json:"amount"` // This is the sum of all the shipping amounts. AmountShipping int64 `json:"amount_shipping"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // ID of the customer. Customer *Customer `json:"customer"` // Customer balance transaction related to this credit note. CustomerBalanceTransaction *CustomerBalanceTransaction `json:"customer_balance_transaction"` // The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. DiscountAmount int64 `json:"discount_amount"` // The aggregate amounts calculated per discount for all line items. DiscountAmounts []*CreditNoteDiscountAmount `json:"discount_amounts"` // The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. EffectiveAt int64 `json:"effective_at"` // Unique identifier for the object. ID string `json:"id"` // ID of the invoice. Invoice *Invoice `json:"invoice"` // Line items that make up the credit note Lines *CreditNoteLineItemList `json:"lines"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // Customer-facing text that appears on the credit note PDF. Memo string `json:"memo"` // 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. Metadata map[string]string `json:"metadata"` // A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. Number string `json:"number"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Amount that was credited outside of Stripe. OutOfBandAmount int64 `json:"out_of_band_amount"` // The link to download the PDF of the credit note. PDF string `json:"pdf"` // Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` Reason CreditNoteReason `json:"reason"` // Refund related to this credit note. Refund *Refund `json:"refund"` // The details of the cost of shipping, including the ShippingRate applied to the invoice. ShippingCost *CreditNoteShippingCost `json:"shipping_cost"` // Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). Status CreditNoteStatus `json:"status"` // The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. Subtotal int64 `json:"subtotal"` // The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"` // The aggregate amounts calculated per tax rate for all line items. TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"` // The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. Total int64 `json:"total"` // The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. TotalExcludingTax int64 `json:"total_excluding_tax"` // Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. Type CreditNoteType `json:"type"` // The time that the credit note was voided. VoidedAt int64 `json:"voided_at"` }
Issue a credit note to adjust an invoice's amount after the invoice is finalized.
Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes)
func (*CreditNote) UnmarshalJSON ¶
func (c *CreditNote) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a CreditNote. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type CreditNoteDiscountAmount ¶
type CreditNoteDiscountAmount struct { // The amount, in cents (or local equivalent), of the discount. Amount int64 `json:"amount"` // The discount that was applied to get this discount amount. Discount *Discount `json:"discount"` }
The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
type CreditNoteLineItem ¶
type CreditNoteLineItem struct { // The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. Amount int64 `json:"amount"` // The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. AmountExcludingTax int64 `json:"amount_excluding_tax"` // Description of the item being credited. Description string `json:"description"` // The integer amount in cents (or local equivalent) representing the discount being credited for this line item. DiscountAmount int64 `json:"discount_amount"` // The amount of discount calculated per discount for this line item DiscountAmounts []*CreditNoteLineItemDiscountAmount `json:"discount_amounts"` // Unique identifier for the object. ID string `json:"id"` // ID of the invoice line item being credited InvoiceLineItem string `json:"invoice_line_item"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The number of units of product being credited. Quantity int64 `json:"quantity"` // The amount of tax calculated per tax rate for this line item TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"` // The tax rates which apply to the line item. TaxRates []*TaxRate `json:"tax_rates"` // The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. Type CreditNoteLineItemType `json:"type"` // The cost of each unit of product being credited. UnitAmount int64 `json:"unit_amount"` // Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` // The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. UnitAmountExcludingTax float64 `json:"unit_amount_excluding_tax,string"` }
CreditNoteLineItem is the resource representing a Stripe credit note line item. For more details see https://stripe.com/docs/api/credit_notes/line_item The credit note line item object
type CreditNoteLineItemDiscountAmount ¶
type CreditNoteLineItemDiscountAmount struct { // The amount, in cents (or local equivalent), of the discount. Amount int64 `json:"amount"` // The discount that was applied to get this discount amount. Discount *Discount `json:"discount"` }
The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
type CreditNoteLineItemList ¶
type CreditNoteLineItemList struct { APIResource ListMeta Data []*CreditNoteLineItem `json:"data"` }
CreditNoteLineItemList is a list of CreditNoteLineItems as retrieved from a list endpoint.
type CreditNoteLineItemType ¶
type CreditNoteLineItemType string
The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.
const ( CreditNoteLineItemTypeCustomLineItem CreditNoteLineItemType = "custom_line_item" CreditNoteLineItemTypeInvoiceLineItem CreditNoteLineItemType = "invoice_line_item" )
List of values that CreditNoteLineItemType can take
type CreditNoteLineParams ¶
type CreditNoteLineParams struct { // The line item amount to credit. Only valid when `type` is `invoice_line_item`. Amount *int64 `form:"amount"` // The description of the credit note line item. Only valid when the `type` is `custom_line_item`. Description *string `form:"description"` // The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. InvoiceLineItem *string `form:"invoice_line_item"` // The line item quantity to credit. Quantity *int64 `form:"quantity"` // The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`. TaxRates []*string `form:"tax_rates"` // Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` Type *string `form:"type"` // The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Line items that make up the credit note.
type CreditNoteList ¶
type CreditNoteList struct { APIResource ListMeta Data []*CreditNote `json:"data"` }
CreditNoteList is a list of CreditNotes as retrieved from a list endpoint.
type CreditNoteListLinesParams ¶
type CreditNoteListLinesParams struct { ListParams `form:"*"` CreditNote *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
func (*CreditNoteListLinesParams) AddExpand ¶
func (p *CreditNoteListLinesParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CreditNoteListParams ¶
type CreditNoteListParams struct { ListParams `form:"*"` // Only return credit notes for the customer specified by this customer ID. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return credit notes for the invoice specified by this invoice ID. Invoice *string `form:"invoice"` }
Returns a list of credit notes.
func (*CreditNoteListParams) AddExpand ¶
func (p *CreditNoteListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CreditNoteParams ¶
type CreditNoteParams struct { Params `form:"*"` // The integer amount in cents (or local equivalent) representing the total amount of the credit note. Amount *int64 `form:"amount"` // The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. CreditAmount *int64 `form:"credit_amount"` // The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. EffectiveAt *int64 `form:"effective_at"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // ID of the invoice. Invoice *string `form:"invoice"` // Line items that make up the credit note. Lines []*CreditNoteLineParams `form:"lines"` // The credit note's memo appears on the credit note PDF. Memo *string `form:"memo"` // 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`. Metadata map[string]string `form:"metadata"` // The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. OutOfBandAmount *int64 `form:"out_of_band_amount"` // Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` Reason *string `form:"reason"` // ID of an existing refund to link this credit note to. Refund *string `form:"refund"` // The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. RefundAmount *int64 `form:"refund_amount"` // When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. ShippingCost *CreditNoteShippingCostParams `form:"shipping_cost"` }
Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result 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).
For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount or post_payment_credit_notes_amount depending on its status at the time of credit note creation.
func (*CreditNoteParams) AddExpand ¶
func (p *CreditNoteParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*CreditNoteParams) AddMetadata ¶
func (p *CreditNoteParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CreditNotePreviewLineParams ¶
type CreditNotePreviewLineParams struct { // The line item amount to credit. Only valid when `type` is `invoice_line_item`. Amount *int64 `form:"amount"` // The description of the credit note line item. Only valid when the `type` is `custom_line_item`. Description *string `form:"description"` // The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. InvoiceLineItem *string `form:"invoice_line_item"` // The line item quantity to credit. Quantity *int64 `form:"quantity"` // The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`. TaxRates []*string `form:"tax_rates"` // Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` Type *string `form:"type"` // The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Line items that make up the credit note.
type CreditNotePreviewLinesLineParams ¶
type CreditNotePreviewLinesLineParams struct { // The line item amount to credit. Only valid when `type` is `invoice_line_item`. Amount *int64 `form:"amount"` // The description of the credit note line item. Only valid when the `type` is `custom_line_item`. Description *string `form:"description"` // The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. InvoiceLineItem *string `form:"invoice_line_item"` // The line item quantity to credit. Quantity *int64 `form:"quantity"` // The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`. TaxRates []*string `form:"tax_rates"` // Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` Type *string `form:"type"` // The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Line items that make up the credit note.
type CreditNotePreviewLinesParams ¶
type CreditNotePreviewLinesParams struct { ListParams `form:"*"` // The integer amount in cents (or local equivalent) representing the total amount of the credit note. Amount *int64 `form:"amount"` // The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. CreditAmount *int64 `form:"credit_amount"` // The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. EffectiveAt *int64 `form:"effective_at"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // ID of the invoice. Invoice *string `form:"invoice"` // Line items that make up the credit note. Lines []*CreditNotePreviewLinesLineParams `form:"lines"` // The credit note's memo appears on the credit note PDF. Memo *string `form:"memo"` // 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`. Metadata map[string]string `form:"metadata"` // The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. OutOfBandAmount *int64 `form:"out_of_band_amount"` // Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` Reason *string `form:"reason"` // ID of an existing refund to link this credit note to. Refund *string `form:"refund"` // The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. RefundAmount *int64 `form:"refund_amount"` // When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. ShippingCost *CreditNotePreviewLinesShippingCostParams `form:"shipping_cost"` }
When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
func (*CreditNotePreviewLinesParams) AddExpand ¶
func (p *CreditNotePreviewLinesParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*CreditNotePreviewLinesParams) AddMetadata ¶
func (p *CreditNotePreviewLinesParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CreditNotePreviewLinesShippingCostParams ¶
type CreditNotePreviewLinesShippingCostParams struct { // The ID of the shipping rate to use for this order. ShippingRate *string `form:"shipping_rate"` }
When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
type CreditNotePreviewParams ¶
type CreditNotePreviewParams struct { Params `form:"*"` // The integer amount in cents (or local equivalent) representing the total amount of the credit note. Amount *int64 `form:"amount"` // The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. CreditAmount *int64 `form:"credit_amount"` // The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. EffectiveAt *int64 `form:"effective_at"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // ID of the invoice. Invoice *string `form:"invoice"` // Line items that make up the credit note. Lines []*CreditNotePreviewLineParams `form:"lines"` // The credit note's memo appears on the credit note PDF. Memo *string `form:"memo"` // 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`. Metadata map[string]string `form:"metadata"` // The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. OutOfBandAmount *int64 `form:"out_of_band_amount"` // Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` Reason *string `form:"reason"` // ID of an existing refund to link this credit note to. Refund *string `form:"refund"` // The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. RefundAmount *int64 `form:"refund_amount"` // When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. ShippingCost *CreditNotePreviewShippingCostParams `form:"shipping_cost"` }
Get a preview of a credit note without creating it.
func (*CreditNotePreviewParams) AddExpand ¶
func (p *CreditNotePreviewParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*CreditNotePreviewParams) AddMetadata ¶
func (p *CreditNotePreviewParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CreditNotePreviewShippingCostParams ¶
type CreditNotePreviewShippingCostParams struct { // The ID of the shipping rate to use for this order. ShippingRate *string `form:"shipping_rate"` }
When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
type CreditNoteReason ¶
type CreditNoteReason string
Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
const ( CreditNoteReasonDuplicate CreditNoteReason = "duplicate" CreditNoteReasonFraudulent CreditNoteReason = "fraudulent" CreditNoteReasonOrderChange CreditNoteReason = "order_change" CreditNoteReasonProductUnsatisfactory CreditNoteReason = "product_unsatisfactory" )
List of values that CreditNoteReason can take
type CreditNoteShippingCost ¶
type CreditNoteShippingCost struct { // Total shipping cost before any taxes are applied. AmountSubtotal int64 `json:"amount_subtotal"` // Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. AmountTax int64 `json:"amount_tax"` // Total shipping cost after taxes are applied. AmountTotal int64 `json:"amount_total"` // The ID of the ShippingRate for this invoice. ShippingRate *ShippingRate `json:"shipping_rate"` // The taxes applied to the shipping rate. Taxes []*CreditNoteShippingCostTax `json:"taxes"` }
The details of the cost of shipping, including the ShippingRate applied to the invoice.
type CreditNoteShippingCostParams ¶
type CreditNoteShippingCostParams struct { // The ID of the shipping rate to use for this order. ShippingRate *string `form:"shipping_rate"` }
When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
type CreditNoteShippingCostTax ¶
type CreditNoteShippingCostTax struct { // Amount of tax applied for this rate. Amount int64 `json:"amount"` // Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. // // Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason CreditNoteShippingCostTaxTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` }
The taxes applied to the shipping rate.
type CreditNoteShippingCostTaxTaxabilityReason ¶
type CreditNoteShippingCostTaxTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( CreditNoteShippingCostTaxTaxabilityReasonCustomerExempt CreditNoteShippingCostTaxTaxabilityReason = "customer_exempt" CreditNoteShippingCostTaxTaxabilityReasonNotCollecting CreditNoteShippingCostTaxTaxabilityReason = "not_collecting" CreditNoteShippingCostTaxTaxabilityReasonNotSubjectToTax CreditNoteShippingCostTaxTaxabilityReason = "not_subject_to_tax" CreditNoteShippingCostTaxTaxabilityReasonNotSupported CreditNoteShippingCostTaxTaxabilityReason = "not_supported" CreditNoteShippingCostTaxTaxabilityReasonPortionProductExempt CreditNoteShippingCostTaxTaxabilityReason = "portion_product_exempt" CreditNoteShippingCostTaxTaxabilityReasonPortionReducedRated CreditNoteShippingCostTaxTaxabilityReason = "portion_reduced_rated" CreditNoteShippingCostTaxTaxabilityReasonPortionStandardRated CreditNoteShippingCostTaxTaxabilityReason = "portion_standard_rated" CreditNoteShippingCostTaxTaxabilityReasonProductExempt CreditNoteShippingCostTaxTaxabilityReason = "product_exempt" CreditNoteShippingCostTaxTaxabilityReasonProductExemptHoliday CreditNoteShippingCostTaxTaxabilityReason = "product_exempt_holiday" CreditNoteShippingCostTaxTaxabilityReasonProportionallyRated CreditNoteShippingCostTaxTaxabilityReason = "proportionally_rated" CreditNoteShippingCostTaxTaxabilityReasonReducedRated CreditNoteShippingCostTaxTaxabilityReason = "reduced_rated" CreditNoteShippingCostTaxTaxabilityReasonReverseCharge CreditNoteShippingCostTaxTaxabilityReason = "reverse_charge" CreditNoteShippingCostTaxTaxabilityReasonStandardRated CreditNoteShippingCostTaxTaxabilityReason = "standard_rated" CreditNoteShippingCostTaxTaxabilityReasonTaxableBasisReduced CreditNoteShippingCostTaxTaxabilityReason = "taxable_basis_reduced" CreditNoteShippingCostTaxTaxabilityReasonZeroRated CreditNoteShippingCostTaxTaxabilityReason = "zero_rated" )
List of values that CreditNoteShippingCostTaxTaxabilityReason can take
type CreditNoteStatus ¶
type CreditNoteStatus string
Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
const ( CreditNoteStatusIssued CreditNoteStatus = "issued" CreditNoteStatusVoid CreditNoteStatus = "void" )
List of values that CreditNoteStatus can take
type CreditNoteTaxAmount ¶
type CreditNoteTaxAmount struct { // The amount, in cents (or local equivalent), of the tax. Amount int64 `json:"amount"` // Whether this tax amount is inclusive or exclusive. Inclusive bool `json:"inclusive"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason CreditNoteTaxAmountTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` // The tax rate that was applied to get this tax amount. TaxRate *TaxRate `json:"tax_rate"` }
The aggregate amounts calculated per tax rate for all line items.
type CreditNoteTaxAmountTaxabilityReason ¶
type CreditNoteTaxAmountTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( CreditNoteTaxAmountTaxabilityReasonCustomerExempt CreditNoteTaxAmountTaxabilityReason = "customer_exempt" CreditNoteTaxAmountTaxabilityReasonNotCollecting CreditNoteTaxAmountTaxabilityReason = "not_collecting" CreditNoteTaxAmountTaxabilityReasonNotSubjectToTax CreditNoteTaxAmountTaxabilityReason = "not_subject_to_tax" CreditNoteTaxAmountTaxabilityReasonNotSupported CreditNoteTaxAmountTaxabilityReason = "not_supported" CreditNoteTaxAmountTaxabilityReasonPortionProductExempt CreditNoteTaxAmountTaxabilityReason = "portion_product_exempt" CreditNoteTaxAmountTaxabilityReasonPortionReducedRated CreditNoteTaxAmountTaxabilityReason = "portion_reduced_rated" CreditNoteTaxAmountTaxabilityReasonPortionStandardRated CreditNoteTaxAmountTaxabilityReason = "portion_standard_rated" CreditNoteTaxAmountTaxabilityReasonProductExempt CreditNoteTaxAmountTaxabilityReason = "product_exempt" CreditNoteTaxAmountTaxabilityReasonProductExemptHoliday CreditNoteTaxAmountTaxabilityReason = "product_exempt_holiday" CreditNoteTaxAmountTaxabilityReasonProportionallyRated CreditNoteTaxAmountTaxabilityReason = "proportionally_rated" CreditNoteTaxAmountTaxabilityReasonReducedRated CreditNoteTaxAmountTaxabilityReason = "reduced_rated" CreditNoteTaxAmountTaxabilityReasonReverseCharge CreditNoteTaxAmountTaxabilityReason = "reverse_charge" CreditNoteTaxAmountTaxabilityReasonStandardRated CreditNoteTaxAmountTaxabilityReason = "standard_rated" CreditNoteTaxAmountTaxabilityReasonTaxableBasisReduced CreditNoteTaxAmountTaxabilityReason = "taxable_basis_reduced" CreditNoteTaxAmountTaxabilityReasonZeroRated CreditNoteTaxAmountTaxabilityReason = "zero_rated" )
List of values that CreditNoteTaxAmountTaxabilityReason can take
type CreditNoteType ¶
type CreditNoteType string
Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.
const ( CreditNoteTypePostPayment CreditNoteType = "post_payment" CreditNoteTypePrePayment CreditNoteType = "pre_payment" )
List of values that CreditNoteType can take
type CreditNoteVoidCreditNoteParams ¶
type CreditNoteVoidCreditNoteParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
func (*CreditNoteVoidCreditNoteParams) AddExpand ¶
func (p *CreditNoteVoidCreditNoteParams) AddExpand(f string)
AddExpand appends a new field to expand.
type Currency ¶
type Currency string
Currency is the list of supported currencies. For more details see https://support.stripe.com/questions/which-currencies-does-stripe-support.
const ( CurrencyAED Currency = "aed" // United Arab Emirates Dirham CurrencyAFN Currency = "afn" // Afghan Afghani CurrencyALL Currency = "all" // Albanian Lek CurrencyAMD Currency = "amd" // Armenian Dram CurrencyANG Currency = "ang" // Netherlands Antillean Gulden CurrencyAOA Currency = "aoa" // Angolan Kwanza CurrencyARS Currency = "ars" // Argentine Peso CurrencyAUD Currency = "aud" // Australian Dollar CurrencyAWG Currency = "awg" // Aruban Florin CurrencyAZN Currency = "azn" // Azerbaijani Manat CurrencyBAM Currency = "bam" // Bosnia & Herzegovina Convertible Mark CurrencyBBD Currency = "bbd" // Barbadian Dollar CurrencyBDT Currency = "bdt" // Bangladeshi Taka CurrencyBGN Currency = "bgn" // Bulgarian Lev CurrencyBIF Currency = "bif" // Burundian Franc CurrencyBMD Currency = "bmd" // Bermudian Dollar CurrencyBND Currency = "bnd" // Brunei Dollar CurrencyBOB Currency = "bob" // Bolivian Boliviano CurrencyBRL Currency = "brl" // Brazilian Real CurrencyBSD Currency = "bsd" // Bahamian Dollar CurrencyBWP Currency = "bwp" // Botswana Pula CurrencyBZD Currency = "bzd" // Belize Dollar CurrencyCAD Currency = "cad" // Canadian Dollar CurrencyCDF Currency = "cdf" // Congolese Franc CurrencyCHF Currency = "chf" // Swiss Franc CurrencyCLP Currency = "clp" // Chilean Peso CurrencyCNY Currency = "cny" // Chinese Renminbi Yuan CurrencyCOP Currency = "cop" // Colombian Peso CurrencyCRC Currency = "crc" // Costa Rican Colón CurrencyCVE Currency = "cve" // Cape Verdean Escudo CurrencyCZK Currency = "czk" // Czech Koruna CurrencyDJF Currency = "djf" // Djiboutian Franc CurrencyDKK Currency = "dkk" // Danish Krone CurrencyDOP Currency = "dop" // Dominican Peso CurrencyDZD Currency = "dzd" // Algerian Dinar CurrencyEEK Currency = "eek" // Estonian Kroon CurrencyEGP Currency = "egp" // Egyptian Pound CurrencyETB Currency = "etb" // Ethiopian Birr CurrencyEUR Currency = "eur" // Euro CurrencyFJD Currency = "fjd" // Fijian Dollar CurrencyFKP Currency = "fkp" // Falkland Islands Pound CurrencyGBP Currency = "gbp" // British Pound CurrencyGEL Currency = "gel" // Georgian Lari CurrencyGIP Currency = "gip" // Gibraltar Pound CurrencyGMD Currency = "gmd" // Gambian Dalasi CurrencyGNF Currency = "gnf" // Guinean Franc CurrencyGTQ Currency = "gtq" // Guatemalan Quetzal CurrencyGYD Currency = "gyd" // Guyanese Dollar CurrencyHKD Currency = "hkd" // Hong Kong Dollar CurrencyHNL Currency = "hnl" // Honduran Lempira CurrencyHRK Currency = "hrk" // Croatian Kuna CurrencyHTG Currency = "htg" // Haitian Gourde CurrencyHUF Currency = "huf" // Hungarian Forint CurrencyIDR Currency = "idr" // Indonesian Rupiah CurrencyILS Currency = "ils" // Israeli New Sheqel CurrencyINR Currency = "inr" // Indian Rupee CurrencyISK Currency = "isk" // Icelandic Króna CurrencyJMD Currency = "jmd" // Jamaican Dollar CurrencyJPY Currency = "jpy" // Japanese Yen CurrencyKES Currency = "kes" // Kenyan Shilling CurrencyKGS Currency = "kgs" // Kyrgyzstani Som CurrencyKHR Currency = "khr" // Cambodian Riel CurrencyKMF Currency = "kmf" // Comorian Franc CurrencyKRW Currency = "krw" // South Korean Won CurrencyKYD Currency = "kyd" // Cayman Islands Dollar CurrencyKZT Currency = "kzt" // Kazakhstani Tenge CurrencyLAK Currency = "lak" // Lao Kip CurrencyLBP Currency = "lbp" // Lebanese Pound CurrencyLKR Currency = "lkr" // Sri Lankan Rupee CurrencyLRD Currency = "lrd" // Liberian Dollar CurrencyLSL Currency = "lsl" // Lesotho Loti CurrencyLTL Currency = "ltl" // Lithuanian Litas CurrencyLVL Currency = "lvl" // Latvian Lats CurrencyMAD Currency = "mad" // Moroccan Dirham CurrencyMDL Currency = "mdl" // Moldovan Leu CurrencyMGA Currency = "mga" // Malagasy Ariary CurrencyMKD Currency = "mkd" // Macedonian Denar CurrencyMNT Currency = "mnt" // Mongolian Tögrög CurrencyMOP Currency = "mop" // Macanese Pataca CurrencyMRO Currency = "mro" // Mauritanian Ouguiya CurrencyMUR Currency = "mur" // Mauritian Rupee CurrencyMVR Currency = "mvr" // Maldivian Rufiyaa CurrencyMWK Currency = "mwk" // Malawian Kwacha CurrencyMXN Currency = "mxn" // Mexican Peso CurrencyMYR Currency = "myr" // Malaysian Ringgit CurrencyMZN Currency = "mzn" // Mozambican Metical CurrencyNAD Currency = "nad" // Namibian Dollar CurrencyNGN Currency = "ngn" // Nigerian Naira CurrencyNIO Currency = "nio" // Nicaraguan Córdoba CurrencyNOK Currency = "nok" // Norwegian Krone CurrencyNPR Currency = "npr" // Nepalese Rupee CurrencyNZD Currency = "nzd" // New Zealand Dollar CurrencyPAB Currency = "pab" // Panamanian Balboa CurrencyPEN Currency = "pen" // Peruvian Nuevo Sol CurrencyPGK Currency = "pgk" // Papua New Guinean Kina CurrencyPHP Currency = "php" // Philippine Peso CurrencyPKR Currency = "pkr" // Pakistani Rupee CurrencyPLN Currency = "pln" // Polish Złoty CurrencyPYG Currency = "pyg" // Paraguayan Guaraní CurrencyQAR Currency = "qar" // Qatari Riyal CurrencyRON Currency = "ron" // Romanian Leu CurrencyRSD Currency = "rsd" // Serbian Dinar CurrencyRUB Currency = "rub" // Russian Ruble CurrencyRWF Currency = "rwf" // Rwandan Franc CurrencySAR Currency = "sar" // Saudi Riyal CurrencySBD Currency = "sbd" // Solomon Islands Dollar CurrencySCR Currency = "scr" // Seychellois Rupee CurrencySEK Currency = "sek" // Swedish Krona CurrencySGD Currency = "sgd" // Singapore Dollar CurrencySHP Currency = "shp" // Saint Helenian Pound CurrencySLL Currency = "sll" // Sierra Leonean Leone CurrencySOS Currency = "sos" // Somali Shilling CurrencySRD Currency = "srd" // Surinamese Dollar CurrencySTD Currency = "std" // São Tomé and Príncipe Dobra CurrencySVC Currency = "svc" // Salvadoran Colón CurrencySZL Currency = "szl" // Swazi Lilangeni CurrencyTHB Currency = "thb" // Thai Baht CurrencyTJS Currency = "tjs" // Tajikistani Somoni CurrencyTOP Currency = "top" // Tongan Paʻanga CurrencyTRY Currency = "try" // Turkish Lira CurrencyTTD Currency = "ttd" // Trinidad and Tobago Dollar CurrencyTWD Currency = "twd" // New Taiwan Dollar CurrencyTZS Currency = "tzs" // Tanzanian Shilling CurrencyUAH Currency = "uah" // Ukrainian Hryvnia CurrencyUGX Currency = "ugx" // Ugandan Shilling CurrencyUSD Currency = "usd" // United States Dollar CurrencyUYU Currency = "uyu" // Uruguayan Peso CurrencyUZS Currency = "uzs" // Uzbekistani Som CurrencyVEF Currency = "vef" // Venezuelan Bolívar CurrencyVND Currency = "vnd" // Vietnamese Đồng CurrencyVUV Currency = "vuv" // Vanuatu Vatu CurrencyWST Currency = "wst" // Samoan Tala CurrencyXAF Currency = "xaf" // Central African Cfa Franc CurrencyXCD Currency = "xcd" // East Caribbean Dollar CurrencyXOF Currency = "xof" // West African Cfa Franc CurrencyXPF Currency = "xpf" // Cfp Franc CurrencyYER Currency = "yer" // Yemeni Rial CurrencyZAR Currency = "zar" // South African Rand CurrencyZMW Currency = "zmw" // Zambian Kwacha )
List of values that Currency can take.
type Customer ¶
type Customer struct { APIResource // The customer's address. Address *Address `json:"address"` // The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. Balance int64 `json:"balance"` // The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. CashBalance *CashBalance `json:"cash_balance"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. Currency Currency `json:"currency"` // ID of the default payment source for the customer. // // If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. DefaultSource *PaymentSource `json:"default_source"` Deleted bool `json:"deleted"` // Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. // // If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. // // If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. Delinquent bool `json:"delinquent"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // Describes the current discount active on the customer, if there is one. Discount *Discount `json:"discount"` // The customer's email address. Email string `json:"email"` // Unique identifier for the object. ID string `json:"id"` // The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. InvoiceCreditBalance map[string]int64 `json:"invoice_credit_balance"` // The prefix for the customer used to generate unique invoice numbers. InvoicePrefix string `json:"invoice_prefix"` InvoiceSettings *CustomerInvoiceSettings `json:"invoice_settings"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // The customer's full name or business name. Name string `json:"name"` // The suffix of the customer's next invoice number (for example, 0001). NextInvoiceSequence int64 `json:"next_invoice_sequence"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The customer's phone number. Phone string `json:"phone"` // The customer's preferred locales (languages), ordered by preference. PreferredLocales []string `json:"preferred_locales"` // Mailing and shipping address for the customer. Appears on invoices emailed to this customer. Shipping *ShippingDetails `json:"shipping"` Sources *PaymentSourceList `json:"sources"` // The customer's current subscriptions, if any. Subscriptions *SubscriptionList `json:"subscriptions"` Tax *CustomerTax `json:"tax"` // Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. TaxExempt CustomerTaxExempt `json:"tax_exempt"` // The customer's tax IDs. TaxIDs *TaxIDList `json:"tax_ids"` // ID of the test clock that this customer belongs to. TestClock *TestHelpersTestClock `json:"test_clock"` }
This object represents a customer of your business. Use it to create recurring charges and track payments that belong to the same customer.
Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment)
Example (Delete) ¶
package main import ( "log" stripe "github.com/stripe/stripe-go/v75" "github.com/stripe/stripe-go/v75/customer" ) func main() { stripe.Key = "sk_key" customerDel, err := customer.Del("cus_example_id", nil) if err != nil { log.Fatal(err) } if !customerDel.Deleted { log.Fatal("Customer doesn't appear deleted while it should be") } }
Output:
func (*Customer) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Customer. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type CustomerBalanceTransaction ¶
type CustomerBalanceTransaction struct { APIResource // The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. Amount int64 `json:"amount"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The ID of the credit note (if any) related to the transaction. CreditNote *CreditNote `json:"credit_note"` // 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 Currency `json:"currency"` // The ID of the customer the transaction belongs to. Customer *Customer `json:"customer"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. EndingBalance int64 `json:"ending_balance"` // Unique identifier for the object. ID string `json:"id"` // The ID of the invoice (if any) related to the transaction. Invoice *Invoice `json:"invoice"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. Type CustomerBalanceTransactionType `json:"type"` }
Each customer has a Balance(https://stripe.com/docs/api/customers/object#customer_object-balance) value, which denotes a debit or credit that's automatically applied to their next invoice upon finalization. You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.
Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance)
func (*CustomerBalanceTransaction) UnmarshalJSON ¶
func (c *CustomerBalanceTransaction) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a CustomerBalanceTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type CustomerBalanceTransactionList ¶
type CustomerBalanceTransactionList struct { APIResource ListMeta Data []*CustomerBalanceTransaction `json:"data"` }
CustomerBalanceTransactionList is a list of CustomerBalanceTransactions as retrieved from a list endpoint.
type CustomerBalanceTransactionListParams ¶
type CustomerBalanceTransactionListParams struct { ListParams `form:"*"` Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of transactions that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance).
func (*CustomerBalanceTransactionListParams) AddExpand ¶
func (p *CustomerBalanceTransactionListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CustomerBalanceTransactionParams ¶
type CustomerBalanceTransactionParams struct { Params `form:"*"` Customer *string `form:"-"` // Included in URL // The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. Amount *int64 `form:"amount"` // 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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. Currency *string `form:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` }
Retrieves a specific customer balance transaction that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance).
func (*CustomerBalanceTransactionParams) AddExpand ¶
func (p *CustomerBalanceTransactionParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*CustomerBalanceTransactionParams) AddMetadata ¶
func (p *CustomerBalanceTransactionParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CustomerBalanceTransactionType ¶
type CustomerBalanceTransactionType string
Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.
const ( CustomerBalanceTransactionTypeAdjustment CustomerBalanceTransactionType = "adjustment" CustomerBalanceTransactionTypeAppliedToInvoice CustomerBalanceTransactionType = "applied_to_invoice" CustomerBalanceTransactionTypeCreditNote CustomerBalanceTransactionType = "credit_note" CustomerBalanceTransactionTypeInitial CustomerBalanceTransactionType = "initial" CustomerBalanceTransactionTypeInvoiceOverpaid CustomerBalanceTransactionType = "invoice_overpaid" CustomerBalanceTransactionTypeInvoiceTooLarge CustomerBalanceTransactionType = "invoice_too_large" CustomerBalanceTransactionTypeInvoiceTooSmall CustomerBalanceTransactionType = "invoice_too_small" CustomerBalanceTransactionTypeMigration CustomerBalanceTransactionType = "migration" CustomerBalanceTransactionTypeUnappliedFromInvoice CustomerBalanceTransactionType = "unapplied_from_invoice" CustomerBalanceTransactionTypeUnspentReceiverCredit CustomerBalanceTransactionType = "unspent_receiver_credit" )
List of values that CustomerBalanceTransactionType can take
type CustomerCashBalanceParams ¶
type CustomerCashBalanceParams struct { // Settings controlling the behavior of the customer's cash balance, // such as reconciliation of funds received. Settings *CustomerCashBalanceSettingsParams `form:"settings"` }
Balance information and default balance settings for this customer.
type CustomerCashBalanceSettingsParams ¶
type CustomerCashBalanceSettingsParams struct { // Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). ReconciliationMode *string `form:"reconciliation_mode"` }
Settings controlling the behavior of the customer's cash balance, such as reconciliation of funds received.
type CustomerCashBalanceTransaction ¶
type CustomerCashBalanceTransaction struct { APIResource AdjustedForOverdraft *CustomerCashBalanceTransactionAdjustedForOverdraft `json:"adjusted_for_overdraft"` AppliedToPayment *CustomerCashBalanceTransactionAppliedToPayment `json:"applied_to_payment"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // The customer whose available cash balance changed as a result of this transaction. Customer *Customer `json:"customer"` // The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). EndingBalance int64 `json:"ending_balance"` Funded *CustomerCashBalanceTransactionFunded `json:"funded"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. NetAmount int64 `json:"net_amount"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` RefundedFromPayment *CustomerCashBalanceTransactionRefundedFromPayment `json:"refunded_from_payment"` // The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. Type CustomerCashBalanceTransactionType `json:"type"` UnappliedFromPayment *CustomerCashBalanceTransactionUnappliedFromPayment `json:"unapplied_from_payment"` }
Customers with certain payments enabled have a cash balance, representing funds that were paid by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions represent when funds are moved into or out of this balance. This includes funding by the customer, allocation to payments, and refunds to the customer.
func (*CustomerCashBalanceTransaction) UnmarshalJSON ¶
func (c *CustomerCashBalanceTransaction) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a CustomerCashBalanceTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type CustomerCashBalanceTransactionAdjustedForOverdraft ¶
type CustomerCashBalanceTransactionAdjustedForOverdraft struct { // The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` // The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. LinkedTransaction *CustomerCashBalanceTransaction `json:"linked_transaction"` }
type CustomerCashBalanceTransactionAppliedToPayment ¶
type CustomerCashBalanceTransactionAppliedToPayment struct { // The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. PaymentIntent *PaymentIntent `json:"payment_intent"` }
type CustomerCashBalanceTransactionFunded ¶
type CustomerCashBalanceTransactionFunded struct {
BankTransfer *CustomerCashBalanceTransactionFundedBankTransfer `json:"bank_transfer"`
}
type CustomerCashBalanceTransactionFundedBankTransfer ¶
type CustomerCashBalanceTransactionFundedBankTransfer struct { EUBankTransfer *CustomerCashBalanceTransactionFundedBankTransferEUBankTransfer `json:"eu_bank_transfer"` GBBankTransfer *CustomerCashBalanceTransactionFundedBankTransferGBBankTransfer `json:"gb_bank_transfer"` JPBankTransfer *CustomerCashBalanceTransactionFundedBankTransferJPBankTransfer `json:"jp_bank_transfer"` // The user-supplied reference field on the bank transfer. Reference string `json:"reference"` // The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. Type CustomerCashBalanceTransactionFundedBankTransferType `json:"type"` USBankTransfer *CustomerCashBalanceTransactionFundedBankTransferUSBankTransfer `json:"us_bank_transfer"` }
type CustomerCashBalanceTransactionFundedBankTransferEUBankTransfer ¶
type CustomerCashBalanceTransactionFundedBankTransferEUBankTransfer struct { // The BIC of the bank of the sender of the funding. BIC string `json:"bic"` // The last 4 digits of the IBAN of the sender of the funding. IBANLast4 string `json:"iban_last4"` // The full name of the sender, as supplied by the sending bank. SenderName string `json:"sender_name"` }
type CustomerCashBalanceTransactionFundedBankTransferGBBankTransfer ¶
type CustomerCashBalanceTransactionFundedBankTransferGBBankTransfer struct { // The last 4 digits of the account number of the sender of the funding. AccountNumberLast4 string `json:"account_number_last4"` // The full name of the sender, as supplied by the sending bank. SenderName string `json:"sender_name"` // The sort code of the bank of the sender of the funding SortCode string `json:"sort_code"` }
type CustomerCashBalanceTransactionFundedBankTransferJPBankTransfer ¶
type CustomerCashBalanceTransactionFundedBankTransferJPBankTransfer struct { // The name of the bank of the sender of the funding. SenderBank string `json:"sender_bank"` // The name of the bank branch of the sender of the funding. SenderBranch string `json:"sender_branch"` // The full name of the sender, as supplied by the sending bank. SenderName string `json:"sender_name"` }
type CustomerCashBalanceTransactionFundedBankTransferType ¶
type CustomerCashBalanceTransactionFundedBankTransferType string
The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
const ( CustomerCashBalanceTransactionFundedBankTransferTypeEUBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "eu_bank_transfer" CustomerCashBalanceTransactionFundedBankTransferTypeGBBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "gb_bank_transfer" CustomerCashBalanceTransactionFundedBankTransferTypeJPBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "jp_bank_transfer" CustomerCashBalanceTransactionFundedBankTransferTypeMXBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "mx_bank_transfer" CustomerCashBalanceTransactionFundedBankTransferTypeUSBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "us_bank_transfer" )
List of values that CustomerCashBalanceTransactionFundedBankTransferType can take
type CustomerCashBalanceTransactionFundedBankTransferUSBankTransfer ¶
type CustomerCashBalanceTransactionFundedBankTransferUSBankTransfer struct { // The banking network used for this funding. Network CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork `json:"network"` // The full name of the sender, as supplied by the sending bank. SenderName string `json:"sender_name"` }
type CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork ¶
type CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork string
The banking network used for this funding.
const ( CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetworkACH CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork = "ach" CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetworkDomesticWireUS CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork = "domestic_wire_us" CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetworkSwift CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork = "swift" )
List of values that CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork can take
type CustomerCashBalanceTransactionList ¶
type CustomerCashBalanceTransactionList struct { APIResource ListMeta Data []*CustomerCashBalanceTransaction `json:"data"` }
CustomerCashBalanceTransactionList is a list of CustomerCashBalanceTransactions as retrieved from a list endpoint.
type CustomerCashBalanceTransactionListParams ¶
type CustomerCashBalanceTransactionListParams struct { ListParams `form:"*"` Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of transactions that modified the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).
func (*CustomerCashBalanceTransactionListParams) AddExpand ¶
func (p *CustomerCashBalanceTransactionListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CustomerCashBalanceTransactionParams ¶
type CustomerCashBalanceTransactionParams struct { Params `form:"*"` Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).
func (*CustomerCashBalanceTransactionParams) AddExpand ¶
func (p *CustomerCashBalanceTransactionParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CustomerCashBalanceTransactionRefundedFromPayment ¶
type CustomerCashBalanceTransactionRefundedFromPayment struct { // The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. Refund *Refund `json:"refund"` }
type CustomerCashBalanceTransactionType ¶
type CustomerCashBalanceTransactionType string
The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.
const ( CustomerCashBalanceTransactionTypeAdjustedForOverdraft CustomerCashBalanceTransactionType = "adjusted_for_overdraft" CustomerCashBalanceTransactionTypeAppliedToPayment CustomerCashBalanceTransactionType = "applied_to_payment" CustomerCashBalanceTransactionTypeFunded CustomerCashBalanceTransactionType = "funded" CustomerCashBalanceTransactionTypeFundingReversed CustomerCashBalanceTransactionType = "funding_reversed" CustomerCashBalanceTransactionTypeRefundedFromPayment CustomerCashBalanceTransactionType = "refunded_from_payment" CustomerCashBalanceTransactionTypeReturnCanceled CustomerCashBalanceTransactionType = "return_canceled" CustomerCashBalanceTransactionTypeReturnInitiated CustomerCashBalanceTransactionType = "return_initiated" CustomerCashBalanceTransactionTypeUnappliedFromPayment CustomerCashBalanceTransactionType = "unapplied_from_payment" )
List of values that CustomerCashBalanceTransactionType can take
type CustomerCashBalanceTransactionUnappliedFromPayment ¶
type CustomerCashBalanceTransactionUnappliedFromPayment struct { // The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. PaymentIntent *PaymentIntent `json:"payment_intent"` }
type CustomerCreateFundingInstructionsBankTransferEUBankTransferParams ¶
type CustomerCreateFundingInstructionsBankTransferEUBankTransferParams struct { // The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. Country *string `form:"country"` }
Configuration for eu_bank_transfer funding type.
type CustomerCreateFundingInstructionsBankTransferParams ¶
type CustomerCreateFundingInstructionsBankTransferParams struct { // Configuration for eu_bank_transfer funding type. EUBankTransfer *CustomerCreateFundingInstructionsBankTransferEUBankTransferParams `form:"eu_bank_transfer"` // List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. // // Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. RequestedAddressTypes []*string `form:"requested_address_types"` // The type of the `bank_transfer` Type *string `form:"type"` }
Additional parameters for `bank_transfer` funding types
type CustomerCreateFundingInstructionsParams ¶
type CustomerCreateFundingInstructionsParams struct { Params `form:"*"` // Additional parameters for `bank_transfer` funding types BankTransfer *CustomerCreateFundingInstructionsBankTransferParams `form:"bank_transfer"` // 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 `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The `funding_type` to get the instructions for. FundingType *string `form:"funding_type"` }
Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new funding instructions will be created. If funding instructions have already been created for a given customer, the same funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
func (*CustomerCreateFundingInstructionsParams) AddExpand ¶
func (p *CustomerCreateFundingInstructionsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CustomerDeleteDiscountParams ¶
type CustomerDeleteDiscountParams struct {
Params `form:"*"`
}
Removes the currently applied discount on a customer.
type CustomerInvoiceSettings ¶
type CustomerInvoiceSettings struct { // Default custom fields to be displayed on invoices for this customer. CustomFields []*CustomerInvoiceSettingsCustomField `json:"custom_fields"` // ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"` Footer string `json:"footer"` // Default options for invoice PDF rendering for this customer. RenderingOptions *CustomerInvoiceSettingsRenderingOptions `json:"rendering_options"` }
type CustomerInvoiceSettingsCustomField ¶
type CustomerInvoiceSettingsCustomField struct { // The name of the custom field. Name string `json:"name"` // The value of the custom field. Value string `json:"value"` }
Default custom fields to be displayed on invoices for this customer.
type CustomerInvoiceSettingsCustomFieldParams ¶
type CustomerInvoiceSettingsCustomFieldParams struct { // The name of the custom field. This may be up to 30 characters. Name *string `form:"name"` // The value of the custom field. This may be up to 30 characters. Value *string `form:"value"` }
Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
type CustomerInvoiceSettingsParams ¶
type CustomerInvoiceSettingsParams struct { // Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. CustomFields []*CustomerInvoiceSettingsCustomFieldParams `form:"custom_fields"` // ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. DefaultPaymentMethod *string `form:"default_payment_method"` Footer *string `form:"footer"` // Default options for invoice PDF rendering for this customer. RenderingOptions *CustomerInvoiceSettingsRenderingOptionsParams `form:"rendering_options"` }
Default invoice settings for this customer.
type CustomerInvoiceSettingsRenderingOptions ¶
type CustomerInvoiceSettingsRenderingOptions struct { // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. AmountTaxDisplay string `json:"amount_tax_display"` }
Default options for invoice PDF rendering for this customer.
type CustomerInvoiceSettingsRenderingOptionsParams ¶
type CustomerInvoiceSettingsRenderingOptionsParams struct { // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. AmountTaxDisplay *string `form:"amount_tax_display"` }
Default options for invoice PDF rendering for this customer.
type CustomerList ¶
type CustomerList struct { APIResource ListMeta Data []*Customer `json:"data"` }
CustomerList is a list of Customers as retrieved from a list endpoint.
type CustomerListParams ¶
type CustomerListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. Email *string `form:"email"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. TestClock *string `form:"test_clock"` }
Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
func (*CustomerListParams) AddExpand ¶
func (p *CustomerListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CustomerListPaymentMethodsParams ¶
type CustomerListPaymentMethodsParams struct { ListParams `form:"*"` Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. Type *string `form:"type"` }
Returns a list of PaymentMethods for a given Customer
func (*CustomerListPaymentMethodsParams) AddExpand ¶
func (p *CustomerListPaymentMethodsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CustomerParams ¶
type CustomerParams struct { Params `form:"*"` // The customer's address. Address *AddressParams `form:"address"` // An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. Balance *int64 `form:"balance"` // Balance information and default balance settings for this customer. CashBalance *CustomerCashBalanceParams `form:"cash_balance"` Coupon *string `form:"coupon"` // If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. // // Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. // // If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. DefaultSource *string `form:"default_source"` // An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. Description *string `form:"description"` // Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. Email *string `form:"email"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. InvoicePrefix *string `form:"invoice_prefix"` // Default invoice settings for this customer. InvoiceSettings *CustomerInvoiceSettingsParams `form:"invoice_settings"` // 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`. Metadata map[string]string `form:"metadata"` // The customer's full name or business name. Name *string `form:"name"` // The sequence to be used on the customer's next invoice. Defaults to 1. NextInvoiceSequence *int64 `form:"next_invoice_sequence"` PaymentMethod *string `form:"payment_method"` // The customer's phone number. Phone *string `form:"phone"` // Customer's preferred languages, ordered by preference. PreferredLocales []*string `form:"preferred_locales"` // The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. PromotionCode *string `form:"promotion_code"` // The customer's shipping information. Appears on invoices emailed to this customer. Shipping *CustomerShippingParams `form:"shipping"` Source *string `form:"source"` // Tax details about the customer. Tax *CustomerTaxParams `form:"tax"` // The customer's tax exemption. One of `none`, `exempt`, or `reverse`. TaxExempt *string `form:"tax_exempt"` // The customer's tax IDs. TaxIDData []*CustomerTaxIDDataParams `form:"tax_id_data"` // ID of the test clock to attach to the customer. TestClock *string `form:"test_clock"` Validate *bool `form:"validate"` }
Creates a new customer object.
func (*CustomerParams) AddExpand ¶
func (p *CustomerParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*CustomerParams) AddMetadata ¶
func (p *CustomerParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type CustomerRetrievePaymentMethodParams ¶
type CustomerRetrievePaymentMethodParams struct { Params `form:"*"` Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves a PaymentMethod object for a given Customer.
func (*CustomerRetrievePaymentMethodParams) AddExpand ¶
func (p *CustomerRetrievePaymentMethodParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CustomerSearchParams ¶
type CustomerSearchParams struct { SearchParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. Page *string `form:"page"` }
Search for customers you've previously created using Stripe's [Search Query Language](https://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.
func (*CustomerSearchParams) AddExpand ¶
func (p *CustomerSearchParams) AddExpand(f string)
AddExpand appends a new field to expand.
type CustomerSearchResult ¶
type CustomerSearchResult struct { APIResource SearchMeta Data []*Customer `json:"data"` }
CustomerSearchResult is a list of Customer search results as retrieved from a search endpoint.
type CustomerShippingParams ¶
type CustomerShippingParams struct { // Customer shipping address. Address *AddressParams `form:"address"` // Customer name. Name *string `form:"name"` // Customer phone (including extension). Phone *string `form:"phone"` }
The customer's shipping information. Appears on invoices emailed to this customer.
type CustomerTax ¶
type CustomerTax struct { // Surfaces if automatic tax computation is possible given the current customer location information. AutomaticTax CustomerTaxAutomaticTax `json:"automatic_tax"` // A recent IP address of the customer used for tax reporting and tax location inference. IPAddress string `json:"ip_address"` // The customer's location as identified by Stripe Tax. Location *CustomerTaxLocation `json:"location"` }
type CustomerTaxAutomaticTax ¶
type CustomerTaxAutomaticTax string
Surfaces if automatic tax computation is possible given the current customer location information.
const ( CustomerTaxAutomaticTaxFailed CustomerTaxAutomaticTax = "failed" CustomerTaxAutomaticTaxNotCollecting CustomerTaxAutomaticTax = "not_collecting" CustomerTaxAutomaticTaxSupported CustomerTaxAutomaticTax = "supported" CustomerTaxAutomaticTaxUnrecognizedLocation CustomerTaxAutomaticTax = "unrecognized_location" )
List of values that CustomerTaxAutomaticTax can take
type CustomerTaxExempt ¶
type CustomerTaxExempt string
Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**.
const ( CustomerTaxExemptExempt CustomerTaxExempt = "exempt" CustomerTaxExemptNone CustomerTaxExempt = "none" CustomerTaxExemptReverse CustomerTaxExempt = "reverse" )
List of values that CustomerTaxExempt can take
type CustomerTaxIDDataParams ¶
type CustomerTaxIDDataParams struct { // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` }
The customer's tax IDs.
type CustomerTaxLocation ¶
type CustomerTaxLocation struct { // The customer's country as identified by Stripe Tax. Country string `json:"country"` // The data source used to infer the customer's location. Source CustomerTaxLocationSource `json:"source"` // The customer's state, county, province, or region as identified by Stripe Tax. State string `json:"state"` }
The customer's location as identified by Stripe Tax.
type CustomerTaxLocationSource ¶
type CustomerTaxLocationSource string
The data source used to infer the customer's location.
const ( CustomerTaxLocationSourceBillingAddress CustomerTaxLocationSource = "billing_address" CustomerTaxLocationSourceIPAddress CustomerTaxLocationSource = "ip_address" CustomerTaxLocationSourcePaymentMethod CustomerTaxLocationSource = "payment_method" CustomerTaxLocationSourceShippingDestination CustomerTaxLocationSource = "shipping_destination" )
List of values that CustomerTaxLocationSource can take
type CustomerTaxParams ¶
type CustomerTaxParams struct { // A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. IPAddress *string `form:"ip_address"` }
Tax details about the customer.
type Deauthorize ¶
type Deauthorize struct {}
Deauthorize is the value of the return from deauthorizing. https://stripe.com/docs/connect/oauth-reference#post-deauthorize
type DeauthorizeParams ¶
type DeauthorizeParams struct {}
DeauthorizeParams for deauthorizing an account.
type DeclineCode ¶
type DeclineCode string
DeclineCode is the list of reasons provided by card issuers for decline of payment.
const ( DeclineCodeAuthenticationRequired DeclineCode = "authentication_required" DeclineCodeApproveWithID DeclineCode = "approve_with_id" DeclineCodeCallIssuer DeclineCode = "call_issuer" DeclineCodeCardNotSupported DeclineCode = "card_not_supported" DeclineCodeCardVelocityExceeded DeclineCode = "card_velocity_exceeded" DeclineCodeCurrencyNotSupported DeclineCode = "currency_not_supported" DeclineCodeDoNotHonor DeclineCode = "do_not_honor" DeclineCodeDoNotTryAgain DeclineCode = "do_not_try_again" DeclineCodeDuplicateTransaction DeclineCode = "duplicate_transaction" DeclineCodeExpiredCard DeclineCode = "expired_card" DeclineCodeFraudulent DeclineCode = "fraudulent" DeclineCodeGenericDecline DeclineCode = "generic_decline" DeclineCodeIncorrectNumber DeclineCode = "incorrect_number" DeclineCodeIncorrectCVC DeclineCode = "incorrect_cvc" DeclineCodeIncorrectPIN DeclineCode = "incorrect_pin" DeclineCodeIncorrectZip DeclineCode = "incorrect_zip" DeclineCodeInsufficientFunds DeclineCode = "insufficient_funds" DeclineCodeInvalidAccount DeclineCode = "invalid_account" DeclineCodeInvalidAmount DeclineCode = "invalid_amount" DeclineCodeInvalidCVC DeclineCode = "invalid_cvc" DeclineCodeInvalidExpiryMonth DeclineCode = "invalid_expiry_month" DeclineCodeInvalidExpiryYear DeclineCode = "invalid_expiry_year" DeclineCodeInvalidNumber DeclineCode = "invalid_number" DeclineCodeInvalidPIN DeclineCode = "invalid_pin" DeclineCodeIssuerNotAvailable DeclineCode = "issuer_not_available" DeclineCodeLostCard DeclineCode = "lost_card" DeclineCodeMerchantBlacklist DeclineCode = "merchant_blacklist" DeclineCodeNewAccountInformationAvailable DeclineCode = "new_account_information_available" DeclineCodeNoActionTaken DeclineCode = "no_action_taken" DeclineCodeNotPermitted DeclineCode = "not_permitted" DeclineCodeOfflinePINRequired DeclineCode = "offline_pin_required" DeclineCodeOnlineOrOfflinePINRequired DeclineCode = "online_or_offline_pin_required" DeclineCodePickupCard DeclineCode = "pickup_card" DeclineCodePINTryExceeded DeclineCode = "pin_try_exceeded" DeclineCodeProcessingError DeclineCode = "processing_error" DeclineCodeReenterTransaction DeclineCode = "reenter_transaction" DeclineCodeRestrictedCard DeclineCode = "restricted_card" DeclineCodeRevocationOfAllAuthorizations DeclineCode = "revocation_of_all_authorizations" DeclineCodeRevocationOfAuthorization DeclineCode = "revocation_of_authorization" DeclineCodeSecurityViolation DeclineCode = "security_violation" DeclineCodeServiceNotAllowed DeclineCode = "service_not_allowed" DeclineCodeStolenCard DeclineCode = "stolen_card" DeclineCodeStopPaymentOrder DeclineCode = "stop_payment_order" DeclineCodeTestModeDecline DeclineCode = "testmode_decline" DeclineCodeTransactionNotAllowed DeclineCode = "transaction_not_allowed" DeclineCodeTryAgainLater DeclineCode = "try_again_later" DeclineCodeWithdrawalCountLimitExceeded DeclineCode = "withdrawal_count_limit_exceeded" )
List of DeclineCode values. For descriptions see https://stripe.com/docs/declines/codes
type Discount ¶
type Discount struct { // The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. CheckoutSession string `json:"checkout_session"` // A coupon contains information about a percent-off or amount-off discount you // might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), // [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). Coupon *Coupon `json:"coupon"` // The ID of the customer associated with this discount. Customer *Customer `json:"customer"` Deleted bool `json:"deleted"` // If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. End int64 `json:"end"` // The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. ID string `json:"id"` // The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. Invoice string `json:"invoice"` // The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. InvoiceItem string `json:"invoice_item"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The promotion code applied to create this discount. PromotionCode *PromotionCode `json:"promotion_code"` // Date that the coupon was applied. Start int64 `json:"start"` // The subscription that this coupon is applied to, if it is applied to a particular subscription. Subscription string `json:"subscription"` }
A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). It contains information about when the discount began, when it will end, and what it is applied to.
Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
func (*Discount) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Discount. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type Dispute ¶
type Dispute struct { APIResource // Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). Amount int64 `json:"amount"` // List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. BalanceTransactions []*BalanceTransaction `json:"balance_transactions"` // ID of the charge that's disputed. Charge *Charge `json:"charge"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` Evidence *DisputeEvidence `json:"evidence"` EvidenceDetails *DisputeEvidenceDetails `json:"evidence_details"` // Unique identifier for the object. ID string `json:"id"` // If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. IsChargeRefundable bool `json:"is_charge_refundable"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // Network-dependent reason code for the dispute. NetworkReasonCode string `json:"network_reason_code"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // ID of the PaymentIntent that's disputed. PaymentIntent *PaymentIntent `json:"payment_intent"` PaymentMethodDetails *DisputePaymentMethodDetails `json:"payment_method_details"` // Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). Reason DisputeReason `json:"reason"` // Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. Status DisputeStatus `json:"status"` }
A dispute occurs when a customer questions your charge with their card issuer. When this happens, you have the opportunity to respond to the dispute with evidence that shows that the charge is legitimate.
Related guide: [Disputes and fraud](https://stripe.com/docs/disputes)
func (*Dispute) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Dispute. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type DisputeEvidence ¶
type DisputeEvidence struct { // Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. AccessActivityLog string `json:"access_activity_log"` // The billing address provided by the customer. BillingAddress string `json:"billing_address"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. CancellationPolicy *File `json:"cancellation_policy"` // An explanation of how and when the customer was shown your refund policy prior to purchase. CancellationPolicyDisclosure string `json:"cancellation_policy_disclosure"` // A justification for why the customer's subscription was not canceled. CancellationRebuttal string `json:"cancellation_rebuttal"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. CustomerCommunication *File `json:"customer_communication"` // The email address of the customer. CustomerEmailAddress string `json:"customer_email_address"` // The name of the customer. CustomerName string `json:"customer_name"` // The IP address that the customer used when making the purchase. CustomerPurchaseIP string `json:"customer_purchase_ip"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. CustomerSignature *File `json:"customer_signature"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. DuplicateChargeDocumentation *File `json:"duplicate_charge_documentation"` // An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. DuplicateChargeExplanation string `json:"duplicate_charge_explanation"` // The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. DuplicateChargeID string `json:"duplicate_charge_id"` // A description of the product or service that was sold. ProductDescription string `json:"product_description"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. Receipt *File `json:"receipt"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. RefundPolicy *File `json:"refund_policy"` // Documentation demonstrating that the customer was shown your refund policy prior to purchase. RefundPolicyDisclosure string `json:"refund_policy_disclosure"` // A justification for why the customer is not entitled to a refund. RefundRefusalExplanation string `json:"refund_refusal_explanation"` // The date on which the customer received or began receiving the purchased service, in a clear human-readable format. ServiceDate string `json:"service_date"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. ServiceDocumentation *File `json:"service_documentation"` // The address to which a physical product was shipped. You should try to include as complete address information as possible. ShippingAddress string `json:"shipping_address"` // The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. ShippingCarrier string `json:"shipping_carrier"` // The date on which a physical product began its route to the shipping address, in a clear human-readable format. ShippingDate string `json:"shipping_date"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. ShippingDocumentation *File `json:"shipping_documentation"` // 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. ShippingTrackingNumber string `json:"shipping_tracking_number"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. UncategorizedFile *File `json:"uncategorized_file"` // Any additional evidence or statements. UncategorizedText string `json:"uncategorized_text"` }
type DisputeEvidenceDetails ¶
type DisputeEvidenceDetails struct { // Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. DueBy int64 `json:"due_by"` // Whether evidence has been staged for this dispute. HasEvidence bool `json:"has_evidence"` // Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. PastDue bool `json:"past_due"` // The number of times evidence has been submitted. Typically, you may only submit evidence once. SubmissionCount int64 `json:"submission_count"` }
type DisputeEvidenceParams ¶
type DisputeEvidenceParams struct { // Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. AccessActivityLog *string `form:"access_activity_log"` // The billing address provided by the customer. BillingAddress *string `form:"billing_address"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. CancellationPolicy *string `form:"cancellation_policy"` // An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. CancellationPolicyDisclosure *string `form:"cancellation_policy_disclosure"` // A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. CancellationRebuttal *string `form:"cancellation_rebuttal"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. CustomerCommunication *string `form:"customer_communication"` // The email address of the customer. CustomerEmailAddress *string `form:"customer_email_address"` // The name of the customer. CustomerName *string `form:"customer_name"` // The IP address that the customer used when making the purchase. CustomerPurchaseIP *string `form:"customer_purchase_ip"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. CustomerSignature *string `form:"customer_signature"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. DuplicateChargeDocumentation *string `form:"duplicate_charge_documentation"` // An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. DuplicateChargeExplanation *string `form:"duplicate_charge_explanation"` // The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. DuplicateChargeID *string `form:"duplicate_charge_id"` // A description of the product or service that was sold. Has a maximum character count of 20,000. ProductDescription *string `form:"product_description"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. Receipt *string `form:"receipt"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. RefundPolicy *string `form:"refund_policy"` // Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. RefundPolicyDisclosure *string `form:"refund_policy_disclosure"` // A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. RefundRefusalExplanation *string `form:"refund_refusal_explanation"` // The date on which the customer received or began receiving the purchased service, in a clear human-readable format. ServiceDate *string `form:"service_date"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. ServiceDocumentation *string `form:"service_documentation"` // The address to which a physical product was shipped. You should try to include as complete address information as possible. ShippingAddress *string `form:"shipping_address"` // The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. ShippingCarrier *string `form:"shipping_carrier"` // The date on which a physical product began its route to the shipping address, in a clear human-readable format. ShippingDate *string `form:"shipping_date"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. ShippingDocumentation *string `form:"shipping_documentation"` // 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. ShippingTrackingNumber *string `form:"shipping_tracking_number"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. UncategorizedFile *string `form:"uncategorized_file"` // Any additional evidence or statements. Has a maximum character count of 20,000. UncategorizedText *string `form:"uncategorized_text"` }
Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.
type DisputeList ¶
type DisputeList struct { APIResource ListMeta Data []*Dispute `json:"data"` }
DisputeList is a list of Disputes as retrieved from a list endpoint.
type DisputeListParams ¶
type DisputeListParams struct { ListParams `form:"*"` // Only return disputes associated to the charge specified by this charge ID. Charge *string `form:"charge"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. PaymentIntent *string `form:"payment_intent"` }
Returns a list of your disputes.
func (*DisputeListParams) AddExpand ¶
func (p *DisputeListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type DisputeParams ¶
type DisputeParams struct { Params `form:"*"` // Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. Evidence *DisputeEvidenceParams `form:"evidence"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). Submit *bool `form:"submit"` }
Retrieves the dispute with the given ID.
func (*DisputeParams) AddExpand ¶
func (p *DisputeParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*DisputeParams) AddMetadata ¶
func (p *DisputeParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type DisputePaymentMethodDetails ¶ added in v75.2.0
type DisputePaymentMethodDetails struct { // Card specific dispute details. Card *DisputePaymentMethodDetailsCard `json:"card"` // Payment method type. Type DisputePaymentMethodDetailsType `json:"type"` }
type DisputePaymentMethodDetailsCard ¶ added in v75.2.0
type DisputePaymentMethodDetailsCard struct { // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` // The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. NetworkReasonCode string `json:"network_reason_code"` }
Card specific dispute details.
type DisputePaymentMethodDetailsType ¶ added in v75.2.0
type DisputePaymentMethodDetailsType string
Payment method type.
const (
DisputePaymentMethodDetailsTypeCard DisputePaymentMethodDetailsType = "card"
)
List of values that DisputePaymentMethodDetailsType can take
type DisputeReason ¶
type DisputeReason string
Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories).
const ( DisputeReasonBankCannotProcess DisputeReason = "bank_cannot_process" DisputeReasonCheckReturned DisputeReason = "check_returned" DisputeReasonCreditNotProcessed DisputeReason = "credit_not_processed" DisputeReasonCustomerInitiated DisputeReason = "customer_initiated" DisputeReasonDebitNotAuthorized DisputeReason = "debit_not_authorized" DisputeReasonDuplicate DisputeReason = "duplicate" DisputeReasonFraudulent DisputeReason = "fraudulent" DisputeReasonGeneral DisputeReason = "general" DisputeReasonIncorrectAccountDetails DisputeReason = "incorrect_account_details" DisputeReasonInsufficientFunds DisputeReason = "insufficient_funds" DisputeReasonProductNotReceived DisputeReason = "product_not_received" DisputeReasonProductUnacceptable DisputeReason = "product_unacceptable" DisputeReasonSubscriptionCanceled DisputeReason = "subscription_canceled" DisputeReasonUnrecognized DisputeReason = "unrecognized" )
List of values that DisputeReason can take
type DisputeStatus ¶
type DisputeStatus string
Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.
const ( DisputeStatusLost DisputeStatus = "lost" DisputeStatusNeedsResponse DisputeStatus = "needs_response" DisputeStatusUnderReview DisputeStatus = "under_review" DisputeStatusWarningClosed DisputeStatus = "warning_closed" DisputeStatusWarningNeedsResponse DisputeStatus = "warning_needs_response" DisputeStatusWarningUnderReview DisputeStatus = "warning_under_review" DisputeStatusWon DisputeStatus = "won" )
List of values that DisputeStatus can take
type EphemeralKey ¶
type EphemeralKey struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Time at which the key will expire. Measured in seconds since the Unix epoch. Expires int64 `json:"expires"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The key's secret. You can use this value to make authorized requests to the Stripe API. Secret string `json:"secret"` // RawJSON is provided so that it may be passed back to the frontend // unchanged. Ephemeral keys are issued on behalf of another client which // may be running a different version of the bindings and thus expect a // different JSON structure. This ensures that if the structure differs // from the version of these bindings, we can still pass back a compatible // key. RawJSON []byte `json:"-"` }
func (*EphemeralKey) UnmarshalJSON ¶
func (e *EphemeralKey) UnmarshalJSON(data []byte) error
type EphemeralKeyParams ¶
type EphemeralKeyParams struct { Params `form:"*"` // The ID of the Customer you'd like to modify using the resulting ephemeral key. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The ID of the Issuing Card you'd like to access using the resulting ephemeral key. IssuingCard *string `form:"issuing_card"` // A single-use token, created by Stripe.js, used for creating ephemeral keys for Issuing Cards without exchanging sensitive information. Nonce *string `form:"nonce"` // The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key VerificationSession *string `form:"verification_session"` StripeVersion *string `form:"-"` // This goes in the `Stripe-Version` header }
Creates a short-lived API key for a given resource.
func (*EphemeralKeyParams) AddExpand ¶
func (p *EphemeralKeyParams) AddExpand(f string)
AddExpand appends a new field to expand.
type Error ¶
type Error struct { APIResource ChargeID string `json:"charge,omitempty"` Code ErrorCode `json:"code,omitempty"` DeclineCode DeclineCode `json:"decline_code,omitempty"` DocURL string `json:"doc_url,omitempty"` // Err contains an internal error with an additional level of granularity // that can be used in some cases to get more detailed information about // what went wrong. For example, Err may hold a CardError that indicates // exactly what went wrong during charging a card. Err error `json:"-"` HTTPStatusCode int `json:"status,omitempty"` Msg string `json:"message"` Param string `json:"param,omitempty"` PaymentIntent *PaymentIntent `json:"payment_intent,omitempty"` PaymentMethod *PaymentMethod `json:"payment_method,omitempty"` PaymentMethodType PaymentMethodType `json:"payment_method_type,omitempty"` RequestID string `json:"request_id,omitempty"` RequestLogURL string `json:"request_log_url,omitempty"` SetupIntent *SetupIntent `json:"setup_intent,omitempty"` Source *PaymentSource `json:"source,omitempty"` Type ErrorType `json:"type"` // OAuth specific Error properties. Named OAuthError because of name conflict. OAuthError string `json:"error,omitempty"` OAuthErrorDescription string `json:"error_description,omitempty"` }
Error is the response returned when a call is unsuccessful. For more details see https://stripe.com/docs/api#errors.
type ErrorCode ¶
type ErrorCode string
ErrorCode is the list of allowed values for the error's code.
const ( ErrorCodeACSSDebitSessionIncomplete ErrorCode = "acss_debit_session_incomplete" ErrorCodeAPIKeyExpired ErrorCode = "api_key_expired" ErrorCodeAccountClosed ErrorCode = "account_closed" ErrorCodeAccountCountryInvalidAddress ErrorCode = "account_country_invalid_address" ErrorCodeAccountErrorCountryChangeRequiresAdditionalSteps ErrorCode = "account_error_country_change_requires_additional_steps" ErrorCodeAccountInformationMismatch ErrorCode = "account_information_mismatch" ErrorCodeAccountInvalid ErrorCode = "account_invalid" ErrorCodeAccountNumberInvalid ErrorCode = "account_number_invalid" ErrorCodeAlipayUpgradeRequired ErrorCode = "alipay_upgrade_required" ErrorCodeAmountTooLarge ErrorCode = "amount_too_large" ErrorCodeAmountTooSmall ErrorCode = "amount_too_small" ErrorCodeApplicationFeesNotAllowed ErrorCode = "application_fees_not_allowed" ErrorCodeAuthenticationRequired ErrorCode = "authentication_required" ErrorCodeBalanceInsufficient ErrorCode = "balance_insufficient" ErrorCodeBankAccountBadRoutingNumbers ErrorCode = "bank_account_bad_routing_numbers" ErrorCodeBankAccountDeclined ErrorCode = "bank_account_declined" ErrorCodeBankAccountExists ErrorCode = "bank_account_exists" ErrorCodeBankAccountRestricted ErrorCode = "bank_account_restricted" ErrorCodeBankAccountUnusable ErrorCode = "bank_account_unusable" ErrorCodeBankAccountUnverified ErrorCode = "bank_account_unverified" ErrorCodeBankAccountVerificationFailed ErrorCode = "bank_account_verification_failed" ErrorCodeBillingInvalidMandate ErrorCode = "billing_invalid_mandate" ErrorCodeBitcoinUpgradeRequired ErrorCode = "bitcoin_upgrade_required" ErrorCodeCaptureChargeAuthorizationExpired ErrorCode = "capture_charge_authorization_expired" ErrorCodeCardDeclineRateLimitExceeded ErrorCode = "card_decline_rate_limit_exceeded" ErrorCodeCardDeclined ErrorCode = "card_declined" ErrorCodeCardholderPhoneNumberRequired ErrorCode = "cardholder_phone_number_required" ErrorCodeChargeAlreadyCaptured ErrorCode = "charge_already_captured" ErrorCodeChargeAlreadyRefunded ErrorCode = "charge_already_refunded" ErrorCodeChargeDisputed ErrorCode = "charge_disputed" ErrorCodeChargeExceedsSourceLimit ErrorCode = "charge_exceeds_source_limit" ErrorCodeChargeExpiredForCapture ErrorCode = "charge_expired_for_capture" ErrorCodeChargeInvalidParameter ErrorCode = "charge_invalid_parameter" ErrorCodeChargeNotRefundable ErrorCode = "charge_not_refundable" ErrorCodeClearingCodeUnsupported ErrorCode = "clearing_code_unsupported" ErrorCodeCountryCodeInvalid ErrorCode = "country_code_invalid" ErrorCodeCountryUnsupported ErrorCode = "country_unsupported" ErrorCodeCouponExpired ErrorCode = "coupon_expired" ErrorCodeCustomerMaxPaymentMethods ErrorCode = "customer_max_payment_methods" ErrorCodeCustomerMaxSubscriptions ErrorCode = "customer_max_subscriptions" ErrorCodeDebitNotAuthorized ErrorCode = "debit_not_authorized" ErrorCodeEmailInvalid ErrorCode = "email_invalid" ErrorCodeExpiredCard ErrorCode = "expired_card" ErrorCodeIdempotencyKeyInUse ErrorCode = "idempotency_key_in_use" ErrorCodeIncorrectAddress ErrorCode = "incorrect_address" ErrorCodeIncorrectCVC ErrorCode = "incorrect_cvc" ErrorCodeIncorrectNumber ErrorCode = "incorrect_number" ErrorCodeIncorrectZip ErrorCode = "incorrect_zip" ErrorCodeInstantPayoutsConfigDisabled ErrorCode = "instant_payouts_config_disabled" ErrorCodeInstantPayoutsCurrencyDisabled ErrorCode = "instant_payouts_currency_disabled" ErrorCodeInstantPayoutsLimitExceeded ErrorCode = "instant_payouts_limit_exceeded" ErrorCodeInstantPayoutsUnsupported ErrorCode = "instant_payouts_unsupported" ErrorCodeInsufficientFunds ErrorCode = "insufficient_funds" ErrorCodeIntentInvalidState ErrorCode = "intent_invalid_state" ErrorCodeIntentVerificationMethodMissing ErrorCode = "intent_verification_method_missing" ErrorCodeInvalidCVC ErrorCode = "invalid_cvc" ErrorCodeInvalidCardType ErrorCode = "invalid_card_type" ErrorCodeInvalidCharacters ErrorCode = "invalid_characters" ErrorCodeInvalidChargeAmount ErrorCode = "invalid_charge_amount" ErrorCodeInvalidExpiryMonth ErrorCode = "invalid_expiry_month" ErrorCodeInvalidExpiryYear ErrorCode = "invalid_expiry_year" ErrorCodeInvalidNumber ErrorCode = "invalid_number" ErrorCodeInvalidSourceUsage ErrorCode = "invalid_source_usage" ErrorCodeInvalidTaxLocation ErrorCode = "invalid_tax_location" ErrorCodeInvoiceNoCustomerLineItems ErrorCode = "invoice_no_customer_line_items" ErrorCodeInvoiceNoPaymentMethodTypes ErrorCode = "invoice_no_payment_method_types" ErrorCodeInvoiceNoSubscriptionLineItems ErrorCode = "invoice_no_subscription_line_items" ErrorCodeInvoiceNotEditable ErrorCode = "invoice_not_editable" ErrorCodeInvoiceOnBehalfOfNotEditable ErrorCode = "invoice_on_behalf_of_not_editable" ErrorCodeInvoicePaymentIntentRequiresAction ErrorCode = "invoice_payment_intent_requires_action" ErrorCodeInvoiceUpcomingNone ErrorCode = "invoice_upcoming_none" ErrorCodeLivemodeMismatch ErrorCode = "livemode_mismatch" ErrorCodeLockTimeout ErrorCode = "lock_timeout" ErrorCodeMissing ErrorCode = "missing" ErrorCodeNoAccount ErrorCode = "no_account" ErrorCodeNotAllowedOnStandardAccount ErrorCode = "not_allowed_on_standard_account" ErrorCodeOutOfInventory ErrorCode = "out_of_inventory" ErrorCodeOwnershipDeclarationNotAllowed ErrorCode = "ownership_declaration_not_allowed" ErrorCodeParameterInvalidEmpty ErrorCode = "parameter_invalid_empty" ErrorCodeParameterInvalidInteger ErrorCode = "parameter_invalid_integer" ErrorCodeParameterInvalidStringBlank ErrorCode = "parameter_invalid_string_blank" ErrorCodeParameterInvalidStringEmpty ErrorCode = "parameter_invalid_string_empty" ErrorCodeParameterMissing ErrorCode = "parameter_missing" ErrorCodeParameterUnknown ErrorCode = "parameter_unknown" ErrorCodeParametersExclusive ErrorCode = "parameters_exclusive" ErrorCodePaymentIntentActionRequired ErrorCode = "payment_intent_action_required" ErrorCodePaymentIntentAuthenticationFailure ErrorCode = "payment_intent_authentication_failure" ErrorCodePaymentIntentIncompatiblePaymentMethod ErrorCode = "payment_intent_incompatible_payment_method" ErrorCodePaymentIntentInvalidParameter ErrorCode = "payment_intent_invalid_parameter" ErrorCodePaymentIntentKonbiniRejectedConfirmationNumber ErrorCode = "payment_intent_konbini_rejected_confirmation_number" ErrorCodePaymentIntentMandateInvalid ErrorCode = "payment_intent_mandate_invalid" ErrorCodePaymentIntentPaymentAttemptExpired ErrorCode = "payment_intent_payment_attempt_expired" ErrorCodePaymentIntentPaymentAttemptFailed ErrorCode = "payment_intent_payment_attempt_failed" ErrorCodePaymentIntentUnexpectedState ErrorCode = "payment_intent_unexpected_state" ErrorCodePaymentMethodBankAccountAlreadyVerified ErrorCode = "payment_method_bank_account_already_verified" ErrorCodePaymentMethodBankAccountBlocked ErrorCode = "payment_method_bank_account_blocked" ErrorCodePaymentMethodBillingDetailsAddressMissing ErrorCode = "payment_method_billing_details_address_missing" ErrorCodePaymentMethodConfigurationFailures ErrorCode = "payment_method_configuration_failures" ErrorCodePaymentMethodCurrencyMismatch ErrorCode = "payment_method_currency_mismatch" ErrorCodePaymentMethodCustomerDecline ErrorCode = "payment_method_customer_decline" ErrorCodePaymentMethodInvalidParameter ErrorCode = "payment_method_invalid_parameter" ErrorCodePaymentMethodInvalidParameterTestmode ErrorCode = "payment_method_invalid_parameter_testmode" ErrorCodePaymentMethodMicrodepositFailed ErrorCode = "payment_method_microdeposit_failed" ErrorCodePaymentMethodMicrodepositVerificationAmountsInvalid ErrorCode = "payment_method_microdeposit_verification_amounts_invalid" ErrorCodePaymentMethodMicrodepositVerificationAmountsMismatch ErrorCode = "payment_method_microdeposit_verification_amounts_mismatch" ErrorCodePaymentMethodMicrodepositVerificationAttemptsExceeded ErrorCode = "payment_method_microdeposit_verification_attempts_exceeded" ErrorCodePaymentMethodMicrodepositVerificationDescriptorCodeMismatch ErrorCode = "payment_method_microdeposit_verification_descriptor_code_mismatch" ErrorCodePaymentMethodMicrodepositVerificationTimeout ErrorCode = "payment_method_microdeposit_verification_timeout" ErrorCodePaymentMethodNotAvailable ErrorCode = "payment_method_not_available" ErrorCodePaymentMethodProviderDecline ErrorCode = "payment_method_provider_decline" ErrorCodePaymentMethodProviderTimeout ErrorCode = "payment_method_provider_timeout" ErrorCodePaymentMethodUnactivated ErrorCode = "payment_method_unactivated" ErrorCodePaymentMethodUnexpectedState ErrorCode = "payment_method_unexpected_state" ErrorCodePaymentMethodUnsupportedType ErrorCode = "payment_method_unsupported_type" ErrorCodePayoutReconciliationNotReady ErrorCode = "payout_reconciliation_not_ready" ErrorCodePayoutsLimitExceeded ErrorCode = "payouts_limit_exceeded" ErrorCodePayoutsNotAllowed ErrorCode = "payouts_not_allowed" ErrorCodePlatformAPIKeyExpired ErrorCode = "platform_api_key_expired" ErrorCodePlatformAccountRequired ErrorCode = "platform_account_required" ErrorCodePostalCodeInvalid ErrorCode = "postal_code_invalid" ErrorCodeProcessingError ErrorCode = "processing_error" ErrorCodeProductInactive ErrorCode = "product_inactive" ErrorCodeProgressiveOnboardingLimitExceeded ErrorCode = "progressive_onboarding_limit_exceeded" ErrorCodeRateLimit ErrorCode = "rate_limit" ErrorCodeReferToCustomer ErrorCode = "refer_to_customer" ErrorCodeRefundDisputedPayment ErrorCode = "refund_disputed_payment" ErrorCodeResourceAlreadyExists ErrorCode = "resource_already_exists" ErrorCodeResourceMissing ErrorCode = "resource_missing" ErrorCodeReturnIntentAlreadyProcessed ErrorCode = "return_intent_already_processed" ErrorCodeRoutingNumberInvalid ErrorCode = "routing_number_invalid" ErrorCodeSEPAUnsupportedAccount ErrorCode = "sepa_unsupported_account" ErrorCodeSKUInactive ErrorCode = "sku_inactive" ErrorCodeSecretKeyRequired ErrorCode = "secret_key_required" ErrorCodeSetupAttemptFailed ErrorCode = "setup_attempt_failed" ErrorCodeSetupIntentAuthenticationFailure ErrorCode = "setup_intent_authentication_failure" ErrorCodeSetupIntentInvalidParameter ErrorCode = "setup_intent_invalid_parameter" ErrorCodeSetupIntentMandateInvalid ErrorCode = "setup_intent_mandate_invalid" ErrorCodeSetupIntentSetupAttemptExpired ErrorCode = "setup_intent_setup_attempt_expired" ErrorCodeSetupIntentUnexpectedState ErrorCode = "setup_intent_unexpected_state" ErrorCodeShippingCalculationFailed ErrorCode = "shipping_calculation_failed" ErrorCodeStateUnsupported ErrorCode = "state_unsupported" ErrorCodeStatusTransitionInvalid ErrorCode = "status_transition_invalid" ErrorCodeStripeTaxInactive ErrorCode = "stripe_tax_inactive" ErrorCodeTLSVersionUnsupported ErrorCode = "tls_version_unsupported" ErrorCodeTaxIDInvalid ErrorCode = "tax_id_invalid" ErrorCodeTaxesCalculationFailed ErrorCode = "taxes_calculation_failed" ErrorCodeTerminalLocationCountryUnsupported ErrorCode = "terminal_location_country_unsupported" ErrorCodeTerminalReaderBusy ErrorCode = "terminal_reader_busy" ErrorCodeTerminalReaderOffline ErrorCode = "terminal_reader_offline" ErrorCodeTerminalReaderTimeout ErrorCode = "terminal_reader_timeout" ErrorCodeTestmodeChargesOnly ErrorCode = "testmode_charges_only" ErrorCodeTokenAlreadyUsed ErrorCode = "token_already_used" ErrorCodeTokenInUse ErrorCode = "token_in_use" ErrorCodeTransferSourceBalanceParametersMismatch ErrorCode = "transfer_source_balance_parameters_mismatch" ErrorCodeTransfersNotAllowed ErrorCode = "transfers_not_allowed" ErrorCodeURLInvalid ErrorCode = "url_invalid" )
List of values that ErrorCode can take. For descriptions see https://stripe.com/docs/error-codes The beginning of the section generated from our OpenAPI spec
type ErrorType ¶
type ErrorType string
ErrorType is the list of allowed values for the error's type.
type Event ¶
type Event struct { APIResource // The connected account that originates the event. Account string `json:"account"` // The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. APIVersion string `json:"api_version"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` Data *EventData `json:"data"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. PendingWebhooks int64 `json:"pending_webhooks"` // Information on the API request that triggers the event. Request *EventRequest `json:"request"` // Description of the event (for example, `invoice.created` or `charge.refunded`). Type EventType `json:"type"` }
Events are our way of letting you know when something interesting happens in your account. When an interesting event occurs, we create a new `Event` object. For example, when a charge succeeds, we create a `charge.succeeded` event, and when an invoice payment attempt fails, we create an `invoice.payment_failed` event. Certain API requests might create multiple events. For example, if you create a new subscription for a customer, you receive both a `customer.subscription.created` event and a `charge.succeeded` event.
Events occur when the state of another API resource changes. The event's data field embeds the resource's state at the time of the change. For example, a `charge.succeeded` event contains a charge, and an `invoice.payment_failed` event contains an invoice.
As with other API resources, you can use endpoints to retrieve an [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events) from the API. We also have a separate [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the `Event` objects directly to an endpoint on your server. You can manage webhooks in your [account settings](https://dashboard.stripe.com/account/webhooks). Learn how to [listen for events] (/docs/webhooks) so that your integration can automatically trigger reactions.
When using [Connect](https://stripe.com/docs/connect), you can also receive event notifications that occur in connected accounts. For these events, there's an additional `account` attribute in the received `Event` object.
We only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) for 30 days.
func (*Event) GetObjectValue ¶
GetObjectValue returns the value from the e.Data.Object bag based on the keys hierarchy.
func (*Event) GetPreviousValue ¶
GetPreviousValue returns the value from the e.Data.Prev bag based on the keys hierarchy.
type EventData ¶
type EventData struct { // Object is a raw mapping of the API resource contained in the event. // Although marked with json:"-", it's still populated independently by // a custom UnmarshalJSON implementation. // Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. Object map[string]interface{} `json:"-"` // Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. PreviousAttributes map[string]interface{} `json:"previous_attributes"` Raw json.RawMessage `json:"object"` }
func (*EventData) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of the EventData. This custom unmarshaling exists so that we can keep both the map and raw data.
type EventList ¶
type EventList struct { APIResource ListMeta Data []*Event `json:"data"` }
EventList is a list of Events as retrieved from a list endpoint.
type EventListParams ¶
type EventListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. DeliverySuccess *bool `form:"delivery_success"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. Type *string `form:"type"` // An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. Types []*string `form:"types"` }
List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://stripe.com/docs/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
func (*EventListParams) AddExpand ¶
func (p *EventListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type EventParams ¶
type EventParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.
func (*EventParams) AddExpand ¶
func (p *EventParams) AddExpand(f string)
AddExpand appends a new field to expand.
type EventRequest ¶
type EventRequest struct { // ID is the request ID of the request that created an event, if the event // was created by a request. // ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. ID string `json:"id"` // IdempotencyKey is the idempotency key of the request that created an // event, if the event was created by a request and if an idempotency key // was specified for that request. // The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. IdempotencyKey string `json:"idempotency_key"` }
Information on the API request that triggers the event.
type EventType ¶ added in v75.3.0
type EventType string
Description of the event (for example, `invoice.created` or `charge.refunded`).
const ( EventTypeAccountApplicationAuthorized EventType = "account.application.authorized" EventTypeAccountExternalAccountCreated EventType = "account.external_account.created" EventTypeAccountExternalAccountDeleted EventType = "account.external_account.deleted" EventTypeAccountExternalAccountUpdated EventType = "account.external_account.updated" EventTypeAccountUpdated EventType = "account.updated" EventTypeApplicationFeeCreated EventType = "application_fee.created" EventTypeApplicationFeeRefundUpdated EventType = "application_fee.refund.updated" EventTypeApplicationFeeRefunded EventType = "application_fee.refunded" EventTypeBalanceAvailable EventType = "balance.available" EventTypeBillingPortalConfigurationCreated EventType = "billing_portal.configuration.created" EventTypeBillingPortalConfigurationUpdated EventType = "billing_portal.configuration.updated" EventTypeBillingPortalSessionCreated EventType = "billing_portal.session.created" EventTypeCapabilityUpdated EventType = "capability.updated" EventTypeCashBalanceFundsAvailable EventType = "cash_balance.funds_available" EventTypeChargeCaptured EventType = "charge.captured" EventTypeChargeDisputeClosed EventType = "charge.dispute.closed" EventTypeChargeDisputeCreated EventType = "charge.dispute.created" EventTypeChargeDisputeFundsReinstated EventType = "charge.dispute.funds_reinstated" EventTypeChargeDisputeFundsWithdrawn EventType = "charge.dispute.funds_withdrawn" EventTypeChargeDisputeUpdated EventType = "charge.dispute.updated" EventTypeChargeExpired EventType = "charge.expired" EventTypeChargeFailed EventType = "charge.failed" EventTypeChargePending EventType = "charge.pending" EventTypeChargeRefundUpdated EventType = "charge.refund.updated" EventTypeChargeRefunded EventType = "charge.refunded" EventTypeChargeSucceeded EventType = "charge.succeeded" EventTypeChargeUpdated EventType = "charge.updated" EventTypeCheckoutSessionAsyncPaymentFailed EventType = "checkout.session.async_payment_failed" EventTypeCheckoutSessionAsyncPaymentSucceeded EventType = "checkout.session.async_payment_succeeded" EventTypeCheckoutSessionCompleted EventType = "checkout.session.completed" EventTypeCheckoutSessionExpired EventType = "checkout.session.expired" EventTypeCouponCreated EventType = "coupon.created" EventTypeCouponDeleted EventType = "coupon.deleted" EventTypeCouponUpdated EventType = "coupon.updated" EventTypeCreditNoteCreated EventType = "credit_note.created" EventTypeCreditNoteUpdated EventType = "credit_note.updated" EventTypeCreditNoteVoided EventType = "credit_note.voided" EventTypeCustomerCreated EventType = "customer.created" EventTypeCustomerDeleted EventType = "customer.deleted" EventTypeCustomerDiscountCreated EventType = "customer.discount.created" EventTypeCustomerDiscountDeleted EventType = "customer.discount.deleted" EventTypeCustomerDiscountUpdated EventType = "customer.discount.updated" EventTypeCustomerSourceCreated EventType = "customer.source.created" EventTypeCustomerSourceDeleted EventType = "customer.source.deleted" EventTypeCustomerSourceExpiring EventType = "customer.source.expiring" EventTypeCustomerSourceUpdated EventType = "customer.source.updated" EventTypeCustomerSubscriptionCreated EventType = "customer.subscription.created" EventTypeCustomerSubscriptionDeleted EventType = "customer.subscription.deleted" EventTypeCustomerSubscriptionPaused EventType = "customer.subscription.paused" EventTypeCustomerSubscriptionPendingUpdateApplied EventType = "customer.subscription.pending_update_applied" EventTypeCustomerSubscriptionPendingUpdateExpired EventType = "customer.subscription.pending_update_expired" EventTypeCustomerSubscriptionResumed EventType = "customer.subscription.resumed" EventTypeCustomerSubscriptionTrialWillEnd EventType = "customer.subscription.trial_will_end" EventTypeCustomerSubscriptionUpdated EventType = "customer.subscription.updated" EventTypeCustomerTaxIDCreated EventType = "customer.tax_id.created" EventTypeCustomerTaxIDDeleted EventType = "customer.tax_id.deleted" EventTypeCustomerTaxIDUpdated EventType = "customer.tax_id.updated" EventTypeCustomerUpdated EventType = "customer.updated" EventTypeCustomerCashBalanceTransactionCreated EventType = "customer_cash_balance_transaction.created" EventTypeFileCreated EventType = "file.created" EventTypeFinancialConnectionsAccountCreated EventType = "financial_connections.account.created" EventTypeFinancialConnectionsAccountDeactivated EventType = "financial_connections.account.deactivated" EventTypeFinancialConnectionsAccountDisconnected EventType = "financial_connections.account.disconnected" EventTypeFinancialConnectionsAccountReactivated EventType = "financial_connections.account.reactivated" EventTypeFinancialConnectionsAccountRefreshedBalance EventType = "financial_connections.account.refreshed_balance" EventTypeIdentityVerificationSessionCanceled EventType = "identity.verification_session.canceled" EventTypeIdentityVerificationSessionCreated EventType = "identity.verification_session.created" EventTypeIdentityVerificationSessionProcessing EventType = "identity.verification_session.processing" EventTypeIdentityVerificationSessionRedacted EventType = "identity.verification_session.redacted" EventTypeIdentityVerificationSessionRequiresInput EventType = "identity.verification_session.requires_input" EventTypeIdentityVerificationSessionVerified EventType = "identity.verification_session.verified" EventTypeInvoiceCreated EventType = "invoice.created" EventTypeInvoiceDeleted EventType = "invoice.deleted" EventTypeInvoiceFinalizationFailed EventType = "invoice.finalization_failed" EventTypeInvoiceFinalized EventType = "invoice.finalized" EventTypeInvoiceMarkedUncollectible EventType = "invoice.marked_uncollectible" EventTypeInvoicePaid EventType = "invoice.paid" EventTypeInvoicePaymentActionRequired EventType = "invoice.payment_action_required" EventTypeInvoicePaymentFailed EventType = "invoice.payment_failed" EventTypeInvoicePaymentSucceeded EventType = "invoice.payment_succeeded" EventTypeInvoiceSent EventType = "invoice.sent" EventTypeInvoiceUpcoming EventType = "invoice.upcoming" EventTypeInvoiceUpdated EventType = "invoice.updated" EventTypeInvoiceVoided EventType = "invoice.voided" EventTypeInvoiceItemCreated EventType = "invoiceitem.created" EventTypeInvoiceItemDeleted EventType = "invoiceitem.deleted" EventTypeIssuingAuthorizationCreated EventType = "issuing_authorization.created" EventTypeIssuingAuthorizationRequest EventType = "issuing_authorization.request" EventTypeIssuingAuthorizationUpdated EventType = "issuing_authorization.updated" EventTypeIssuingCardCreated EventType = "issuing_card.created" EventTypeIssuingCardUpdated EventType = "issuing_card.updated" EventTypeIssuingCardholderCreated EventType = "issuing_cardholder.created" EventTypeIssuingCardholderUpdated EventType = "issuing_cardholder.updated" EventTypeIssuingDisputeClosed EventType = "issuing_dispute.closed" EventTypeIssuingDisputeCreated EventType = "issuing_dispute.created" EventTypeIssuingDisputeFundsReinstated EventType = "issuing_dispute.funds_reinstated" EventTypeIssuingDisputeSubmitted EventType = "issuing_dispute.submitted" EventTypeIssuingDisputeUpdated EventType = "issuing_dispute.updated" EventTypeIssuingTokenCreated EventType = "issuing_token.created" EventTypeIssuingTokenUpdated EventType = "issuing_token.updated" EventTypeIssuingTransactionCreated EventType = "issuing_transaction.created" EventTypeIssuingTransactionUpdated EventType = "issuing_transaction.updated" EventTypeMandateUpdated EventType = "mandate.updated" EventTypePaymentIntentAmountCapturableUpdated EventType = "payment_intent.amount_capturable_updated" EventTypePaymentIntentCanceled EventType = "payment_intent.canceled" EventTypePaymentIntentCreated EventType = "payment_intent.created" EventTypePaymentIntentPartiallyFunded EventType = "payment_intent.partially_funded" EventTypePaymentIntentPaymentFailed EventType = "payment_intent.payment_failed" EventTypePaymentIntentProcessing EventType = "payment_intent.processing" EventTypePaymentIntentRequiresAction EventType = "payment_intent.requires_action" EventTypePaymentIntentSucceeded EventType = "payment_intent.succeeded" EventTypePaymentLinkCreated EventType = "payment_link.created" EventTypePaymentLinkUpdated EventType = "payment_link.updated" EventTypePaymentMethodAttached EventType = "payment_method.attached" EventTypePaymentMethodAutomaticallyUpdated EventType = "payment_method.automatically_updated" EventTypePaymentMethodDetached EventType = "payment_method.detached" EventTypePaymentMethodUpdated EventType = "payment_method.updated" EventTypePayoutCanceled EventType = "payout.canceled" EventTypePayoutCreated EventType = "payout.created" EventTypePayoutFailed EventType = "payout.failed" EventTypePayoutPaid EventType = "payout.paid" EventTypePayoutReconciliationCompleted EventType = "payout.reconciliation_completed" EventTypePayoutUpdated EventType = "payout.updated" EventTypePersonCreated EventType = "person.created" EventTypePersonDeleted EventType = "person.deleted" EventTypePersonUpdated EventType = "person.updated" EventTypePlanCreated EventType = "plan.created" EventTypePlanDeleted EventType = "plan.deleted" EventTypePlanUpdated EventType = "plan.updated" EventTypePriceCreated EventType = "price.created" EventTypePriceDeleted EventType = "price.deleted" EventTypePriceUpdated EventType = "price.updated" EventTypeProductCreated EventType = "product.created" EventTypeProductDeleted EventType = "product.deleted" EventTypeProductUpdated EventType = "product.updated" EventTypePromotionCodeCreated EventType = "promotion_code.created" EventTypePromotionCodeUpdated EventType = "promotion_code.updated" EventTypeQuoteAccepted EventType = "quote.accepted" EventTypeQuoteCanceled EventType = "quote.canceled" EventTypeQuoteCreated EventType = "quote.created" EventTypeQuoteFinalized EventType = "quote.finalized" EventTypeRadarEarlyFraudWarningCreated EventType = "radar.early_fraud_warning.created" EventTypeRadarEarlyFraudWarningUpdated EventType = "radar.early_fraud_warning.updated" EventTypeRefundCreated EventType = "refund.created" EventTypeRefundUpdated EventType = "refund.updated" EventTypeReportingReportRunFailed EventType = "reporting.report_run.failed" EventTypeReportingReportRunSucceeded EventType = "reporting.report_run.succeeded" EventTypeReportingReportTypeUpdated EventType = "reporting.report_type.updated" EventTypeReviewClosed EventType = "review.closed" EventTypeReviewOpened EventType = "review.opened" EventTypeSetupIntentCanceled EventType = "setup_intent.canceled" EventTypeSetupIntentCreated EventType = "setup_intent.created" EventTypeSetupIntentRequiresAction EventType = "setup_intent.requires_action" EventTypeSetupIntentSetupFailed EventType = "setup_intent.setup_failed" EventTypeSetupIntentSucceeded EventType = "setup_intent.succeeded" EventTypeSigmaScheduledQueryRunCreated EventType = "sigma.scheduled_query_run.created" EventTypeSourceCanceled EventType = "source.canceled" EventTypeSourceChargeable EventType = "source.chargeable" EventTypeSourceFailed EventType = "source.failed" EventTypeSourceMandateNotification EventType = "source.mandate_notification" EventTypeSourceRefundAttributesRequired EventType = "source.refund_attributes_required" EventTypeSourceTransactionCreated EventType = "source.transaction.created" EventTypeSourceTransactionUpdated EventType = "source.transaction.updated" EventTypeSubscriptionScheduleAborted EventType = "subscription_schedule.aborted" EventTypeSubscriptionScheduleCanceled EventType = "subscription_schedule.canceled" EventTypeSubscriptionScheduleCompleted EventType = "subscription_schedule.completed" EventTypeSubscriptionScheduleCreated EventType = "subscription_schedule.created" EventTypeSubscriptionScheduleExpiring EventType = "subscription_schedule.expiring" EventTypeSubscriptionScheduleReleased EventType = "subscription_schedule.released" EventTypeSubscriptionScheduleUpdated EventType = "subscription_schedule.updated" EventTypeTaxSettingsUpdated EventType = "tax.settings.updated" EventTypeTaxRateCreated EventType = "tax_rate.created" EventTypeTaxRateUpdated EventType = "tax_rate.updated" EventTypeTerminalReaderActionFailed EventType = "terminal.reader.action_failed" EventTypeTerminalReaderActionSucceeded EventType = "terminal.reader.action_succeeded" EventTypeTestHelpersTestClockAdvancing EventType = "test_helpers.test_clock.advancing" EventTypeTestHelpersTestClockCreated EventType = "test_helpers.test_clock.created" EventTypeTestHelpersTestClockDeleted EventType = "test_helpers.test_clock.deleted" EventTypeTestHelpersTestClockInternalFailure EventType = "test_helpers.test_clock.internal_failure" EventTypeTestHelpersTestClockReady EventType = "test_helpers.test_clock.ready" EventTypeTopupCanceled EventType = "topup.canceled" EventTypeTopupCreated EventType = "topup.created" EventTypeTopupFailed EventType = "topup.failed" EventTypeTopupReversed EventType = "topup.reversed" EventTypeTopupSucceeded EventType = "topup.succeeded" EventTypeTransferCreated EventType = "transfer.created" EventTypeTransferReversed EventType = "transfer.reversed" EventTypeTransferUpdated EventType = "transfer.updated" EventTypeTreasuryCreditReversalCreated EventType = "treasury.credit_reversal.created" EventTypeTreasuryCreditReversalPosted EventType = "treasury.credit_reversal.posted" EventTypeTreasuryDebitReversalCompleted EventType = "treasury.debit_reversal.completed" EventTypeTreasuryDebitReversalCreated EventType = "treasury.debit_reversal.created" EventTypeTreasuryDebitReversalInitialCreditGranted EventType = "treasury.debit_reversal.initial_credit_granted" EventTypeTreasuryFinancialAccountClosed EventType = "treasury.financial_account.closed" EventTypeTreasuryFinancialAccountCreated EventType = "treasury.financial_account.created" EventTypeTreasuryFinancialAccountFeaturesStatusUpdated EventType = "treasury.financial_account.features_status_updated" EventTypeTreasuryInboundTransferCanceled EventType = "treasury.inbound_transfer.canceled" EventTypeTreasuryInboundTransferCreated EventType = "treasury.inbound_transfer.created" EventTypeTreasuryInboundTransferFailed EventType = "treasury.inbound_transfer.failed" EventTypeTreasuryInboundTransferSucceeded EventType = "treasury.inbound_transfer.succeeded" EventTypeTreasuryOutboundPaymentCanceled EventType = "treasury.outbound_payment.canceled" EventTypeTreasuryOutboundPaymentCreated EventType = "treasury.outbound_payment.created" EventTypeTreasuryOutboundPaymentExpectedArrivalDateUpdated EventType = "treasury.outbound_payment.expected_arrival_date_updated" EventTypeTreasuryOutboundPaymentFailed EventType = "treasury.outbound_payment.failed" EventTypeTreasuryOutboundPaymentPosted EventType = "treasury.outbound_payment.posted" EventTypeTreasuryOutboundPaymentReturned EventType = "treasury.outbound_payment.returned" EventTypeTreasuryOutboundTransferCanceled EventType = "treasury.outbound_transfer.canceled" EventTypeTreasuryOutboundTransferCreated EventType = "treasury.outbound_transfer.created" EventTypeTreasuryOutboundTransferExpectedArrivalDateUpdated EventType = "treasury.outbound_transfer.expected_arrival_date_updated" EventTypeTreasuryOutboundTransferFailed EventType = "treasury.outbound_transfer.failed" EventTypeTreasuryOutboundTransferPosted EventType = "treasury.outbound_transfer.posted" EventTypeTreasuryOutboundTransferReturned EventType = "treasury.outbound_transfer.returned" EventTypeTreasuryReceivedCreditCreated EventType = "treasury.received_credit.created" EventTypeTreasuryReceivedCreditFailed EventType = "treasury.received_credit.failed" EventTypeTreasuryReceivedCreditSucceeded EventType = "treasury.received_credit.succeeded" EventTypeTreasuryReceivedDebitCreated EventType = "treasury.received_debit.created" EventTypeInvoiceItemUpdated EventType = "invoiceitem.updated" EventTypeOrderCreated EventType = "order.created" EventTypeRecipientCreated EventType = "recipient.created" EventTypeRecipientDeleted EventType = "recipient.deleted" EventTypeRecipientUpdated EventType = "recipient.updated" EventTypeSKUCreated EventType = "sku.created" EventTypeSKUDeleted EventType = "sku.deleted" EventTypeSKUUpdated EventType = "sku.updated" )
List of values that EventType can take
type ExtraValues ¶
ExtraValues are extra parameters that are attached to an API request. They're implemented as a custom type so that they can have their own AppendTo implementation.
type FeeRefund ¶
type FeeRefund struct { APIResource // Amount, in cents (or local equivalent). Amount int64 `json:"amount"` // Balance transaction that describes the impact on your account balance. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // ID of the application fee that was refunded. Fee *ApplicationFee `json:"fee"` // Unique identifier for the object. ID string `json:"id"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` }
`Application Fee Refund` objects allow you to refund an application fee that has previously been created but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected.
Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee)
func (*FeeRefund) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a FeeRefund. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type FeeRefundList ¶
type FeeRefundList struct { APIResource ListMeta Data []*FeeRefund `json:"data"` }
FeeRefundList is a list of FeeRefunds as retrieved from a list endpoint.
type FeeRefundListParams ¶
type FeeRefundListParams struct { ListParams `form:"*"` ID *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.
func (*FeeRefundListParams) AddExpand ¶
func (p *FeeRefundListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type FeeRefundParams ¶
type FeeRefundParams struct { Params `form:"*"` Fee *string `form:"-"` // Included in URL ID *string `form:"-"` // Included in URL // A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. Amount *int64 `form:"amount"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` }
Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected.
You can optionally refund only part of an application fee. You can do so multiple times, until the entire fee has been refunded.
Once entirely refunded, an application fee can't be refunded again. This method will raise an error when called on an already-refunded application fee, or when trying to refund more money than is left on an application fee.
func (*FeeRefundParams) AddExpand ¶
func (p *FeeRefundParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*FeeRefundParams) AddMetadata ¶
func (p *FeeRefundParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type File ¶
type File struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The file expires and isn't available at this time in epoch seconds. ExpiresAt int64 `json:"expires_at"` // The suitable name for saving the file to a filesystem. Filename string `json:"filename"` // Unique identifier for the object. ID string `json:"id"` // A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. Links *FileLinkList `json:"links"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. Purpose FilePurpose `json:"purpose"` // The size of the file object in bytes. Size int64 `json:"size"` // A suitable title for the document. Title string `json:"title"` // The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). Type string `json:"type"` // Use your live secret API key to download the file from this URL. URL string `json:"url"` }
This object represents files hosted on Stripe's servers. You can upload files with the [create file](https://stripe.com/docs/api#create_file) request (for example, when uploading dispute evidence). Stripe also creates files independetly (for example, the results of a [Sigma scheduled query](https://stripe.com/docs/api#scheduled_queries)).
Related guide: [File upload guide](https://stripe.com/docs/file-upload)
func (*File) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a File. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type FileFileLinkDataParams ¶
type FileFileLinkDataParams struct { Params `form:"*"` // Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. Create *bool `form:"create"` // The link isn't available after this future timestamp. ExpiresAt *int64 `form:"expires_at"` // 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`. Metadata map[string]string `form:"metadata"` }
Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
func (*FileFileLinkDataParams) AddMetadata ¶
func (p *FileFileLinkDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type FileLink ¶
type FileLink struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Returns if the link is already expired. Expired bool `json:"expired"` // Time that the link expires. ExpiresAt int64 `json:"expires_at"` // The file object this link points to. File *File `json:"file"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The publicly accessible URL to download the file. URL string `json:"url"` }
To share the contents of a `File` object with non-Stripe users, you can create a `FileLink`. `FileLink`s contain a URL that you can use to retrieve the contents of the file without authentication.
type FileLinkList ¶
type FileLinkList struct { APIResource ListMeta Data []*FileLink `json:"data"` }
FileLinkList is a list of FileLinks as retrieved from a list endpoint.
type FileLinkListParams ¶
type FileLinkListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Filter links by their expiration status. By default, Stripe returns all links. Expired *bool `form:"expired"` // Only return links for the given file. File *string `form:"file"` }
Returns a list of file links.
func (*FileLinkListParams) AddExpand ¶
func (p *FileLinkListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type FileLinkParams ¶
type FileLinkParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. ExpiresAt *int64 `form:"expires_at"` ExpiresAtNow *bool `form:"-"` // See custom AppendTo // The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. File *string `form:"file"` // 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`. Metadata map[string]string `form:"metadata"` }
Retrieves the file link with the given ID.
func (*FileLinkParams) AddExpand ¶
func (p *FileLinkParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*FileLinkParams) AddMetadata ¶
func (p *FileLinkParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type FileList ¶
type FileList struct { APIResource ListMeta Data []*File `json:"data"` }
FileList is a list of Files as retrieved from a list endpoint.
type FileListParams ¶
type FileListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. Purpose *string `form:"purpose"` }
Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
func (*FileListParams) AddExpand ¶
func (p *FileListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type FileParams ¶
type FileParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // FileReader is a reader with the contents of the file that should be uploaded. FileReader io.Reader // Filename is just the name of the file without path information. Filename *string // Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. FileLinkData *FileFileLinkDataParams `form:"file_link_data"` // The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. Purpose *string `form:"purpose"` }
To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
All of Stripe's officially supported Client libraries support sending multipart/form-data.
func (*FileParams) AddExpand ¶
func (p *FileParams) AddExpand(f string)
AddExpand appends a new field to expand.
type FilePurpose ¶
type FilePurpose string
The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
const ( FilePurposeAccountRequirement FilePurpose = "account_requirement" FilePurposeAdditionalVerification FilePurpose = "additional_verification" FilePurposeBusinessIcon FilePurpose = "business_icon" FilePurposeBusinessLogo FilePurpose = "business_logo" FilePurposeCustomerSignature FilePurpose = "customer_signature" FilePurposeDisputeEvidence FilePurpose = "dispute_evidence" FilePurposeDocumentProviderIdentityDocument FilePurpose = "document_provider_identity_document" FilePurposeFinanceReportRun FilePurpose = "finance_report_run" FilePurposeIdentityDocument FilePurpose = "identity_document" FilePurposeIdentityDocumentDownloadable FilePurpose = "identity_document_downloadable" FilePurposePCIDocument FilePurpose = "pci_document" FilePurposeSelfie FilePurpose = "selfie" FilePurposeSigmaScheduledQuery FilePurpose = "sigma_scheduled_query" FilePurposeTaxDocumentUserUpload FilePurpose = "tax_document_user_upload" FilePurposeTerminalReaderSplashscreen FilePurpose = "terminal_reader_splashscreen" )
List of values that FilePurpose can take
type Filters ¶
type Filters struct {
// contains filtered or unexported fields
}
Filters is a structure that contains a collection of filters for list-related APIs.
type FinancialConnectionsAccount ¶
type FinancialConnectionsAccount struct { APIResource // The account holder that this account belongs to. AccountHolder *FinancialConnectionsAccountAccountHolder `json:"account_holder"` // The most recent information about the account's balance. Balance *FinancialConnectionsAccountBalance `json:"balance"` // The state of the most recent attempt to refresh the account balance. BalanceRefresh *FinancialConnectionsAccountBalanceRefresh `json:"balance_refresh"` // The type of the account. Account category is further divided in `subcategory`. Category FinancialConnectionsAccountCategory `json:"category"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // A human-readable name that has been assigned to this account, either by the account holder or by the institution. DisplayName string `json:"display_name"` // Unique identifier for the object. ID string `json:"id"` // The name of the institution that holds this account. InstitutionName string `json:"institution_name"` // The last 4 digits of the account number. If present, this will be 4 numeric characters. Last4 string `json:"last4"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The most recent information about the account's owners. Ownership *FinancialConnectionsAccountOwnership `json:"ownership"` // The state of the most recent attempt to refresh the account owners. OwnershipRefresh *FinancialConnectionsAccountOwnershipRefresh `json:"ownership_refresh"` // The list of permissions granted by this account. Permissions []FinancialConnectionsAccountPermission `json:"permissions"` // The status of the link to the account. Status FinancialConnectionsAccountStatus `json:"status"` // If `category` is `cash`, one of: // // - `checking` // - `savings` // - `other` // // If `category` is `credit`, one of: // // - `mortgage` // - `line_of_credit` // - `credit_card` // - `other` // // If `category` is `investment` or `other`, this will be `other`. Subcategory FinancialConnectionsAccountSubcategory `json:"subcategory"` // The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. SupportedPaymentMethodTypes []FinancialConnectionsAccountSupportedPaymentMethodType `json:"supported_payment_method_types"` }
A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
type FinancialConnectionsAccountAccountHolder ¶
type FinancialConnectionsAccountAccountHolder struct { // The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. Account *Account `json:"account"` // ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. Customer *Customer `json:"customer"` // Type of account holder that this account belongs to. Type FinancialConnectionsAccountAccountHolderType `json:"type"` }
The account holder that this account belongs to.
type FinancialConnectionsAccountAccountHolderType ¶
type FinancialConnectionsAccountAccountHolderType string
Type of account holder that this account belongs to.
const ( FinancialConnectionsAccountAccountHolderTypeAccount FinancialConnectionsAccountAccountHolderType = "account" FinancialConnectionsAccountAccountHolderTypeCustomer FinancialConnectionsAccountAccountHolderType = "customer" )
List of values that FinancialConnectionsAccountAccountHolderType can take
type FinancialConnectionsAccountBalance ¶
type FinancialConnectionsAccountBalance struct { // The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. AsOf int64 `json:"as_of"` Cash *FinancialConnectionsAccountBalanceCash `json:"cash"` Credit *FinancialConnectionsAccountBalanceCredit `json:"credit"` // The balances owed to (or by) the account holder. // // Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. // // Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. Current map[string]int64 `json:"current"` // The `type` of the balance. An additional hash is included on the balance with a name matching this value. Type FinancialConnectionsAccountBalanceType `json:"type"` }
The most recent information about the account's balance.
type FinancialConnectionsAccountBalanceCash ¶
type FinancialConnectionsAccountBalanceCash struct { // The funds available to the account holder. Typically this is the current balance less any holds. // // Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. // // Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. Available map[string]int64 `json:"available"` }
type FinancialConnectionsAccountBalanceCredit ¶
type FinancialConnectionsAccountBalanceCredit struct { // The credit that has been used by the account holder. // // Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. // // Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. Used map[string]int64 `json:"used"` }
type FinancialConnectionsAccountBalanceRefresh ¶
type FinancialConnectionsAccountBalanceRefresh struct { // The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. LastAttemptedAt int64 `json:"last_attempted_at"` // The status of the last refresh attempt. Status FinancialConnectionsAccountBalanceRefreshStatus `json:"status"` }
The state of the most recent attempt to refresh the account balance.
type FinancialConnectionsAccountBalanceRefreshStatus ¶
type FinancialConnectionsAccountBalanceRefreshStatus string
The status of the last refresh attempt.
const ( FinancialConnectionsAccountBalanceRefreshStatusFailed FinancialConnectionsAccountBalanceRefreshStatus = "failed" FinancialConnectionsAccountBalanceRefreshStatusPending FinancialConnectionsAccountBalanceRefreshStatus = "pending" FinancialConnectionsAccountBalanceRefreshStatusSucceeded FinancialConnectionsAccountBalanceRefreshStatus = "succeeded" )
List of values that FinancialConnectionsAccountBalanceRefreshStatus can take
type FinancialConnectionsAccountBalanceType ¶
type FinancialConnectionsAccountBalanceType string
The `type` of the balance. An additional hash is included on the balance with a name matching this value.
const ( FinancialConnectionsAccountBalanceTypeCash FinancialConnectionsAccountBalanceType = "cash" FinancialConnectionsAccountBalanceTypeCredit FinancialConnectionsAccountBalanceType = "credit" )
List of values that FinancialConnectionsAccountBalanceType can take
type FinancialConnectionsAccountCategory ¶
type FinancialConnectionsAccountCategory string
The type of the account. Account category is further divided in `subcategory`.
const ( FinancialConnectionsAccountCategoryCash FinancialConnectionsAccountCategory = "cash" FinancialConnectionsAccountCategoryCredit FinancialConnectionsAccountCategory = "credit" FinancialConnectionsAccountCategoryInvestment FinancialConnectionsAccountCategory = "investment" FinancialConnectionsAccountCategoryOther FinancialConnectionsAccountCategory = "other" )
List of values that FinancialConnectionsAccountCategory can take
type FinancialConnectionsAccountDisconnectParams ¶
type FinancialConnectionsAccountDisconnectParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
func (*FinancialConnectionsAccountDisconnectParams) AddExpand ¶
func (p *FinancialConnectionsAccountDisconnectParams) AddExpand(f string)
AddExpand appends a new field to expand.
type FinancialConnectionsAccountList ¶
type FinancialConnectionsAccountList struct { APIResource ListMeta Data []*FinancialConnectionsAccount `json:"data"` }
FinancialConnectionsAccountList is a list of Accounts as retrieved from a list endpoint.
type FinancialConnectionsAccountListAccountHolderParams ¶
type FinancialConnectionsAccountListAccountHolderParams struct { // The ID of the Stripe account whose accounts will be retrieved. Account *string `form:"account"` // The ID of the Stripe customer whose accounts will be retrieved. Customer *string `form:"customer"` }
If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.
type FinancialConnectionsAccountListOwnersParams ¶
type FinancialConnectionsAccountListOwnersParams struct { ListParams `form:"*"` Account *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The ID of the ownership object to fetch owners from. Ownership *string `form:"ownership"` }
Lists all owners for a given Account
func (*FinancialConnectionsAccountListOwnersParams) AddExpand ¶
func (p *FinancialConnectionsAccountListOwnersParams) AddExpand(f string)
AddExpand appends a new field to expand.
type FinancialConnectionsAccountListParams ¶
type FinancialConnectionsAccountListParams struct { ListParams `form:"*"` // If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. AccountHolder *FinancialConnectionsAccountListAccountHolderParams `form:"account_holder"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // If present, only return accounts that were collected as part of the given session. Session *string `form:"session"` }
Returns a list of Financial Connections Account objects.
func (*FinancialConnectionsAccountListParams) AddExpand ¶
func (p *FinancialConnectionsAccountListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type FinancialConnectionsAccountOwner ¶
type FinancialConnectionsAccountOwner struct { // The email address of the owner. Email string `json:"email"` // Unique identifier for the object. ID string `json:"id"` // The full name of the owner. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The ownership object that this owner belongs to. Ownership string `json:"ownership"` // The raw phone number of the owner. Phone string `json:"phone"` // The raw physical address of the owner. RawAddress string `json:"raw_address"` // The timestamp of the refresh that updated this owner. RefreshedAt int64 `json:"refreshed_at"` }
Describes an owner of an account.
type FinancialConnectionsAccountOwnerList ¶
type FinancialConnectionsAccountOwnerList struct { APIResource ListMeta Data []*FinancialConnectionsAccountOwner `json:"data"` }
FinancialConnectionsAccountOwnerList is a list of AccountOwners as retrieved from a list endpoint.
type FinancialConnectionsAccountOwnership ¶
type FinancialConnectionsAccountOwnership struct { // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Unique identifier for the object. ID string `json:"id"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // A paginated list of owners for this account. Owners *FinancialConnectionsAccountOwnerList `json:"owners"` }
Describes a snapshot of the owners of an account at a particular point in time.
func (*FinancialConnectionsAccountOwnership) UnmarshalJSON ¶
func (f *FinancialConnectionsAccountOwnership) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a FinancialConnectionsAccountOwnership. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type FinancialConnectionsAccountOwnershipRefresh ¶
type FinancialConnectionsAccountOwnershipRefresh struct { // The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. LastAttemptedAt int64 `json:"last_attempted_at"` // The status of the last refresh attempt. Status FinancialConnectionsAccountOwnershipRefreshStatus `json:"status"` }
The state of the most recent attempt to refresh the account owners.
type FinancialConnectionsAccountOwnershipRefreshStatus ¶
type FinancialConnectionsAccountOwnershipRefreshStatus string
The status of the last refresh attempt.
const ( FinancialConnectionsAccountOwnershipRefreshStatusFailed FinancialConnectionsAccountOwnershipRefreshStatus = "failed" FinancialConnectionsAccountOwnershipRefreshStatusPending FinancialConnectionsAccountOwnershipRefreshStatus = "pending" FinancialConnectionsAccountOwnershipRefreshStatusSucceeded FinancialConnectionsAccountOwnershipRefreshStatus = "succeeded" )
List of values that FinancialConnectionsAccountOwnershipRefreshStatus can take
type FinancialConnectionsAccountParams ¶
type FinancialConnectionsAccountParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of an Financial Connections Account.
func (*FinancialConnectionsAccountParams) AddExpand ¶
func (p *FinancialConnectionsAccountParams) AddExpand(f string)
AddExpand appends a new field to expand.
type FinancialConnectionsAccountPermission ¶
type FinancialConnectionsAccountPermission string
The list of permissions granted by this account.
const ( FinancialConnectionsAccountPermissionBalances FinancialConnectionsAccountPermission = "balances" FinancialConnectionsAccountPermissionOwnership FinancialConnectionsAccountPermission = "ownership" FinancialConnectionsAccountPermissionPaymentMethod FinancialConnectionsAccountPermission = "payment_method" FinancialConnectionsAccountPermissionTransactions FinancialConnectionsAccountPermission = "transactions" )
List of values that FinancialConnectionsAccountPermission can take
type FinancialConnectionsAccountRefreshParams ¶
type FinancialConnectionsAccountRefreshParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The list of account features that you would like to refresh. Features []*string `form:"features"` }
Refreshes the data associated with a Financial Connections Account.
func (*FinancialConnectionsAccountRefreshParams) AddExpand ¶
func (p *FinancialConnectionsAccountRefreshParams) AddExpand(f string)
AddExpand appends a new field to expand.
type FinancialConnectionsAccountStatus ¶
type FinancialConnectionsAccountStatus string
The status of the link to the account.
const ( FinancialConnectionsAccountStatusActive FinancialConnectionsAccountStatus = "active" FinancialConnectionsAccountStatusDisconnected FinancialConnectionsAccountStatus = "disconnected" FinancialConnectionsAccountStatusInactive FinancialConnectionsAccountStatus = "inactive" )
List of values that FinancialConnectionsAccountStatus can take
type FinancialConnectionsAccountSubcategory ¶
type FinancialConnectionsAccountSubcategory string
If `category` is `cash`, one of:
- `checking`
- `savings`
- `other`
If `category` is `credit`, one of:
- `mortgage`
- `line_of_credit`
- `credit_card`
- `other`
If `category` is `investment` or `other`, this will be `other`.
const ( FinancialConnectionsAccountSubcategoryChecking FinancialConnectionsAccountSubcategory = "checking" FinancialConnectionsAccountSubcategoryCreditCard FinancialConnectionsAccountSubcategory = "credit_card" FinancialConnectionsAccountSubcategoryLineOfCredit FinancialConnectionsAccountSubcategory = "line_of_credit" FinancialConnectionsAccountSubcategoryMortgage FinancialConnectionsAccountSubcategory = "mortgage" FinancialConnectionsAccountSubcategoryOther FinancialConnectionsAccountSubcategory = "other" FinancialConnectionsAccountSubcategorySavings FinancialConnectionsAccountSubcategory = "savings" )
List of values that FinancialConnectionsAccountSubcategory can take
type FinancialConnectionsAccountSupportedPaymentMethodType ¶
type FinancialConnectionsAccountSupportedPaymentMethodType string
The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.
const ( FinancialConnectionsAccountSupportedPaymentMethodTypeLink FinancialConnectionsAccountSupportedPaymentMethodType = "link" FinancialConnectionsAccountSupportedPaymentMethodTypeUSBankAccount FinancialConnectionsAccountSupportedPaymentMethodType = "us_bank_account" )
List of values that FinancialConnectionsAccountSupportedPaymentMethodType can take
type FinancialConnectionsSession ¶
type FinancialConnectionsSession struct { APIResource // The account holder for whom accounts are collected in this session. AccountHolder *FinancialConnectionsSessionAccountHolder `json:"account_holder"` // The accounts that were collected as part of this Session. Accounts *FinancialConnectionsAccountList `json:"accounts"` // A value that will be passed to the client to launch the authentication flow. ClientSecret string `json:"client_secret"` Filters *FinancialConnectionsSessionFilters `json:"filters"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Permissions requested for accounts collected during this session. Permissions []FinancialConnectionsSessionPermission `json:"permissions"` // Data features requested to be retrieved upon account creation. Prefetch []FinancialConnectionsSessionPrefetch `json:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL string `json:"return_url"` }
A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.
type FinancialConnectionsSessionAccountHolder ¶
type FinancialConnectionsSessionAccountHolder struct { // The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. Account *Account `json:"account"` // ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. Customer *Customer `json:"customer"` // Type of account holder that this account belongs to. Type FinancialConnectionsSessionAccountHolderType `json:"type"` }
The account holder for whom accounts are collected in this session.
type FinancialConnectionsSessionAccountHolderParams ¶
type FinancialConnectionsSessionAccountHolderParams struct { // The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. Account *string `form:"account"` // The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`. Customer *string `form:"customer"` // Type of account holder to collect accounts for. Type *string `form:"type"` }
The account holder to link accounts for.
type FinancialConnectionsSessionAccountHolderType ¶
type FinancialConnectionsSessionAccountHolderType string
Type of account holder that this account belongs to.
const ( FinancialConnectionsSessionAccountHolderTypeAccount FinancialConnectionsSessionAccountHolderType = "account" FinancialConnectionsSessionAccountHolderTypeCustomer FinancialConnectionsSessionAccountHolderType = "customer" )
List of values that FinancialConnectionsSessionAccountHolderType can take
type FinancialConnectionsSessionFilters ¶
type FinancialConnectionsSessionFilters struct { // List of countries from which to filter accounts. Countries []string `json:"countries"` }
type FinancialConnectionsSessionFiltersParams ¶
type FinancialConnectionsSessionFiltersParams struct { // List of countries from which to collect accounts. Countries []*string `form:"countries"` }
Filters to restrict the kinds of accounts to collect.
type FinancialConnectionsSessionParams ¶
type FinancialConnectionsSessionParams struct { Params `form:"*"` // The account holder to link accounts for. AccountHolder *FinancialConnectionsSessionAccountHolderParams `form:"account_holder"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Filters to restrict the kinds of accounts to collect. Filters *FinancialConnectionsSessionFiltersParams `form:"filters"` // List of data features that you would like to request access to. // // Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. Permissions []*string `form:"permissions"` // List of data features that you would like to retrieve upon account creation. Prefetch []*string `form:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL *string `form:"return_url"` }
To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
func (*FinancialConnectionsSessionParams) AddExpand ¶
func (p *FinancialConnectionsSessionParams) AddExpand(f string)
AddExpand appends a new field to expand.
type FinancialConnectionsSessionPermission ¶
type FinancialConnectionsSessionPermission string
Permissions requested for accounts collected during this session.
const ( FinancialConnectionsSessionPermissionBalances FinancialConnectionsSessionPermission = "balances" FinancialConnectionsSessionPermissionOwnership FinancialConnectionsSessionPermission = "ownership" FinancialConnectionsSessionPermissionPaymentMethod FinancialConnectionsSessionPermission = "payment_method" FinancialConnectionsSessionPermissionTransactions FinancialConnectionsSessionPermission = "transactions" )
List of values that FinancialConnectionsSessionPermission can take
type FinancialConnectionsSessionPrefetch ¶ added in v75.2.0
type FinancialConnectionsSessionPrefetch string
Data features requested to be retrieved upon account creation.
const ( FinancialConnectionsSessionPrefetchBalances FinancialConnectionsSessionPrefetch = "balances" FinancialConnectionsSessionPrefetchOwnership FinancialConnectionsSessionPrefetch = "ownership" )
List of values that FinancialConnectionsSessionPrefetch can take
type FundingInstructions ¶
type FundingInstructions struct { APIResource BankTransfer *FundingInstructionsBankTransfer `json:"bank_transfer"` // 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 Currency `json:"currency"` // The `funding_type` of the returned instructions FundingType FundingInstructionsFundingType `json:"funding_type"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` }
Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is automatically applied to future invoices and payments using the `customer_balance` payment method. Customers can fund this balance by initiating a bank transfer to any account in the `financial_addresses` field. Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions)
type FundingInstructionsBankTransfer ¶
type FundingInstructionsBankTransfer struct { // The country of the bank account to fund Country string `json:"country"` // A list of financial addresses that can be used to fund a particular balance FinancialAddresses []*FundingInstructionsBankTransferFinancialAddress `json:"financial_addresses"` // The bank_transfer type Type FundingInstructionsBankTransferType `json:"type"` }
type FundingInstructionsBankTransferFinancialAddress ¶
type FundingInstructionsBankTransferFinancialAddress struct { // Iban Records contain E.U. bank account details per the SEPA format. IBAN *FundingInstructionsBankTransferFinancialAddressIBAN `json:"iban"` // Sort Code Records contain U.K. bank account details per the sort code format. SortCode *FundingInstructionsBankTransferFinancialAddressSortCode `json:"sort_code"` // SPEI Records contain Mexico bank account details per the SPEI format. Spei *FundingInstructionsBankTransferFinancialAddressSpei `json:"spei"` // The payment networks supported by this FinancialAddress SupportedNetworks []FundingInstructionsBankTransferFinancialAddressSupportedNetwork `json:"supported_networks"` // The type of financial address Type FundingInstructionsBankTransferFinancialAddressType `json:"type"` // Zengin Records contain Japan bank account details per the Zengin format. Zengin *FundingInstructionsBankTransferFinancialAddressZengin `json:"zengin"` }
A list of financial addresses that can be used to fund a particular balance
type FundingInstructionsBankTransferFinancialAddressIBAN ¶
type FundingInstructionsBankTransferFinancialAddressIBAN struct { // The name of the person or business that owns the bank account AccountHolderName string `json:"account_holder_name"` // The BIC/SWIFT code of the account. BIC string `json:"bic"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // The IBAN of the account. IBAN string `json:"iban"` }
Iban Records contain E.U. bank account details per the SEPA format.
type FundingInstructionsBankTransferFinancialAddressSortCode ¶
type FundingInstructionsBankTransferFinancialAddressSortCode struct { // The name of the person or business that owns the bank account AccountHolderName string `json:"account_holder_name"` // The account number AccountNumber string `json:"account_number"` // The six-digit sort code SortCode string `json:"sort_code"` }
Sort Code Records contain U.K. bank account details per the sort code format.
type FundingInstructionsBankTransferFinancialAddressSpei ¶
type FundingInstructionsBankTransferFinancialAddressSpei struct { // The three-digit bank code BankCode string `json:"bank_code"` // The short banking institution name BankName string `json:"bank_name"` // The CLABE number Clabe string `json:"clabe"` }
SPEI Records contain Mexico bank account details per the SPEI format.
type FundingInstructionsBankTransferFinancialAddressSupportedNetwork ¶
type FundingInstructionsBankTransferFinancialAddressSupportedNetwork string
The payment networks supported by this FinancialAddress
const ( FundingInstructionsBankTransferFinancialAddressSupportedNetworkBACS FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "bacs" FundingInstructionsBankTransferFinancialAddressSupportedNetworkFPS FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "fps" FundingInstructionsBankTransferFinancialAddressSupportedNetworkSEPA FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "sepa" FundingInstructionsBankTransferFinancialAddressSupportedNetworkSpei FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "spei" FundingInstructionsBankTransferFinancialAddressSupportedNetworkZengin FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "zengin" )
List of values that FundingInstructionsBankTransferFinancialAddressSupportedNetwork can take
type FundingInstructionsBankTransferFinancialAddressType ¶
type FundingInstructionsBankTransferFinancialAddressType string
The type of financial address
const ( FundingInstructionsBankTransferFinancialAddressTypeIBAN FundingInstructionsBankTransferFinancialAddressType = "iban" FundingInstructionsBankTransferFinancialAddressTypeSortCode FundingInstructionsBankTransferFinancialAddressType = "sort_code" FundingInstructionsBankTransferFinancialAddressTypeSpei FundingInstructionsBankTransferFinancialAddressType = "spei" FundingInstructionsBankTransferFinancialAddressTypeZengin FundingInstructionsBankTransferFinancialAddressType = "zengin" )
List of values that FundingInstructionsBankTransferFinancialAddressType can take
type FundingInstructionsBankTransferFinancialAddressZengin ¶
type FundingInstructionsBankTransferFinancialAddressZengin struct { // The account holder name AccountHolderName string `json:"account_holder_name"` // The account number AccountNumber string `json:"account_number"` // The bank account type. In Japan, this can only be `futsu` or `toza`. AccountType string `json:"account_type"` // The bank code of the account BankCode string `json:"bank_code"` // The bank name of the account BankName string `json:"bank_name"` // The branch code of the account BranchCode string `json:"branch_code"` // The branch name of the account BranchName string `json:"branch_name"` }
Zengin Records contain Japan bank account details per the Zengin format.
type FundingInstructionsBankTransferType ¶
type FundingInstructionsBankTransferType string
The bank_transfer type
const ( FundingInstructionsBankTransferTypeEUBankTransfer FundingInstructionsBankTransferType = "eu_bank_transfer" FundingInstructionsBankTransferTypeJPBankTransfer FundingInstructionsBankTransferType = "jp_bank_transfer" )
List of values that FundingInstructionsBankTransferType can take
type FundingInstructionsFundingType ¶
type FundingInstructionsFundingType string
The `funding_type` of the returned instructions
const (
FundingInstructionsFundingTypeBankTransfer FundingInstructionsFundingType = "bank_transfer"
)
List of values that FundingInstructionsFundingType can take
type IdempotencyError ¶
type IdempotencyError struct {
// contains filtered or unexported fields
}
IdempotencyError occurs when an Idempotency-Key is re-used on a request that does not match the first request's API endpoint and parameters.
func (*IdempotencyError) Error ¶
func (e *IdempotencyError) Error() string
Error serializes the error object to JSON and returns it as a string.
type IdentityVerificationReport ¶
type IdentityVerificationReport struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Result from a document check Document *IdentityVerificationReportDocument `json:"document"` // Unique identifier for the object. ID string `json:"id"` // Result from an id_number check IDNumber *IdentityVerificationReportIDNumber `json:"id_number"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` Options *IdentityVerificationReportOptions `json:"options"` // Result from a selfie check Selfie *IdentityVerificationReportSelfie `json:"selfie"` // Type of report. Type IdentityVerificationReportType `json:"type"` // ID of the VerificationSession that created this report. VerificationSession string `json:"verification_session"` }
A VerificationReport is the result of an attempt to collect and verify data from a user. The collection of verification checks performed is determined from the `type` and `options` parameters used. You can find the result of each verification check performed in the appropriate sub-resource: `document`, `id_number`, `selfie`.
Each VerificationReport contains a copy of any data collected by the user as well as reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) API. To configure and create VerificationReports, use the [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.
Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).
func (*IdentityVerificationReport) UnmarshalJSON ¶
func (i *IdentityVerificationReport) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an IdentityVerificationReport. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type IdentityVerificationReportDocument ¶
type IdentityVerificationReportDocument struct { // Address as it appears in the document. Address *Address `json:"address"` // Date of birth as it appears in the document. DOB *IdentityVerificationReportDocumentDOB `json:"dob"` // Details on the verification error. Present when status is `unverified`. Error *IdentityVerificationReportDocumentError `json:"error"` // Expiration date of the document. ExpirationDate *IdentityVerificationReportDocumentExpirationDate `json:"expiration_date"` // Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. Files []string `json:"files"` // First name as it appears in the document. FirstName string `json:"first_name"` // Issued date of the document. IssuedDate *IdentityVerificationReportDocumentIssuedDate `json:"issued_date"` // Issuing country of the document. IssuingCountry string `json:"issuing_country"` // Last name as it appears in the document. LastName string `json:"last_name"` // Document ID number. Number string `json:"number"` // Status of this `document` check. Status IdentityVerificationReportDocumentStatus `json:"status"` // Type of the document. Type IdentityVerificationReportDocumentType `json:"type"` }
Result from a document check
type IdentityVerificationReportDocumentDOB ¶
type IdentityVerificationReportDocumentDOB struct { // Numerical day between 1 and 31. Day int64 `json:"day"` // Numerical month between 1 and 12. Month int64 `json:"month"` // The four-digit year. Year int64 `json:"year"` }
Date of birth as it appears in the document.
type IdentityVerificationReportDocumentError ¶
type IdentityVerificationReportDocumentError struct { // A short machine-readable string giving the reason for the verification failure. Code IdentityVerificationReportDocumentErrorCode `json:"code"` // A human-readable message giving the reason for the failure. These messages can be shown to your users. Reason string `json:"reason"` }
Details on the verification error. Present when status is `unverified`.
type IdentityVerificationReportDocumentErrorCode ¶
type IdentityVerificationReportDocumentErrorCode string
A short machine-readable string giving the reason for the verification failure.
const ( IdentityVerificationReportDocumentErrorCodeDocumentExpired IdentityVerificationReportDocumentErrorCode = "document_expired" IdentityVerificationReportDocumentErrorCodeDocumentTypeNotSupported IdentityVerificationReportDocumentErrorCode = "document_type_not_supported" IdentityVerificationReportDocumentErrorCodeDocumentUnverifiedOther IdentityVerificationReportDocumentErrorCode = "document_unverified_other" )
List of values that IdentityVerificationReportDocumentErrorCode can take
type IdentityVerificationReportDocumentExpirationDate ¶
type IdentityVerificationReportDocumentExpirationDate struct { // Numerical day between 1 and 31. Day int64 `json:"day"` // Numerical month between 1 and 12. Month int64 `json:"month"` // The four-digit year. Year int64 `json:"year"` }
Expiration date of the document.
type IdentityVerificationReportDocumentIssuedDate ¶
type IdentityVerificationReportDocumentIssuedDate struct { // Numerical day between 1 and 31. Day int64 `json:"day"` // Numerical month between 1 and 12. Month int64 `json:"month"` // The four-digit year. Year int64 `json:"year"` }
Issued date of the document.
type IdentityVerificationReportDocumentStatus ¶
type IdentityVerificationReportDocumentStatus string
Status of this `document` check.
const ( IdentityVerificationReportDocumentStatusUnverified IdentityVerificationReportDocumentStatus = "unverified" IdentityVerificationReportDocumentStatusVerified IdentityVerificationReportDocumentStatus = "verified" )
List of values that IdentityVerificationReportDocumentStatus can take
type IdentityVerificationReportDocumentType ¶
type IdentityVerificationReportDocumentType string
Type of the document.
const ( IdentityVerificationReportDocumentTypeDrivingLicense IdentityVerificationReportDocumentType = "driving_license" IdentityVerificationReportDocumentTypeIDCard IdentityVerificationReportDocumentType = "id_card" IdentityVerificationReportDocumentTypePassport IdentityVerificationReportDocumentType = "passport" )
List of values that IdentityVerificationReportDocumentType can take
type IdentityVerificationReportIDNumber ¶
type IdentityVerificationReportIDNumber struct { // Date of birth. DOB *IdentityVerificationReportIDNumberDOB `json:"dob"` // Details on the verification error. Present when status is `unverified`. Error *IdentityVerificationReportIDNumberError `json:"error"` // First name. FirstName string `json:"first_name"` // ID number. IDNumber string `json:"id_number"` // Type of ID number. IDNumberType IdentityVerificationReportIDNumberIDNumberType `json:"id_number_type"` // Last name. LastName string `json:"last_name"` // Status of this `id_number` check. Status IdentityVerificationReportIDNumberStatus `json:"status"` }
Result from an id_number check
type IdentityVerificationReportIDNumberDOB ¶
type IdentityVerificationReportIDNumberDOB struct { // Numerical day between 1 and 31. Day int64 `json:"day"` // Numerical month between 1 and 12. Month int64 `json:"month"` // The four-digit year. Year int64 `json:"year"` }
Date of birth.
type IdentityVerificationReportIDNumberError ¶
type IdentityVerificationReportIDNumberError struct { // A short machine-readable string giving the reason for the verification failure. Code IdentityVerificationReportIDNumberErrorCode `json:"code"` // A human-readable message giving the reason for the failure. These messages can be shown to your users. Reason string `json:"reason"` }
Details on the verification error. Present when status is `unverified`.
type IdentityVerificationReportIDNumberErrorCode ¶
type IdentityVerificationReportIDNumberErrorCode string
A short machine-readable string giving the reason for the verification failure.
const ( IdentityVerificationReportIDNumberErrorCodeIDNumberInsufficientDocumentData IdentityVerificationReportIDNumberErrorCode = "id_number_insufficient_document_data" IdentityVerificationReportIDNumberErrorCodeIDNumberMismatch IdentityVerificationReportIDNumberErrorCode = "id_number_mismatch" IdentityVerificationReportIDNumberErrorCodeIDNumberUnverifiedOther IdentityVerificationReportIDNumberErrorCode = "id_number_unverified_other" )
List of values that IdentityVerificationReportIDNumberErrorCode can take
type IdentityVerificationReportIDNumberIDNumberType ¶
type IdentityVerificationReportIDNumberIDNumberType string
Type of ID number.
const ( IdentityVerificationReportIDNumberIDNumberTypeBRCPF IdentityVerificationReportIDNumberIDNumberType = "br_cpf" IdentityVerificationReportIDNumberIDNumberTypeSGNRIC IdentityVerificationReportIDNumberIDNumberType = "sg_nric" IdentityVerificationReportIDNumberIDNumberTypeUSSSN IdentityVerificationReportIDNumberIDNumberType = "us_ssn" )
List of values that IdentityVerificationReportIDNumberIDNumberType can take
type IdentityVerificationReportIDNumberStatus ¶
type IdentityVerificationReportIDNumberStatus string
Status of this `id_number` check.
const ( IdentityVerificationReportIDNumberStatusUnverified IdentityVerificationReportIDNumberStatus = "unverified" IdentityVerificationReportIDNumberStatusVerified IdentityVerificationReportIDNumberStatus = "verified" )
List of values that IdentityVerificationReportIDNumberStatus can take
type IdentityVerificationReportList ¶
type IdentityVerificationReportList struct { APIResource ListMeta Data []*IdentityVerificationReport `json:"data"` }
IdentityVerificationReportList is a list of VerificationReports as retrieved from a list endpoint.
type IdentityVerificationReportListParams ¶
type IdentityVerificationReportListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return VerificationReports of this type Type *string `form:"type"` // Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. VerificationSession *string `form:"verification_session"` }
List all verification reports.
func (*IdentityVerificationReportListParams) AddExpand ¶
func (p *IdentityVerificationReportListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IdentityVerificationReportOptions ¶
type IdentityVerificationReportOptions struct { Document *IdentityVerificationReportOptionsDocument `json:"document"` IDNumber *IdentityVerificationReportOptionsIDNumber `json:"id_number"` }
type IdentityVerificationReportOptionsDocument ¶
type IdentityVerificationReportOptionsDocument struct { // Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. AllowedTypes []IdentityVerificationReportOptionsDocumentAllowedType `json:"allowed_types"` // Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. RequireIDNumber bool `json:"require_id_number"` // Disable image uploads, identity document images have to be captured using the device's camera. RequireLiveCapture bool `json:"require_live_capture"` // Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). RequireMatchingSelfie bool `json:"require_matching_selfie"` }
type IdentityVerificationReportOptionsDocumentAllowedType ¶
type IdentityVerificationReportOptionsDocumentAllowedType string
Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
const ( IdentityVerificationReportOptionsDocumentAllowedTypeDrivingLicense IdentityVerificationReportOptionsDocumentAllowedType = "driving_license" IdentityVerificationReportOptionsDocumentAllowedTypeIDCard IdentityVerificationReportOptionsDocumentAllowedType = "id_card" IdentityVerificationReportOptionsDocumentAllowedTypePassport IdentityVerificationReportOptionsDocumentAllowedType = "passport" )
List of values that IdentityVerificationReportOptionsDocumentAllowedType can take
type IdentityVerificationReportOptionsIDNumber ¶
type IdentityVerificationReportOptionsIDNumber struct{}
type IdentityVerificationReportParams ¶
type IdentityVerificationReportParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves an existing VerificationReport
func (*IdentityVerificationReportParams) AddExpand ¶
func (p *IdentityVerificationReportParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IdentityVerificationReportSelfie ¶
type IdentityVerificationReportSelfie struct { // ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. Document string `json:"document"` // Details on the verification error. Present when status is `unverified`. Error *IdentityVerificationReportSelfieError `json:"error"` // ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. Selfie string `json:"selfie"` // Status of this `selfie` check. Status IdentityVerificationReportSelfieStatus `json:"status"` }
Result from a selfie check
type IdentityVerificationReportSelfieError ¶
type IdentityVerificationReportSelfieError struct { // A short machine-readable string giving the reason for the verification failure. Code IdentityVerificationReportSelfieErrorCode `json:"code"` // A human-readable message giving the reason for the failure. These messages can be shown to your users. Reason string `json:"reason"` }
Details on the verification error. Present when status is `unverified`.
type IdentityVerificationReportSelfieErrorCode ¶
type IdentityVerificationReportSelfieErrorCode string
A short machine-readable string giving the reason for the verification failure.
const ( IdentityVerificationReportSelfieErrorCodeSelfieDocumentMissingPhoto IdentityVerificationReportSelfieErrorCode = "selfie_document_missing_photo" IdentityVerificationReportSelfieErrorCodeSelfieFaceMismatch IdentityVerificationReportSelfieErrorCode = "selfie_face_mismatch" IdentityVerificationReportSelfieErrorCodeSelfieManipulated IdentityVerificationReportSelfieErrorCode = "selfie_manipulated" IdentityVerificationReportSelfieErrorCodeSelfieUnverifiedOther IdentityVerificationReportSelfieErrorCode = "selfie_unverified_other" )
List of values that IdentityVerificationReportSelfieErrorCode can take
type IdentityVerificationReportSelfieStatus ¶
type IdentityVerificationReportSelfieStatus string
Status of this `selfie` check.
const ( IdentityVerificationReportSelfieStatusUnverified IdentityVerificationReportSelfieStatus = "unverified" IdentityVerificationReportSelfieStatusVerified IdentityVerificationReportSelfieStatus = "verified" )
List of values that IdentityVerificationReportSelfieStatus can take
type IdentityVerificationReportType ¶
type IdentityVerificationReportType string
Type of report.
const ( IdentityVerificationReportTypeDocument IdentityVerificationReportType = "document" IdentityVerificationReportTypeIDNumber IdentityVerificationReportType = "id_number" )
List of values that IdentityVerificationReportType can take
type IdentityVerificationSession ¶
type IdentityVerificationSession struct { APIResource // The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don't store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. ClientSecret string `json:"client_secret"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Unique identifier for the object. ID string `json:"id"` // If present, this property tells you the last error encountered when processing the verification. LastError *IdentityVerificationSessionLastError `json:"last_error"` // ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) LastVerificationReport *IdentityVerificationReport `json:"last_verification_report"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // A set of options for the session's verification checks. Options *IdentityVerificationSessionOptions `json:"options"` // Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. Redaction *IdentityVerificationSessionRedaction `json:"redaction"` // Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). Status IdentityVerificationSessionStatus `json:"status"` // The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. Type IdentityVerificationSessionType `json:"type"` // The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don't store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. URL string `json:"url"` // The user's verified data. VerifiedOutputs *IdentityVerificationSessionVerifiedOutputs `json:"verified_outputs"` }
A VerificationSession guides you through the process of collecting and verifying the identities of your users. It contains details about the type of verification, such as what [verification check](https://stripe.com/docs/identity/verification-checks) to perform. Only create one VerificationSession for each verification in your system.
A VerificationSession transitions through [multiple statuses](https://stripe.com/docs/identity/how-sessions-work) throughout its lifetime as it progresses through the verification flow. The VerificationSession contains the user's verified data after verification checks are complete.
Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)
type IdentityVerificationSessionCancelParams ¶
type IdentityVerificationSessionCancelParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
func (*IdentityVerificationSessionCancelParams) AddExpand ¶
func (p *IdentityVerificationSessionCancelParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IdentityVerificationSessionLastError ¶
type IdentityVerificationSessionLastError struct { // A short machine-readable string giving the reason for the verification or user-session failure. Code IdentityVerificationSessionLastErrorCode `json:"code"` // A message that explains the reason for verification or user-session failure. Reason string `json:"reason"` }
If present, this property tells you the last error encountered when processing the verification.
type IdentityVerificationSessionLastErrorCode ¶
type IdentityVerificationSessionLastErrorCode string
A short machine-readable string giving the reason for the verification or user-session failure.
const ( IdentityVerificationSessionLastErrorCodeAbandoned IdentityVerificationSessionLastErrorCode = "abandoned" IdentityVerificationSessionLastErrorCodeConsentDeclined IdentityVerificationSessionLastErrorCode = "consent_declined" IdentityVerificationSessionLastErrorCodeCountryNotSupported IdentityVerificationSessionLastErrorCode = "country_not_supported" IdentityVerificationSessionLastErrorCodeDeviceNotSupported IdentityVerificationSessionLastErrorCode = "device_not_supported" IdentityVerificationSessionLastErrorCodeDocumentExpired IdentityVerificationSessionLastErrorCode = "document_expired" IdentityVerificationSessionLastErrorCodeDocumentTypeNotSupported IdentityVerificationSessionLastErrorCode = "document_type_not_supported" IdentityVerificationSessionLastErrorCodeDocumentUnverifiedOther IdentityVerificationSessionLastErrorCode = "document_unverified_other" IdentityVerificationSessionLastErrorCodeIDNumberInsufficientDocumentData IdentityVerificationSessionLastErrorCode = "id_number_insufficient_document_data" IdentityVerificationSessionLastErrorCodeIDNumberMismatch IdentityVerificationSessionLastErrorCode = "id_number_mismatch" IdentityVerificationSessionLastErrorCodeIDNumberUnverifiedOther IdentityVerificationSessionLastErrorCode = "id_number_unverified_other" IdentityVerificationSessionLastErrorCodeSelfieDocumentMissingPhoto IdentityVerificationSessionLastErrorCode = "selfie_document_missing_photo" IdentityVerificationSessionLastErrorCodeSelfieFaceMismatch IdentityVerificationSessionLastErrorCode = "selfie_face_mismatch" IdentityVerificationSessionLastErrorCodeSelfieManipulated IdentityVerificationSessionLastErrorCode = "selfie_manipulated" IdentityVerificationSessionLastErrorCodeSelfieUnverifiedOther IdentityVerificationSessionLastErrorCode = "selfie_unverified_other" IdentityVerificationSessionLastErrorCodeUnderSupportedAge IdentityVerificationSessionLastErrorCode = "under_supported_age" )
List of values that IdentityVerificationSessionLastErrorCode can take
type IdentityVerificationSessionList ¶
type IdentityVerificationSessionList struct { APIResource ListMeta Data []*IdentityVerificationSession `json:"data"` }
IdentityVerificationSessionList is a list of VerificationSessions as retrieved from a list endpoint.
type IdentityVerificationSessionListParams ¶
type IdentityVerificationSessionListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). Status *string `form:"status"` }
Returns a list of VerificationSessions
func (*IdentityVerificationSessionListParams) AddExpand ¶
func (p *IdentityVerificationSessionListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IdentityVerificationSessionOptions ¶
type IdentityVerificationSessionOptions struct { Document *IdentityVerificationSessionOptionsDocument `json:"document"` IDNumber *IdentityVerificationSessionOptionsIDNumber `json:"id_number"` }
A set of options for the session's verification checks.
type IdentityVerificationSessionOptionsDocument ¶
type IdentityVerificationSessionOptionsDocument struct { // Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. AllowedTypes []IdentityVerificationSessionOptionsDocumentAllowedType `json:"allowed_types"` // Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. RequireIDNumber bool `json:"require_id_number"` // Disable image uploads, identity document images have to be captured using the device's camera. RequireLiveCapture bool `json:"require_live_capture"` // Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). RequireMatchingSelfie bool `json:"require_matching_selfie"` }
type IdentityVerificationSessionOptionsDocumentAllowedType ¶
type IdentityVerificationSessionOptionsDocumentAllowedType string
Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
const ( IdentityVerificationSessionOptionsDocumentAllowedTypeDrivingLicense IdentityVerificationSessionOptionsDocumentAllowedType = "driving_license" IdentityVerificationSessionOptionsDocumentAllowedTypeIDCard IdentityVerificationSessionOptionsDocumentAllowedType = "id_card" IdentityVerificationSessionOptionsDocumentAllowedTypePassport IdentityVerificationSessionOptionsDocumentAllowedType = "passport" )
List of values that IdentityVerificationSessionOptionsDocumentAllowedType can take
type IdentityVerificationSessionOptionsDocumentParams ¶
type IdentityVerificationSessionOptionsDocumentParams struct { // Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. AllowedTypes []*string `form:"allowed_types"` // Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. RequireIDNumber *bool `form:"require_id_number"` // Disable image uploads, identity document images have to be captured using the device's camera. RequireLiveCapture *bool `form:"require_live_capture"` // Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). RequireMatchingSelfie *bool `form:"require_matching_selfie"` }
Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
type IdentityVerificationSessionOptionsIDNumber ¶
type IdentityVerificationSessionOptionsIDNumber struct{}
type IdentityVerificationSessionOptionsParams ¶
type IdentityVerificationSessionOptionsParams struct { // Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). Document *IdentityVerificationSessionOptionsDocumentParams `form:"document"` }
A set of options for the session's verification checks.
type IdentityVerificationSessionParams ¶
type IdentityVerificationSessionParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // A set of options for the session's verification checks. Options *IdentityVerificationSessionOptionsParams `form:"options"` // The URL that the user will be redirected to upon completing the verification flow. ReturnURL *string `form:"return_url"` // The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. Type *string `form:"type"` }
Creates a VerificationSession object.
After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session's url.
If your API key is in test mode, verification checks won't actually process, though everything else will occur as if in live mode.
Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents)
func (*IdentityVerificationSessionParams) AddExpand ¶
func (p *IdentityVerificationSessionParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*IdentityVerificationSessionParams) AddMetadata ¶
func (p *IdentityVerificationSessionParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type IdentityVerificationSessionRedactParams ¶
type IdentityVerificationSessionRedactParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Redact a VerificationSession to remove all collected information from Stripe. This will redact the VerificationSession and all objects related to it, including VerificationReports, Events, request logs, etc.
A VerificationSession object can be redacted when it is in requires_input or verified [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action state will automatically cancel it.
The redaction process may take up to four days. When the redaction process is in progress, the VerificationSession's redaction.status field will be set to processing; when the process is finished, it will change to redacted and an identity.verification_session.redacted event will be emitted.
Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the fields that contain personal data will be replaced by the string [redacted] or a similar placeholder. The metadata field will also be erased. Redacted objects cannot be updated or used for any purpose.
[Learn more](https://stripe.com/docs/identity/verification-sessions#redact).
func (*IdentityVerificationSessionRedactParams) AddExpand ¶
func (p *IdentityVerificationSessionRedactParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IdentityVerificationSessionRedaction ¶
type IdentityVerificationSessionRedaction struct { // Indicates whether this object and its related objects have been redacted or not. Status IdentityVerificationSessionRedactionStatus `json:"status"` }
Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
type IdentityVerificationSessionRedactionStatus ¶
type IdentityVerificationSessionRedactionStatus string
Indicates whether this object and its related objects have been redacted or not.
const ( IdentityVerificationSessionRedactionStatusProcessing IdentityVerificationSessionRedactionStatus = "processing" IdentityVerificationSessionRedactionStatusRedacted IdentityVerificationSessionRedactionStatus = "redacted" )
List of values that IdentityVerificationSessionRedactionStatus can take
type IdentityVerificationSessionStatus ¶
type IdentityVerificationSessionStatus string
Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
const ( IdentityVerificationSessionStatusCanceled IdentityVerificationSessionStatus = "canceled" IdentityVerificationSessionStatusProcessing IdentityVerificationSessionStatus = "processing" IdentityVerificationSessionStatusRequiresInput IdentityVerificationSessionStatus = "requires_input" IdentityVerificationSessionStatusVerified IdentityVerificationSessionStatus = "verified" )
List of values that IdentityVerificationSessionStatus can take
type IdentityVerificationSessionType ¶
type IdentityVerificationSessionType string
The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
const ( IdentityVerificationSessionTypeDocument IdentityVerificationSessionType = "document" IdentityVerificationSessionTypeIDNumber IdentityVerificationSessionType = "id_number" )
List of values that IdentityVerificationSessionType can take
type IdentityVerificationSessionVerifiedOutputs ¶
type IdentityVerificationSessionVerifiedOutputs struct { // The user's verified address. Address *Address `json:"address"` // The user's verified date of birth. DOB *IdentityVerificationSessionVerifiedOutputsDOB `json:"dob"` // The user's verified first name. FirstName string `json:"first_name"` // The user's verified id number. IDNumber string `json:"id_number"` // The user's verified id number type. IDNumberType IdentityVerificationSessionVerifiedOutputsIDNumberType `json:"id_number_type"` // The user's verified last name. LastName string `json:"last_name"` }
The user's verified data.
type IdentityVerificationSessionVerifiedOutputsDOB ¶
type IdentityVerificationSessionVerifiedOutputsDOB struct { // Numerical day between 1 and 31. Day int64 `json:"day"` // Numerical month between 1 and 12. Month int64 `json:"month"` // The four-digit year. Year int64 `json:"year"` }
The user's verified date of birth.
type IdentityVerificationSessionVerifiedOutputsIDNumberType ¶
type IdentityVerificationSessionVerifiedOutputsIDNumberType string
The user's verified id number type.
const ( IdentityVerificationSessionVerifiedOutputsIDNumberTypeBRCPF IdentityVerificationSessionVerifiedOutputsIDNumberType = "br_cpf" IdentityVerificationSessionVerifiedOutputsIDNumberTypeSGNRIC IdentityVerificationSessionVerifiedOutputsIDNumberType = "sg_nric" IdentityVerificationSessionVerifiedOutputsIDNumberTypeUSSSN IdentityVerificationSessionVerifiedOutputsIDNumberType = "us_ssn" )
List of values that IdentityVerificationSessionVerifiedOutputsIDNumberType can take
type InvalidRequestError ¶
type InvalidRequestError struct {
// contains filtered or unexported fields
}
InvalidRequestError is an error that occurs when a request contains invalid parameters.
func (*InvalidRequestError) Error ¶
func (e *InvalidRequestError) Error() string
Error serializes the error object to JSON and returns it as a string.
type Invoice ¶
type Invoice struct { APIResource // The country of the business associated with this invoice, most often the business creating the invoice. AccountCountry string `json:"account_country"` // The public name of the business associated with this invoice, most often the business creating the invoice. AccountName string `json:"account_name"` // The account tax IDs associated with the invoice. Only editable when the invoice is a draft. AccountTaxIDs []*TaxID `json:"account_tax_ids"` // Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. AmountDue int64 `json:"amount_due"` // The amount, in cents (or local equivalent), that was paid. AmountPaid int64 `json:"amount_paid"` // The difference between amount_due and amount_paid, in cents (or local equivalent). AmountRemaining int64 `json:"amount_remaining"` // This is the sum of all the shipping amounts. AmountShipping int64 `json:"amount_shipping"` // ID of the Connect Application that created the invoice. Application *Application `json:"application"` // The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. ApplicationFeeAmount int64 `json:"application_fee_amount"` // Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. AttemptCount int64 `json:"attempt_count"` // Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. Attempted bool `json:"attempted"` // Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. AutoAdvance bool `json:"auto_advance"` AutomaticTax *InvoiceAutomaticTax `json:"automatic_tax"` // Indicates the reason why the invoice was created. // // * `manual`: Unrelated to a subscription, for example, created via the invoice editor. // * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. // * `subscription_create`: A new subscription was created. // * `subscription_cycle`: A subscription advanced into a new period. // * `subscription_threshold`: A subscription reached a billing threshold. // * `subscription_update`: A subscription was updated. // * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. BillingReason InvoiceBillingReason `json:"billing_reason"` // ID of the latest charge generated for this invoice, if any. Charge *Charge `json:"charge"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. CollectionMethod InvoiceCollectionMethod `json:"collection_method"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // The ID of the customer who will be billed. Customer *Customer `json:"customer"` // The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. CustomerAddress *Address `json:"customer_address"` // The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. CustomerEmail string `json:"customer_email"` // The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. CustomerName string `json:"customer_name"` // The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. CustomerPhone string `json:"customer_phone"` // The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. CustomerShipping *ShippingDetails `json:"customer_shipping"` // The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. CustomerTaxExempt *CustomerTaxExempt `json:"customer_tax_exempt"` // The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. CustomerTaxIDs []*InvoiceCustomerTaxID `json:"customer_tax_ids"` // Custom fields displayed on the invoice. CustomFields []*InvoiceCustomField `json:"custom_fields"` // ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"` // ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. DefaultSource *PaymentSource `json:"default_source"` // The tax rates applied to this invoice, if any. DefaultTaxRates []*TaxRate `json:"default_tax_rates"` Deleted bool `json:"deleted"` // An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. Description string `json:"description"` // Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. Discount *Discount `json:"discount"` // The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. Discounts []*Discount `json:"discounts"` // The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. DueDate int64 `json:"due_date"` // The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. EffectiveAt int64 `json:"effective_at"` // Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. EndingBalance int64 `json:"ending_balance"` Footer string `json:"footer"` // Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. FromInvoice *InvoiceFromInvoice `json:"from_invoice"` // The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. HostedInvoiceURL string `json:"hosted_invoice_url"` // Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. ID string `json:"id"` // The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. InvoicePDF string `json:"invoice_pdf"` // The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. LastFinalizationError *Error `json:"last_finalization_error"` // The ID of the most recent non-draft revision of this invoice LatestRevision *Invoice `json:"latest_revision"` // The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. Lines *InvoiceLineItemList `json:"lines"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. NextPaymentAttempt int64 `json:"next_payment_attempt"` // A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. Number string `json:"number"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. OnBehalfOf *Account `json:"on_behalf_of"` // Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. Paid bool `json:"paid"` // Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. PaidOutOfBand bool `json:"paid_out_of_band"` // The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. PaymentIntent *PaymentIntent `json:"payment_intent"` PaymentSettings *InvoicePaymentSettings `json:"payment_settings"` // End of the usage period during which invoice items were added to this invoice. PeriodEnd int64 `json:"period_end"` // Start of the usage period during which invoice items were added to this invoice. PeriodStart int64 `json:"period_start"` // Total amount of all post-payment credit notes issued for this invoice. PostPaymentCreditNotesAmount int64 `json:"post_payment_credit_notes_amount"` // Total amount of all pre-payment credit notes issued for this invoice. PrePaymentCreditNotesAmount int64 `json:"pre_payment_credit_notes_amount"` // The quote this invoice was generated from. Quote *Quote `json:"quote"` // This is the transaction number that appears on email receipts sent for this invoice. ReceiptNumber string `json:"receipt_number"` // The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. Rendering *InvoiceRendering `json:"rendering"` // This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. RenderingOptions *InvoiceRenderingOptions `json:"rendering_options"` // The details of the cost of shipping, including the ShippingRate applied on the invoice. ShippingCost *InvoiceShippingCost `json:"shipping_cost"` // Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. ShippingDetails *ShippingDetails `json:"shipping_details"` // Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. StartingBalance int64 `json:"starting_balance"` // Extra information about an invoice for the customer's credit card statement. StatementDescriptor string `json:"statement_descriptor"` // The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) Status InvoiceStatus `json:"status"` StatusTransitions *InvoiceStatusTransitions `json:"status_transitions"` // The subscription that this invoice was prepared for, if any. Subscription *Subscription `json:"subscription"` // Details about the subscription that created this invoice. SubscriptionDetails *InvoiceSubscriptionDetails `json:"subscription_details"` // Only set for upcoming invoices that preview prorations. The time used to calculate prorations. SubscriptionProrationDate int64 `json:"subscription_proration_date"` // Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated Subtotal int64 `json:"subtotal"` // The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"` // The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. Tax int64 `json:"tax"` // ID of the test clock this invoice belongs to. TestClock *TestHelpersTestClock `json:"test_clock"` ThresholdReason *InvoiceThresholdReason `json:"threshold_reason"` // Total after discounts and taxes. Total int64 `json:"total"` // The aggregate amounts calculated per discount across all line items. TotalDiscountAmounts []*InvoiceTotalDiscountAmount `json:"total_discount_amounts"` // The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. TotalExcludingTax int64 `json:"total_excluding_tax"` // The aggregate amounts calculated per tax rate for all line items. TotalTaxAmounts []*InvoiceTotalTaxAmount `json:"total_tax_amounts"` // The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. TransferData *InvoiceTransferData `json:"transfer_data"` // Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. WebhooksDeliveredAt int64 `json:"webhooks_delivered_at"` }
Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription.
They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments that may be caused by subscription upgrades/downgrades (if necessary).
If your invoice is configured to be billed through automatic charges, Stripe automatically finalizes your invoice and attempts payment. Note that finalizing the invoice, [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does not happen immediately as the invoice is created. Stripe waits until one hour after the last webhook was successfully sent (or the last webhook timed out after failing). If you (and the platforms you may have connected to) have no webhooks configured, Stripe waits one hour after creation to finalize the invoice.
If your invoice is configured to be billed by sending an email, then based on your [email settings](https://dashboard.stripe.com/account/billing/automatic), Stripe will email the invoice to your customer and await payment. These emails can contain a link to a hosted page to pay the invoice.
Stripe applies any customer credit on the account before determining the amount due for the invoice (i.e., the amount that will be actually charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the invoice is automatically marked paid, and we add the amount due to the customer's credit balance which is applied to the next invoice.
More details on the customer's credit balance are [here](https://stripe.com/docs/billing/customer/balance).
Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
Example (Update) ¶
package main import ( "log" stripe "github.com/stripe/stripe-go/v75" "github.com/stripe/stripe-go/v75/invoice" ) func main() { stripe.Key = "sk_key" params := &stripe.InvoiceParams{ Description: stripe.String("updated description"), } inv, err := invoice.Update("sub_example_id", params) if err != nil { log.Fatal(err) } log.Printf("%v\n", inv.Description) }
Output:
func (*Invoice) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of an Invoice. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type InvoiceAutomaticTax ¶
type InvoiceAutomaticTax struct { // Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. Enabled bool `json:"enabled"` // The status of the most recent automated tax calculation for this invoice. Status InvoiceAutomaticTaxStatus `json:"status"` }
type InvoiceAutomaticTaxParams ¶
type InvoiceAutomaticTaxParams struct { // Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. Enabled *bool `form:"enabled"` }
Settings for automatic tax lookup for this invoice preview.
type InvoiceAutomaticTaxStatus ¶
type InvoiceAutomaticTaxStatus string
The status of the most recent automated tax calculation for this invoice.
const ( InvoiceAutomaticTaxStatusComplete InvoiceAutomaticTaxStatus = "complete" InvoiceAutomaticTaxStatusFailed InvoiceAutomaticTaxStatus = "failed" InvoiceAutomaticTaxStatusRequiresLocationInputs InvoiceAutomaticTaxStatus = "requires_location_inputs" )
List of values that InvoiceAutomaticTaxStatus can take
type InvoiceBillingReason ¶
type InvoiceBillingReason string
Indicates the reason why the invoice was created.
* `manual`: Unrelated to a subscription, for example, created via the invoice editor. * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. * `subscription_create`: A new subscription was created. * `subscription_cycle`: A subscription advanced into a new period. * `subscription_threshold`: A subscription reached a billing threshold. * `subscription_update`: A subscription was updated. * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
const ( InvoiceBillingReasonAutomaticPendingInvoiceItemInvoice InvoiceBillingReason = "automatic_pending_invoice_item_invoice" InvoiceBillingReasonManual InvoiceBillingReason = "manual" InvoiceBillingReasonQuoteAccept InvoiceBillingReason = "quote_accept" InvoiceBillingReasonSubscription InvoiceBillingReason = "subscription" InvoiceBillingReasonSubscriptionCreate InvoiceBillingReason = "subscription_create" InvoiceBillingReasonSubscriptionCycle InvoiceBillingReason = "subscription_cycle" InvoiceBillingReasonSubscriptionThreshold InvoiceBillingReason = "subscription_threshold" InvoiceBillingReasonSubscriptionUpdate InvoiceBillingReason = "subscription_update" InvoiceBillingReasonUpcoming InvoiceBillingReason = "upcoming" )
List of values that InvoiceBillingReason can take
type InvoiceCollectionMethod ¶
type InvoiceCollectionMethod string
Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
const ( InvoiceCollectionMethodChargeAutomatically InvoiceCollectionMethod = "charge_automatically" InvoiceCollectionMethodSendInvoice InvoiceCollectionMethod = "send_invoice" )
List of values that InvoiceCollectionMethod can take
type InvoiceCustomField ¶
type InvoiceCustomField struct { // The name of the custom field. Name string `json:"name"` // The value of the custom field. Value string `json:"value"` }
Custom fields displayed on the invoice.
type InvoiceCustomFieldParams ¶
type InvoiceCustomFieldParams struct { // The name of the custom field. This may be up to 30 characters. Name *string `form:"name"` // The value of the custom field. This may be up to 30 characters. Value *string `form:"value"` }
A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
type InvoiceCustomerTaxID ¶
type InvoiceCustomerTaxID struct { // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown` Type *TaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` }
The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
type InvoiceDiscountParams ¶
type InvoiceDiscountParams struct { // ID of the coupon to create a new discount for. Coupon *string `form:"coupon"` // ID of an existing discount on the object (or one of its ancestors) to reuse. Discount *string `form:"discount"` }
The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead.
type InvoiceFinalizeInvoiceParams ¶
type InvoiceFinalizeInvoiceParams struct { Params `form:"*"` // Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. AutoAdvance *bool `form:"auto_advance"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
func (*InvoiceFinalizeInvoiceParams) AddExpand ¶
func (p *InvoiceFinalizeInvoiceParams) AddExpand(f string)
AddExpand appends a new field to expand.
type InvoiceFromInvoice ¶
type InvoiceFromInvoice struct { // The relation between this invoice and the cloned invoice Action string `json:"action"` // The invoice that was cloned. Invoice *Invoice `json:"invoice"` }
Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
type InvoiceFromInvoiceParams ¶
type InvoiceFromInvoiceParams struct { // The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted Action *string `form:"action"` // The `id` of the invoice that will be cloned. Invoice *string `form:"invoice"` }
Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
type InvoiceItem ¶
type InvoiceItem struct { APIResource // Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. Amount int64 `json:"amount"` // 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 Currency `json:"currency"` // The ID of the customer who will be billed when this invoice item is billed. Customer *Customer `json:"customer"` // Time at which the object was created. Measured in seconds since the Unix epoch. Date int64 `json:"date"` Deleted bool `json:"deleted"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // If true, discounts will apply to this invoice item. Always false for prorations. Discountable bool `json:"discountable"` // The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. Discounts []*Discount `json:"discounts"` // Unique identifier for the object. ID string `json:"id"` // The ID of the invoice this invoice item belongs to. Invoice *Invoice `json:"invoice"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` Period *Period `json:"period"` // If the invoice item is a proration, the plan of the subscription that the proration was computed for. Plan *Plan `json:"plan"` // The price of the invoice item. Price *Price `json:"price"` // Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. Proration bool `json:"proration"` // Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. Quantity int64 `json:"quantity"` // The subscription that this invoice item has been created for, if any. Subscription *Subscription `json:"subscription"` // The subscription item that this invoice item has been created for, if any. SubscriptionItem string `json:"subscription_item"` // The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. TaxRates []*TaxRate `json:"tax_rates"` // ID of the test clock this invoice item belongs to. TestClock *TestHelpersTestClock `json:"test_clock"` // Unit amount (in the `currency` specified) of the invoice item. UnitAmount int64 `json:"unit_amount"` // Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` }
Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an invoice by creating or updating it with an `invoice` field, at which point it will be included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines).
Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.
Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items).
func (*InvoiceItem) UnmarshalJSON ¶
func (i *InvoiceItem) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an InvoiceItem. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type InvoiceItemDiscountParams ¶
type InvoiceItemDiscountParams struct { // ID of the coupon to create a new discount for. Coupon *string `form:"coupon"` // ID of an existing discount on the object (or one of its ancestors) to reuse. Discount *string `form:"discount"` }
The coupons to redeem into discounts for the invoice item or invoice line item.
type InvoiceItemList ¶
type InvoiceItemList struct { APIResource ListMeta Data []*InvoiceItem `json:"data"` }
InvoiceItemList is a list of InvoiceItems as retrieved from a list endpoint.
type InvoiceItemListParams ¶
type InvoiceItemListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. Invoice *string `form:"invoice"` // Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. Pending *bool `form:"pending"` }
Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.
func (*InvoiceItemListParams) AddExpand ¶
func (p *InvoiceItemListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type InvoiceItemParams ¶
type InvoiceItemParams struct { Params `form:"*"` // The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. Amount *int64 `form:"amount"` // 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 `form:"currency"` // The ID of the customer who will be billed when this invoice item is billed. Customer *string `form:"customer"` // An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. Description *string `form:"description"` // Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. Discountable *bool `form:"discountable"` // The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. Discounts []*InvoiceItemDiscountParams `form:"discounts"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. Invoice *string `form:"invoice"` // 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`. Metadata map[string]string `form:"metadata"` // The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. Period *InvoiceItemPeriodParams `form:"period"` // The ID of the price object. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. PriceData *InvoiceItemPriceDataParams `form:"price_data"` // Non-negative integer. The quantity of units for the invoice item. Quantity *int64 `form:"quantity"` // The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. Subscription *string `form:"subscription"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. TaxCode *string `form:"tax_code"` // The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. TaxRates []*string `form:"tax_rates"` // The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
func (*InvoiceItemParams) AddExpand ¶
func (p *InvoiceItemParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*InvoiceItemParams) AddMetadata ¶
func (p *InvoiceItemParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type InvoiceItemPeriodParams ¶
type InvoiceItemPeriodParams struct { // The end of the period, which must be greater than or equal to the start. This value is inclusive. End *int64 `form:"end"` // The start of the period. This value is inclusive. Start *int64 `form:"start"` }
The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
type InvoiceItemPriceDataParams ¶
type InvoiceItemPriceDataParams struct { // 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 `form:"currency"` // The ID of the product that this price will belong to. Product *string `form:"product"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline.
type InvoiceLineItem ¶
type InvoiceLineItem struct { // The amount, in cents (or local equivalent). Amount int64 `json:"amount"` // The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. AmountExcludingTax int64 `json:"amount_excluding_tax"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // If true, discounts will apply to this line item. Always false for prorations. Discountable bool `json:"discountable"` // The amount of discount calculated per discount for this line item. DiscountAmounts []*InvoiceLineItemDiscountAmount `json:"discount_amounts"` // The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. Discounts []*Discount `json:"discounts"` // Unique identifier for the object. ID string `json:"id"` // The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. InvoiceItem *InvoiceItem `json:"invoice_item"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` Period *Period `json:"period"` // The plan of the subscription, if the line item is a subscription or a proration. Plan *Plan `json:"plan"` // The price of the line item. Price *Price `json:"price"` // Whether this is a proration. Proration bool `json:"proration"` // Additional details for proration line items ProrationDetails *InvoiceLineItemProrationDetails `json:"proration_details"` // The quantity of the subscription, if the line item is a subscription or a proration. Quantity int64 `json:"quantity"` // The subscription that the invoice item pertains to, if any. Subscription *Subscription `json:"subscription"` // The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. SubscriptionItem *SubscriptionItem `json:"subscription_item"` // The amount of tax calculated per tax rate for this line item TaxAmounts []*InvoiceTotalTaxAmount `json:"tax_amounts"` // The tax rates which apply to the line item. TaxRates []*TaxRate `json:"tax_rates"` // A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. Type InvoiceLineItemType `json:"type"` // The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. UnitAmountExcludingTax float64 `json:"unit_amount_excluding_tax,string"` }
type InvoiceLineItemDiscountAmount ¶
type InvoiceLineItemDiscountAmount struct { // The amount, in cents (or local equivalent), of the discount. Amount int64 `json:"amount"` // The discount that was applied to get this discount amount. Discount *Discount `json:"discount"` }
The amount of discount calculated per discount for this line item.
type InvoiceLineItemList ¶
type InvoiceLineItemList struct { APIResource ListMeta Data []*InvoiceLineItem `json:"data"` }
InvoiceLineItemList is a list of InvoiceLineItems as retrieved from a list endpoint.
type InvoiceLineItemProrationDetails ¶
type InvoiceLineItemProrationDetails struct { // For a credit proration `line_item`, the original debit line_items to which the credit proration applies. CreditedItems *InvoiceLineItemProrationDetailsCreditedItems `json:"credited_items"` }
Additional details for proration line items
type InvoiceLineItemProrationDetailsCreditedItems ¶
type InvoiceLineItemProrationDetailsCreditedItems struct { // Invoice containing the credited invoice line items Invoice string `json:"invoice"` // Credited invoice line items InvoiceLineItems []string `json:"invoice_line_items"` }
For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
type InvoiceLineItemType ¶
type InvoiceLineItemType string
A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.
const ( InvoiceLineItemTypeInvoiceItem InvoiceLineItemType = "invoiceitem" InvoiceLineItemTypeSubscription InvoiceLineItemType = "subscription" )
List of values that InvoiceLineItemType can take
type InvoiceList ¶
type InvoiceList struct { APIResource ListMeta Data []*Invoice `json:"data"` }
InvoiceList is a list of Invoices as retrieved from a list endpoint.
type InvoiceListLinesParams ¶
type InvoiceListLinesParams struct { ListParams `form:"*"` Invoice *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
func (*InvoiceListLinesParams) AddExpand ¶
func (p *InvoiceListLinesParams) AddExpand(f string)
AddExpand appends a new field to expand.
type InvoiceListParams ¶
type InvoiceListParams struct { ListParams `form:"*"` // The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. CollectionMethod *string `form:"collection_method"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Only return invoices for the customer specified by this customer ID. Customer *string `form:"customer"` DueDate *int64 `form:"due_date"` DueDateRange *RangeQueryParams `form:"due_date"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) Status *string `form:"status"` // Only return invoices for the subscription specified by this subscription ID. Subscription *string `form:"subscription"` }
You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.
func (*InvoiceListParams) AddExpand ¶
func (p *InvoiceListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type InvoiceMarkUncollectibleParams ¶
type InvoiceMarkUncollectibleParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
func (*InvoiceMarkUncollectibleParams) AddExpand ¶
func (p *InvoiceMarkUncollectibleParams) AddExpand(f string)
AddExpand appends a new field to expand.
type InvoiceParams ¶
type InvoiceParams struct { Params `form:"*"` // The account tax IDs associated with the invoice. Only editable when the invoice is a draft. AccountTaxIDs []*string `form:"account_tax_ids"` // A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). ApplicationFeeAmount *int64 `form:"application_fee_amount"` // Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. AutoAdvance *bool `form:"auto_advance"` // Settings for automatic tax lookup for this invoice. AutomaticTax *InvoiceAutomaticTaxParams `form:"automatic_tax"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. CollectionMethod *string `form:"collection_method"` // The currency to create this invoice in. Defaults to that of `customer` if not specified. Currency *string `form:"currency"` // The ID of the customer who will be billed. Customer *string `form:"customer"` // A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. CustomFields []*InvoiceCustomFieldParams `form:"custom_fields"` // The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. DaysUntilDue *int64 `form:"days_until_due"` // ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. DefaultPaymentMethod *string `form:"default_payment_method"` // ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. DefaultSource *string `form:"default_source"` // The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. DefaultTaxRates []*string `form:"default_tax_rates"` // An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. Description *string `form:"description"` // The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. Discounts []*InvoiceDiscountParams `form:"discounts"` // The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. DueDate *int64 `form:"due_date"` // The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. EffectiveAt *int64 `form:"effective_at"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` Footer *string `form:"footer"` // Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. FromInvoice *InvoiceFromInvoiceParams `form:"from_invoice"` // 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`. Metadata map[string]string `form:"metadata"` // The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. OnBehalfOf *string `form:"on_behalf_of"` // Configuration settings for the PaymentIntent that is generated when the invoice is finalized. PaymentSettings *InvoicePaymentSettingsParams `form:"payment_settings"` // How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted. PendingInvoiceItemsBehavior *string `form:"pending_invoice_items_behavior"` // The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. Rendering *InvoiceRenderingParams `form:"rendering"` // This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. RenderingOptions *InvoiceRenderingOptionsParams `form:"rendering_options"` // Settings for the cost of shipping for this invoice. ShippingCost *InvoiceShippingCostParams `form:"shipping_cost"` // Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. ShippingDetails *InvoiceShippingDetailsParams `form:"shipping_details"` // Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. StatementDescriptor *string `form:"statement_descriptor"` // The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. Subscription *string `form:"subscription"` // If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. TransferData *InvoiceTransferDataParams `form:"transfer_data"` }
Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized), monetary values, as well as collection_method, become uneditable.
If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass auto_advance=false.
func (*InvoiceParams) AddExpand ¶
func (p *InvoiceParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*InvoiceParams) AddMetadata ¶
func (p *InvoiceParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type InvoicePayParams ¶
type InvoicePayParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. // // Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. Forgive *bool `form:"forgive"` // ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. Mandate *string `form:"mandate"` // Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). OffSession *bool `form:"off_session"` // Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. PaidOutOfBand *bool `form:"paid_out_of_band"` // A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. PaymentMethod *string `form:"payment_method"` // A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. Source *string `form:"source"` }
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
func (*InvoicePayParams) AddExpand ¶
func (p *InvoicePayParams) AddExpand(f string)
AddExpand appends a new field to expand.
type InvoicePaymentSettings ¶
type InvoicePaymentSettings struct { // ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. DefaultMandate string `json:"default_mandate"` // Payment-method-specific configuration to provide to the invoice's PaymentIntent. PaymentMethodOptions *InvoicePaymentSettingsPaymentMethodOptions `json:"payment_method_options"` // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). PaymentMethodTypes []InvoicePaymentSettingsPaymentMethodType `json:"payment_method_types"` }
type InvoicePaymentSettingsParams ¶
type InvoicePaymentSettingsParams struct { // ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. DefaultMandate *string `form:"default_mandate"` // Payment-method-specific configuration to provide to the invoice's PaymentIntent. PaymentMethodOptions *InvoicePaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"` // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). PaymentMethodTypes []*string `form:"payment_method_types"` }
Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
type InvoicePaymentSettingsPaymentMethodOptions ¶
type InvoicePaymentSettingsPaymentMethodOptions struct { // If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. ACSSDebit *InvoicePaymentSettingsPaymentMethodOptionsACSSDebit `json:"acss_debit"` // If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. Bancontact *InvoicePaymentSettingsPaymentMethodOptionsBancontact `json:"bancontact"` // If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. Card *InvoicePaymentSettingsPaymentMethodOptionsCard `json:"card"` // If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. CustomerBalance *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance `json:"customer_balance"` // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. Konbini *InvoicePaymentSettingsPaymentMethodOptionsKonbini `json:"konbini"` // If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. USBankAccount *InvoicePaymentSettingsPaymentMethodOptionsUSBankAccount `json:"us_bank_account"` }
Payment-method-specific configuration to provide to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebit ¶
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebit struct { MandateOptions *InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"` // Bank account verification method. VerificationMethod InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"` }
If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions ¶
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions struct { // Transaction type of the mandate. TransactionType InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"` }
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams struct { // Transaction type of the mandate. TransactionType *string `form:"transaction_type"` }
Additional fields for Mandate creation
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType ¶
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string
Transaction type of the mandate.
const ( InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business" InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal" )
List of values that InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitParams struct { // Additional fields for Mandate creation MandateOptions *InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"` // Verification method for the intent VerificationMethod *string `form:"verification_method"` }
If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod ¶
type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod string
Bank account verification method.
const ( InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodAutomatic InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "automatic" InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodInstant InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "instant" InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits" )
List of values that InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod can take
type InvoicePaymentSettingsPaymentMethodOptionsBancontact ¶
type InvoicePaymentSettingsPaymentMethodOptionsBancontact struct { // Preferred language of the Bancontact authorization page that the customer is redirected to. PreferredLanguage string `json:"preferred_language"` }
If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsBancontactParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsBancontactParams struct { // Preferred language of the Bancontact authorization page that the customer is redirected to. PreferredLanguage *string `form:"preferred_language"` }
If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsCard ¶
type InvoicePaymentSettingsPaymentMethodOptionsCard struct { Installments *InvoicePaymentSettingsPaymentMethodOptionsCardInstallments `json:"installments"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"` }
If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsCardInstallments ¶
type InvoicePaymentSettingsPaymentMethodOptionsCardInstallments struct { // Whether Installments are enabled for this Invoice. Enabled bool `json:"enabled"` }
type InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsParams struct { // Setting to true enables installments for this invoice. // Setting to false will prevent any selected plan from applying to a payment. Enabled *bool `form:"enabled"` // The selected installment plan to use for this invoice. Plan *InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"` }
Installment configuration for payments attempted on this invoice (Mexico Only).
For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
type InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams struct { // For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. Count *int64 `form:"count"` // For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. // One of `month`. Interval *string `form:"interval"` // Type of installment plan, one of `fixed_count`. Type *string `form:"type"` }
The selected installment plan to use for this invoice.
type InvoicePaymentSettingsPaymentMethodOptionsCardParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsCardParams struct { // Installment configuration for payments attempted on this invoice (Mexico Only). // // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). Installments *InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsParams `form:"installments"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure *string `form:"request_three_d_secure"` }
If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure ¶
type InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure string
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
const ( InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAny InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "any" InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAutomatic InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "automatic" )
List of values that InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure can take
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance ¶
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance struct { BankTransfer *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer `json:"bank_transfer"` // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. FundingType InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"` }
If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer ¶
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer struct { EUBankTransfer *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer `json:"eu_bank_transfer"` // The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. Type string `json:"type"` }
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer ¶
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct { // The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. Country string `json:"country"` }
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams struct { // The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. Country *string `form:"country"` }
Configuration for eu_bank_transfer funding type.
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct { // Configuration for eu_bank_transfer funding type. EUBankTransfer *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"` // The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. Type *string `form:"type"` }
Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType ¶
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType string
The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
const (
InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingTypeBankTransfer InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType = "bank_transfer"
)
List of values that InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType can take
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct { // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. BankTransfer *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"` // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. FundingType *string `form:"funding_type"` }
If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsKonbini ¶
type InvoicePaymentSettingsPaymentMethodOptionsKonbini struct{}
If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams struct{}
If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsParams struct { // If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. ACSSDebit *InvoicePaymentSettingsPaymentMethodOptionsACSSDebitParams `form:"acss_debit"` // If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. Bancontact *InvoicePaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"` // If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. Card *InvoicePaymentSettingsPaymentMethodOptionsCardParams `form:"card"` // If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. CustomerBalance *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"` // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. Konbini *InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams `form:"konbini"` // If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. USBankAccount *InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"` }
Payment-method-specific configuration to provide to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccount ¶
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccount struct { FinancialConnections *InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"` // Bank account verification method. VerificationMethod InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"` }
If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections ¶
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` // Data features requested to be retrieved upon account creation. Prefetch []InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"` }
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. Permissions []*string `form:"permissions"` // List of data features that you would like to retrieve upon account creation. Prefetch []*string `form:"prefetch"` }
Additional fields for Financial Connections Session creation
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission ¶
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string
The list of permissions to request. The `payment_method` permission must be included.
const ( InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances" InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method" InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" )
List of values that InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch ¶ added in v75.2.0
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string
Data features requested to be retrieved upon account creation.
const (
InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances"
)
List of values that InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountParams ¶
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountParams struct { // Additional fields for Financial Connections Session creation FinancialConnections *InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"` // Verification method for the intent VerificationMethod *string `form:"verification_method"` }
If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod ¶
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod string
Bank account verification method.
const ( InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic" InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodInstant InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "instant" InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodMicrodeposits InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "microdeposits" )
List of values that InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod can take
type InvoicePaymentSettingsPaymentMethodType ¶
type InvoicePaymentSettingsPaymentMethodType string
The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
const ( InvoicePaymentSettingsPaymentMethodTypeACHCreditTransfer InvoicePaymentSettingsPaymentMethodType = "ach_credit_transfer" InvoicePaymentSettingsPaymentMethodTypeACHDebit InvoicePaymentSettingsPaymentMethodType = "ach_debit" InvoicePaymentSettingsPaymentMethodTypeACSSDebit InvoicePaymentSettingsPaymentMethodType = "acss_debit" InvoicePaymentSettingsPaymentMethodTypeAUBECSDebit InvoicePaymentSettingsPaymentMethodType = "au_becs_debit" InvoicePaymentSettingsPaymentMethodTypeBACSDebit InvoicePaymentSettingsPaymentMethodType = "bacs_debit" InvoicePaymentSettingsPaymentMethodTypeBancontact InvoicePaymentSettingsPaymentMethodType = "bancontact" InvoicePaymentSettingsPaymentMethodTypeBoleto InvoicePaymentSettingsPaymentMethodType = "boleto" InvoicePaymentSettingsPaymentMethodTypeCard InvoicePaymentSettingsPaymentMethodType = "card" InvoicePaymentSettingsPaymentMethodTypeCashApp InvoicePaymentSettingsPaymentMethodType = "cashapp" InvoicePaymentSettingsPaymentMethodTypeCustomerBalance InvoicePaymentSettingsPaymentMethodType = "customer_balance" InvoicePaymentSettingsPaymentMethodTypeFPX InvoicePaymentSettingsPaymentMethodType = "fpx" InvoicePaymentSettingsPaymentMethodTypeGiropay InvoicePaymentSettingsPaymentMethodType = "giropay" InvoicePaymentSettingsPaymentMethodTypeGrabpay InvoicePaymentSettingsPaymentMethodType = "grabpay" InvoicePaymentSettingsPaymentMethodTypeIDEAL InvoicePaymentSettingsPaymentMethodType = "ideal" InvoicePaymentSettingsPaymentMethodTypeKonbini InvoicePaymentSettingsPaymentMethodType = "konbini" InvoicePaymentSettingsPaymentMethodTypeLink InvoicePaymentSettingsPaymentMethodType = "link" InvoicePaymentSettingsPaymentMethodTypePayNow InvoicePaymentSettingsPaymentMethodType = "paynow" InvoicePaymentSettingsPaymentMethodTypePaypal InvoicePaymentSettingsPaymentMethodType = "paypal" InvoicePaymentSettingsPaymentMethodTypePromptPay InvoicePaymentSettingsPaymentMethodType = "promptpay" InvoicePaymentSettingsPaymentMethodTypeSEPACreditTransfer InvoicePaymentSettingsPaymentMethodType = "sepa_credit_transfer" InvoicePaymentSettingsPaymentMethodTypeSEPADebit InvoicePaymentSettingsPaymentMethodType = "sepa_debit" InvoicePaymentSettingsPaymentMethodTypeSofort InvoicePaymentSettingsPaymentMethodType = "sofort" InvoicePaymentSettingsPaymentMethodTypeUSBankAccount InvoicePaymentSettingsPaymentMethodType = "us_bank_account" InvoicePaymentSettingsPaymentMethodTypeWeChatPay InvoicePaymentSettingsPaymentMethodType = "wechat_pay" )
List of values that InvoicePaymentSettingsPaymentMethodType can take
type InvoiceRendering ¶ added in v75.8.0
type InvoiceRendering struct { // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. AmountTaxDisplay string `json:"amount_tax_display"` // Invoice pdf rendering options PDF *InvoiceRenderingPDF `json:"pdf"` }
The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
type InvoiceRenderingOptions ¶
type InvoiceRenderingOptions struct { // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. AmountTaxDisplay string `json:"amount_tax_display"` }
This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
type InvoiceRenderingOptionsParams ¶
type InvoiceRenderingOptionsParams struct { // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. AmountTaxDisplay *string `form:"amount_tax_display"` }
This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
type InvoiceRenderingPDF ¶ added in v75.8.0
type InvoiceRenderingPDF struct { // Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. PageSize InvoiceRenderingPDFPageSize `json:"page_size"` }
Invoice pdf rendering options
type InvoiceRenderingPDFPageSize ¶ added in v75.8.0
type InvoiceRenderingPDFPageSize string
Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
const ( InvoiceRenderingPDFPageSizeA4 InvoiceRenderingPDFPageSize = "a4" InvoiceRenderingPDFPageSizeAuto InvoiceRenderingPDFPageSize = "auto" InvoiceRenderingPDFPageSizeLetter InvoiceRenderingPDFPageSize = "letter" )
List of values that InvoiceRenderingPDFPageSize can take
type InvoiceRenderingPDFParams ¶ added in v75.8.0
type InvoiceRenderingPDFParams struct { // Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. // If set to `auto`, invoice PDF page size defaults to `a4` for customers with // Japanese locale and `letter` for customers with other locales. PageSize *string `form:"page_size"` }
Invoice pdf rendering options
type InvoiceRenderingParams ¶ added in v75.8.0
type InvoiceRenderingParams struct { // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. AmountTaxDisplay *string `form:"amount_tax_display"` // Invoice pdf rendering options PDF *InvoiceRenderingPDFParams `form:"pdf"` }
The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
type InvoiceSearchParams ¶
type InvoiceSearchParams struct { SearchParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. Page *string `form:"page"` }
Search for invoices you've previously created using Stripe's [Search Query Language](https://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.
func (*InvoiceSearchParams) AddExpand ¶
func (p *InvoiceSearchParams) AddExpand(f string)
AddExpand appends a new field to expand.
type InvoiceSearchResult ¶
type InvoiceSearchResult struct { APIResource SearchMeta Data []*Invoice `json:"data"` }
InvoiceSearchResult is a list of Invoice search results as retrieved from a search endpoint.
type InvoiceSendInvoiceParams ¶
type InvoiceSendInvoiceParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
func (*InvoiceSendInvoiceParams) AddExpand ¶
func (p *InvoiceSendInvoiceParams) AddExpand(f string)
AddExpand appends a new field to expand.
type InvoiceShippingCost ¶
type InvoiceShippingCost struct { // Total shipping cost before any taxes are applied. AmountSubtotal int64 `json:"amount_subtotal"` // Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. AmountTax int64 `json:"amount_tax"` // Total shipping cost after taxes are applied. AmountTotal int64 `json:"amount_total"` // The ID of the ShippingRate for this invoice. ShippingRate *ShippingRate `json:"shipping_rate"` // The taxes applied to the shipping rate. Taxes []*InvoiceShippingCostTax `json:"taxes"` }
The details of the cost of shipping, including the ShippingRate applied on the invoice.
type InvoiceShippingCostParams ¶
type InvoiceShippingCostParams struct { // The ID of the shipping rate to use for this order. ShippingRate *string `form:"shipping_rate"` // Parameters to create a new ad-hoc shipping rate for this order. ShippingRateData *InvoiceShippingCostShippingRateDataParams `form:"shipping_rate_data"` }
Settings for the cost of shipping for this invoice.
type InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumParams ¶
type InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumParams struct { // A unit of time. Unit *string `form:"unit"` // Must be greater than 0. Value *int64 `form:"value"` }
The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
type InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumParams ¶
type InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumParams struct { // A unit of time. Unit *string `form:"unit"` // Must be greater than 0. Value *int64 `form:"value"` }
The lower bound of the estimated range. If empty, represents no lower bound.
type InvoiceShippingCostShippingRateDataDeliveryEstimateParams ¶
type InvoiceShippingCostShippingRateDataDeliveryEstimateParams struct { // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. Maximum *InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumParams `form:"maximum"` // The lower bound of the estimated range. If empty, represents no lower bound. Minimum *InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumParams `form:"minimum"` }
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
type InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsParams ¶
type InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsParams struct { // A non-negative integer in cents representing how much to charge. Amount *int64 `form:"amount"` // Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. TaxBehavior *string `form:"tax_behavior"` }
Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type InvoiceShippingCostShippingRateDataFixedAmountParams ¶
type InvoiceShippingCostShippingRateDataFixedAmountParams struct { // A non-negative integer in cents representing how much to charge. Amount *int64 `form:"amount"` // 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 `form:"currency"` // Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsParams `form:"currency_options"` }
Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
type InvoiceShippingCostShippingRateDataParams ¶
type InvoiceShippingCostShippingRateDataParams struct { // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. DeliveryEstimate *InvoiceShippingCostShippingRateDataDeliveryEstimateParams `form:"delivery_estimate"` // The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. DisplayName *string `form:"display_name"` // Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. FixedAmount *InvoiceShippingCostShippingRateDataFixedAmountParams `form:"fixed_amount"` // 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`. Metadata map[string]string `form:"metadata"` // Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. TaxCode *string `form:"tax_code"` // The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. Type *string `form:"type"` }
Parameters to create a new ad-hoc shipping rate for this order.
func (*InvoiceShippingCostShippingRateDataParams) AddMetadata ¶
func (p *InvoiceShippingCostShippingRateDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type InvoiceShippingCostTax ¶
type InvoiceShippingCostTax struct { // Amount of tax applied for this rate. Amount int64 `json:"amount"` // Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. // // Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason InvoiceShippingCostTaxTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` }
The taxes applied to the shipping rate.
type InvoiceShippingCostTaxTaxabilityReason ¶
type InvoiceShippingCostTaxTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( InvoiceShippingCostTaxTaxabilityReasonCustomerExempt InvoiceShippingCostTaxTaxabilityReason = "customer_exempt" InvoiceShippingCostTaxTaxabilityReasonNotCollecting InvoiceShippingCostTaxTaxabilityReason = "not_collecting" InvoiceShippingCostTaxTaxabilityReasonNotSubjectToTax InvoiceShippingCostTaxTaxabilityReason = "not_subject_to_tax" InvoiceShippingCostTaxTaxabilityReasonNotSupported InvoiceShippingCostTaxTaxabilityReason = "not_supported" InvoiceShippingCostTaxTaxabilityReasonPortionProductExempt InvoiceShippingCostTaxTaxabilityReason = "portion_product_exempt" InvoiceShippingCostTaxTaxabilityReasonPortionReducedRated InvoiceShippingCostTaxTaxabilityReason = "portion_reduced_rated" InvoiceShippingCostTaxTaxabilityReasonPortionStandardRated InvoiceShippingCostTaxTaxabilityReason = "portion_standard_rated" InvoiceShippingCostTaxTaxabilityReasonProductExempt InvoiceShippingCostTaxTaxabilityReason = "product_exempt" InvoiceShippingCostTaxTaxabilityReasonProductExemptHoliday InvoiceShippingCostTaxTaxabilityReason = "product_exempt_holiday" InvoiceShippingCostTaxTaxabilityReasonProportionallyRated InvoiceShippingCostTaxTaxabilityReason = "proportionally_rated" InvoiceShippingCostTaxTaxabilityReasonReducedRated InvoiceShippingCostTaxTaxabilityReason = "reduced_rated" InvoiceShippingCostTaxTaxabilityReasonReverseCharge InvoiceShippingCostTaxTaxabilityReason = "reverse_charge" InvoiceShippingCostTaxTaxabilityReasonStandardRated InvoiceShippingCostTaxTaxabilityReason = "standard_rated" InvoiceShippingCostTaxTaxabilityReasonTaxableBasisReduced InvoiceShippingCostTaxTaxabilityReason = "taxable_basis_reduced" InvoiceShippingCostTaxTaxabilityReasonZeroRated InvoiceShippingCostTaxTaxabilityReason = "zero_rated" )
List of values that InvoiceShippingCostTaxTaxabilityReason can take
type InvoiceShippingDetailsParams ¶
type InvoiceShippingDetailsParams struct { // Shipping address Address *AddressParams `form:"address"` // Recipient name. Name *string `form:"name"` // Recipient phone (including extension) Phone *string `form:"phone"` }
Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
type InvoiceStatus ¶
type InvoiceStatus string
The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
const ( InvoiceStatusDraft InvoiceStatus = "draft" InvoiceStatusOpen InvoiceStatus = "open" InvoiceStatusPaid InvoiceStatus = "paid" InvoiceStatusUncollectible InvoiceStatus = "uncollectible" InvoiceStatusVoid InvoiceStatus = "void" )
List of values that InvoiceStatus can take
type InvoiceStatusTransitions ¶
type InvoiceStatusTransitions struct { // The time that the invoice draft was finalized. FinalizedAt int64 `json:"finalized_at"` // The time that the invoice was marked uncollectible. MarkedUncollectibleAt int64 `json:"marked_uncollectible_at"` // The time that the invoice was paid. PaidAt int64 `json:"paid_at"` // The time that the invoice was voided. VoidedAt int64 `json:"voided_at"` }
type InvoiceSubscriptionDetails ¶
type InvoiceSubscriptionDetails struct { // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. *Note: This attribute is populated only for invoices created on or after June 29, 2023.* Metadata map[string]string `json:"metadata"` }
Details about the subscription that created this invoice.
type InvoiceThresholdReason ¶
type InvoiceThresholdReason struct { // The total invoice amount threshold boundary if it triggered the threshold invoice. AmountGTE int64 `json:"amount_gte"` // Indicates which line items triggered a threshold invoice. ItemReasons []*InvoiceThresholdReasonItemReason `json:"item_reasons"` }
type InvoiceThresholdReasonItemReason ¶
type InvoiceThresholdReasonItemReason struct { // The IDs of the line items that triggered the threshold invoice. LineItemIDs []string `json:"line_item_ids"` // The quantity threshold boundary that applied to the given line item. UsageGTE int64 `json:"usage_gte"` }
Indicates which line items triggered a threshold invoice.
type InvoiceTotalDiscountAmount ¶
type InvoiceTotalDiscountAmount struct { // The amount, in cents (or local equivalent), of the discount. Amount int64 `json:"amount"` // The discount that was applied to get this discount amount. Discount *Discount `json:"discount"` }
The aggregate amounts calculated per discount across all line items.
type InvoiceTotalTaxAmount ¶
type InvoiceTotalTaxAmount struct { // The amount, in cents (or local equivalent), of the tax. Amount int64 `json:"amount"` // Whether this tax amount is inclusive or exclusive. Inclusive bool `json:"inclusive"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason InvoiceTotalTaxAmountTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` // The tax rate that was applied to get this tax amount. TaxRate *TaxRate `json:"tax_rate"` }
The aggregate amounts calculated per tax rate for all line items.
type InvoiceTotalTaxAmountTaxabilityReason ¶
type InvoiceTotalTaxAmountTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( InvoiceTotalTaxAmountTaxabilityReasonCustomerExempt InvoiceTotalTaxAmountTaxabilityReason = "customer_exempt" InvoiceTotalTaxAmountTaxabilityReasonNotCollecting InvoiceTotalTaxAmountTaxabilityReason = "not_collecting" InvoiceTotalTaxAmountTaxabilityReasonNotSubjectToTax InvoiceTotalTaxAmountTaxabilityReason = "not_subject_to_tax" InvoiceTotalTaxAmountTaxabilityReasonNotSupported InvoiceTotalTaxAmountTaxabilityReason = "not_supported" InvoiceTotalTaxAmountTaxabilityReasonPortionProductExempt InvoiceTotalTaxAmountTaxabilityReason = "portion_product_exempt" InvoiceTotalTaxAmountTaxabilityReasonPortionReducedRated InvoiceTotalTaxAmountTaxabilityReason = "portion_reduced_rated" InvoiceTotalTaxAmountTaxabilityReasonPortionStandardRated InvoiceTotalTaxAmountTaxabilityReason = "portion_standard_rated" InvoiceTotalTaxAmountTaxabilityReasonProductExempt InvoiceTotalTaxAmountTaxabilityReason = "product_exempt" InvoiceTotalTaxAmountTaxabilityReasonProductExemptHoliday InvoiceTotalTaxAmountTaxabilityReason = "product_exempt_holiday" InvoiceTotalTaxAmountTaxabilityReasonProportionallyRated InvoiceTotalTaxAmountTaxabilityReason = "proportionally_rated" InvoiceTotalTaxAmountTaxabilityReasonReducedRated InvoiceTotalTaxAmountTaxabilityReason = "reduced_rated" InvoiceTotalTaxAmountTaxabilityReasonReverseCharge InvoiceTotalTaxAmountTaxabilityReason = "reverse_charge" InvoiceTotalTaxAmountTaxabilityReasonStandardRated InvoiceTotalTaxAmountTaxabilityReason = "standard_rated" InvoiceTotalTaxAmountTaxabilityReasonTaxableBasisReduced InvoiceTotalTaxAmountTaxabilityReason = "taxable_basis_reduced" InvoiceTotalTaxAmountTaxabilityReasonZeroRated InvoiceTotalTaxAmountTaxabilityReason = "zero_rated" )
List of values that InvoiceTotalTaxAmountTaxabilityReason can take
type InvoiceTransferData ¶
type InvoiceTransferData struct { // The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. Amount int64 `json:"amount"` // The account where funds from the payment will be transferred to upon payment success. Destination *Account `json:"destination"` }
The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
type InvoiceTransferDataParams ¶
type InvoiceTransferDataParams struct { // The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. Amount *int64 `form:"amount"` // ID of an existing, connected Stripe account. Destination *string `form:"destination"` }
If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
type InvoiceUpcomingAutomaticTaxParams ¶
type InvoiceUpcomingAutomaticTaxParams struct {
Enabled *bool `form:"enabled"`
}
type InvoiceUpcomingCustomerDetailsParams ¶
type InvoiceUpcomingCustomerDetailsParams struct { // The customer's address. Address *AddressParams `form:"address"` // The customer's shipping information. Appears on invoices emailed to this customer. Shipping *InvoiceUpcomingCustomerDetailsShippingParams `form:"shipping"` // Tax details about the customer. Tax *InvoiceUpcomingCustomerDetailsTaxParams `form:"tax"` // The customer's tax exemption. One of `none`, `exempt`, or `reverse`. TaxExempt *string `form:"tax_exempt"` // The customer's tax IDs. TaxIDs []*InvoiceUpcomingCustomerDetailsTaxIDParams `form:"tax_ids"` }
Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
type InvoiceUpcomingCustomerDetailsShippingParams ¶
type InvoiceUpcomingCustomerDetailsShippingParams struct { // Customer shipping address. Address *AddressParams `form:"address"` // Customer name. Name *string `form:"name"` // Customer phone (including extension). Phone *string `form:"phone"` }
The customer's shipping information. Appears on invoices emailed to this customer.
type InvoiceUpcomingCustomerDetailsTaxIDParams ¶
type InvoiceUpcomingCustomerDetailsTaxIDParams struct { // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` }
The customer's tax IDs.
type InvoiceUpcomingCustomerDetailsTaxParams ¶
type InvoiceUpcomingCustomerDetailsTaxParams struct { // A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. IPAddress *string `form:"ip_address"` }
Tax details about the customer.
type InvoiceUpcomingInvoiceItemParams ¶
type InvoiceUpcomingInvoiceItemParams struct { // The integer amount in cents (or local equivalent) of previewed invoice item. Amount *int64 `form:"amount"` // 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). Only applicable to new invoice items. Currency *string `form:"currency"` // An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. Description *string `form:"description"` // Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. Discountable *bool `form:"discountable"` // The coupons to redeem into discounts for the invoice item in the preview. Discounts []*InvoiceItemDiscountParams `form:"discounts"` // The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. InvoiceItem *string `form:"invoiceitem"` // 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`. Metadata map[string]string `form:"metadata"` // The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. Period *InvoiceUpcomingInvoiceItemPeriodParams `form:"period"` // The ID of the price object. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. PriceData *InvoiceItemPriceDataParams `form:"price_data"` // Non-negative integer. The quantity of units for the invoice item. Quantity *int64 `form:"quantity"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. TaxCode *string `form:"tax_code"` // The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. TaxRates []*string `form:"tax_rates"` // The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
List of invoice items to add or update in the upcoming invoice preview.
func (*InvoiceUpcomingInvoiceItemParams) AddMetadata ¶
func (p *InvoiceUpcomingInvoiceItemParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type InvoiceUpcomingInvoiceItemPeriodParams ¶
type InvoiceUpcomingInvoiceItemPeriodParams struct { // The end of the period, which must be greater than or equal to the start. This value is inclusive. End *int64 `form:"end"` // The start of the period. This value is inclusive. Start *int64 `form:"start"` }
The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
type InvoiceUpcomingLinesAutomaticTaxParams ¶
type InvoiceUpcomingLinesAutomaticTaxParams struct { // Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. Enabled *bool `form:"enabled"` }
Settings for automatic tax lookup for this invoice preview.
type InvoiceUpcomingLinesCustomerDetailsParams ¶
type InvoiceUpcomingLinesCustomerDetailsParams struct { // The customer's address. Address *AddressParams `form:"address"` // The customer's shipping information. Appears on invoices emailed to this customer. Shipping *InvoiceUpcomingLinesCustomerDetailsShippingParams `form:"shipping"` // Tax details about the customer. Tax *InvoiceUpcomingLinesCustomerDetailsTaxParams `form:"tax"` // The customer's tax exemption. One of `none`, `exempt`, or `reverse`. TaxExempt *string `form:"tax_exempt"` // The customer's tax IDs. TaxIDs []*InvoiceUpcomingLinesCustomerDetailsTaxIDParams `form:"tax_ids"` }
Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
type InvoiceUpcomingLinesCustomerDetailsShippingParams ¶
type InvoiceUpcomingLinesCustomerDetailsShippingParams struct { // Customer shipping address. Address *AddressParams `form:"address"` // Customer name. Name *string `form:"name"` // Customer phone (including extension). Phone *string `form:"phone"` }
The customer's shipping information. Appears on invoices emailed to this customer.
type InvoiceUpcomingLinesCustomerDetailsTaxIDParams ¶
type InvoiceUpcomingLinesCustomerDetailsTaxIDParams struct { // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` }
The customer's tax IDs.
type InvoiceUpcomingLinesCustomerDetailsTaxParams ¶
type InvoiceUpcomingLinesCustomerDetailsTaxParams struct { // A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. IPAddress *string `form:"ip_address"` }
Tax details about the customer.
type InvoiceUpcomingLinesDiscountParams ¶
type InvoiceUpcomingLinesDiscountParams struct { // ID of the coupon to create a new discount for. Coupon *string `form:"coupon"` // ID of an existing discount on the object (or one of its ancestors) to reuse. Discount *string `form:"discount"` }
The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead.
type InvoiceUpcomingLinesInvoiceItemDiscountParams ¶
type InvoiceUpcomingLinesInvoiceItemDiscountParams struct { // ID of the coupon to create a new discount for. Coupon *string `form:"coupon"` // ID of an existing discount on the object (or one of its ancestors) to reuse. Discount *string `form:"discount"` }
The coupons to redeem into discounts for the invoice item in the preview.
type InvoiceUpcomingLinesInvoiceItemParams ¶
type InvoiceUpcomingLinesInvoiceItemParams struct { // The integer amount in cents (or local equivalent) of previewed invoice item. Amount *int64 `form:"amount"` // 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). Only applicable to new invoice items. Currency *string `form:"currency"` // An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. Description *string `form:"description"` // Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. Discountable *bool `form:"discountable"` // The coupons to redeem into discounts for the invoice item in the preview. Discounts []*InvoiceUpcomingLinesInvoiceItemDiscountParams `form:"discounts"` // The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. InvoiceItem *string `form:"invoiceitem"` // 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`. Metadata map[string]string `form:"metadata"` // The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. Period *InvoiceUpcomingLinesInvoiceItemPeriodParams `form:"period"` // The ID of the price object. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. PriceData *InvoiceUpcomingLinesInvoiceItemPriceDataParams `form:"price_data"` // Non-negative integer. The quantity of units for the invoice item. Quantity *int64 `form:"quantity"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. TaxCode *string `form:"tax_code"` // The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. TaxRates []*string `form:"tax_rates"` // The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
List of invoice items to add or update in the upcoming invoice preview.
func (*InvoiceUpcomingLinesInvoiceItemParams) AddMetadata ¶
func (p *InvoiceUpcomingLinesInvoiceItemParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type InvoiceUpcomingLinesInvoiceItemPeriodParams ¶
type InvoiceUpcomingLinesInvoiceItemPeriodParams struct { // The end of the period, which must be greater than or equal to the start. This value is inclusive. End *int64 `form:"end"` // The start of the period. This value is inclusive. Start *int64 `form:"start"` }
The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
type InvoiceUpcomingLinesInvoiceItemPriceDataParams ¶
type InvoiceUpcomingLinesInvoiceItemPriceDataParams struct { // 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 `form:"currency"` // The ID of the product that this price will belong to. Product *string `form:"product"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline.
type InvoiceUpcomingLinesParams ¶
type InvoiceUpcomingLinesParams struct { ListParams `form:"*"` // Settings for automatic tax lookup for this invoice preview. AutomaticTax *InvoiceUpcomingLinesAutomaticTaxParams `form:"automatic_tax"` // The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. Coupon *string `form:"coupon"` // The currency to preview this invoice in. Defaults to that of `customer` if not specified. Currency *string `form:"currency"` // The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. Customer *string `form:"customer"` // Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. CustomerDetails *InvoiceUpcomingLinesCustomerDetailsParams `form:"customer_details"` // The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. Discounts []*InvoiceUpcomingLinesDiscountParams `form:"discounts"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // List of invoice items to add or update in the upcoming invoice preview. InvoiceItems []*InvoiceUpcomingLinesInvoiceItemParams `form:"invoice_items"` // The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. Schedule *string `form:"schedule"` // The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. Subscription *string `form:"subscription"` // For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. SubscriptionBillingCycleAnchor *int64 `form:"subscription_billing_cycle_anchor"` SubscriptionBillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo SubscriptionBillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo // Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. SubscriptionCancelAt *int64 `form:"subscription_cancel_at"` // Boolean indicating whether this subscription should cancel at the end of the current period. SubscriptionCancelAtPeriodEnd *bool `form:"subscription_cancel_at_period_end"` // This simulates the subscription being canceled or expired immediately. SubscriptionCancelNow *bool `form:"subscription_cancel_now"` // If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"` // A list of up to 20 subscription items, each with an attached price. SubscriptionItems []*InvoiceUpcomingLinesSubscriptionItemParams `form:"subscription_items"` // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"` // If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. SubscriptionProrationDate *int64 `form:"subscription_proration_date"` // For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. SubscriptionResumeAt *string `form:"subscription_resume_at"` // Date a subscription is intended to start (can be future or past) SubscriptionStartDate *int64 `form:"subscription_start_date"` // If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. SubscriptionTrialEnd *int64 `form:"subscription_trial_end"` SubscriptionTrialEndNow *bool `form:"-"` // See custom AppendTo // Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. SubscriptionTrialFromPlan *bool `form:"subscription_trial_from_plan"` }
When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
func (*InvoiceUpcomingLinesParams) AddExpand ¶
func (p *InvoiceUpcomingLinesParams) AddExpand(f string)
AddExpand appends a new field to expand.
type InvoiceUpcomingLinesSubscriptionItemBillingThresholdsParams ¶
type InvoiceUpcomingLinesSubscriptionItemBillingThresholdsParams struct { // Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) UsageGTE *int64 `form:"usage_gte"` }
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
type InvoiceUpcomingLinesSubscriptionItemParams ¶
type InvoiceUpcomingLinesSubscriptionItemParams struct { // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. BillingThresholds *InvoiceUpcomingLinesSubscriptionItemBillingThresholdsParams `form:"billing_thresholds"` // Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. ClearUsage *bool `form:"clear_usage"` // A flag that, if set to `true`, will delete the specified item. Deleted *bool `form:"deleted"` // Subscription item to update. ID *string `form:"id"` // 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`. Metadata map[string]string `form:"metadata"` // Plan ID for this item, as a string. Plan *string `form:"plan"` // The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. PriceData *InvoiceUpcomingLinesSubscriptionItemPriceDataParams `form:"price_data"` // Quantity for this item. Quantity *int64 `form:"quantity"` // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. TaxRates []*string `form:"tax_rates"` }
A list of up to 20 subscription items, each with an attached price.
func (*InvoiceUpcomingLinesSubscriptionItemParams) AddMetadata ¶
func (p *InvoiceUpcomingLinesSubscriptionItemParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type InvoiceUpcomingLinesSubscriptionItemPriceDataParams ¶
type InvoiceUpcomingLinesSubscriptionItemPriceDataParams struct { // 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 `form:"currency"` // The ID of the product that this price will belong to. Product *string `form:"product"` // The recurring components of a price such as `interval` and `interval_count`. Recurring *InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringParams `form:"recurring"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline.
type InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringParams ¶
type InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringParams struct { // Specifies billing frequency. Either `day`, `week`, `month` or `year`. Interval *string `form:"interval"` // The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). IntervalCount *int64 `form:"interval_count"` }
The recurring components of a price such as `interval` and `interval_count`.
type InvoiceUpcomingParams ¶
type InvoiceUpcomingParams struct { Params `form:"*"` // Settings for automatic tax lookup for this invoice preview. AutomaticTax *InvoiceAutomaticTaxParams `form:"automatic_tax"` // The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. Coupon *string `form:"coupon"` // The currency to preview this invoice in. Defaults to that of `customer` if not specified. Currency *string `form:"currency"` // The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. Customer *string `form:"customer"` // Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. CustomerDetails *InvoiceUpcomingCustomerDetailsParams `form:"customer_details"` // The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. Discounts []*InvoiceDiscountParams `form:"discounts"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // List of invoice items to add or update in the upcoming invoice preview. InvoiceItems []*InvoiceUpcomingInvoiceItemParams `form:"invoice_items"` // The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. Schedule *string `form:"schedule"` // The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. Subscription *string `form:"subscription"` // For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. SubscriptionBillingCycleAnchor *int64 `form:"subscription_billing_cycle_anchor"` SubscriptionBillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo SubscriptionBillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo // Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. SubscriptionCancelAt *int64 `form:"subscription_cancel_at"` // Boolean indicating whether this subscription should cancel at the end of the current period. SubscriptionCancelAtPeriodEnd *bool `form:"subscription_cancel_at_period_end"` // This simulates the subscription being canceled or expired immediately. SubscriptionCancelNow *bool `form:"subscription_cancel_now"` // If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"` // A list of up to 20 subscription items, each with an attached price. SubscriptionItems []*SubscriptionItemsParams `form:"subscription_items"` // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"` // If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. SubscriptionProrationDate *int64 `form:"subscription_proration_date"` // For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. SubscriptionResumeAt *string `form:"subscription_resume_at"` // Date a subscription is intended to start (can be future or past) SubscriptionStartDate *int64 `form:"subscription_start_date"` // If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. SubscriptionTrialEnd *int64 `form:"subscription_trial_end"` SubscriptionTrialEndNow *bool `form:"-"` // See custom AppendTo // Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. SubscriptionTrialFromPlan *bool `form:"subscription_trial_from_plan"` }
At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.
func (*InvoiceUpcomingParams) AddExpand ¶
func (p *InvoiceUpcomingParams) AddExpand(f string)
AddExpand appends a new field to expand.
type InvoiceVoidInvoiceParams ¶
type InvoiceVoidInvoiceParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
func (*InvoiceVoidInvoiceParams) AddExpand ¶
func (p *InvoiceVoidInvoiceParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IssuingAuthorization ¶
type IssuingAuthorization struct { APIResource // The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount int64 `json:"amount"` // Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). AmountDetails *IssuingAuthorizationAmountDetails `json:"amount_details"` // Whether the authorization has been approved. Approved bool `json:"approved"` // How the card details were provided. AuthorizationMethod IssuingAuthorizationAuthorizationMethod `json:"authorization_method"` // List of balance transactions associated with this authorization. BalanceTransactions []*BalanceTransaction `json:"balance_transactions"` // You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. Card *IssuingCard `json:"card"` // The cardholder to whom this authorization belongs. Cardholder *IssuingCardholder `json:"cardholder"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). MerchantAmount int64 `json:"merchant_amount"` // The currency that was presented to the cardholder for the authorization. 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). MerchantCurrency Currency `json:"merchant_currency"` MerchantData *IssuingAuthorizationMerchantData `json:"merchant_data"` // 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. Metadata map[string]string `json:"metadata"` // Details about the authorization, such as identifiers, set by the card network. NetworkData *IssuingAuthorizationNetworkData `json:"network_data"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. PendingRequest *IssuingAuthorizationPendingRequest `json:"pending_request"` // History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. RequestHistory []*IssuingAuthorizationRequestHistory `json:"request_history"` // The current status of the authorization in its lifecycle. Status IssuingAuthorizationStatus `json:"status"` // [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. Token *IssuingToken `json:"token"` // List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. Transactions []*IssuingTransaction `json:"transactions"` // [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). Treasury *IssuingAuthorizationTreasury `json:"treasury"` VerificationData *IssuingAuthorizationVerificationData `json:"verification_data"` // 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. Wallet IssuingAuthorizationWallet `json:"wallet"` }
When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the purchase to be completed successfully.
Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)
func (*IssuingAuthorization) UnmarshalJSON ¶
func (i *IssuingAuthorization) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an IssuingAuthorization. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type IssuingAuthorizationAmountDetails ¶
type IssuingAuthorizationAmountDetails struct { // The fee charged by the ATM for the cash withdrawal. ATMFee int64 `json:"atm_fee"` // The amount of cash requested by the cardholder. CashbackAmount int64 `json:"cashback_amount"` }
Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
type IssuingAuthorizationApproveParams ¶
type IssuingAuthorizationApproveParams struct { Params `form:"*"` // If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). Amount *int64 `form:"amount"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` }
[Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
func (*IssuingAuthorizationApproveParams) AddExpand ¶
func (p *IssuingAuthorizationApproveParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*IssuingAuthorizationApproveParams) AddMetadata ¶
func (p *IssuingAuthorizationApproveParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type IssuingAuthorizationAuthorizationMethod ¶
type IssuingAuthorizationAuthorizationMethod string
How the card details were provided.
const ( IssuingAuthorizationAuthorizationMethodChip IssuingAuthorizationAuthorizationMethod = "chip" IssuingAuthorizationAuthorizationMethodContactless IssuingAuthorizationAuthorizationMethod = "contactless" IssuingAuthorizationAuthorizationMethodKeyedIn IssuingAuthorizationAuthorizationMethod = "keyed_in" IssuingAuthorizationAuthorizationMethodOnline IssuingAuthorizationAuthorizationMethod = "online" IssuingAuthorizationAuthorizationMethodSwipe IssuingAuthorizationAuthorizationMethod = "swipe" )
List of values that IssuingAuthorizationAuthorizationMethod can take
type IssuingAuthorizationDeclineParams ¶
type IssuingAuthorizationDeclineParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` }
[Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
func (*IssuingAuthorizationDeclineParams) AddExpand ¶
func (p *IssuingAuthorizationDeclineParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*IssuingAuthorizationDeclineParams) AddMetadata ¶
func (p *IssuingAuthorizationDeclineParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type IssuingAuthorizationList ¶
type IssuingAuthorizationList struct { APIResource ListMeta Data []*IssuingAuthorization `json:"data"` }
IssuingAuthorizationList is a list of Authorizations as retrieved from a list endpoint.
type IssuingAuthorizationListParams ¶
type IssuingAuthorizationListParams struct { ListParams `form:"*"` // Only return authorizations that belong to the given card. Card *string `form:"card"` // Only return authorizations that belong to the given cardholder. Cardholder *string `form:"cardholder"` // Only return authorizations that were created during the given date interval. Created *int64 `form:"created"` // Only return authorizations that were created during the given date interval. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. Status *string `form:"status"` }
Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
func (*IssuingAuthorizationListParams) AddExpand ¶
func (p *IssuingAuthorizationListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IssuingAuthorizationMerchantData ¶
type IssuingAuthorizationMerchantData struct { // 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. Category string `json:"category"` // The merchant category code for the seller's business CategoryCode string `json:"category_code"` // City where the seller is located City string `json:"city"` // Country where the seller is located Country string `json:"country"` // Name of the seller Name string `json:"name"` // Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. NetworkID string `json:"network_id"` // Postal code where the seller is located PostalCode string `json:"postal_code"` // State where the seller is located State string `json:"state"` // An ID assigned by the seller to the location of the sale. TerminalID string `json:"terminal_id"` }
type IssuingAuthorizationNetworkData ¶
type IssuingAuthorizationNetworkData struct { // Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. AcquiringInstitutionID string `json:"acquiring_institution_id"` }
Details about the authorization, such as identifiers, set by the card network.
type IssuingAuthorizationParams ¶
type IssuingAuthorizationParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` }
Retrieves an Issuing Authorization object.
func (*IssuingAuthorizationParams) AddExpand ¶
func (p *IssuingAuthorizationParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*IssuingAuthorizationParams) AddMetadata ¶
func (p *IssuingAuthorizationParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type IssuingAuthorizationPendingRequest ¶
type IssuingAuthorizationPendingRequest struct { // The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount int64 `json:"amount"` // Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). AmountDetails *IssuingAuthorizationAmountDetails `json:"amount_details"` // 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 Currency `json:"currency"` // 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. IsAmountControllable bool `json:"is_amount_controllable"` // The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). MerchantAmount int64 `json:"merchant_amount"` // The local currency the merchant is requesting to authorize. MerchantCurrency Currency `json:"merchant_currency"` }
The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.
type IssuingAuthorizationRequestHistory ¶
type IssuingAuthorizationRequestHistory struct { // The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. Amount int64 `json:"amount"` // Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). AmountDetails *IssuingAuthorizationAmountDetails `json:"amount_details"` // Whether this request was approved. Approved bool `json:"approved"` // A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. AuthorizationCode string `json:"authorization_code"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). MerchantAmount int64 `json:"merchant_amount"` // The currency that was collected by the merchant and presented to the cardholder for the authorization. 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). MerchantCurrency Currency `json:"merchant_currency"` // When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. Reason IssuingAuthorizationRequestHistoryReason `json:"reason"` // If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field. ReasonMessage string `json:"reason_message"` }
History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
type IssuingAuthorizationRequestHistoryReason ¶
type IssuingAuthorizationRequestHistoryReason string
When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome.
const ( IssuingAuthorizationRequestHistoryReasonAccountDisabled IssuingAuthorizationRequestHistoryReason = "account_disabled" IssuingAuthorizationRequestHistoryReasonCardActive IssuingAuthorizationRequestHistoryReason = "card_active" IssuingAuthorizationRequestHistoryReasonCardInactive IssuingAuthorizationRequestHistoryReason = "card_inactive" IssuingAuthorizationRequestHistoryReasonCardholderInactive IssuingAuthorizationRequestHistoryReason = "cardholder_inactive" IssuingAuthorizationRequestHistoryReasonCardholderVerificationRequired IssuingAuthorizationRequestHistoryReason = "cardholder_verification_required" IssuingAuthorizationRequestHistoryReasonInsufficientFunds IssuingAuthorizationRequestHistoryReason = "insufficient_funds" IssuingAuthorizationRequestHistoryReasonNotAllowed IssuingAuthorizationRequestHistoryReason = "not_allowed" IssuingAuthorizationRequestHistoryReasonSpendingControls IssuingAuthorizationRequestHistoryReason = "spending_controls" IssuingAuthorizationRequestHistoryReasonSuspectedFraud IssuingAuthorizationRequestHistoryReason = "suspected_fraud" IssuingAuthorizationRequestHistoryReasonVerificationFailed IssuingAuthorizationRequestHistoryReason = "verification_failed" IssuingAuthorizationRequestHistoryReasonWebhookApproved IssuingAuthorizationRequestHistoryReason = "webhook_approved" IssuingAuthorizationRequestHistoryReasonWebhookDeclined IssuingAuthorizationRequestHistoryReason = "webhook_declined" IssuingAuthorizationRequestHistoryReasonWebhookError IssuingAuthorizationRequestHistoryReason = "webhook_error" IssuingAuthorizationRequestHistoryReasonWebhookTimeout IssuingAuthorizationRequestHistoryReason = "webhook_timeout" )
List of values that IssuingAuthorizationRequestHistoryReason can take
type IssuingAuthorizationStatus ¶
type IssuingAuthorizationStatus string
The current status of the authorization in its lifecycle.
const ( IssuingAuthorizationStatusClosed IssuingAuthorizationStatus = "closed" IssuingAuthorizationStatusPending IssuingAuthorizationStatus = "pending" IssuingAuthorizationStatusReversed IssuingAuthorizationStatus = "reversed" )
List of values that IssuingAuthorizationStatus can take
type IssuingAuthorizationTreasury ¶
type IssuingAuthorizationTreasury struct { // The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization ReceivedCredits []string `json:"received_credits"` // The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization ReceivedDebits []string `json:"received_debits"` // The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization Transaction string `json:"transaction"` }
[Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts).
type IssuingAuthorizationVerificationData ¶
type IssuingAuthorizationVerificationData struct { // Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. AddressLine1Check IssuingAuthorizationVerificationDataCheck `json:"address_line1_check"` // Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. AddressPostalCodeCheck IssuingAuthorizationVerificationDataCheck `json:"address_postal_code_check"` // Whether the cardholder provided a CVC and if it matched Stripe's record. CVCCheck IssuingAuthorizationVerificationDataCheck `json:"cvc_check"` // Whether the cardholder provided an expiry date and if it matched Stripe's record. ExpiryCheck IssuingAuthorizationVerificationDataCheck `json:"expiry_check"` // The postal code submitted as part of the authorization used for postal code verification. PostalCode string `json:"postal_code"` }
type IssuingAuthorizationVerificationDataCheck ¶
type IssuingAuthorizationVerificationDataCheck string
Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`.
const ( IssuingAuthorizationVerificationDataCheckMatch IssuingAuthorizationVerificationDataCheck = "match" IssuingAuthorizationVerificationDataCheckMismatch IssuingAuthorizationVerificationDataCheck = "mismatch" IssuingAuthorizationVerificationDataCheckNotProvided IssuingAuthorizationVerificationDataCheck = "not_provided" )
List of values that IssuingAuthorizationVerificationDataCheck can take
type IssuingAuthorizationWallet ¶
type IssuingAuthorizationWallet string
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.
const ( IssuingAuthorizationWalletApplePay IssuingAuthorizationWallet = "apple_pay" IssuingAuthorizationWalletGooglePay IssuingAuthorizationWallet = "google_pay" IssuingAuthorizationWalletSamsungPay IssuingAuthorizationWallet = "samsung_pay" )
List of values that IssuingAuthorizationWallet can take
type IssuingCard ¶
type IssuingCard struct { APIResource // The brand of the card. Brand string `json:"brand"` // The reason why the card was canceled. CancellationReason IssuingCardCancellationReason `json:"cancellation_reason"` // An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. // // Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) Cardholder *IssuingCardholder `json:"cardholder"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. Currency Currency `json:"currency"` // The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. CVC string `json:"cvc"` // The expiration month of the card. ExpMonth int64 `json:"exp_month"` // The expiration year of the card. ExpYear int64 `json:"exp_year"` // The financial account this card is attached to. FinancialAccount string `json:"financial_account"` // Unique identifier for the object. ID string `json:"id"` // The last 4 digits of the card number. Last4 string `json:"last4"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. Number string `json:"number"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The latest card that replaces this card, if any. ReplacedBy *IssuingCard `json:"replaced_by"` // The card this card replaces, if any. ReplacementFor *IssuingCard `json:"replacement_for"` // The reason why the previous card needed to be replaced. ReplacementReason IssuingCardReplacementReason `json:"replacement_reason"` // Where and how the card will be shipped. Shipping *IssuingCardShipping `json:"shipping"` SpendingControls *IssuingCardSpendingControls `json:"spending_controls"` // Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. Status IssuingCardStatus `json:"status"` // The type of the card. Type IssuingCardType `json:"type"` // Information relating to digital wallets (like Apple Pay and Google Pay). Wallets *IssuingCardWallets `json:"wallets"` }
You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders.
func (*IssuingCard) UnmarshalJSON ¶
func (i *IssuingCard) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an IssuingCard. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type IssuingCardCancellationReason ¶
type IssuingCardCancellationReason string
The reason why the card was canceled.
const ( IssuingCardCancellationReasonDesignRejected IssuingCardCancellationReason = "design_rejected" IssuingCardCancellationReasonLost IssuingCardCancellationReason = "lost" IssuingCardCancellationReasonStolen IssuingCardCancellationReason = "stolen" )
List of values that IssuingCardCancellationReason can take
type IssuingCardList ¶
type IssuingCardList struct { APIResource ListMeta Data []*IssuingCard `json:"data"` }
IssuingCardList is a list of Cards as retrieved from a list endpoint.
type IssuingCardListParams ¶
type IssuingCardListParams struct { ListParams `form:"*"` // Only return cards belonging to the Cardholder with the provided ID. Cardholder *string `form:"cardholder"` // Only return cards that were issued during the given date interval. Created *int64 `form:"created"` // Only return cards that were issued during the given date interval. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return cards that have the given expiration month. ExpMonth *int64 `form:"exp_month"` // Only return cards that have the given expiration year. ExpYear *int64 `form:"exp_year"` // Only return cards that have the given last four digits. Last4 *string `form:"last4"` // Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. Status *string `form:"status"` // Only return cards that have the given type. One of `virtual` or `physical`. Type *string `form:"type"` }
Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
func (*IssuingCardListParams) AddExpand ¶
func (p *IssuingCardListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IssuingCardPINParams ¶
type IssuingCardPINParams struct { // The card's desired new PIN, encrypted under Stripe's public key. EncryptedNumber *string `form:"encrypted_number"` }
The desired new PIN for this card.
type IssuingCardParams ¶
type IssuingCardParams struct { Params `form:"*"` // The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. Cardholder *string `form:"cardholder"` // The currency for the card. Currency *string `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` FinancialAccount *string `form:"financial_account"` // 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`. Metadata map[string]string `form:"metadata"` // The desired new PIN for this card. PIN *IssuingCardPINParams `form:"pin"` // The card this is meant to be a replacement for (if any). ReplacementFor *string `form:"replacement_for"` // If `replacement_for` is specified, this should indicate why that card is being replaced. ReplacementReason *string `form:"replacement_reason"` // The address where the card will be shipped. Shipping *IssuingCardShippingParams `form:"shipping"` // Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. SpendingControls *IssuingCardSpendingControlsParams `form:"spending_controls"` // Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. Status *string `form:"status"` // The type of card to issue. Possible values are `physical` or `virtual`. Type *string `form:"type"` // The following parameter is only supported when updating a card // Reason why the `status` of this card is `canceled`. CancellationReason *string `form:"cancellation_reason"` }
Creates an Issuing Card object.
func (*IssuingCardParams) AddExpand ¶
func (p *IssuingCardParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*IssuingCardParams) AddMetadata ¶
func (p *IssuingCardParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type IssuingCardReplacementReason ¶
type IssuingCardReplacementReason string
The reason why the previous card needed to be replaced.
const ( IssuingCardReplacementReasonDamaged IssuingCardReplacementReason = "damaged" IssuingCardReplacementReasonExpired IssuingCardReplacementReason = "expired" IssuingCardReplacementReasonLost IssuingCardReplacementReason = "lost" IssuingCardReplacementReasonStolen IssuingCardReplacementReason = "stolen" )
List of values that IssuingCardReplacementReason can take
type IssuingCardShipping ¶
type IssuingCardShipping struct { Address *Address `json:"address"` // The delivery company that shipped a card. Carrier IssuingCardShippingCarrier `json:"carrier"` // Additional information that may be required for clearing customs. Customs *IssuingCardShippingCustoms `json:"customs"` // A unix timestamp representing a best estimate of when the card will be delivered. ETA int64 `json:"eta"` // Recipient name. Name string `json:"name"` // The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created. PhoneNumber string `json:"phone_number"` // Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. RequireSignature bool `json:"require_signature"` // Shipment service, such as `standard` or `express`. Service IssuingCardShippingService `json:"service"` // The delivery status of the card. Status IssuingCardShippingStatus `json:"status"` // A tracking number for a card shipment. TrackingNumber string `json:"tracking_number"` // A link to the shipping carrier's site where you can view detailed information about a card shipment. TrackingURL string `json:"tracking_url"` // Packaging options. Type IssuingCardShippingType `json:"type"` }
Where and how the card will be shipped.
type IssuingCardShippingCarrier ¶
type IssuingCardShippingCarrier string
The delivery company that shipped a card.
const ( IssuingCardShippingCarrierDHL IssuingCardShippingCarrier = "dhl" IssuingCardShippingCarrierFedEx IssuingCardShippingCarrier = "fedex" IssuingCardShippingCarrierRoyalMail IssuingCardShippingCarrier = "royal_mail" IssuingCardShippingCarrierUSPS IssuingCardShippingCarrier = "usps" )
List of values that IssuingCardShippingCarrier can take
type IssuingCardShippingCustoms ¶
type IssuingCardShippingCustoms struct { // A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. EORINumber string `json:"eori_number"` }
Additional information that may be required for clearing customs.
type IssuingCardShippingCustomsParams ¶
type IssuingCardShippingCustomsParams struct { // The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. EORINumber *string `form:"eori_number"` }
Customs information for the shipment.
type IssuingCardShippingParams ¶
type IssuingCardShippingParams struct { // The address that the card is shipped to. Address *AddressParams `form:"address"` // Customs information for the shipment. Customs *IssuingCardShippingCustomsParams `form:"customs"` // The name printed on the shipping label when shipping the card. Name *string `form:"name"` // Phone number of the recipient of the shipment. PhoneNumber *string `form:"phone_number"` // Whether a signature is required for card delivery. RequireSignature *bool `form:"require_signature"` // Shipment service. Service *string `form:"service"` // Packaging options. Type *string `form:"type"` }
The address where the card will be shipped.
type IssuingCardShippingService ¶
type IssuingCardShippingService string
Shipment service, such as `standard` or `express`.
const ( IssuingCardShippingServiceExpress IssuingCardShippingService = "express" IssuingCardShippingServicePriority IssuingCardShippingService = "priority" IssuingCardShippingServiceStandard IssuingCardShippingService = "standard" )
List of values that IssuingCardShippingService can take
type IssuingCardShippingStatus ¶
type IssuingCardShippingStatus string
The delivery status of the card.
const ( IssuingCardShippingStatusCanceled IssuingCardShippingStatus = "canceled" IssuingCardShippingStatusDelivered IssuingCardShippingStatus = "delivered" IssuingCardShippingStatusFailure IssuingCardShippingStatus = "failure" IssuingCardShippingStatusPending IssuingCardShippingStatus = "pending" IssuingCardShippingStatusReturned IssuingCardShippingStatus = "returned" IssuingCardShippingStatusShipped IssuingCardShippingStatus = "shipped" )
List of values that IssuingCardShippingStatus can take
type IssuingCardShippingType ¶
type IssuingCardShippingType string
Packaging options.
const ( IssuingCardShippingTypeBulk IssuingCardShippingType = "bulk" IssuingCardShippingTypeIndividual IssuingCardShippingType = "individual" )
List of values that IssuingCardShippingType can take
type IssuingCardSpendingControls ¶
type IssuingCardSpendingControls struct { // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. AllowedCategories []string `json:"allowed_categories"` // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. BlockedCategories []string `json:"blocked_categories"` // Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). SpendingLimits []*IssuingCardSpendingControlsSpendingLimit `json:"spending_limits"` // Currency of the amounts within `spending_limits`. Always the same as the currency of the card. SpendingLimitsCurrency Currency `json:"spending_limits_currency"` }
type IssuingCardSpendingControlsParams ¶
type IssuingCardSpendingControlsParams struct { // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. AllowedCategories []*string `form:"allowed_categories"` // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. BlockedCategories []*string `form:"blocked_categories"` // Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). SpendingLimits []*IssuingCardSpendingControlsSpendingLimitParams `form:"spending_limits"` }
Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
type IssuingCardSpendingControlsSpendingLimit ¶
type IssuingCardSpendingControlsSpendingLimit struct { // Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount int64 `json:"amount"` // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. Categories []string `json:"categories"` // Interval (or event) to which the amount applies. Interval IssuingCardSpendingControlsSpendingLimitInterval `json:"interval"` }
Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
type IssuingCardSpendingControlsSpendingLimitInterval ¶
type IssuingCardSpendingControlsSpendingLimitInterval string
Interval (or event) to which the amount applies.
const ( IssuingCardSpendingControlsSpendingLimitIntervalAllTime IssuingCardSpendingControlsSpendingLimitInterval = "all_time" IssuingCardSpendingControlsSpendingLimitIntervalDaily IssuingCardSpendingControlsSpendingLimitInterval = "daily" IssuingCardSpendingControlsSpendingLimitIntervalMonthly IssuingCardSpendingControlsSpendingLimitInterval = "monthly" IssuingCardSpendingControlsSpendingLimitIntervalPerAuthorization IssuingCardSpendingControlsSpendingLimitInterval = "per_authorization" IssuingCardSpendingControlsSpendingLimitIntervalWeekly IssuingCardSpendingControlsSpendingLimitInterval = "weekly" IssuingCardSpendingControlsSpendingLimitIntervalYearly IssuingCardSpendingControlsSpendingLimitInterval = "yearly" )
List of values that IssuingCardSpendingControlsSpendingLimitInterval can take
type IssuingCardSpendingControlsSpendingLimitParams ¶
type IssuingCardSpendingControlsSpendingLimitParams struct { // Maximum amount allowed to spend per interval. Amount *int64 `form:"amount"` // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. Categories []*string `form:"categories"` // Interval (or event) to which the amount applies. Interval *string `form:"interval"` }
Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
type IssuingCardStatus ¶
type IssuingCardStatus string
Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
const ( IssuingCardStatusActive IssuingCardStatus = "active" IssuingCardStatusCanceled IssuingCardStatus = "canceled" IssuingCardStatusInactive IssuingCardStatus = "inactive" )
List of values that IssuingCardStatus can take
type IssuingCardType ¶
type IssuingCardType string
The type of the card.
const ( IssuingCardTypePhysical IssuingCardType = "physical" IssuingCardTypeVirtual IssuingCardType = "virtual" )
List of values that IssuingCardType can take
type IssuingCardWallets ¶
type IssuingCardWallets struct { ApplePay *IssuingCardWalletsApplePay `json:"apple_pay"` GooglePay *IssuingCardWalletsGooglePay `json:"google_pay"` // Unique identifier for a card used with digital wallets PrimaryAccountIdentifier string `json:"primary_account_identifier"` }
Information relating to digital wallets (like Apple Pay and Google Pay).
type IssuingCardWalletsApplePay ¶
type IssuingCardWalletsApplePay struct { // Apple Pay Eligibility Eligible bool `json:"eligible"` // Reason the card is ineligible for Apple Pay IneligibleReason IssuingCardWalletsApplePayIneligibleReason `json:"ineligible_reason"` }
type IssuingCardWalletsApplePayIneligibleReason ¶
type IssuingCardWalletsApplePayIneligibleReason string
Reason the card is ineligible for Apple Pay
const ( IssuingCardWalletsApplePayIneligibleReasonMissingAgreement IssuingCardWalletsApplePayIneligibleReason = "missing_agreement" IssuingCardWalletsApplePayIneligibleReasonMissingCardholderContact IssuingCardWalletsApplePayIneligibleReason = "missing_cardholder_contact" IssuingCardWalletsApplePayIneligibleReasonUnsupportedRegion IssuingCardWalletsApplePayIneligibleReason = "unsupported_region" )
List of values that IssuingCardWalletsApplePayIneligibleReason can take
type IssuingCardWalletsGooglePay ¶
type IssuingCardWalletsGooglePay struct { // Google Pay Eligibility Eligible bool `json:"eligible"` // Reason the card is ineligible for Google Pay IneligibleReason IssuingCardWalletsGooglePayIneligibleReason `json:"ineligible_reason"` }
type IssuingCardWalletsGooglePayIneligibleReason ¶
type IssuingCardWalletsGooglePayIneligibleReason string
Reason the card is ineligible for Google Pay
const ( IssuingCardWalletsGooglePayIneligibleReasonMissingAgreement IssuingCardWalletsGooglePayIneligibleReason = "missing_agreement" IssuingCardWalletsGooglePayIneligibleReasonMissingCardholderContact IssuingCardWalletsGooglePayIneligibleReason = "missing_cardholder_contact" IssuingCardWalletsGooglePayIneligibleReasonUnsupportedRegion IssuingCardWalletsGooglePayIneligibleReason = "unsupported_region" )
List of values that IssuingCardWalletsGooglePayIneligibleReason can take
type IssuingCardholder ¶
type IssuingCardholder struct { APIResource Billing *IssuingCardholderBilling `json:"billing"` // Additional information about a `company` cardholder. Company *IssuingCardholderCompany `json:"company"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The cardholder's email address. Email string `json:"email"` // Unique identifier for the object. ID string `json:"id"` // Additional information about an `individual` cardholder. Individual *IssuingCardholderIndividual `json:"individual"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // The cardholder's name. This will be printed on cards issued to them. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. PhoneNumber string `json:"phone_number"` // The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. // This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. PreferredLocales []IssuingCardholderPreferredLocale `json:"preferred_locales"` Requirements *IssuingCardholderRequirements `json:"requirements"` // Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. SpendingControls *IssuingCardholderSpendingControls `json:"spending_controls"` // Specifies whether to permit authorizations on this cardholder's cards. Status IssuingCardholderStatus `json:"status"` // One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. Type IssuingCardholderType `json:"type"` }
An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)
func (*IssuingCardholder) UnmarshalJSON ¶
func (i *IssuingCardholder) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an IssuingCardholder. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type IssuingCardholderBilling ¶
type IssuingCardholderBilling struct {
Address *Address `json:"address"`
}
type IssuingCardholderBillingParams ¶
type IssuingCardholderBillingParams struct { // The cardholder's billing address. Address *AddressParams `form:"address"` }
The cardholder's billing address.
type IssuingCardholderCompany ¶
type IssuingCardholderCompany struct { // Whether the company's business ID number was provided. TaxIDProvided bool `json:"tax_id_provided"` }
Additional information about a `company` cardholder.
type IssuingCardholderCompanyParams ¶
type IssuingCardholderCompanyParams struct { // The entity's business ID number. TaxID *string `form:"tax_id"` }
Additional information about a `company` cardholder.
type IssuingCardholderIndividual ¶
type IssuingCardholderIndividual struct { // Information related to the card_issuing program for this cardholder. CardIssuing *IssuingCardholderIndividualCardIssuing `json:"card_issuing"` // The date of birth of this cardholder. DOB *IssuingCardholderIndividualDOB `json:"dob"` // The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. FirstName string `json:"first_name"` // The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. LastName string `json:"last_name"` // Government-issued ID document for this cardholder. Verification *IssuingCardholderIndividualVerification `json:"verification"` }
Additional information about an `individual` cardholder.
type IssuingCardholderIndividualCardIssuing ¶
type IssuingCardholderIndividualCardIssuing struct { // Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). UserTermsAcceptance *IssuingCardholderIndividualCardIssuingUserTermsAcceptance `json:"user_terms_acceptance"` }
Information related to the card_issuing program for this cardholder.
type IssuingCardholderIndividualCardIssuingParams ¶
type IssuingCardholderIndividualCardIssuingParams struct { // Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). UserTermsAcceptance *IssuingCardholderIndividualCardIssuingUserTermsAcceptanceParams `form:"user_terms_acceptance"` }
Information related to the card_issuing program for this cardholder.
type IssuingCardholderIndividualCardIssuingUserTermsAcceptance ¶
type IssuingCardholderIndividualCardIssuingUserTermsAcceptance struct { // The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. Date int64 `json:"date"` // The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. IP string `json:"ip"` // The user agent of the browser from which the cardholder accepted the Authorized User Terms. UserAgent string `json:"user_agent"` }
Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards).
type IssuingCardholderIndividualCardIssuingUserTermsAcceptanceParams ¶
type IssuingCardholderIndividualCardIssuingUserTermsAcceptanceParams struct { // The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. Date *int64 `form:"date"` // The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. IP *string `form:"ip"` // The user agent of the browser from which the cardholder accepted the Authorized User Terms. UserAgent *string `form:"user_agent"` }
Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards).
type IssuingCardholderIndividualDOB ¶
type IssuingCardholderIndividualDOB struct { // The day of birth, between 1 and 31. Day int64 `json:"day"` // The month of birth, between 1 and 12. Month int64 `json:"month"` // The four-digit year of birth. Year int64 `json:"year"` }
The date of birth of this cardholder.
type IssuingCardholderIndividualDOBParams ¶
type IssuingCardholderIndividualDOBParams struct { // The day of birth, between 1 and 31. Day *int64 `form:"day"` // The month of birth, between 1 and 12. Month *int64 `form:"month"` // The four-digit year of birth. Year *int64 `form:"year"` }
The date of birth of this cardholder. Cardholders must be older than 13 years old.
type IssuingCardholderIndividualParams ¶
type IssuingCardholderIndividualParams struct { // Information related to the card_issuing program for this cardholder. CardIssuing *IssuingCardholderIndividualCardIssuingParams `form:"card_issuing"` // The date of birth of this cardholder. Cardholders must be older than 13 years old. DOB *IssuingCardholderIndividualDOBParams `form:"dob"` // The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. FirstName *string `form:"first_name"` // The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. LastName *string `form:"last_name"` // Government-issued ID document for this cardholder. Verification *IssuingCardholderIndividualVerificationParams `form:"verification"` }
Additional information about an `individual` cardholder.
type IssuingCardholderIndividualVerification ¶
type IssuingCardholderIndividualVerification struct { // An identifying document, either a passport or local ID card. Document *IssuingCardholderIndividualVerificationDocument `json:"document"` }
Government-issued ID document for this cardholder.
type IssuingCardholderIndividualVerificationDocument ¶
type IssuingCardholderIndividualVerificationDocument struct { // The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. Back *File `json:"back"` // The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. Front *File `json:"front"` }
An identifying document, either a passport or local ID card.
type IssuingCardholderIndividualVerificationDocumentParams ¶
type IssuingCardholderIndividualVerificationDocumentParams struct { // The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. Back *string `form:"back"` // The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. Front *string `form:"front"` }
An identifying document, either a passport or local ID card.
type IssuingCardholderIndividualVerificationParams ¶
type IssuingCardholderIndividualVerificationParams struct { // An identifying document, either a passport or local ID card. Document *IssuingCardholderIndividualVerificationDocumentParams `form:"document"` }
Government-issued ID document for this cardholder.
type IssuingCardholderList ¶
type IssuingCardholderList struct { APIResource ListMeta Data []*IssuingCardholder `json:"data"` }
IssuingCardholderList is a list of Cardholders as retrieved from a list endpoint.
type IssuingCardholderListParams ¶
type IssuingCardholderListParams struct { ListParams `form:"*"` // Only return cardholders that were created during the given date interval. Created *int64 `form:"created"` // Only return cardholders that were created during the given date interval. CreatedRange *RangeQueryParams `form:"created"` // Only return cardholders that have the given email address. Email *string `form:"email"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return cardholders that have the given phone number. PhoneNumber *string `form:"phone_number"` // Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. Status *string `form:"status"` // Only return cardholders that have the given type. One of `individual` or `company`. Type *string `form:"type"` }
Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
func (*IssuingCardholderListParams) AddExpand ¶
func (p *IssuingCardholderListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IssuingCardholderParams ¶
type IssuingCardholderParams struct { Params `form:"*"` // The cardholder's billing address. Billing *IssuingCardholderBillingParams `form:"billing"` // Additional information about a `company` cardholder. Company *IssuingCardholderCompanyParams `form:"company"` // The cardholder's email address. Email *string `form:"email"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Additional information about an `individual` cardholder. Individual *IssuingCardholderIndividualParams `form:"individual"` // 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`. Metadata map[string]string `form:"metadata"` // The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. Name *string `form:"name"` // The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. PhoneNumber *string `form:"phone_number"` // The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. // This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. PreferredLocales []*string `form:"preferred_locales"` // Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. SpendingControls *IssuingCardholderSpendingControlsParams `form:"spending_controls"` // Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. Status *string `form:"status"` // One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. Type *string `form:"type"` }
Creates a new Issuing Cardholder object that can be issued cards.
func (*IssuingCardholderParams) AddExpand ¶
func (p *IssuingCardholderParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*IssuingCardholderParams) AddMetadata ¶
func (p *IssuingCardholderParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type IssuingCardholderPreferredLocale ¶
type IssuingCardholderPreferredLocale string
The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
const ( IssuingCardholderPreferredLocaleDE IssuingCardholderPreferredLocale = "de" IssuingCardholderPreferredLocaleEN IssuingCardholderPreferredLocale = "en" IssuingCardholderPreferredLocaleES IssuingCardholderPreferredLocale = "es" IssuingCardholderPreferredLocaleFR IssuingCardholderPreferredLocale = "fr" IssuingCardholderPreferredLocaleIT IssuingCardholderPreferredLocale = "it" )
List of values that IssuingCardholderPreferredLocale can take
type IssuingCardholderRequirements ¶
type IssuingCardholderRequirements struct { // If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. DisabledReason IssuingCardholderRequirementsDisabledReason `json:"disabled_reason"` // Array of fields that need to be collected in order to verify and re-enable the cardholder. PastDue []string `json:"past_due"` }
type IssuingCardholderRequirementsDisabledReason ¶
type IssuingCardholderRequirementsDisabledReason string
If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.
const ( IssuingCardholderRequirementsDisabledReasonListed IssuingCardholderRequirementsDisabledReason = "listed" IssuingCardholderRequirementsDisabledReasonRejectedListed IssuingCardholderRequirementsDisabledReason = "rejected.listed" IssuingCardholderRequirementsDisabledReasonRequirementsPastDue IssuingCardholderRequirementsDisabledReason = "requirements.past_due" IssuingCardholderRequirementsDisabledReasonUnderReview IssuingCardholderRequirementsDisabledReason = "under_review" )
List of values that IssuingCardholderRequirementsDisabledReason can take
type IssuingCardholderSpendingControls ¶
type IssuingCardholderSpendingControls struct { // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. AllowedCategories []string `json:"allowed_categories"` // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. BlockedCategories []string `json:"blocked_categories"` // Limit spending with amount-based rules that apply across this cardholder's cards. SpendingLimits []*IssuingCardholderSpendingControlsSpendingLimit `json:"spending_limits"` // Currency of the amounts within `spending_limits`. SpendingLimitsCurrency Currency `json:"spending_limits_currency"` }
Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
type IssuingCardholderSpendingControlsParams ¶
type IssuingCardholderSpendingControlsParams struct { // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. AllowedCategories []*string `form:"allowed_categories"` // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. BlockedCategories []*string `form:"blocked_categories"` // Limit spending with amount-based rules that apply across this cardholder's cards. SpendingLimits []*IssuingCardholderSpendingControlsSpendingLimitParams `form:"spending_limits"` // Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. SpendingLimitsCurrency *string `form:"spending_limits_currency"` }
Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
type IssuingCardholderSpendingControlsSpendingLimit ¶
type IssuingCardholderSpendingControlsSpendingLimit struct { // Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount int64 `json:"amount"` // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. Categories []string `json:"categories"` // Interval (or event) to which the amount applies. Interval IssuingCardholderSpendingControlsSpendingLimitInterval `json:"interval"` }
Limit spending with amount-based rules that apply across this cardholder's cards.
type IssuingCardholderSpendingControlsSpendingLimitInterval ¶
type IssuingCardholderSpendingControlsSpendingLimitInterval string
Interval (or event) to which the amount applies.
const ( IssuingCardholderSpendingControlsSpendingLimitIntervalAllTime IssuingCardholderSpendingControlsSpendingLimitInterval = "all_time" IssuingCardholderSpendingControlsSpendingLimitIntervalDaily IssuingCardholderSpendingControlsSpendingLimitInterval = "daily" IssuingCardholderSpendingControlsSpendingLimitIntervalMonthly IssuingCardholderSpendingControlsSpendingLimitInterval = "monthly" IssuingCardholderSpendingControlsSpendingLimitIntervalPerAuthorization IssuingCardholderSpendingControlsSpendingLimitInterval = "per_authorization" IssuingCardholderSpendingControlsSpendingLimitIntervalWeekly IssuingCardholderSpendingControlsSpendingLimitInterval = "weekly" IssuingCardholderSpendingControlsSpendingLimitIntervalYearly IssuingCardholderSpendingControlsSpendingLimitInterval = "yearly" )
List of values that IssuingCardholderSpendingControlsSpendingLimitInterval can take
type IssuingCardholderSpendingControlsSpendingLimitParams ¶
type IssuingCardholderSpendingControlsSpendingLimitParams struct { // Maximum amount allowed to spend per interval. Amount *int64 `form:"amount"` // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. Categories []*string `form:"categories"` // Interval (or event) to which the amount applies. Interval *string `form:"interval"` }
Limit spending with amount-based rules that apply across this cardholder's cards.
type IssuingCardholderStatus ¶
type IssuingCardholderStatus string
Specifies whether to permit authorizations on this cardholder's cards.
const ( IssuingCardholderStatusActive IssuingCardholderStatus = "active" IssuingCardholderStatusBlocked IssuingCardholderStatus = "blocked" IssuingCardholderStatusInactive IssuingCardholderStatus = "inactive" )
List of values that IssuingCardholderStatus can take
type IssuingCardholderType ¶
type IssuingCardholderType string
One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
const ( IssuingCardholderTypeCompany IssuingCardholderType = "company" IssuingCardholderTypeIndividual IssuingCardholderType = "individual" )
List of values that IssuingCardholderType can take
type IssuingDispute ¶
type IssuingDispute struct { APIResource // Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). Amount int64 `json:"amount"` // List of balance transactions associated with the dispute. BalanceTransactions []*BalanceTransaction `json:"balance_transactions"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The currency the `transaction` was made in. Currency Currency `json:"currency"` Evidence *IssuingDisputeEvidence `json:"evidence"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Current status of the dispute. Status IssuingDisputeStatus `json:"status"` // The transaction being disputed. Transaction *IssuingTransaction `json:"transaction"` // [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts Treasury *IssuingDisputeTreasury `json:"treasury"` }
As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes)
func (*IssuingDispute) UnmarshalJSON ¶
func (i *IssuingDispute) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an IssuingDispute. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type IssuingDisputeEvidence ¶
type IssuingDisputeEvidence struct { Canceled *IssuingDisputeEvidenceCanceled `json:"canceled"` Duplicate *IssuingDisputeEvidenceDuplicate `json:"duplicate"` Fraudulent *IssuingDisputeEvidenceFraudulent `json:"fraudulent"` MerchandiseNotAsDescribed *IssuingDisputeEvidenceMerchandiseNotAsDescribed `json:"merchandise_not_as_described"` NotReceived *IssuingDisputeEvidenceNotReceived `json:"not_received"` Other *IssuingDisputeEvidenceOther `json:"other"` // The reason for filing the dispute. Its value will match the field containing the evidence. Reason IssuingDisputeEvidenceReason `json:"reason"` ServiceNotAsDescribed *IssuingDisputeEvidenceServiceNotAsDescribed `json:"service_not_as_described"` }
type IssuingDisputeEvidenceCanceled ¶
type IssuingDisputeEvidenceCanceled struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *File `json:"additional_documentation"` // Date when order was canceled. CanceledAt int64 `json:"canceled_at"` // Whether the cardholder was provided with a cancellation policy. CancellationPolicyProvided bool `json:"cancellation_policy_provided"` // Reason for canceling the order. CancellationReason string `json:"cancellation_reason"` // Date when the cardholder expected to receive the product. ExpectedAt int64 `json:"expected_at"` // Explanation of why the cardholder is disputing this transaction. Explanation string `json:"explanation"` // Description of the merchandise or service that was purchased. ProductDescription string `json:"product_description"` // Whether the product was a merchandise or service. ProductType IssuingDisputeEvidenceCanceledProductType `json:"product_type"` // Date when the product was returned or attempted to be returned. ReturnedAt int64 `json:"returned_at"` // Result of cardholder's attempt to return the product. ReturnStatus IssuingDisputeEvidenceCanceledReturnStatus `json:"return_status"` }
type IssuingDisputeEvidenceCanceledParams ¶
type IssuingDisputeEvidenceCanceledParams struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *string `form:"additional_documentation"` // Date when order was canceled. CanceledAt *int64 `form:"canceled_at"` // Whether the cardholder was provided with a cancellation policy. CancellationPolicyProvided *bool `form:"cancellation_policy_provided"` // Reason for canceling the order. CancellationReason *string `form:"cancellation_reason"` // Date when the cardholder expected to receive the product. ExpectedAt *int64 `form:"expected_at"` // Explanation of why the cardholder is disputing this transaction. Explanation *string `form:"explanation"` // Description of the merchandise or service that was purchased. ProductDescription *string `form:"product_description"` // Whether the product was a merchandise or service. ProductType *string `form:"product_type"` // Date when the product was returned or attempted to be returned. ReturnedAt *int64 `form:"returned_at"` // Result of cardholder's attempt to return the product. ReturnStatus *string `form:"return_status"` }
Evidence provided when `reason` is 'canceled'.
type IssuingDisputeEvidenceCanceledProductType ¶
type IssuingDisputeEvidenceCanceledProductType string
Whether the product was a merchandise or service.
const ( IssuingDisputeEvidenceCanceledProductTypeMerchandise IssuingDisputeEvidenceCanceledProductType = "merchandise" IssuingDisputeEvidenceCanceledProductTypeService IssuingDisputeEvidenceCanceledProductType = "service" )
List of values that IssuingDisputeEvidenceCanceledProductType can take
type IssuingDisputeEvidenceCanceledReturnStatus ¶
type IssuingDisputeEvidenceCanceledReturnStatus string
Result of cardholder's attempt to return the product.
const ( IssuingDisputeEvidenceCanceledReturnStatusMerchantRejected IssuingDisputeEvidenceCanceledReturnStatus = "merchant_rejected" IssuingDisputeEvidenceCanceledReturnStatusSuccessful IssuingDisputeEvidenceCanceledReturnStatus = "successful" )
List of values that IssuingDisputeEvidenceCanceledReturnStatus can take
type IssuingDisputeEvidenceDuplicate ¶
type IssuingDisputeEvidenceDuplicate struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *File `json:"additional_documentation"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. CardStatement *File `json:"card_statement"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. CashReceipt *File `json:"cash_receipt"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. CheckImage *File `json:"check_image"` // Explanation of why the cardholder is disputing this transaction. Explanation string `json:"explanation"` // Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. OriginalTransaction string `json:"original_transaction"` }
type IssuingDisputeEvidenceDuplicateParams ¶
type IssuingDisputeEvidenceDuplicateParams struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *string `form:"additional_documentation"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. CardStatement *string `form:"card_statement"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. CashReceipt *string `form:"cash_receipt"` // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. CheckImage *string `form:"check_image"` // Explanation of why the cardholder is disputing this transaction. Explanation *string `form:"explanation"` // Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. OriginalTransaction *string `form:"original_transaction"` }
Evidence provided when `reason` is 'duplicate'.
type IssuingDisputeEvidenceFraudulent ¶
type IssuingDisputeEvidenceFraudulent struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *File `json:"additional_documentation"` // Explanation of why the cardholder is disputing this transaction. Explanation string `json:"explanation"` }
type IssuingDisputeEvidenceFraudulentParams ¶
type IssuingDisputeEvidenceFraudulentParams struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *string `form:"additional_documentation"` // Explanation of why the cardholder is disputing this transaction. Explanation *string `form:"explanation"` }
Evidence provided when `reason` is 'fraudulent'.
type IssuingDisputeEvidenceMerchandiseNotAsDescribed ¶
type IssuingDisputeEvidenceMerchandiseNotAsDescribed struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *File `json:"additional_documentation"` // Explanation of why the cardholder is disputing this transaction. Explanation string `json:"explanation"` // Date when the product was received. ReceivedAt int64 `json:"received_at"` // Description of the cardholder's attempt to return the product. ReturnDescription string `json:"return_description"` // Date when the product was returned or attempted to be returned. ReturnedAt int64 `json:"returned_at"` // Result of cardholder's attempt to return the product. ReturnStatus IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus `json:"return_status"` }
type IssuingDisputeEvidenceMerchandiseNotAsDescribedParams ¶
type IssuingDisputeEvidenceMerchandiseNotAsDescribedParams struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *string `form:"additional_documentation"` // Explanation of why the cardholder is disputing this transaction. Explanation *string `form:"explanation"` // Date when the product was received. ReceivedAt *int64 `form:"received_at"` // Description of the cardholder's attempt to return the product. ReturnDescription *string `form:"return_description"` // Date when the product was returned or attempted to be returned. ReturnedAt *int64 `form:"returned_at"` // Result of cardholder's attempt to return the product. ReturnStatus *string `form:"return_status"` }
Evidence provided when `reason` is 'merchandise_not_as_described'.
type IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus ¶
type IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus string
Result of cardholder's attempt to return the product.
const ( IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatusMerchantRejected IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus = "merchant_rejected" IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatusSuccessful IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus = "successful" )
List of values that IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus can take
type IssuingDisputeEvidenceNotReceived ¶
type IssuingDisputeEvidenceNotReceived struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *File `json:"additional_documentation"` // Date when the cardholder expected to receive the product. ExpectedAt int64 `json:"expected_at"` // Explanation of why the cardholder is disputing this transaction. Explanation string `json:"explanation"` // Description of the merchandise or service that was purchased. ProductDescription string `json:"product_description"` // Whether the product was a merchandise or service. ProductType IssuingDisputeEvidenceNotReceivedProductType `json:"product_type"` }
type IssuingDisputeEvidenceNotReceivedParams ¶
type IssuingDisputeEvidenceNotReceivedParams struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *string `form:"additional_documentation"` // Date when the cardholder expected to receive the product. ExpectedAt *int64 `form:"expected_at"` // Explanation of why the cardholder is disputing this transaction. Explanation *string `form:"explanation"` // Description of the merchandise or service that was purchased. ProductDescription *string `form:"product_description"` // Whether the product was a merchandise or service. ProductType *string `form:"product_type"` }
Evidence provided when `reason` is 'not_received'.
type IssuingDisputeEvidenceNotReceivedProductType ¶
type IssuingDisputeEvidenceNotReceivedProductType string
Whether the product was a merchandise or service.
const ( IssuingDisputeEvidenceNotReceivedProductTypeMerchandise IssuingDisputeEvidenceNotReceivedProductType = "merchandise" IssuingDisputeEvidenceNotReceivedProductTypeService IssuingDisputeEvidenceNotReceivedProductType = "service" )
List of values that IssuingDisputeEvidenceNotReceivedProductType can take
type IssuingDisputeEvidenceOther ¶
type IssuingDisputeEvidenceOther struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *File `json:"additional_documentation"` // Explanation of why the cardholder is disputing this transaction. Explanation string `json:"explanation"` // Description of the merchandise or service that was purchased. ProductDescription string `json:"product_description"` // Whether the product was a merchandise or service. ProductType IssuingDisputeEvidenceOtherProductType `json:"product_type"` }
type IssuingDisputeEvidenceOtherParams ¶
type IssuingDisputeEvidenceOtherParams struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *string `form:"additional_documentation"` // Explanation of why the cardholder is disputing this transaction. Explanation *string `form:"explanation"` // Description of the merchandise or service that was purchased. ProductDescription *string `form:"product_description"` // Whether the product was a merchandise or service. ProductType *string `form:"product_type"` }
Evidence provided when `reason` is 'other'.
type IssuingDisputeEvidenceOtherProductType ¶
type IssuingDisputeEvidenceOtherProductType string
Whether the product was a merchandise or service.
const ( IssuingDisputeEvidenceOtherProductTypeMerchandise IssuingDisputeEvidenceOtherProductType = "merchandise" IssuingDisputeEvidenceOtherProductTypeService IssuingDisputeEvidenceOtherProductType = "service" )
List of values that IssuingDisputeEvidenceOtherProductType can take
type IssuingDisputeEvidenceParams ¶
type IssuingDisputeEvidenceParams struct { // Evidence provided when `reason` is 'canceled'. Canceled *IssuingDisputeEvidenceCanceledParams `form:"canceled"` // Evidence provided when `reason` is 'duplicate'. Duplicate *IssuingDisputeEvidenceDuplicateParams `form:"duplicate"` // Evidence provided when `reason` is 'fraudulent'. Fraudulent *IssuingDisputeEvidenceFraudulentParams `form:"fraudulent"` // Evidence provided when `reason` is 'merchandise_not_as_described'. MerchandiseNotAsDescribed *IssuingDisputeEvidenceMerchandiseNotAsDescribedParams `form:"merchandise_not_as_described"` // Evidence provided when `reason` is 'not_received'. NotReceived *IssuingDisputeEvidenceNotReceivedParams `form:"not_received"` // Evidence provided when `reason` is 'other'. Other *IssuingDisputeEvidenceOtherParams `form:"other"` // The reason for filing the dispute. The evidence should be submitted in the field of the same name. Reason *string `form:"reason"` // Evidence provided when `reason` is 'service_not_as_described'. ServiceNotAsDescribed *IssuingDisputeEvidenceServiceNotAsDescribedParams `form:"service_not_as_described"` }
Evidence provided for the dispute.
type IssuingDisputeEvidenceReason ¶
type IssuingDisputeEvidenceReason string
The reason for filing the dispute. Its value will match the field containing the evidence.
const ( IssuingDisputeEvidenceReasonCanceled IssuingDisputeEvidenceReason = "canceled" IssuingDisputeEvidenceReasonDuplicate IssuingDisputeEvidenceReason = "duplicate" IssuingDisputeEvidenceReasonFraudulent IssuingDisputeEvidenceReason = "fraudulent" IssuingDisputeEvidenceReasonMerchandiseNotAsDescribed IssuingDisputeEvidenceReason = "merchandise_not_as_described" IssuingDisputeEvidenceReasonNotReceived IssuingDisputeEvidenceReason = "not_received" IssuingDisputeEvidenceReasonOther IssuingDisputeEvidenceReason = "other" IssuingDisputeEvidenceReasonServiceNotAsDescribed IssuingDisputeEvidenceReason = "service_not_as_described" )
List of values that IssuingDisputeEvidenceReason can take
type IssuingDisputeEvidenceServiceNotAsDescribed ¶
type IssuingDisputeEvidenceServiceNotAsDescribed struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *File `json:"additional_documentation"` // Date when order was canceled. CanceledAt int64 `json:"canceled_at"` // Reason for canceling the order. CancellationReason string `json:"cancellation_reason"` // Explanation of why the cardholder is disputing this transaction. Explanation string `json:"explanation"` // Date when the product was received. ReceivedAt int64 `json:"received_at"` }
type IssuingDisputeEvidenceServiceNotAsDescribedParams ¶
type IssuingDisputeEvidenceServiceNotAsDescribedParams struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. AdditionalDocumentation *string `form:"additional_documentation"` // Date when order was canceled. CanceledAt *int64 `form:"canceled_at"` // Reason for canceling the order. CancellationReason *string `form:"cancellation_reason"` // Explanation of why the cardholder is disputing this transaction. Explanation *string `form:"explanation"` // Date when the product was received. ReceivedAt *int64 `form:"received_at"` }
Evidence provided when `reason` is 'service_not_as_described'.
type IssuingDisputeList ¶
type IssuingDisputeList struct { APIResource ListMeta Data []*IssuingDispute `json:"data"` }
IssuingDisputeList is a list of Disputes as retrieved from a list endpoint.
type IssuingDisputeListParams ¶
type IssuingDisputeListParams struct { ListParams `form:"*"` // Select Issuing disputes that were created during the given date interval. Created *int64 `form:"created"` // Select Issuing disputes that were created during the given date interval. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Select Issuing disputes with the given status. Status *string `form:"status"` // Select the Issuing dispute for the given transaction. Transaction *string `form:"transaction"` }
Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
func (*IssuingDisputeListParams) AddExpand ¶
func (p *IssuingDisputeListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IssuingDisputeParams ¶
type IssuingDisputeParams struct { Params `form:"*"` // The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. Amount *int64 `form:"amount"` // Evidence provided for the dispute. Evidence *IssuingDisputeEvidenceParams `form:"evidence"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. Transaction *string `form:"transaction"` // Params for disputes related to Treasury FinancialAccounts Treasury *IssuingDisputeTreasuryParams `form:"treasury"` }
Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
func (*IssuingDisputeParams) AddExpand ¶
func (p *IssuingDisputeParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*IssuingDisputeParams) AddMetadata ¶
func (p *IssuingDisputeParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type IssuingDisputeStatus ¶
type IssuingDisputeStatus string
Current status of the dispute.
const ( IssuingDisputeStatusExpired IssuingDisputeStatus = "expired" IssuingDisputeStatusLost IssuingDisputeStatus = "lost" IssuingDisputeStatusSubmitted IssuingDisputeStatus = "submitted" IssuingDisputeStatusUnsubmitted IssuingDisputeStatus = "unsubmitted" IssuingDisputeStatusWon IssuingDisputeStatus = "won" )
List of values that IssuingDisputeStatus can take
type IssuingDisputeSubmitParams ¶
type IssuingDisputeSubmitParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` }
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
func (*IssuingDisputeSubmitParams) AddExpand ¶
func (p *IssuingDisputeSubmitParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*IssuingDisputeSubmitParams) AddMetadata ¶
func (p *IssuingDisputeSubmitParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type IssuingDisputeTreasury ¶
type IssuingDisputeTreasury struct { // The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute DebitReversal string `json:"debit_reversal"` // The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. ReceivedDebit string `json:"received_debit"` }
[Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
type IssuingDisputeTreasuryParams ¶
type IssuingDisputeTreasuryParams struct { // The ID of the ReceivedDebit to initiate an Issuings dispute for. ReceivedDebit *string `form:"received_debit"` }
Params for disputes related to Treasury FinancialAccounts
type IssuingToken ¶ added in v75.9.0
type IssuingToken struct { APIResource // Card associated with this token. Card *IssuingCard `json:"card"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The hashed ID derived from the device ID from the card network associated with the token DeviceFingerprint string `json:"device_fingerprint"` // Unique identifier for the object. ID string `json:"id"` // The last four digits of the token. Last4 string `json:"last4"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // The token service provider / card network associated with the token. Network IssuingTokenNetwork `json:"network"` NetworkData *IssuingTokenNetworkData `json:"network_data"` // Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. NetworkUpdatedAt int64 `json:"network_updated_at"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The usage state of the token. Status IssuingTokenStatus `json:"status"` // The digital wallet for this token, if one was used. WalletProvider IssuingTokenWalletProvider `json:"wallet_provider"` }
An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe.
func (*IssuingToken) UnmarshalJSON ¶ added in v75.9.0
func (i *IssuingToken) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an IssuingToken. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type IssuingTokenList ¶ added in v75.9.0
type IssuingTokenList struct { APIResource ListMeta Data []*IssuingToken `json:"data"` }
IssuingTokenList is a list of Tokens as retrieved from a list endpoint.
type IssuingTokenListParams ¶ added in v75.9.0
type IssuingTokenListParams struct { ListParams `form:"*"` // The Issuing card identifier to list tokens for. Card *string `form:"card"` // Select Issuing tokens that were created during the given date interval. Created *int64 `form:"created"` // Select Issuing tokens that were created during the given date interval. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Select Issuing tokens with the given status. Status *string `form:"status"` }
Lists all Issuing Token objects for a given card.
func (*IssuingTokenListParams) AddExpand ¶ added in v75.9.0
func (p *IssuingTokenListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IssuingTokenNetwork ¶ added in v75.9.0
type IssuingTokenNetwork string
The token service provider / card network associated with the token.
const ( IssuingTokenNetworkMastercard IssuingTokenNetwork = "mastercard" IssuingTokenNetworkVisa IssuingTokenNetwork = "visa" )
List of values that IssuingTokenNetwork can take
type IssuingTokenNetworkData ¶ added in v75.9.0
type IssuingTokenNetworkData struct { Device *IssuingTokenNetworkDataDevice `json:"device"` Mastercard *IssuingTokenNetworkDataMastercard `json:"mastercard"` // The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. Type IssuingTokenNetworkDataType `json:"type"` Visa *IssuingTokenNetworkDataVisa `json:"visa"` WalletProvider *IssuingTokenNetworkDataWalletProvider `json:"wallet_provider"` }
type IssuingTokenNetworkDataDevice ¶ added in v75.9.0
type IssuingTokenNetworkDataDevice struct { // An obfuscated ID derived from the device ID. DeviceFingerprint string `json:"device_fingerprint"` // The IP address of the device at provisioning time. IPAddress string `json:"ip_address"` // The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. Location string `json:"location"` // The name of the device used for tokenization. Name string `json:"name"` // The phone number of the device used for tokenization. PhoneNumber string `json:"phone_number"` // The type of device used for tokenization. Type IssuingTokenNetworkDataDeviceType `json:"type"` }
type IssuingTokenNetworkDataDeviceType ¶ added in v75.9.0
type IssuingTokenNetworkDataDeviceType string
The type of device used for tokenization.
const ( IssuingTokenNetworkDataDeviceTypeOther IssuingTokenNetworkDataDeviceType = "other" IssuingTokenNetworkDataDeviceTypePhone IssuingTokenNetworkDataDeviceType = "phone" IssuingTokenNetworkDataDeviceTypeWatch IssuingTokenNetworkDataDeviceType = "watch" )
List of values that IssuingTokenNetworkDataDeviceType can take
type IssuingTokenNetworkDataMastercard ¶ added in v75.9.0
type IssuingTokenNetworkDataMastercard struct { // A unique reference ID from MasterCard to represent the card account number. CardReferenceID string `json:"card_reference_id"` // The network-unique identifier for the token. TokenReferenceID string `json:"token_reference_id"` // The ID of the entity requesting tokenization, specific to MasterCard. TokenRequestorID string `json:"token_requestor_id"` // The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. TokenRequestorName string `json:"token_requestor_name"` }
type IssuingTokenNetworkDataType ¶ added in v75.9.0
type IssuingTokenNetworkDataType string
The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network.
const ( IssuingTokenNetworkDataTypeMastercard IssuingTokenNetworkDataType = "mastercard" IssuingTokenNetworkDataTypeVisa IssuingTokenNetworkDataType = "visa" )
List of values that IssuingTokenNetworkDataType can take
type IssuingTokenNetworkDataVisa ¶ added in v75.9.0
type IssuingTokenNetworkDataVisa struct { // A unique reference ID from Visa to represent the card account number. CardReferenceID string `json:"card_reference_id"` // The network-unique identifier for the token. TokenReferenceID string `json:"token_reference_id"` // The ID of the entity requesting tokenization, specific to Visa. TokenRequestorID string `json:"token_requestor_id"` // Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. TokenRiskScore string `json:"token_risk_score"` }
type IssuingTokenNetworkDataWalletProvider ¶ added in v75.9.0
type IssuingTokenNetworkDataWalletProvider struct { // The wallet provider-given account ID of the digital wallet the token belongs to. AccountID string `json:"account_id"` // An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. AccountTrustScore int64 `json:"account_trust_score"` CardholderAddress *IssuingTokenNetworkDataWalletProviderCardholderAddress `json:"cardholder_address"` // The name of the cardholder tokenizing the card. CardholderName string `json:"cardholder_name"` // The method used for tokenizing a card. CardNumberSource IssuingTokenNetworkDataWalletProviderCardNumberSource `json:"card_number_source"` // An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. DeviceTrustScore int64 `json:"device_trust_score"` // The hashed email address of the cardholder's account with the wallet provider. HashedAccountEmailAddress string `json:"hashed_account_email_address"` // The reasons for suggested tokenization given by the card network. ReasonCodes []IssuingTokenNetworkDataWalletProviderReasonCode `json:"reason_codes"` // The recommendation on responding to the tokenization request. SuggestedDecision IssuingTokenNetworkDataWalletProviderSuggestedDecision `json:"suggested_decision"` // The version of the standard for mapping reason codes followed by the wallet provider. SuggestedDecisionVersion string `json:"suggested_decision_version"` }
type IssuingTokenNetworkDataWalletProviderCardNumberSource ¶ added in v75.9.0
type IssuingTokenNetworkDataWalletProviderCardNumberSource string
The method used for tokenizing a card.
const ( IssuingTokenNetworkDataWalletProviderCardNumberSourceApp IssuingTokenNetworkDataWalletProviderCardNumberSource = "app" IssuingTokenNetworkDataWalletProviderCardNumberSourceManual IssuingTokenNetworkDataWalletProviderCardNumberSource = "manual" IssuingTokenNetworkDataWalletProviderCardNumberSourceOnFile IssuingTokenNetworkDataWalletProviderCardNumberSource = "on_file" IssuingTokenNetworkDataWalletProviderCardNumberSourceOther IssuingTokenNetworkDataWalletProviderCardNumberSource = "other" )
List of values that IssuingTokenNetworkDataWalletProviderCardNumberSource can take
type IssuingTokenNetworkDataWalletProviderCardholderAddress ¶ added in v75.9.0
type IssuingTokenNetworkDataWalletProviderReasonCode ¶ added in v75.9.0
type IssuingTokenNetworkDataWalletProviderReasonCode string
The reasons for suggested tokenization given by the card network.
const ( IssuingTokenNetworkDataWalletProviderReasonCodeAccountCardTooNew IssuingTokenNetworkDataWalletProviderReasonCode = "account_card_too_new" IssuingTokenNetworkDataWalletProviderReasonCodeAccountRecentlyChanged IssuingTokenNetworkDataWalletProviderReasonCode = "account_recently_changed" IssuingTokenNetworkDataWalletProviderReasonCodeAccountTooNew IssuingTokenNetworkDataWalletProviderReasonCode = "account_too_new" IssuingTokenNetworkDataWalletProviderReasonCodeAccountTooNewSinceLaunch IssuingTokenNetworkDataWalletProviderReasonCode = "account_too_new_since_launch" IssuingTokenNetworkDataWalletProviderReasonCodeAdditionalDevice IssuingTokenNetworkDataWalletProviderReasonCode = "additional_device" IssuingTokenNetworkDataWalletProviderReasonCodeDataExpired IssuingTokenNetworkDataWalletProviderReasonCode = "data_expired" IssuingTokenNetworkDataWalletProviderReasonCodeDeferIDVDecision IssuingTokenNetworkDataWalletProviderReasonCode = "defer_id_v_decision" IssuingTokenNetworkDataWalletProviderReasonCodeDeviceRecentlyLost IssuingTokenNetworkDataWalletProviderReasonCode = "device_recently_lost" IssuingTokenNetworkDataWalletProviderReasonCodeGoodActivityHistory IssuingTokenNetworkDataWalletProviderReasonCode = "good_activity_history" IssuingTokenNetworkDataWalletProviderReasonCodeHasSuspendedTokens IssuingTokenNetworkDataWalletProviderReasonCode = "has_suspended_tokens" IssuingTokenNetworkDataWalletProviderReasonCodeHighRisk IssuingTokenNetworkDataWalletProviderReasonCode = "high_risk" IssuingTokenNetworkDataWalletProviderReasonCodeInactiveAccount IssuingTokenNetworkDataWalletProviderReasonCode = "inactive_account" IssuingTokenNetworkDataWalletProviderReasonCodeLongAccountTenure IssuingTokenNetworkDataWalletProviderReasonCode = "long_account_tenure" IssuingTokenNetworkDataWalletProviderReasonCodeLowAccountScore IssuingTokenNetworkDataWalletProviderReasonCode = "low_account_score" IssuingTokenNetworkDataWalletProviderReasonCodeLowDeviceScore IssuingTokenNetworkDataWalletProviderReasonCode = "low_device_score" IssuingTokenNetworkDataWalletProviderReasonCodeLowPhoneNumberScore IssuingTokenNetworkDataWalletProviderReasonCode = "low_phone_number_score" IssuingTokenNetworkDataWalletProviderReasonCodeNetworkServiceError IssuingTokenNetworkDataWalletProviderReasonCode = "network_service_error" IssuingTokenNetworkDataWalletProviderReasonCodeOutsideHomeTerritory IssuingTokenNetworkDataWalletProviderReasonCode = "outside_home_territory" IssuingTokenNetworkDataWalletProviderReasonCodeProvisioningCardholderMismatch IssuingTokenNetworkDataWalletProviderReasonCode = "provisioning_cardholder_mismatch" IssuingTokenNetworkDataWalletProviderReasonCodeProvisioningDeviceAndCardholderMismatch IssuingTokenNetworkDataWalletProviderReasonCode = "provisioning_device_and_cardholder_mismatch" IssuingTokenNetworkDataWalletProviderReasonCodeProvisioningDeviceMismatch IssuingTokenNetworkDataWalletProviderReasonCode = "provisioning_device_mismatch" IssuingTokenNetworkDataWalletProviderReasonCodeSameDeviceNoPriorAuthentication IssuingTokenNetworkDataWalletProviderReasonCode = "same_device_no_prior_authentication" IssuingTokenNetworkDataWalletProviderReasonCodeSameDeviceSuccessfulPriorAuthentication IssuingTokenNetworkDataWalletProviderReasonCode = "same_device_successful_prior_authentication" IssuingTokenNetworkDataWalletProviderReasonCodeSoftwareUpdate IssuingTokenNetworkDataWalletProviderReasonCode = "software_update" IssuingTokenNetworkDataWalletProviderReasonCodeSuspiciousActivity IssuingTokenNetworkDataWalletProviderReasonCode = "suspicious_activity" IssuingTokenNetworkDataWalletProviderReasonCodeTooManyDifferentCardholders IssuingTokenNetworkDataWalletProviderReasonCode = "too_many_different_cardholders" IssuingTokenNetworkDataWalletProviderReasonCodeTooManyRecentAttempts IssuingTokenNetworkDataWalletProviderReasonCode = "too_many_recent_attempts" IssuingTokenNetworkDataWalletProviderReasonCodeTooManyRecentTokens IssuingTokenNetworkDataWalletProviderReasonCode = "too_many_recent_tokens" )
List of values that IssuingTokenNetworkDataWalletProviderReasonCode can take
type IssuingTokenNetworkDataWalletProviderSuggestedDecision ¶ added in v75.9.0
type IssuingTokenNetworkDataWalletProviderSuggestedDecision string
The recommendation on responding to the tokenization request.
const ( IssuingTokenNetworkDataWalletProviderSuggestedDecisionApprove IssuingTokenNetworkDataWalletProviderSuggestedDecision = "approve" IssuingTokenNetworkDataWalletProviderSuggestedDecisionDecline IssuingTokenNetworkDataWalletProviderSuggestedDecision = "decline" IssuingTokenNetworkDataWalletProviderSuggestedDecisionRequireAuth IssuingTokenNetworkDataWalletProviderSuggestedDecision = "require_auth" )
List of values that IssuingTokenNetworkDataWalletProviderSuggestedDecision can take
type IssuingTokenParams ¶ added in v75.9.0
type IssuingTokenParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Specifies which status the token should be updated to. Status *string `form:"status"` }
Retrieves an Issuing Token object.
func (*IssuingTokenParams) AddExpand ¶ added in v75.9.0
func (p *IssuingTokenParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IssuingTokenStatus ¶ added in v75.9.0
type IssuingTokenStatus string
The usage state of the token.
const ( IssuingTokenStatusActive IssuingTokenStatus = "active" IssuingTokenStatusDeleted IssuingTokenStatus = "deleted" IssuingTokenStatusRequested IssuingTokenStatus = "requested" IssuingTokenStatusSuspended IssuingTokenStatus = "suspended" )
List of values that IssuingTokenStatus can take
type IssuingTokenWalletProvider ¶ added in v75.9.0
type IssuingTokenWalletProvider string
The digital wallet for this token, if one was used.
const ( IssuingTokenWalletProviderApplePay IssuingTokenWalletProvider = "apple_pay" IssuingTokenWalletProviderGooglePay IssuingTokenWalletProvider = "google_pay" IssuingTokenWalletProviderSamsungPay IssuingTokenWalletProvider = "samsung_pay" )
List of values that IssuingTokenWalletProvider can take
type IssuingTransaction ¶
type IssuingTransaction struct { APIResource // The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount int64 `json:"amount"` // Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). AmountDetails *IssuingTransactionAmountDetails `json:"amount_details"` // The `Authorization` object that led to this transaction. Authorization *IssuingAuthorization `json:"authorization"` // ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` // The card used to make this transaction. Card *IssuingCard `json:"card"` // The cardholder to whom this transaction belongs. Cardholder *IssuingCardholder `json:"cardholder"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // If you've disputed the transaction, the ID of the dispute. Dispute *IssuingDispute `json:"dispute"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. MerchantAmount int64 `json:"merchant_amount"` // The currency with which the merchant is taking payment. MerchantCurrency Currency `json:"merchant_currency"` MerchantData *IssuingAuthorizationMerchantData `json:"merchant_data"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Additional purchase information that is optionally provided by the merchant. PurchaseDetails *IssuingTransactionPurchaseDetails `json:"purchase_details"` // [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. Token *IssuingToken `json:"token"` // [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts Treasury *IssuingTransactionTreasury `json:"treasury"` // The nature of the transaction. Type IssuingTransactionType `json:"type"` // The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Wallet IssuingTransactionWallet `json:"wallet"` }
Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving your Stripe account, such as a completed purchase or refund, is represented by an Issuing `Transaction` object.
Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions)
func (*IssuingTransaction) UnmarshalJSON ¶
func (i *IssuingTransaction) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an IssuingTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type IssuingTransactionAmountDetails ¶
type IssuingTransactionAmountDetails struct { // The fee charged by the ATM for the cash withdrawal. ATMFee int64 `json:"atm_fee"` // The amount of cash requested by the cardholder. CashbackAmount int64 `json:"cashback_amount"` }
Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
type IssuingTransactionList ¶
type IssuingTransactionList struct { APIResource ListMeta Data []*IssuingTransaction `json:"data"` }
IssuingTransactionList is a list of Transactions as retrieved from a list endpoint.
type IssuingTransactionListParams ¶
type IssuingTransactionListParams struct { ListParams `form:"*"` // Only return transactions that belong to the given card. Card *string `form:"card"` // Only return transactions that belong to the given cardholder. Cardholder *string `form:"cardholder"` // Only return transactions that were created during the given date interval. Created *int64 `form:"created"` // Only return transactions that were created during the given date interval. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return transactions that have the given type. One of `capture` or `refund`. Type *string `form:"type"` }
Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
func (*IssuingTransactionListParams) AddExpand ¶
func (p *IssuingTransactionListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type IssuingTransactionParams ¶
type IssuingTransactionParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` }
Retrieves an Issuing Transaction object.
func (*IssuingTransactionParams) AddExpand ¶
func (p *IssuingTransactionParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*IssuingTransactionParams) AddMetadata ¶
func (p *IssuingTransactionParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type IssuingTransactionPurchaseDetails ¶
type IssuingTransactionPurchaseDetails struct { // Information about the flight that was purchased with this transaction. Flight *IssuingTransactionPurchaseDetailsFlight `json:"flight"` // Information about fuel that was purchased with this transaction. Fuel *IssuingTransactionPurchaseDetailsFuel `json:"fuel"` // Information about lodging that was purchased with this transaction. Lodging *IssuingTransactionPurchaseDetailsLodging `json:"lodging"` // The line items in the purchase. Receipt []*IssuingTransactionPurchaseDetailsReceipt `json:"receipt"` // A merchant-specific order number. Reference string `json:"reference"` }
Additional purchase information that is optionally provided by the merchant.
type IssuingTransactionPurchaseDetailsFlight ¶
type IssuingTransactionPurchaseDetailsFlight struct { // The time that the flight departed. DepartureAt int64 `json:"departure_at"` // The name of the passenger. PassengerName string `json:"passenger_name"` // Whether the ticket is refundable. Refundable bool `json:"refundable"` // The legs of the trip. Segments []*IssuingTransactionPurchaseDetailsFlightSegment `json:"segments"` // The travel agency that issued the ticket. TravelAgency string `json:"travel_agency"` }
Information about the flight that was purchased with this transaction.
type IssuingTransactionPurchaseDetailsFlightSegment ¶
type IssuingTransactionPurchaseDetailsFlightSegment struct { // The three-letter IATA airport code of the flight's destination. ArrivalAirportCode string `json:"arrival_airport_code"` // The airline carrier code. Carrier string `json:"carrier"` // The three-letter IATA airport code that the flight departed from. DepartureAirportCode string `json:"departure_airport_code"` // The flight number. FlightNumber string `json:"flight_number"` // The flight's service class. ServiceClass string `json:"service_class"` // Whether a stopover is allowed on this flight. StopoverAllowed bool `json:"stopover_allowed"` }
The legs of the trip.
type IssuingTransactionPurchaseDetailsFuel ¶
type IssuingTransactionPurchaseDetailsFuel struct { // The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. Type IssuingTransactionPurchaseDetailsFuelType `json:"type"` // The units for `volume_decimal`. One of `us_gallon` or `liter`. Unit IssuingTransactionPurchaseDetailsFuelUnit `json:"unit"` // The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. UnitCostDecimal float64 `json:"unit_cost_decimal,string"` // The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. VolumeDecimal float64 `json:"volume_decimal,string"` }
Information about fuel that was purchased with this transaction.
type IssuingTransactionPurchaseDetailsFuelType ¶
type IssuingTransactionPurchaseDetailsFuelType string
The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
const ( IssuingTransactionPurchaseDetailsFuelTypeDiesel IssuingTransactionPurchaseDetailsFuelType = "diesel" IssuingTransactionPurchaseDetailsFuelTypeOther IssuingTransactionPurchaseDetailsFuelType = "other" IssuingTransactionPurchaseDetailsFuelTypeUnleadedPlus IssuingTransactionPurchaseDetailsFuelType = "unleaded_plus" IssuingTransactionPurchaseDetailsFuelTypeUnleadedRegular IssuingTransactionPurchaseDetailsFuelType = "unleaded_regular" IssuingTransactionPurchaseDetailsFuelTypeUnleadedSuper IssuingTransactionPurchaseDetailsFuelType = "unleaded_super" )
List of values that IssuingTransactionPurchaseDetailsFuelType can take
type IssuingTransactionPurchaseDetailsFuelUnit ¶
type IssuingTransactionPurchaseDetailsFuelUnit string
The units for `volume_decimal`. One of `us_gallon` or `liter`.
const ( IssuingTransactionPurchaseDetailsFuelUnitLiter IssuingTransactionPurchaseDetailsFuelUnit = "liter" IssuingTransactionPurchaseDetailsFuelUnitUSGallon IssuingTransactionPurchaseDetailsFuelUnit = "us_gallon" )
List of values that IssuingTransactionPurchaseDetailsFuelUnit can take
type IssuingTransactionPurchaseDetailsLodging ¶
type IssuingTransactionPurchaseDetailsLodging struct { // The time of checking into the lodging. CheckInAt int64 `json:"check_in_at"` // The number of nights stayed at the lodging. Nights int64 `json:"nights"` }
Information about lodging that was purchased with this transaction.
type IssuingTransactionPurchaseDetailsReceipt ¶
type IssuingTransactionPurchaseDetailsReceipt struct { // The description of the item. The maximum length of this field is 26 characters. Description string `json:"description"` // The quantity of the item. Quantity float64 `json:"quantity"` // The total for this line item in cents. Total int64 `json:"total"` // The unit cost of the item in cents. UnitCost int64 `json:"unit_cost"` }
The line items in the purchase.
type IssuingTransactionTreasury ¶
type IssuingTransactionTreasury struct { // The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund ReceivedCredit string `json:"received_credit"` // The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture ReceivedDebit string `json:"received_debit"` }
[Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
type IssuingTransactionType ¶
type IssuingTransactionType string
The nature of the transaction.
const ( IssuingTransactionTypeCapture IssuingTransactionType = "capture" IssuingTransactionTypeRefund IssuingTransactionType = "refund" )
List of values that IssuingTransactionType can take
type IssuingTransactionWallet ¶
type IssuingTransactionWallet string
The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.
const ( IssuingTransactionWalletApplePay IssuingTransactionWallet = "apple_pay" IssuingTransactionWalletGooglePay IssuingTransactionWallet = "google_pay" IssuingTransactionWalletSamsungPay IssuingTransactionWallet = "samsung_pay" )
List of values that IssuingTransactionWallet can take
type Iter ¶
type Iter struct {
// contains filtered or unexported fields
}
Iter provides a convenient interface for iterating over the elements returned from paginated list API calls. Successive calls to the Next method will step through each item in the list, fetching pages of items as needed. Iterators are not thread-safe, so they should not be consumed across multiple goroutines.
func GetIter ¶
func GetIter(container ListParamsContainer, query Query) *Iter
GetIter returns a new Iter for a given query and its options.
func (*Iter) Current ¶
func (it *Iter) Current() interface{}
Current returns the most recent item visited by a call to Next.
func (*Iter) Err ¶
Err returns the error, if any, that caused the Iter to stop. It must be inspected after Next returns false.
func (*Iter) List ¶
func (it *Iter) List() ListContainer
List returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.
type LastResponseSetter ¶
type LastResponseSetter interface {
SetLastResponse(response *APIResponse)
}
LastResponseSetter defines a type that contains an HTTP response from a Stripe API endpoint.
type Level ¶
type Level uint32
Level represents a logging level.
const ( // LevelNull sets a logger to show no messages at all. LevelNull Level = 0 // LevelError sets a logger to show error messages only. LevelError Level = 1 // LevelWarn sets a logger to show warning messages or anything more // severe. LevelWarn Level = 2 // LevelInfo sets a logger to show informational messages or anything more // severe. LevelInfo Level = 3 // LevelDebug sets a logger to show informational messages or anything more // severe. LevelDebug Level = 4 )
type LeveledLogger ¶
type LeveledLogger struct { // Level is the minimum logging level that will be emitted by this logger. // // For example, a Level set to LevelWarn will emit warnings and errors, but // not informational or debug messages. // // Always set this with a constant like LevelWarn because the individual // values are not guaranteed to be stable. Level Level // contains filtered or unexported fields }
LeveledLogger is a leveled logger implementation.
It prints warnings and errors to `os.Stderr` and other messages to `os.Stdout`.
func (*LeveledLogger) Debugf ¶
func (l *LeveledLogger) Debugf(format string, v ...interface{})
Debugf logs a debug message using Printf conventions.
func (*LeveledLogger) Errorf ¶
func (l *LeveledLogger) Errorf(format string, v ...interface{})
Errorf logs a warning message using Printf conventions.
func (*LeveledLogger) Infof ¶
func (l *LeveledLogger) Infof(format string, v ...interface{})
Infof logs an informational message using Printf conventions.
func (*LeveledLogger) Warnf ¶
func (l *LeveledLogger) Warnf(format string, v ...interface{})
Warnf logs a warning message using Printf conventions.
type LeveledLoggerInterface ¶
type LeveledLoggerInterface interface { // Debugf logs a debug message using Printf conventions. Debugf(format string, v ...interface{}) // Errorf logs a warning message using Printf conventions. Errorf(format string, v ...interface{}) // Infof logs an informational message using Printf conventions. Infof(format string, v ...interface{}) // Warnf logs a warning message using Printf conventions. Warnf(format string, v ...interface{}) }
LeveledLoggerInterface provides a basic leveled logging interface for printing debug, informational, warning, and error messages.
It's implemented by LeveledLogger and also provides out-of-the-box compatibility with a Logrus Logger, but may require a thin shim for use with other logging libraries that you use less standard conventions like Zap.
var DefaultLeveledLogger LeveledLoggerInterface = &LeveledLogger{ Level: LevelError, }
DefaultLeveledLogger is the default logger that the library will use to log errors, warnings, and informational messages.
LeveledLoggerInterface is implemented by LeveledLogger, and one can be initialized at the desired level of logging. LeveledLoggerInterface also provides out-of-the-box compatibility with a Logrus Logger, but may require a thin shim for use with other logging libraries that use less standard conventions like Zap.
This Logger will be inherited by any backends created by default, but will be overridden if a backend is created with GetBackendWithConfig with a custom LeveledLogger set.
type LineItem ¶
type LineItem struct { // Total discount amount applied. If no discounts were applied, defaults to 0. AmountDiscount int64 `json:"amount_discount"` // Total before any discounts or taxes are applied. AmountSubtotal int64 `json:"amount_subtotal"` // Total tax amount applied. If no tax was applied, defaults to 0. AmountTax int64 `json:"amount_tax"` // Total after discounts and taxes. AmountTotal int64 `json:"amount_total"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. Description string `json:"description"` // The discounts applied to the line item. Discounts []*LineItemDiscount `json:"discounts"` // Unique identifier for the object. ID string `json:"id"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The price used to generate the line item. Price *Price `json:"price"` // The quantity of products being purchased. Quantity int64 `json:"quantity"` // The taxes applied to the line item. Taxes []*LineItemTax `json:"taxes"` }
A line item.
type LineItemDiscount ¶
type LineItemDiscount struct { // The amount discounted. Amount int64 `json:"amount"` // A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). // It contains information about when the discount began, when it will end, and what it is applied to. // // Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) Discount *Discount `json:"discount"` }
The discounts applied to the line item.
type LineItemList ¶
type LineItemList struct { APIResource ListMeta Data []*LineItem `json:"data"` }
LineItemList is a list of LineItems as retrieved from a list endpoint.
type LineItemTax ¶
type LineItemTax struct { // Amount of tax applied for this rate. Amount int64 `json:"amount"` // Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. // // Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason LineItemTaxTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` }
The taxes applied to the line item.
type LineItemTaxTaxabilityReason ¶
type LineItemTaxTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( LineItemTaxTaxabilityReasonCustomerExempt LineItemTaxTaxabilityReason = "customer_exempt" LineItemTaxTaxabilityReasonNotCollecting LineItemTaxTaxabilityReason = "not_collecting" LineItemTaxTaxabilityReasonNotSubjectToTax LineItemTaxTaxabilityReason = "not_subject_to_tax" LineItemTaxTaxabilityReasonNotSupported LineItemTaxTaxabilityReason = "not_supported" LineItemTaxTaxabilityReasonPortionProductExempt LineItemTaxTaxabilityReason = "portion_product_exempt" LineItemTaxTaxabilityReasonPortionReducedRated LineItemTaxTaxabilityReason = "portion_reduced_rated" LineItemTaxTaxabilityReasonPortionStandardRated LineItemTaxTaxabilityReason = "portion_standard_rated" LineItemTaxTaxabilityReasonProductExempt LineItemTaxTaxabilityReason = "product_exempt" LineItemTaxTaxabilityReasonProductExemptHoliday LineItemTaxTaxabilityReason = "product_exempt_holiday" LineItemTaxTaxabilityReasonProportionallyRated LineItemTaxTaxabilityReason = "proportionally_rated" LineItemTaxTaxabilityReasonReducedRated LineItemTaxTaxabilityReason = "reduced_rated" LineItemTaxTaxabilityReasonReverseCharge LineItemTaxTaxabilityReason = "reverse_charge" LineItemTaxTaxabilityReasonStandardRated LineItemTaxTaxabilityReason = "standard_rated" LineItemTaxTaxabilityReasonTaxableBasisReduced LineItemTaxTaxabilityReason = "taxable_basis_reduced" LineItemTaxTaxabilityReasonZeroRated LineItemTaxTaxabilityReason = "zero_rated" )
List of values that LineItemTaxTaxabilityReason can take
type ListContainer ¶
type ListContainer interface {
GetListMeta() *ListMeta
}
ListContainer is a general interface for which all list object structs should comply. They achieve this by embedding a ListMeta struct and inheriting its implementation of this interface.
type ListMeta ¶
type ListMeta struct { HasMore bool `json:"has_more"` URL string `json:"url"` // TotalCount is the total number of objects in the collection (beyond just // on the current page). This is not returned in most list calls. // // Deprecated: TotalCount is only included in some legacy situations and // not generally available anymore. TotalCount uint32 `json:"total_count"` }
ListMeta is the structure that contains the common properties of List iterators. The Count property is only populated if the total_count include option is passed in (see tests for example).
func (*ListMeta) GetListMeta ¶
GetListMeta returns a ListMeta struct (itself). It exists because any structs that embed ListMeta will inherit it, and thus implement the ListContainer interface.
type ListParams ¶
type ListParams struct { // Context used for request. It may carry deadlines, cancelation signals, // and other request-scoped values across API boundaries and between // processes. // // Note that a cancelled or timed out context does not provide any // guarantee whether the operation was or was not completed on Stripe's API // servers. For certainty, you must either retry with the same idempotency // key or query the state of the API. Context context.Context `form:"-"` EndingBefore *string `form:"ending_before"` // Deprecated: Please use Expand in the surrounding struct instead. Expand []*string `form:"expand"` Filters Filters `form:"*"` Limit *int64 `form:"limit"` // Single specifies whether this is a single page iterator. By default, // listing through an iterator will automatically grab additional pages as // the query progresses. To change this behavior and just load a single // page, set this to true. Single bool `form:"-"` // Not an API parameter StartingAfter *string `form:"starting_after"` // StripeAccount may contain the ID of a connected account. By including // this field, the request is made as if it originated from the connected // account instead of under the account of the owner of the configured // Stripe key. StripeAccount *string `form:"-"` // Passed as header }
ListParams is the structure that contains the common properties of any *ListParams structure.
func (*ListParams) AddExpand ¶
func (p *ListParams) AddExpand(f string)
AddExpand on the embedded ListParams struct is deprecated. Deprecated: please use AddExpand on the surrounding struct instead.
func (*ListParams) GetListParams ¶
func (p *ListParams) GetListParams() *ListParams
GetListParams returns a ListParams struct (itself). It exists because any structs that embed ListParams will inherit it, and thus implement the ListParamsContainer interface.
func (*ListParams) GetParams ¶
func (p *ListParams) GetParams() *Params
GetParams returns ListParams as a Params struct. It exists because any structs that embed Params will inherit it, and thus implement the ParamsContainer interface.
func (*ListParams) SetStripeAccount ¶
func (p *ListParams) SetStripeAccount(val string)
SetStripeAccount sets a value for the Stripe-Account header.
func (*ListParams) ToParams ¶
func (p *ListParams) ToParams() *Params
ToParams converts a ListParams to a Params by moving over any fields that have valid targets in the new type. This is useful because fields in Params can be injected directly into an http.Request while generally ListParams is only used to build a set of parameters.
type ListParamsContainer ¶
type ListParamsContainer interface {
GetListParams() *ListParams
}
ListParamsContainer is a general interface for which all list parameter structs should comply. They achieve this by embedding a ListParams struct and inheriting its implementation of this interface.
type LoginLink ¶
type LoginLink struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The URL for the login link. URL string `json:"url"` }
Login Links are single-use login link for an Express account to access their Stripe dashboard.
type LoginLinkParams ¶
type LoginLinkParams struct { Params `form:"*"` Account *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Creates a single-use login link for an Express account to access their Stripe dashboard.
You may only create login links for [Express accounts](https://stripe.com/docs/connect/express-accounts) connected to your platform.
func (*LoginLinkParams) AddExpand ¶
func (p *LoginLinkParams) AddExpand(f string)
AddExpand appends a new field to expand.
type Mandate ¶
type Mandate struct { APIResource CustomerAcceptance *MandateCustomerAcceptance `json:"customer_acceptance"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` MultiUse *MandateMultiUse `json:"multi_use"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The account (if any) that the mandate is intended for. OnBehalfOf string `json:"on_behalf_of"` // ID of the payment method associated with this mandate. PaymentMethod *PaymentMethod `json:"payment_method"` PaymentMethodDetails *MandatePaymentMethodDetails `json:"payment_method_details"` SingleUse *MandateSingleUse `json:"single_use"` // The mandate status indicates whether or not you can use it to initiate a payment. Status MandateStatus `json:"status"` // The type of the mandate. Type MandateType `json:"type"` }
A Mandate is a record of the permission that your customer gives you to debit their payment method.
func (*Mandate) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Mandate. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type MandateCustomerAcceptance ¶
type MandateCustomerAcceptance struct { // The time that the customer accepts the mandate. AcceptedAt int64 `json:"accepted_at"` Offline *MandateCustomerAcceptanceOffline `json:"offline"` Online *MandateCustomerAcceptanceOnline `json:"online"` // The mandate includes the type of customer acceptance information, such as: `online` or `offline`. Type MandateCustomerAcceptanceType `json:"type"` }
type MandateCustomerAcceptanceOffline ¶
type MandateCustomerAcceptanceOffline struct{}
type MandateCustomerAcceptanceType ¶
type MandateCustomerAcceptanceType string
The mandate includes the type of customer acceptance information, such as: `online` or `offline`.
const ( MandateCustomerAcceptanceTypeOffline MandateCustomerAcceptanceType = "offline" MandateCustomerAcceptanceTypeOnline MandateCustomerAcceptanceType = "online" )
List of values that MandateCustomerAcceptanceType can take
type MandateMultiUse ¶
type MandateMultiUse struct{}
type MandateParams ¶
type MandateParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves a Mandate object.
func (*MandateParams) AddExpand ¶
func (p *MandateParams) AddExpand(f string)
AddExpand appends a new field to expand.
type MandatePaymentMethodDetails ¶
type MandatePaymentMethodDetails struct { ACSSDebit *MandatePaymentMethodDetailsACSSDebit `json:"acss_debit"` AUBECSDebit *MandatePaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"` BACSDebit *MandatePaymentMethodDetailsBACSDebit `json:"bacs_debit"` Card *MandatePaymentMethodDetailsCard `json:"card"` CashApp *MandatePaymentMethodDetailsCashApp `json:"cashapp"` Link *MandatePaymentMethodDetailsLink `json:"link"` Paypal *MandatePaymentMethodDetailsPaypal `json:"paypal"` SEPADebit *MandatePaymentMethodDetailsSEPADebit `json:"sepa_debit"` // This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. Type MandatePaymentMethodDetailsType `json:"type"` USBankAccount *MandatePaymentMethodDetailsUSBankAccount `json:"us_bank_account"` }
type MandatePaymentMethodDetailsACSSDebit ¶
type MandatePaymentMethodDetailsACSSDebit struct { // List of Stripe products where this mandate can be selected automatically. DefaultFor []MandatePaymentMethodDetailsACSSDebitDefaultFor `json:"default_for"` // Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. IntervalDescription string `json:"interval_description"` // Payment schedule for the mandate. PaymentSchedule MandatePaymentMethodDetailsACSSDebitPaymentSchedule `json:"payment_schedule"` // Transaction type of the mandate. TransactionType MandatePaymentMethodDetailsACSSDebitTransactionType `json:"transaction_type"` }
type MandatePaymentMethodDetailsACSSDebitDefaultFor ¶
type MandatePaymentMethodDetailsACSSDebitDefaultFor string
List of Stripe products where this mandate can be selected automatically.
const ( MandatePaymentMethodDetailsACSSDebitDefaultForInvoice MandatePaymentMethodDetailsACSSDebitDefaultFor = "invoice" MandatePaymentMethodDetailsACSSDebitDefaultForSubscription MandatePaymentMethodDetailsACSSDebitDefaultFor = "subscription" )
List of values that MandatePaymentMethodDetailsACSSDebitDefaultFor can take
type MandatePaymentMethodDetailsACSSDebitPaymentSchedule ¶
type MandatePaymentMethodDetailsACSSDebitPaymentSchedule string
Payment schedule for the mandate.
const ( MandatePaymentMethodDetailsACSSDebitPaymentScheduleCombined MandatePaymentMethodDetailsACSSDebitPaymentSchedule = "combined" MandatePaymentMethodDetailsACSSDebitPaymentScheduleInterval MandatePaymentMethodDetailsACSSDebitPaymentSchedule = "interval" MandatePaymentMethodDetailsACSSDebitPaymentScheduleSporadic MandatePaymentMethodDetailsACSSDebitPaymentSchedule = "sporadic" )
List of values that MandatePaymentMethodDetailsACSSDebitPaymentSchedule can take
type MandatePaymentMethodDetailsACSSDebitTransactionType ¶
type MandatePaymentMethodDetailsACSSDebitTransactionType string
Transaction type of the mandate.
const ( MandatePaymentMethodDetailsACSSDebitTransactionTypeBusiness MandatePaymentMethodDetailsACSSDebitTransactionType = "business" MandatePaymentMethodDetailsACSSDebitTransactionTypePersonal MandatePaymentMethodDetailsACSSDebitTransactionType = "personal" )
List of values that MandatePaymentMethodDetailsACSSDebitTransactionType can take
type MandatePaymentMethodDetailsAUBECSDebit ¶
type MandatePaymentMethodDetailsAUBECSDebit struct { // The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. URL string `json:"url"` }
type MandatePaymentMethodDetailsBACSDebit ¶
type MandatePaymentMethodDetailsBACSDebit struct { // The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. NetworkStatus MandatePaymentMethodDetailsBACSDebitNetworkStatus `json:"network_status"` // The unique reference identifying the mandate on the Bacs network. Reference string `json:"reference"` // The URL that will contain the mandate that the customer has signed. URL string `json:"url"` }
type MandatePaymentMethodDetailsBACSDebitNetworkStatus ¶
type MandatePaymentMethodDetailsBACSDebitNetworkStatus string
The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.
const ( MandatePaymentMethodDetailsBACSDebitNetworkStatusAccepted MandatePaymentMethodDetailsBACSDebitNetworkStatus = "accepted" MandatePaymentMethodDetailsBACSDebitNetworkStatusPending MandatePaymentMethodDetailsBACSDebitNetworkStatus = "pending" MandatePaymentMethodDetailsBACSDebitNetworkStatusRefused MandatePaymentMethodDetailsBACSDebitNetworkStatus = "refused" MandatePaymentMethodDetailsBACSDebitNetworkStatusRevoked MandatePaymentMethodDetailsBACSDebitNetworkStatus = "revoked" )
List of values that MandatePaymentMethodDetailsBACSDebitNetworkStatus can take
type MandatePaymentMethodDetailsCard ¶
type MandatePaymentMethodDetailsCard struct{}
type MandatePaymentMethodDetailsCashApp ¶
type MandatePaymentMethodDetailsCashApp struct{}
type MandatePaymentMethodDetailsLink ¶
type MandatePaymentMethodDetailsLink struct{}
type MandatePaymentMethodDetailsPaypal ¶
type MandatePaymentMethodDetailsPaypal struct { // The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. BillingAgreementID string `json:"billing_agreement_id"` // PayPal account PayerID. This identifier uniquely identifies the PayPal customer. PayerID string `json:"payer_id"` }
type MandatePaymentMethodDetailsType ¶
type MandatePaymentMethodDetailsType string
This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method.
const ( MandatePaymentMethodDetailsTypeACSSDebit MandatePaymentMethodDetailsType = "acss_debit" MandatePaymentMethodDetailsTypeAUBECSDebit MandatePaymentMethodDetailsType = "au_becs_debit" MandatePaymentMethodDetailsTypeBACSDebit MandatePaymentMethodDetailsType = "bacs_debit" MandatePaymentMethodDetailsTypeBLIK MandatePaymentMethodDetailsType = "blik" MandatePaymentMethodDetailsTypeCard MandatePaymentMethodDetailsType = "card" MandatePaymentMethodDetailsTypeLink MandatePaymentMethodDetailsType = "link" MandatePaymentMethodDetailsTypeSEPADebit MandatePaymentMethodDetailsType = "sepa_debit" MandatePaymentMethodDetailsTypeUSBankAccount MandatePaymentMethodDetailsType = "us_bank_account" )
List of values that MandatePaymentMethodDetailsType can take
type MandatePaymentMethodDetailsUSBankAccount ¶
type MandatePaymentMethodDetailsUSBankAccount struct{}
type MandateSingleUse ¶
type MandateStatus ¶
type MandateStatus string
The mandate status indicates whether or not you can use it to initiate a payment.
const ( MandateStatusActive MandateStatus = "active" MandateStatusInactive MandateStatus = "inactive" MandateStatusPending MandateStatus = "pending" )
List of values that MandateStatus can take
type MandateType ¶
type MandateType string
The type of the mandate.
const ( MandateTypeMultiUse MandateType = "multi_use" MandateTypeSingleUse MandateType = "single_use" )
List of values that MandateType can take
type OAuthScopeType ¶
type OAuthScopeType string
OAuthScopeType is the type of OAuth scope.
const ( OAuthScopeTypeReadOnly OAuthScopeType = "read_only" OAuthScopeTypeReadWrite OAuthScopeType = "read_write" )
List of possible values for OAuth scopes.
type OAuthStripeUserBusinessType ¶
type OAuthStripeUserBusinessType string
OAuthStripeUserBusinessType is the business type for the Stripe oauth user.
const ( OAuthStripeUserBusinessTypeCorporation OAuthStripeUserBusinessType = "corporation" OAuthStripeUserBusinessTypeLLC OAuthStripeUserBusinessType = "llc" OAuthStripeUserBusinessTypeNonProfit OAuthStripeUserBusinessType = "non_profit" OAuthStripeUserBusinessTypePartnership OAuthStripeUserBusinessType = "partnership" OAuthStripeUserBusinessTypeSoleProp OAuthStripeUserBusinessType = "sole_prop" )
List of supported values for business type.
type OAuthStripeUserGender ¶
type OAuthStripeUserGender string
OAuthStripeUserGender of the person who will be filling out a Stripe application. (International regulations require either male or female.)
const ( OAuthStripeUserGenderFemale OAuthStripeUserGender = "female" OAuthStripeUserGenderMale OAuthStripeUserGender = "male" )
The gender of the person who will be filling out a Stripe application. (International regulations require either male or female.)
type OAuthStripeUserParams ¶
type OAuthStripeUserParams struct { BlockKana *string `form:"block_kana"` BlockKanji *string `form:"block_kanji"` BuildingKana *string `form:"building_kana"` BuildingKanji *string `form:"building_kanji"` BusinessName *string `form:"business_name"` BusinessType *string `form:"business_type"` City *string `form:"city"` Country *string `form:"country"` Currency *string `form:"currency"` DOBDay *int64 `form:"dob_day"` DOBMonth *int64 `form:"dob_month"` DOBYear *int64 `form:"dob_year"` Email *string `form:"email"` FirstName *string `form:"first_name"` FirstNameKana *string `form:"first_name_kana"` FirstNameKanji *string `form:"first_name_kanji"` Gender *string `form:"gender"` LastName *string `form:"last_name"` LastNameKana *string `form:"last_name_kana"` LastNameKanji *string `form:"last_name_kanji"` PhoneNumber *string `form:"phone_number"` PhysicalProduct *bool `form:"physical_product"` ProductDescription *string `form:"product_description"` State *string `form:"state"` StreetAddress *string `form:"street_address"` URL *string `form:"url"` Zip *string `form:"zip"` }
OAuthStripeUserParams for the stripe_user OAuth Authorize params.
type OAuthToken ¶
type OAuthToken struct { APIResource Livemode bool `json:"livemode"` Scope OAuthScopeType `json:"scope"` StripeUserID string `json:"stripe_user_id"` TokenType OAuthTokenType `json:"token_type"` // Deprecated, please use StripeUserID AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` StripePublishableKey string `json:"stripe_publishable_key"` }
OAuthToken is the value of the OAuthToken from OAuth flow. https://stripe.com/docs/connect/oauth-reference#post-token
type OAuthTokenParams ¶
type OAuthTokenParams struct { Params `form:"*"` AssertCapabilities []*string `form:"assert_capabilities"` ClientSecret *string `form:"client_secret"` Code *string `form:"code"` GrantType *string `form:"grant_type"` RefreshToken *string `form:"refresh_token"` Scope *string `form:"scope"` }
OAuthTokenParams is the set of paramaters that can be used to request OAuthTokens.
type OAuthTokenType ¶
type OAuthTokenType string
OAuthTokenType is the type of token. This will always be "bearer."
const (
OAuthTokenTypeBearer OAuthTokenType = "bearer"
)
List of possible OAuthTokenType values.
type Params ¶
type Params struct { // Context used for request. It may carry deadlines, cancelation signals, // and other request-scoped values across API boundaries and between // processes. // // Note that a cancelled or timed out context does not provide any // guarantee whether the operation was or was not completed on Stripe's API // servers. For certainty, you must either retry with the same idempotency // key or query the state of the API. Context context.Context `form:"-"` // Deprecated: please use Expand in the surrounding struct instead. Expand []*string `form:"expand"` Extra *ExtraValues `form:"*"` // Headers may be used to provide extra header lines on the HTTP request. Headers http.Header `form:"-"` IdempotencyKey *string `form:"-"` // Passed as header // Deprecated: Please use Metadata in the surrounding struct instead. Metadata map[string]string `form:"metadata"` // StripeAccount may contain the ID of a connected account. By including // this field, the request is made as if it originated from the connected // account instead of under the account of the owner of the configured // Stripe key. StripeAccount *string `form:"-"` // Passed as header }
Params is the structure that contains the common properties of any *Params structure.
func (*Params) AddExpand ¶
AddExpand on the Params embedded struct is deprecated. Deprecated: please use Expand in the surrounding struct instead.
func (*Params) AddMetadata ¶
AddMetadata on the Params embedded struct is deprecated. Deprecated: please use .AddMetadata of the surrounding struct.
func (*Params) GetParams ¶
GetParams returns a Params struct (itself). It exists because any structs that embed Params will inherit it, and thus implement the ParamsContainer interface.
func (*Params) SetIdempotencyKey ¶
SetIdempotencyKey sets a value for the Idempotency-Key header.
func (*Params) SetStripeAccount ¶
SetStripeAccount sets a value for the Stripe-Account header.
type ParamsContainer ¶
type ParamsContainer interface {
GetParams() *Params
}
ParamsContainer is a general interface for which all parameter structs should comply. They achieve this by embedding a Params struct and inheriting its implementation of this interface.
type PaymentIntent ¶
type PaymentIntent struct { APIResource // Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/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://stripe.com/docs/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 int64 `json:"amount"` // Amount that can be captured from this PaymentIntent. AmountCapturable int64 `json:"amount_capturable"` AmountDetails *PaymentIntentAmountDetails `json:"amount_details"` // Amount that this PaymentIntent collects. AmountReceived int64 `json:"amount_received"` // ID of the Connect application that created the PaymentIntent. Application *Application `json:"application"` // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). ApplicationFeeAmount int64 `json:"application_fee_amount"` // Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) AutomaticPaymentMethods *PaymentIntentAutomaticPaymentMethods `json:"automatic_payment_methods"` // Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. CanceledAt int64 `json:"canceled_at"` // Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). CancellationReason PaymentIntentCancellationReason `json:"cancellation_reason"` // Controls when the funds will be captured from the customer's account. CaptureMethod PaymentIntentCaptureMethod `json:"capture_method"` // The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. // // The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. // // Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. ClientSecret string `json:"client_secret"` ConfirmationMethod PaymentIntentConfirmationMethod `json:"confirmation_method"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // ID of the Customer this PaymentIntent belongs to, if one exists. // // Payment methods attached to other Customers cannot be used with this PaymentIntent. // // If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. Customer *Customer `json:"customer"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // Unique identifier for the object. ID string `json:"id"` // ID of the invoice that created this PaymentIntent, if it exists. Invoice *Invoice `json:"invoice"` // The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. LastPaymentError *Error `json:"last_payment_error"` // The latest charge created by this PaymentIntent. LatestCharge *Charge `json:"latest_charge"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). Metadata map[string]string `json:"metadata"` // If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. NextAction *PaymentIntentNextAction `json:"next_action"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. OnBehalfOf *Account `json:"on_behalf_of"` // ID of the payment method used in this PaymentIntent. PaymentMethod *PaymentMethod `json:"payment_method"` // Information about the payment method configuration used for this PaymentIntent. PaymentMethodConfigurationDetails *PaymentIntentPaymentMethodConfigurationDetails `json:"payment_method_configuration_details"` // Payment-method-specific configuration for this PaymentIntent. PaymentMethodOptions *PaymentIntentPaymentMethodOptions `json:"payment_method_options"` // The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. PaymentMethodTypes []string `json:"payment_method_types"` // If present, this property tells you about the processing state of the payment. Processing *PaymentIntentProcessing `json:"processing"` // Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). ReceiptEmail string `json:"receipt_email"` // ID of the review associated with this PaymentIntent, if any. Review *Review `json:"review"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentSetupFutureUsage `json:"setup_future_usage"` // Shipping information for this PaymentIntent. Shipping *ShippingDetails `json:"shipping"` // This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. Source *PaymentSource `json:"source"` // For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. StatementDescriptor string `json:"statement_descriptor"` // Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. StatementDescriptorSuffix string `json:"statement_descriptor_suffix"` // Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). Status PaymentIntentStatus `json:"status"` // The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). TransferData *PaymentIntentTransferData `json:"transfer_data"` // A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). TransferGroup string `json:"transfer_group"` }
A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.
A PaymentIntent transitions through [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge.
Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
func (*PaymentIntent) UnmarshalJSON ¶
func (p *PaymentIntent) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a PaymentIntent. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type PaymentIntentAmountDetails ¶
type PaymentIntentAmountDetails struct {
Tip *PaymentIntentAmountDetailsTip `json:"tip"`
}
type PaymentIntentAmountDetailsTip ¶
type PaymentIntentAmountDetailsTip struct { // Portion of the amount that corresponds to a tip. Amount int64 `json:"amount"` }
type PaymentIntentApplyCustomerBalanceParams ¶
type PaymentIntentApplyCustomerBalanceParams struct { Params `form:"*"` // Amount that you intend to apply to this PaymentIntent from the customer's cash balance. // // A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). // // The maximum amount is the amount of the PaymentIntent. // // When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. Amount *int64 `form:"amount"` // 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 `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Manually reconcile the remaining amount for a customer_balance PaymentIntent.
func (*PaymentIntentApplyCustomerBalanceParams) AddExpand ¶
func (p *PaymentIntentApplyCustomerBalanceParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentIntentAutomaticPaymentMethods ¶
type PaymentIntentAutomaticPaymentMethods struct { // Controls whether this PaymentIntent will accept redirect-based payment methods. // // Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. AllowRedirects PaymentIntentAutomaticPaymentMethodsAllowRedirects `json:"allow_redirects"` // Automatically calculates compatible payment methods Enabled bool `json:"enabled"` }
Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)
type PaymentIntentAutomaticPaymentMethodsAllowRedirects ¶
type PaymentIntentAutomaticPaymentMethodsAllowRedirects string
Controls whether this PaymentIntent will accept redirect-based payment methods.
Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
const ( PaymentIntentAutomaticPaymentMethodsAllowRedirectsAlways PaymentIntentAutomaticPaymentMethodsAllowRedirects = "always" PaymentIntentAutomaticPaymentMethodsAllowRedirectsNever PaymentIntentAutomaticPaymentMethodsAllowRedirects = "never" )
List of values that PaymentIntentAutomaticPaymentMethodsAllowRedirects can take
type PaymentIntentAutomaticPaymentMethodsParams ¶
type PaymentIntentAutomaticPaymentMethodsParams struct { // Controls whether this PaymentIntent will accept redirect-based payment methods. // // Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. AllowRedirects *string `form:"allow_redirects"` // Whether this feature is enabled. Enabled *bool `form:"enabled"` }
When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.
type PaymentIntentCancelParams ¶
type PaymentIntentCancelParams struct { Params `form:"*"` // Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` CancellationReason *string `form:"cancellation_reason"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing.
After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded.
You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
func (*PaymentIntentCancelParams) AddExpand ¶
func (p *PaymentIntentCancelParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentIntentCancellationReason ¶
type PaymentIntentCancellationReason string
Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).
const ( PaymentIntentCancellationReasonAbandoned PaymentIntentCancellationReason = "abandoned" PaymentIntentCancellationReasonAutomatic PaymentIntentCancellationReason = "automatic" PaymentIntentCancellationReasonDuplicate PaymentIntentCancellationReason = "duplicate" PaymentIntentCancellationReasonFailedInvoice PaymentIntentCancellationReason = "failed_invoice" PaymentIntentCancellationReasonFraudulent PaymentIntentCancellationReason = "fraudulent" PaymentIntentCancellationReasonRequestedByCustomer PaymentIntentCancellationReason = "requested_by_customer" PaymentIntentCancellationReasonVoidInvoice PaymentIntentCancellationReason = "void_invoice" )
List of values that PaymentIntentCancellationReason can take
type PaymentIntentCaptureMethod ¶
type PaymentIntentCaptureMethod string
Controls when the funds will be captured from the customer's account.
const ( PaymentIntentCaptureMethodAutomatic PaymentIntentCaptureMethod = "automatic" PaymentIntentCaptureMethodAutomaticAsync PaymentIntentCaptureMethod = "automatic_async" PaymentIntentCaptureMethodManual PaymentIntentCaptureMethod = "manual" )
List of values that PaymentIntentCaptureMethod can take
type PaymentIntentCaptureParams ¶
type PaymentIntentCaptureParams struct { Params `form:"*"` // The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount is automatically refunded. Defaults to the full `amount_capturable` if it's not provided. AmountToCapture *int64 `form:"amount_to_capture"` // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). ApplicationFeeAmount *int64 `form:"application_fee_amount"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. FinalCapture *bool `form:"final_capture"` // 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`. Metadata map[string]string `form:"metadata"` // For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. StatementDescriptor *string `form:"statement_descriptor"` // Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. The concatenated descriptor must be 1-22 characters long. StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` // The parameters that you can use to automatically create a transfer after the payment // is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). TransferData *PaymentIntentTransferDataParams `form:"transfer_data"` }
Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.
Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later).
func (*PaymentIntentCaptureParams) AddExpand ¶
func (p *PaymentIntentCaptureParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PaymentIntentCaptureParams) AddMetadata ¶
func (p *PaymentIntentCaptureParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PaymentIntentConfirmParams ¶
type PaymentIntentConfirmParams struct { Params `form:"*"` // Controls when the funds will be captured from the customer's account. CaptureMethod *string `form:"capture_method"` // Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). ErrorOnRequiresAction *bool `form:"error_on_requires_action"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // ID of the mandate that's used for this payment. Mandate *string `form:"mandate"` MandateData *PaymentIntentMandateDataParams `form:"mandate_data"` // Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). OffSession *bool `form:"off_session"` // ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. PaymentMethod *string `form:"payment_method"` // If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear // in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) // property on the PaymentIntent. PaymentMethodData *PaymentIntentPaymentMethodDataParams `form:"payment_method_data"` // Payment method-specific configuration for this PaymentIntent. PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"` // Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). RadarOptions *PaymentIntentConfirmRadarOptionsParams `form:"radar_options"` // Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). ReceiptEmail *string `form:"receipt_email"` // The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. // If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. // This parameter is only used for cards and other redirect-based payment methods. ReturnURL *string `form:"return_url"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` // Shipping information for this PaymentIntent. Shipping *ShippingDetailsParams `form:"shipping"` // Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. UseStripeSDK *bool `form:"use_stripe_sdk"` }
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment. If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the requires_action status and suggest additional actions via next_action. If payment fails, the PaymentIntent transitions to the requires_payment_method status or the canceled status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to the succeeded status (or requires_capture, if capture_method is set to manual). If the confirmation_method is automatic, payment may be attempted using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment) and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret). After next_actions are handled by the client, no additional confirmation is required to complete the payment. If the confirmation_method is manual, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the requires_confirmation state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. Read the [expanded documentation](https://stripe.com/docs/payments/payment-intents/web-manual) to learn more about manual confirmation.
func (*PaymentIntentConfirmParams) AddExpand ¶
func (p *PaymentIntentConfirmParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentIntentConfirmRadarOptionsParams ¶
type PaymentIntentConfirmRadarOptionsParams struct { // 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. Session *string `form:"session"` }
Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
type PaymentIntentConfirmationMethod ¶
type PaymentIntentConfirmationMethod string
const ( PaymentIntentConfirmationMethodAutomatic PaymentIntentConfirmationMethod = "automatic" PaymentIntentConfirmationMethodManual PaymentIntentConfirmationMethod = "manual" )
List of values that PaymentIntentConfirmationMethod can take
type PaymentIntentIncrementAuthorizationParams ¶
type PaymentIntentIncrementAuthorizationParams struct { Params `form:"*"` // The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. Amount *int64 `form:"amount"` // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). ApplicationFeeAmount *int64 `form:"application_fee_amount"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. StatementDescriptor *string `form:"statement_descriptor"` // The parameters used to automatically create a transfer after the payment is captured. // Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). TransferData *PaymentIntentIncrementAuthorizationTransferDataParams `form:"transfer_data"` }
Perform an incremental authorization on an eligible PaymentIntent(https://stripe.com/docs/api/payment_intents/object). To be eligible, the PaymentIntent's status must be requires_capture and [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) must be true.
Incremental authorizations attempt to increase the authorized amount on your customer's card to the new, higher amount provided. Similar to the initial authorization, incremental authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to further increase the authorized amount.
If the incremental authorization succeeds, the PaymentIntent object returns with the updated [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount). If the incremental authorization fails, a [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains capturable for the previously authorized amount.
Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. After it's captured, a PaymentIntent can no longer be incremented.
Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations).
func (*PaymentIntentIncrementAuthorizationParams) AddExpand ¶
func (p *PaymentIntentIncrementAuthorizationParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PaymentIntentIncrementAuthorizationParams) AddMetadata ¶
func (p *PaymentIntentIncrementAuthorizationParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PaymentIntentIncrementAuthorizationTransferDataParams ¶
type PaymentIntentIncrementAuthorizationTransferDataParams struct { // The amount that will be transferred automatically when a charge succeeds. Amount *int64 `form:"amount"` }
The parameters used to automatically create a transfer after the payment is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
type PaymentIntentList ¶
type PaymentIntentList struct { APIResource ListMeta Data []*PaymentIntent `json:"data"` }
PaymentIntentList is a list of PaymentIntents as retrieved from a list endpoint.
type PaymentIntentListParams ¶
type PaymentIntentListParams struct { ListParams `form:"*"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. Created *int64 `form:"created"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. CreatedRange *RangeQueryParams `form:"created"` // Only return PaymentIntents for the customer that this customer ID specifies. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of PaymentIntents.
func (*PaymentIntentListParams) AddExpand ¶
func (p *PaymentIntentListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentIntentMandateDataCustomerAcceptanceOfflineParams ¶
type PaymentIntentMandateDataCustomerAcceptanceOfflineParams struct{}
If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
type PaymentIntentMandateDataCustomerAcceptanceOnlineParams ¶
type PaymentIntentMandateDataCustomerAcceptanceOnlineParams struct { // The IP address from which the Mandate was accepted by the customer. IPAddress *string `form:"ip_address"` // The user agent of the browser from which the Mandate was accepted by the customer. UserAgent *string `form:"user_agent"` }
If this is a Mandate accepted online, this hash contains details about the online acceptance.
type PaymentIntentMandateDataCustomerAcceptanceParams ¶
type PaymentIntentMandateDataCustomerAcceptanceParams struct { // The time at which the customer accepted the Mandate. AcceptedAt *int64 `form:"accepted_at"` // If this is a Mandate accepted offline, this hash contains details about the offline acceptance. Offline *PaymentIntentMandateDataCustomerAcceptanceOfflineParams `form:"offline"` // If this is a Mandate accepted online, this hash contains details about the online acceptance. Online *PaymentIntentMandateDataCustomerAcceptanceOnlineParams `form:"online"` // The type of customer acceptance information included with the Mandate. One of `online` or `offline`. Type *string `form:"type"` }
This hash contains details about the customer acceptance of the Mandate.
type PaymentIntentMandateDataParams ¶
type PaymentIntentMandateDataParams struct { // This hash contains details about the customer acceptance of the Mandate. CustomerAcceptance *PaymentIntentMandateDataCustomerAcceptanceParams `form:"customer_acceptance"` }
This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
type PaymentIntentNextAction ¶
type PaymentIntentNextAction struct { AlipayHandleRedirect *PaymentIntentNextActionAlipayHandleRedirect `json:"alipay_handle_redirect"` BoletoDisplayDetails *PaymentIntentNextActionBoletoDisplayDetails `json:"boleto_display_details"` CardAwaitNotification *PaymentIntentNextActionCardAwaitNotification `json:"card_await_notification"` CashAppHandleRedirectOrDisplayQRCode *PaymentIntentNextActionCashAppHandleRedirectOrDisplayQRCode `json:"cashapp_handle_redirect_or_display_qr_code"` DisplayBankTransferInstructions *PaymentIntentNextActionDisplayBankTransferInstructions `json:"display_bank_transfer_instructions"` KonbiniDisplayDetails *PaymentIntentNextActionKonbiniDisplayDetails `json:"konbini_display_details"` OXXODisplayDetails *PaymentIntentNextActionOXXODisplayDetails `json:"oxxo_display_details"` PayNowDisplayQRCode *PaymentIntentNextActionPayNowDisplayQRCode `json:"paynow_display_qr_code"` PixDisplayQRCode *PaymentIntentNextActionPixDisplayQRCode `json:"pix_display_qr_code"` PromptPayDisplayQRCode *PaymentIntentNextActionPromptPayDisplayQRCode `json:"promptpay_display_qr_code"` RedirectToURL *PaymentIntentNextActionRedirectToURL `json:"redirect_to_url"` // Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. Type PaymentIntentNextActionType `json:"type"` // When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. UseStripeSDK *PaymentIntentNextActionUseStripeSDK `json:"use_stripe_sdk"` VerifyWithMicrodeposits *PaymentIntentNextActionVerifyWithMicrodeposits `json:"verify_with_microdeposits"` WeChatPayDisplayQRCode *PaymentIntentNextActionWeChatPayDisplayQRCode `json:"wechat_pay_display_qr_code"` WeChatPayRedirectToAndroidApp *PaymentIntentNextActionWeChatPayRedirectToAndroidApp `json:"wechat_pay_redirect_to_android_app"` WeChatPayRedirectToIOSApp *PaymentIntentNextActionWeChatPayRedirectToIOSApp `json:"wechat_pay_redirect_to_ios_app"` }
If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
type PaymentIntentNextActionAlipayHandleRedirect ¶
type PaymentIntentNextActionAlipayHandleRedirect struct { // The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. NativeData string `json:"native_data"` // The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. NativeURL string `json:"native_url"` // If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. ReturnURL string `json:"return_url"` // The URL you must redirect your customer to in order to authenticate the payment. URL string `json:"url"` }
type PaymentIntentNextActionBoletoDisplayDetails ¶
type PaymentIntentNextActionBoletoDisplayDetails struct { // The timestamp after which the boleto expires. ExpiresAt int64 `json:"expires_at"` // The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. HostedVoucherURL string `json:"hosted_voucher_url"` // The boleto number. Number string `json:"number"` // The URL to the downloadable boleto voucher PDF. PDF string `json:"pdf"` }
type PaymentIntentNextActionCardAwaitNotification ¶
type PaymentIntentNextActionCardAwaitNotification struct { // The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. ChargeAttemptAt int64 `json:"charge_attempt_at"` // For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. CustomerApprovalRequired bool `json:"customer_approval_required"` }
type PaymentIntentNextActionCashAppHandleRedirectOrDisplayQRCode ¶
type PaymentIntentNextActionCashAppHandleRedirectOrDisplayQRCode struct { // The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. HostedInstructionsURL string `json:"hosted_instructions_url"` // The url for mobile redirect based auth MobileAuthURL string `json:"mobile_auth_url"` QRCode *PaymentIntentNextActionCashAppHandleRedirectOrDisplayQRCodeQRCode `json:"qr_code"` }
type PaymentIntentNextActionCashAppHandleRedirectOrDisplayQRCodeQRCode ¶
type PaymentIntentNextActionCashAppHandleRedirectOrDisplayQRCodeQRCode struct { // The date (unix timestamp) when the QR code expires. ExpiresAt int64 `json:"expires_at"` // The image_url_png string used to render QR code ImageURLPNG string `json:"image_url_png"` // The image_url_svg string used to render QR code ImageURLSVG string `json:"image_url_svg"` }
type PaymentIntentNextActionDisplayBankTransferInstructions ¶
type PaymentIntentNextActionDisplayBankTransferInstructions struct { // The remaining amount that needs to be transferred to complete the payment. AmountRemaining int64 `json:"amount_remaining"` // 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 Currency `json:"currency"` // A list of financial addresses that can be used to fund the customer balance FinancialAddresses []*PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress `json:"financial_addresses"` // A link to a hosted page that guides your customer through completing the transfer. HostedInstructionsURL string `json:"hosted_instructions_url"` // A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. Reference string `json:"reference"` // Type of bank transfer Type PaymentIntentNextActionDisplayBankTransferInstructionsType `json:"type"` }
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress ¶
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress struct { // Iban Records contain E.U. bank account details per the SEPA format. IBAN *PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIBAN `json:"iban"` // Sort Code Records contain U.K. bank account details per the sort code format. SortCode *PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode `json:"sort_code"` // SPEI Records contain Mexico bank account details per the SPEI format. Spei *PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei `json:"spei"` // The payment networks supported by this FinancialAddress SupportedNetworks []PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork `json:"supported_networks"` // The type of financial address Type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType `json:"type"` // Zengin Records contain Japan bank account details per the Zengin format. Zengin *PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin `json:"zengin"` }
A list of financial addresses that can be used to fund the customer balance
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIBAN ¶
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIBAN struct { // The name of the person or business that owns the bank account AccountHolderName string `json:"account_holder_name"` // The BIC/SWIFT code of the account. BIC string `json:"bic"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // The IBAN of the account. IBAN string `json:"iban"` }
Iban Records contain E.U. bank account details per the SEPA format.
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode ¶
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode struct { // The name of the person or business that owns the bank account AccountHolderName string `json:"account_holder_name"` // The account number AccountNumber string `json:"account_number"` // The six-digit sort code SortCode string `json:"sort_code"` }
Sort Code Records contain U.K. bank account details per the sort code format.
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei ¶
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei struct { // The three-digit bank code BankCode string `json:"bank_code"` // The short banking institution name BankName string `json:"bank_name"` // The CLABE number Clabe string `json:"clabe"` }
SPEI Records contain Mexico bank account details per the SPEI format.
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork ¶
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork string
The payment networks supported by this FinancialAddress
const ( PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetworkBACS PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork = "bacs" PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetworkFPS PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork = "fps" PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetworkSEPA PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork = "sepa" PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetworkSpei PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork = "spei" PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetworkZengin PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork = "zengin" )
List of values that PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork can take
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType ¶
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType string
The type of financial address
const ( PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressTypeIBAN PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType = "iban" PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressTypeSortCode PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType = "sort_code" PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressTypeSpei PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType = "spei" PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressTypeZengin PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType = "zengin" )
List of values that PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType can take
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin ¶
type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin struct { // The account holder name AccountHolderName string `json:"account_holder_name"` // The account number AccountNumber string `json:"account_number"` // The bank account type. In Japan, this can only be `futsu` or `toza`. AccountType string `json:"account_type"` // The bank code of the account BankCode string `json:"bank_code"` // The bank name of the account BankName string `json:"bank_name"` // The branch code of the account BranchCode string `json:"branch_code"` // The branch name of the account BranchName string `json:"branch_name"` }
Zengin Records contain Japan bank account details per the Zengin format.
type PaymentIntentNextActionDisplayBankTransferInstructionsType ¶
type PaymentIntentNextActionDisplayBankTransferInstructionsType string
Type of bank transfer
const ( PaymentIntentNextActionDisplayBankTransferInstructionsTypeEUBankTransfer PaymentIntentNextActionDisplayBankTransferInstructionsType = "eu_bank_transfer" PaymentIntentNextActionDisplayBankTransferInstructionsTypeGBBankTransfer PaymentIntentNextActionDisplayBankTransferInstructionsType = "gb_bank_transfer" PaymentIntentNextActionDisplayBankTransferInstructionsTypeJPBankTransfer PaymentIntentNextActionDisplayBankTransferInstructionsType = "jp_bank_transfer" PaymentIntentNextActionDisplayBankTransferInstructionsTypeMXBankTransfer PaymentIntentNextActionDisplayBankTransferInstructionsType = "mx_bank_transfer" PaymentIntentNextActionDisplayBankTransferInstructionsTypeUSBankTransfer PaymentIntentNextActionDisplayBankTransferInstructionsType = "us_bank_transfer" )
List of values that PaymentIntentNextActionDisplayBankTransferInstructionsType can take
type PaymentIntentNextActionKonbiniDisplayDetails ¶
type PaymentIntentNextActionKonbiniDisplayDetails struct { // The timestamp at which the pending Konbini payment expires. ExpiresAt int64 `json:"expires_at"` // The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. HostedVoucherURL string `json:"hosted_voucher_url"` Stores *PaymentIntentNextActionKonbiniDisplayDetailsStores `json:"stores"` }
type PaymentIntentNextActionKonbiniDisplayDetailsStores ¶
type PaymentIntentNextActionKonbiniDisplayDetailsStores struct { // FamilyMart instruction details. FamilyMart *PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilyMart `json:"familymart"` // Lawson instruction details. Lawson *PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson `json:"lawson"` // Ministop instruction details. Ministop *PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop `json:"ministop"` // Seicomart instruction details. Seicomart *PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart `json:"seicomart"` }
type PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilyMart ¶
type PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilyMart struct { // The confirmation number. ConfirmationNumber string `json:"confirmation_number"` // The payment code. PaymentCode string `json:"payment_code"` }
FamilyMart instruction details.
type PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson ¶
type PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson struct { // The confirmation number. ConfirmationNumber string `json:"confirmation_number"` // The payment code. PaymentCode string `json:"payment_code"` }
Lawson instruction details.
type PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop ¶
type PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop struct { // The confirmation number. ConfirmationNumber string `json:"confirmation_number"` // The payment code. PaymentCode string `json:"payment_code"` }
Ministop instruction details.
type PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart ¶
type PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart struct { // The confirmation number. ConfirmationNumber string `json:"confirmation_number"` // The payment code. PaymentCode string `json:"payment_code"` }
Seicomart instruction details.
type PaymentIntentNextActionOXXODisplayDetails ¶
type PaymentIntentNextActionOXXODisplayDetails struct { // The timestamp after which the OXXO voucher expires. ExpiresAfter int64 `json:"expires_after"` // The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. HostedVoucherURL string `json:"hosted_voucher_url"` // OXXO reference number. Number string `json:"number"` }
type PaymentIntentNextActionPayNowDisplayQRCode ¶
type PaymentIntentNextActionPayNowDisplayQRCode struct { // The raw data string used to generate QR code, it should be used together with QR code library. Data string `json:"data"` // The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. HostedInstructionsURL string `json:"hosted_instructions_url"` // The image_url_png string used to render QR code ImageURLPNG string `json:"image_url_png"` // The image_url_svg string used to render QR code ImageURLSVG string `json:"image_url_svg"` }
type PaymentIntentNextActionPixDisplayQRCode ¶
type PaymentIntentNextActionPixDisplayQRCode struct { // The raw data string used to generate QR code, it should be used together with QR code library. Data string `json:"data"` // The date (unix timestamp) when the PIX expires. ExpiresAt int64 `json:"expires_at"` // The URL to the hosted pix instructions page, which allows customers to view the pix QR code. HostedInstructionsURL string `json:"hosted_instructions_url"` // The image_url_png string used to render png QR code ImageURLPNG string `json:"image_url_png"` // The image_url_svg string used to render svg QR code ImageURLSVG string `json:"image_url_svg"` }
type PaymentIntentNextActionPromptPayDisplayQRCode ¶
type PaymentIntentNextActionPromptPayDisplayQRCode struct { // The raw data string used to generate QR code, it should be used together with QR code library. Data string `json:"data"` // The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. HostedInstructionsURL string `json:"hosted_instructions_url"` // The PNG path used to render the QR code, can be used as the source in an HTML img tag ImageURLPNG string `json:"image_url_png"` // The SVG path used to render the QR code, can be used as the source in an HTML img tag ImageURLSVG string `json:"image_url_svg"` }
type PaymentIntentNextActionRedirectToURL ¶
type PaymentIntentNextActionRedirectToURL struct { // If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. ReturnURL string `json:"return_url"` // The URL you must redirect your customer to in order to authenticate the payment. URL string `json:"url"` }
type PaymentIntentNextActionType ¶
type PaymentIntentNextActionType string
Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
const ( PaymentIntentNextActionTypeAlipayHandleRedirect PaymentIntentNextActionType = "alipay_handle_redirect" PaymentIntentNextActionTypeOXXODisplayDetails PaymentIntentNextActionType = "oxxo_display_details" PaymentIntentNextActionTypeRedirectToURL PaymentIntentNextActionType = "redirect_to_url" PaymentIntentNextActionTypeUseStripeSDK PaymentIntentNextActionType = "use_stripe_sdk" PaymentIntentNextActionTypeVerifyWithMicrodeposits PaymentIntentNextActionType = "verify_with_microdeposits" )
List of values that PaymentIntentNextActionType can take
type PaymentIntentNextActionUseStripeSDK ¶
type PaymentIntentNextActionUseStripeSDK struct{}
When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
type PaymentIntentNextActionVerifyWithMicrodeposits ¶
type PaymentIntentNextActionVerifyWithMicrodeposits struct { // The timestamp when the microdeposits are expected to land. ArrivalDate int64 `json:"arrival_date"` // The URL for the hosted verification page, which allows customers to verify their bank account. HostedVerificationURL string `json:"hosted_verification_url"` // The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. MicrodepositType PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType `json:"microdeposit_type"` }
type PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType ¶
type PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType string
The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
const ( PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositTypeAmounts PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType = "amounts" PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositTypeDescriptorCode PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType = "descriptor_code" )
List of values that PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType can take
type PaymentIntentNextActionWeChatPayDisplayQRCode ¶
type PaymentIntentNextActionWeChatPayDisplayQRCode struct { // The data being used to generate QR code Data string `json:"data"` // The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. HostedInstructionsURL string `json:"hosted_instructions_url"` // The base64 image data for a pre-generated QR code ImageDataURL string `json:"image_data_url"` // The image_url_png string used to render QR code ImageURLPNG string `json:"image_url_png"` // The image_url_svg string used to render QR code ImageURLSVG string `json:"image_url_svg"` }
type PaymentIntentNextActionWeChatPayRedirectToAndroidApp ¶
type PaymentIntentNextActionWeChatPayRedirectToAndroidApp struct { // app_id is the APP ID registered on WeChat open platform AppID string `json:"app_id"` // nonce_str is a random string NonceStr string `json:"nonce_str"` // package is static value Package string `json:"package"` // an unique merchant ID assigned by WeChat Pay PartnerID string `json:"partner_id"` // an unique trading ID assigned by WeChat Pay PrepayID string `json:"prepay_id"` // A signature Sign string `json:"sign"` // Specifies the current time in epoch format Timestamp string `json:"timestamp"` }
type PaymentIntentNextActionWeChatPayRedirectToIOSApp ¶
type PaymentIntentNextActionWeChatPayRedirectToIOSApp struct { // An universal link that redirect to WeChat Pay app NativeURL string `json:"native_url"` }
type PaymentIntentParams ¶
type PaymentIntentParams struct { Params `form:"*"` // Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/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://stripe.com/docs/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 *int64 `form:"amount"` // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). ApplicationFeeAmount *int64 `form:"application_fee_amount"` // When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. AutomaticPaymentMethods *PaymentIntentAutomaticPaymentMethodsParams `form:"automatic_payment_methods"` // Controls when the funds will be captured from the customer's account. CaptureMethod *string `form:"capture_method"` // The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. ClientSecret *string `form:"client_secret"` // Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). Confirm *bool `form:"confirm"` ConfirmationMethod *string `form:"confirmation_method"` // 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 `form:"currency"` // ID of the Customer this PaymentIntent belongs to, if one exists. // // Payment methods attached to other Customers cannot be used with this PaymentIntent. // // If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. Customer *string `form:"customer"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). Mandate *string `form:"mandate"` // This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). MandateData *PaymentIntentMandateDataParams `form:"mandate_data"` // 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`. Metadata map[string]string `form:"metadata"` // The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). OnBehalfOf *string `form:"on_behalf_of"` // ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. // // If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. PaymentMethod *string `form:"payment_method"` // The ID of the payment method configuration to use with this PaymentIntent. PaymentMethodConfiguration *string `form:"payment_method_configuration"` // If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear // in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) // property on the PaymentIntent. PaymentMethodData *PaymentIntentPaymentMethodDataParams `form:"payment_method_data"` // Payment-method-specific configuration for this PaymentIntent. PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"` // The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, it defaults to ["card"]. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). PaymentMethodTypes []*string `form:"payment_method_types"` // Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). RadarOptions *PaymentIntentRadarOptionsParams `form:"radar_options"` // Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). ReceiptEmail *string `form:"receipt_email"` // The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). ReturnURL *string `form:"return_url"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` // Shipping information for this PaymentIntent. Shipping *ShippingDetailsParams `form:"shipping"` // For non-card charges, you can use this value as the complete description that appears on your customers' statements. It must contain at least one letter and be 1–22 characters long. StatementDescriptor *string `form:"statement_descriptor"` // Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. The concatenated descriptor must contain 1-22 characters. StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` // The parameters that you can use to automatically create a Transfer after the payment succeeds. // Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). TransferData *PaymentIntentTransferDataParams `form:"transfer_data"` // A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). TransferGroup *string `form:"transfer_group"` // These parameters apply only for paymentIntent.New with `confirm=true` // Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). ErrorOnRequiresAction *bool `form:"error_on_requires_action"` // Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). OffSession *bool `form:"off_session"` // Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. UseStripeSDK *bool `form:"use_stripe_sdk"` }
Creates a PaymentIntent object.
After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm) to continue the payment. Learn more about <a href="/docs/payments/payment-intents">the available payment flows with the Payment Intents API.
When you use confirm=true during creation, it's equivalent to creating and confirming the PaymentIntent in the same call. You can use any parameters available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply confirm=true.
func (*PaymentIntentParams) AddExpand ¶
func (p *PaymentIntentParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PaymentIntentParams) AddMetadata ¶
func (p *PaymentIntentParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PaymentIntentPaymentMethodConfigurationDetails ¶ added in v75.6.0
type PaymentIntentPaymentMethodConfigurationDetails struct { // ID of the payment method configuration used. ID string `json:"id"` // ID of the parent payment method configuration used. Parent string `json:"parent"` }
Information about the payment method configuration used for this PaymentIntent.
type PaymentIntentPaymentMethodDataAffirmParams ¶
type PaymentIntentPaymentMethodDataAffirmParams struct{}
If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
type PaymentIntentPaymentMethodDataBLIKParams ¶
type PaymentIntentPaymentMethodDataBLIKParams struct{}
If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
type PaymentIntentPaymentMethodDataBillingDetailsParams ¶
type PaymentIntentPaymentMethodDataBillingDetailsParams struct { // Billing address. Address *AddressParams `form:"address"` // Email address. Email *string `form:"email"` // Full name. Name *string `form:"name"` // Billing phone number (including extension). Phone *string `form:"phone"` }
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
type PaymentIntentPaymentMethodDataCashAppParams ¶
type PaymentIntentPaymentMethodDataCashAppParams struct{}
If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
type PaymentIntentPaymentMethodDataCustomerBalanceParams ¶
type PaymentIntentPaymentMethodDataCustomerBalanceParams struct{}
If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
type PaymentIntentPaymentMethodDataKonbiniParams ¶
type PaymentIntentPaymentMethodDataKonbiniParams struct{}
If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
type PaymentIntentPaymentMethodDataLinkParams ¶
type PaymentIntentPaymentMethodDataLinkParams struct{}
If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
type PaymentIntentPaymentMethodDataParams ¶
type PaymentIntentPaymentMethodDataParams struct { // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. ACSSDebit *PaymentMethodACSSDebitParams `form:"acss_debit"` // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. Affirm *PaymentIntentPaymentMethodDataAffirmParams `form:"affirm"` // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *PaymentMethodAlipayParams `form:"alipay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. BACSDebit *PaymentMethodBACSDebitParams `form:"bacs_debit"` // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. Bancontact *PaymentMethodBancontactParams `form:"bancontact"` // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. BillingDetails *PaymentIntentPaymentMethodDataBillingDetailsParams `form:"billing_details"` // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. BLIK *PaymentIntentPaymentMethodDataBLIKParams `form:"blik"` // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. Boleto *PaymentMethodBoletoParams `form:"boleto"` // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. CashApp *PaymentIntentPaymentMethodDataCashAppParams `form:"cashapp"` // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. CustomerBalance *PaymentIntentPaymentMethodDataCustomerBalanceParams `form:"customer_balance"` // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. EPS *PaymentMethodEPSParams `form:"eps"` // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. FPX *PaymentMethodFPXParams `form:"fpx"` // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. Giropay *PaymentMethodGiropayParams `form:"giropay"` // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. Grabpay *PaymentMethodGrabpayParams `form:"grabpay"` // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. IDEAL *PaymentMethodIDEALParams `form:"ideal"` // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. InteracPresent *PaymentMethodInteracPresentParams `form:"interac_present"` // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. Klarna *PaymentMethodKlarnaParams `form:"klarna"` // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. Konbini *PaymentIntentPaymentMethodDataKonbiniParams `form:"konbini"` // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. Link *PaymentIntentPaymentMethodDataLinkParams `form:"link"` // 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`. Metadata map[string]string `form:"metadata"` // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. OXXO *PaymentMethodOXXOParams `form:"oxxo"` // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. P24 *PaymentMethodP24Params `form:"p24"` // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. PayNow *PaymentIntentPaymentMethodDataPayNowParams `form:"paynow"` // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. Paypal *PaymentIntentPaymentMethodDataPaypalParams `form:"paypal"` // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. Pix *PaymentIntentPaymentMethodDataPixParams `form:"pix"` // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. PromptPay *PaymentIntentPaymentMethodDataPromptPayParams `form:"promptpay"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *PaymentIntentPaymentMethodDataRadarOptionsParams `form:"radar_options"` // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. SEPADebit *PaymentMethodSEPADebitParams `form:"sepa_debit"` // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. Sofort *PaymentMethodSofortParams `form:"sofort"` // 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. Type *string `form:"type"` // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. USBankAccount *PaymentIntentPaymentMethodDataUSBankAccountParams `form:"us_bank_account"` // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. WeChatPay *PaymentMethodWeChatPayParams `form:"wechat_pay"` // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. Zip *PaymentIntentPaymentMethodDataZipParams `form:"zip"` }
If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) property on the PaymentIntent.
func (*PaymentIntentPaymentMethodDataParams) AddMetadata ¶
func (p *PaymentIntentPaymentMethodDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PaymentIntentPaymentMethodDataPayNowParams ¶
type PaymentIntentPaymentMethodDataPayNowParams struct{}
If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
type PaymentIntentPaymentMethodDataPaypalParams ¶
type PaymentIntentPaymentMethodDataPaypalParams struct{}
If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
type PaymentIntentPaymentMethodDataPixParams ¶
type PaymentIntentPaymentMethodDataPixParams struct{}
If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
type PaymentIntentPaymentMethodDataPromptPayParams ¶
type PaymentIntentPaymentMethodDataPromptPayParams struct{}
If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
type PaymentIntentPaymentMethodDataRadarOptionsParams ¶
type PaymentIntentPaymentMethodDataRadarOptionsParams struct { // 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. Session *string `form:"session"` }
Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
type PaymentIntentPaymentMethodDataUSBankAccountParams ¶
type PaymentIntentPaymentMethodDataUSBankAccountParams struct { // Account holder type: individual or company. AccountHolderType *string `form:"account_holder_type"` // Account number of the bank account. AccountNumber *string `form:"account_number"` // Account type: checkings or savings. Defaults to checking if omitted. AccountType *string `form:"account_type"` // The ID of a Financial Connections Account to use as a payment method. FinancialConnectionsAccount *string `form:"financial_connections_account"` // Routing number of the bank account. RoutingNumber *string `form:"routing_number"` }
If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
type PaymentIntentPaymentMethodDataZipParams ¶
type PaymentIntentPaymentMethodDataZipParams struct{}
If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
type PaymentIntentPaymentMethodOptions ¶
type PaymentIntentPaymentMethodOptions struct { ACSSDebit *PaymentIntentPaymentMethodOptionsACSSDebit `json:"acss_debit"` Affirm *PaymentIntentPaymentMethodOptionsAffirm `json:"affirm"` AfterpayClearpay *PaymentIntentPaymentMethodOptionsAfterpayClearpay `json:"afterpay_clearpay"` Alipay *PaymentIntentPaymentMethodOptionsAlipay `json:"alipay"` AUBECSDebit *PaymentIntentPaymentMethodOptionsAUBECSDebit `json:"au_becs_debit"` BACSDebit *PaymentIntentPaymentMethodOptionsBACSDebit `json:"bacs_debit"` Bancontact *PaymentIntentPaymentMethodOptionsBancontact `json:"bancontact"` BLIK *PaymentIntentPaymentMethodOptionsBLIK `json:"blik"` Boleto *PaymentIntentPaymentMethodOptionsBoleto `json:"boleto"` Card *PaymentIntentPaymentMethodOptionsCard `json:"card"` CardPresent *PaymentIntentPaymentMethodOptionsCardPresent `json:"card_present"` CashApp *PaymentIntentPaymentMethodOptionsCashApp `json:"cashapp"` CustomerBalance *PaymentIntentPaymentMethodOptionsCustomerBalance `json:"customer_balance"` EPS *PaymentIntentPaymentMethodOptionsEPS `json:"eps"` FPX *PaymentIntentPaymentMethodOptionsFPX `json:"fpx"` Giropay *PaymentIntentPaymentMethodOptionsGiropay `json:"giropay"` Grabpay *PaymentIntentPaymentMethodOptionsGrabpay `json:"grabpay"` IDEAL *PaymentIntentPaymentMethodOptionsIDEAL `json:"ideal"` InteracPresent *PaymentIntentPaymentMethodOptionsInteracPresent `json:"interac_present"` Klarna *PaymentIntentPaymentMethodOptionsKlarna `json:"klarna"` Konbini *PaymentIntentPaymentMethodOptionsKonbini `json:"konbini"` Link *PaymentIntentPaymentMethodOptionsLink `json:"link"` OXXO *PaymentIntentPaymentMethodOptionsOXXO `json:"oxxo"` P24 *PaymentIntentPaymentMethodOptionsP24 `json:"p24"` PayNow *PaymentIntentPaymentMethodOptionsPayNow `json:"paynow"` Paypal *PaymentIntentPaymentMethodOptionsPaypal `json:"paypal"` Pix *PaymentIntentPaymentMethodOptionsPix `json:"pix"` PromptPay *PaymentIntentPaymentMethodOptionsPromptPay `json:"promptpay"` SEPADebit *PaymentIntentPaymentMethodOptionsSEPADebit `json:"sepa_debit"` Sofort *PaymentIntentPaymentMethodOptionsSofort `json:"sofort"` USBankAccount *PaymentIntentPaymentMethodOptionsUSBankAccount `json:"us_bank_account"` WeChatPay *PaymentIntentPaymentMethodOptionsWeChatPay `json:"wechat_pay"` Zip *PaymentIntentPaymentMethodOptionsZip `json:"zip"` }
Payment-method-specific configuration for this PaymentIntent.
type PaymentIntentPaymentMethodOptionsACSSDebit ¶
type PaymentIntentPaymentMethodOptionsACSSDebit struct { MandateOptions *PaymentIntentPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage `json:"setup_future_usage"` // Bank account verification method. VerificationMethod PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"` }
type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptions ¶
type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptions struct { // A URL for custom mandate text CustomMandateURL string `json:"custom_mandate_url"` // Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. IntervalDescription string `json:"interval_description"` // Payment schedule for the mandate. PaymentSchedule PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule `json:"payment_schedule"` // Transaction type of the mandate. TransactionType PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"` }
type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsParams ¶
type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsParams struct { // A URL for custom mandate text to render during confirmation step. // The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, // or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. CustomMandateURL *string `form:"custom_mandate_url"` // Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. IntervalDescription *string `form:"interval_description"` // Payment schedule for the mandate. PaymentSchedule *string `form:"payment_schedule"` // Transaction type of the mandate. TransactionType *string `form:"transaction_type"` }
Additional fields for Mandate creation
type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule ¶
type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule string
Payment schedule for the mandate.
const ( PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleCombined PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "combined" PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleInterval PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "interval" PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleSporadic PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "sporadic" )
List of values that PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule can take
type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType ¶
type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string
Transaction type of the mandate.
const ( PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business" PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal" )
List of values that PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take
type PaymentIntentPaymentMethodOptionsACSSDebitParams ¶
type PaymentIntentPaymentMethodOptionsACSSDebitParams struct { // Additional fields for Mandate creation MandateOptions *PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` // Verification method for the intent VerificationMethod *string `form:"verification_method"` }
If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
type PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsageNone PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage = "off_session" PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsageOnSession PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage = "on_session" )
List of values that PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod ¶
type PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod string
Bank account verification method.
const ( PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethodAutomatic PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod = "automatic" PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethodInstant PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod = "instant" PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits" )
List of values that PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod can take
type PaymentIntentPaymentMethodOptionsAUBECSDebit ¶
type PaymentIntentPaymentMethodOptionsAUBECSDebit struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsAUBECSDebitParams ¶
type PaymentIntentPaymentMethodOptionsAUBECSDebitParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
type PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsageNone PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage = "off_session" PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsageOnSession PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage = "on_session" )
List of values that PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsAffirm ¶
type PaymentIntentPaymentMethodOptionsAffirm struct { // Controls when the funds will be captured from the customer's account. CaptureMethod PaymentIntentPaymentMethodOptionsAffirmCaptureMethod `json:"capture_method"` // Preferred language of the Affirm authorization page that the customer is redirected to. PreferredLocale string `json:"preferred_locale"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsAffirmCaptureMethod ¶
type PaymentIntentPaymentMethodOptionsAffirmCaptureMethod string
Controls when the funds will be captured from the customer's account.
const (
PaymentIntentPaymentMethodOptionsAffirmCaptureMethodManual PaymentIntentPaymentMethodOptionsAffirmCaptureMethod = "manual"
)
List of values that PaymentIntentPaymentMethodOptionsAffirmCaptureMethod can take
type PaymentIntentPaymentMethodOptionsAffirmParams ¶
type PaymentIntentPaymentMethodOptionsAffirmParams struct { // Controls when the funds will be captured from the customer's account. // // If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. // // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. CaptureMethod *string `form:"capture_method"` // Preferred language of the Affirm authorization page that the customer is redirected to. PreferredLocale *string `form:"preferred_locale"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
type PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsageNone PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsAfterpayClearpay ¶
type PaymentIntentPaymentMethodOptionsAfterpayClearpay struct { // Controls when the funds will be captured from the customer's account. CaptureMethod PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod `json:"capture_method"` // An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. // This field differs from the statement descriptor and item name. Reference string `json:"reference"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod ¶
type PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod string
Controls when the funds will be captured from the customer's account.
const (
PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethodManual PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod = "manual"
)
List of values that PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod can take
type PaymentIntentPaymentMethodOptionsAfterpayClearpayParams ¶
type PaymentIntentPaymentMethodOptionsAfterpayClearpayParams struct { // Controls when the funds will be captured from the customer's account. // // If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. // // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. CaptureMethod *string `form:"capture_method"` // An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. // This field differs from the statement descriptor and item name. Reference *string `form:"reference"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
type PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsAlipay ¶
type PaymentIntentPaymentMethodOptionsAlipay struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsAlipayParams ¶
type PaymentIntentPaymentMethodOptionsAlipayParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
type PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage = "off_session" )
List of values that PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsBACSDebit ¶
type PaymentIntentPaymentMethodOptionsBACSDebit struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsBACSDebitParams ¶
type PaymentIntentPaymentMethodOptionsBACSDebitParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
type PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsageNone PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage = "off_session" PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsageOnSession PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage = "on_session" )
List of values that PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsBLIK ¶
type PaymentIntentPaymentMethodOptionsBLIK struct{}
type PaymentIntentPaymentMethodOptionsBLIKParams ¶
type PaymentIntentPaymentMethodOptionsBLIKParams struct { // The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. Code *string `form:"code"` }
If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
type PaymentIntentPaymentMethodOptionsBancontact ¶
type PaymentIntentPaymentMethodOptionsBancontact struct { // Preferred language of the Bancontact authorization page that the customer is redirected to. PreferredLanguage string `json:"preferred_language"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsBancontactParams ¶
type PaymentIntentPaymentMethodOptionsBancontactParams struct { // Preferred language of the Bancontact authorization page that the customer is redirected to. PreferredLanguage *string `form:"preferred_language"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
type PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsageNone PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage = "off_session" )
List of values that PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsBoleto ¶
type PaymentIntentPaymentMethodOptionsBoleto struct { // The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. ExpiresAfterDays int64 `json:"expires_after_days"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsBoletoParams ¶
type PaymentIntentPaymentMethodOptionsBoletoParams struct { // The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. ExpiresAfterDays *int64 `form:"expires_after_days"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
type PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsageNone PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage = "off_session" PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsageOnSession PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage = "on_session" )
List of values that PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsCard ¶
type PaymentIntentPaymentMethodOptionsCard struct { // Controls when the funds will be captured from the customer's account. CaptureMethod PaymentIntentPaymentMethodOptionsCardCaptureMethod `json:"capture_method"` // Installment details for this payment (Mexico only). // // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). Installments *PaymentIntentPaymentMethodOptionsCardInstallments `json:"installments"` // Configuration options for setting up an eMandate for cards issued in India. MandateOptions *PaymentIntentPaymentMethodOptionsCardMandateOptions `json:"mandate_options"` // Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. Network PaymentIntentPaymentMethodOptionsCardNetwork `json:"network"` // Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. RequestExtendedAuthorization PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization `json:"request_extended_authorization"` // Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. RequestIncrementalAuthorization PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization `json:"request_incremental_authorization"` // Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. RequestMulticapture PaymentIntentPaymentMethodOptionsCardRequestMulticapture `json:"request_multicapture"` // Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. RequestOvercapture PaymentIntentPaymentMethodOptionsCardRequestOvercapture `json:"request_overcapture"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsCardSetupFutureUsage `json:"setup_future_usage"` // Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. StatementDescriptorSuffixKana string `json:"statement_descriptor_suffix_kana"` // Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. StatementDescriptorSuffixKanji string `json:"statement_descriptor_suffix_kanji"` }
type PaymentIntentPaymentMethodOptionsCardCaptureMethod ¶
type PaymentIntentPaymentMethodOptionsCardCaptureMethod string
Controls when the funds will be captured from the customer's account.
const (
PaymentIntentPaymentMethodOptionsCardCaptureMethodManual PaymentIntentPaymentMethodOptionsCardCaptureMethod = "manual"
)
List of values that PaymentIntentPaymentMethodOptionsCardCaptureMethod can take
type PaymentIntentPaymentMethodOptionsCardInstallments ¶
type PaymentIntentPaymentMethodOptionsCardInstallments struct { // Installment plans that may be selected for this PaymentIntent. AvailablePlans []*PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"available_plans"` // Whether Installments are enabled for this PaymentIntent. Enabled bool `json:"enabled"` // Installment plan selected for this PaymentIntent. Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"` }
Installment details for this payment (Mexico only).
For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
type PaymentIntentPaymentMethodOptionsCardInstallmentsParams ¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsParams struct { // Setting to true enables installments for this PaymentIntent. // This will cause the response to contain a list of available installment plans. // Setting to false will prevent any selected plan from applying to a charge. Enabled *bool `form:"enabled"` // The selected installment plan to use for this payment attempt. // This parameter can only be provided during confirmation. Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"` }
Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlan ¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlan struct { // For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. Count int64 `json:"count"` // For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. // One of `month`. Interval PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval `json:"interval"` // Type of installment plan, one of `fixed_count`. Type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType `json:"type"` }
Installment plan selected for this PaymentIntent.
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval ¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval string
For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`.
const (
PaymentIntentPaymentMethodOptionsCardInstallmentsPlanIntervalMonth PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval = "month"
)
List of values that PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval can take
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams ¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams struct { // For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. Count *int64 `form:"count"` // For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. // One of `month`. Interval *string `form:"interval"` // Type of installment plan, one of `fixed_count`. Type *string `form:"type"` }
The selected installment plan to use for this payment attempt. This parameter can only be provided during confirmation.
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType ¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType string
Type of installment plan, one of `fixed_count`.
const (
PaymentIntentPaymentMethodOptionsCardInstallmentsPlanTypeFixedCount PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType = "fixed_count"
)
List of values that PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType can take
type PaymentIntentPaymentMethodOptionsCardMandateOptions ¶
type PaymentIntentPaymentMethodOptionsCardMandateOptions struct { // Amount to be charged for future payments. Amount int64 `json:"amount"` // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. AmountType PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType `json:"amount_type"` // A description of the mandate or subscription that is meant to be displayed to the customer. Description string `json:"description"` // End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. EndDate int64 `json:"end_date"` // Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. Interval PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval `json:"interval"` // The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. IntervalCount int64 `json:"interval_count"` // Unique identifier for the mandate or subscription. Reference string `json:"reference"` // Start date of the mandate or subscription. Start date should not be lesser than yesterday. StartDate int64 `json:"start_date"` // Specifies the type of mandates supported. Possible values are `india`. SupportedTypes []PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType `json:"supported_types"` }
Configuration options for setting up an eMandate for cards issued in India.
type PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType ¶
type PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType string
One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
const ( PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountTypeFixed PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType = "fixed" PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountTypeMaximum PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType = "maximum" )
List of values that PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType can take
type PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval ¶
type PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval string
Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
const ( PaymentIntentPaymentMethodOptionsCardMandateOptionsIntervalDay PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval = "day" PaymentIntentPaymentMethodOptionsCardMandateOptionsIntervalMonth PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval = "month" PaymentIntentPaymentMethodOptionsCardMandateOptionsIntervalSporadic PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval = "sporadic" PaymentIntentPaymentMethodOptionsCardMandateOptionsIntervalWeek PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval = "week" PaymentIntentPaymentMethodOptionsCardMandateOptionsIntervalYear PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval = "year" )
List of values that PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval can take
type PaymentIntentPaymentMethodOptionsCardMandateOptionsParams ¶
type PaymentIntentPaymentMethodOptionsCardMandateOptionsParams struct { // Amount to be charged for future payments. Amount *int64 `form:"amount"` // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. AmountType *string `form:"amount_type"` // A description of the mandate or subscription that is meant to be displayed to the customer. Description *string `form:"description"` // End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. EndDate *int64 `form:"end_date"` // Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. Interval *string `form:"interval"` // The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. IntervalCount *int64 `form:"interval_count"` // Unique identifier for the mandate or subscription. Reference *string `form:"reference"` // Start date of the mandate or subscription. Start date should not be lesser than yesterday. StartDate *int64 `form:"start_date"` // Specifies the type of mandates supported. Possible values are `india`. SupportedTypes []*string `form:"supported_types"` }
Configuration options for setting up an eMandate for cards issued in India.
type PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType ¶
type PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType string
Specifies the type of mandates supported. Possible values are `india`.
const (
PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypeIndia PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType = "india"
)
List of values that PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType can take
type PaymentIntentPaymentMethodOptionsCardNetwork ¶
type PaymentIntentPaymentMethodOptionsCardNetwork string
Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time.
const ( PaymentIntentPaymentMethodOptionsCardNetworkAmex PaymentIntentPaymentMethodOptionsCardNetwork = "amex" PaymentIntentPaymentMethodOptionsCardNetworkCartesBancaires PaymentIntentPaymentMethodOptionsCardNetwork = "cartes_bancaires" PaymentIntentPaymentMethodOptionsCardNetworkDiners PaymentIntentPaymentMethodOptionsCardNetwork = "diners" PaymentIntentPaymentMethodOptionsCardNetworkDiscover PaymentIntentPaymentMethodOptionsCardNetwork = "discover" PaymentIntentPaymentMethodOptionsCardNetworkEFTPOSAU PaymentIntentPaymentMethodOptionsCardNetwork = "eftpos_au" PaymentIntentPaymentMethodOptionsCardNetworkInterac PaymentIntentPaymentMethodOptionsCardNetwork = "interac" PaymentIntentPaymentMethodOptionsCardNetworkJCB PaymentIntentPaymentMethodOptionsCardNetwork = "jcb" PaymentIntentPaymentMethodOptionsCardNetworkMastercard PaymentIntentPaymentMethodOptionsCardNetwork = "mastercard" PaymentIntentPaymentMethodOptionsCardNetworkUnionpay PaymentIntentPaymentMethodOptionsCardNetwork = "unionpay" PaymentIntentPaymentMethodOptionsCardNetworkUnknown PaymentIntentPaymentMethodOptionsCardNetwork = "unknown" PaymentIntentPaymentMethodOptionsCardNetworkVisa PaymentIntentPaymentMethodOptionsCardNetwork = "visa" )
List of values that PaymentIntentPaymentMethodOptionsCardNetwork can take
type PaymentIntentPaymentMethodOptionsCardParams ¶
type PaymentIntentPaymentMethodOptionsCardParams struct { // Controls when the funds will be captured from the customer's account. // // If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. // // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. CaptureMethod *string `form:"capture_method"` // A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. CVCToken *string `form:"cvc_token"` // Installment configuration for payments attempted on this PaymentIntent (Mexico Only). // // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). Installments *PaymentIntentPaymentMethodOptionsCardInstallmentsParams `form:"installments"` // Configuration options for setting up an eMandate for cards issued in India. MandateOptions *PaymentIntentPaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"` // When specified, this parameter indicates that a transaction will be marked // as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This // parameter can only be provided during confirmation. MOTO *bool `form:"moto"` // Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. Network *string `form:"network"` // Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. RequestExtendedAuthorization *string `form:"request_extended_authorization"` // Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. RequestIncrementalAuthorization *string `form:"request_incremental_authorization"` // Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. RequestMulticapture *string `form:"request_multicapture"` // Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. RequestOvercapture *string `form:"request_overcapture"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure *string `form:"request_three_d_secure"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` // Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. StatementDescriptorSuffixKana *string `form:"statement_descriptor_suffix_kana"` // Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. StatementDescriptorSuffixKanji *string `form:"statement_descriptor_suffix_kanji"` }
Configuration for any card payments attempted on this PaymentIntent.
type PaymentIntentPaymentMethodOptionsCardPresent ¶
type PaymentIntentPaymentMethodOptionsCardPresent struct { // Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) RequestExtendedAuthorization bool `json:"request_extended_authorization"` // Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. RequestIncrementalAuthorizationSupport bool `json:"request_incremental_authorization_support"` }
type PaymentIntentPaymentMethodOptionsCardPresentParams ¶
type PaymentIntentPaymentMethodOptionsCardPresentParams struct { // Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) RequestExtendedAuthorization *bool `form:"request_extended_authorization"` // Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. RequestIncrementalAuthorization *string `form:"request_incremental_authorization"` // Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. RequestIncrementalAuthorizationSupport *bool `form:"request_incremental_authorization_support"` }
If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
type PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization ¶ added in v75.9.0
type PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization string
Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
const ( PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorizationIfAvailable PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization = "if_available" PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorizationNever PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization = "never" )
List of values that PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization can take
type PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization ¶ added in v75.9.0
type PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization string
Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
const ( PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorizationIfAvailable PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization = "if_available" PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorizationNever PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization = "never" )
List of values that PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization can take
type PaymentIntentPaymentMethodOptionsCardRequestMulticapture ¶ added in v75.9.0
type PaymentIntentPaymentMethodOptionsCardRequestMulticapture string
Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
const ( PaymentIntentPaymentMethodOptionsCardRequestMulticaptureIfAvailable PaymentIntentPaymentMethodOptionsCardRequestMulticapture = "if_available" PaymentIntentPaymentMethodOptionsCardRequestMulticaptureNever PaymentIntentPaymentMethodOptionsCardRequestMulticapture = "never" )
List of values that PaymentIntentPaymentMethodOptionsCardRequestMulticapture can take
type PaymentIntentPaymentMethodOptionsCardRequestOvercapture ¶ added in v75.9.0
type PaymentIntentPaymentMethodOptionsCardRequestOvercapture string
Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
const ( PaymentIntentPaymentMethodOptionsCardRequestOvercaptureIfAvailable PaymentIntentPaymentMethodOptionsCardRequestOvercapture = "if_available" PaymentIntentPaymentMethodOptionsCardRequestOvercaptureNever PaymentIntentPaymentMethodOptionsCardRequestOvercapture = "never" )
List of values that PaymentIntentPaymentMethodOptionsCardRequestOvercapture can take
type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure ¶
type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure string
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
const ( PaymentIntentPaymentMethodOptionsCardRequestThreeDSecureAny PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure = "any" PaymentIntentPaymentMethodOptionsCardRequestThreeDSecureAutomatic PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure = "automatic" PaymentIntentPaymentMethodOptionsCardRequestThreeDSecureChallengeOnly PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure = "challenge_only" )
List of values that PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure can take
type PaymentIntentPaymentMethodOptionsCardSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsCardSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsCardSetupFutureUsageNone PaymentIntentPaymentMethodOptionsCardSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsCardSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsCardSetupFutureUsage = "off_session" PaymentIntentPaymentMethodOptionsCardSetupFutureUsageOnSession PaymentIntentPaymentMethodOptionsCardSetupFutureUsage = "on_session" )
List of values that PaymentIntentPaymentMethodOptionsCardSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsCashApp ¶
type PaymentIntentPaymentMethodOptionsCashApp struct { // Controls when the funds will be captured from the customer's account. CaptureMethod PaymentIntentPaymentMethodOptionsCashAppCaptureMethod `json:"capture_method"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsCashAppCaptureMethod ¶
type PaymentIntentPaymentMethodOptionsCashAppCaptureMethod string
Controls when the funds will be captured from the customer's account.
const (
PaymentIntentPaymentMethodOptionsCashAppCaptureMethodManual PaymentIntentPaymentMethodOptionsCashAppCaptureMethod = "manual"
)
List of values that PaymentIntentPaymentMethodOptionsCashAppCaptureMethod can take
type PaymentIntentPaymentMethodOptionsCashAppParams ¶
type PaymentIntentPaymentMethodOptionsCashAppParams struct { // Controls when the funds will be captured from the customer's account. // // If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. // // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. CaptureMethod *string `form:"capture_method"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
type PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsageNone PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsage = "off_session" PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsageOnSession PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsage = "on_session" )
List of values that PaymentIntentPaymentMethodOptionsCashAppSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsCustomerBalance ¶
type PaymentIntentPaymentMethodOptionsCustomerBalance struct { BankTransfer *PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer `json:"bank_transfer"` // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. FundingType PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer ¶
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer struct { EUBankTransfer *PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer `json:"eu_bank_transfer"` // List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. // // Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. RequestedAddressTypes []PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType `json:"requested_address_types"` // The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. Type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType `json:"type"` }
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer ¶
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct { // The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. Country string `json:"country"` }
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams ¶
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams struct { // The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. Country *string `form:"country"` }
Configuration for the eu_bank_transfer funding type.
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferParams ¶
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferParams struct { // Configuration for the eu_bank_transfer funding type. EUBankTransfer *PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"` // List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. // // Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. RequestedAddressTypes []*string `form:"requested_address_types"` // The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. Type *string `form:"type"` }
Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType ¶
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType string
List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
const ( PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeABA PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "aba" PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeIBAN PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "iban" PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSEPA PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sepa" PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSortCode PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sort_code" PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSpei PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "spei" PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSwift PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "swift" PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeZengin PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "zengin" )
List of values that PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType can take
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType ¶
type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType string
The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
const ( PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferTypeEUBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType = "eu_bank_transfer" PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferTypeGBBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType = "gb_bank_transfer" PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferTypeJPBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType = "jp_bank_transfer" PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferTypeMXBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType = "mx_bank_transfer" PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferTypeUSBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType = "us_bank_transfer" )
List of values that PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType can take
type PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType ¶
type PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType string
The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
const (
PaymentIntentPaymentMethodOptionsCustomerBalanceFundingTypeBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType = "bank_transfer"
)
List of values that PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType can take
type PaymentIntentPaymentMethodOptionsCustomerBalanceParams ¶
type PaymentIntentPaymentMethodOptionsCustomerBalanceParams struct { // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. BankTransfer *PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"` // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. FundingType *string `form:"funding_type"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
type PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsageNone PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsEPS ¶
type PaymentIntentPaymentMethodOptionsEPS struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsEPSParams ¶
type PaymentIntentPaymentMethodOptionsEPSParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
type PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsEPSSetupFutureUsageNone PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsFPX ¶
type PaymentIntentPaymentMethodOptionsFPX struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsFPXParams ¶
type PaymentIntentPaymentMethodOptionsFPXParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
type PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsFPXSetupFutureUsageNone PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsGiropay ¶
type PaymentIntentPaymentMethodOptionsGiropay struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsGiropayParams ¶
type PaymentIntentPaymentMethodOptionsGiropayParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
type PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsGrabpay ¶
type PaymentIntentPaymentMethodOptionsGrabpay struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsGrabpayParams ¶
type PaymentIntentPaymentMethodOptionsGrabpayParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
type PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsIDEAL ¶
type PaymentIntentPaymentMethodOptionsIDEAL struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsIDEALParams ¶
type PaymentIntentPaymentMethodOptionsIDEALParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
type PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsageNone PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage = "off_session" )
List of values that PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsInteracPresent ¶
type PaymentIntentPaymentMethodOptionsInteracPresent struct{}
type PaymentIntentPaymentMethodOptionsInteracPresentParams ¶
type PaymentIntentPaymentMethodOptionsInteracPresentParams struct{}
If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
type PaymentIntentPaymentMethodOptionsKlarna ¶
type PaymentIntentPaymentMethodOptionsKlarna struct { // Controls when the funds will be captured from the customer's account. CaptureMethod PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod `json:"capture_method"` // Preferred locale of the Klarna checkout page that the customer is redirected to. PreferredLocale string `json:"preferred_locale"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod ¶
type PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod string
Controls when the funds will be captured from the customer's account.
const (
PaymentIntentPaymentMethodOptionsKlarnaCaptureMethodManual PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod = "manual"
)
List of values that PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod can take
type PaymentIntentPaymentMethodOptionsKlarnaParams ¶
type PaymentIntentPaymentMethodOptionsKlarnaParams struct { // Controls when the funds will be captured from the customer's account. // // If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. // // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. CaptureMethod *string `form:"capture_method"` // Preferred language of the Klarna authorization page that the customer is redirected to PreferredLocale *string `form:"preferred_locale"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
type PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsageNone PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsKonbini ¶
type PaymentIntentPaymentMethodOptionsKonbini struct { // An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. ConfirmationNumber string `json:"confirmation_number"` // The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. ExpiresAfterDays int64 `json:"expires_after_days"` // The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. ExpiresAt int64 `json:"expires_at"` // A product descriptor of up to 22 characters, which will appear to customers at the convenience store. ProductDescription string `json:"product_description"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsKonbiniParams ¶
type PaymentIntentPaymentMethodOptionsKonbiniParams struct { // An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. ConfirmationNumber *string `form:"confirmation_number"` // The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. ExpiresAfterDays *int64 `form:"expires_after_days"` // The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. ExpiresAt *int64 `form:"expires_at"` // A product descriptor of up to 22 characters, which will appear to customers at the convenience store. ProductDescription *string `form:"product_description"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
type PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsageNone PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsLink ¶
type PaymentIntentPaymentMethodOptionsLink struct { // Controls when the funds will be captured from the customer's account. CaptureMethod PaymentIntentPaymentMethodOptionsLinkCaptureMethod `json:"capture_method"` // [Deprecated] This is a legacy parameter that no longer has any function. PersistentToken string `json:"persistent_token"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsLinkCaptureMethod ¶
type PaymentIntentPaymentMethodOptionsLinkCaptureMethod string
Controls when the funds will be captured from the customer's account.
const (
PaymentIntentPaymentMethodOptionsLinkCaptureMethodManual PaymentIntentPaymentMethodOptionsLinkCaptureMethod = "manual"
)
List of values that PaymentIntentPaymentMethodOptionsLinkCaptureMethod can take
type PaymentIntentPaymentMethodOptionsLinkParams ¶
type PaymentIntentPaymentMethodOptionsLinkParams struct { // Controls when the funds will be captured from the customer's account. // // If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. // // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. CaptureMethod *string `form:"capture_method"` // [Deprecated] This is a legacy parameter that no longer has any function. PersistentToken *string `form:"persistent_token"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
type PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsLinkSetupFutureUsageNone PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsLinkSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage = "off_session" )
List of values that PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsOXXO ¶
type PaymentIntentPaymentMethodOptionsOXXO struct { // The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. ExpiresAfterDays int64 `json:"expires_after_days"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsOXXOParams ¶
type PaymentIntentPaymentMethodOptionsOXXOParams struct { // The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. ExpiresAfterDays *int64 `form:"expires_after_days"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
type PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsageNone PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsP24 ¶
type PaymentIntentPaymentMethodOptionsP24 struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsP24SetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsP24Params ¶
type PaymentIntentPaymentMethodOptionsP24Params struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` // Confirm that the payer has accepted the P24 terms and conditions. TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"` }
If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
type PaymentIntentPaymentMethodOptionsP24SetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsP24SetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsP24SetupFutureUsageNone PaymentIntentPaymentMethodOptionsP24SetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsP24SetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsParams ¶
type PaymentIntentPaymentMethodOptionsParams struct { // If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. ACSSDebit *PaymentIntentPaymentMethodOptionsACSSDebitParams `form:"acss_debit"` // If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. Affirm *PaymentIntentPaymentMethodOptionsAffirmParams `form:"affirm"` // If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. AfterpayClearpay *PaymentIntentPaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. Alipay *PaymentIntentPaymentMethodOptionsAlipayParams `form:"alipay"` // If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. AUBECSDebit *PaymentIntentPaymentMethodOptionsAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. BACSDebit *PaymentIntentPaymentMethodOptionsBACSDebitParams `form:"bacs_debit"` // If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. Bancontact *PaymentIntentPaymentMethodOptionsBancontactParams `form:"bancontact"` // If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. BLIK *PaymentIntentPaymentMethodOptionsBLIKParams `form:"blik"` // If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. Boleto *PaymentIntentPaymentMethodOptionsBoletoParams `form:"boleto"` // Configuration for any card payments attempted on this PaymentIntent. Card *PaymentIntentPaymentMethodOptionsCardParams `form:"card"` // If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. CardPresent *PaymentIntentPaymentMethodOptionsCardPresentParams `form:"card_present"` // If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. CashApp *PaymentIntentPaymentMethodOptionsCashAppParams `form:"cashapp"` // If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. CustomerBalance *PaymentIntentPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"` // If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. EPS *PaymentIntentPaymentMethodOptionsEPSParams `form:"eps"` // If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. FPX *PaymentIntentPaymentMethodOptionsFPXParams `form:"fpx"` // If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. Giropay *PaymentIntentPaymentMethodOptionsGiropayParams `form:"giropay"` // If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. Grabpay *PaymentIntentPaymentMethodOptionsGrabpayParams `form:"grabpay"` // If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. IDEAL *PaymentIntentPaymentMethodOptionsIDEALParams `form:"ideal"` // If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. InteracPresent *PaymentIntentPaymentMethodOptionsInteracPresentParams `form:"interac_present"` // If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. Klarna *PaymentIntentPaymentMethodOptionsKlarnaParams `form:"klarna"` // If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. Konbini *PaymentIntentPaymentMethodOptionsKonbiniParams `form:"konbini"` // If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. Link *PaymentIntentPaymentMethodOptionsLinkParams `form:"link"` // If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. OXXO *PaymentIntentPaymentMethodOptionsOXXOParams `form:"oxxo"` // If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. P24 *PaymentIntentPaymentMethodOptionsP24Params `form:"p24"` // If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. PayNow *PaymentIntentPaymentMethodOptionsPayNowParams `form:"paynow"` // If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. Paypal *PaymentIntentPaymentMethodOptionsPaypalParams `form:"paypal"` // If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. Pix *PaymentIntentPaymentMethodOptionsPixParams `form:"pix"` // If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. PromptPay *PaymentIntentPaymentMethodOptionsPromptPayParams `form:"promptpay"` // If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. SEPADebit *PaymentIntentPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"` // If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. Sofort *PaymentIntentPaymentMethodOptionsSofortParams `form:"sofort"` // If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. USBankAccount *PaymentIntentPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"` // If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. WeChatPay *PaymentIntentPaymentMethodOptionsWeChatPayParams `form:"wechat_pay"` // If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. Zip *PaymentIntentPaymentMethodOptionsZipParams `form:"zip"` }
Payment method-specific configuration for this PaymentIntent.
type PaymentIntentPaymentMethodOptionsPayNow ¶
type PaymentIntentPaymentMethodOptionsPayNow struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsPayNowParams ¶
type PaymentIntentPaymentMethodOptionsPayNowParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
type PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsageNone PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsPaypal ¶
type PaymentIntentPaymentMethodOptionsPaypal struct { // Controls when the funds will be captured from the customer's account. CaptureMethod PaymentIntentPaymentMethodOptionsPaypalCaptureMethod `json:"capture_method"` // Preferred locale of the PayPal checkout page that the customer is redirected to. PreferredLocale string `json:"preferred_locale"` // A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. Reference string `json:"reference"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsPaypalCaptureMethod ¶
type PaymentIntentPaymentMethodOptionsPaypalCaptureMethod string
Controls when the funds will be captured from the customer's account.
const (
PaymentIntentPaymentMethodOptionsPaypalCaptureMethodManual PaymentIntentPaymentMethodOptionsPaypalCaptureMethod = "manual"
)
List of values that PaymentIntentPaymentMethodOptionsPaypalCaptureMethod can take
type PaymentIntentPaymentMethodOptionsPaypalParams ¶
type PaymentIntentPaymentMethodOptionsPaypalParams struct { // Controls when the funds will be captured from the customer's account. CaptureMethod *string `form:"capture_method"` // [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. PreferredLocale *string `form:"preferred_locale"` // A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. Reference *string `form:"reference"` // The risk correlation ID for an on-session payment using a saved PayPal payment method. RiskCorrelationID *string `form:"risk_correlation_id"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
type PaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsPaypalSetupFutureUsageNone PaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsPaypalSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage = "off_session" )
List of values that PaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsPix ¶
type PaymentIntentPaymentMethodOptionsPix struct { // The number of seconds (between 10 and 1209600) after which Pix payment will expire. ExpiresAfterSeconds int64 `json:"expires_after_seconds"` // The timestamp at which the Pix expires. ExpiresAt int64 `json:"expires_at"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsPixSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsPixParams ¶
type PaymentIntentPaymentMethodOptionsPixParams struct { // The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. ExpiresAfterSeconds *int64 `form:"expires_after_seconds"` // The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. ExpiresAt *int64 `form:"expires_at"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
type PaymentIntentPaymentMethodOptionsPixSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsPixSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsPixSetupFutureUsageNone PaymentIntentPaymentMethodOptionsPixSetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsPixSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsPromptPay ¶
type PaymentIntentPaymentMethodOptionsPromptPay struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsPromptPayParams ¶
type PaymentIntentPaymentMethodOptionsPromptPayParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
type PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsSEPADebit ¶
type PaymentIntentPaymentMethodOptionsSEPADebit struct { MandateOptions *PaymentIntentPaymentMethodOptionsSEPADebitMandateOptions `json:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptions ¶
type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptions struct{}
type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptionsParams ¶
type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptionsParams struct{}
Additional fields for Mandate creation
type PaymentIntentPaymentMethodOptionsSEPADebitParams ¶
type PaymentIntentPaymentMethodOptionsSEPADebitParams struct { // Additional fields for Mandate creation MandateOptions *PaymentIntentPaymentMethodOptionsSEPADebitMandateOptionsParams `form:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
type PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsageNone PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage = "off_session" PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsageOnSession PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage = "on_session" )
List of values that PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsSofort ¶
type PaymentIntentPaymentMethodOptionsSofort struct { // Preferred language of the SOFORT authorization page that the customer is redirected to. PreferredLanguage string `json:"preferred_language"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsSofortParams ¶
type PaymentIntentPaymentMethodOptionsSofortParams struct { // Language shown to the payer on redirect. PreferredLanguage *string `form:"preferred_language"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
type PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsSofortSetupFutureUsageNone PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsSofortSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage = "off_session" )
List of values that PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsUSBankAccount ¶
type PaymentIntentPaymentMethodOptionsUSBankAccount struct { FinancialConnections *PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"` // Preferred transaction settlement speed PreferredSettlementSpeed PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed `json:"preferred_settlement_speed"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage `json:"setup_future_usage"` // Bank account verification method. VerificationMethod PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"` }
type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections ¶
type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` // Data features requested to be retrieved upon account creation. Prefetch []PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL string `json:"return_url"` }
type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams ¶
type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. Permissions []*string `form:"permissions"` // List of data features that you would like to retrieve upon account creation. Prefetch []*string `form:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL *string `form:"return_url"` }
Additional fields for Financial Connections Session creation
type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission ¶
type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string
The list of permissions to request. The `payment_method` permission must be included.
const ( PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances" PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "ownership" PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method" PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" )
List of values that PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take
type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch ¶ added in v75.2.0
type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string
Data features requested to be retrieved upon account creation.
const (
PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances"
)
List of values that PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take
type PaymentIntentPaymentMethodOptionsUSBankAccountNetworksParams ¶
type PaymentIntentPaymentMethodOptionsUSBankAccountNetworksParams struct { // Triggers validations to run across the selected networks Requested []*string `form:"requested"` }
Additional fields for network related functions
type PaymentIntentPaymentMethodOptionsUSBankAccountParams ¶
type PaymentIntentPaymentMethodOptionsUSBankAccountParams struct { // Additional fields for Financial Connections Session creation FinancialConnections *PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"` // Additional fields for network related functions Networks *PaymentIntentPaymentMethodOptionsUSBankAccountNetworksParams `form:"networks"` // Preferred transaction settlement speed PreferredSettlementSpeed *string `form:"preferred_settlement_speed"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` // Verification method for the intent VerificationMethod *string `form:"verification_method"` }
If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
type PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed ¶
type PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed string
Preferred transaction settlement speed
const ( PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeedFastest PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed = "fastest" PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeedStandard PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed = "standard" )
List of values that PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed can take
type PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsageNone PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage = "none" PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage = "off_session" PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsageOnSession PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage = "on_session" )
List of values that PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod ¶
type PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod string
Bank account verification method.
const ( PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic" PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethodInstant PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "instant" PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethodMicrodeposits PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "microdeposits" )
List of values that PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod can take
type PaymentIntentPaymentMethodOptionsWeChatPay ¶
type PaymentIntentPaymentMethodOptionsWeChatPay struct { // The app ID registered with WeChat Pay. Only required when client is ios or android. AppID string `json:"app_id"` // The client type that the end customer will pay from Client PaymentIntentPaymentMethodOptionsWeChatPayClient `json:"client"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsWeChatPayClient ¶
type PaymentIntentPaymentMethodOptionsWeChatPayClient string
The client type that the end customer will pay from
const ( PaymentIntentPaymentMethodOptionsWeChatPayClientAndroid PaymentIntentPaymentMethodOptionsWeChatPayClient = "android" PaymentIntentPaymentMethodOptionsWeChatPayClientIOS PaymentIntentPaymentMethodOptionsWeChatPayClient = "ios" PaymentIntentPaymentMethodOptionsWeChatPayClientWeb PaymentIntentPaymentMethodOptionsWeChatPayClient = "web" )
List of values that PaymentIntentPaymentMethodOptionsWeChatPayClient can take
type PaymentIntentPaymentMethodOptionsWeChatPayParams ¶
type PaymentIntentPaymentMethodOptionsWeChatPayParams struct { // The app ID registered with WeChat Pay. Only required when client is ios or android. AppID *string `form:"app_id"` // The client type that the end customer will pay from Client *string `form:"client"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
type PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage can take
type PaymentIntentPaymentMethodOptionsZip ¶
type PaymentIntentPaymentMethodOptionsZip struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsZipSetupFutureUsage `json:"setup_future_usage"` }
type PaymentIntentPaymentMethodOptionsZipParams ¶
type PaymentIntentPaymentMethodOptionsZipParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. // // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). // // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. SetupFutureUsage *string `form:"setup_future_usage"` }
If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
type PaymentIntentPaymentMethodOptionsZipSetupFutureUsage ¶
type PaymentIntentPaymentMethodOptionsZipSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const (
PaymentIntentPaymentMethodOptionsZipSetupFutureUsageNone PaymentIntentPaymentMethodOptionsZipSetupFutureUsage = "none"
)
List of values that PaymentIntentPaymentMethodOptionsZipSetupFutureUsage can take
type PaymentIntentProcessing ¶
type PaymentIntentProcessing struct { Card *PaymentIntentProcessingCard `json:"card"` // Type of the payment method for which payment is in `processing` state, one of `card`. Type PaymentIntentProcessingType `json:"type"` }
If present, this property tells you about the processing state of the payment.
type PaymentIntentProcessingCard ¶
type PaymentIntentProcessingCard struct {
CustomerNotification *PaymentIntentProcessingCardCustomerNotification `json:"customer_notification"`
}
type PaymentIntentProcessingCardCustomerNotification ¶
type PaymentIntentProcessingCardCustomerNotification struct { // Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. ApprovalRequested bool `json:"approval_requested"` // If customer approval is required, they need to provide approval before this time. CompletesAt int64 `json:"completes_at"` }
type PaymentIntentProcessingType ¶
type PaymentIntentProcessingType string
Type of the payment method for which payment is in `processing` state, one of `card`.
const (
PaymentIntentProcessingTypeCard PaymentIntentProcessingType = "card"
)
List of values that PaymentIntentProcessingType can take
type PaymentIntentRadarOptionsParams ¶
type PaymentIntentRadarOptionsParams struct { // 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. Session *string `form:"session"` }
Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
type PaymentIntentSearchParams ¶
type PaymentIntentSearchParams struct { SearchParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. Page *string `form:"page"` }
Search for PaymentIntents you've previously created using Stripe's [Search Query Language](https://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.
func (*PaymentIntentSearchParams) AddExpand ¶
func (p *PaymentIntentSearchParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentIntentSearchResult ¶
type PaymentIntentSearchResult struct { APIResource SearchMeta Data []*PaymentIntent `json:"data"` }
PaymentIntentSearchResult is a list of PaymentIntent search results as retrieved from a search endpoint.
type PaymentIntentSetupFutureUsage ¶
type PaymentIntentSetupFutureUsage string
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter 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. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
const ( PaymentIntentSetupFutureUsageOffSession PaymentIntentSetupFutureUsage = "off_session" PaymentIntentSetupFutureUsageOnSession PaymentIntentSetupFutureUsage = "on_session" )
List of values that PaymentIntentSetupFutureUsage can take
type PaymentIntentStatus ¶
type PaymentIntentStatus string
Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).
const ( PaymentIntentStatusCanceled PaymentIntentStatus = "canceled" PaymentIntentStatusProcessing PaymentIntentStatus = "processing" PaymentIntentStatusRequiresAction PaymentIntentStatus = "requires_action" PaymentIntentStatusRequiresCapture PaymentIntentStatus = "requires_capture" PaymentIntentStatusRequiresConfirmation PaymentIntentStatus = "requires_confirmation" PaymentIntentStatusRequiresPaymentMethod PaymentIntentStatus = "requires_payment_method" PaymentIntentStatusSucceeded PaymentIntentStatus = "succeeded" )
List of values that PaymentIntentStatus can take
type PaymentIntentTransferData ¶
type PaymentIntentTransferData struct { // Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/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://stripe.com/docs/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 int64 `json:"amount"` // The account (if any) that the payment is attributed to for tax // reporting, and where funds from the payment are transferred to after // payment success. Destination *Account `json:"destination"` }
The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
type PaymentIntentTransferDataParams ¶
type PaymentIntentTransferDataParams struct { // The amount that will be transferred automatically when a charge succeeds. // The amount is capped at the total transaction amount and if no amount is set, // the full amount is transferred. // // If you intend to collect a fee and you need a more robust reporting experience, using // [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) // might be a better fit for your integration. Amount *int64 `form:"amount"` // If specified, successful charges will be attributed to the destination // account for tax reporting, and the funds from charges will be transferred // to the destination account. The ID of the resulting transfer will be // returned on the successful charge's `transfer` field. Destination *string `form:"destination"` }
The parameters that you can use to automatically create a Transfer after the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
type PaymentIntentVerifyMicrodepositsParams ¶
type PaymentIntentVerifyMicrodepositsParams struct { Params `form:"*"` // Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. Amounts []*int64 `form:"amounts"` // A six-character code starting with SM present in the microdeposit sent to the bank account. DescriptorCode *string `form:"descriptor_code"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Verifies microdeposits on a PaymentIntent object.
func (*PaymentIntentVerifyMicrodepositsParams) AddExpand ¶
func (p *PaymentIntentVerifyMicrodepositsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentLink ¶
type PaymentLink struct { APIResource // Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. Active bool `json:"active"` AfterCompletion *PaymentLinkAfterCompletion `json:"after_completion"` // Whether user redeemable promotion codes are enabled. AllowPromotionCodes bool `json:"allow_promotion_codes"` // The ID of the Connect application that created the Payment Link. Application *Application `json:"application"` // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. ApplicationFeeAmount int64 `json:"application_fee_amount"` // This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. ApplicationFeePercent float64 `json:"application_fee_percent"` AutomaticTax *PaymentLinkAutomaticTax `json:"automatic_tax"` // Configuration for collecting the customer's billing address. BillingAddressCollection PaymentLinkBillingAddressCollection `json:"billing_address_collection"` // When set, provides configuration to gather active consent from customers. ConsentCollection *PaymentLinkConsentCollection `json:"consent_collection"` // 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 Currency `json:"currency"` // Configuration for Customer creation during checkout. CustomerCreation PaymentLinkCustomerCreation `json:"customer_creation"` // Collect additional information from your customer using custom fields. Up to 2 fields are supported. CustomFields []*PaymentLinkCustomField `json:"custom_fields"` CustomText *PaymentLinkCustomText `json:"custom_text"` // Unique identifier for the object. ID string `json:"id"` // Configuration for creating invoice for payment mode payment links. InvoiceCreation *PaymentLinkInvoiceCreation `json:"invoice_creation"` // The line items representing what is being sold. LineItems *LineItemList `json:"line_items"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. OnBehalfOf *Account `json:"on_behalf_of"` // Indicates the parameters to be passed to PaymentIntent creation during checkout. PaymentIntentData *PaymentLinkPaymentIntentData `json:"payment_intent_data"` // Configuration for collecting a payment method during checkout. PaymentMethodCollection PaymentLinkPaymentMethodCollection `json:"payment_method_collection"` // The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). PaymentMethodTypes []PaymentLinkPaymentMethodType `json:"payment_method_types"` PhoneNumberCollection *PaymentLinkPhoneNumberCollection `json:"phone_number_collection"` // Configuration for collecting the customer's shipping address. ShippingAddressCollection *PaymentLinkShippingAddressCollection `json:"shipping_address_collection"` // The shipping rate options applied to the session. ShippingOptions []*PaymentLinkShippingOption `json:"shipping_options"` // Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. SubmitType PaymentLinkSubmitType `json:"submit_type"` // When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. SubscriptionData *PaymentLinkSubscriptionData `json:"subscription_data"` TaxIDCollection *PaymentLinkTaxIDCollection `json:"tax_id_collection"` // The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. TransferData *PaymentLinkTransferData `json:"transfer_data"` // The public URL that can be shared with customers. URL string `json:"url"` }
A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.
When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.
Related guide: [Payment Links API](https://stripe.com/docs/payment-links)
func (*PaymentLink) UnmarshalJSON ¶
func (p *PaymentLink) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a PaymentLink. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type PaymentLinkAfterCompletion ¶
type PaymentLinkAfterCompletion struct { HostedConfirmation *PaymentLinkAfterCompletionHostedConfirmation `json:"hosted_confirmation"` Redirect *PaymentLinkAfterCompletionRedirect `json:"redirect"` // The specified behavior after the purchase is complete. Type PaymentLinkAfterCompletionType `json:"type"` }
type PaymentLinkAfterCompletionHostedConfirmation ¶
type PaymentLinkAfterCompletionHostedConfirmation struct { // The custom message that is displayed to the customer after the purchase is complete. CustomMessage string `json:"custom_message"` }
type PaymentLinkAfterCompletionHostedConfirmationParams ¶
type PaymentLinkAfterCompletionHostedConfirmationParams struct { // A custom message to display to the customer after the purchase is complete. CustomMessage *string `form:"custom_message"` }
Configuration when `type=hosted_confirmation`.
type PaymentLinkAfterCompletionParams ¶
type PaymentLinkAfterCompletionParams struct { // Configuration when `type=hosted_confirmation`. HostedConfirmation *PaymentLinkAfterCompletionHostedConfirmationParams `form:"hosted_confirmation"` // Configuration when `type=redirect`. Redirect *PaymentLinkAfterCompletionRedirectParams `form:"redirect"` // The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. Type *string `form:"type"` }
Behavior after the purchase is complete.
type PaymentLinkAfterCompletionRedirect ¶
type PaymentLinkAfterCompletionRedirect struct { // The URL the customer will be redirected to after the purchase is complete. URL string `json:"url"` }
type PaymentLinkAfterCompletionRedirectParams ¶
type PaymentLinkAfterCompletionRedirectParams struct { // The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. URL *string `form:"url"` }
Configuration when `type=redirect`.
type PaymentLinkAfterCompletionType ¶
type PaymentLinkAfterCompletionType string
The specified behavior after the purchase is complete.
const ( PaymentLinkAfterCompletionTypeHostedConfirmation PaymentLinkAfterCompletionType = "hosted_confirmation" PaymentLinkAfterCompletionTypeRedirect PaymentLinkAfterCompletionType = "redirect" )
List of values that PaymentLinkAfterCompletionType can take
type PaymentLinkAutomaticTax ¶
type PaymentLinkAutomaticTax struct { // If `true`, tax will be calculated automatically using the customer's location. Enabled bool `json:"enabled"` }
type PaymentLinkAutomaticTaxParams ¶
type PaymentLinkAutomaticTaxParams struct { // If `true`, tax will be calculated automatically using the customer's location. Enabled *bool `form:"enabled"` }
Configuration for automatic tax collection.
type PaymentLinkBillingAddressCollection ¶
type PaymentLinkBillingAddressCollection string
Configuration for collecting the customer's billing address.
const ( PaymentLinkBillingAddressCollectionAuto PaymentLinkBillingAddressCollection = "auto" PaymentLinkBillingAddressCollectionRequired PaymentLinkBillingAddressCollection = "required" )
List of values that PaymentLinkBillingAddressCollection can take
type PaymentLinkConsentCollection ¶
type PaymentLinkConsentCollection struct { // If set to `auto`, enables the collection of customer consent for promotional communications. Promotions PaymentLinkConsentCollectionPromotions `json:"promotions"` // If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. TermsOfService PaymentLinkConsentCollectionTermsOfService `json:"terms_of_service"` }
When set, provides configuration to gather active consent from customers.
type PaymentLinkConsentCollectionParams ¶
type PaymentLinkConsentCollectionParams struct { // If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout // Session will determine whether to display an option to opt into promotional communication // from the merchant depending on the customer's locale. Only available to US merchants. Promotions *string `form:"promotions"` // If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. // There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). TermsOfService *string `form:"terms_of_service"` }
Configure fields to gather active consent from customers.
type PaymentLinkConsentCollectionPromotions ¶
type PaymentLinkConsentCollectionPromotions string
If set to `auto`, enables the collection of customer consent for promotional communications.
const ( PaymentLinkConsentCollectionPromotionsAuto PaymentLinkConsentCollectionPromotions = "auto" PaymentLinkConsentCollectionPromotionsNone PaymentLinkConsentCollectionPromotions = "none" )
List of values that PaymentLinkConsentCollectionPromotions can take
type PaymentLinkConsentCollectionTermsOfService ¶
type PaymentLinkConsentCollectionTermsOfService string
If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service.
const ( PaymentLinkConsentCollectionTermsOfServiceNone PaymentLinkConsentCollectionTermsOfService = "none" PaymentLinkConsentCollectionTermsOfServiceRequired PaymentLinkConsentCollectionTermsOfService = "required" )
List of values that PaymentLinkConsentCollectionTermsOfService can take
type PaymentLinkCustomField ¶
type PaymentLinkCustomField struct { Dropdown *PaymentLinkCustomFieldDropdown `json:"dropdown"` // String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. Key string `json:"key"` Label *PaymentLinkCustomFieldLabel `json:"label"` Numeric *PaymentLinkCustomFieldNumeric `json:"numeric"` // Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. Optional bool `json:"optional"` Text *PaymentLinkCustomFieldText `json:"text"` // The type of the field. Type PaymentLinkCustomFieldType `json:"type"` }
Collect additional information from your customer using custom fields. Up to 2 fields are supported.
type PaymentLinkCustomFieldDropdown ¶
type PaymentLinkCustomFieldDropdown struct { // The options available for the customer to select. Up to 200 options allowed. Options []*PaymentLinkCustomFieldDropdownOption `json:"options"` }
type PaymentLinkCustomFieldDropdownOption ¶
type PaymentLinkCustomFieldDropdownOption struct { // The label for the option, displayed to the customer. Up to 100 characters. Label string `json:"label"` // The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. Value string `json:"value"` }
The options available for the customer to select. Up to 200 options allowed.
type PaymentLinkCustomFieldDropdownOptionParams ¶
type PaymentLinkCustomFieldDropdownOptionParams struct { // The label for the option, displayed to the customer. Up to 100 characters. Label *string `form:"label"` // The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. Value *string `form:"value"` }
The options available for the customer to select. Up to 200 options allowed.
type PaymentLinkCustomFieldDropdownParams ¶
type PaymentLinkCustomFieldDropdownParams struct { // The options available for the customer to select. Up to 200 options allowed. Options []*PaymentLinkCustomFieldDropdownOptionParams `form:"options"` }
Configuration for `type=dropdown` fields.
type PaymentLinkCustomFieldLabel ¶
type PaymentLinkCustomFieldLabel struct { // Custom text for the label, displayed to the customer. Up to 50 characters. Custom string `json:"custom"` // The type of the label. Type PaymentLinkCustomFieldLabelType `json:"type"` }
type PaymentLinkCustomFieldLabelParams ¶
type PaymentLinkCustomFieldLabelParams struct { // Custom text for the label, displayed to the customer. Up to 50 characters. Custom *string `form:"custom"` // The type of the label. Type *string `form:"type"` }
The label for the field, displayed to the customer.
type PaymentLinkCustomFieldLabelType ¶
type PaymentLinkCustomFieldLabelType string
The type of the label.
const (
PaymentLinkCustomFieldLabelTypeCustom PaymentLinkCustomFieldLabelType = "custom"
)
List of values that PaymentLinkCustomFieldLabelType can take
type PaymentLinkCustomFieldNumericParams ¶
type PaymentLinkCustomFieldNumericParams struct { // The maximum character length constraint for the customer's input. MaximumLength *int64 `form:"maximum_length"` // The minimum character length requirement for the customer's input. MinimumLength *int64 `form:"minimum_length"` }
Configuration for `type=numeric` fields.
type PaymentLinkCustomFieldParams ¶
type PaymentLinkCustomFieldParams struct { // Configuration for `type=dropdown` fields. Dropdown *PaymentLinkCustomFieldDropdownParams `form:"dropdown"` // String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. Key *string `form:"key"` // The label for the field, displayed to the customer. Label *PaymentLinkCustomFieldLabelParams `form:"label"` // Configuration for `type=numeric` fields. Numeric *PaymentLinkCustomFieldNumericParams `form:"numeric"` // Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. Optional *bool `form:"optional"` // Configuration for `type=text` fields. Text *PaymentLinkCustomFieldTextParams `form:"text"` // The type of the field. Type *string `form:"type"` }
Collect additional information from your customer using custom fields. Up to 2 fields are supported.
type PaymentLinkCustomFieldTextParams ¶
type PaymentLinkCustomFieldTextParams struct { // The maximum character length constraint for the customer's input. MaximumLength *int64 `form:"maximum_length"` // The minimum character length requirement for the customer's input. MinimumLength *int64 `form:"minimum_length"` }
Configuration for `type=text` fields.
type PaymentLinkCustomFieldType ¶
type PaymentLinkCustomFieldType string
The type of the field.
const ( PaymentLinkCustomFieldTypeDropdown PaymentLinkCustomFieldType = "dropdown" PaymentLinkCustomFieldTypeNumeric PaymentLinkCustomFieldType = "numeric" PaymentLinkCustomFieldTypeText PaymentLinkCustomFieldType = "text" )
List of values that PaymentLinkCustomFieldType can take
type PaymentLinkCustomText ¶
type PaymentLinkCustomText struct { // Custom text that should be displayed alongside shipping address collection. ShippingAddress *PaymentLinkCustomTextShippingAddress `json:"shipping_address"` // Custom text that should be displayed alongside the payment confirmation button. Submit *PaymentLinkCustomTextSubmit `json:"submit"` // Custom text that should be displayed in place of the default terms of service agreement text. TermsOfServiceAcceptance *PaymentLinkCustomTextTermsOfServiceAcceptance `json:"terms_of_service_acceptance"` }
type PaymentLinkCustomTextParams ¶
type PaymentLinkCustomTextParams struct { // Custom text that should be displayed alongside shipping address collection. ShippingAddress *PaymentLinkCustomTextShippingAddressParams `form:"shipping_address"` // Custom text that should be displayed alongside the payment confirmation button. Submit *PaymentLinkCustomTextSubmitParams `form:"submit"` // Custom text that should be displayed in place of the default terms of service agreement text. TermsOfServiceAcceptance *PaymentLinkCustomTextTermsOfServiceAcceptanceParams `form:"terms_of_service_acceptance"` }
Display additional text for your customers using custom text.
type PaymentLinkCustomTextShippingAddress ¶
type PaymentLinkCustomTextShippingAddress struct { // Text may be up to 1200 characters in length. Message string `json:"message"` }
Custom text that should be displayed alongside shipping address collection.
type PaymentLinkCustomTextShippingAddressParams ¶
type PaymentLinkCustomTextShippingAddressParams struct { // Text may be up to 1200 characters in length. Message *string `form:"message"` }
Custom text that should be displayed alongside shipping address collection.
type PaymentLinkCustomTextSubmit ¶
type PaymentLinkCustomTextSubmit struct { // Text may be up to 1200 characters in length. Message string `json:"message"` }
Custom text that should be displayed alongside the payment confirmation button.
type PaymentLinkCustomTextSubmitParams ¶
type PaymentLinkCustomTextSubmitParams struct { // Text may be up to 1200 characters in length. Message *string `form:"message"` }
Custom text that should be displayed alongside the payment confirmation button.
type PaymentLinkCustomTextTermsOfServiceAcceptance ¶ added in v75.7.0
type PaymentLinkCustomTextTermsOfServiceAcceptance struct { // Text may be up to 1200 characters in length. Message string `json:"message"` }
Custom text that should be displayed in place of the default terms of service agreement text.
type PaymentLinkCustomTextTermsOfServiceAcceptanceParams ¶ added in v75.7.0
type PaymentLinkCustomTextTermsOfServiceAcceptanceParams struct { // Text may be up to 1200 characters in length. Message *string `form:"message"` }
Custom text that should be displayed in place of the default terms of service agreement text.
type PaymentLinkCustomerCreation ¶
type PaymentLinkCustomerCreation string
Configuration for Customer creation during checkout.
const ( PaymentLinkCustomerCreationAlways PaymentLinkCustomerCreation = "always" PaymentLinkCustomerCreationIfRequired PaymentLinkCustomerCreation = "if_required" )
List of values that PaymentLinkCustomerCreation can take
type PaymentLinkInvoiceCreation ¶
type PaymentLinkInvoiceCreation struct { // Enable creating an invoice on successful payment. Enabled bool `json:"enabled"` // Configuration for the invoice. Default invoice values will be used if unspecified. InvoiceData *PaymentLinkInvoiceCreationInvoiceData `json:"invoice_data"` }
Configuration for creating invoice for payment mode payment links.
type PaymentLinkInvoiceCreationInvoiceData ¶
type PaymentLinkInvoiceCreationInvoiceData struct { // The account tax IDs associated with the invoice. AccountTaxIDs []*TaxID `json:"account_tax_ids"` // A list of up to 4 custom fields to be displayed on the invoice. CustomFields []*PaymentLinkInvoiceCreationInvoiceDataCustomField `json:"custom_fields"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` Footer string `json:"footer"` // 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. Metadata map[string]string `json:"metadata"` // Options for invoice PDF rendering. RenderingOptions *PaymentLinkInvoiceCreationInvoiceDataRenderingOptions `json:"rendering_options"` }
Configuration for the invoice. Default invoice values will be used if unspecified.
type PaymentLinkInvoiceCreationInvoiceDataCustomField ¶
type PaymentLinkInvoiceCreationInvoiceDataCustomField struct { // The name of the custom field. Name string `json:"name"` // The value of the custom field. Value string `json:"value"` }
A list of up to 4 custom fields to be displayed on the invoice.
type PaymentLinkInvoiceCreationInvoiceDataCustomFieldParams ¶
type PaymentLinkInvoiceCreationInvoiceDataCustomFieldParams struct { // The name of the custom field. This may be up to 30 characters. Name *string `form:"name"` // The value of the custom field. This may be up to 30 characters. Value *string `form:"value"` }
Default custom fields to be displayed on invoices for this customer.
type PaymentLinkInvoiceCreationInvoiceDataParams ¶
type PaymentLinkInvoiceCreationInvoiceDataParams struct { // The account tax IDs associated with the invoice. AccountTaxIDs []*string `form:"account_tax_ids"` // Default custom fields to be displayed on invoices for this customer. CustomFields []*PaymentLinkInvoiceCreationInvoiceDataCustomFieldParams `form:"custom_fields"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` Footer *string `form:"footer"` // 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`. Metadata map[string]string `form:"metadata"` // Default options for invoice PDF rendering for this customer. RenderingOptions *PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsParams `form:"rendering_options"` }
Invoice PDF configuration.
func (*PaymentLinkInvoiceCreationInvoiceDataParams) AddMetadata ¶
func (p *PaymentLinkInvoiceCreationInvoiceDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PaymentLinkInvoiceCreationInvoiceDataRenderingOptions ¶
type PaymentLinkInvoiceCreationInvoiceDataRenderingOptions struct { // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. AmountTaxDisplay string `json:"amount_tax_display"` }
Options for invoice PDF rendering.
type PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsParams ¶
type PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsParams struct { // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. AmountTaxDisplay *string `form:"amount_tax_display"` }
Default options for invoice PDF rendering for this customer.
type PaymentLinkInvoiceCreationParams ¶
type PaymentLinkInvoiceCreationParams struct { // Whether the feature is enabled Enabled *bool `form:"enabled"` // Invoice PDF configuration. InvoiceData *PaymentLinkInvoiceCreationInvoiceDataParams `form:"invoice_data"` }
Generate a post-purchase Invoice for one-time payments.
type PaymentLinkLineItemAdjustableQuantityParams ¶
type PaymentLinkLineItemAdjustableQuantityParams struct { // Set to true if the quantity can be adjusted to any non-negative Integer. Enabled *bool `form:"enabled"` // The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. Maximum *int64 `form:"maximum"` // The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. Minimum *int64 `form:"minimum"` }
When set, provides configuration for this item's quantity to be adjusted by the customer during checkout.
type PaymentLinkLineItemParams ¶
type PaymentLinkLineItemParams struct { // When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. AdjustableQuantity *PaymentLinkLineItemAdjustableQuantityParams `form:"adjustable_quantity"` // The ID of an existing line item on the payment link. ID *string `form:"id"` // The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. Price *string `form:"price"` // The quantity of the line item being purchased. Quantity *int64 `form:"quantity"` }
The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
type PaymentLinkList ¶
type PaymentLinkList struct { APIResource ListMeta Data []*PaymentLink `json:"data"` }
PaymentLinkList is a list of PaymentLinks as retrieved from a list endpoint.
type PaymentLinkListLineItemsParams ¶
type PaymentLinkListLineItemsParams struct { ListParams `form:"*"` PaymentLink *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
func (*PaymentLinkListLineItemsParams) AddExpand ¶
func (p *PaymentLinkListLineItemsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentLinkListParams ¶
type PaymentLinkListParams struct { ListParams `form:"*"` // Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). Active *bool `form:"active"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of your payment links.
func (*PaymentLinkListParams) AddExpand ¶
func (p *PaymentLinkListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentLinkParams ¶
type PaymentLinkParams struct { Params `form:"*"` // Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. Active *bool `form:"active"` // Behavior after the purchase is complete. AfterCompletion *PaymentLinkAfterCompletionParams `form:"after_completion"` // Enables user redeemable promotion codes. AllowPromotionCodes *bool `form:"allow_promotion_codes"` // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. ApplicationFeeAmount *int64 `form:"application_fee_amount"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. ApplicationFeePercent *float64 `form:"application_fee_percent"` // Configuration for automatic tax collection. AutomaticTax *PaymentLinkAutomaticTaxParams `form:"automatic_tax"` // Configuration for collecting the customer's billing address. BillingAddressCollection *string `form:"billing_address_collection"` // Configure fields to gather active consent from customers. ConsentCollection *PaymentLinkConsentCollectionParams `form:"consent_collection"` // 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) and supported by each line item's price. Currency *string `form:"currency"` // Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). CustomerCreation *string `form:"customer_creation"` // Collect additional information from your customer using custom fields. Up to 2 fields are supported. CustomFields []*PaymentLinkCustomFieldParams `form:"custom_fields"` // Display additional text for your customers using custom text. CustomText *PaymentLinkCustomTextParams `form:"custom_text"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Generate a post-purchase Invoice for one-time payments. InvoiceCreation *PaymentLinkInvoiceCreationParams `form:"invoice_creation"` // The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. LineItems []*PaymentLinkLineItemParams `form:"line_items"` // 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`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. Metadata map[string]string `form:"metadata"` // The account on behalf of which to charge. OnBehalfOf *string `form:"on_behalf_of"` // A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. PaymentIntentData *PaymentLinkPaymentIntentDataParams `form:"payment_intent_data"` // Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. // // Can only be set in `subscription` mode. // // If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). PaymentMethodCollection *string `form:"payment_method_collection"` // The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). PaymentMethodTypes []*string `form:"payment_method_types"` // Controls phone number collection settings during checkout. // // We recommend that you review your privacy policy and check with your legal contacts. PhoneNumberCollection *PaymentLinkPhoneNumberCollectionParams `form:"phone_number_collection"` // Configuration for collecting the customer's shipping address. ShippingAddressCollection *PaymentLinkShippingAddressCollectionParams `form:"shipping_address_collection"` // The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. ShippingOptions []*PaymentLinkShippingOptionParams `form:"shipping_options"` // Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). SubmitType *string `form:"submit_type"` // When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. SubscriptionData *PaymentLinkSubscriptionDataParams `form:"subscription_data"` // Controls tax ID collection during checkout. TaxIDCollection *PaymentLinkTaxIDCollectionParams `form:"tax_id_collection"` // The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. TransferData *PaymentLinkTransferDataParams `form:"transfer_data"` }
Creates a payment link.
func (*PaymentLinkParams) AddExpand ¶
func (p *PaymentLinkParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PaymentLinkParams) AddMetadata ¶
func (p *PaymentLinkParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PaymentLinkPaymentIntentData ¶
type PaymentLinkPaymentIntentData struct { // Indicates when the funds will be captured from the customer's account. CaptureMethod PaymentLinkPaymentIntentDataCaptureMethod `json:"capture_method"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Metadata map[string]string `json:"metadata"` // Indicates that you intend to make future payments with the payment method collected during checkout. SetupFutureUsage PaymentLinkPaymentIntentDataSetupFutureUsage `json:"setup_future_usage"` // Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. StatementDescriptor string `json:"statement_descriptor"` // Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. StatementDescriptorSuffix string `json:"statement_descriptor_suffix"` }
Indicates the parameters to be passed to PaymentIntent creation during checkout.
type PaymentLinkPaymentIntentDataCaptureMethod ¶
type PaymentLinkPaymentIntentDataCaptureMethod string
Indicates when the funds will be captured from the customer's account.
const ( PaymentLinkPaymentIntentDataCaptureMethodAutomatic PaymentLinkPaymentIntentDataCaptureMethod = "automatic" PaymentLinkPaymentIntentDataCaptureMethodAutomaticAsync PaymentLinkPaymentIntentDataCaptureMethod = "automatic_async" PaymentLinkPaymentIntentDataCaptureMethodManual PaymentLinkPaymentIntentDataCaptureMethod = "manual" )
List of values that PaymentLinkPaymentIntentDataCaptureMethod can take
type PaymentLinkPaymentIntentDataParams ¶
type PaymentLinkPaymentIntentDataParams struct { // Controls when the funds will be captured from the customer's account. CaptureMethod *string `form:"capture_method"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. Metadata map[string]string `form:"metadata"` // Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. // // When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. // // When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. // // If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. // // If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. // // When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. SetupFutureUsage *string `form:"setup_future_usage"` // Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. StatementDescriptor *string `form:"statement_descriptor"` // Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` }
A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
func (*PaymentLinkPaymentIntentDataParams) AddMetadata ¶ added in v75.9.0
func (p *PaymentLinkPaymentIntentDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PaymentLinkPaymentIntentDataSetupFutureUsage ¶
type PaymentLinkPaymentIntentDataSetupFutureUsage string
Indicates that you intend to make future payments with the payment method collected during checkout.
const ( PaymentLinkPaymentIntentDataSetupFutureUsageOffSession PaymentLinkPaymentIntentDataSetupFutureUsage = "off_session" PaymentLinkPaymentIntentDataSetupFutureUsageOnSession PaymentLinkPaymentIntentDataSetupFutureUsage = "on_session" )
List of values that PaymentLinkPaymentIntentDataSetupFutureUsage can take
type PaymentLinkPaymentMethodCollection ¶
type PaymentLinkPaymentMethodCollection string
Configuration for collecting a payment method during checkout.
const ( PaymentLinkPaymentMethodCollectionAlways PaymentLinkPaymentMethodCollection = "always" PaymentLinkPaymentMethodCollectionIfRequired PaymentLinkPaymentMethodCollection = "if_required" )
List of values that PaymentLinkPaymentMethodCollection can take
type PaymentLinkPaymentMethodType ¶
type PaymentLinkPaymentMethodType string
The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
const ( PaymentLinkPaymentMethodTypeAffirm PaymentLinkPaymentMethodType = "affirm" PaymentLinkPaymentMethodTypeAfterpayClearpay PaymentLinkPaymentMethodType = "afterpay_clearpay" PaymentLinkPaymentMethodTypeAlipay PaymentLinkPaymentMethodType = "alipay" PaymentLinkPaymentMethodTypeAUBECSDebit PaymentLinkPaymentMethodType = "au_becs_debit" PaymentLinkPaymentMethodTypeBACSDebit PaymentLinkPaymentMethodType = "bacs_debit" PaymentLinkPaymentMethodTypeBancontact PaymentLinkPaymentMethodType = "bancontact" PaymentLinkPaymentMethodTypeBLIK PaymentLinkPaymentMethodType = "blik" PaymentLinkPaymentMethodTypeBoleto PaymentLinkPaymentMethodType = "boleto" PaymentLinkPaymentMethodTypeCard PaymentLinkPaymentMethodType = "card" PaymentLinkPaymentMethodTypeCashApp PaymentLinkPaymentMethodType = "cashapp" PaymentLinkPaymentMethodTypeEPS PaymentLinkPaymentMethodType = "eps" PaymentLinkPaymentMethodTypeFPX PaymentLinkPaymentMethodType = "fpx" PaymentLinkPaymentMethodTypeGiropay PaymentLinkPaymentMethodType = "giropay" PaymentLinkPaymentMethodTypeGrabpay PaymentLinkPaymentMethodType = "grabpay" PaymentLinkPaymentMethodTypeIDEAL PaymentLinkPaymentMethodType = "ideal" PaymentLinkPaymentMethodTypeKlarna PaymentLinkPaymentMethodType = "klarna" PaymentLinkPaymentMethodTypeKonbini PaymentLinkPaymentMethodType = "konbini" PaymentLinkPaymentMethodTypeLink PaymentLinkPaymentMethodType = "link" PaymentLinkPaymentMethodTypeOXXO PaymentLinkPaymentMethodType = "oxxo" PaymentLinkPaymentMethodTypeP24 PaymentLinkPaymentMethodType = "p24" PaymentLinkPaymentMethodTypePayNow PaymentLinkPaymentMethodType = "paynow" PaymentLinkPaymentMethodTypePaypal PaymentLinkPaymentMethodType = "paypal" PaymentLinkPaymentMethodTypePix PaymentLinkPaymentMethodType = "pix" PaymentLinkPaymentMethodTypePromptPay PaymentLinkPaymentMethodType = "promptpay" PaymentLinkPaymentMethodTypeSEPADebit PaymentLinkPaymentMethodType = "sepa_debit" PaymentLinkPaymentMethodTypeSofort PaymentLinkPaymentMethodType = "sofort" PaymentLinkPaymentMethodTypeUSBankAccount PaymentLinkPaymentMethodType = "us_bank_account" PaymentLinkPaymentMethodTypeWeChatPay PaymentLinkPaymentMethodType = "wechat_pay" )
List of values that PaymentLinkPaymentMethodType can take
type PaymentLinkPhoneNumberCollection ¶
type PaymentLinkPhoneNumberCollection struct { // If `true`, a phone number will be collected during checkout. Enabled bool `json:"enabled"` }
type PaymentLinkPhoneNumberCollectionParams ¶
type PaymentLinkPhoneNumberCollectionParams struct { // Set to `true` to enable phone number collection. Enabled *bool `form:"enabled"` }
Controls phone number collection settings during checkout.
We recommend that you review your privacy policy and check with your legal contacts.
type PaymentLinkShippingAddressCollection ¶
type PaymentLinkShippingAddressCollection struct { // An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. AllowedCountries []string `json:"allowed_countries"` }
Configuration for collecting the customer's shipping address.
type PaymentLinkShippingAddressCollectionParams ¶
type PaymentLinkShippingAddressCollectionParams struct { // An array of two-letter ISO country codes representing which countries Checkout should provide as options for // shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. AllowedCountries []*string `form:"allowed_countries"` }
Configuration for collecting the customer's shipping address.
type PaymentLinkShippingOption ¶
type PaymentLinkShippingOption struct { // A non-negative integer in cents representing how much to charge. ShippingAmount int64 `json:"shipping_amount"` // The ID of the Shipping Rate to use for this shipping option. ShippingRate *ShippingRate `json:"shipping_rate"` }
The shipping rate options applied to the session.
type PaymentLinkShippingOptionParams ¶
type PaymentLinkShippingOptionParams struct { // The ID of the Shipping Rate to use for this shipping option. ShippingRate *string `form:"shipping_rate"` }
The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
type PaymentLinkSubmitType ¶
type PaymentLinkSubmitType string
Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
const ( PaymentLinkSubmitTypeAuto PaymentLinkSubmitType = "auto" PaymentLinkSubmitTypeBook PaymentLinkSubmitType = "book" PaymentLinkSubmitTypeDonate PaymentLinkSubmitType = "donate" PaymentLinkSubmitTypePay PaymentLinkSubmitType = "pay" )
List of values that PaymentLinkSubmitType can take
type PaymentLinkSubscriptionData ¶
type PaymentLinkSubscriptionData struct { // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. Description string `json:"description"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Metadata map[string]string `json:"metadata"` // Integer representing the number of trial period days before the customer is charged for the first time. TrialPeriodDays int64 `json:"trial_period_days"` }
When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
type PaymentLinkSubscriptionDataParams ¶
type PaymentLinkSubscriptionDataParams struct { // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. Description *string `form:"description"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. Metadata map[string]string `form:"metadata"` // Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. TrialPeriodDays *int64 `form:"trial_period_days"` }
When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
func (*PaymentLinkSubscriptionDataParams) AddMetadata ¶ added in v75.9.0
func (p *PaymentLinkSubscriptionDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PaymentLinkTaxIDCollection ¶
type PaymentLinkTaxIDCollection struct { // Indicates whether tax ID collection is enabled for the session. Enabled bool `json:"enabled"` }
type PaymentLinkTaxIDCollectionParams ¶
type PaymentLinkTaxIDCollectionParams struct { // Set to `true` to enable tax ID collection. Enabled *bool `form:"enabled"` }
Controls tax ID collection during checkout.
type PaymentLinkTransferData ¶
type PaymentLinkTransferData struct { // The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. Amount int64 `json:"amount"` // The connected account receiving the transfer. Destination *Account `json:"destination"` }
The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
type PaymentLinkTransferDataParams ¶
type PaymentLinkTransferDataParams struct { // The amount that will be transferred automatically when a charge succeeds. Amount *int64 `form:"amount"` // If specified, successful charges will be attributed to the destination // account for tax reporting, and the funds from charges will be transferred // to the destination account. The ID of the resulting transfer will be // returned on the successful charge's `transfer` field. Destination *string `form:"destination"` }
The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
type PaymentMethod ¶
type PaymentMethod struct { APIResource ACSSDebit *PaymentMethodACSSDebit `json:"acss_debit"` Affirm *PaymentMethodAffirm `json:"affirm"` AfterpayClearpay *PaymentMethodAfterpayClearpay `json:"afterpay_clearpay"` Alipay *PaymentMethodAlipay `json:"alipay"` AUBECSDebit *PaymentMethodAUBECSDebit `json:"au_becs_debit"` BACSDebit *PaymentMethodBACSDebit `json:"bacs_debit"` Bancontact *PaymentMethodBancontact `json:"bancontact"` BillingDetails *PaymentMethodBillingDetails `json:"billing_details"` BLIK *PaymentMethodBLIK `json:"blik"` Boleto *PaymentMethodBoleto `json:"boleto"` Card *PaymentMethodCard `json:"card"` CardPresent *PaymentMethodCardPresent `json:"card_present"` CashApp *PaymentMethodCashApp `json:"cashapp"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. Customer *Customer `json:"customer"` CustomerBalance *PaymentMethodCustomerBalance `json:"customer_balance"` EPS *PaymentMethodEPS `json:"eps"` FPX *PaymentMethodFPX `json:"fpx"` Giropay *PaymentMethodGiropay `json:"giropay"` Grabpay *PaymentMethodGrabpay `json:"grabpay"` // Unique identifier for the object. ID string `json:"id"` IDEAL *PaymentMethodIDEAL `json:"ideal"` InteracPresent *PaymentMethodInteracPresent `json:"interac_present"` Klarna *PaymentMethodKlarna `json:"klarna"` Konbini *PaymentMethodKonbini `json:"konbini"` Link *PaymentMethodLink `json:"link"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` OXXO *PaymentMethodOXXO `json:"oxxo"` P24 *PaymentMethodP24 `json:"p24"` PayNow *PaymentMethodPayNow `json:"paynow"` Paypal *PaymentMethodPaypal `json:"paypal"` Pix *PaymentMethodPix `json:"pix"` PromptPay *PaymentMethodPromptPay `json:"promptpay"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *PaymentMethodRadarOptions `json:"radar_options"` SEPADebit *PaymentMethodSEPADebit `json:"sepa_debit"` Sofort *PaymentMethodSofort `json:"sofort"` // 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. Type PaymentMethodType `json:"type"` USBankAccount *PaymentMethodUSBankAccount `json:"us_bank_account"` WeChatPay *PaymentMethodWeChatPay `json:"wechat_pay"` Zip *PaymentMethodZip `json:"zip"` }
PaymentMethod objects represent your customer's payment instruments. You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to Customer objects to store instrument details for future payments.
Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
func (*PaymentMethod) UnmarshalJSON ¶
func (p *PaymentMethod) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a PaymentMethod. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type PaymentMethodACSSDebit ¶
type PaymentMethodACSSDebit struct { // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Institution number of the bank account. InstitutionNumber string `json:"institution_number"` // Last four digits of the bank account number. Last4 string `json:"last4"` // Transit number of the bank account. TransitNumber string `json:"transit_number"` }
type PaymentMethodACSSDebitParams ¶
type PaymentMethodACSSDebitParams struct { // Customer's bank account number. AccountNumber *string `form:"account_number"` // Institution number of the customer's bank. InstitutionNumber *string `form:"institution_number"` // Transit number of the customer's bank. TransitNumber *string `form:"transit_number"` }
If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
type PaymentMethodAUBECSDebit ¶
type PaymentMethodAUBECSDebit struct { // Six-digit number identifying bank and branch associated with this bank account. BSBNumber string `json:"bsb_number"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four digits of the bank account number. Last4 string `json:"last4"` }
type PaymentMethodAUBECSDebitParams ¶
type PaymentMethodAUBECSDebitParams struct { // The account number for the bank account. AccountNumber *string `form:"account_number"` // Bank-State-Branch number of the bank account. BSBNumber *string `form:"bsb_number"` }
If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
type PaymentMethodAffirm ¶
type PaymentMethodAffirm struct{}
type PaymentMethodAffirmParams ¶
type PaymentMethodAffirmParams struct{}
If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
type PaymentMethodAfterpayClearpay ¶
type PaymentMethodAfterpayClearpay struct{}
type PaymentMethodAfterpayClearpayParams ¶
type PaymentMethodAfterpayClearpayParams struct{}
If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
type PaymentMethodAlipay ¶
type PaymentMethodAlipay struct{}
type PaymentMethodAlipayParams ¶
type PaymentMethodAlipayParams struct{}
If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
type PaymentMethodAttachParams ¶
type PaymentMethodAttachParams struct { Params `form:"*"` // The ID of the customer to which to attach the PaymentMethod. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Attaches a PaymentMethod object to a Customer.
To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent(https://stripe.com/docs/api/setup_intents) or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage). These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for future use, which makes later declines and payment friction more likely. See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up future payments.
To use this PaymentMethod as the default for invoice or subscription payments, set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method), on the Customer to the PaymentMethod's ID.
func (*PaymentMethodAttachParams) AddExpand ¶
func (p *PaymentMethodAttachParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentMethodBACSDebit ¶
type PaymentMethodBACSDebit struct { // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four digits of the bank account number. Last4 string `json:"last4"` // Sort code of the bank account. (e.g., `10-20-30`) SortCode string `json:"sort_code"` }
type PaymentMethodBACSDebitParams ¶
type PaymentMethodBACSDebitParams struct { // Account number of the bank account that the funds will be debited from. AccountNumber *string `form:"account_number"` // Sort code of the bank account. (e.g., `10-20-30`) SortCode *string `form:"sort_code"` }
If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
type PaymentMethodBLIK ¶
type PaymentMethodBLIK struct{}
type PaymentMethodBLIKParams ¶
type PaymentMethodBLIKParams struct{}
If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
type PaymentMethodBancontact ¶
type PaymentMethodBancontact struct{}
type PaymentMethodBancontactParams ¶
type PaymentMethodBancontactParams struct{}
If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
type PaymentMethodBillingDetailsParams ¶
type PaymentMethodBillingDetailsParams struct { // Billing address. Address *AddressParams `form:"address"` // Email address. Email *string `form:"email"` // Full name. Name *string `form:"name"` // Billing phone number (including extension). Phone *string `form:"phone"` }
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
type PaymentMethodBoleto ¶
type PaymentMethodBoleto struct { // Uniquely identifies the customer tax id (CNPJ or CPF) TaxID string `json:"tax_id"` }
type PaymentMethodBoletoParams ¶
type PaymentMethodBoletoParams struct { // The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) TaxID *string `form:"tax_id"` }
If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
type PaymentMethodCard ¶
type PaymentMethodCard struct { // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand PaymentMethodCardBrand `json:"brand"` // Checks on Card address and CVC if provided. Checks *PaymentMethodCardChecks `json:"checks"` // 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 `json:"country"` // Two-digit number representing the card's expiration month. ExpMonth int64 `json:"exp_month"` // Four-digit number representing the card's expiration year. ExpYear int64 `json:"exp_year"` // 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 `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding CardFunding `json:"funding"` // The last four digits of the card. Last4 string `json:"last4"` // Contains information about card networks that can be used to process the payment. Networks *PaymentMethodCardNetworks `json:"networks"` // Contains details on how this Card may be used for 3D Secure authentication. ThreeDSecureUsage *PaymentMethodCardThreeDSecureUsage `json:"three_d_secure_usage"` // If this Card is part of a card wallet, this contains the details of the card wallet. Wallet *PaymentMethodCardWallet `json:"wallet"` // Please note that the fields below are for internal use only and are not returned // as part of standard API requests. // 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 `json:"description"` // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) IIN string `json:"iin"` // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) Issuer string `json:"issuer"` }
type PaymentMethodCardBrand ¶
type PaymentMethodCardBrand string
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
const ( PaymentMethodCardBrandAmex PaymentMethodCardBrand = "amex" PaymentMethodCardBrandDiners PaymentMethodCardBrand = "diners" PaymentMethodCardBrandDiscover PaymentMethodCardBrand = "discover" PaymentMethodCardBrandJCB PaymentMethodCardBrand = "jcb" PaymentMethodCardBrandMastercard PaymentMethodCardBrand = "mastercard" PaymentMethodCardBrandUnionpay PaymentMethodCardBrand = "unionpay" PaymentMethodCardBrandUnknown PaymentMethodCardBrand = "unknown" PaymentMethodCardBrandVisa PaymentMethodCardBrand = "visa" )
List of values that PaymentMethodCardBrand can take
type PaymentMethodCardChecks ¶
type PaymentMethodCardChecks struct { // If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. AddressLine1Check PaymentMethodCardChecksAddressLine1Check `json:"address_line1_check"` // If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. AddressPostalCodeCheck PaymentMethodCardChecksAddressPostalCodeCheck `json:"address_postal_code_check"` // If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. CVCCheck PaymentMethodCardChecksCVCCheck `json:"cvc_check"` }
Checks on Card address and CVC if provided.
type PaymentMethodCardChecksAddressLine1Check ¶
type PaymentMethodCardChecksAddressLine1Check string
If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
const ( PaymentMethodCardChecksAddressLine1CheckFail PaymentMethodCardChecksAddressLine1Check = "fail" PaymentMethodCardChecksAddressLine1CheckPass PaymentMethodCardChecksAddressLine1Check = "pass" PaymentMethodCardChecksAddressLine1CheckUnchecked PaymentMethodCardChecksAddressLine1Check = "unchecked" )
List of values that PaymentMethodCardChecksAddressLine1Check can take
type PaymentMethodCardChecksAddressPostalCodeCheck ¶
type PaymentMethodCardChecksAddressPostalCodeCheck string
If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
const ( PaymentMethodCardChecksAddressPostalCodeCheckFail PaymentMethodCardChecksAddressPostalCodeCheck = "fail" PaymentMethodCardChecksAddressPostalCodeCheckPass PaymentMethodCardChecksAddressPostalCodeCheck = "pass" PaymentMethodCardChecksAddressPostalCodeCheckUnchecked PaymentMethodCardChecksAddressPostalCodeCheck = "unchecked" )
List of values that PaymentMethodCardChecksAddressPostalCodeCheck can take
type PaymentMethodCardChecksCVCCheck ¶
type PaymentMethodCardChecksCVCCheck string
If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
const ( PaymentMethodCardChecksCVCCheckFail PaymentMethodCardChecksCVCCheck = "fail" PaymentMethodCardChecksCVCCheckPass PaymentMethodCardChecksCVCCheck = "pass" PaymentMethodCardChecksCVCCheckUnchecked PaymentMethodCardChecksCVCCheck = "unchecked" )
List of values that PaymentMethodCardChecksCVCCheck can take
type PaymentMethodCardNetworks ¶
type PaymentMethodCardNetworks struct { // All available networks for the card. Available []PaymentMethodCardNetworksAvailable `json:"available"` // The preferred network for the card. Preferred PaymentMethodCardNetworksPreferred `json:"preferred"` }
Contains information about card networks that can be used to process the payment.
type PaymentMethodCardNetworksAvailable ¶
type PaymentMethodCardNetworksAvailable string
All available networks for the card.
const ( PaymentMethodCardNetworksAvailableAmex PaymentMethodCardNetworksAvailable = "amex" PaymentMethodCardNetworksAvailableCartesBancaires PaymentMethodCardNetworksAvailable = "cartes_bancaires" PaymentMethodCardNetworksAvailableDiners PaymentMethodCardNetworksAvailable = "diners" PaymentMethodCardNetworksAvailableDiscover PaymentMethodCardNetworksAvailable = "discover" PaymentMethodCardNetworksAvailableInterac PaymentMethodCardNetworksAvailable = "interac" PaymentMethodCardNetworksAvailableJCB PaymentMethodCardNetworksAvailable = "jcb" PaymentMethodCardNetworksAvailableMastercard PaymentMethodCardNetworksAvailable = "mastercard" PaymentMethodCardNetworksAvailableUnionpay PaymentMethodCardNetworksAvailable = "unionpay" PaymentMethodCardNetworksAvailableVisa PaymentMethodCardNetworksAvailable = "visa" PaymentMethodCardNetworksAvailableUnknown PaymentMethodCardNetworksAvailable = "unknown" )
List of values that PaymentMethodCardNetworksAvailable can take
type PaymentMethodCardNetworksPreferred ¶
type PaymentMethodCardNetworksPreferred string
The preferred network for the card.
const ( PaymentMethodCardNetworksPreferredAmex PaymentMethodCardNetworksPreferred = "amex" PaymentMethodCardNetworksPreferredCartesBancaires PaymentMethodCardNetworksPreferred = "cartes_bancaires" PaymentMethodCardNetworksPreferredDiners PaymentMethodCardNetworksPreferred = "diners" PaymentMethodCardNetworksPreferredDiscover PaymentMethodCardNetworksPreferred = "discover" PaymentMethodCardNetworksPreferredInterac PaymentMethodCardNetworksPreferred = "interac" PaymentMethodCardNetworksPreferredJCB PaymentMethodCardNetworksPreferred = "jcb" PaymentMethodCardNetworksPreferredMastercard PaymentMethodCardNetworksPreferred = "mastercard" PaymentMethodCardNetworksPreferredUnionpay PaymentMethodCardNetworksPreferred = "unionpay" PaymentMethodCardNetworksPreferredVisa PaymentMethodCardNetworksPreferred = "visa" PaymentMethodCardNetworksPreferredUnknown PaymentMethodCardNetworksPreferred = "unknown" )
List of values that PaymentMethodCardNetworksPreferred can take
type PaymentMethodCardParams ¶
type PaymentMethodCardParams struct { // The card's CVC. It is highly recommended to always include this value. CVC *string `form:"cvc"` // Two-digit number representing the card's expiration month. ExpMonth *int64 `form:"exp_month"` // Four-digit number representing the card's expiration year. ExpYear *int64 `form:"exp_year"` // The card number, as a string without any separators. Number *string `form:"number"` // For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. Token *string `form:"token"` }
If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
type PaymentMethodCardPresent ¶
type PaymentMethodCardPresent struct { // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` // 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. CardholderName string `json:"cardholder_name"` // 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 `json:"country"` // 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 `json:"description"` // Two-digit number representing the card's expiration month. ExpMonth int64 `json:"exp_month"` // Four-digit number representing the card's expiration year. ExpYear int64 `json:"exp_year"` // 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 `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding string `json:"funding"` // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) IIN string `json:"iin"` // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) Issuer string `json:"issuer"` // The last four digits of the card. Last4 string `json:"last4"` // Contains information about card networks that can be used to process the payment. Networks *PaymentMethodCardPresentNetworks `json:"networks"` // How card details were read in this transaction. ReadMethod PaymentMethodCardPresentReadMethod `json:"read_method"` }
type PaymentMethodCardPresentNetworks ¶
type PaymentMethodCardPresentNetworks struct { // All available networks for the card. Available []string `json:"available"` // The preferred network for the card. Preferred string `json:"preferred"` }
Contains information about card networks that can be used to process the payment.
type PaymentMethodCardPresentReadMethod ¶
type PaymentMethodCardPresentReadMethod string
How card details were read in this transaction.
const ( PaymentMethodCardPresentReadMethodContactEmv PaymentMethodCardPresentReadMethod = "contact_emv" PaymentMethodCardPresentReadMethodContactlessEmv PaymentMethodCardPresentReadMethod = "contactless_emv" PaymentMethodCardPresentReadMethodContactlessMagstripeMode PaymentMethodCardPresentReadMethod = "contactless_magstripe_mode" PaymentMethodCardPresentReadMethodMagneticStripeFallback PaymentMethodCardPresentReadMethod = "magnetic_stripe_fallback" PaymentMethodCardPresentReadMethodMagneticStripeTrack2 PaymentMethodCardPresentReadMethod = "magnetic_stripe_track2" )
List of values that PaymentMethodCardPresentReadMethod can take
type PaymentMethodCardThreeDSecureUsage ¶
type PaymentMethodCardThreeDSecureUsage struct { // Whether 3D Secure is supported on this card. Supported bool `json:"supported"` }
Contains details on how this Card may be used for 3D Secure authentication.
type PaymentMethodCardWallet ¶
type PaymentMethodCardWallet struct { AmexExpressCheckout *PaymentMethodCardWalletAmexExpressCheckout `json:"amex_express_checkout"` ApplePay *PaymentMethodCardWalletApplePay `json:"apple_pay"` // (For tokenized numbers only.) The last four digits of the device account number. DynamicLast4 string `json:"dynamic_last4"` GooglePay *PaymentMethodCardWalletGooglePay `json:"google_pay"` Link *PaymentMethodCardWalletLink `json:"link"` Masterpass *PaymentMethodCardWalletMasterpass `json:"masterpass"` SamsungPay *PaymentMethodCardWalletSamsungPay `json:"samsung_pay"` // The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. Type PaymentMethodCardWalletType `json:"type"` VisaCheckout *PaymentMethodCardWalletVisaCheckout `json:"visa_checkout"` }
If this Card is part of a card wallet, this contains the details of the card wallet.
type PaymentMethodCardWalletAmexExpressCheckout ¶
type PaymentMethodCardWalletAmexExpressCheckout struct{}
type PaymentMethodCardWalletApplePay ¶
type PaymentMethodCardWalletApplePay struct{}
type PaymentMethodCardWalletGooglePay ¶
type PaymentMethodCardWalletGooglePay struct{}
type PaymentMethodCardWalletLink ¶
type PaymentMethodCardWalletLink struct{}
type PaymentMethodCardWalletMasterpass ¶
type PaymentMethodCardWalletMasterpass struct { // Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. BillingAddress *Address `json:"billing_address"` // Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. Email string `json:"email"` // Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. Name string `json:"name"` // Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. ShippingAddress *Address `json:"shipping_address"` }
type PaymentMethodCardWalletSamsungPay ¶
type PaymentMethodCardWalletSamsungPay struct{}
type PaymentMethodCardWalletType ¶
type PaymentMethodCardWalletType string
The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
const ( PaymentMethodCardWalletTypeAmexExpressCheckout PaymentMethodCardWalletType = "amex_express_checkout" PaymentMethodCardWalletTypeApplePay PaymentMethodCardWalletType = "apple_pay" PaymentMethodCardWalletTypeGooglePay PaymentMethodCardWalletType = "google_pay" PaymentMethodCardWalletTypeLink PaymentMethodCardWalletType = "link" PaymentMethodCardWalletTypeMasterpass PaymentMethodCardWalletType = "masterpass" PaymentMethodCardWalletTypeSamsungPay PaymentMethodCardWalletType = "samsung_pay" PaymentMethodCardWalletTypeVisaCheckout PaymentMethodCardWalletType = "visa_checkout" )
List of values that PaymentMethodCardWalletType can take
type PaymentMethodCardWalletVisaCheckout ¶
type PaymentMethodCardWalletVisaCheckout struct { // Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. BillingAddress *Address `json:"billing_address"` // Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. Email string `json:"email"` // Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. Name string `json:"name"` // Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. ShippingAddress *Address `json:"shipping_address"` }
type PaymentMethodCashApp ¶
type PaymentMethodCashAppParams ¶
type PaymentMethodCashAppParams struct{}
If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
type PaymentMethodConfiguration ¶ added in v75.6.0
type PaymentMethodConfiguration struct { APIResource ACSSDebit *PaymentMethodConfigurationACSSDebit `json:"acss_debit"` // Whether the configuration can be used for new payments. Active bool `json:"active"` Affirm *PaymentMethodConfigurationAffirm `json:"affirm"` AfterpayClearpay *PaymentMethodConfigurationAfterpayClearpay `json:"afterpay_clearpay"` Alipay *PaymentMethodConfigurationAlipay `json:"alipay"` ApplePay *PaymentMethodConfigurationApplePay `json:"apple_pay"` // For child configs, the Connect application associated with the configuration. Application string `json:"application"` AUBECSDebit *PaymentMethodConfigurationAUBECSDebit `json:"au_becs_debit"` BACSDebit *PaymentMethodConfigurationBACSDebit `json:"bacs_debit"` Bancontact *PaymentMethodConfigurationBancontact `json:"bancontact"` BLIK *PaymentMethodConfigurationBLIK `json:"blik"` Boleto *PaymentMethodConfigurationBoleto `json:"boleto"` Card *PaymentMethodConfigurationCard `json:"card"` CartesBancaires *PaymentMethodConfigurationCartesBancaires `json:"cartes_bancaires"` CashApp *PaymentMethodConfigurationCashApp `json:"cashapp"` EPS *PaymentMethodConfigurationEPS `json:"eps"` FPX *PaymentMethodConfigurationFPX `json:"fpx"` Giropay *PaymentMethodConfigurationGiropay `json:"giropay"` GooglePay *PaymentMethodConfigurationGooglePay `json:"google_pay"` Grabpay *PaymentMethodConfigurationGrabpay `json:"grabpay"` // Unique identifier for the object. ID string `json:"id"` IDBankTransfer *PaymentMethodConfigurationIDBankTransfer `json:"id_bank_transfer"` IDEAL *PaymentMethodConfigurationIDEAL `json:"ideal"` // The default configuration is used whenever a payment method configuration is not specified. IsDefault bool `json:"is_default"` JCB *PaymentMethodConfigurationJCB `json:"jcb"` Klarna *PaymentMethodConfigurationKlarna `json:"klarna"` Konbini *PaymentMethodConfigurationKonbini `json:"konbini"` Link *PaymentMethodConfigurationLink `json:"link"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` Multibanco *PaymentMethodConfigurationMultibanco `json:"multibanco"` // The configuration's name. Name string `json:"name"` Netbanking *PaymentMethodConfigurationNetbanking `json:"netbanking"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` OXXO *PaymentMethodConfigurationOXXO `json:"oxxo"` P24 *PaymentMethodConfigurationP24 `json:"p24"` // For child configs, the configuration's parent configuration. Parent string `json:"parent"` PayByBank *PaymentMethodConfigurationPayByBank `json:"pay_by_bank"` PayNow *PaymentMethodConfigurationPayNow `json:"paynow"` Paypal *PaymentMethodConfigurationPaypal `json:"paypal"` PromptPay *PaymentMethodConfigurationPromptPay `json:"promptpay"` SEPADebit *PaymentMethodConfigurationSEPADebit `json:"sepa_debit"` Sofort *PaymentMethodConfigurationSofort `json:"sofort"` Upi *PaymentMethodConfigurationUpi `json:"upi"` USBankAccount *PaymentMethodConfigurationUSBankAccount `json:"us_bank_account"` WeChatPay *PaymentMethodConfigurationWeChatPay `json:"wechat_pay"` }
PaymentMethodConfigurations control which payment methods are displayed to your customers when you don't explicitly specify payment method types. You can have multiple configurations with different sets of payment methods for different scenarios.
There are two types of PaymentMethodConfigurations. Which is used depends on the [charge type](https://stripe.com/docs/connect/charges):
**Direct** configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect.
**Child** configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter.
Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account's associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API.
Related guides: - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations) - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs) - [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations)
type PaymentMethodConfigurationACSSDebit ¶ added in v75.6.0
type PaymentMethodConfigurationACSSDebit struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationACSSDebitDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationACSSDebitDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationACSSDebitDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationACSSDebitDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationACSSDebitDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationACSSDebitDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationACSSDebitDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationACSSDebitDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationACSSDebitDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationACSSDebitDisplayPreferencePreferenceNone PaymentMethodConfigurationACSSDebitDisplayPreferencePreference = "none" PaymentMethodConfigurationACSSDebitDisplayPreferencePreferenceOff PaymentMethodConfigurationACSSDebitDisplayPreferencePreference = "off" PaymentMethodConfigurationACSSDebitDisplayPreferencePreferenceOn PaymentMethodConfigurationACSSDebitDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationACSSDebitDisplayPreferencePreference can take
type PaymentMethodConfigurationACSSDebitDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationACSSDebitDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationACSSDebitDisplayPreferenceValueOff PaymentMethodConfigurationACSSDebitDisplayPreferenceValue = "off" PaymentMethodConfigurationACSSDebitDisplayPreferenceValueOn PaymentMethodConfigurationACSSDebitDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationACSSDebitDisplayPreferenceValue can take
type PaymentMethodConfigurationACSSDebitParams ¶ added in v75.6.0
type PaymentMethodConfigurationACSSDebitParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationACSSDebitDisplayPreferenceParams `form:"display_preference"` }
Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
type PaymentMethodConfigurationAUBECSDebit ¶ added in v75.6.0
type PaymentMethodConfigurationAUBECSDebit struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationAUBECSDebitDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationAUBECSDebitDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationAUBECSDebitDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationAUBECSDebitDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationAUBECSDebitDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationAUBECSDebitDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreferenceNone PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreference = "none" PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreferenceOff PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreference = "off" PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreferenceOn PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationAUBECSDebitDisplayPreferencePreference can take
type PaymentMethodConfigurationAUBECSDebitDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationAUBECSDebitDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationAUBECSDebitDisplayPreferenceValueOff PaymentMethodConfigurationAUBECSDebitDisplayPreferenceValue = "off" PaymentMethodConfigurationAUBECSDebitDisplayPreferenceValueOn PaymentMethodConfigurationAUBECSDebitDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationAUBECSDebitDisplayPreferenceValue can take
type PaymentMethodConfigurationAUBECSDebitParams ¶ added in v75.6.0
type PaymentMethodConfigurationAUBECSDebitParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationAUBECSDebitDisplayPreferenceParams `form:"display_preference"` }
Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
type PaymentMethodConfigurationAffirm ¶ added in v75.6.0
type PaymentMethodConfigurationAffirm struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationAffirmDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationAffirmDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationAffirmDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationAffirmDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationAffirmDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationAffirmDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationAffirmDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationAffirmDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationAffirmDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationAffirmDisplayPreferencePreferenceNone PaymentMethodConfigurationAffirmDisplayPreferencePreference = "none" PaymentMethodConfigurationAffirmDisplayPreferencePreferenceOff PaymentMethodConfigurationAffirmDisplayPreferencePreference = "off" PaymentMethodConfigurationAffirmDisplayPreferencePreferenceOn PaymentMethodConfigurationAffirmDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationAffirmDisplayPreferencePreference can take
type PaymentMethodConfigurationAffirmDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationAffirmDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationAffirmDisplayPreferenceValueOff PaymentMethodConfigurationAffirmDisplayPreferenceValue = "off" PaymentMethodConfigurationAffirmDisplayPreferenceValueOn PaymentMethodConfigurationAffirmDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationAffirmDisplayPreferenceValue can take
type PaymentMethodConfigurationAffirmParams ¶ added in v75.6.0
type PaymentMethodConfigurationAffirmParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationAffirmDisplayPreferenceParams `form:"display_preference"` }
[Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
type PaymentMethodConfigurationAfterpayClearpay ¶ added in v75.6.0
type PaymentMethodConfigurationAfterpayClearpay struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationAfterpayClearpayDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationAfterpayClearpayDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationAfterpayClearpayDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreferenceNone PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreference = "none" PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreferenceOff PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreference = "off" PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreferenceOn PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationAfterpayClearpayDisplayPreferencePreference can take
type PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceValueOff PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceValue = "off" PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceValueOn PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceValue can take
type PaymentMethodConfigurationAfterpayClearpayParams ¶ added in v75.6.0
type PaymentMethodConfigurationAfterpayClearpayParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceParams `form:"display_preference"` }
Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
type PaymentMethodConfigurationAlipay ¶ added in v75.6.0
type PaymentMethodConfigurationAlipay struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationAlipayDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationAlipayDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationAlipayDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationAlipayDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationAlipayDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationAlipayDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationAlipayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationAlipayDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationAlipayDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationAlipayDisplayPreferencePreferenceNone PaymentMethodConfigurationAlipayDisplayPreferencePreference = "none" PaymentMethodConfigurationAlipayDisplayPreferencePreferenceOff PaymentMethodConfigurationAlipayDisplayPreferencePreference = "off" PaymentMethodConfigurationAlipayDisplayPreferencePreferenceOn PaymentMethodConfigurationAlipayDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationAlipayDisplayPreferencePreference can take
type PaymentMethodConfigurationAlipayDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationAlipayDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationAlipayDisplayPreferenceValueOff PaymentMethodConfigurationAlipayDisplayPreferenceValue = "off" PaymentMethodConfigurationAlipayDisplayPreferenceValueOn PaymentMethodConfigurationAlipayDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationAlipayDisplayPreferenceValue can take
type PaymentMethodConfigurationAlipayParams ¶ added in v75.6.0
type PaymentMethodConfigurationAlipayParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationAlipayDisplayPreferenceParams `form:"display_preference"` }
Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
type PaymentMethodConfigurationApplePay ¶ added in v75.6.0
type PaymentMethodConfigurationApplePay struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationApplePayDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationApplePayDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationApplePayDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationApplePayDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationApplePayDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationApplePayDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationApplePayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationApplePayDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationApplePayDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationApplePayDisplayPreferencePreferenceNone PaymentMethodConfigurationApplePayDisplayPreferencePreference = "none" PaymentMethodConfigurationApplePayDisplayPreferencePreferenceOff PaymentMethodConfigurationApplePayDisplayPreferencePreference = "off" PaymentMethodConfigurationApplePayDisplayPreferencePreferenceOn PaymentMethodConfigurationApplePayDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationApplePayDisplayPreferencePreference can take
type PaymentMethodConfigurationApplePayDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationApplePayDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationApplePayDisplayPreferenceValueOff PaymentMethodConfigurationApplePayDisplayPreferenceValue = "off" PaymentMethodConfigurationApplePayDisplayPreferenceValueOn PaymentMethodConfigurationApplePayDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationApplePayDisplayPreferenceValue can take
type PaymentMethodConfigurationApplePayLaterDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationApplePayLaterDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationApplePayLaterParams ¶ added in v75.6.0
type PaymentMethodConfigurationApplePayLaterParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationApplePayLaterDisplayPreferenceParams `form:"display_preference"` }
Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
type PaymentMethodConfigurationApplePayParams ¶ added in v75.6.0
type PaymentMethodConfigurationApplePayParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationApplePayDisplayPreferenceParams `form:"display_preference"` }
Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
type PaymentMethodConfigurationBACSDebit ¶ added in v75.6.0
type PaymentMethodConfigurationBACSDebit struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationBACSDebitDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationBACSDebitDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationBACSDebitDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationBACSDebitDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationBACSDebitDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationBACSDebitDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationBACSDebitDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationBACSDebitDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationBACSDebitDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationBACSDebitDisplayPreferencePreferenceNone PaymentMethodConfigurationBACSDebitDisplayPreferencePreference = "none" PaymentMethodConfigurationBACSDebitDisplayPreferencePreferenceOff PaymentMethodConfigurationBACSDebitDisplayPreferencePreference = "off" PaymentMethodConfigurationBACSDebitDisplayPreferencePreferenceOn PaymentMethodConfigurationBACSDebitDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationBACSDebitDisplayPreferencePreference can take
type PaymentMethodConfigurationBACSDebitDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationBACSDebitDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationBACSDebitDisplayPreferenceValueOff PaymentMethodConfigurationBACSDebitDisplayPreferenceValue = "off" PaymentMethodConfigurationBACSDebitDisplayPreferenceValueOn PaymentMethodConfigurationBACSDebitDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationBACSDebitDisplayPreferenceValue can take
type PaymentMethodConfigurationBACSDebitParams ¶ added in v75.6.0
type PaymentMethodConfigurationBACSDebitParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationBACSDebitDisplayPreferenceParams `form:"display_preference"` }
Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
type PaymentMethodConfigurationBLIK ¶ added in v75.6.0
type PaymentMethodConfigurationBLIK struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationBLIKDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationBLIKDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationBLIKDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationBLIKDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationBLIKDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationBLIKDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationBLIKDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationBLIKDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationBLIKDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationBLIKDisplayPreferencePreferenceNone PaymentMethodConfigurationBLIKDisplayPreferencePreference = "none" PaymentMethodConfigurationBLIKDisplayPreferencePreferenceOff PaymentMethodConfigurationBLIKDisplayPreferencePreference = "off" PaymentMethodConfigurationBLIKDisplayPreferencePreferenceOn PaymentMethodConfigurationBLIKDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationBLIKDisplayPreferencePreference can take
type PaymentMethodConfigurationBLIKDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationBLIKDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationBLIKDisplayPreferenceValueOff PaymentMethodConfigurationBLIKDisplayPreferenceValue = "off" PaymentMethodConfigurationBLIKDisplayPreferenceValueOn PaymentMethodConfigurationBLIKDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationBLIKDisplayPreferenceValue can take
type PaymentMethodConfigurationBLIKParams ¶ added in v75.6.0
type PaymentMethodConfigurationBLIKParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationBLIKDisplayPreferenceParams `form:"display_preference"` }
BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
type PaymentMethodConfigurationBancontact ¶ added in v75.6.0
type PaymentMethodConfigurationBancontact struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationBancontactDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationBancontactDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationBancontactDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationBancontactDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationBancontactDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationBancontactDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationBancontactDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationBancontactDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationBancontactDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationBancontactDisplayPreferencePreferenceNone PaymentMethodConfigurationBancontactDisplayPreferencePreference = "none" PaymentMethodConfigurationBancontactDisplayPreferencePreferenceOff PaymentMethodConfigurationBancontactDisplayPreferencePreference = "off" PaymentMethodConfigurationBancontactDisplayPreferencePreferenceOn PaymentMethodConfigurationBancontactDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationBancontactDisplayPreferencePreference can take
type PaymentMethodConfigurationBancontactDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationBancontactDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationBancontactDisplayPreferenceValueOff PaymentMethodConfigurationBancontactDisplayPreferenceValue = "off" PaymentMethodConfigurationBancontactDisplayPreferenceValueOn PaymentMethodConfigurationBancontactDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationBancontactDisplayPreferenceValue can take
type PaymentMethodConfigurationBancontactParams ¶ added in v75.6.0
type PaymentMethodConfigurationBancontactParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationBancontactDisplayPreferenceParams `form:"display_preference"` }
Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
type PaymentMethodConfigurationBoleto ¶ added in v75.6.0
type PaymentMethodConfigurationBoleto struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationBoletoDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationBoletoDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationBoletoDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationBoletoDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationBoletoDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationBoletoDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationBoletoDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationBoletoDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationBoletoDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationBoletoDisplayPreferencePreferenceNone PaymentMethodConfigurationBoletoDisplayPreferencePreference = "none" PaymentMethodConfigurationBoletoDisplayPreferencePreferenceOff PaymentMethodConfigurationBoletoDisplayPreferencePreference = "off" PaymentMethodConfigurationBoletoDisplayPreferencePreferenceOn PaymentMethodConfigurationBoletoDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationBoletoDisplayPreferencePreference can take
type PaymentMethodConfigurationBoletoDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationBoletoDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationBoletoDisplayPreferenceValueOff PaymentMethodConfigurationBoletoDisplayPreferenceValue = "off" PaymentMethodConfigurationBoletoDisplayPreferenceValueOn PaymentMethodConfigurationBoletoDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationBoletoDisplayPreferenceValue can take
type PaymentMethodConfigurationBoletoParams ¶ added in v75.6.0
type PaymentMethodConfigurationBoletoParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationBoletoDisplayPreferenceParams `form:"display_preference"` }
Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
type PaymentMethodConfigurationCard ¶ added in v75.6.0
type PaymentMethodConfigurationCard struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationCardDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationCardDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationCardDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationCardDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationCardDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationCardDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationCardDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationCardDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationCardDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationCardDisplayPreferencePreferenceNone PaymentMethodConfigurationCardDisplayPreferencePreference = "none" PaymentMethodConfigurationCardDisplayPreferencePreferenceOff PaymentMethodConfigurationCardDisplayPreferencePreference = "off" PaymentMethodConfigurationCardDisplayPreferencePreferenceOn PaymentMethodConfigurationCardDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationCardDisplayPreferencePreference can take
type PaymentMethodConfigurationCardDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationCardDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationCardDisplayPreferenceValueOff PaymentMethodConfigurationCardDisplayPreferenceValue = "off" PaymentMethodConfigurationCardDisplayPreferenceValueOn PaymentMethodConfigurationCardDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationCardDisplayPreferenceValue can take
type PaymentMethodConfigurationCardParams ¶ added in v75.6.0
type PaymentMethodConfigurationCardParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationCardDisplayPreferenceParams `form:"display_preference"` }
Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
type PaymentMethodConfigurationCartesBancaires ¶ added in v75.6.0
type PaymentMethodConfigurationCartesBancaires struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationCartesBancairesDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationCartesBancairesDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationCartesBancairesDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationCartesBancairesDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationCartesBancairesDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationCartesBancairesDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationCartesBancairesDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationCartesBancairesDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationCartesBancairesDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationCartesBancairesDisplayPreferencePreferenceNone PaymentMethodConfigurationCartesBancairesDisplayPreferencePreference = "none" PaymentMethodConfigurationCartesBancairesDisplayPreferencePreferenceOff PaymentMethodConfigurationCartesBancairesDisplayPreferencePreference = "off" PaymentMethodConfigurationCartesBancairesDisplayPreferencePreferenceOn PaymentMethodConfigurationCartesBancairesDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationCartesBancairesDisplayPreferencePreference can take
type PaymentMethodConfigurationCartesBancairesDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationCartesBancairesDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationCartesBancairesDisplayPreferenceValueOff PaymentMethodConfigurationCartesBancairesDisplayPreferenceValue = "off" PaymentMethodConfigurationCartesBancairesDisplayPreferenceValueOn PaymentMethodConfigurationCartesBancairesDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationCartesBancairesDisplayPreferenceValue can take
type PaymentMethodConfigurationCartesBancairesParams ¶ added in v75.6.0
type PaymentMethodConfigurationCartesBancairesParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationCartesBancairesDisplayPreferenceParams `form:"display_preference"` }
Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
type PaymentMethodConfigurationCashApp ¶ added in v75.6.0
type PaymentMethodConfigurationCashApp struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationCashAppDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationCashAppDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationCashAppDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationCashAppDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationCashAppDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationCashAppDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationCashAppDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationCashAppDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationCashAppDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationCashAppDisplayPreferencePreferenceNone PaymentMethodConfigurationCashAppDisplayPreferencePreference = "none" PaymentMethodConfigurationCashAppDisplayPreferencePreferenceOff PaymentMethodConfigurationCashAppDisplayPreferencePreference = "off" PaymentMethodConfigurationCashAppDisplayPreferencePreferenceOn PaymentMethodConfigurationCashAppDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationCashAppDisplayPreferencePreference can take
type PaymentMethodConfigurationCashAppDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationCashAppDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationCashAppDisplayPreferenceValueOff PaymentMethodConfigurationCashAppDisplayPreferenceValue = "off" PaymentMethodConfigurationCashAppDisplayPreferenceValueOn PaymentMethodConfigurationCashAppDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationCashAppDisplayPreferenceValue can take
type PaymentMethodConfigurationCashAppParams ¶ added in v75.6.0
type PaymentMethodConfigurationCashAppParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationCashAppDisplayPreferenceParams `form:"display_preference"` }
Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
type PaymentMethodConfigurationEPS ¶ added in v75.6.0
type PaymentMethodConfigurationEPS struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationEPSDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationEPSDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationEPSDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationEPSDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationEPSDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationEPSDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationEPSDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationEPSDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationEPSDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationEPSDisplayPreferencePreferenceNone PaymentMethodConfigurationEPSDisplayPreferencePreference = "none" PaymentMethodConfigurationEPSDisplayPreferencePreferenceOff PaymentMethodConfigurationEPSDisplayPreferencePreference = "off" PaymentMethodConfigurationEPSDisplayPreferencePreferenceOn PaymentMethodConfigurationEPSDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationEPSDisplayPreferencePreference can take
type PaymentMethodConfigurationEPSDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationEPSDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationEPSDisplayPreferenceValueOff PaymentMethodConfigurationEPSDisplayPreferenceValue = "off" PaymentMethodConfigurationEPSDisplayPreferenceValueOn PaymentMethodConfigurationEPSDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationEPSDisplayPreferenceValue can take
type PaymentMethodConfigurationEPSParams ¶ added in v75.6.0
type PaymentMethodConfigurationEPSParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationEPSDisplayPreferenceParams `form:"display_preference"` }
EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
type PaymentMethodConfigurationFPX ¶ added in v75.6.0
type PaymentMethodConfigurationFPX struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationFPXDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationFPXDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationFPXDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationFPXDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationFPXDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationFPXDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationFPXDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationFPXDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationFPXDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationFPXDisplayPreferencePreferenceNone PaymentMethodConfigurationFPXDisplayPreferencePreference = "none" PaymentMethodConfigurationFPXDisplayPreferencePreferenceOff PaymentMethodConfigurationFPXDisplayPreferencePreference = "off" PaymentMethodConfigurationFPXDisplayPreferencePreferenceOn PaymentMethodConfigurationFPXDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationFPXDisplayPreferencePreference can take
type PaymentMethodConfigurationFPXDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationFPXDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationFPXDisplayPreferenceValueOff PaymentMethodConfigurationFPXDisplayPreferenceValue = "off" PaymentMethodConfigurationFPXDisplayPreferenceValueOn PaymentMethodConfigurationFPXDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationFPXDisplayPreferenceValue can take
type PaymentMethodConfigurationFPXParams ¶ added in v75.6.0
type PaymentMethodConfigurationFPXParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationFPXDisplayPreferenceParams `form:"display_preference"` }
Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
type PaymentMethodConfigurationGiropay ¶ added in v75.6.0
type PaymentMethodConfigurationGiropay struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationGiropayDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationGiropayDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationGiropayDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationGiropayDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationGiropayDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationGiropayDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationGiropayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationGiropayDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationGiropayDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationGiropayDisplayPreferencePreferenceNone PaymentMethodConfigurationGiropayDisplayPreferencePreference = "none" PaymentMethodConfigurationGiropayDisplayPreferencePreferenceOff PaymentMethodConfigurationGiropayDisplayPreferencePreference = "off" PaymentMethodConfigurationGiropayDisplayPreferencePreferenceOn PaymentMethodConfigurationGiropayDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationGiropayDisplayPreferencePreference can take
type PaymentMethodConfigurationGiropayDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationGiropayDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationGiropayDisplayPreferenceValueOff PaymentMethodConfigurationGiropayDisplayPreferenceValue = "off" PaymentMethodConfigurationGiropayDisplayPreferenceValueOn PaymentMethodConfigurationGiropayDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationGiropayDisplayPreferenceValue can take
type PaymentMethodConfigurationGiropayParams ¶ added in v75.6.0
type PaymentMethodConfigurationGiropayParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationGiropayDisplayPreferenceParams `form:"display_preference"` }
giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
type PaymentMethodConfigurationGooglePay ¶ added in v75.6.0
type PaymentMethodConfigurationGooglePay struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationGooglePayDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationGooglePayDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationGooglePayDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationGooglePayDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationGooglePayDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationGooglePayDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationGooglePayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationGooglePayDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationGooglePayDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationGooglePayDisplayPreferencePreferenceNone PaymentMethodConfigurationGooglePayDisplayPreferencePreference = "none" PaymentMethodConfigurationGooglePayDisplayPreferencePreferenceOff PaymentMethodConfigurationGooglePayDisplayPreferencePreference = "off" PaymentMethodConfigurationGooglePayDisplayPreferencePreferenceOn PaymentMethodConfigurationGooglePayDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationGooglePayDisplayPreferencePreference can take
type PaymentMethodConfigurationGooglePayDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationGooglePayDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationGooglePayDisplayPreferenceValueOff PaymentMethodConfigurationGooglePayDisplayPreferenceValue = "off" PaymentMethodConfigurationGooglePayDisplayPreferenceValueOn PaymentMethodConfigurationGooglePayDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationGooglePayDisplayPreferenceValue can take
type PaymentMethodConfigurationGooglePayParams ¶ added in v75.6.0
type PaymentMethodConfigurationGooglePayParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationGooglePayDisplayPreferenceParams `form:"display_preference"` }
Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
type PaymentMethodConfigurationGrabpay ¶ added in v75.6.0
type PaymentMethodConfigurationGrabpay struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationGrabpayDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationGrabpayDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationGrabpayDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationGrabpayDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationGrabpayDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationGrabpayDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationGrabpayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationGrabpayDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationGrabpayDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationGrabpayDisplayPreferencePreferenceNone PaymentMethodConfigurationGrabpayDisplayPreferencePreference = "none" PaymentMethodConfigurationGrabpayDisplayPreferencePreferenceOff PaymentMethodConfigurationGrabpayDisplayPreferencePreference = "off" PaymentMethodConfigurationGrabpayDisplayPreferencePreferenceOn PaymentMethodConfigurationGrabpayDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationGrabpayDisplayPreferencePreference can take
type PaymentMethodConfigurationGrabpayDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationGrabpayDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationGrabpayDisplayPreferenceValueOff PaymentMethodConfigurationGrabpayDisplayPreferenceValue = "off" PaymentMethodConfigurationGrabpayDisplayPreferenceValueOn PaymentMethodConfigurationGrabpayDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationGrabpayDisplayPreferenceValue can take
type PaymentMethodConfigurationGrabpayParams ¶ added in v75.6.0
type PaymentMethodConfigurationGrabpayParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationGrabpayDisplayPreferenceParams `form:"display_preference"` }
GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
type PaymentMethodConfigurationIDBankTransfer ¶ added in v75.6.0
type PaymentMethodConfigurationIDBankTransfer struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationIDBankTransferDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationIDBankTransferDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationIDBankTransferDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceNone PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "none" PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceOff PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "off" PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceOn PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference can take
type PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationIDBankTransferDisplayPreferenceValueOff PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue = "off" PaymentMethodConfigurationIDBankTransferDisplayPreferenceValueOn PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue can take
type PaymentMethodConfigurationIDEAL ¶ added in v75.6.0
type PaymentMethodConfigurationIDEAL struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationIDEALDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationIDEALDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationIDEALDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationIDEALDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationIDEALDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationIDEALDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationIDEALDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationIDEALDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationIDEALDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationIDEALDisplayPreferencePreferenceNone PaymentMethodConfigurationIDEALDisplayPreferencePreference = "none" PaymentMethodConfigurationIDEALDisplayPreferencePreferenceOff PaymentMethodConfigurationIDEALDisplayPreferencePreference = "off" PaymentMethodConfigurationIDEALDisplayPreferencePreferenceOn PaymentMethodConfigurationIDEALDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationIDEALDisplayPreferencePreference can take
type PaymentMethodConfigurationIDEALDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationIDEALDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationIDEALDisplayPreferenceValueOff PaymentMethodConfigurationIDEALDisplayPreferenceValue = "off" PaymentMethodConfigurationIDEALDisplayPreferenceValueOn PaymentMethodConfigurationIDEALDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationIDEALDisplayPreferenceValue can take
type PaymentMethodConfigurationIDEALParams ¶ added in v75.6.0
type PaymentMethodConfigurationIDEALParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationIDEALDisplayPreferenceParams `form:"display_preference"` }
iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
type PaymentMethodConfigurationJCB ¶ added in v75.6.0
type PaymentMethodConfigurationJCB struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationJCBDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationJCBDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationJCBDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationJCBDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationJCBDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationJCBDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationJCBDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationJCBDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationJCBDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationJCBDisplayPreferencePreferenceNone PaymentMethodConfigurationJCBDisplayPreferencePreference = "none" PaymentMethodConfigurationJCBDisplayPreferencePreferenceOff PaymentMethodConfigurationJCBDisplayPreferencePreference = "off" PaymentMethodConfigurationJCBDisplayPreferencePreferenceOn PaymentMethodConfigurationJCBDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationJCBDisplayPreferencePreference can take
type PaymentMethodConfigurationJCBDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationJCBDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationJCBDisplayPreferenceValueOff PaymentMethodConfigurationJCBDisplayPreferenceValue = "off" PaymentMethodConfigurationJCBDisplayPreferenceValueOn PaymentMethodConfigurationJCBDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationJCBDisplayPreferenceValue can take
type PaymentMethodConfigurationJCBParams ¶ added in v75.6.0
type PaymentMethodConfigurationJCBParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationJCBDisplayPreferenceParams `form:"display_preference"` }
JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
type PaymentMethodConfigurationKlarna ¶ added in v75.6.0
type PaymentMethodConfigurationKlarna struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationKlarnaDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationKlarnaDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationKlarnaDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationKlarnaDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationKlarnaDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationKlarnaDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationKlarnaDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationKlarnaDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationKlarnaDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationKlarnaDisplayPreferencePreferenceNone PaymentMethodConfigurationKlarnaDisplayPreferencePreference = "none" PaymentMethodConfigurationKlarnaDisplayPreferencePreferenceOff PaymentMethodConfigurationKlarnaDisplayPreferencePreference = "off" PaymentMethodConfigurationKlarnaDisplayPreferencePreferenceOn PaymentMethodConfigurationKlarnaDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationKlarnaDisplayPreferencePreference can take
type PaymentMethodConfigurationKlarnaDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationKlarnaDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationKlarnaDisplayPreferenceValueOff PaymentMethodConfigurationKlarnaDisplayPreferenceValue = "off" PaymentMethodConfigurationKlarnaDisplayPreferenceValueOn PaymentMethodConfigurationKlarnaDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationKlarnaDisplayPreferenceValue can take
type PaymentMethodConfigurationKlarnaParams ¶ added in v75.6.0
type PaymentMethodConfigurationKlarnaParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationKlarnaDisplayPreferenceParams `form:"display_preference"` }
Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
type PaymentMethodConfigurationKonbini ¶ added in v75.6.0
type PaymentMethodConfigurationKonbini struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationKonbiniDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationKonbiniDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationKonbiniDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationKonbiniDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationKonbiniDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationKonbiniDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationKonbiniDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationKonbiniDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationKonbiniDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationKonbiniDisplayPreferencePreferenceNone PaymentMethodConfigurationKonbiniDisplayPreferencePreference = "none" PaymentMethodConfigurationKonbiniDisplayPreferencePreferenceOff PaymentMethodConfigurationKonbiniDisplayPreferencePreference = "off" PaymentMethodConfigurationKonbiniDisplayPreferencePreferenceOn PaymentMethodConfigurationKonbiniDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationKonbiniDisplayPreferencePreference can take
type PaymentMethodConfigurationKonbiniDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationKonbiniDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationKonbiniDisplayPreferenceValueOff PaymentMethodConfigurationKonbiniDisplayPreferenceValue = "off" PaymentMethodConfigurationKonbiniDisplayPreferenceValueOn PaymentMethodConfigurationKonbiniDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationKonbiniDisplayPreferenceValue can take
type PaymentMethodConfigurationKonbiniParams ¶ added in v75.6.0
type PaymentMethodConfigurationKonbiniParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationKonbiniDisplayPreferenceParams `form:"display_preference"` }
Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
type PaymentMethodConfigurationLink ¶ added in v75.6.0
type PaymentMethodConfigurationLink struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationLinkDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationLinkDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationLinkDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationLinkDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationLinkDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationLinkDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationLinkDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationLinkDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationLinkDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationLinkDisplayPreferencePreferenceNone PaymentMethodConfigurationLinkDisplayPreferencePreference = "none" PaymentMethodConfigurationLinkDisplayPreferencePreferenceOff PaymentMethodConfigurationLinkDisplayPreferencePreference = "off" PaymentMethodConfigurationLinkDisplayPreferencePreferenceOn PaymentMethodConfigurationLinkDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationLinkDisplayPreferencePreference can take
type PaymentMethodConfigurationLinkDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationLinkDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationLinkDisplayPreferenceValueOff PaymentMethodConfigurationLinkDisplayPreferenceValue = "off" PaymentMethodConfigurationLinkDisplayPreferenceValueOn PaymentMethodConfigurationLinkDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationLinkDisplayPreferenceValue can take
type PaymentMethodConfigurationLinkParams ¶ added in v75.6.0
type PaymentMethodConfigurationLinkParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationLinkDisplayPreferenceParams `form:"display_preference"` }
[Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
type PaymentMethodConfigurationList ¶ added in v75.6.0
type PaymentMethodConfigurationList struct { APIResource ListMeta Data []*PaymentMethodConfiguration `json:"data"` }
PaymentMethodConfigurationList is a list of PaymentMethodConfigurations as retrieved from a list endpoint.
type PaymentMethodConfigurationListParams ¶ added in v75.6.0
type PaymentMethodConfigurationListParams struct { ListParams `form:"*"` // The Connect application to filter by. Application *string `form:"application"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
List payment method configurations
func (*PaymentMethodConfigurationListParams) AddExpand ¶ added in v75.6.0
func (p *PaymentMethodConfigurationListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentMethodConfigurationMultibanco ¶ added in v75.6.0
type PaymentMethodConfigurationMultibanco struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationMultibancoDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationMultibancoDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationMultibancoDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationMultibancoDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationMultibancoDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationMultibancoDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationMultibancoDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceNone PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "none" PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceOff PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "off" PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceOn PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationMultibancoDisplayPreferencePreference can take
type PaymentMethodConfigurationMultibancoDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationMultibancoDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationMultibancoDisplayPreferenceValueOff PaymentMethodConfigurationMultibancoDisplayPreferenceValue = "off" PaymentMethodConfigurationMultibancoDisplayPreferenceValueOn PaymentMethodConfigurationMultibancoDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationMultibancoDisplayPreferenceValue can take
type PaymentMethodConfigurationNetbanking ¶ added in v75.6.0
type PaymentMethodConfigurationNetbanking struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationNetbankingDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationNetbankingDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationNetbankingDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationNetbankingDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationNetbankingDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationNetbankingDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationNetbankingDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationNetbankingDisplayPreferencePreferenceNone PaymentMethodConfigurationNetbankingDisplayPreferencePreference = "none" PaymentMethodConfigurationNetbankingDisplayPreferencePreferenceOff PaymentMethodConfigurationNetbankingDisplayPreferencePreference = "off" PaymentMethodConfigurationNetbankingDisplayPreferencePreferenceOn PaymentMethodConfigurationNetbankingDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationNetbankingDisplayPreferencePreference can take
type PaymentMethodConfigurationNetbankingDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationNetbankingDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationNetbankingDisplayPreferenceValueOff PaymentMethodConfigurationNetbankingDisplayPreferenceValue = "off" PaymentMethodConfigurationNetbankingDisplayPreferenceValueOn PaymentMethodConfigurationNetbankingDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationNetbankingDisplayPreferenceValue can take
type PaymentMethodConfigurationOXXO ¶ added in v75.6.0
type PaymentMethodConfigurationOXXO struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationOXXODisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationOXXODisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationOXXODisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationOXXODisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationOXXODisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationOXXODisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationOXXODisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationOXXODisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationOXXODisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationOXXODisplayPreferencePreferenceNone PaymentMethodConfigurationOXXODisplayPreferencePreference = "none" PaymentMethodConfigurationOXXODisplayPreferencePreferenceOff PaymentMethodConfigurationOXXODisplayPreferencePreference = "off" PaymentMethodConfigurationOXXODisplayPreferencePreferenceOn PaymentMethodConfigurationOXXODisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationOXXODisplayPreferencePreference can take
type PaymentMethodConfigurationOXXODisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationOXXODisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationOXXODisplayPreferenceValueOff PaymentMethodConfigurationOXXODisplayPreferenceValue = "off" PaymentMethodConfigurationOXXODisplayPreferenceValueOn PaymentMethodConfigurationOXXODisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationOXXODisplayPreferenceValue can take
type PaymentMethodConfigurationOXXOParams ¶ added in v75.6.0
type PaymentMethodConfigurationOXXOParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationOXXODisplayPreferenceParams `form:"display_preference"` }
OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
type PaymentMethodConfigurationP24 ¶ added in v75.6.0
type PaymentMethodConfigurationP24 struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationP24DisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationP24DisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationP24DisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationP24DisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationP24DisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationP24DisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationP24DisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationP24DisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationP24DisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationP24DisplayPreferencePreferenceNone PaymentMethodConfigurationP24DisplayPreferencePreference = "none" PaymentMethodConfigurationP24DisplayPreferencePreferenceOff PaymentMethodConfigurationP24DisplayPreferencePreference = "off" PaymentMethodConfigurationP24DisplayPreferencePreferenceOn PaymentMethodConfigurationP24DisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationP24DisplayPreferencePreference can take
type PaymentMethodConfigurationP24DisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationP24DisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationP24DisplayPreferenceValueOff PaymentMethodConfigurationP24DisplayPreferenceValue = "off" PaymentMethodConfigurationP24DisplayPreferenceValueOn PaymentMethodConfigurationP24DisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationP24DisplayPreferenceValue can take
type PaymentMethodConfigurationP24Params ¶ added in v75.6.0
type PaymentMethodConfigurationP24Params struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationP24DisplayPreferenceParams `form:"display_preference"` }
Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
type PaymentMethodConfigurationParams ¶ added in v75.6.0
type PaymentMethodConfigurationParams struct { Params `form:"*"` // Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. ACSSDebit *PaymentMethodConfigurationACSSDebitParams `form:"acss_debit"` // Whether the configuration can be used for new payments. Active *bool `form:"active"` // [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. Affirm *PaymentMethodConfigurationAffirmParams `form:"affirm"` // Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. AfterpayClearpay *PaymentMethodConfigurationAfterpayClearpayParams `form:"afterpay_clearpay"` // Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. Alipay *PaymentMethodConfigurationAlipayParams `form:"alipay"` // Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. ApplePay *PaymentMethodConfigurationApplePayParams `form:"apple_pay"` // Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. ApplePayLater *PaymentMethodConfigurationApplePayLaterParams `form:"apple_pay_later"` // Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. AUBECSDebit *PaymentMethodConfigurationAUBECSDebitParams `form:"au_becs_debit"` // Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. BACSDebit *PaymentMethodConfigurationBACSDebitParams `form:"bacs_debit"` // Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. Bancontact *PaymentMethodConfigurationBancontactParams `form:"bancontact"` // BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. BLIK *PaymentMethodConfigurationBLIKParams `form:"blik"` // Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. Boleto *PaymentMethodConfigurationBoletoParams `form:"boleto"` // Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. Card *PaymentMethodConfigurationCardParams `form:"card"` // Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. CartesBancaires *PaymentMethodConfigurationCartesBancairesParams `form:"cartes_bancaires"` // Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. CashApp *PaymentMethodConfigurationCashAppParams `form:"cashapp"` // EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. EPS *PaymentMethodConfigurationEPSParams `form:"eps"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. FPX *PaymentMethodConfigurationFPXParams `form:"fpx"` // giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. Giropay *PaymentMethodConfigurationGiropayParams `form:"giropay"` // Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. GooglePay *PaymentMethodConfigurationGooglePayParams `form:"google_pay"` // GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. Grabpay *PaymentMethodConfigurationGrabpayParams `form:"grabpay"` // iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. IDEAL *PaymentMethodConfigurationIDEALParams `form:"ideal"` // JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. JCB *PaymentMethodConfigurationJCBParams `form:"jcb"` // Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. Klarna *PaymentMethodConfigurationKlarnaParams `form:"klarna"` // Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. Konbini *PaymentMethodConfigurationKonbiniParams `form:"konbini"` // [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. Link *PaymentMethodConfigurationLinkParams `form:"link"` // Configuration name. Name *string `form:"name"` // OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. OXXO *PaymentMethodConfigurationOXXOParams `form:"oxxo"` // Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. P24 *PaymentMethodConfigurationP24Params `form:"p24"` // Configuration's parent configuration. Specify to create a child configuration. Parent *string `form:"parent"` // PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. PayNow *PaymentMethodConfigurationPayNowParams `form:"paynow"` // PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. Paypal *PaymentMethodConfigurationPaypalParams `form:"paypal"` // PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. PromptPay *PaymentMethodConfigurationPromptPayParams `form:"promptpay"` // The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. SEPADebit *PaymentMethodConfigurationSEPADebitParams `form:"sepa_debit"` // Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. Sofort *PaymentMethodConfigurationSofortParams `form:"sofort"` // Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. USBankAccount *PaymentMethodConfigurationUSBankAccountParams `form:"us_bank_account"` // WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. WeChatPay *PaymentMethodConfigurationWeChatPayParams `form:"wechat_pay"` }
Creates a payment method configuration
func (*PaymentMethodConfigurationParams) AddExpand ¶ added in v75.6.0
func (p *PaymentMethodConfigurationParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentMethodConfigurationPayByBank ¶ added in v75.6.0
type PaymentMethodConfigurationPayByBank struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationPayByBankDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationPayByBankDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationPayByBankDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationPayByBankDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationPayByBankDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationPayByBankDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationPayByBankDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationPayByBankDisplayPreferencePreferenceNone PaymentMethodConfigurationPayByBankDisplayPreferencePreference = "none" PaymentMethodConfigurationPayByBankDisplayPreferencePreferenceOff PaymentMethodConfigurationPayByBankDisplayPreferencePreference = "off" PaymentMethodConfigurationPayByBankDisplayPreferencePreferenceOn PaymentMethodConfigurationPayByBankDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationPayByBankDisplayPreferencePreference can take
type PaymentMethodConfigurationPayByBankDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationPayByBankDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationPayByBankDisplayPreferenceValueOff PaymentMethodConfigurationPayByBankDisplayPreferenceValue = "off" PaymentMethodConfigurationPayByBankDisplayPreferenceValueOn PaymentMethodConfigurationPayByBankDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationPayByBankDisplayPreferenceValue can take
type PaymentMethodConfigurationPayNow ¶ added in v75.6.0
type PaymentMethodConfigurationPayNow struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationPayNowDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationPayNowDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationPayNowDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationPayNowDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationPayNowDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationPayNowDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationPayNowDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationPayNowDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationPayNowDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationPayNowDisplayPreferencePreferenceNone PaymentMethodConfigurationPayNowDisplayPreferencePreference = "none" PaymentMethodConfigurationPayNowDisplayPreferencePreferenceOff PaymentMethodConfigurationPayNowDisplayPreferencePreference = "off" PaymentMethodConfigurationPayNowDisplayPreferencePreferenceOn PaymentMethodConfigurationPayNowDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationPayNowDisplayPreferencePreference can take
type PaymentMethodConfigurationPayNowDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationPayNowDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationPayNowDisplayPreferenceValueOff PaymentMethodConfigurationPayNowDisplayPreferenceValue = "off" PaymentMethodConfigurationPayNowDisplayPreferenceValueOn PaymentMethodConfigurationPayNowDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationPayNowDisplayPreferenceValue can take
type PaymentMethodConfigurationPayNowParams ¶ added in v75.6.0
type PaymentMethodConfigurationPayNowParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationPayNowDisplayPreferenceParams `form:"display_preference"` }
PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
type PaymentMethodConfigurationPaypal ¶ added in v75.6.0
type PaymentMethodConfigurationPaypal struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationPaypalDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationPaypalDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationPaypalDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationPaypalDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationPaypalDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationPaypalDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationPaypalDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationPaypalDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationPaypalDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationPaypalDisplayPreferencePreferenceNone PaymentMethodConfigurationPaypalDisplayPreferencePreference = "none" PaymentMethodConfigurationPaypalDisplayPreferencePreferenceOff PaymentMethodConfigurationPaypalDisplayPreferencePreference = "off" PaymentMethodConfigurationPaypalDisplayPreferencePreferenceOn PaymentMethodConfigurationPaypalDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationPaypalDisplayPreferencePreference can take
type PaymentMethodConfigurationPaypalDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationPaypalDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationPaypalDisplayPreferenceValueOff PaymentMethodConfigurationPaypalDisplayPreferenceValue = "off" PaymentMethodConfigurationPaypalDisplayPreferenceValueOn PaymentMethodConfigurationPaypalDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationPaypalDisplayPreferenceValue can take
type PaymentMethodConfigurationPaypalParams ¶ added in v75.6.0
type PaymentMethodConfigurationPaypalParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationPaypalDisplayPreferenceParams `form:"display_preference"` }
PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
type PaymentMethodConfigurationPromptPay ¶ added in v75.6.0
type PaymentMethodConfigurationPromptPay struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationPromptPayDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationPromptPayDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationPromptPayDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationPromptPayDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationPromptPayDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationPromptPayDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationPromptPayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationPromptPayDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationPromptPayDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationPromptPayDisplayPreferencePreferenceNone PaymentMethodConfigurationPromptPayDisplayPreferencePreference = "none" PaymentMethodConfigurationPromptPayDisplayPreferencePreferenceOff PaymentMethodConfigurationPromptPayDisplayPreferencePreference = "off" PaymentMethodConfigurationPromptPayDisplayPreferencePreferenceOn PaymentMethodConfigurationPromptPayDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationPromptPayDisplayPreferencePreference can take
type PaymentMethodConfigurationPromptPayDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationPromptPayDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationPromptPayDisplayPreferenceValueOff PaymentMethodConfigurationPromptPayDisplayPreferenceValue = "off" PaymentMethodConfigurationPromptPayDisplayPreferenceValueOn PaymentMethodConfigurationPromptPayDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationPromptPayDisplayPreferenceValue can take
type PaymentMethodConfigurationPromptPayParams ¶ added in v75.6.0
type PaymentMethodConfigurationPromptPayParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationPromptPayDisplayPreferenceParams `form:"display_preference"` }
PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
type PaymentMethodConfigurationSEPADebit ¶ added in v75.6.0
type PaymentMethodConfigurationSEPADebit struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationSEPADebitDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationSEPADebitDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationSEPADebitDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationSEPADebitDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationSEPADebitDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationSEPADebitDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationSEPADebitDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationSEPADebitDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationSEPADebitDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationSEPADebitDisplayPreferencePreferenceNone PaymentMethodConfigurationSEPADebitDisplayPreferencePreference = "none" PaymentMethodConfigurationSEPADebitDisplayPreferencePreferenceOff PaymentMethodConfigurationSEPADebitDisplayPreferencePreference = "off" PaymentMethodConfigurationSEPADebitDisplayPreferencePreferenceOn PaymentMethodConfigurationSEPADebitDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationSEPADebitDisplayPreferencePreference can take
type PaymentMethodConfigurationSEPADebitDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationSEPADebitDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationSEPADebitDisplayPreferenceValueOff PaymentMethodConfigurationSEPADebitDisplayPreferenceValue = "off" PaymentMethodConfigurationSEPADebitDisplayPreferenceValueOn PaymentMethodConfigurationSEPADebitDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationSEPADebitDisplayPreferenceValue can take
type PaymentMethodConfigurationSEPADebitParams ¶ added in v75.6.0
type PaymentMethodConfigurationSEPADebitParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationSEPADebitDisplayPreferenceParams `form:"display_preference"` }
The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
type PaymentMethodConfigurationSofort ¶ added in v75.6.0
type PaymentMethodConfigurationSofort struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationSofortDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationSofortDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationSofortDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationSofortDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationSofortDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationSofortDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationSofortDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationSofortDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationSofortDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationSofortDisplayPreferencePreferenceNone PaymentMethodConfigurationSofortDisplayPreferencePreference = "none" PaymentMethodConfigurationSofortDisplayPreferencePreferenceOff PaymentMethodConfigurationSofortDisplayPreferencePreference = "off" PaymentMethodConfigurationSofortDisplayPreferencePreferenceOn PaymentMethodConfigurationSofortDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationSofortDisplayPreferencePreference can take
type PaymentMethodConfigurationSofortDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationSofortDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationSofortDisplayPreferenceValueOff PaymentMethodConfigurationSofortDisplayPreferenceValue = "off" PaymentMethodConfigurationSofortDisplayPreferenceValueOn PaymentMethodConfigurationSofortDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationSofortDisplayPreferenceValue can take
type PaymentMethodConfigurationSofortParams ¶ added in v75.6.0
type PaymentMethodConfigurationSofortParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationSofortDisplayPreferenceParams `form:"display_preference"` }
Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
type PaymentMethodConfigurationUSBankAccount ¶ added in v75.6.0
type PaymentMethodConfigurationUSBankAccount struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationUSBankAccountDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationUSBankAccountDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationUSBankAccountDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationUSBankAccountDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationUSBankAccountDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationUSBankAccountDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationUSBankAccountDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationUSBankAccountDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationUSBankAccountDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationUSBankAccountDisplayPreferencePreferenceNone PaymentMethodConfigurationUSBankAccountDisplayPreferencePreference = "none" PaymentMethodConfigurationUSBankAccountDisplayPreferencePreferenceOff PaymentMethodConfigurationUSBankAccountDisplayPreferencePreference = "off" PaymentMethodConfigurationUSBankAccountDisplayPreferencePreferenceOn PaymentMethodConfigurationUSBankAccountDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationUSBankAccountDisplayPreferencePreference can take
type PaymentMethodConfigurationUSBankAccountDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationUSBankAccountDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationUSBankAccountDisplayPreferenceValueOff PaymentMethodConfigurationUSBankAccountDisplayPreferenceValue = "off" PaymentMethodConfigurationUSBankAccountDisplayPreferenceValueOn PaymentMethodConfigurationUSBankAccountDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationUSBankAccountDisplayPreferenceValue can take
type PaymentMethodConfigurationUSBankAccountParams ¶ added in v75.6.0
type PaymentMethodConfigurationUSBankAccountParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationUSBankAccountDisplayPreferenceParams `form:"display_preference"` }
Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details.
type PaymentMethodConfigurationUpi ¶ added in v75.6.0
type PaymentMethodConfigurationUpi struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationUpiDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationUpiDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationUpiDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationUpiDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationUpiDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationUpiDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationUpiDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationUpiDisplayPreferencePreferenceNone PaymentMethodConfigurationUpiDisplayPreferencePreference = "none" PaymentMethodConfigurationUpiDisplayPreferencePreferenceOff PaymentMethodConfigurationUpiDisplayPreferencePreference = "off" PaymentMethodConfigurationUpiDisplayPreferencePreferenceOn PaymentMethodConfigurationUpiDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationUpiDisplayPreferencePreference can take
type PaymentMethodConfigurationUpiDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationUpiDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationUpiDisplayPreferenceValueOff PaymentMethodConfigurationUpiDisplayPreferenceValue = "off" PaymentMethodConfigurationUpiDisplayPreferenceValueOn PaymentMethodConfigurationUpiDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationUpiDisplayPreferenceValue can take
type PaymentMethodConfigurationWeChatPay ¶ added in v75.6.0
type PaymentMethodConfigurationWeChatPay struct { // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationWeChatPayDisplayPreference `json:"display_preference"` }
type PaymentMethodConfigurationWeChatPayDisplayPreference ¶ added in v75.6.0
type PaymentMethodConfigurationWeChatPayDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` // The account's display preference. Preference PaymentMethodConfigurationWeChatPayDisplayPreferencePreference `json:"preference"` // The effective display preference value. Value PaymentMethodConfigurationWeChatPayDisplayPreferenceValue `json:"value"` }
type PaymentMethodConfigurationWeChatPayDisplayPreferenceParams ¶ added in v75.6.0
type PaymentMethodConfigurationWeChatPayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. Preference *string `form:"preference"` }
Whether or not the payment method should be displayed.
type PaymentMethodConfigurationWeChatPayDisplayPreferencePreference ¶ added in v75.6.0
type PaymentMethodConfigurationWeChatPayDisplayPreferencePreference string
The account's display preference.
const ( PaymentMethodConfigurationWeChatPayDisplayPreferencePreferenceNone PaymentMethodConfigurationWeChatPayDisplayPreferencePreference = "none" PaymentMethodConfigurationWeChatPayDisplayPreferencePreferenceOff PaymentMethodConfigurationWeChatPayDisplayPreferencePreference = "off" PaymentMethodConfigurationWeChatPayDisplayPreferencePreferenceOn PaymentMethodConfigurationWeChatPayDisplayPreferencePreference = "on" )
List of values that PaymentMethodConfigurationWeChatPayDisplayPreferencePreference can take
type PaymentMethodConfigurationWeChatPayDisplayPreferenceValue ¶ added in v75.6.0
type PaymentMethodConfigurationWeChatPayDisplayPreferenceValue string
The effective display preference value.
const ( PaymentMethodConfigurationWeChatPayDisplayPreferenceValueOff PaymentMethodConfigurationWeChatPayDisplayPreferenceValue = "off" PaymentMethodConfigurationWeChatPayDisplayPreferenceValueOn PaymentMethodConfigurationWeChatPayDisplayPreferenceValue = "on" )
List of values that PaymentMethodConfigurationWeChatPayDisplayPreferenceValue can take
type PaymentMethodConfigurationWeChatPayParams ¶ added in v75.6.0
type PaymentMethodConfigurationWeChatPayParams struct { // Whether or not the payment method should be displayed. DisplayPreference *PaymentMethodConfigurationWeChatPayDisplayPreferenceParams `form:"display_preference"` }
WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
type PaymentMethodCustomerBalance ¶
type PaymentMethodCustomerBalance struct{}
type PaymentMethodCustomerBalanceParams ¶
type PaymentMethodCustomerBalanceParams struct{}
If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
type PaymentMethodDetachParams ¶
type PaymentMethodDetachParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
func (*PaymentMethodDetachParams) AddExpand ¶
func (p *PaymentMethodDetachParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentMethodDomain ¶ added in v75.4.0
type PaymentMethodDomain struct { APIResource // Indicates the status of a specific payment method on a payment method domain. ApplePay *PaymentMethodDomainApplePay `json:"apple_pay"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The domain name that this payment method domain object represents. DomainName string `json:"domain_name"` // Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. Enabled bool `json:"enabled"` // Indicates the status of a specific payment method on a payment method domain. GooglePay *PaymentMethodDomainGooglePay `json:"google_pay"` // Unique identifier for the object. ID string `json:"id"` // Indicates the status of a specific payment method on a payment method domain. Link *PaymentMethodDomainLink `json:"link"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Indicates the status of a specific payment method on a payment method domain. Paypal *PaymentMethodDomainPaypal `json:"paypal"` }
A payment method domain represents a web domain that you have registered with Stripe. Stripe Elements use registered payment method domains to control where certain payment methods are shown.
Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
type PaymentMethodDomainApplePay ¶ added in v75.4.0
type PaymentMethodDomainApplePay struct { // The status of the payment method on the domain. Status PaymentMethodDomainApplePayStatus `json:"status"` // Contains additional details about the status of a payment method for a specific payment method domain. StatusDetails *PaymentMethodDomainApplePayStatusDetails `json:"status_details"` }
Indicates the status of a specific payment method on a payment method domain.
type PaymentMethodDomainApplePayStatus ¶ added in v75.4.0
type PaymentMethodDomainApplePayStatus string
The status of the payment method on the domain.
const ( PaymentMethodDomainApplePayStatusActive PaymentMethodDomainApplePayStatus = "active" PaymentMethodDomainApplePayStatusInactive PaymentMethodDomainApplePayStatus = "inactive" )
List of values that PaymentMethodDomainApplePayStatus can take
type PaymentMethodDomainApplePayStatusDetails ¶ added in v75.4.0
type PaymentMethodDomainApplePayStatusDetails struct { // The error message associated with the status of the payment method on the domain. ErrorMessage string `json:"error_message"` }
Contains additional details about the status of a payment method for a specific payment method domain.
type PaymentMethodDomainGooglePay ¶ added in v75.4.0
type PaymentMethodDomainGooglePay struct { // The status of the payment method on the domain. Status PaymentMethodDomainGooglePayStatus `json:"status"` // Contains additional details about the status of a payment method for a specific payment method domain. StatusDetails *PaymentMethodDomainGooglePayStatusDetails `json:"status_details"` }
Indicates the status of a specific payment method on a payment method domain.
type PaymentMethodDomainGooglePayStatus ¶ added in v75.4.0
type PaymentMethodDomainGooglePayStatus string
The status of the payment method on the domain.
const ( PaymentMethodDomainGooglePayStatusActive PaymentMethodDomainGooglePayStatus = "active" PaymentMethodDomainGooglePayStatusInactive PaymentMethodDomainGooglePayStatus = "inactive" )
List of values that PaymentMethodDomainGooglePayStatus can take
type PaymentMethodDomainGooglePayStatusDetails ¶ added in v75.4.0
type PaymentMethodDomainGooglePayStatusDetails struct { // The error message associated with the status of the payment method on the domain. ErrorMessage string `json:"error_message"` }
Contains additional details about the status of a payment method for a specific payment method domain.
type PaymentMethodDomainLink ¶ added in v75.4.0
type PaymentMethodDomainLink struct { // The status of the payment method on the domain. Status PaymentMethodDomainLinkStatus `json:"status"` // Contains additional details about the status of a payment method for a specific payment method domain. StatusDetails *PaymentMethodDomainLinkStatusDetails `json:"status_details"` }
Indicates the status of a specific payment method on a payment method domain.
type PaymentMethodDomainLinkStatus ¶ added in v75.4.0
type PaymentMethodDomainLinkStatus string
The status of the payment method on the domain.
const ( PaymentMethodDomainLinkStatusActive PaymentMethodDomainLinkStatus = "active" PaymentMethodDomainLinkStatusInactive PaymentMethodDomainLinkStatus = "inactive" )
List of values that PaymentMethodDomainLinkStatus can take
type PaymentMethodDomainLinkStatusDetails ¶ added in v75.4.0
type PaymentMethodDomainLinkStatusDetails struct { // The error message associated with the status of the payment method on the domain. ErrorMessage string `json:"error_message"` }
Contains additional details about the status of a payment method for a specific payment method domain.
type PaymentMethodDomainList ¶ added in v75.4.0
type PaymentMethodDomainList struct { APIResource ListMeta Data []*PaymentMethodDomain `json:"data"` }
PaymentMethodDomainList is a list of PaymentMethodDomains as retrieved from a list endpoint.
type PaymentMethodDomainListParams ¶ added in v75.4.0
type PaymentMethodDomainListParams struct { ListParams `form:"*"` // The domain name that this payment method domain object represents. DomainName *string `form:"domain_name"` // Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements Enabled *bool `form:"enabled"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Lists the details of existing payment method domains.
func (*PaymentMethodDomainListParams) AddExpand ¶ added in v75.4.0
func (p *PaymentMethodDomainListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentMethodDomainParams ¶ added in v75.4.0
type PaymentMethodDomainParams struct { Params `form:"*"` // The domain name that this payment method domain object represents. DomainName *string `form:"domain_name"` // Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. Enabled *bool `form:"enabled"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of an existing payment method domain.
func (*PaymentMethodDomainParams) AddExpand ¶ added in v75.4.0
func (p *PaymentMethodDomainParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentMethodDomainPaypal ¶ added in v75.4.0
type PaymentMethodDomainPaypal struct { // The status of the payment method on the domain. Status PaymentMethodDomainPaypalStatus `json:"status"` // Contains additional details about the status of a payment method for a specific payment method domain. StatusDetails *PaymentMethodDomainPaypalStatusDetails `json:"status_details"` }
Indicates the status of a specific payment method on a payment method domain.
type PaymentMethodDomainPaypalStatus ¶ added in v75.4.0
type PaymentMethodDomainPaypalStatus string
The status of the payment method on the domain.
const ( PaymentMethodDomainPaypalStatusActive PaymentMethodDomainPaypalStatus = "active" PaymentMethodDomainPaypalStatusInactive PaymentMethodDomainPaypalStatus = "inactive" )
List of values that PaymentMethodDomainPaypalStatus can take
type PaymentMethodDomainPaypalStatusDetails ¶ added in v75.4.0
type PaymentMethodDomainPaypalStatusDetails struct { // The error message associated with the status of the payment method on the domain. ErrorMessage string `json:"error_message"` }
Contains additional details about the status of a payment method for a specific payment method domain.
type PaymentMethodDomainValidateParams ¶ added in v75.4.0
type PaymentMethodDomainValidateParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. The payment method doesn't appear in Elements for this domain until it is active.
To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.
Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
func (*PaymentMethodDomainValidateParams) AddExpand ¶ added in v75.4.0
func (p *PaymentMethodDomainValidateParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentMethodEPS ¶
type PaymentMethodEPS struct { // 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 string `json:"bank"` }
type PaymentMethodEPSParams ¶
type PaymentMethodEPSParams struct { // The customer's bank. Bank *string `form:"bank"` }
If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
type PaymentMethodFPX ¶
type PaymentMethodFPX struct { // Account holder type, if provided. Can be one of `individual` or `company`. AccountHolderType PaymentMethodFPXAccountHolderType `json:"account_holder_type"` // The customer's bank, if provided. 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 string `json:"bank"` }
type PaymentMethodFPXAccountHolderType ¶
type PaymentMethodFPXAccountHolderType string
Account holder type, if provided. Can be one of `individual` or `company`.
const ( PaymentMethodFPXAccountHolderTypeCompany PaymentMethodFPXAccountHolderType = "company" PaymentMethodFPXAccountHolderTypeIndividual PaymentMethodFPXAccountHolderType = "individual" )
List of values that PaymentMethodFPXAccountHolderType can take
type PaymentMethodFPXParams ¶
type PaymentMethodFPXParams struct { // Account holder type for FPX transaction AccountHolderType *string `form:"account_holder_type"` // The customer's bank. Bank *string `form:"bank"` }
If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
type PaymentMethodGiropay ¶
type PaymentMethodGiropay struct{}
type PaymentMethodGiropayParams ¶
type PaymentMethodGiropayParams struct{}
If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
type PaymentMethodGrabpay ¶
type PaymentMethodGrabpay struct{}
type PaymentMethodGrabpayParams ¶
type PaymentMethodGrabpayParams struct{}
If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
type PaymentMethodIDEAL ¶
type PaymentMethodIDEAL struct { // The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. Bank string `json:"bank"` // The Bank Identifier Code of the customer's bank, if the bank was provided. BIC string `json:"bic"` }
type PaymentMethodIDEALParams ¶
type PaymentMethodIDEALParams struct { // The customer's bank. Bank *string `form:"bank"` }
If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
type PaymentMethodInteracPresent ¶
type PaymentMethodInteracPresent struct { // Card brand. Can be `interac`, `mastercard` or `visa`. Brand string `json:"brand"` // 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. CardholderName string `json:"cardholder_name"` // 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 `json:"country"` // 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 `json:"description"` // Two-digit number representing the card's expiration month. ExpMonth int64 `json:"exp_month"` // Four-digit number representing the card's expiration year. ExpYear int64 `json:"exp_year"` // 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 `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding string `json:"funding"` // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) IIN string `json:"iin"` // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) Issuer string `json:"issuer"` // The last four digits of the card. Last4 string `json:"last4"` // Contains information about card networks that can be used to process the payment. Networks *PaymentMethodInteracPresentNetworks `json:"networks"` // EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. PreferredLocales []string `json:"preferred_locales"` // How card details were read in this transaction. ReadMethod PaymentMethodInteracPresentReadMethod `json:"read_method"` }
type PaymentMethodInteracPresentNetworks ¶
type PaymentMethodInteracPresentNetworks struct { // All available networks for the card. Available []string `json:"available"` // The preferred network for the card. Preferred string `json:"preferred"` }
Contains information about card networks that can be used to process the payment.
type PaymentMethodInteracPresentParams ¶
type PaymentMethodInteracPresentParams struct{}
If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
type PaymentMethodInteracPresentReadMethod ¶
type PaymentMethodInteracPresentReadMethod string
How card details were read in this transaction.
const ( PaymentMethodInteracPresentReadMethodContactEmv PaymentMethodInteracPresentReadMethod = "contact_emv" PaymentMethodInteracPresentReadMethodContactlessEmv PaymentMethodInteracPresentReadMethod = "contactless_emv" PaymentMethodInteracPresentReadMethodContactlessMagstripeMode PaymentMethodInteracPresentReadMethod = "contactless_magstripe_mode" PaymentMethodInteracPresentReadMethodMagneticStripeFallback PaymentMethodInteracPresentReadMethod = "magnetic_stripe_fallback" PaymentMethodInteracPresentReadMethodMagneticStripeTrack2 PaymentMethodInteracPresentReadMethod = "magnetic_stripe_track2" )
List of values that PaymentMethodInteracPresentReadMethod can take
type PaymentMethodKlarna ¶
type PaymentMethodKlarna struct { // The customer's date of birth, if provided. DOB *PaymentMethodKlarnaDOB `json:"dob"` }
type PaymentMethodKlarnaDOB ¶
type PaymentMethodKlarnaDOB struct { // The day of birth, between 1 and 31. Day int64 `json:"day"` // The month of birth, between 1 and 12. Month int64 `json:"month"` // The four-digit year of birth. Year int64 `json:"year"` }
The customer's date of birth, if provided.
type PaymentMethodKlarnaDOBParams ¶
type PaymentMethodKlarnaDOBParams struct { // The day of birth, between 1 and 31. Day *int64 `form:"day"` // The month of birth, between 1 and 12. Month *int64 `form:"month"` // The four-digit year of birth. Year *int64 `form:"year"` }
Customer's date of birth
type PaymentMethodKlarnaParams ¶
type PaymentMethodKlarnaParams struct { // Customer's date of birth DOB *PaymentMethodKlarnaDOBParams `form:"dob"` }
If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
type PaymentMethodKonbini ¶
type PaymentMethodKonbini struct{}
type PaymentMethodKonbiniParams ¶
type PaymentMethodKonbiniParams struct{}
If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
type PaymentMethodLink ¶
type PaymentMethodLinkParams ¶
type PaymentMethodLinkParams struct{}
If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
type PaymentMethodList ¶
type PaymentMethodList struct { APIResource ListMeta Data []*PaymentMethod `json:"data"` }
PaymentMethodList is a list of PaymentMethods as retrieved from a list endpoint.
type PaymentMethodListParams ¶
type PaymentMethodListParams struct { ListParams `form:"*"` // The ID of the customer whose PaymentMethods will be retrieved. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. Type *string `form:"type"` }
Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead.
func (*PaymentMethodListParams) AddExpand ¶
func (p *PaymentMethodListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentMethodOXXO ¶
type PaymentMethodOXXO struct{}
type PaymentMethodOXXOParams ¶
type PaymentMethodOXXOParams struct{}
If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
type PaymentMethodP24 ¶
type PaymentMethodP24 struct { // The customer's bank, if provided. Bank string `json:"bank"` }
type PaymentMethodP24Params ¶
type PaymentMethodP24Params struct { // The customer's bank. Bank *string `form:"bank"` }
If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
type PaymentMethodParams ¶
type PaymentMethodParams struct { Params `form:"*"` // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. ACSSDebit *PaymentMethodACSSDebitParams `form:"acss_debit"` // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. Affirm *PaymentMethodAffirmParams `form:"affirm"` // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *PaymentMethodAlipayParams `form:"alipay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. BACSDebit *PaymentMethodBACSDebitParams `form:"bacs_debit"` // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. Bancontact *PaymentMethodBancontactParams `form:"bancontact"` // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. BillingDetails *PaymentMethodBillingDetailsParams `form:"billing_details"` // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. BLIK *PaymentMethodBLIKParams `form:"blik"` // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. Boleto *PaymentMethodBoletoParams `form:"boleto"` // If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. Card *PaymentMethodCardParams `form:"card"` // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. CashApp *PaymentMethodCashAppParams `form:"cashapp"` // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. CustomerBalance *PaymentMethodCustomerBalanceParams `form:"customer_balance"` // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. EPS *PaymentMethodEPSParams `form:"eps"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. FPX *PaymentMethodFPXParams `form:"fpx"` // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. Giropay *PaymentMethodGiropayParams `form:"giropay"` // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. Grabpay *PaymentMethodGrabpayParams `form:"grabpay"` // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. IDEAL *PaymentMethodIDEALParams `form:"ideal"` // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. InteracPresent *PaymentMethodInteracPresentParams `form:"interac_present"` // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. Klarna *PaymentMethodKlarnaParams `form:"klarna"` // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. Konbini *PaymentMethodKonbiniParams `form:"konbini"` // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. Link *PaymentMethodLinkParams `form:"link"` // 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`. Metadata map[string]string `form:"metadata"` // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. OXXO *PaymentMethodOXXOParams `form:"oxxo"` // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. P24 *PaymentMethodP24Params `form:"p24"` // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. PayNow *PaymentMethodPayNowParams `form:"paynow"` // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. Paypal *PaymentMethodPaypalParams `form:"paypal"` // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. Pix *PaymentMethodPixParams `form:"pix"` // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. PromptPay *PaymentMethodPromptPayParams `form:"promptpay"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *PaymentMethodRadarOptionsParams `form:"radar_options"` // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. SEPADebit *PaymentMethodSEPADebitParams `form:"sepa_debit"` // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. Sofort *PaymentMethodSofortParams `form:"sofort"` // 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. Type *string `form:"type"` // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. USBankAccount *PaymentMethodUSBankAccountParams `form:"us_bank_account"` // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. WeChatPay *PaymentMethodWeChatPayParams `form:"wechat_pay"` // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. Zip *PaymentMethodZipParams `form:"zip"` // The following parameters are used when cloning a PaymentMethod to the connected account // The `Customer` to whom the original PaymentMethod is attached. Customer *string `form:"customer"` // The PaymentMethod to share. PaymentMethod *string `form:"payment_method"` }
Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the <a href="/docs/payments/save-and-reuse">SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
func (*PaymentMethodParams) AddExpand ¶
func (p *PaymentMethodParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PaymentMethodParams) AddMetadata ¶
func (p *PaymentMethodParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PaymentMethodPayNow ¶
type PaymentMethodPayNow struct{}
type PaymentMethodPayNowParams ¶
type PaymentMethodPayNowParams struct{}
If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
type PaymentMethodPaypal ¶
type PaymentMethodPaypal struct { // Owner's email. Values are provided by PayPal directly // (if supported) at the time of authorization or settlement. They cannot be set or mutated. PayerEmail string `json:"payer_email"` // PayPal account PayerID. This identifier uniquely identifies the PayPal customer. PayerID string `json:"payer_id"` }
type PaymentMethodPaypalParams ¶
type PaymentMethodPaypalParams struct{}
If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
type PaymentMethodPix ¶
type PaymentMethodPix struct{}
type PaymentMethodPixParams ¶
type PaymentMethodPixParams struct{}
If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
type PaymentMethodPromptPay ¶
type PaymentMethodPromptPay struct{}
type PaymentMethodPromptPayParams ¶
type PaymentMethodPromptPayParams struct{}
If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
type PaymentMethodRadarOptions ¶
type PaymentMethodRadarOptions struct { // 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. Session string `json:"session"` }
Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
type PaymentMethodRadarOptionsParams ¶
type PaymentMethodRadarOptionsParams struct { // 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. Session *string `form:"session"` }
Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
type PaymentMethodSEPADebit ¶
type PaymentMethodSEPADebit struct { // Bank code of bank associated with the bank account. BankCode string `json:"bank_code"` // Branch code of bank associated with the bank account. BranchCode string `json:"branch_code"` // Two-letter ISO code representing the country the bank account is located in. Country string `json:"country"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Information about the object that generated this PaymentMethod. GeneratedFrom *PaymentMethodSEPADebitGeneratedFrom `json:"generated_from"` // Last four characters of the IBAN. Last4 string `json:"last4"` }
type PaymentMethodSEPADebitGeneratedFrom ¶
type PaymentMethodSEPADebitGeneratedFrom struct { // The ID of the Charge that generated this PaymentMethod, if any. Charge *Charge `json:"charge"` // The ID of the SetupAttempt that generated this PaymentMethod, if any. SetupAttempt *SetupAttempt `json:"setup_attempt"` }
Information about the object that generated this PaymentMethod.
type PaymentMethodSEPADebitParams ¶
type PaymentMethodSEPADebitParams struct { // IBAN of the bank account. IBAN *string `form:"iban"` }
If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
type PaymentMethodSofort ¶
type PaymentMethodSofort struct { // Two-letter ISO code representing the country the bank account is located in. Country string `json:"country"` }
type PaymentMethodSofortParams ¶
type PaymentMethodSofortParams struct { // Two-letter ISO code representing the country the bank account is located in. Country *string `form:"country"` }
If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
type PaymentMethodType ¶
type PaymentMethodType string
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.
const ( PaymentMethodTypeACSSDebit PaymentMethodType = "acss_debit" PaymentMethodTypeAffirm PaymentMethodType = "affirm" PaymentMethodTypeAfterpayClearpay PaymentMethodType = "afterpay_clearpay" PaymentMethodTypeAlipay PaymentMethodType = "alipay" PaymentMethodTypeAUBECSDebit PaymentMethodType = "au_becs_debit" PaymentMethodTypeBACSDebit PaymentMethodType = "bacs_debit" PaymentMethodTypeBancontact PaymentMethodType = "bancontact" PaymentMethodTypeBLIK PaymentMethodType = "blik" PaymentMethodTypeBoleto PaymentMethodType = "boleto" PaymentMethodTypeCard PaymentMethodType = "card" PaymentMethodTypeCardPresent PaymentMethodType = "card_present" PaymentMethodTypeCashApp PaymentMethodType = "cashapp" PaymentMethodTypeCustomerBalance PaymentMethodType = "customer_balance" PaymentMethodTypeEPS PaymentMethodType = "eps" PaymentMethodTypeFPX PaymentMethodType = "fpx" PaymentMethodTypeGiropay PaymentMethodType = "giropay" PaymentMethodTypeGrabpay PaymentMethodType = "grabpay" PaymentMethodTypeIDEAL PaymentMethodType = "ideal" PaymentMethodTypeInteracPresent PaymentMethodType = "interac_present" PaymentMethodTypeKlarna PaymentMethodType = "klarna" PaymentMethodTypeKonbini PaymentMethodType = "konbini" PaymentMethodTypeLink PaymentMethodType = "link" PaymentMethodTypeOXXO PaymentMethodType = "oxxo" PaymentMethodTypeP24 PaymentMethodType = "p24" PaymentMethodTypePayNow PaymentMethodType = "paynow" PaymentMethodTypePaypal PaymentMethodType = "paypal" PaymentMethodTypePix PaymentMethodType = "pix" PaymentMethodTypePromptPay PaymentMethodType = "promptpay" PaymentMethodTypeSEPADebit PaymentMethodType = "sepa_debit" PaymentMethodTypeSofort PaymentMethodType = "sofort" PaymentMethodTypeUSBankAccount PaymentMethodType = "us_bank_account" PaymentMethodTypeWeChatPay PaymentMethodType = "wechat_pay" PaymentMethodTypeZip PaymentMethodType = "zip" )
List of values that PaymentMethodType can take
type PaymentMethodUSBankAccount ¶
type PaymentMethodUSBankAccount struct { // Account holder type: individual or company. AccountHolderType PaymentMethodUSBankAccountAccountHolderType `json:"account_holder_type"` // Account type: checkings or savings. Defaults to checking if omitted. AccountType PaymentMethodUSBankAccountAccountType `json:"account_type"` // The name of the bank. BankName string `json:"bank_name"` // The ID of the Financial Connections Account used to create the payment method. FinancialConnectionsAccount string `json:"financial_connections_account"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four digits of the bank account number. Last4 string `json:"last4"` // Contains information about US bank account networks that can be used. Networks *PaymentMethodUSBankAccountNetworks `json:"networks"` // Routing number of the bank account. RoutingNumber string `json:"routing_number"` // Contains information about the future reusability of this PaymentMethod. StatusDetails *PaymentMethodUSBankAccountStatusDetails `json:"status_details"` }
type PaymentMethodUSBankAccountAccountHolderType ¶
type PaymentMethodUSBankAccountAccountHolderType string
Account holder type: individual or company.
const ( PaymentMethodUSBankAccountAccountHolderTypeCompany PaymentMethodUSBankAccountAccountHolderType = "company" PaymentMethodUSBankAccountAccountHolderTypeIndividual PaymentMethodUSBankAccountAccountHolderType = "individual" )
List of values that PaymentMethodUSBankAccountAccountHolderType can take
type PaymentMethodUSBankAccountAccountType ¶
type PaymentMethodUSBankAccountAccountType string
Account type: checkings or savings. Defaults to checking if omitted.
const ( PaymentMethodUSBankAccountAccountTypeChecking PaymentMethodUSBankAccountAccountType = "checking" PaymentMethodUSBankAccountAccountTypeSavings PaymentMethodUSBankAccountAccountType = "savings" )
List of values that PaymentMethodUSBankAccountAccountType can take
type PaymentMethodUSBankAccountNetworks ¶
type PaymentMethodUSBankAccountNetworks struct { // The preferred network. Preferred string `json:"preferred"` // All supported networks. Supported []PaymentMethodUSBankAccountNetworksSupported `json:"supported"` }
Contains information about US bank account networks that can be used.
type PaymentMethodUSBankAccountNetworksSupported ¶
type PaymentMethodUSBankAccountNetworksSupported string
All supported networks.
const ( PaymentMethodUSBankAccountNetworksSupportedACH PaymentMethodUSBankAccountNetworksSupported = "ach" PaymentMethodUSBankAccountNetworksSupportedUSDomesticWire PaymentMethodUSBankAccountNetworksSupported = "us_domestic_wire" )
List of values that PaymentMethodUSBankAccountNetworksSupported can take
type PaymentMethodUSBankAccountParams ¶
type PaymentMethodUSBankAccountParams struct { // Account holder type: individual or company. AccountHolderType *string `form:"account_holder_type"` // Account number of the bank account. AccountNumber *string `form:"account_number"` // Account type: checkings or savings. Defaults to checking if omitted. AccountType *string `form:"account_type"` // The ID of a Financial Connections Account to use as a payment method. FinancialConnectionsAccount *string `form:"financial_connections_account"` // Routing number of the bank account. RoutingNumber *string `form:"routing_number"` }
If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
type PaymentMethodUSBankAccountStatusDetails ¶
type PaymentMethodUSBankAccountStatusDetails struct {
Blocked *PaymentMethodUSBankAccountStatusDetailsBlocked `json:"blocked"`
}
Contains information about the future reusability of this PaymentMethod.
type PaymentMethodUSBankAccountStatusDetailsBlocked ¶
type PaymentMethodUSBankAccountStatusDetailsBlocked struct { // The ACH network code that resulted in this block. NetworkCode PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode `json:"network_code"` // The reason why this PaymentMethod's fingerprint has been blocked Reason PaymentMethodUSBankAccountStatusDetailsBlockedReason `json:"reason"` }
type PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode ¶
type PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode string
The ACH network code that resulted in this block.
const ( PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR02 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R02" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR03 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R03" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR04 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R04" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR05 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R05" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR07 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R07" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR08 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R08" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR10 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R10" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR11 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R11" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR16 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R16" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR20 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R20" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR29 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R29" PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCodeR31 PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode = "R31" )
List of values that PaymentMethodUSBankAccountStatusDetailsBlockedNetworkCode can take
type PaymentMethodUSBankAccountStatusDetailsBlockedReason ¶
type PaymentMethodUSBankAccountStatusDetailsBlockedReason string
The reason why this PaymentMethod's fingerprint has been blocked
const ( PaymentMethodUSBankAccountStatusDetailsBlockedReasonBankAccountClosed PaymentMethodUSBankAccountStatusDetailsBlockedReason = "bank_account_closed" PaymentMethodUSBankAccountStatusDetailsBlockedReasonBankAccountFrozen PaymentMethodUSBankAccountStatusDetailsBlockedReason = "bank_account_frozen" PaymentMethodUSBankAccountStatusDetailsBlockedReasonBankAccountInvalidDetails PaymentMethodUSBankAccountStatusDetailsBlockedReason = "bank_account_invalid_details" PaymentMethodUSBankAccountStatusDetailsBlockedReasonBankAccountRestricted PaymentMethodUSBankAccountStatusDetailsBlockedReason = "bank_account_restricted" PaymentMethodUSBankAccountStatusDetailsBlockedReasonBankAccountUnusable PaymentMethodUSBankAccountStatusDetailsBlockedReason = "bank_account_unusable" PaymentMethodUSBankAccountStatusDetailsBlockedReasonDebitNotAuthorized PaymentMethodUSBankAccountStatusDetailsBlockedReason = "debit_not_authorized" )
List of values that PaymentMethodUSBankAccountStatusDetailsBlockedReason can take
type PaymentMethodWeChatPay ¶
type PaymentMethodWeChatPay struct{}
type PaymentMethodWeChatPayParams ¶
type PaymentMethodWeChatPayParams struct{}
If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
type PaymentMethodZip ¶
type PaymentMethodZip struct{}
type PaymentMethodZipParams ¶
type PaymentMethodZipParams struct{}
If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
type PaymentSource ¶
type PaymentSource struct { APIResource BankAccount *BankAccount `json:"-"` Card *Card `json:"-"` Deleted bool `json:"deleted"` ID string `json:"id"` Source *Source `json:"-"` Type PaymentSourceType `json:"object"` }
func (*PaymentSource) MarshalJSON ¶
func (s *PaymentSource) MarshalJSON() ([]byte, error)
MarshalJSON handles serialization of a PaymentSource. This custom marshaling is needed because the specific type of payment instrument it represents is specified by the Type
func (*PaymentSource) UnmarshalJSON ¶
func (s *PaymentSource) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a PaymentSource. This custom unmarshaling is needed because the specific type of payment instrument it refers to is specified in the JSON
type PaymentSourceList ¶
type PaymentSourceList struct { APIResource ListMeta Data []*PaymentSource `json:"data"` }
PaymentSourceList is a list of PaymentSources as retrieved from a list endpoint.
type PaymentSourceListParams ¶
type PaymentSourceListParams struct { ListParams `form:"*"` Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Filter sources according to a particular object type. Object *string `form:"object"` }
List sources for a specified customer.
func (*PaymentSourceListParams) AddExpand ¶
func (p *PaymentSourceListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PaymentSourceOwnerParams ¶
type PaymentSourceOwnerParams struct { // Owner's address. Address *AddressParams `form:"address"` // Owner's email address. Email *string `form:"email"` // Owner's full name. Name *string `form:"name"` // Owner's phone number. Phone *string `form:"phone"` }
type PaymentSourceParams ¶
type PaymentSourceParams struct { Params `form:"*"` Customer *string `form:"-"` // Included in URL // The name of the person or business that owns the bank account. AccountHolderName *string `form:"account_holder_name"` // The type of entity that holds the account. This can be either `individual` or `company`. AccountHolderType *string `form:"account_holder_type"` // City/District/Suburb/Town/Village. AddressCity *string `form:"address_city"` // Billing address country, if provided when creating card. AddressCountry *string `form:"address_country"` // Address line 1 (Street address/PO Box/Company name). AddressLine1 *string `form:"address_line1"` // Address line 2 (Apartment/Suite/Unit/Building). AddressLine2 *string `form:"address_line2"` // State/County/Province/Region. AddressState *string `form:"address_state"` // ZIP or postal code. AddressZip *string `form:"address_zip"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Two digit number representing the card's expiration month. ExpMonth *string `form:"exp_month"` // Four digit number representing the card's expiration year. ExpYear *string `form:"exp_year"` // 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`. Metadata map[string]string `form:"metadata"` // Cardholder name. Name *string `form:"name"` Owner *PaymentSourceOwnerParams `form:"owner"` // Please refer to full [documentation](https://stripe.com/docs/api) instead. Source *PaymentSourceSourceParams `form:"*"` // PaymentSourceSourceParams has custom encoding so brought to top level with "*" Validate *bool `form:"validate"` }
When you create a new credit card, you must specify a customer or recipient on which to create it.
If the card's owner has no default card, then the new card will become the default. However, if the owner already has a default, then it will not change. To change the default, you should [update the customer](https://stripe.com/docs/api#update_customer) to have a new default_source.
func (*PaymentSourceParams) AddExpand ¶
func (p *PaymentSourceParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PaymentSourceParams) AddMetadata ¶
func (p *PaymentSourceParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PaymentSourceSourceParams ¶
type PaymentSourceSourceParams struct { Card *CardParams `form:"-"` Token *string `form:"source"` }
PaymentSourceSourceParams is a union struct used to describe an arbitrary payment source.
func SourceParamsFor ¶
func SourceParamsFor(obj interface{}) (*PaymentSourceSourceParams, error)
SourceParamsFor creates PaymentSourceSourceParams objects around supported payment sources, returning errors if not.
Currently supported payment source types are Card (CardParams) and Tokens/IDs (string), where Tokens could be single use card tokens
type PaymentSourceType ¶
type PaymentSourceType string
const ( PaymentSourceTypeAccount PaymentSourceType = "account" PaymentSourceTypeBankAccount PaymentSourceType = "bank_account" PaymentSourceTypeCard PaymentSourceType = "card" PaymentSourceTypeSource PaymentSourceType = "source" )
List of values that PaymentSourceType can take
type PaymentSourceVerifyParams ¶
type PaymentSourceVerifyParams struct { Params `form:"*"` Customer *string `form:"-"` // Included in URL // Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. Amounts [2]int64 `form:"amounts"` // Amounts is used when verifying bank accounts // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` Values []*string `form:"values"` // Values is used when verifying sources }
Verify a specified bank account for a given customer.
func (*PaymentSourceVerifyParams) AddExpand ¶
func (p *PaymentSourceVerifyParams) AddExpand(f string)
AddExpand appends a new field to expand.
type Payout ¶
type Payout struct { APIResource // The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. Amount int64 `json:"amount"` // Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. ArrivalDate int64 `json:"arrival_date"` // Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). Automatic bool `json:"automatic"` // ID of the balance transaction that describes the impact of this payout on your account balance. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // ID of the bank account or card the payout is sent to. Destination *PayoutDestination `json:"destination"` // If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"` // Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). FailureCode PayoutFailureCode `json:"failure_code"` // Message that provides the reason for a payout failure, if available. FailureMessage string `json:"failure_message"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). Method PayoutMethodType `json:"method"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // If the payout reverses another, this is the ID of the original payout. OriginalPayout *Payout `json:"original_payout"` // If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. ReconciliationStatus PayoutReconciliationStatus `json:"reconciliation_status"` // If the payout reverses, this is the ID of the payout that reverses this payout. ReversedBy *Payout `json:"reversed_by"` // The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. SourceType PayoutSourceType `json:"source_type"` // Extra information about a payout that displays on the user's bank statement. StatementDescriptor string `json:"statement_descriptor"` // Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. Status PayoutStatus `json:"status"` // Can be `bank_account` or `card`. Type PayoutType `json:"type"` }
A `Payout` object is created when you receive funds from Stripe, or when you initiate a payout to either a bank account or debit card of a [connected Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, and list all payouts. Payouts are made on [varying schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and industry.
Related guide: [Receiving payouts](https://stripe.com/docs/payouts)
func (*Payout) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Payout. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type PayoutDestination ¶
type PayoutDestination struct { ID string `json:"id"` Type PayoutDestinationType `json:"object"` BankAccount *BankAccount `json:"-"` Card *Card `json:"-"` }
func (*PayoutDestination) UnmarshalJSON ¶
func (p *PayoutDestination) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a PayoutDestination. This custom unmarshaling is needed because the specific type of PayoutDestination it refers to is specified in the JSON
type PayoutDestinationType ¶
type PayoutDestinationType string
const ( PayoutDestinationTypeBankAccount PayoutDestinationType = "bank_account" PayoutDestinationTypeCard PayoutDestinationType = "card" )
List of values that PayoutDestinationType can take
type PayoutFailureCode ¶
type PayoutFailureCode string
Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures).
const ( PayoutFailureCodeAccountClosed PayoutFailureCode = "account_closed" PayoutFailureCodeAccountFrozen PayoutFailureCode = "account_frozen" PayoutFailureCodeBankAccountRestricted PayoutFailureCode = "bank_account_restricted" PayoutFailureCodeBankOwnershipChanged PayoutFailureCode = "bank_ownership_changed" PayoutFailureCodeCouldNotProcess PayoutFailureCode = "could_not_process" PayoutFailureCodeDebitNotAuthorized PayoutFailureCode = "debit_not_authorized" PayoutFailureCodeDeclined PayoutFailureCode = "declined" PayoutFailureCodeInsufficientFunds PayoutFailureCode = "insufficient_funds" PayoutFailureCodeInvalidAccountNumber PayoutFailureCode = "invalid_account_number" PayoutFailureCodeIncorrectAccountHolderName PayoutFailureCode = "incorrect_account_holder_name" PayoutFailureCodeIncorrectAccountHolderAddress PayoutFailureCode = "incorrect_account_holder_address" PayoutFailureCodeIncorrectAccountHolderTaxID PayoutFailureCode = "incorrect_account_holder_tax_id" PayoutFailureCodeInvalidCurrency PayoutFailureCode = "invalid_currency" PayoutFailureCodeNoAccount PayoutFailureCode = "no_account" PayoutFailureCodeUnsupportedCard PayoutFailureCode = "unsupported_card" )
List of values that PayoutFailureCode can take
type PayoutList ¶
type PayoutList struct { APIResource ListMeta Data []*Payout `json:"data"` }
PayoutList is a list of Payouts as retrieved from a list endpoint.
type PayoutListParams ¶
type PayoutListParams struct { ListParams `form:"*"` ArrivalDate *int64 `form:"arrival_date"` ArrivalDateRange *RangeQueryParams `form:"arrival_date"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // The ID of an external account - only return payouts sent to this external account. Destination *string `form:"destination"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. Status *string `form:"status"` }
Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.
func (*PayoutListParams) AddExpand ¶
func (p *PayoutListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PayoutMethodType ¶
type PayoutMethodType string
The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
const ( PayoutMethodInstant PayoutMethodType = "instant" PayoutMethodStandard PayoutMethodType = "standard" )
List of values that PayoutMethodType can take
type PayoutParams ¶
type PayoutParams struct { Params `form:"*"` // A positive integer in cents representing how much to payout. Amount *int64 `form:"amount"` // 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 `form:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. Destination *string `form:"destination"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). Method *string `form:"method"` // The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. SourceType *string `form:"source_type"` // A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. StatementDescriptor *string `form:"statement_descriptor"` }
Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information.
func (*PayoutParams) AddExpand ¶
func (p *PayoutParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PayoutParams) AddMetadata ¶
func (p *PayoutParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PayoutReconciliationStatus ¶
type PayoutReconciliationStatus string
If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout.
const ( PayoutReconciliationStatusCompleted PayoutReconciliationStatus = "completed" PayoutReconciliationStatusInProgress PayoutReconciliationStatus = "in_progress" PayoutReconciliationStatusNotApplicable PayoutReconciliationStatus = "not_applicable" )
List of values that PayoutReconciliationStatus can take
type PayoutReverseParams ¶
type PayoutReverseParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` }
Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is in the pending status, use /v1/payouts/:id/cancel instead.
By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.
func (*PayoutReverseParams) AddExpand ¶
func (p *PayoutReverseParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PayoutReverseParams) AddMetadata ¶
func (p *PayoutReverseParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PayoutSourceType ¶
type PayoutSourceType string
The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`.
const ( PayoutSourceTypeBankAccount PayoutSourceType = "bank_account" PayoutSourceTypeCard PayoutSourceType = "card" PayoutSourceTypeFPX PayoutSourceType = "fpx" )
List of values that PayoutSourceType can take
type PayoutStatus ¶
type PayoutStatus string
Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`.
const ( PayoutStatusCanceled PayoutStatus = "canceled" PayoutStatusFailed PayoutStatus = "failed" PayoutStatusInTransit PayoutStatus = "in_transit" PayoutStatusPaid PayoutStatus = "paid" PayoutStatusPending PayoutStatus = "pending" )
List of values that PayoutStatus can take
type PayoutType ¶
type PayoutType string
Can be `bank_account` or `card`.
const ( PayoutTypeBank PayoutType = "bank_account" PayoutTypeCard PayoutType = "card" )
List of values that PayoutType can take
type Person ¶
type Person struct { APIResource // The account the person is associated with. Account string `json:"account"` Address *Address `json:"address"` // The Kana variation of the person's address (Japan only). AddressKana *PersonAddressKana `json:"address_kana"` // The Kanji variation of the person's address (Japan only). AddressKanji *PersonAddressKanji `json:"address_kanji"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` Deleted bool `json:"deleted"` DOB *PersonDOB `json:"dob"` // The person's email address. Email string `json:"email"` // The person's first name. FirstName string `json:"first_name"` // The Kana variation of the person's first name (Japan only). FirstNameKana string `json:"first_name_kana"` // The Kanji variation of the person's first name (Japan only). FirstNameKanji string `json:"first_name_kanji"` // A list of alternate names or aliases that the person is known by. FullNameAliases []string `json:"full_name_aliases"` // Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. FutureRequirements *PersonFutureRequirements `json:"future_requirements"` // The person's gender (International regulations require either "male" or "female"). Gender string `json:"gender"` // Unique identifier for the object. ID string `json:"id"` // Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). IDNumberProvided bool `json:"id_number_provided"` // Whether the person's `id_number_secondary` was provided. IDNumberSecondaryProvided bool `json:"id_number_secondary_provided"` // The person's last name. LastName string `json:"last_name"` // The Kana variation of the person's last name (Japan only). LastNameKana string `json:"last_name_kana"` // The Kanji variation of the person's last name (Japan only). LastNameKanji string `json:"last_name_kanji"` // The person's maiden name. MaidenName string `json:"maiden_name"` // 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. Metadata map[string]string `json:"metadata"` // The country where the person is a national. Nationality string `json:"nationality"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The person's phone number. Phone string `json:"phone"` // Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. PoliticalExposure PersonPoliticalExposure `json:"political_exposure"` RegisteredAddress *Address `json:"registered_address"` Relationship *PersonRelationship `json:"relationship"` // Information about the requirements for this person, including what information needs to be collected, and by when. Requirements *PersonRequirements `json:"requirements"` // Whether the last four digits of the person's Social Security number have been provided (U.S. only). SSNLast4Provided bool `json:"ssn_last_4_provided"` Verification *PersonVerification `json:"verification"` }
This is an object representing a person associated with a Stripe account.
A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps.
Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information)
type PersonAddressKana ¶
type PersonAddressKana struct { // City/Ward. City string `json:"city"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // Block/Building number. Line1 string `json:"line1"` // Building details. Line2 string `json:"line2"` // ZIP or postal code. PostalCode string `json:"postal_code"` // Prefecture. State string `json:"state"` // Town/cho-me. Town string `json:"town"` }
The Kana variation of the person's address (Japan only).
type PersonAddressKanaParams ¶
type PersonAddressKanaParams struct { // City or ward. City *string `form:"city"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country *string `form:"country"` // Block or building number. Line1 *string `form:"line1"` // Building details. Line2 *string `form:"line2"` // Postal code. PostalCode *string `form:"postal_code"` // Prefecture. State *string `form:"state"` // Town or cho-me. Town *string `form:"town"` }
The Kana variation of the person's address (Japan only).
type PersonAddressKanji ¶
type PersonAddressKanji struct { // City/Ward. City string `json:"city"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // Block/Building number. Line1 string `json:"line1"` // Building details. Line2 string `json:"line2"` // ZIP or postal code. PostalCode string `json:"postal_code"` // Prefecture. State string `json:"state"` // Town/cho-me. Town string `json:"town"` }
The Kanji variation of the person's address (Japan only).
type PersonAddressKanjiParams ¶
type PersonAddressKanjiParams struct { // City or ward. City *string `form:"city"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country *string `form:"country"` // Block or building number. Line1 *string `form:"line1"` // Building details. Line2 *string `form:"line2"` // Postal code. PostalCode *string `form:"postal_code"` // Prefecture. State *string `form:"state"` // Town or cho-me. Town *string `form:"town"` }
The Kanji variation of the person's address (Japan only).
type PersonDOBParams ¶
type PersonDOBParams struct { // The day of birth, between 1 and 31. Day *int64 `form:"day"` // The month of birth, between 1 and 12. Month *int64 `form:"month"` // The four-digit year of birth. Year *int64 `form:"year"` }
The person's date of birth.
type PersonDocumentsCompanyAuthorizationParams ¶
type PersonDocumentsCompanyAuthorizationParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
One or more documents that demonstrate proof that this person is authorized to represent the company.
type PersonDocumentsParams ¶
type PersonDocumentsParams struct { // One or more documents that demonstrate proof that this person is authorized to represent the company. CompanyAuthorization *PersonDocumentsCompanyAuthorizationParams `form:"company_authorization"` // One or more documents showing the person's passport page with photo and personal data. Passport *PersonDocumentsPassportParams `form:"passport"` // One or more documents showing the person's visa required for living in the country where they are residing. Visa *PersonDocumentsVisaParams `form:"visa"` }
Documents that may be submitted to satisfy various informational requests.
type PersonDocumentsPassportParams ¶
type PersonDocumentsPassportParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
One or more documents showing the person's passport page with photo and personal data.
type PersonDocumentsVisaParams ¶
type PersonDocumentsVisaParams struct { // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. Files []*string `form:"files"` }
One or more documents showing the person's visa required for living in the country where they are residing.
type PersonFutureRequirements ¶
type PersonFutureRequirements struct { // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. Alternatives []*PersonFutureRequirementsAlternative `json:"alternatives"` // Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. CurrentlyDue []string `json:"currently_due"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*PersonFutureRequirementsError `json:"errors"` // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. PastDue []string `json:"past_due"` // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. PendingVerification []string `json:"pending_verification"` }
Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
type PersonFutureRequirementsAlternative ¶
type PersonFutureRequirementsAlternative struct { // Fields that can be provided to satisfy all fields in `original_fields_due`. AlternativeFieldsDue []string `json:"alternative_fields_due"` // Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. OriginalFieldsDue []string `json:"original_fields_due"` }
Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
type PersonFutureRequirementsError ¶
type PersonFutureRequirementsError struct { // The code for the type of error. Code string `json:"code"` // An informative message that indicates the error type and provides additional details about the error. Reason string `json:"reason"` // The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. Requirement string `json:"requirement"` }
Fields that are `currently_due` and need to be collected again because validation or verification failed.
type PersonList ¶
type PersonList struct { APIResource ListMeta Data []*Person `json:"data"` }
PersonList is a list of Persons as retrieved from a list endpoint.
type PersonListParams ¶
type PersonListParams struct { ListParams `form:"*"` Account *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Filters on the list of people returned based on the person's relationship to the account's company. Relationship *PersonListRelationshipParams `form:"relationship"` }
Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
func (*PersonListParams) AddExpand ¶
func (p *PersonListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PersonListRelationshipParams ¶
type PersonListRelationshipParams struct { // A filter on the list of people returned based on whether these people are directors of the account's company. Director *bool `form:"director"` // A filter on the list of people returned based on whether these people are executives of the account's company. Executive *bool `form:"executive"` // A filter on the list of people returned based on whether these people are owners of the account's company. Owner *bool `form:"owner"` // A filter on the list of people returned based on whether these people are the representative of the account's company. Representative *bool `form:"representative"` }
Filters on the list of people returned based on the person's relationship to the account's company.
type PersonParams ¶
type PersonParams struct { Params `form:"*"` Account *string `form:"-"` // Included in URL // The person's address. Address *AddressParams `form:"address"` // The Kana variation of the person's address (Japan only). AddressKana *PersonAddressKanaParams `form:"address_kana"` // The Kanji variation of the person's address (Japan only). AddressKanji *PersonAddressKanjiParams `form:"address_kanji"` // The person's date of birth. DOB *PersonDOBParams `form:"dob"` // Documents that may be submitted to satisfy various informational requests. Documents *PersonDocumentsParams `form:"documents"` // The person's email address. Email *string `form:"email"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The person's first name. FirstName *string `form:"first_name"` // The Kana variation of the person's first name (Japan only). FirstNameKana *string `form:"first_name_kana"` // The Kanji variation of the person's first name (Japan only). FirstNameKanji *string `form:"first_name_kanji"` // A list of alternate names or aliases that the person is known by. FullNameAliases []*string `form:"full_name_aliases"` // The person's gender (International regulations require either "male" or "female"). Gender *string `form:"gender"` // The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). IDNumber *string `form:"id_number"` // The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). IDNumberSecondary *string `form:"id_number_secondary"` // The person's last name. LastName *string `form:"last_name"` // The Kana variation of the person's last name (Japan only). LastNameKana *string `form:"last_name_kana"` // The Kanji variation of the person's last name (Japan only). LastNameKanji *string `form:"last_name_kanji"` // The person's maiden name. MaidenName *string `form:"maiden_name"` // 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`. Metadata map[string]string `form:"metadata"` // The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. Nationality *string `form:"nationality"` // A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. PersonToken *string `form:"person_token"` // The person's phone number. Phone *string `form:"phone"` // Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. PoliticalExposure *string `form:"political_exposure"` // The person's registered address. RegisteredAddress *AddressParams `form:"registered_address"` // The relationship that this person has with the account's legal entity. Relationship *PersonRelationshipParams `form:"relationship"` // The last four digits of the person's Social Security number (U.S. only). SSNLast4 *string `form:"ssn_last_4"` // The person's verification status. Verification *PersonVerificationParams `form:"verification"` }
Creates a new person.
func (*PersonParams) AddExpand ¶
func (p *PersonParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PersonParams) AddMetadata ¶
func (p *PersonParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PersonPoliticalExposure ¶
type PersonPoliticalExposure string
Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
const ( PersonPoliticalExposureExisting PersonPoliticalExposure = "existing" PersonPoliticalExposureNone PersonPoliticalExposure = "none" )
List of values that PersonPoliticalExposure can take
type PersonRelationship ¶
type PersonRelationship struct { // Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. Director bool `json:"director"` // Whether the person has significant responsibility to control, manage, or direct the organization. Executive bool `json:"executive"` // Whether the person is an owner of the account's legal entity. Owner bool `json:"owner"` // The percent owned by the person of the account's legal entity. PercentOwnership float64 `json:"percent_ownership"` // Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. Representative bool `json:"representative"` // The person's title (e.g., CEO, Support Engineer). Title string `json:"title"` }
type PersonRelationshipParams ¶
type PersonRelationshipParams struct { // Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. Director *bool `form:"director"` // Whether the person has significant responsibility to control, manage, or direct the organization. Executive *bool `form:"executive"` // Whether the person is an owner of the account's legal entity. Owner *bool `form:"owner"` // The percent owned by the person of the account's legal entity. PercentOwnership *float64 `form:"percent_ownership"` // Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. Representative *bool `form:"representative"` // The person's title (e.g., CEO, Support Engineer). Title *string `form:"title"` }
The relationship that this person has with the account's legal entity.
type PersonRequirements ¶
type PersonRequirements struct { // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. Alternatives []*PersonRequirementsAlternative `json:"alternatives"` // Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. CurrentlyDue []string `json:"currently_due"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*AccountRequirementsError `json:"errors"` // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. PastDue []string `json:"past_due"` // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. PendingVerification []string `json:"pending_verification"` }
Information about the requirements for this person, including what information needs to be collected, and by when.
type PersonRequirementsAlternative ¶
type PersonRequirementsAlternative struct { // Fields that can be provided to satisfy all fields in `original_fields_due`. AlternativeFieldsDue []string `json:"alternative_fields_due"` // Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. OriginalFieldsDue []string `json:"original_fields_due"` }
Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
type PersonVerification ¶
type PersonVerification struct { // A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. AdditionalDocument *PersonVerificationDocument `json:"additional_document"` // A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". Details string `json:"details"` // One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. DetailsCode PersonVerificationDetailsCode `json:"details_code"` Document *PersonVerificationDocument `json:"document"` // The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. Status PersonVerificationStatus `json:"status"` }
type PersonVerificationDetailsCode ¶
type PersonVerificationDetailsCode string
One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person.
const ( PersonVerificationDetailsCodeFailedKeyedIdentity PersonVerificationDetailsCode = "failed_keyed_identity" PersonVerificationDetailsCodeFailedOther PersonVerificationDetailsCode = "failed_other" PersonVerificationDetailsCodeScanNameMismatch PersonVerificationDetailsCode = "scan_name_mismatch" PersonVerificationDetailsCodeDocumentAddressMismatch PersonVerificationDetailsCode = "document_address_mismatch" PersonVerificationDetailsCodeDocumentDOBMismatch PersonVerificationDetailsCode = "document_dob_mismatch" PersonVerificationDetailsCodeDocumentDuplicateType PersonVerificationDetailsCode = "document_duplicate_type" PersonVerificationDetailsCodeDocumentIDNumberMismatch PersonVerificationDetailsCode = "document_id_number_mismatch" PersonVerificationDetailsCodeDocumentNameMismatch PersonVerificationDetailsCode = "document_name_mismatch" PersonVerificationDetailsCodeDocumentNationalityMismatch PersonVerificationDetailsCode = "document_nationality_mismatch" )
List of values that PersonVerificationDetailsCode can take
type PersonVerificationDocument ¶
type PersonVerificationDocument struct { // The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. Back *File `json:"back"` // A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". Details string `json:"details"` // One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. DetailsCode PersonVerificationDocumentDetailsCode `json:"details_code"` // The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. Front *File `json:"front"` }
A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
type PersonVerificationDocumentDetailsCode ¶
type PersonVerificationDocumentDetailsCode string
One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document.
const ( PersonVerificationDocumentDetailsCodeDocumentCorrupt PersonVerificationDocumentDetailsCode = "document_corrupt" PersonVerificationDocumentDetailsCodeDocumentCountryNotSupported PersonVerificationDocumentDetailsCode = "document_country_not_supported" PersonVerificationDocumentDetailsCodeDocumentExpired PersonVerificationDocumentDetailsCode = "document_expired" PersonVerificationDocumentDetailsCodeDocumentFailedCopy PersonVerificationDocumentDetailsCode = "document_failed_copy" PersonVerificationDocumentDetailsCodeDocumentFailedOther PersonVerificationDocumentDetailsCode = "document_failed_other" PersonVerificationDocumentDetailsCodeDocumentFailedTestMode PersonVerificationDocumentDetailsCode = "document_failed_test_mode" PersonVerificationDocumentDetailsCodeDocumentFraudulent PersonVerificationDocumentDetailsCode = "document_fraudulent" PersonVerificationDocumentDetailsCodeDocumentIDTypeNotSupported PersonVerificationDocumentDetailsCode = "document_id_type_not_supported" PersonVerificationDocumentDetailsCodeDocumentIDCountryNotSupported PersonVerificationDocumentDetailsCode = "document_id_country_not_supported" PersonVerificationDocumentDetailsCodeDocumentFailedGreyscale PersonVerificationDocumentDetailsCode = "document_failed_greyscale" PersonVerificationDocumentDetailsCodeDocumentIncomplete PersonVerificationDocumentDetailsCode = "document_incomplete" PersonVerificationDocumentDetailsCodeDocumentInvalid PersonVerificationDocumentDetailsCode = "document_invalid" PersonVerificationDocumentDetailsCodeDocumentManipulated PersonVerificationDocumentDetailsCode = "document_manipulated" PersonVerificationDocumentDetailsCodeDocumentMissingBack PersonVerificationDocumentDetailsCode = "document_missing_back" PersonVerificationDocumentDetailsCodeDocumentMissingFront PersonVerificationDocumentDetailsCode = "document_missing_front" PersonVerificationDocumentDetailsCodeDocumentNotReadable PersonVerificationDocumentDetailsCode = "document_not_readable" PersonVerificationDocumentDetailsCodeDocumentNotUploaded PersonVerificationDocumentDetailsCode = "document_not_uploaded" PersonVerificationDocumentDetailsCodeDocumentPhotoMismatch PersonVerificationDocumentDetailsCode = "document_photo_mismatch" PersonVerificationDocumentDetailsCodeDocumentTooLarge PersonVerificationDocumentDetailsCode = "document_too_large" PersonVerificationDocumentDetailsCodeDocumentTypeNotSupported PersonVerificationDocumentDetailsCode = "document_type_not_supported" )
List of values that PersonVerificationDocumentDetailsCode can take
type PersonVerificationDocumentParams ¶
type PersonVerificationDocumentParams struct { // The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. Back *string `form:"back"` // The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. Front *string `form:"front"` }
A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
type PersonVerificationParams ¶
type PersonVerificationParams struct { // A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. AdditionalDocument *PersonVerificationDocumentParams `form:"additional_document"` // An identifying document, either a passport or local ID card. Document *PersonVerificationDocumentParams `form:"document"` }
The person's verification status.
type PersonVerificationStatus ¶
type PersonVerificationStatus string
The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.
const ( PersonVerificationStatusPending PersonVerificationStatus = "pending" PersonVerificationStatusUnverified PersonVerificationStatus = "unverified" PersonVerificationStatusVerified PersonVerificationStatus = "verified" )
List of values that PersonVerificationStatus can take
type Plan ¶
type Plan struct { APIResource // Whether the plan can be used for new purchases. Active bool `json:"active"` // Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. AggregateUsage PlanAggregateUsage `json:"aggregate_usage"` // The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. Amount int64 `json:"amount"` // The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. AmountDecimal float64 `json:"amount_decimal,string"` // Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. BillingScheme PlanBillingScheme `json:"billing_scheme"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` Deleted bool `json:"deleted"` // Unique identifier for the object. ID string `json:"id"` // The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. Interval PlanInterval `json:"interval"` // The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. IntervalCount int64 `json:"interval_count"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // A brief description of the plan, hidden from customers. Nickname string `json:"nickname"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The product whose pricing this plan determines. Product *Product `json:"product"` // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. Tiers []*PlanTier `json:"tiers"` // 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. TiersMode PlanTiersMode `json:"tiers_mode"` // Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. TransformUsage *PlanTransformUsage `json:"transform_usage"` // Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). TrialPeriodDays int64 `json:"trial_period_days"` // Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. UsageType PlanUsageType `json:"usage_type"` }
You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
Plans define the base price, currency, and billing cycle for recurring purchases of products. [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
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/products-prices/overview).
Example (List) ¶
package main import ( "log" stripe "github.com/stripe/stripe-go/v75" "github.com/stripe/stripe-go/v75/plan" ) func main() { stripe.Key = "sk_key" params := &stripe.PlanListParams{} params.Filters.AddFilter("limit", "", "3") params.Single = true it := plan.List(params) for it.Next() { log.Printf("%v ", it.Plan().Nickname) } if err := it.Err(); err != nil { log.Fatal(err) } }
Output:
func (*Plan) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Plan. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type PlanAggregateUsage ¶
type PlanAggregateUsage string
Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.
const ( PlanAggregateUsageLastDuringPeriod PlanAggregateUsage = "last_during_period" PlanAggregateUsageLastEver PlanAggregateUsage = "last_ever" PlanAggregateUsageMax PlanAggregateUsage = "max" PlanAggregateUsageSum PlanAggregateUsage = "sum" )
List of values that PlanAggregateUsage can take
type PlanBillingScheme ¶
type PlanBillingScheme string
Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
const ( PlanBillingSchemePerUnit PlanBillingScheme = "per_unit" PlanBillingSchemeTiered PlanBillingScheme = "tiered" )
List of values that PlanBillingScheme can take
type PlanInterval ¶
type PlanInterval string
The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
const ( PlanIntervalDay PlanInterval = "day" PlanIntervalMonth PlanInterval = "month" PlanIntervalWeek PlanInterval = "week" PlanIntervalYear PlanInterval = "year" )
List of values that PlanInterval can take
type PlanList ¶
type PlanList struct { APIResource ListMeta Data []*Plan `json:"data"` }
PlanList is a list of Plans as retrieved from a list endpoint.
type PlanListParams ¶
type PlanListParams struct { ListParams `form:"*"` // Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). Active *bool `form:"active"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. Created *int64 `form:"created"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return plans for the given product. Product *string `form:"product"` }
Returns a list of your plans.
func (*PlanListParams) AddExpand ¶
func (p *PlanListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PlanParams ¶
type PlanParams struct { Params `form:"*"` // Whether the plan is currently available for new subscriptions. Defaults to `true`. Active *bool `form:"active"` // Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. AggregateUsage *string `form:"aggregate_usage"` // A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. Amount *int64 `form:"amount"` // Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. AmountDecimal *float64 `form:"amount_decimal,high_precision"` // Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. BillingScheme *string `form:"billing_scheme"` // 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 `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. ID *string `form:"id"` // Specifies billing frequency. Either `day`, `week`, `month` or `year`. Interval *string `form:"interval"` // The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). IntervalCount *int64 `form:"interval_count"` // 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`. Metadata map[string]string `form:"metadata"` // A brief description of the plan, hidden from customers. Nickname *string `form:"nickname"` // The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. Product *PlanProductParams `form:"product"` // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. Tiers []*PlanTierParams `form:"tiers"` // 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 successively change as the quantity grows. TiersMode *string `form:"tiers_mode"` // Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. TransformUsage *PlanTransformUsageParams `form:"transform_usage"` // Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). TrialPeriodDays *int64 `form:"trial_period_days"` // Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. UsageType *string `form:"usage_type"` }
You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
func (*PlanParams) AddExpand ¶
func (p *PlanParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PlanParams) AddMetadata ¶
func (p *PlanParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PlanProductParams ¶
type PlanProductParams struct { // Whether the product is currently available for purchase. Defaults to `true`. Active *bool `form:"active"` // The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. ID *string `form:"id"` // 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`. Metadata map[string]string `form:"metadata"` // The product's name, meant to be displayable to the customer. Name *string `form:"name"` // An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. // // This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. StatementDescriptor *string `form:"statement_descriptor"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. TaxCode *string `form:"tax_code"` // A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. UnitLabel *string `form:"unit_label"` }
The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.
func (*PlanProductParams) AddMetadata ¶
func (p *PlanProductParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PlanTier ¶
type PlanTier struct { // Price for the entire tier. FlatAmount int64 `json:"flat_amount"` // Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. FlatAmountDecimal float64 `json:"flat_amount_decimal,string"` // Per unit price for units relevant to the tier. UnitAmount int64 `json:"unit_amount"` // Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` // Up to and including to this quantity will be contained in the tier. UpTo int64 `json:"up_to"` }
Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
type PlanTierParams ¶
type PlanTierParams struct { Params `form:"*"` // The flat billing amount for an entire tier, regardless of the number of units in the tier. FlatAmount *int64 `form:"flat_amount"` // Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"` // The per unit billing amount for each individual unit for which this tier applies. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` // Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. UpTo *int64 `form:"-"` // See custom AppendTo UpToInf *bool `form:"-"` // See custom AppendTo }
Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
type PlanTiersMode ¶
type PlanTiersMode string
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.
const ( PlanTiersModeGraduated PlanTiersMode = "graduated" PlanTiersModeVolume PlanTiersMode = "volume" )
List of values that PlanTiersMode can take
type PlanTransformUsage ¶
type PlanTransformUsage struct { // Divide usage by this number. DivideBy int64 `json:"divide_by"` // After division, either round the result `up` or `down`. Round PlanTransformUsageRound `json:"round"` }
Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
type PlanTransformUsageParams ¶
type PlanTransformUsageParams struct { // Divide usage by this number. DivideBy *int64 `form:"divide_by"` // After division, either round the result `up` or `down`. Round *string `form:"round"` }
Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
type PlanTransformUsageRound ¶
type PlanTransformUsageRound string
After division, either round the result `up` or `down`.
const ( PlanTransformUsageRoundDown PlanTransformUsageRound = "down" PlanTransformUsageRoundUp PlanTransformUsageRound = "up" )
List of values that PlanTransformUsageRound can take
type PlanUsageType ¶
type PlanUsageType string
Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
const ( PlanUsageTypeLicensed PlanUsageType = "licensed" PlanUsageTypeMetered PlanUsageType = "metered" )
List of values that PlanUsageType can take
type PlatformTaxFee ¶
type PlatformTaxFee struct { // The Connected account that incurred this charge. Account string `json:"account"` // Unique identifier for the object. ID string `json:"id"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The payment object that caused this tax to be inflicted. SourceTransaction string `json:"source_transaction"` // The type of tax (VAT). Type string `json:"type"` }
func (*PlatformTaxFee) UnmarshalJSON ¶
func (p *PlatformTaxFee) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a PlatformTaxFee. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type Price ¶
type Price struct { APIResource // Whether the price can be used for new purchases. Active bool `json:"active"` // Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. BillingScheme PriceBillingScheme `json:"billing_scheme"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*PriceCurrencyOptions `json:"currency_options"` // When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. CustomUnitAmount *PriceCustomUnitAmount `json:"custom_unit_amount"` Deleted bool `json:"deleted"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. LookupKey string `json:"lookup_key"` // 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. Metadata map[string]string `json:"metadata"` // A brief description of the price, hidden from customers. Nickname string `json:"nickname"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The ID of the product this price is associated with. Product *Product `json:"product"` // The recurring components of a price such as `interval` and `usage_type`. Recurring *PriceRecurring `json:"recurring"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior PriceTaxBehavior `json:"tax_behavior"` // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. Tiers []*PriceTier `json:"tiers"` // 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. TiersMode PriceTiersMode `json:"tiers_mode"` // Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. TransformQuantity *PriceTransformQuantity `json:"transform_quantity"` // One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. Type PriceType `json:"type"` // The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. UnitAmount int64 `json:"unit_amount"` // The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` }
Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).
func (*Price) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Price. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type PriceBillingScheme ¶
type PriceBillingScheme string
Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
const ( PriceBillingSchemePerUnit PriceBillingScheme = "per_unit" PriceBillingSchemeTiered PriceBillingScheme = "tiered" )
List of values that PriceBillingScheme can take
type PriceCurrencyOptions ¶
type PriceCurrencyOptions struct { // When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. CustomUnitAmount *PriceCurrencyOptionsCustomUnitAmount `json:"custom_unit_amount"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior PriceCurrencyOptionsTaxBehavior `json:"tax_behavior"` // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. Tiers []*PriceCurrencyOptionsTier `json:"tiers"` // The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. UnitAmount int64 `json:"unit_amount"` // The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` }
Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type PriceCurrencyOptionsCustomUnitAmount ¶
type PriceCurrencyOptionsCustomUnitAmount struct { // The maximum unit amount the customer can specify for this item. Maximum int64 `json:"maximum"` // The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. Minimum int64 `json:"minimum"` // The starting unit amount which can be updated by the customer. Preset int64 `json:"preset"` }
When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
type PriceCurrencyOptionsCustomUnitAmountParams ¶
type PriceCurrencyOptionsCustomUnitAmountParams struct { // Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. Enabled *bool `form:"enabled"` // The maximum unit amount the customer can specify for this item. Maximum *int64 `form:"maximum"` // The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. Minimum *int64 `form:"minimum"` // The starting unit amount which can be updated by the customer. Preset *int64 `form:"preset"` }
When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
type PriceCurrencyOptionsParams ¶
type PriceCurrencyOptionsParams struct { // When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. CustomUnitAmount *PriceCurrencyOptionsCustomUnitAmountParams `form:"custom_unit_amount"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. Tiers []*PriceCurrencyOptionsTierParams `form:"tiers"` // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type PriceCurrencyOptionsTaxBehavior ¶
type PriceCurrencyOptionsTaxBehavior string
Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
const ( PriceCurrencyOptionsTaxBehaviorExclusive PriceCurrencyOptionsTaxBehavior = "exclusive" PriceCurrencyOptionsTaxBehaviorInclusive PriceCurrencyOptionsTaxBehavior = "inclusive" PriceCurrencyOptionsTaxBehaviorUnspecified PriceCurrencyOptionsTaxBehavior = "unspecified" )
List of values that PriceCurrencyOptionsTaxBehavior can take
type PriceCurrencyOptionsTier ¶
type PriceCurrencyOptionsTier struct { // Price for the entire tier. FlatAmount int64 `json:"flat_amount"` // Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. FlatAmountDecimal float64 `json:"flat_amount_decimal,string"` // Per unit price for units relevant to the tier. UnitAmount int64 `json:"unit_amount"` // Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` // Up to and including to this quantity will be contained in the tier. UpTo int64 `json:"up_to"` }
Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
type PriceCurrencyOptionsTierParams ¶
type PriceCurrencyOptionsTierParams struct { // The flat billing amount for an entire tier, regardless of the number of units in the tier. FlatAmount *int64 `form:"flat_amount"` // Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"` // The per unit billing amount for each individual unit for which this tier applies. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` // Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. UpTo *int64 `form:"up_to"` UpToInf *bool `form:"-"` // See custom AppendTo }
Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
type PriceCustomUnitAmount ¶
type PriceCustomUnitAmount struct { // The maximum unit amount the customer can specify for this item. Maximum int64 `json:"maximum"` // The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. Minimum int64 `json:"minimum"` // The starting unit amount which can be updated by the customer. Preset int64 `json:"preset"` }
When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
type PriceCustomUnitAmountParams ¶
type PriceCustomUnitAmountParams struct { // Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. Enabled *bool `form:"enabled"` // The maximum unit amount the customer can specify for this item. Maximum *int64 `form:"maximum"` // The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. Minimum *int64 `form:"minimum"` // The starting unit amount which can be updated by the customer. Preset *int64 `form:"preset"` }
When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
type PriceList ¶
type PriceList struct { APIResource ListMeta Data []*Price `json:"data"` }
PriceList is a list of Prices as retrieved from a list endpoint.
type PriceListParams ¶
type PriceListParams struct { ListParams `form:"*"` // Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). Active *bool `form:"active"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. Created *int64 `form:"created"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. CreatedRange *RangeQueryParams `form:"created"` // Only return prices for the given currency. Currency *string `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return the price with these lookup_keys, if any exist. LookupKeys []*string `form:"lookup_keys"` // Only return prices for the given product. Product *string `form:"product"` // Only return prices with these recurring fields. Recurring *PriceListRecurringParams `form:"recurring"` // Only return prices of type `recurring` or `one_time`. Type *string `form:"type"` }
Returns a list of your prices.
func (*PriceListParams) AddExpand ¶
func (p *PriceListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PriceListRecurringParams ¶
type PriceListRecurringParams struct { // Filter by billing frequency. Either `day`, `week`, `month` or `year`. Interval *string `form:"interval"` // Filter by the usage type for this price. Can be either `metered` or `licensed`. UsageType *string `form:"usage_type"` }
Only return prices with these recurring fields.
type PriceParams ¶
type PriceParams struct { Params `form:"*"` // Whether the price can be used for new purchases. Defaults to `true`. Active *bool `form:"active"` // Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. BillingScheme *string `form:"billing_scheme"` // 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 `form:"currency"` // Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*PriceCurrencyOptionsParams `form:"currency_options"` // When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. CustomUnitAmount *PriceCustomUnitAmountParams `form:"custom_unit_amount"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. LookupKey *string `form:"lookup_key"` // 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`. Metadata map[string]string `form:"metadata"` // A brief description of the price, hidden from customers. Nickname *string `form:"nickname"` // The ID of the product that this price will belong to. Product *string `form:"product"` // These fields can be used to create a new product that this price will belong to. ProductData *PriceProductDataParams `form:"product_data"` // The recurring components of a price such as `interval` and `usage_type`. Recurring *PriceRecurringParams `form:"recurring"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. Tiers []*PriceTierParams `form:"tiers"` // 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 successively change as the quantity grows. TiersMode *string `form:"tiers_mode"` // If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. TransferLookupKey *bool `form:"transfer_lookup_key"` // Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. TransformQuantity *PriceTransformQuantityParams `form:"transform_quantity"` // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Creates a new price for an existing product. The price can be recurring or one-time.
func (*PriceParams) AddExpand ¶
func (p *PriceParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PriceParams) AddMetadata ¶
func (p *PriceParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PriceProductDataParams ¶
type PriceProductDataParams struct { // Whether the product is currently available for purchase. Defaults to `true`. Active *bool `form:"active"` // The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. ID *string `form:"id"` // 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`. Metadata map[string]string `form:"metadata"` // The product's name, meant to be displayable to the customer. Name *string `form:"name"` // An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. // // This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. StatementDescriptor *string `form:"statement_descriptor"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. TaxCode *string `form:"tax_code"` // A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. UnitLabel *string `form:"unit_label"` }
These fields can be used to create a new product that this price will belong to.
func (*PriceProductDataParams) AddMetadata ¶
func (p *PriceProductDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PriceRecurring ¶
type PriceRecurring struct { // Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. AggregateUsage PriceRecurringAggregateUsage `json:"aggregate_usage"` // The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. Interval PriceRecurringInterval `json:"interval"` // The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. IntervalCount int64 `json:"interval_count"` // Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). TrialPeriodDays int64 `json:"trial_period_days"` // Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. UsageType PriceRecurringUsageType `json:"usage_type"` }
The recurring components of a price such as `interval` and `usage_type`.
type PriceRecurringAggregateUsage ¶
type PriceRecurringAggregateUsage string
Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.
const ( PriceRecurringAggregateUsageLastDuringPeriod PriceRecurringAggregateUsage = "last_during_period" PriceRecurringAggregateUsageLastEver PriceRecurringAggregateUsage = "last_ever" PriceRecurringAggregateUsageMax PriceRecurringAggregateUsage = "max" PriceRecurringAggregateUsageSum PriceRecurringAggregateUsage = "sum" )
List of values that PriceRecurringAggregateUsage can take
type PriceRecurringInterval ¶
type PriceRecurringInterval string
The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
const ( PriceRecurringIntervalDay PriceRecurringInterval = "day" PriceRecurringIntervalMonth PriceRecurringInterval = "month" PriceRecurringIntervalWeek PriceRecurringInterval = "week" PriceRecurringIntervalYear PriceRecurringInterval = "year" )
List of values that PriceRecurringInterval can take
type PriceRecurringParams ¶
type PriceRecurringParams struct { // Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. AggregateUsage *string `form:"aggregate_usage"` // Specifies billing frequency. Either `day`, `week`, `month` or `year`. Interval *string `form:"interval"` // The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). IntervalCount *int64 `form:"interval_count"` // Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). TrialPeriodDays *int64 `form:"trial_period_days"` // Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. UsageType *string `form:"usage_type"` }
The recurring components of a price such as `interval` and `usage_type`.
type PriceRecurringUsageType ¶
type PriceRecurringUsageType string
Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
const ( PriceRecurringUsageTypeLicensed PriceRecurringUsageType = "licensed" PriceRecurringUsageTypeMetered PriceRecurringUsageType = "metered" )
List of values that PriceRecurringUsageType can take
type PriceSearchParams ¶
type PriceSearchParams struct { SearchParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. Page *string `form:"page"` }
Search for prices you've previously created using Stripe's [Search Query Language](https://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.
func (*PriceSearchParams) AddExpand ¶
func (p *PriceSearchParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PriceSearchResult ¶
type PriceSearchResult struct { APIResource SearchMeta Data []*Price `json:"data"` }
PriceSearchResult is a list of Price search results as retrieved from a search endpoint.
type PriceTaxBehavior ¶
type PriceTaxBehavior string
Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
const ( PriceTaxBehaviorExclusive PriceTaxBehavior = "exclusive" PriceTaxBehaviorInclusive PriceTaxBehavior = "inclusive" PriceTaxBehaviorUnspecified PriceTaxBehavior = "unspecified" )
List of values that PriceTaxBehavior can take
type PriceTier ¶
type PriceTier struct { // Price for the entire tier. FlatAmount int64 `json:"flat_amount"` // Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. FlatAmountDecimal float64 `json:"flat_amount_decimal,string"` // Per unit price for units relevant to the tier. UnitAmount int64 `json:"unit_amount"` // Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` // Up to and including to this quantity will be contained in the tier. UpTo int64 `json:"up_to"` }
Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
type PriceTierParams ¶
type PriceTierParams struct { // The flat billing amount for an entire tier, regardless of the number of units in the tier. FlatAmount *int64 `form:"flat_amount"` // Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"` // The per unit billing amount for each individual unit for which this tier applies. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` // Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. UpTo *int64 `form:"up_to"` UpToInf *bool `form:"-"` // See custom AppendTo }
Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
type PriceTiersMode ¶
type PriceTiersMode string
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.
const ( PriceTiersModeGraduated PriceTiersMode = "graduated" PriceTiersModeVolume PriceTiersMode = "volume" )
List of values that PriceTiersMode can take
type PriceTransformQuantity ¶
type PriceTransformQuantity struct { // Divide usage by this number. DivideBy int64 `json:"divide_by"` // After division, either round the result `up` or `down`. Round PriceTransformQuantityRound `json:"round"` }
Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
type PriceTransformQuantityParams ¶
type PriceTransformQuantityParams struct { // Divide usage by this number. DivideBy *int64 `form:"divide_by"` // After division, either round the result `up` or `down`. Round *string `form:"round"` }
Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
type PriceTransformQuantityRound ¶
type PriceTransformQuantityRound string
After division, either round the result `up` or `down`.
const ( PriceTransformQuantityRoundDown PriceTransformQuantityRound = "down" PriceTransformQuantityRoundUp PriceTransformQuantityRound = "up" )
List of values that PriceTransformQuantityRound can take
type PriceType ¶
type PriceType string
One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
type Product ¶
type Product struct { APIResource // Whether the product is currently available for purchase. Active bool `json:"active"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. DefaultPrice *Price `json:"default_price"` Deleted bool `json:"deleted"` // The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. Description string `json:"description"` // A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). Features []*ProductFeature `json:"features"` // Unique identifier for the object. ID string `json:"id"` // A list of up to 8 URLs of images for this product, meant to be displayable to the customer. Images []string `json:"images"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // The product's name, meant to be displayable to the customer. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The dimensions of this product for shipping purposes. PackageDimensions *ProductPackageDimensions `json:"package_dimensions"` // Whether this product is shipped (i.e., physical goods). Shippable bool `json:"shippable"` // Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. StatementDescriptor string `json:"statement_descriptor"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. TaxCode *TaxCode `json:"tax_code"` // The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. Type ProductType `json:"type"` // A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. UnitLabel string `json:"unit_label"` // Time at which the object was last updated. Measured in seconds since the Unix epoch. Updated int64 `json:"updated"` // A URL of a publicly-accessible webpage for this product. URL string `json:"url"` }
Products describe the specific goods or services you offer to your customers. For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.
Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [share a Payment Link](https://stripe.com/docs/payment-links), [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), and more about [Products and Prices](https://stripe.com/docs/products-prices/overview)
func (*Product) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Product. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountParams ¶
type ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountParams struct { // Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. Enabled *bool `form:"enabled"` // The maximum unit amount the customer can specify for this item. Maximum *int64 `form:"maximum"` // The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. Minimum *int64 `form:"minimum"` // The starting unit amount which can be updated by the customer. Preset *int64 `form:"preset"` }
When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
type ProductDefaultPriceDataCurrencyOptionsParams ¶
type ProductDefaultPriceDataCurrencyOptionsParams struct { // When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. CustomUnitAmount *ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountParams `form:"custom_unit_amount"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. Tiers []*ProductDefaultPriceDataCurrencyOptionsTierParams `form:"tiers"` // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type ProductDefaultPriceDataCurrencyOptionsTierParams ¶
type ProductDefaultPriceDataCurrencyOptionsTierParams struct { // The flat billing amount for an entire tier, regardless of the number of units in the tier. FlatAmount *int64 `form:"flat_amount"` // Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"` // The per unit billing amount for each individual unit for which this tier applies. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` // Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. UpTo *int64 `form:"up_to"` UpToInf *bool `form:"-"` // See custom AppendTo }
Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
type ProductDefaultPriceDataParams ¶
type ProductDefaultPriceDataParams struct { // 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 `form:"currency"` // Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*ProductDefaultPriceDataCurrencyOptionsParams `form:"currency_options"` // The recurring components of a price such as `interval` and `interval_count`. Recurring *ProductDefaultPriceDataRecurringParams `form:"recurring"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Data used to generate a new Price(https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
type ProductDefaultPriceDataRecurringParams ¶
type ProductDefaultPriceDataRecurringParams struct { // Specifies billing frequency. Either `day`, `week`, `month` or `year`. Interval *string `form:"interval"` // The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). IntervalCount *int64 `form:"interval_count"` }
The recurring components of a price such as `interval` and `interval_count`.
type ProductFeature ¶ added in v75.4.0
type ProductFeature struct { // The feature's name. Up to 80 characters long. Name string `json:"name"` }
A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
type ProductFeatureParams ¶ added in v75.4.0
type ProductFeatureParams struct { // The feature's name. Up to 80 characters long. Name *string `form:"name"` }
A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
type ProductList ¶
type ProductList struct { APIResource ListMeta Data []*Product `json:"data"` }
ProductList is a list of Products as retrieved from a list endpoint.
type ProductListParams ¶
type ProductListParams struct { ListParams `form:"*"` // Only return products that are active or inactive (e.g., pass `false` to list all inactive products). Active *bool `form:"active"` // Only return products that were created during the given date interval. Created *int64 `form:"created"` // Only return products that were created during the given date interval. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). IDs []*string `form:"ids"` // Only return products that can be shipped (i.e., physical, not digital products). Shippable *bool `form:"shippable"` // Only return products of this type. Type *string `form:"type"` // Only return products with the given url. URL *string `form:"url"` }
Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
func (*ProductListParams) AddExpand ¶
func (p *ProductListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ProductPackageDimensions ¶
type ProductPackageDimensions struct { // Height, in inches. Height float64 `json:"height"` // Length, in inches. Length float64 `json:"length"` // Weight, in ounces. Weight float64 `json:"weight"` // Width, in inches. Width float64 `json:"width"` }
The dimensions of this product for shipping purposes.
type ProductPackageDimensionsParams ¶
type ProductPackageDimensionsParams struct { // Height, in inches. Maximum precision is 2 decimal places. Height *float64 `form:"height"` // Length, in inches. Maximum precision is 2 decimal places. Length *float64 `form:"length"` // Weight, in ounces. Maximum precision is 2 decimal places. Weight *float64 `form:"weight"` // Width, in inches. Maximum precision is 2 decimal places. Width *float64 `form:"width"` }
The dimensions of this product for shipping purposes.
type ProductParams ¶
type ProductParams struct { Params `form:"*"` // Whether the product is currently available for purchase. Defaults to `true`. Active *bool `form:"active"` // The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. DefaultPrice *string `form:"default_price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. DefaultPriceData *ProductDefaultPriceDataParams `form:"default_price_data"` // The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). Features []*ProductFeatureParams `form:"features"` // An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. ID *string `form:"id"` // A list of up to 8 URLs of images for this product, meant to be displayable to the customer. Images []*string `form:"images"` // 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`. Metadata map[string]string `form:"metadata"` // The product's name, meant to be displayable to the customer. Name *string `form:"name"` // The dimensions of this product for shipping purposes. PackageDimensions *ProductPackageDimensionsParams `form:"package_dimensions"` // Whether this product is shipped (i.e., physical goods). Shippable *bool `form:"shippable"` // An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. // // This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. // It must contain at least one letter. May only be set if `type=service`. StatementDescriptor *string `form:"statement_descriptor"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. TaxCode *string `form:"tax_code"` // The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. Type *string `form:"type"` // A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. UnitLabel *string `form:"unit_label"` // A URL of a publicly-accessible webpage for this product. URL *string `form:"url"` }
Creates a new product object.
func (*ProductParams) AddExpand ¶
func (p *ProductParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*ProductParams) AddMetadata ¶
func (p *ProductParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type ProductSearchParams ¶
type ProductSearchParams struct { SearchParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. Page *string `form:"page"` }
Search for products you've previously created using Stripe's [Search Query Language](https://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.
func (*ProductSearchParams) AddExpand ¶
func (p *ProductSearchParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ProductSearchResult ¶
type ProductSearchResult struct { APIResource SearchMeta Data []*Product `json:"data"` }
ProductSearchResult is a list of Product search results as retrieved from a search endpoint.
type ProductType ¶
type ProductType string
The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans.
const ( ProductTypeGood ProductType = "good" ProductTypeService ProductType = "service" )
List of values that ProductType can take
type PromotionCode ¶
type PromotionCode struct { APIResource // Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. Active bool `json:"active"` // The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Code string `json:"code"` // A coupon contains information about a percent-off or amount-off discount you // might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), // [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). Coupon *Coupon `json:"coupon"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The customer that this promotion code can be used by. Customer *Customer `json:"customer"` // Date at which the promotion code can no longer be redeemed. ExpiresAt int64 `json:"expires_at"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // Maximum number of times this promotion code can be redeemed. MaxRedemptions int64 `json:"max_redemptions"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` Restrictions *PromotionCodeRestrictions `json:"restrictions"` // Number of times this promotion code has been used. TimesRedeemed int64 `json:"times_redeemed"` }
A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to create multiple codes for a single coupon.
func (*PromotionCode) UnmarshalJSON ¶
func (p *PromotionCode) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a PromotionCode. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type PromotionCodeList ¶
type PromotionCodeList struct { APIResource ListMeta Data []*PromotionCode `json:"data"` }
PromotionCodeList is a list of PromotionCodes as retrieved from a list endpoint.
type PromotionCodeListParams ¶
type PromotionCodeListParams struct { ListParams `form:"*"` // Filter promotion codes by whether they are active. Active *bool `form:"active"` // Only return promotion codes that have this case-insensitive code. Code *string `form:"code"` // Only return promotion codes for this coupon. Coupon *string `form:"coupon"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. Created *int64 `form:"created"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. CreatedRange *RangeQueryParams `form:"created"` // Only return promotion codes that are restricted to this customer. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of your promotion codes.
func (*PromotionCodeListParams) AddExpand ¶
func (p *PromotionCodeListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type PromotionCodeParams ¶
type PromotionCodeParams struct { Params `form:"*"` // Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. Active *bool `form:"active"` // The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. Code *string `form:"code"` // The coupon for this promotion code. Coupon *string `form:"coupon"` // The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. ExpiresAt *int64 `form:"expires_at"` // A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. MaxRedemptions *int64 `form:"max_redemptions"` // 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`. Metadata map[string]string `form:"metadata"` // Settings that restrict the redemption of the promotion code. Restrictions *PromotionCodeRestrictionsParams `form:"restrictions"` }
Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired code.
func (*PromotionCodeParams) AddExpand ¶
func (p *PromotionCodeParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*PromotionCodeParams) AddMetadata ¶
func (p *PromotionCodeParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type PromotionCodeRestrictions ¶
type PromotionCodeRestrictions struct { // Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*PromotionCodeRestrictionsCurrencyOptions `json:"currency_options"` // A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices FirstTimeTransaction bool `json:"first_time_transaction"` // Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). MinimumAmount int64 `json:"minimum_amount"` // Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount MinimumAmountCurrency Currency `json:"minimum_amount_currency"` }
type PromotionCodeRestrictionsCurrencyOptions ¶
type PromotionCodeRestrictionsCurrencyOptions struct { // Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). MinimumAmount int64 `json:"minimum_amount"` }
Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type PromotionCodeRestrictionsCurrencyOptionsParams ¶
type PromotionCodeRestrictionsCurrencyOptionsParams struct { // Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). MinimumAmount *int64 `form:"minimum_amount"` }
Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type PromotionCodeRestrictionsParams ¶
type PromotionCodeRestrictionsParams struct { // Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*PromotionCodeRestrictionsCurrencyOptionsParams `form:"currency_options"` // A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices FirstTimeTransaction *bool `form:"first_time_transaction"` // Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). MinimumAmount *int64 `form:"minimum_amount"` // Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount MinimumAmountCurrency *string `form:"minimum_amount_currency"` }
Settings that restrict the redemption of the promotion code.
type Query ¶
type Query func(*Params, *form.Values) ([]interface{}, ListContainer, error)
Query is the function used to get a page listing.
type Quote ¶
type Quote struct { APIResource // Total before any discounts or taxes are applied. AmountSubtotal int64 `json:"amount_subtotal"` // Total after discounts and taxes are applied. AmountTotal int64 `json:"amount_total"` // ID of the Connect Application that created the quote. Application *Application `json:"application"` // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. ApplicationFeeAmount int64 `json:"application_fee_amount"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. ApplicationFeePercent float64 `json:"application_fee_percent"` AutomaticTax *QuoteAutomaticTax `json:"automatic_tax"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. CollectionMethod QuoteCollectionMethod `json:"collection_method"` Computed *QuoteComputed `json:"computed"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. Customer *Customer `json:"customer"` // The tax rates applied to this quote. DefaultTaxRates []*TaxRate `json:"default_tax_rates"` // A description that will be displayed on the quote PDF. Description string `json:"description"` // The discounts applied to this quote. Discounts []*Discount `json:"discounts"` // The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. ExpiresAt int64 `json:"expires_at"` Footer string `json:"footer"` // Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. FromQuote *QuoteFromQuote `json:"from_quote"` // A header that will be displayed on the quote PDF. Header string `json:"header"` // Unique identifier for the object. ID string `json:"id"` // The invoice that was created from this quote. Invoice *Invoice `json:"invoice"` // All invoices will be billed using the specified settings. InvoiceSettings *QuoteInvoiceSettings `json:"invoice_settings"` // A list of items the customer is being quoted for. LineItems *LineItemList `json:"line_items"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). Number string `json:"number"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. OnBehalfOf *Account `json:"on_behalf_of"` // The status of the quote. Status QuoteStatus `json:"status"` StatusTransitions *QuoteStatusTransitions `json:"status_transitions"` // The subscription that was created or updated from this quote. Subscription *Subscription `json:"subscription"` SubscriptionData *QuoteSubscriptionData `json:"subscription_data"` // The subscription schedule that was created or updated from this quote. SubscriptionSchedule *SubscriptionSchedule `json:"subscription_schedule"` // ID of the test clock this quote belongs to. TestClock *TestHelpersTestClock `json:"test_clock"` TotalDetails *QuoteTotalDetails `json:"total_details"` // The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. TransferData *QuoteTransferData `json:"transfer_data"` }
A Quote is a way to model prices that you'd like to provide to a customer. Once accepted, it will automatically create an invoice, subscription or subscription schedule.
func (*Quote) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Quote. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type QuoteAcceptParams ¶
type QuoteAcceptParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Accepts the specified quote.
func (*QuoteAcceptParams) AddExpand ¶
func (p *QuoteAcceptParams) AddExpand(f string)
AddExpand appends a new field to expand.
type QuoteAutomaticTax ¶
type QuoteAutomaticTax struct { // Automatically calculate taxes Enabled bool `json:"enabled"` // The status of the most recent automated tax calculation for this quote. Status QuoteAutomaticTaxStatus `json:"status"` }
type QuoteAutomaticTaxParams ¶
type QuoteAutomaticTaxParams struct { // Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. Enabled *bool `form:"enabled"` }
Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
type QuoteAutomaticTaxStatus ¶
type QuoteAutomaticTaxStatus string
The status of the most recent automated tax calculation for this quote.
const ( QuoteAutomaticTaxStatusComplete QuoteAutomaticTaxStatus = "complete" QuoteAutomaticTaxStatusFailed QuoteAutomaticTaxStatus = "failed" QuoteAutomaticTaxStatusRequiresLocationInputs QuoteAutomaticTaxStatus = "requires_location_inputs" )
List of values that QuoteAutomaticTaxStatus can take
type QuoteCancelParams ¶
type QuoteCancelParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Cancels the quote.
func (*QuoteCancelParams) AddExpand ¶
func (p *QuoteCancelParams) AddExpand(f string)
AddExpand appends a new field to expand.
type QuoteCollectionMethod ¶
type QuoteCollectionMethod string
Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
const ( QuoteCollectionMethodChargeAutomatically QuoteCollectionMethod = "charge_automatically" QuoteCollectionMethodSendInvoice QuoteCollectionMethod = "send_invoice" )
List of values that QuoteCollectionMethod can take
type QuoteComputed ¶
type QuoteComputed struct { // The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. Recurring *QuoteComputedRecurring `json:"recurring"` Upfront *QuoteComputedUpfront `json:"upfront"` }
type QuoteComputedRecurring ¶
type QuoteComputedRecurring struct { // Total before any discounts or taxes are applied. AmountSubtotal int64 `json:"amount_subtotal"` // Total after discounts and taxes are applied. AmountTotal int64 `json:"amount_total"` // The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. Interval QuoteComputedRecurringInterval `json:"interval"` // The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. IntervalCount int64 `json:"interval_count"` TotalDetails *QuoteComputedRecurringTotalDetails `json:"total_details"` }
The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
type QuoteComputedRecurringInterval ¶
type QuoteComputedRecurringInterval string
The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
const ( QuoteComputedRecurringIntervalDay QuoteComputedRecurringInterval = "day" QuoteComputedRecurringIntervalMonth QuoteComputedRecurringInterval = "month" QuoteComputedRecurringIntervalWeek QuoteComputedRecurringInterval = "week" QuoteComputedRecurringIntervalYear QuoteComputedRecurringInterval = "year" )
List of values that QuoteComputedRecurringInterval can take
type QuoteComputedRecurringTotalDetails ¶
type QuoteComputedRecurringTotalDetails struct { // This is the sum of all the discounts. AmountDiscount int64 `json:"amount_discount"` // This is the sum of all the shipping amounts. AmountShipping int64 `json:"amount_shipping"` // This is the sum of all the tax amounts. AmountTax int64 `json:"amount_tax"` Breakdown *QuoteComputedRecurringTotalDetailsBreakdown `json:"breakdown"` }
type QuoteComputedRecurringTotalDetailsBreakdown ¶
type QuoteComputedRecurringTotalDetailsBreakdown struct { // The aggregated discounts. Discounts []*QuoteComputedRecurringTotalDetailsBreakdownDiscount `json:"discounts"` // The aggregated tax amounts by rate. Taxes []*QuoteComputedRecurringTotalDetailsBreakdownTax `json:"taxes"` }
type QuoteComputedRecurringTotalDetailsBreakdownDiscount ¶
type QuoteComputedRecurringTotalDetailsBreakdownDiscount struct { // The amount discounted. Amount int64 `json:"amount"` // A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). // It contains information about when the discount began, when it will end, and what it is applied to. // // Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) Discount *Discount `json:"discount"` }
The aggregated discounts.
type QuoteComputedRecurringTotalDetailsBreakdownTax ¶
type QuoteComputedRecurringTotalDetailsBreakdownTax struct { // Amount of tax applied for this rate. Amount int64 `json:"amount"` // Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. // // Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` }
The aggregated tax amounts by rate.
type QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason ¶
type QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonNotSupported QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "not_supported" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonProductExempt QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonReducedRated QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonStandardRated QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced" QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonZeroRated QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated" )
List of values that QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason can take
type QuoteComputedUpfront ¶
type QuoteComputedUpfront struct { // Total before any discounts or taxes are applied. AmountSubtotal int64 `json:"amount_subtotal"` // Total after discounts and taxes are applied. AmountTotal int64 `json:"amount_total"` // The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. LineItems *LineItemList `json:"line_items"` TotalDetails *QuoteComputedUpfrontTotalDetails `json:"total_details"` }
type QuoteComputedUpfrontTotalDetails ¶
type QuoteComputedUpfrontTotalDetails struct { // This is the sum of all the discounts. AmountDiscount int64 `json:"amount_discount"` // This is the sum of all the shipping amounts. AmountShipping int64 `json:"amount_shipping"` // This is the sum of all the tax amounts. AmountTax int64 `json:"amount_tax"` Breakdown *QuoteComputedUpfrontTotalDetailsBreakdown `json:"breakdown"` }
type QuoteComputedUpfrontTotalDetailsBreakdown ¶
type QuoteComputedUpfrontTotalDetailsBreakdown struct { // The aggregated discounts. Discounts []*QuoteComputedUpfrontTotalDetailsBreakdownDiscount `json:"discounts"` // The aggregated tax amounts by rate. Taxes []*QuoteComputedUpfrontTotalDetailsBreakdownTax `json:"taxes"` }
type QuoteComputedUpfrontTotalDetailsBreakdownDiscount ¶
type QuoteComputedUpfrontTotalDetailsBreakdownDiscount struct { // The amount discounted. Amount int64 `json:"amount"` // A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). // It contains information about when the discount began, when it will end, and what it is applied to. // // Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) Discount *Discount `json:"discount"` }
The aggregated discounts.
type QuoteComputedUpfrontTotalDetailsBreakdownTax ¶
type QuoteComputedUpfrontTotalDetailsBreakdownTax struct { // Amount of tax applied for this rate. Amount int64 `json:"amount"` // Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. // // Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` }
The aggregated tax amounts by rate.
type QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason ¶
type QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonNotSupported QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "not_supported" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonProductExempt QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonReducedRated QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonStandardRated QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced" QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonZeroRated QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated" )
List of values that QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason can take
type QuoteDiscountParams ¶
type QuoteDiscountParams struct { // ID of the coupon to create a new discount for. Coupon *string `form:"coupon"` // ID of an existing discount on the object (or one of its ancestors) to reuse. Discount *string `form:"discount"` }
The discounts applied to the quote. You can only set up to one discount.
type QuoteFinalizeQuoteParams ¶
type QuoteFinalizeQuoteParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. ExpiresAt *int64 `form:"expires_at"` }
Finalizes the quote.
func (*QuoteFinalizeQuoteParams) AddExpand ¶
func (p *QuoteFinalizeQuoteParams) AddExpand(f string)
AddExpand appends a new field to expand.
type QuoteFromQuote ¶
type QuoteFromQuote struct { // Whether this quote is a revision of a different quote. IsRevision bool `json:"is_revision"` // The quote that was cloned. Quote *Quote `json:"quote"` }
Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.
type QuoteFromQuoteParams ¶
type QuoteFromQuoteParams struct { // Whether this quote is a revision of the previous quote. IsRevision *bool `form:"is_revision"` // The `id` of the quote that will be cloned. Quote *string `form:"quote"` }
Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
type QuoteInvoiceSettings ¶
type QuoteInvoiceSettings struct { // Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. DaysUntilDue int64 `json:"days_until_due"` }
All invoices will be billed using the specified settings.
type QuoteInvoiceSettingsParams ¶
type QuoteInvoiceSettingsParams struct { // Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. DaysUntilDue *int64 `form:"days_until_due"` }
All invoices will be billed using the specified settings.
type QuoteLineItemParams ¶
type QuoteLineItemParams struct { // The ID of an existing line item on the quote. ID *string `form:"id"` // The ID of the price object. One of `price` or `price_data` is required. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. PriceData *QuoteLineItemPriceDataParams `form:"price_data"` // The quantity of the line item. Quantity *int64 `form:"quantity"` // The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. TaxRates []*string `form:"tax_rates"` }
A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
type QuoteLineItemPriceDataParams ¶
type QuoteLineItemPriceDataParams struct { // 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 `form:"currency"` // The ID of the product that this price will belong to. Product *string `form:"product"` // The recurring components of a price such as `interval` and `interval_count`. Recurring *QuoteLineItemPriceDataRecurringParams `form:"recurring"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
type QuoteLineItemPriceDataRecurringParams ¶
type QuoteLineItemPriceDataRecurringParams struct { // Specifies billing frequency. Either `day`, `week`, `month` or `year`. Interval *string `form:"interval"` // The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). IntervalCount *int64 `form:"interval_count"` }
The recurring components of a price such as `interval` and `interval_count`.
type QuoteList ¶
type QuoteList struct { APIResource ListMeta Data []*Quote `json:"data"` }
QuoteList is a list of Quotes as retrieved from a list endpoint.
type QuoteListComputedUpfrontLineItemsParams ¶
type QuoteListComputedUpfrontLineItemsParams struct { ListParams `form:"*"` Quote *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
func (*QuoteListComputedUpfrontLineItemsParams) AddExpand ¶
func (p *QuoteListComputedUpfrontLineItemsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type QuoteListLineItemsParams ¶
type QuoteListLineItemsParams struct { ListParams `form:"*"` Quote *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
func (*QuoteListLineItemsParams) AddExpand ¶
func (p *QuoteListLineItemsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type QuoteListParams ¶
type QuoteListParams struct { ListParams `form:"*"` // The ID of the customer whose quotes will be retrieved. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The status of the quote. Status *string `form:"status"` // Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. TestClock *string `form:"test_clock"` }
Returns a list of your quotes.
func (*QuoteListParams) AddExpand ¶
func (p *QuoteListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type QuotePDFParams ¶
type QuotePDFParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Download the PDF for a finalized quote
func (*QuotePDFParams) AddExpand ¶
func (p *QuotePDFParams) AddExpand(f string)
AddExpand appends a new field to expand.
type QuoteParams ¶
type QuoteParams struct { Params `form:"*"` // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. ApplicationFeeAmount *int64 `form:"application_fee_amount"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. ApplicationFeePercent *float64 `form:"application_fee_percent"` // Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. AutomaticTax *QuoteAutomaticTaxParams `form:"automatic_tax"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. CollectionMethod *string `form:"collection_method"` // The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. Customer *string `form:"customer"` // The tax rates that will apply to any line item that does not have `tax_rates` set. DefaultTaxRates []*string `form:"default_tax_rates"` // A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. Description *string `form:"description"` // The discounts applied to the quote. You can only set up to one discount. Discounts []*QuoteDiscountParams `form:"discounts"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. ExpiresAt *int64 `form:"expires_at"` Footer *string `form:"footer"` // Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. FromQuote *QuoteFromQuoteParams `form:"from_quote"` // A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. Header *string `form:"header"` // All invoices will be billed using the specified settings. InvoiceSettings *QuoteInvoiceSettingsParams `form:"invoice_settings"` // A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. LineItems []*QuoteLineItemParams `form:"line_items"` // 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`. Metadata map[string]string `form:"metadata"` // The account on behalf of which to charge. OnBehalfOf *string `form:"on_behalf_of"` // When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. SubscriptionData *QuoteSubscriptionDataParams `form:"subscription_data"` // ID of the test clock to attach to the quote. TestClock *string `form:"test_clock"` // The data with which to automatically create a Transfer for each of the invoices. TransferData *QuoteTransferDataParams `form:"transfer_data"` }
Retrieves the quote with the given ID.
func (*QuoteParams) AddExpand ¶
func (p *QuoteParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*QuoteParams) AddMetadata ¶
func (p *QuoteParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type QuoteStatus ¶
type QuoteStatus string
The status of the quote.
const ( QuoteStatusAccepted QuoteStatus = "accepted" QuoteStatusCanceled QuoteStatus = "canceled" QuoteStatusDraft QuoteStatus = "draft" QuoteStatusOpen QuoteStatus = "open" )
List of values that QuoteStatus can take
type QuoteStatusTransitions ¶
type QuoteStatusTransitions struct { // The time that the quote was accepted. Measured in seconds since Unix epoch. AcceptedAt int64 `json:"accepted_at"` // The time that the quote was canceled. Measured in seconds since Unix epoch. CanceledAt int64 `json:"canceled_at"` // The time that the quote was finalized. Measured in seconds since Unix epoch. FinalizedAt int64 `json:"finalized_at"` }
type QuoteSubscriptionData ¶
type QuoteSubscriptionData struct { // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. Description string `json:"description"` // When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. EffectiveDate int64 `json:"effective_date"` // Integer representing the number of trial period days before the customer is charged for the first time. TrialPeriodDays int64 `json:"trial_period_days"` }
type QuoteSubscriptionDataParams ¶
type QuoteSubscriptionDataParams struct { // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. Description *string `form:"description"` // When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. EffectiveDate *int64 `form:"effective_date"` EffectiveDateCurrentPeriodEnd *bool `form:"-"` // See custom AppendTo // Integer representing the number of trial period days before the customer is charged for the first time. TrialPeriodDays *int64 `form:"trial_period_days"` }
When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
type QuoteTotalDetails ¶
type QuoteTotalDetails struct { // This is the sum of all the discounts. AmountDiscount int64 `json:"amount_discount"` // This is the sum of all the shipping amounts. AmountShipping int64 `json:"amount_shipping"` // This is the sum of all the tax amounts. AmountTax int64 `json:"amount_tax"` Breakdown *QuoteTotalDetailsBreakdown `json:"breakdown"` }
type QuoteTotalDetailsBreakdown ¶
type QuoteTotalDetailsBreakdown struct { // The aggregated discounts. Discounts []*QuoteTotalDetailsBreakdownDiscount `json:"discounts"` // The aggregated tax amounts by rate. Taxes []*QuoteTotalDetailsBreakdownTax `json:"taxes"` }
type QuoteTotalDetailsBreakdownDiscount ¶
type QuoteTotalDetailsBreakdownDiscount struct { // The amount discounted. Amount int64 `json:"amount"` // A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). // It contains information about when the discount began, when it will end, and what it is applied to. // // Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) Discount *Discount `json:"discount"` }
The aggregated discounts.
type QuoteTotalDetailsBreakdownTax ¶
type QuoteTotalDetailsBreakdownTax struct { // Amount of tax applied for this rate. Amount int64 `json:"amount"` // Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. // // Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason QuoteTotalDetailsBreakdownTaxTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` }
The aggregated tax amounts by rate.
type QuoteTotalDetailsBreakdownTaxTaxabilityReason ¶
type QuoteTotalDetailsBreakdownTaxTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( QuoteTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt QuoteTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt" QuoteTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting QuoteTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting" QuoteTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax QuoteTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax" QuoteTotalDetailsBreakdownTaxTaxabilityReasonNotSupported QuoteTotalDetailsBreakdownTaxTaxabilityReason = "not_supported" QuoteTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt QuoteTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt" QuoteTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated QuoteTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated" QuoteTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated QuoteTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated" QuoteTotalDetailsBreakdownTaxTaxabilityReasonProductExempt QuoteTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt" QuoteTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday QuoteTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday" QuoteTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated QuoteTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated" QuoteTotalDetailsBreakdownTaxTaxabilityReasonReducedRated QuoteTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated" QuoteTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge QuoteTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge" QuoteTotalDetailsBreakdownTaxTaxabilityReasonStandardRated QuoteTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated" QuoteTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced QuoteTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced" QuoteTotalDetailsBreakdownTaxTaxabilityReasonZeroRated QuoteTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated" )
List of values that QuoteTotalDetailsBreakdownTaxTaxabilityReason can take
type QuoteTransferData ¶
type QuoteTransferData struct { // The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. Amount int64 `json:"amount"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. AmountPercent float64 `json:"amount_percent"` // The account where funds from the payment will be transferred to upon payment success. Destination *Account `json:"destination"` }
The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
type QuoteTransferDataParams ¶
type QuoteTransferDataParams struct { // The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. Amount *int64 `form:"amount"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. AmountPercent *float64 `form:"amount_percent"` // ID of an existing, connected Stripe account. Destination *string `form:"destination"` }
The data with which to automatically create a Transfer for each of the invoices.
type RadarEarlyFraudWarning ¶
type RadarEarlyFraudWarning struct { APIResource // An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. Actionable bool `json:"actionable"` // ID of the charge this early fraud warning is for, optionally expanded. Charge *Charge `json:"charge"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. FraudType RadarEarlyFraudWarningFraudType `json:"fraud_type"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // ID of the Payment Intent this early fraud warning is for, optionally expanded. PaymentIntent *PaymentIntent `json:"payment_intent"` }
An early fraud warning indicates that the card issuer has notified us that a charge may be fraudulent.
Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings)
type RadarEarlyFraudWarningFraudType ¶
type RadarEarlyFraudWarningFraudType string
The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`.
const ( RadarEarlyFraudWarningFraudTypeCardNeverReceived RadarEarlyFraudWarningFraudType = "card_never_received" RadarEarlyFraudWarningFraudTypeFraudulentCardApplication RadarEarlyFraudWarningFraudType = "fraudulent_card_application" RadarEarlyFraudWarningFraudTypeMadeWithCounterfeitCard RadarEarlyFraudWarningFraudType = "made_with_counterfeit_card" RadarEarlyFraudWarningFraudTypeMadeWithLostCard RadarEarlyFraudWarningFraudType = "made_with_lost_card" RadarEarlyFraudWarningFraudTypeMadeWithStolenCard RadarEarlyFraudWarningFraudType = "made_with_stolen_card" RadarEarlyFraudWarningFraudTypeMisc RadarEarlyFraudWarningFraudType = "misc" )
List of values that RadarEarlyFraudWarningFraudType can take
type RadarEarlyFraudWarningList ¶
type RadarEarlyFraudWarningList struct { APIResource ListMeta Data []*RadarEarlyFraudWarning `json:"data"` }
RadarEarlyFraudWarningList is a list of EarlyFraudWarnings as retrieved from a list endpoint.
type RadarEarlyFraudWarningListParams ¶
type RadarEarlyFraudWarningListParams struct { ListParams `form:"*"` // Only return early fraud warnings for the charge specified by this charge ID. Charge *string `form:"charge"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. PaymentIntent *string `form:"payment_intent"` }
Returns a list of early fraud warnings.
func (*RadarEarlyFraudWarningListParams) AddExpand ¶
func (p *RadarEarlyFraudWarningListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type RadarEarlyFraudWarningParams ¶
type RadarEarlyFraudWarningParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of an early fraud warning that has previously been created.
Please refer to the [early fraud warning](https://stripe.com/docs/api#early_fraud_warning_object) object reference for more details.
func (*RadarEarlyFraudWarningParams) AddExpand ¶
func (p *RadarEarlyFraudWarningParams) AddExpand(f string)
AddExpand appends a new field to expand.
type RadarValueList ¶
type RadarValueList struct { APIResource // The name of the value list for use in rules. Alias string `json:"alias"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The name or email address of the user who created this value list. CreatedBy string `json:"created_by"` Deleted bool `json:"deleted"` // Unique identifier for the object. ID string `json:"id"` // The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. ItemType RadarValueListItemType `json:"item_type"` // List of items contained within this value list. ListItems *RadarValueListItemList `json:"list_items"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // The name of the value list. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` }
Value lists allow you to group values together which can then be referenced in rules.
Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items)
type RadarValueListItem ¶
type RadarValueListItem struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The name or email address of the user who added this item to the value list. CreatedBy string `json:"created_by"` Deleted bool `json:"deleted"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The value of the item. Value string `json:"value"` // The identifier of the value list this item belongs to. ValueList string `json:"value_list"` }
Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.
Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items)
type RadarValueListItemList ¶
type RadarValueListItemList struct { APIResource ListMeta Data []*RadarValueListItem `json:"data"` }
RadarValueListItemList is a list of ValueListItems as retrieved from a list endpoint.
type RadarValueListItemListParams ¶
type RadarValueListItemListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Return items belonging to the parent list whose value matches the specified value (using an "is like" match). Value *string `form:"value"` // Identifier for the parent value list this item belongs to. ValueList *string `form:"value_list"` }
Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
func (*RadarValueListItemListParams) AddExpand ¶
func (p *RadarValueListItemListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type RadarValueListItemParams ¶
type RadarValueListItemParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The value of the item (whose type must match the type of the parent value list). Value *string `form:"value"` // The identifier of the value list which the created item will be added to. ValueList *string `form:"value_list"` }
Creates a new ValueListItem object, which is added to the specified parent value list.
func (*RadarValueListItemParams) AddExpand ¶
func (p *RadarValueListItemParams) AddExpand(f string)
AddExpand appends a new field to expand.
type RadarValueListItemType ¶
type RadarValueListItemType string
The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.
const ( RadarValueListItemTypeCardBin RadarValueListItemType = "card_bin" RadarValueListItemTypeCardFingerprint RadarValueListItemType = "card_fingerprint" RadarValueListItemTypeCaseSensitiveString RadarValueListItemType = "case_sensitive_string" RadarValueListItemTypeCountry RadarValueListItemType = "country" RadarValueListItemTypeCustomerID RadarValueListItemType = "customer_id" RadarValueListItemTypeEmail RadarValueListItemType = "email" RadarValueListItemTypeIPAddress RadarValueListItemType = "ip_address" RadarValueListItemTypeSEPADebitFingerprint RadarValueListItemType = "sepa_debit_fingerprint" RadarValueListItemTypeString RadarValueListItemType = "string" RadarValueListItemTypeUSBankAccountFingerprint RadarValueListItemType = "us_bank_account_fingerprint" )
List of values that RadarValueListItemType can take
type RadarValueListList ¶
type RadarValueListList struct { APIResource ListMeta Data []*RadarValueList `json:"data"` }
RadarValueListList is a list of ValueLists as retrieved from a list endpoint.
type RadarValueListListParams ¶
type RadarValueListListParams struct { ListParams `form:"*"` // The alias used to reference the value list when writing rules. Alias *string `form:"alias"` // A value contained within a value list - returns all value lists containing this value. Contains *string `form:"contains"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
func (*RadarValueListListParams) AddExpand ¶
func (p *RadarValueListListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type RadarValueListParams ¶
type RadarValueListParams struct { Params `form:"*"` // The name of the value list for use in rules. Alias *string `form:"alias"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. ItemType *string `form:"item_type"` // 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`. Metadata map[string]string `form:"metadata"` // The human-readable name of the value list. Name *string `form:"name"` }
Creates a new ValueList object, which can then be referenced in rules.
func (*RadarValueListParams) AddExpand ¶
func (p *RadarValueListParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*RadarValueListParams) AddMetadata ¶
func (p *RadarValueListParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type RangeQueryParams ¶
type RangeQueryParams struct { // GreaterThan specifies that values should be a greater than this // timestamp. GreaterThan int64 `form:"gt"` // GreaterThanOrEqual specifies that values should be greater than or equal // to this timestamp. GreaterThanOrEqual int64 `form:"gte"` // LesserThan specifies that values should be lesser than this timetamp. LesserThan int64 `form:"lt"` // LesserThanOrEqual specifies that values should be lesser than or // equalthis timetamp. LesserThanOrEqual int64 `form:"lte"` }
RangeQueryParams are a set of generic request parameters that are used on list endpoints to filter their results by some timestamp.
type Refund ¶
type Refund struct { APIResource // Amount, in cents (or local equivalent). Amount int64 `json:"amount"` // Balance transaction that describes the impact on your account balance. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` // ID of the charge that's refunded. Charge *Charge `json:"charge"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). Description string `json:"description"` // After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"` // Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. FailureReason RefundFailureReason `json:"failure_reason"` // Unique identifier for the object. ID string `json:"id"` // For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. InstructionsEmail string `json:"instructions_email"` // 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. Metadata map[string]string `json:"metadata"` NextAction *RefundNextAction `json:"next_action"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // ID of the PaymentIntent that's refunded. PaymentIntent *PaymentIntent `json:"payment_intent"` // Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). Reason RefundReason `json:"reason"` // This is the transaction number that appears on email receipts sent for this refund. ReceiptNumber string `json:"receipt_number"` // The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. SourceTransferReversal *TransferReversal `json:"source_transfer_reversal"` // Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). Status RefundStatus `json:"status"` // This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. TransferReversal *TransferReversal `json:"transfer_reversal"` }
Refund objects allow you to refund a previously created charge that isn't refunded yet. Funds are refunded to the credit or debit card that's initially charged.
Related guide: [Refunds](https://stripe.com/docs/refunds)
func (*Refund) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Refund. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type RefundCancelParams ¶
type RefundCancelParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Cancels a refund with a status of requires_action.
You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.
func (*RefundCancelParams) AddExpand ¶
func (p *RefundCancelParams) AddExpand(f string)
AddExpand appends a new field to expand.
type RefundFailureReason ¶
type RefundFailureReason string
Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`.
const ( RefundFailureReasonExpiredOrCanceledCard RefundFailureReason = "expired_or_canceled_card" RefundFailureReasonLostOrStolenCard RefundFailureReason = "lost_or_stolen_card" RefundFailureReasonUnknown RefundFailureReason = "unknown" )
List of values that RefundFailureReason can take
type RefundList ¶
type RefundList struct { APIResource ListMeta Data []*Refund `json:"data"` }
RefundList is a list of Refunds as retrieved from a list endpoint.
type RefundListParams ¶
type RefundListParams struct { ListParams `form:"*"` // Only return refunds for the charge specified by this charge ID. Charge *string `form:"charge"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return refunds for the PaymentIntent specified by this ID. PaymentIntent *string `form:"payment_intent"` }
Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object.
func (*RefundListParams) AddExpand ¶
func (p *RefundListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type RefundNextAction ¶
type RefundNextAction struct { // Contains the refund details. DisplayDetails *RefundNextActionDisplayDetails `json:"display_details"` // Type of the next action to perform. Type string `json:"type"` }
type RefundNextActionDisplayDetails ¶
type RefundNextActionDisplayDetails struct { EmailSent *RefundNextActionDisplayDetailsEmailSent `json:"email_sent"` // The expiry timestamp. ExpiresAt int64 `json:"expires_at"` }
Contains the refund details.
type RefundParams ¶
type RefundParams struct { Params `form:"*"` Amount *int64 `form:"amount"` // The identifier of the charge to refund. Charge *string `form:"charge"` // 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 `form:"currency"` // Customer whose customer balance to refund from. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. InstructionsEmail *string `form:"instructions_email"` // 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`. Metadata map[string]string `form:"metadata"` // Origin of the refund Origin *string `form:"origin"` // The identifier of the PaymentIntent to refund. PaymentIntent *string `form:"payment_intent"` // String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. Reason *string `form:"reason"` // Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. RefundApplicationFee *bool `form:"refund_application_fee"` // Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). // // A transfer can be reversed only by the application that created the charge. ReverseTransfer *bool `form:"reverse_transfer"` }
When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.
Creating a new refund will refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.
You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded.
Once entirely refunded, a charge can't be refunded again. This method will raise an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.
func (*RefundParams) AddExpand ¶
func (p *RefundParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*RefundParams) AddMetadata ¶
func (p *RefundParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type RefundReason ¶
type RefundReason string
Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).
const ( RefundReasonDuplicate RefundReason = "duplicate" RefundReasonExpiredUncapturedCharge RefundReason = "expired_uncaptured_charge" RefundReasonFraudulent RefundReason = "fraudulent" RefundReasonRequestedByCustomer RefundReason = "requested_by_customer" )
List of values that RefundReason can take
type RefundStatus ¶
type RefundStatus string
Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds).
const ( RefundStatusCanceled RefundStatus = "canceled" RefundStatusFailed RefundStatus = "failed" RefundStatusPending RefundStatus = "pending" RefundStatusSucceeded RefundStatus = "succeeded" RefundStatusRequiresAction RefundStatus = "requires_action" )
List of values that RefundStatus can take
type ReportingReportRun ¶
type ReportingReportRun struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // If something should go wrong during the run, a message about the failure (populated when // `status=failed`). Error string `json:"error"` // Unique identifier for the object. ID string `json:"id"` // `true` if the report is run on live mode data and `false` if it is run on test mode data. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` Parameters *ReportingReportRunParameters `json:"parameters"` // The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. ReportType string `json:"report_type"` // The file object representing the result of the report run (populated when // `status=succeeded`). Result *File `json:"result"` // Status of this report run. This will be `pending` when the run is initially created. // When the run finishes, this will be set to `succeeded` and the `result` field will be populated. // Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. Status ReportingReportRunStatus `json:"status"` // Timestamp at which this run successfully finished (populated when // `status=succeeded`). Measured in seconds since the Unix epoch. SucceededAt int64 `json:"succeeded_at"` }
The Report Run object represents an instance of a report type generated with specific run parameters. Once the object is created, Stripe begins processing the report. When the report has finished running, it will give you a reference to a file where you can retrieve your results. For an overview, see [API Access to Reports](https://stripe.com/docs/reporting/statements/api).
Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
type ReportingReportRunList ¶
type ReportingReportRunList struct { APIResource ListMeta Data []*ReportingReportRun `json:"data"` }
ReportingReportRunList is a list of ReportRuns as retrieved from a list endpoint.
type ReportingReportRunListParams ¶
type ReportingReportRunListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of Report Runs, with the most recent appearing first.
func (*ReportingReportRunListParams) AddExpand ¶
func (p *ReportingReportRunListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ReportingReportRunParameters ¶
type ReportingReportRunParameters struct { // The set of output columns requested for inclusion in the report run. Columns []string `json:"columns"` // Connected account ID by which to filter the report run. ConnectedAccount string `json:"connected_account"` // Currency of objects to be included in the report run. Currency Currency `json:"currency"` // Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value. IntervalEnd int64 `json:"interval_end"` // Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value. IntervalStart int64 `json:"interval_start"` // Payout ID by which to filter the report run. Payout string `json:"payout"` // Category of balance transactions to be included in the report run. ReportingCategory string `json:"reporting_category"` // Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. Timezone string `json:"timezone"` }
type ReportingReportRunParametersParams ¶
type ReportingReportRunParametersParams struct { // The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set. Columns []*string `form:"columns"` // Connected account ID to filter for in the report run. ConnectedAccount *string `form:"connected_account"` // Currency of objects to be included in the report run. Currency *string `form:"currency"` // Ending timestamp of data to be included in the report run (exclusive). IntervalEnd *int64 `form:"interval_end"` // Starting timestamp of data to be included in the report run. IntervalStart *int64 `form:"interval_start"` // Payout ID by which to filter the report run. Payout *string `form:"payout"` // Category of balance transactions to be included in the report run. ReportingCategory *string `form:"reporting_category"` // Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. Timezone *string `form:"timezone"` }
Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.
type ReportingReportRunParams ¶
type ReportingReportRunParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. Parameters *ReportingReportRunParametersParams `form:"parameters"` // The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. ReportType *string `form:"report_type"` }
Retrieves the details of an existing Report Run.
func (*ReportingReportRunParams) AddExpand ¶
func (p *ReportingReportRunParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ReportingReportRunStatus ¶
type ReportingReportRunStatus string
Status of this report run. This will be `pending` when the run is initially created.
When the run finishes, this will be set to `succeeded` and the `result` field will be populated. Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
const ( ReportingReportRunStatusFailed ReportingReportRunStatus = "failed" ReportingReportRunStatusPending ReportingReportRunStatus = "pending" ReportingReportRunStatusSucceeded ReportingReportRunStatus = "succeeded" )
List of values that ReportingReportRunStatus can take
type ReportingReportType ¶
type ReportingReportType struct { APIResource // Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. DataAvailableEnd int64 `json:"data_available_end"` // Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. DataAvailableStart int64 `json:"data_available_start"` // List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) DefaultColumns []string `json:"default_columns"` // The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // Human-readable name of the Report Type Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // When this Report Type was latest updated. Measured in seconds since the Unix epoch. Updated int64 `json:"updated"` // Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. Version int64 `json:"version"` }
The Report Type resource corresponds to a particular type of report, such as the "Activity summary" or "Itemized payouts" reports. These objects are identified by an ID belonging to a set of enumerated values. See [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) for those Report Type IDs, along with required and optional parameters.
Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
type ReportingReportTypeList ¶
type ReportingReportTypeList struct { APIResource ListMeta Data []*ReportingReportType `json:"data"` }
ReportingReportTypeList is a list of ReportTypes as retrieved from a list endpoint.
type ReportingReportTypeListParams ¶
type ReportingReportTypeListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a full list of Report Types.
func (*ReportingReportTypeListParams) AddExpand ¶
func (p *ReportingReportTypeListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ReportingReportTypeParams ¶
type ReportingReportTypeParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
func (*ReportingReportTypeParams) AddExpand ¶
func (p *ReportingReportTypeParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ReserveTransaction ¶
type ReserveTransaction struct { Amount int64 `json:"amount"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // Unique identifier for the object. ID string `json:"id"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` }
func (*ReserveTransaction) UnmarshalJSON ¶
func (r *ReserveTransaction) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a ReserveTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type Review ¶
type Review struct { APIResource // The ZIP or postal code of the card used, if applicable. BillingZip string `json:"billing_zip"` // The charge associated with this review. Charge *Charge `json:"charge"` // The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. ClosedReason ReviewClosedReason `json:"closed_reason"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Unique identifier for the object. ID string `json:"id"` // The IP address where the payment originated. IPAddress string `json:"ip_address"` // Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. IPAddressLocation *ReviewIPAddressLocation `json:"ip_address_location"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // If `true`, the review needs action. Open bool `json:"open"` // The reason the review was opened. One of `rule` or `manual`. OpenedReason ReviewOpenedReason `json:"opened_reason"` // The PaymentIntent ID associated with this review, if one exists. PaymentIntent *PaymentIntent `json:"payment_intent"` // The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. Reason ReviewReason `json:"reason"` // Information related to the browsing session of the user who initiated the payment. Session *ReviewSession `json:"session"` }
Reviews can be used to supplement automated fraud detection with human expertise.
Learn more about [Radar](https://stripe.com/radar) and reviewing payments [here](https://stripe.com/docs/radar/reviews).
func (*Review) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Review. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type ReviewApproveParams ¶
type ReviewApproveParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Approves a Review object, closing it and removing it from the list of reviews.
func (*ReviewApproveParams) AddExpand ¶
func (p *ReviewApproveParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ReviewClosedReason ¶
type ReviewClosedReason string
The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.
const ( ReviewClosedReasonApproved ReviewClosedReason = "approved" ReviewClosedReasonDisputed ReviewClosedReason = "disputed" ReviewClosedReasonRedacted ReviewClosedReason = "redacted" ReviewClosedReasonRefunded ReviewClosedReason = "refunded" ReviewClosedReasonRefundedAsFraud ReviewClosedReason = "refunded_as_fraud" )
List of values that ReviewClosedReason can take
type ReviewIPAddressLocation ¶
type ReviewIPAddressLocation struct { // The city where the payment originated. City string `json:"city"` // Two-letter ISO code representing the country where the payment originated. Country string `json:"country"` // The geographic latitude where the payment originated. Latitude float64 `json:"latitude"` // The geographic longitude where the payment originated. Longitude float64 `json:"longitude"` // The state/county/province/region where the payment originated. Region string `json:"region"` }
Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.
type ReviewList ¶
type ReviewList struct { APIResource ListMeta Data []*Review `json:"data"` }
ReviewList is a list of Reviews as retrieved from a list endpoint.
type ReviewListParams ¶
type ReviewListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
func (*ReviewListParams) AddExpand ¶
func (p *ReviewListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ReviewOpenedReason ¶
type ReviewOpenedReason string
The reason the review was opened. One of `rule` or `manual`.
const ( ReviewOpenedReasonManual ReviewOpenedReason = "manual" ReviewOpenedReasonRule ReviewOpenedReason = "rule" )
List of values that ReviewOpenedReason can take
type ReviewParams ¶
type ReviewParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves a Review object.
func (*ReviewParams) AddExpand ¶
func (p *ReviewParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ReviewReason ¶
type ReviewReason string
The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.
const ( ReviewReasonApproved ReviewReason = "approved" ReviewReasonDisputed ReviewReason = "disputed" ReviewReasonManual ReviewReason = "manual" ReviewReasonRefunded ReviewReason = "refunded" ReviewReasonRefundedAsFraud ReviewReason = "refunded_as_fraud" ReviewReasonRedacted ReviewReason = "redacted" ReviewReasonRule ReviewReason = "rule" )
List of values that ReviewReason can take
type ReviewSession ¶
type ReviewSession struct { // The browser used in this browser session (e.g., `Chrome`). Browser string `json:"browser"` // Information about the device used for the browser session (e.g., `Samsung SM-G930T`). Device string `json:"device"` // The platform for the browser session (e.g., `Macintosh`). Platform string `json:"platform"` // The version for the browser session (e.g., `61.0.3163.100`). Version string `json:"version"` }
Information related to the browsing session of the user who initiated the payment.
type SearchContainer ¶
type SearchContainer interface {
GetSearchMeta() *SearchMeta
}
SearchContainer is a general interface for which all search result object structs should comply. They achieve this by embedding a SearchMeta struct and inheriting its implementation of this interface.
type SearchIter ¶
type SearchIter struct {
// contains filtered or unexported fields
}
SearchIter provides a convenient interface for iterating over the elements returned from paginated search API calls. Successive calls to the Next method will step through each item in the search results, fetching pages of items as needed. Iterators are not thread-safe, so they should not be consumed across multiple goroutines.
func GetSearchIter ¶
func GetSearchIter(container SearchParamsContainer, query SearchQuery) *SearchIter
GetSearchIter returns a new SearchIter for a given query and its options.
func (*SearchIter) Current ¶
func (it *SearchIter) Current() interface{}
Current returns the most recent item visited by a call to Next.
func (*SearchIter) Err ¶
func (it *SearchIter) Err() error
Err returns the error, if any, that caused the SearchIter to stop. It must be inspected after Next returns false.
func (*SearchIter) Meta ¶
func (it *SearchIter) Meta() *SearchMeta
Meta returns the search metadata.
func (*SearchIter) Next ¶
func (it *SearchIter) Next() bool
Next advances the SearchIter to the next item in the search results, which will then be available through the Current method. It returns false when the iterator stops at the end of the search results.
func (*SearchIter) SearchResult ¶
func (it *SearchIter) SearchResult() SearchContainer
SearchResult returns the current search result container which the iterator is currently using. Objects will change as new API calls are made to continue pagination.
type SearchMeta ¶
type SearchMeta struct { HasMore bool `json:"has_more"` NextPage *string `json:"next_page"` URL string `json:"url"` // TotalCount is the total number of objects in the search result (beyond just // on the current page). // The value is returned only when `total_count` is specified in `expand` parameter. TotalCount *uint32 `json:"total_count"` }
SearchMeta is the structure that contains the common properties of the search iterators
func (*SearchMeta) GetSearchMeta ¶
func (l *SearchMeta) GetSearchMeta() *SearchMeta
GetSearchMeta returns a SearchMeta struct (itself). It exists because any structs that embed SearchMeta will inherit it, and thus implement the SearchContainer interface.
type SearchParams ¶
type SearchParams struct { // Context used for request. It may carry deadlines, cancelation signals, // and other request-scoped values across API boundaries and between // processes. // // Note that a cancelled or timed out context does not provide any // guarantee whether the operation was or was not completed on Stripe's API // servers. For certainty, you must either retry with the same idempotency // key or query the state of the API. Context context.Context `form:"-"` Query string `form:"query"` Limit *int64 `form:"limit"` Page *string `form:"page"` // Deprecated: Please use Expand in the surrounding struct instead. Expand []*string `form:"expand"` // Single specifies whether this is a single page iterator. By default, // listing through an iterator will automatically grab additional pages as // the query progresses. To change this behavior and just load a single // page, set this to true. Single bool `form:"-"` // Not an API parameter // StripeAccount may contain the ID of a connected account. By including // this field, the request is made as if it originated from the connected // account instead of under the account of the owner of the configured // Stripe key. StripeAccount *string `form:"-"` // Passed as header }
SearchParams is the structure that contains the common properties of any *SearchParams structure.
func (*SearchParams) AddExpand ¶
func (p *SearchParams) AddExpand(f string)
AddExpand on the embedded SearchParams struct is deprecated Deprecated: please use .AddExpand of the surrounding struct instead.
func (*SearchParams) GetParams ¶
func (p *SearchParams) GetParams() *Params
GetParams returns SearchParams as a Params struct. It exists because any structs that embed Params will inherit it, and thus implement the ParamsContainer interface.
func (*SearchParams) GetSearchParams ¶
func (p *SearchParams) GetSearchParams() *SearchParams
GetSearchParams returns a SearchParams struct (itself). It exists because any structs that embed SearchParams will inherit it, and thus implement the SearchParamsContainer interface.
func (*SearchParams) SetStripeAccount ¶
func (p *SearchParams) SetStripeAccount(val string)
SetStripeAccount sets a value for the Stripe-Account header.
func (*SearchParams) ToParams ¶
func (p *SearchParams) ToParams() *Params
ToParams converts a SearchParams to a Params by moving over any fields that have valid targets in the new type. This is useful because fields in Params can be injected directly into an http.Request while generally SearchParams is only used to build a set of parameters.
type SearchParamsContainer ¶
type SearchParamsContainer interface {
GetSearchParams() *SearchParams
}
SearchParamsContainer is a general interface for which all search parameter structs should comply. They achieve this by embedding a SearchParams struct and inheriting its implementation of this interface.
type SearchQuery ¶
type SearchQuery func(*Params, *form.Values) ([]interface{}, SearchContainer, error)
SearchQuery is the function used to get search results.
type SetupAttempt ¶
type SetupAttempt struct { APIResource // The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. Application *Application `json:"application"` // If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. // // It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. AttachToSelf bool `json:"attach_to_self"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. Customer *Customer `json:"customer"` // Indicates the directions of money movement for which this payment method is intended to be used. // // Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. FlowDirections []SetupAttemptFlowDirection `json:"flow_directions"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. OnBehalfOf *Account `json:"on_behalf_of"` // ID of the payment method used with this SetupAttempt. PaymentMethod *PaymentMethod `json:"payment_method"` PaymentMethodDetails *SetupAttemptPaymentMethodDetails `json:"payment_method_details"` // The error encountered during this attempt to confirm the SetupIntent, if any. SetupError *Error `json:"setup_error"` // ID of the SetupIntent that this attempt belongs to. SetupIntent *SetupIntent `json:"setup_intent"` // Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. Status SetupAttemptStatus `json:"status"` // The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. Usage SetupAttemptUsage `json:"usage"` }
A SetupAttempt describes one attempted confirmation of a SetupIntent, whether that confirmation is successful or unsuccessful. You can use SetupAttempts to inspect details of a specific attempt at setting up a payment method using a SetupIntent.
func (*SetupAttempt) UnmarshalJSON ¶
func (s *SetupAttempt) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a SetupAttempt. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type SetupAttemptFlowDirection ¶
type SetupAttemptFlowDirection string
Indicates the directions of money movement for which this payment method is intended to be used.
Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
const ( SetupAttemptFlowDirectionInbound SetupAttemptFlowDirection = "inbound" SetupAttemptFlowDirectionOutbound SetupAttemptFlowDirection = "outbound" )
List of values that SetupAttemptFlowDirection can take
type SetupAttemptList ¶
type SetupAttemptList struct { APIResource ListMeta Data []*SetupAttempt `json:"data"` }
SetupAttemptList is a list of SetupAttempts as retrieved from a list endpoint.
type SetupAttemptListParams ¶
type SetupAttemptListParams struct { ListParams `form:"*"` // A filter on the list, based on the object `created` field. The value // can be a string with an integer Unix timestamp or a // dictionary with a number of different query options. Created *int64 `form:"created"` // A filter on the list, based on the object `created` field. The value // can be a string with an integer Unix timestamp or a // dictionary with a number of different query options. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return SetupAttempts created by the SetupIntent specified by // this ID. SetupIntent *string `form:"setup_intent"` }
Returns a list of SetupAttempts that associate with a provided SetupIntent.
func (*SetupAttemptListParams) AddExpand ¶
func (p *SetupAttemptListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SetupAttemptPaymentMethodDetails ¶
type SetupAttemptPaymentMethodDetails struct { ACSSDebit *SetupAttemptPaymentMethodDetailsACSSDebit `json:"acss_debit"` AUBECSDebit *SetupAttemptPaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"` BACSDebit *SetupAttemptPaymentMethodDetailsBACSDebit `json:"bacs_debit"` Bancontact *SetupAttemptPaymentMethodDetailsBancontact `json:"bancontact"` Boleto *SetupAttemptPaymentMethodDetailsBoleto `json:"boleto"` Card *SetupAttemptPaymentMethodDetailsCard `json:"card"` CardPresent *SetupAttemptPaymentMethodDetailsCardPresent `json:"card_present"` CashApp *SetupAttemptPaymentMethodDetailsCashApp `json:"cashapp"` IDEAL *SetupAttemptPaymentMethodDetailsIDEAL `json:"ideal"` Klarna *SetupAttemptPaymentMethodDetailsKlarna `json:"klarna"` Link *SetupAttemptPaymentMethodDetailsLink `json:"link"` Paypal *SetupAttemptPaymentMethodDetailsPaypal `json:"paypal"` SEPADebit *SetupAttemptPaymentMethodDetailsSEPADebit `json:"sepa_debit"` Sofort *SetupAttemptPaymentMethodDetailsSofort `json:"sofort"` // The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. Type SetupAttemptPaymentMethodDetailsType `json:"type"` USBankAccount *SetupAttemptPaymentMethodDetailsUSBankAccount `json:"us_bank_account"` }
type SetupAttemptPaymentMethodDetailsACSSDebit ¶
type SetupAttemptPaymentMethodDetailsACSSDebit struct{}
type SetupAttemptPaymentMethodDetailsAUBECSDebit ¶
type SetupAttemptPaymentMethodDetailsAUBECSDebit struct{}
type SetupAttemptPaymentMethodDetailsBACSDebit ¶
type SetupAttemptPaymentMethodDetailsBACSDebit struct{}
type SetupAttemptPaymentMethodDetailsBancontact ¶
type SetupAttemptPaymentMethodDetailsBancontact struct { // Bank code of bank associated with the bank account. BankCode string `json:"bank_code"` // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Bank Identifier Code of the bank associated with the bank account. BIC string `json:"bic"` // The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"` // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"` // Last four characters of the IBAN. IBANLast4 string `json:"iban_last4"` // Preferred language of the Bancontact authorization page that the customer is redirected to. // Can be one of `en`, `de`, `fr`, or `nl` PreferredLanguage string `json:"preferred_language"` // 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. VerifiedName string `json:"verified_name"` }
type SetupAttemptPaymentMethodDetailsBoleto ¶
type SetupAttemptPaymentMethodDetailsBoleto struct{}
type SetupAttemptPaymentMethodDetailsCard ¶
type SetupAttemptPaymentMethodDetailsCard struct { // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` // Check results by Card networks on Card address and CVC at the time of authorization Checks *SetupAttemptPaymentMethodDetailsCardChecks `json:"checks"` // 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 `json:"country"` // 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 `json:"description"` // Two-digit number representing the card's expiration month. ExpMonth int64 `json:"exp_month"` // Four-digit number representing the card's expiration year. ExpYear int64 `json:"exp_year"` // 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 `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding string `json:"funding"` // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) IIN string `json:"iin"` // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) Issuer string `json:"issuer"` // The last four digits of the card. Last4 string `json:"last4"` // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network string `json:"network"` // Populated if this authorization used 3D Secure authentication. ThreeDSecure *SetupAttemptPaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"` // If this Card is part of a card wallet, this contains the details of the card wallet. Wallet *SetupAttemptPaymentMethodDetailsCardWallet `json:"wallet"` }
type SetupAttemptPaymentMethodDetailsCardChecks ¶
type SetupAttemptPaymentMethodDetailsCardChecks struct { // If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. AddressLine1Check string `json:"address_line1_check"` // If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. AddressPostalCodeCheck string `json:"address_postal_code_check"` // If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. CVCCheck string `json:"cvc_check"` }
Check results by Card networks on Card address and CVC at the time of authorization
type SetupAttemptPaymentMethodDetailsCardPresent ¶
type SetupAttemptPaymentMethodDetailsCardPresent struct { // The ID of the Card PaymentMethod which was generated by this SetupAttempt. GeneratedCard *PaymentMethod `json:"generated_card"` }
type SetupAttemptPaymentMethodDetailsCardThreeDSecure ¶
type SetupAttemptPaymentMethodDetailsCardThreeDSecure struct { // For authenticated transactions: how the customer was authenticated by // the issuing bank. AuthenticationFlow SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow `json:"authentication_flow"` // Indicates the outcome of 3D Secure authentication. Result SetupAttemptPaymentMethodDetailsCardThreeDSecureResult `json:"result"` // Additional information about why 3D Secure succeeded or failed based // on the `result`. ResultReason SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason `json:"result_reason"` // The version of 3D Secure that was used. Version string `json:"version"` }
Populated if this authorization used 3D Secure authentication.
type SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow ¶
type SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow string
For authenticated transactions: how the customer was authenticated by the issuing bank.
const ( SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlowChallenge SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "challenge" SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlowFrictionless SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "frictionless" )
List of values that SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow can take
type SetupAttemptPaymentMethodDetailsCardThreeDSecureResult ¶
type SetupAttemptPaymentMethodDetailsCardThreeDSecureResult string
Indicates the outcome of 3D Secure authentication.
const ( SetupAttemptPaymentMethodDetailsCardThreeDSecureResultAttemptAcknowledged SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "attempt_acknowledged" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultAuthenticated SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "authenticated" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultExempted SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "exempted" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultFailed SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "failed" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultNotSupported SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "not_supported" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultProcessingError SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "processing_error" )
List of values that SetupAttemptPaymentMethodDetailsCardThreeDSecureResult can take
type SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason ¶
type SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason string
Additional information about why 3D Secure succeeded or failed based on the `result`.
const ( SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonAbandoned SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "abandoned" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonBypassed SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "bypassed" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonCanceled SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "canceled" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonCardNotEnrolled SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "card_not_enrolled" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonNetworkNotSupported SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "network_not_supported" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonProtocolError SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "protocol_error" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonRejected SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "rejected" )
List of values that SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason can take
type SetupAttemptPaymentMethodDetailsCardWallet ¶
type SetupAttemptPaymentMethodDetailsCardWallet struct { ApplePay *SetupAttemptPaymentMethodDetailsCardWalletApplePay `json:"apple_pay"` GooglePay *SetupAttemptPaymentMethodDetailsCardWalletGooglePay `json:"google_pay"` // The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. Type SetupAttemptPaymentMethodDetailsCardWalletType `json:"type"` }
If this Card is part of a card wallet, this contains the details of the card wallet.
type SetupAttemptPaymentMethodDetailsCardWalletApplePay ¶
type SetupAttemptPaymentMethodDetailsCardWalletApplePay struct{}
type SetupAttemptPaymentMethodDetailsCardWalletGooglePay ¶
type SetupAttemptPaymentMethodDetailsCardWalletGooglePay struct{}
type SetupAttemptPaymentMethodDetailsCardWalletType ¶
type SetupAttemptPaymentMethodDetailsCardWalletType string
The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
const ( SetupAttemptPaymentMethodDetailsCardWalletTypeApplePay SetupAttemptPaymentMethodDetailsCardWalletType = "apple_pay" SetupAttemptPaymentMethodDetailsCardWalletTypeGooglePay SetupAttemptPaymentMethodDetailsCardWalletType = "google_pay" SetupAttemptPaymentMethodDetailsCardWalletTypeLink SetupAttemptPaymentMethodDetailsCardWalletType = "link" )
List of values that SetupAttemptPaymentMethodDetailsCardWalletType can take
type SetupAttemptPaymentMethodDetailsCashApp ¶
type SetupAttemptPaymentMethodDetailsCashApp struct{}
type SetupAttemptPaymentMethodDetailsIDEAL ¶
type SetupAttemptPaymentMethodDetailsIDEAL struct { // The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. Bank string `json:"bank"` // The Bank Identifier Code of the customer's bank. BIC string `json:"bic"` // The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"` // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"` // Last four characters of the IBAN. IBANLast4 string `json:"iban_last4"` // 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. VerifiedName string `json:"verified_name"` }
type SetupAttemptPaymentMethodDetailsKlarna ¶
type SetupAttemptPaymentMethodDetailsKlarna struct{}
type SetupAttemptPaymentMethodDetailsLink ¶
type SetupAttemptPaymentMethodDetailsLink struct{}
type SetupAttemptPaymentMethodDetailsPaypal ¶
type SetupAttemptPaymentMethodDetailsPaypal struct{}
type SetupAttemptPaymentMethodDetailsSEPADebit ¶
type SetupAttemptPaymentMethodDetailsSEPADebit struct{}
type SetupAttemptPaymentMethodDetailsSofort ¶
type SetupAttemptPaymentMethodDetailsSofort struct { // Bank code of bank associated with the bank account. BankCode string `json:"bank_code"` // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Bank Identifier Code of the bank associated with the bank account. BIC string `json:"bic"` // The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"` // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"` // Last four characters of the IBAN. IBANLast4 string `json:"iban_last4"` // Preferred language of the Sofort authorization page that the customer is redirected to. // Can be one of `en`, `de`, `fr`, or `nl` PreferredLanguage string `json:"preferred_language"` // Owner's verified full name. Values are verified or provided by Sofort directly // (if supported) at the time of authorization or settlement. They cannot be set or mutated. VerifiedName string `json:"verified_name"` }
type SetupAttemptPaymentMethodDetailsType ¶
type SetupAttemptPaymentMethodDetailsType string
The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.
const (
SetupAttemptPaymentMethodDetailsTypeCard SetupAttemptPaymentMethodDetailsType = "card"
)
List of values that SetupAttemptPaymentMethodDetailsType can take
type SetupAttemptPaymentMethodDetailsUSBankAccount ¶
type SetupAttemptPaymentMethodDetailsUSBankAccount struct{}
type SetupAttemptStatus ¶
type SetupAttemptStatus string
Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.
const ( SetupAttemptStatusAbandoned SetupAttemptStatus = "abandoned" SetupAttemptStatusFailed SetupAttemptStatus = "failed" SetupAttemptStatusProcessing SetupAttemptStatus = "processing" SetupAttemptStatusRequiresAction SetupAttemptStatus = "requires_action" SetupAttemptStatusRequiresConfirmation SetupAttemptStatus = "requires_confirmation" SetupAttemptStatusSucceeded SetupAttemptStatus = "succeeded" )
List of values that SetupAttemptStatus can take
type SetupAttemptUsage ¶
type SetupAttemptUsage string
The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.
const ( SetupAttemptUsageOffSession SetupAttemptUsage = "off_session" SetupAttemptUsageOnSession SetupAttemptUsage = "on_session" )
List of values that SetupAttemptUsage can take
type SetupIntent ¶
type SetupIntent struct { APIResource // ID of the Connect application that created the SetupIntent. Application *Application `json:"application"` // If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. // // It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. AttachToSelf bool `json:"attach_to_self"` // Settings for dynamic payment methods compatible with this Setup Intent AutomaticPaymentMethods *SetupIntentAutomaticPaymentMethods `json:"automatic_payment_methods"` // Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. CancellationReason SetupIntentCancellationReason `json:"cancellation_reason"` // The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. // // The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. ClientSecret string `json:"client_secret"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // ID of the Customer this SetupIntent belongs to, if one exists. // // If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. Customer *Customer `json:"customer"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // Indicates the directions of money movement for which this payment method is intended to be used. // // Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. FlowDirections []SetupIntentFlowDirection `json:"flow_directions"` // Unique identifier for the object. ID string `json:"id"` // The error encountered in the previous SetupIntent confirmation. LastSetupError *Error `json:"last_setup_error"` // The most recent SetupAttempt for this SetupIntent. LatestAttempt *SetupAttempt `json:"latest_attempt"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // ID of the multi use Mandate generated by the SetupIntent. Mandate *Mandate `json:"mandate"` // 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. Metadata map[string]string `json:"metadata"` // If present, this property tells you what actions you need to take in order for your customer to continue payment setup. NextAction *SetupIntentNextAction `json:"next_action"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The account (if any) for which the setup is intended. OnBehalfOf *Account `json:"on_behalf_of"` // ID of the payment method used with this SetupIntent. PaymentMethod *PaymentMethod `json:"payment_method"` // Information about the payment method configuration used for this Setup Intent. PaymentMethodConfigurationDetails *SetupIntentPaymentMethodConfigurationDetails `json:"payment_method_configuration_details"` // Payment method-specific configuration for this SetupIntent. PaymentMethodOptions *SetupIntentPaymentMethodOptions `json:"payment_method_options"` // The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. PaymentMethodTypes []string `json:"payment_method_types"` // ID of the single_use Mandate generated by the SetupIntent. SingleUseMandate *Mandate `json:"single_use_mandate"` // [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. Status SetupIntentStatus `json:"status"` // Indicates how the payment method is intended to be used in the future. // // Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. Usage SetupIntentUsage `json:"usage"` }
A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. The SetupIntent transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides you through the setup process.
Successful SetupIntents result in payment credentials that are optimized for future payments. For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) during payment method collection to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). If you use the SetupIntent with a Customer(https://stripe.com/docs/api#setup_intent_object-customer), it automatically attaches the resulting payment method to that Customer after successful setup. We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents)
func (*SetupIntent) UnmarshalJSON ¶
func (s *SetupIntent) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a SetupIntent. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type SetupIntentAutomaticPaymentMethods ¶
type SetupIntentAutomaticPaymentMethods struct { // Controls whether this SetupIntent will accept redirect-based payment methods. // // Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. AllowRedirects SetupIntentAutomaticPaymentMethodsAllowRedirects `json:"allow_redirects"` // Automatically calculates compatible payment methods Enabled bool `json:"enabled"` }
Settings for dynamic payment methods compatible with this Setup Intent
type SetupIntentAutomaticPaymentMethodsAllowRedirects ¶
type SetupIntentAutomaticPaymentMethodsAllowRedirects string
Controls whether this SetupIntent will accept redirect-based payment methods.
Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
const ( SetupIntentAutomaticPaymentMethodsAllowRedirectsAlways SetupIntentAutomaticPaymentMethodsAllowRedirects = "always" SetupIntentAutomaticPaymentMethodsAllowRedirectsNever SetupIntentAutomaticPaymentMethodsAllowRedirects = "never" )
List of values that SetupIntentAutomaticPaymentMethodsAllowRedirects can take
type SetupIntentAutomaticPaymentMethodsParams ¶
type SetupIntentAutomaticPaymentMethodsParams struct { // Controls whether this SetupIntent will accept redirect-based payment methods. // // Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. AllowRedirects *string `form:"allow_redirects"` // Whether this feature is enabled. Enabled *bool `form:"enabled"` }
When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.
type SetupIntentCancelParams ¶
type SetupIntentCancelParams struct { Params `form:"*"` // Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` CancellationReason *string `form:"cancellation_reason"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error.
func (*SetupIntentCancelParams) AddExpand ¶
func (p *SetupIntentCancelParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SetupIntentCancellationReason ¶
type SetupIntentCancellationReason string
Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
const ( SetupIntentCancellationReasonAbandoned SetupIntentCancellationReason = "abandoned" SetupIntentCancellationReasonDuplicate SetupIntentCancellationReason = "duplicate" SetupIntentCancellationReasonRequestedByCustomer SetupIntentCancellationReason = "requested_by_customer" )
List of values that SetupIntentCancellationReason can take
type SetupIntentConfirmParams ¶
type SetupIntentConfirmParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` MandateData *SetupIntentMandateDataParams `form:"mandate_data"` // ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. PaymentMethod *string `form:"payment_method"` // When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) // value in the SetupIntent. PaymentMethodData *SetupIntentConfirmPaymentMethodDataParams `form:"payment_method_data"` // Payment method-specific configuration for this SetupIntent. PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"` // The URL to redirect your customer back to after they authenticate on the payment method's app or site. // If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. // This parameter is only used for cards and other redirect-based payment methods. ReturnURL *string `form:"return_url"` // Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. UseStripeSDK *bool `form:"use_stripe_sdk"` }
Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.
If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.
Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status or the canceled status if the confirmation limit is reached.
func (*SetupIntentConfirmParams) AddExpand ¶
func (p *SetupIntentConfirmParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SetupIntentConfirmPaymentMethodDataACSSDebitParams ¶
type SetupIntentConfirmPaymentMethodDataACSSDebitParams struct { // Customer's bank account number. AccountNumber *string `form:"account_number"` // Institution number of the customer's bank. InstitutionNumber *string `form:"institution_number"` // Transit number of the customer's bank. TransitNumber *string `form:"transit_number"` }
If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
type SetupIntentConfirmPaymentMethodDataAUBECSDebitParams ¶
type SetupIntentConfirmPaymentMethodDataAUBECSDebitParams struct { // The account number for the bank account. AccountNumber *string `form:"account_number"` // Bank-State-Branch number of the bank account. BSBNumber *string `form:"bsb_number"` }
If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
type SetupIntentConfirmPaymentMethodDataAffirmParams ¶
type SetupIntentConfirmPaymentMethodDataAffirmParams struct{}
If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
type SetupIntentConfirmPaymentMethodDataAfterpayClearpayParams ¶
type SetupIntentConfirmPaymentMethodDataAfterpayClearpayParams struct{}
If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
type SetupIntentConfirmPaymentMethodDataAlipayParams ¶
type SetupIntentConfirmPaymentMethodDataAlipayParams struct{}
If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
type SetupIntentConfirmPaymentMethodDataBACSDebitParams ¶
type SetupIntentConfirmPaymentMethodDataBACSDebitParams struct { // Account number of the bank account that the funds will be debited from. AccountNumber *string `form:"account_number"` // Sort code of the bank account. (e.g., `10-20-30`) SortCode *string `form:"sort_code"` }
If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
type SetupIntentConfirmPaymentMethodDataBLIKParams ¶
type SetupIntentConfirmPaymentMethodDataBLIKParams struct{}
If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
type SetupIntentConfirmPaymentMethodDataBancontactParams ¶
type SetupIntentConfirmPaymentMethodDataBancontactParams struct{}
If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
type SetupIntentConfirmPaymentMethodDataBillingDetailsParams ¶
type SetupIntentConfirmPaymentMethodDataBillingDetailsParams struct { // Billing address. Address *AddressParams `form:"address"` // Email address. Email *string `form:"email"` // Full name. Name *string `form:"name"` // Billing phone number (including extension). Phone *string `form:"phone"` }
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
type SetupIntentConfirmPaymentMethodDataBoletoParams ¶
type SetupIntentConfirmPaymentMethodDataBoletoParams struct { // The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) TaxID *string `form:"tax_id"` }
If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
type SetupIntentConfirmPaymentMethodDataCashAppParams ¶
type SetupIntentConfirmPaymentMethodDataCashAppParams struct{}
If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
type SetupIntentConfirmPaymentMethodDataCustomerBalanceParams ¶
type SetupIntentConfirmPaymentMethodDataCustomerBalanceParams struct{}
If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
type SetupIntentConfirmPaymentMethodDataEPSParams ¶
type SetupIntentConfirmPaymentMethodDataEPSParams struct { // The customer's bank. Bank *string `form:"bank"` }
If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
type SetupIntentConfirmPaymentMethodDataFPXParams ¶
type SetupIntentConfirmPaymentMethodDataFPXParams struct { // Account holder type for FPX transaction AccountHolderType *string `form:"account_holder_type"` // The customer's bank. Bank *string `form:"bank"` }
If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
type SetupIntentConfirmPaymentMethodDataGiropayParams ¶
type SetupIntentConfirmPaymentMethodDataGiropayParams struct{}
If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
type SetupIntentConfirmPaymentMethodDataGrabpayParams ¶
type SetupIntentConfirmPaymentMethodDataGrabpayParams struct{}
If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
type SetupIntentConfirmPaymentMethodDataIDEALParams ¶
type SetupIntentConfirmPaymentMethodDataIDEALParams struct { // The customer's bank. Bank *string `form:"bank"` }
If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
type SetupIntentConfirmPaymentMethodDataInteracPresentParams ¶
type SetupIntentConfirmPaymentMethodDataInteracPresentParams struct{}
If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
type SetupIntentConfirmPaymentMethodDataKlarnaDOBParams ¶
type SetupIntentConfirmPaymentMethodDataKlarnaDOBParams struct { // The day of birth, between 1 and 31. Day *int64 `form:"day"` // The month of birth, between 1 and 12. Month *int64 `form:"month"` // The four-digit year of birth. Year *int64 `form:"year"` }
Customer's date of birth
type SetupIntentConfirmPaymentMethodDataKlarnaParams ¶
type SetupIntentConfirmPaymentMethodDataKlarnaParams struct { // Customer's date of birth DOB *SetupIntentConfirmPaymentMethodDataKlarnaDOBParams `form:"dob"` }
If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
type SetupIntentConfirmPaymentMethodDataKonbiniParams ¶
type SetupIntentConfirmPaymentMethodDataKonbiniParams struct{}
If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
type SetupIntentConfirmPaymentMethodDataLinkParams ¶
type SetupIntentConfirmPaymentMethodDataLinkParams struct{}
If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
type SetupIntentConfirmPaymentMethodDataOXXOParams ¶
type SetupIntentConfirmPaymentMethodDataOXXOParams struct{}
If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
type SetupIntentConfirmPaymentMethodDataP24Params ¶
type SetupIntentConfirmPaymentMethodDataP24Params struct { // The customer's bank. Bank *string `form:"bank"` }
If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
type SetupIntentConfirmPaymentMethodDataParams ¶
type SetupIntentConfirmPaymentMethodDataParams struct { // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. ACSSDebit *SetupIntentConfirmPaymentMethodDataACSSDebitParams `form:"acss_debit"` // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. Affirm *SetupIntentConfirmPaymentMethodDataAffirmParams `form:"affirm"` // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. AfterpayClearpay *SetupIntentConfirmPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *SetupIntentConfirmPaymentMethodDataAlipayParams `form:"alipay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. AUBECSDebit *SetupIntentConfirmPaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. BACSDebit *SetupIntentConfirmPaymentMethodDataBACSDebitParams `form:"bacs_debit"` // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. Bancontact *SetupIntentConfirmPaymentMethodDataBancontactParams `form:"bancontact"` // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. BillingDetails *SetupIntentConfirmPaymentMethodDataBillingDetailsParams `form:"billing_details"` // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. BLIK *SetupIntentConfirmPaymentMethodDataBLIKParams `form:"blik"` // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. Boleto *SetupIntentConfirmPaymentMethodDataBoletoParams `form:"boleto"` // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. CashApp *SetupIntentConfirmPaymentMethodDataCashAppParams `form:"cashapp"` // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. CustomerBalance *SetupIntentConfirmPaymentMethodDataCustomerBalanceParams `form:"customer_balance"` // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. EPS *SetupIntentConfirmPaymentMethodDataEPSParams `form:"eps"` // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. FPX *SetupIntentConfirmPaymentMethodDataFPXParams `form:"fpx"` // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. Giropay *SetupIntentConfirmPaymentMethodDataGiropayParams `form:"giropay"` // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. Grabpay *SetupIntentConfirmPaymentMethodDataGrabpayParams `form:"grabpay"` // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. IDEAL *SetupIntentConfirmPaymentMethodDataIDEALParams `form:"ideal"` // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. InteracPresent *SetupIntentConfirmPaymentMethodDataInteracPresentParams `form:"interac_present"` // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. Klarna *SetupIntentConfirmPaymentMethodDataKlarnaParams `form:"klarna"` // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. Konbini *SetupIntentConfirmPaymentMethodDataKonbiniParams `form:"konbini"` // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. Link *SetupIntentConfirmPaymentMethodDataLinkParams `form:"link"` // 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`. Metadata map[string]string `form:"metadata"` // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. OXXO *SetupIntentConfirmPaymentMethodDataOXXOParams `form:"oxxo"` // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. P24 *SetupIntentConfirmPaymentMethodDataP24Params `form:"p24"` // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. PayNow *SetupIntentConfirmPaymentMethodDataPayNowParams `form:"paynow"` // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. Paypal *SetupIntentConfirmPaymentMethodDataPaypalParams `form:"paypal"` // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. Pix *SetupIntentConfirmPaymentMethodDataPixParams `form:"pix"` // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. PromptPay *SetupIntentConfirmPaymentMethodDataPromptPayParams `form:"promptpay"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *SetupIntentConfirmPaymentMethodDataRadarOptionsParams `form:"radar_options"` // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. SEPADebit *SetupIntentConfirmPaymentMethodDataSEPADebitParams `form:"sepa_debit"` // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. Sofort *SetupIntentConfirmPaymentMethodDataSofortParams `form:"sofort"` // 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. Type *string `form:"type"` // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. USBankAccount *SetupIntentConfirmPaymentMethodDataUSBankAccountParams `form:"us_bank_account"` // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. WeChatPay *SetupIntentConfirmPaymentMethodDataWeChatPayParams `form:"wechat_pay"` // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. Zip *SetupIntentConfirmPaymentMethodDataZipParams `form:"zip"` }
When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) value in the SetupIntent.
func (*SetupIntentConfirmPaymentMethodDataParams) AddMetadata ¶
func (p *SetupIntentConfirmPaymentMethodDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type SetupIntentConfirmPaymentMethodDataPayNowParams ¶
type SetupIntentConfirmPaymentMethodDataPayNowParams struct{}
If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
type SetupIntentConfirmPaymentMethodDataPaypalParams ¶
type SetupIntentConfirmPaymentMethodDataPaypalParams struct{}
If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
type SetupIntentConfirmPaymentMethodDataPixParams ¶
type SetupIntentConfirmPaymentMethodDataPixParams struct{}
If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
type SetupIntentConfirmPaymentMethodDataPromptPayParams ¶
type SetupIntentConfirmPaymentMethodDataPromptPayParams struct{}
If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
type SetupIntentConfirmPaymentMethodDataRadarOptionsParams ¶
type SetupIntentConfirmPaymentMethodDataRadarOptionsParams struct { // 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. Session *string `form:"session"` }
Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
type SetupIntentConfirmPaymentMethodDataSEPADebitParams ¶
type SetupIntentConfirmPaymentMethodDataSEPADebitParams struct { // IBAN of the bank account. IBAN *string `form:"iban"` }
If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
type SetupIntentConfirmPaymentMethodDataSofortParams ¶
type SetupIntentConfirmPaymentMethodDataSofortParams struct { // Two-letter ISO code representing the country the bank account is located in. Country *string `form:"country"` }
If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
type SetupIntentConfirmPaymentMethodDataUSBankAccountParams ¶
type SetupIntentConfirmPaymentMethodDataUSBankAccountParams struct { // Account holder type: individual or company. AccountHolderType *string `form:"account_holder_type"` // Account number of the bank account. AccountNumber *string `form:"account_number"` // Account type: checkings or savings. Defaults to checking if omitted. AccountType *string `form:"account_type"` // The ID of a Financial Connections Account to use as a payment method. FinancialConnectionsAccount *string `form:"financial_connections_account"` // Routing number of the bank account. RoutingNumber *string `form:"routing_number"` }
If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
type SetupIntentConfirmPaymentMethodDataWeChatPayParams ¶
type SetupIntentConfirmPaymentMethodDataWeChatPayParams struct{}
If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
type SetupIntentConfirmPaymentMethodDataZipParams ¶
type SetupIntentConfirmPaymentMethodDataZipParams struct{}
If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
type SetupIntentFlowDirection ¶
type SetupIntentFlowDirection string
Indicates the directions of money movement for which this payment method is intended to be used.
Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
const ( SetupIntentFlowDirectionInbound SetupIntentFlowDirection = "inbound" SetupIntentFlowDirectionOutbound SetupIntentFlowDirection = "outbound" )
List of values that SetupIntentFlowDirection can take
type SetupIntentList ¶
type SetupIntentList struct { APIResource ListMeta Data []*SetupIntent `json:"data"` }
SetupIntentList is a list of SetupIntents as retrieved from a list endpoint.
type SetupIntentListParams ¶
type SetupIntentListParams struct { ListParams `form:"*"` // If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. // // It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. AttachToSelf *bool `form:"attach_to_self"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. Created *int64 `form:"created"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. CreatedRange *RangeQueryParams `form:"created"` // Only return SetupIntents for the customer specified by this customer ID. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return SetupIntents that associate with the specified payment method. PaymentMethod *string `form:"payment_method"` }
Returns a list of SetupIntents.
func (*SetupIntentListParams) AddExpand ¶
func (p *SetupIntentListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SetupIntentMandateDataCustomerAcceptanceOfflineParams ¶
type SetupIntentMandateDataCustomerAcceptanceOfflineParams struct{}
If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
type SetupIntentMandateDataCustomerAcceptanceOnlineParams ¶
type SetupIntentMandateDataCustomerAcceptanceOnlineParams struct { // The IP address from which the Mandate was accepted by the customer. IPAddress *string `form:"ip_address"` // The user agent of the browser from which the Mandate was accepted by the customer. UserAgent *string `form:"user_agent"` }
If this is a Mandate accepted online, this hash contains details about the online acceptance.
type SetupIntentMandateDataCustomerAcceptanceParams ¶
type SetupIntentMandateDataCustomerAcceptanceParams struct { // The time at which the customer accepted the Mandate. AcceptedAt *int64 `form:"accepted_at"` // If this is a Mandate accepted offline, this hash contains details about the offline acceptance. Offline *SetupIntentMandateDataCustomerAcceptanceOfflineParams `form:"offline"` // If this is a Mandate accepted online, this hash contains details about the online acceptance. Online *SetupIntentMandateDataCustomerAcceptanceOnlineParams `form:"online"` // The type of customer acceptance information included with the Mandate. One of `online` or `offline`. Type MandateCustomerAcceptanceType `form:"type"` }
This hash contains details about the customer acceptance of the Mandate.
type SetupIntentMandateDataParams ¶
type SetupIntentMandateDataParams struct { // This hash contains details about the customer acceptance of the Mandate. CustomerAcceptance *SetupIntentMandateDataCustomerAcceptanceParams `form:"customer_acceptance"` }
This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
type SetupIntentNextAction ¶
type SetupIntentNextAction struct { CashAppHandleRedirectOrDisplayQRCode *SetupIntentNextActionCashAppHandleRedirectOrDisplayQRCode `json:"cashapp_handle_redirect_or_display_qr_code"` RedirectToURL *SetupIntentNextActionRedirectToURL `json:"redirect_to_url"` // Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. Type SetupIntentNextActionType `json:"type"` // When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. UseStripeSDK *SetupIntentNextActionUseStripeSDK `json:"use_stripe_sdk"` VerifyWithMicrodeposits *SetupIntentNextActionVerifyWithMicrodeposits `json:"verify_with_microdeposits"` }
If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
type SetupIntentNextActionCashAppHandleRedirectOrDisplayQRCode ¶
type SetupIntentNextActionCashAppHandleRedirectOrDisplayQRCode struct { // The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. HostedInstructionsURL string `json:"hosted_instructions_url"` // The url for mobile redirect based auth MobileAuthURL string `json:"mobile_auth_url"` QRCode *SetupIntentNextActionCashAppHandleRedirectOrDisplayQRCodeQRCode `json:"qr_code"` }
type SetupIntentNextActionCashAppHandleRedirectOrDisplayQRCodeQRCode ¶
type SetupIntentNextActionCashAppHandleRedirectOrDisplayQRCodeQRCode struct { // The date (unix timestamp) when the QR code expires. ExpiresAt int64 `json:"expires_at"` // The image_url_png string used to render QR code ImageURLPNG string `json:"image_url_png"` // The image_url_svg string used to render QR code ImageURLSVG string `json:"image_url_svg"` }
type SetupIntentNextActionRedirectToURL ¶
type SetupIntentNextActionRedirectToURL struct { // If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. ReturnURL string `json:"return_url"` // The URL you must redirect your customer to in order to authenticate. URL string `json:"url"` }
type SetupIntentNextActionType ¶
type SetupIntentNextActionType string
Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
const ( SetupIntentNextActionTypeRedirectToURL SetupIntentNextActionType = "redirect_to_url" SetupIntentNextActionTypeUseStripeSDK SetupIntentNextActionType = "use_stripe_sdk" SetupIntentNextActionTypeAlipayHandleRedirect SetupIntentNextActionType = "alipay_handle_redirect" SetupIntentNextActionTypeOXXODisplayDetails SetupIntentNextActionType = "oxxo_display_details" SetupIntentNextActionTypeVerifyWithMicrodeposits SetupIntentNextActionType = "verify_with_microdeposits" )
List of values that SetupIntentNextActionType can take
type SetupIntentNextActionUseStripeSDK ¶
type SetupIntentNextActionUseStripeSDK struct{}
When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
type SetupIntentNextActionVerifyWithMicrodeposits ¶
type SetupIntentNextActionVerifyWithMicrodeposits struct { // The timestamp when the microdeposits are expected to land. ArrivalDate int64 `json:"arrival_date"` // The URL for the hosted verification page, which allows customers to verify their bank account. HostedVerificationURL string `json:"hosted_verification_url"` // The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. MicrodepositType SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType `json:"microdeposit_type"` }
type SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType ¶
type SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType string
The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
const ( SetupIntentNextActionVerifyWithMicrodepositsMicrodepositTypeAmounts SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType = "amounts" SetupIntentNextActionVerifyWithMicrodepositsMicrodepositTypeDescriptorCode SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType = "descriptor_code" )
List of values that SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType can take
type SetupIntentParams ¶
type SetupIntentParams struct { Params `form:"*"` // If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. // // It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. AttachToSelf *bool `form:"attach_to_self"` // When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. AutomaticPaymentMethods *SetupIntentAutomaticPaymentMethodsParams `form:"automatic_payment_methods"` // The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. ClientSecret *string `form:"client_secret"` // Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. Confirm *bool `form:"confirm"` // ID of the Customer this SetupIntent belongs to, if one exists. // // If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. Customer *string `form:"customer"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Indicates the directions of money movement for which this payment method is intended to be used. // // Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. FlowDirections []*string `form:"flow_directions"` // This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). MandateData *SetupIntentMandateDataParams `form:"mandate_data"` // 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`. Metadata map[string]string `form:"metadata"` // The Stripe account ID created for this SetupIntent. OnBehalfOf *string `form:"on_behalf_of"` // ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. PaymentMethod *string `form:"payment_method"` // The ID of the payment method configuration to use with this SetupIntent. PaymentMethodConfiguration *string `form:"payment_method_configuration"` // When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) // value in the SetupIntent. PaymentMethodData *SetupIntentPaymentMethodDataParams `form:"payment_method_data"` // Payment method-specific configuration for this SetupIntent. PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"` // The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this array, it defaults to ["card"]. PaymentMethodTypes []*string `form:"payment_method_types"` // The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). ReturnURL *string `form:"return_url"` // If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. SingleUse *SetupIntentSingleUseParams `form:"single_use"` // Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. Usage *string `form:"usage"` // Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. UseStripeSDK *bool `form:"use_stripe_sdk"` }
Creates a SetupIntent object.
After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm) it to collect any required permissions to charge the payment method later.
func (*SetupIntentParams) AddExpand ¶
func (p *SetupIntentParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*SetupIntentParams) AddMetadata ¶
func (p *SetupIntentParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type SetupIntentPaymentMethodConfigurationDetails ¶ added in v75.6.0
type SetupIntentPaymentMethodConfigurationDetails struct { // ID of the payment method configuration used. ID string `json:"id"` // ID of the parent payment method configuration used. Parent string `json:"parent"` }
Information about the payment method configuration used for this Setup Intent.
type SetupIntentPaymentMethodDataACSSDebitParams ¶
type SetupIntentPaymentMethodDataACSSDebitParams struct { // Customer's bank account number. AccountNumber *string `form:"account_number"` // Institution number of the customer's bank. InstitutionNumber *string `form:"institution_number"` // Transit number of the customer's bank. TransitNumber *string `form:"transit_number"` }
If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
type SetupIntentPaymentMethodDataAUBECSDebitParams ¶
type SetupIntentPaymentMethodDataAUBECSDebitParams struct { // The account number for the bank account. AccountNumber *string `form:"account_number"` // Bank-State-Branch number of the bank account. BSBNumber *string `form:"bsb_number"` }
If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
type SetupIntentPaymentMethodDataAffirmParams ¶
type SetupIntentPaymentMethodDataAffirmParams struct{}
If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
type SetupIntentPaymentMethodDataAfterpayClearpayParams ¶
type SetupIntentPaymentMethodDataAfterpayClearpayParams struct{}
If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
type SetupIntentPaymentMethodDataAlipayParams ¶
type SetupIntentPaymentMethodDataAlipayParams struct{}
If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
type SetupIntentPaymentMethodDataBACSDebitParams ¶
type SetupIntentPaymentMethodDataBACSDebitParams struct { // Account number of the bank account that the funds will be debited from. AccountNumber *string `form:"account_number"` // Sort code of the bank account. (e.g., `10-20-30`) SortCode *string `form:"sort_code"` }
If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
type SetupIntentPaymentMethodDataBLIKParams ¶
type SetupIntentPaymentMethodDataBLIKParams struct{}
If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
type SetupIntentPaymentMethodDataBancontactParams ¶
type SetupIntentPaymentMethodDataBancontactParams struct{}
If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
type SetupIntentPaymentMethodDataBillingDetailsParams ¶
type SetupIntentPaymentMethodDataBillingDetailsParams struct { // Billing address. Address *AddressParams `form:"address"` // Email address. Email *string `form:"email"` // Full name. Name *string `form:"name"` // Billing phone number (including extension). Phone *string `form:"phone"` }
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
type SetupIntentPaymentMethodDataBoletoParams ¶
type SetupIntentPaymentMethodDataBoletoParams struct { // The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) TaxID *string `form:"tax_id"` }
If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
type SetupIntentPaymentMethodDataCashAppParams ¶
type SetupIntentPaymentMethodDataCashAppParams struct{}
If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
type SetupIntentPaymentMethodDataCustomerBalanceParams ¶
type SetupIntentPaymentMethodDataCustomerBalanceParams struct{}
If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
type SetupIntentPaymentMethodDataEPSParams ¶
type SetupIntentPaymentMethodDataEPSParams struct { // The customer's bank. Bank *string `form:"bank"` }
If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
type SetupIntentPaymentMethodDataFPXParams ¶
type SetupIntentPaymentMethodDataFPXParams struct { // Account holder type for FPX transaction AccountHolderType *string `form:"account_holder_type"` // The customer's bank. Bank *string `form:"bank"` }
If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
type SetupIntentPaymentMethodDataGiropayParams ¶
type SetupIntentPaymentMethodDataGiropayParams struct{}
If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
type SetupIntentPaymentMethodDataGrabpayParams ¶
type SetupIntentPaymentMethodDataGrabpayParams struct{}
If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
type SetupIntentPaymentMethodDataIDEALParams ¶
type SetupIntentPaymentMethodDataIDEALParams struct { // The customer's bank. Bank *string `form:"bank"` }
If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
type SetupIntentPaymentMethodDataInteracPresentParams ¶
type SetupIntentPaymentMethodDataInteracPresentParams struct{}
If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
type SetupIntentPaymentMethodDataKlarnaDOBParams ¶
type SetupIntentPaymentMethodDataKlarnaDOBParams struct { // The day of birth, between 1 and 31. Day *int64 `form:"day"` // The month of birth, between 1 and 12. Month *int64 `form:"month"` // The four-digit year of birth. Year *int64 `form:"year"` }
Customer's date of birth
type SetupIntentPaymentMethodDataKlarnaParams ¶
type SetupIntentPaymentMethodDataKlarnaParams struct { // Customer's date of birth DOB *SetupIntentPaymentMethodDataKlarnaDOBParams `form:"dob"` }
If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
type SetupIntentPaymentMethodDataKonbiniParams ¶
type SetupIntentPaymentMethodDataKonbiniParams struct{}
If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
type SetupIntentPaymentMethodDataLinkParams ¶
type SetupIntentPaymentMethodDataLinkParams struct{}
If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
type SetupIntentPaymentMethodDataOXXOParams ¶
type SetupIntentPaymentMethodDataOXXOParams struct{}
If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
type SetupIntentPaymentMethodDataP24Params ¶
type SetupIntentPaymentMethodDataP24Params struct { // The customer's bank. Bank *string `form:"bank"` }
If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
type SetupIntentPaymentMethodDataParams ¶
type SetupIntentPaymentMethodDataParams struct { // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. ACSSDebit *SetupIntentPaymentMethodDataACSSDebitParams `form:"acss_debit"` // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. Affirm *SetupIntentPaymentMethodDataAffirmParams `form:"affirm"` // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. AfterpayClearpay *SetupIntentPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *SetupIntentPaymentMethodDataAlipayParams `form:"alipay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. AUBECSDebit *SetupIntentPaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. BACSDebit *SetupIntentPaymentMethodDataBACSDebitParams `form:"bacs_debit"` // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. Bancontact *SetupIntentPaymentMethodDataBancontactParams `form:"bancontact"` // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. BillingDetails *SetupIntentPaymentMethodDataBillingDetailsParams `form:"billing_details"` // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. BLIK *SetupIntentPaymentMethodDataBLIKParams `form:"blik"` // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. Boleto *SetupIntentPaymentMethodDataBoletoParams `form:"boleto"` // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. CashApp *SetupIntentPaymentMethodDataCashAppParams `form:"cashapp"` // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. CustomerBalance *SetupIntentPaymentMethodDataCustomerBalanceParams `form:"customer_balance"` // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. EPS *SetupIntentPaymentMethodDataEPSParams `form:"eps"` // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. FPX *SetupIntentPaymentMethodDataFPXParams `form:"fpx"` // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. Giropay *SetupIntentPaymentMethodDataGiropayParams `form:"giropay"` // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. Grabpay *SetupIntentPaymentMethodDataGrabpayParams `form:"grabpay"` // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. IDEAL *SetupIntentPaymentMethodDataIDEALParams `form:"ideal"` // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. InteracPresent *SetupIntentPaymentMethodDataInteracPresentParams `form:"interac_present"` // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. Klarna *SetupIntentPaymentMethodDataKlarnaParams `form:"klarna"` // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. Konbini *SetupIntentPaymentMethodDataKonbiniParams `form:"konbini"` // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. Link *SetupIntentPaymentMethodDataLinkParams `form:"link"` // 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`. Metadata map[string]string `form:"metadata"` // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. OXXO *SetupIntentPaymentMethodDataOXXOParams `form:"oxxo"` // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. P24 *SetupIntentPaymentMethodDataP24Params `form:"p24"` // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. PayNow *SetupIntentPaymentMethodDataPayNowParams `form:"paynow"` // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. Paypal *SetupIntentPaymentMethodDataPaypalParams `form:"paypal"` // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. Pix *SetupIntentPaymentMethodDataPixParams `form:"pix"` // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. PromptPay *SetupIntentPaymentMethodDataPromptPayParams `form:"promptpay"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *SetupIntentPaymentMethodDataRadarOptionsParams `form:"radar_options"` // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. SEPADebit *SetupIntentPaymentMethodDataSEPADebitParams `form:"sepa_debit"` // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. Sofort *SetupIntentPaymentMethodDataSofortParams `form:"sofort"` // 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. Type *string `form:"type"` // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. USBankAccount *SetupIntentPaymentMethodDataUSBankAccountParams `form:"us_bank_account"` // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. WeChatPay *SetupIntentPaymentMethodDataWeChatPayParams `form:"wechat_pay"` // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. Zip *SetupIntentPaymentMethodDataZipParams `form:"zip"` }
When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) value in the SetupIntent.
func (*SetupIntentPaymentMethodDataParams) AddMetadata ¶
func (p *SetupIntentPaymentMethodDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type SetupIntentPaymentMethodDataPayNowParams ¶
type SetupIntentPaymentMethodDataPayNowParams struct{}
If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
type SetupIntentPaymentMethodDataPaypalParams ¶
type SetupIntentPaymentMethodDataPaypalParams struct{}
If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
type SetupIntentPaymentMethodDataPixParams ¶
type SetupIntentPaymentMethodDataPixParams struct{}
If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
type SetupIntentPaymentMethodDataPromptPayParams ¶
type SetupIntentPaymentMethodDataPromptPayParams struct{}
If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
type SetupIntentPaymentMethodDataRadarOptionsParams ¶
type SetupIntentPaymentMethodDataRadarOptionsParams struct { // 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. Session *string `form:"session"` }
Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
type SetupIntentPaymentMethodDataSEPADebitParams ¶
type SetupIntentPaymentMethodDataSEPADebitParams struct { // IBAN of the bank account. IBAN *string `form:"iban"` }
If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
type SetupIntentPaymentMethodDataSofortParams ¶
type SetupIntentPaymentMethodDataSofortParams struct { // Two-letter ISO code representing the country the bank account is located in. Country *string `form:"country"` }
If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
type SetupIntentPaymentMethodDataUSBankAccountParams ¶
type SetupIntentPaymentMethodDataUSBankAccountParams struct { // Account holder type: individual or company. AccountHolderType *string `form:"account_holder_type"` // Account number of the bank account. AccountNumber *string `form:"account_number"` // Account type: checkings or savings. Defaults to checking if omitted. AccountType *string `form:"account_type"` // The ID of a Financial Connections Account to use as a payment method. FinancialConnectionsAccount *string `form:"financial_connections_account"` // Routing number of the bank account. RoutingNumber *string `form:"routing_number"` }
If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
type SetupIntentPaymentMethodDataWeChatPayParams ¶
type SetupIntentPaymentMethodDataWeChatPayParams struct{}
If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
type SetupIntentPaymentMethodDataZipParams ¶
type SetupIntentPaymentMethodDataZipParams struct{}
If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
type SetupIntentPaymentMethodOptions ¶
type SetupIntentPaymentMethodOptions struct { ACSSDebit *SetupIntentPaymentMethodOptionsACSSDebit `json:"acss_debit"` Card *SetupIntentPaymentMethodOptionsCard `json:"card"` Link *SetupIntentPaymentMethodOptionsLink `json:"link"` Paypal *SetupIntentPaymentMethodOptionsPaypal `json:"paypal"` SEPADebit *SetupIntentPaymentMethodOptionsSEPADebit `json:"sepa_debit"` USBankAccount *SetupIntentPaymentMethodOptionsUSBankAccount `json:"us_bank_account"` }
Payment method-specific configuration for this SetupIntent.
type SetupIntentPaymentMethodOptionsACSSDebit ¶
type SetupIntentPaymentMethodOptionsACSSDebit struct { // Currency supported by the bank account Currency SetupIntentPaymentMethodOptionsACSSDebitCurrency `json:"currency"` MandateOptions *SetupIntentPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"` // Bank account verification method. VerificationMethod SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"` }
type SetupIntentPaymentMethodOptionsACSSDebitCurrency ¶
type SetupIntentPaymentMethodOptionsACSSDebitCurrency string
Currency supported by the bank account
const ( SetupIntentPaymentMethodOptionsACSSDebitCurrencyCAD SetupIntentPaymentMethodOptionsACSSDebitCurrency = "cad" SetupIntentPaymentMethodOptionsACSSDebitCurrencyUSD SetupIntentPaymentMethodOptionsACSSDebitCurrency = "usd" )
List of values that SetupIntentPaymentMethodOptionsACSSDebitCurrency can take
type SetupIntentPaymentMethodOptionsACSSDebitMandateOptions ¶
type SetupIntentPaymentMethodOptionsACSSDebitMandateOptions struct { // A URL for custom mandate text CustomMandateURL string `json:"custom_mandate_url"` // List of Stripe products where this mandate can be selected automatically. DefaultFor []SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor `json:"default_for"` // Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. IntervalDescription string `json:"interval_description"` // Payment schedule for the mandate. PaymentSchedule SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule `json:"payment_schedule"` // Transaction type of the mandate. TransactionType SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"` }
type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor ¶
type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor string
List of Stripe products where this mandate can be selected automatically.
const ( SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultForInvoice SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "invoice" SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultForSubscription SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "subscription" )
List of values that SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor can take
type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsParams ¶
type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsParams struct { // A URL for custom mandate text to render during confirmation step. // The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, // or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. CustomMandateURL *string `form:"custom_mandate_url"` // List of Stripe products where this mandate can be selected automatically. DefaultFor []*string `form:"default_for"` // Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. IntervalDescription *string `form:"interval_description"` // Payment schedule for the mandate. PaymentSchedule *string `form:"payment_schedule"` // Transaction type of the mandate. TransactionType *string `form:"transaction_type"` }
Additional fields for Mandate creation
type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule ¶
type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule string
Payment schedule for the mandate.
const ( SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleCombined SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "combined" SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleInterval SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "interval" SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleSporadic SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "sporadic" )
List of values that SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule can take
type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType ¶
type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string
Transaction type of the mandate.
const ( SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business" SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal" )
List of values that SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take
type SetupIntentPaymentMethodOptionsACSSDebitParams ¶
type SetupIntentPaymentMethodOptionsACSSDebitParams struct { // 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 `form:"currency"` // Additional fields for Mandate creation MandateOptions *SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"` // Verification method for the intent VerificationMethod *string `form:"verification_method"` }
If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
type SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod ¶
type SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod string
Bank account verification method.
const ( SetupIntentPaymentMethodOptionsACSSDebitVerificationMethodAutomatic SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod = "automatic" SetupIntentPaymentMethodOptionsACSSDebitVerificationMethodInstant SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod = "instant" SetupIntentPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits" )
List of values that SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod can take
type SetupIntentPaymentMethodOptionsCard ¶
type SetupIntentPaymentMethodOptionsCard struct { // Configuration options for setting up an eMandate for cards issued in India. MandateOptions *SetupIntentPaymentMethodOptionsCardMandateOptions `json:"mandate_options"` // Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. Network SetupIntentPaymentMethodOptionsCardNetwork `json:"network"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure SetupIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"` }
type SetupIntentPaymentMethodOptionsCardMandateOptions ¶
type SetupIntentPaymentMethodOptionsCardMandateOptions struct { // Amount to be charged for future payments. Amount int64 `json:"amount"` // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. AmountType SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType `json:"amount_type"` // 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 Currency `json:"currency"` // A description of the mandate or subscription that is meant to be displayed to the customer. Description string `json:"description"` // End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. EndDate int64 `json:"end_date"` // Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. Interval SetupIntentPaymentMethodOptionsCardMandateOptionsInterval `json:"interval"` // The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. IntervalCount int64 `json:"interval_count"` // Unique identifier for the mandate or subscription. Reference string `json:"reference"` // Start date of the mandate or subscription. Start date should not be lesser than yesterday. StartDate int64 `json:"start_date"` // Specifies the type of mandates supported. Possible values are `india`. SupportedTypes []SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType `json:"supported_types"` }
Configuration options for setting up an eMandate for cards issued in India.
type SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType ¶
type SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType string
One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
const ( SetupIntentPaymentMethodOptionsCardMandateOptionsAmountTypeFixed SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType = "fixed" SetupIntentPaymentMethodOptionsCardMandateOptionsAmountTypeMaximum SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType = "maximum" )
List of values that SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType can take
type SetupIntentPaymentMethodOptionsCardMandateOptionsInterval ¶
type SetupIntentPaymentMethodOptionsCardMandateOptionsInterval string
Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
const ( SetupIntentPaymentMethodOptionsCardMandateOptionsIntervalDay SetupIntentPaymentMethodOptionsCardMandateOptionsInterval = "day" SetupIntentPaymentMethodOptionsCardMandateOptionsIntervalMonth SetupIntentPaymentMethodOptionsCardMandateOptionsInterval = "month" SetupIntentPaymentMethodOptionsCardMandateOptionsIntervalSporadic SetupIntentPaymentMethodOptionsCardMandateOptionsInterval = "sporadic" SetupIntentPaymentMethodOptionsCardMandateOptionsIntervalWeek SetupIntentPaymentMethodOptionsCardMandateOptionsInterval = "week" SetupIntentPaymentMethodOptionsCardMandateOptionsIntervalYear SetupIntentPaymentMethodOptionsCardMandateOptionsInterval = "year" )
List of values that SetupIntentPaymentMethodOptionsCardMandateOptionsInterval can take
type SetupIntentPaymentMethodOptionsCardMandateOptionsParams ¶
type SetupIntentPaymentMethodOptionsCardMandateOptionsParams struct { // Amount to be charged for future payments. Amount *int64 `form:"amount"` // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. AmountType *string `form:"amount_type"` // Currency in which future payments will be charged. 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 `form:"currency"` // A description of the mandate or subscription that is meant to be displayed to the customer. Description *string `form:"description"` // End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. EndDate *int64 `form:"end_date"` // Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. Interval *string `form:"interval"` // The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. IntervalCount *int64 `form:"interval_count"` // Unique identifier for the mandate or subscription. Reference *string `form:"reference"` // Start date of the mandate or subscription. Start date should not be lesser than yesterday. StartDate *int64 `form:"start_date"` // Specifies the type of mandates supported. Possible values are `india`. SupportedTypes []*string `form:"supported_types"` }
Configuration options for setting up an eMandate for cards issued in India.
type SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType ¶
type SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType string
Specifies the type of mandates supported. Possible values are `india`.
const (
SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypeIndia SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType = "india"
)
List of values that SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType can take
type SetupIntentPaymentMethodOptionsCardNetwork ¶
type SetupIntentPaymentMethodOptionsCardNetwork string
Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time.
const ( SetupIntentPaymentMethodOptionsCardNetworkAmex SetupIntentPaymentMethodOptionsCardNetwork = "amex" SetupIntentPaymentMethodOptionsCardNetworkCartesBancaires SetupIntentPaymentMethodOptionsCardNetwork = "cartes_bancaires" SetupIntentPaymentMethodOptionsCardNetworkDiners SetupIntentPaymentMethodOptionsCardNetwork = "diners" SetupIntentPaymentMethodOptionsCardNetworkDiscover SetupIntentPaymentMethodOptionsCardNetwork = "discover" SetupIntentPaymentMethodOptionsCardNetworkEFTPOSAU SetupIntentPaymentMethodOptionsCardNetwork = "eftpos_au" SetupIntentPaymentMethodOptionsCardNetworkInterac SetupIntentPaymentMethodOptionsCardNetwork = "interac" SetupIntentPaymentMethodOptionsCardNetworkJCB SetupIntentPaymentMethodOptionsCardNetwork = "jcb" SetupIntentPaymentMethodOptionsCardNetworkMastercard SetupIntentPaymentMethodOptionsCardNetwork = "mastercard" SetupIntentPaymentMethodOptionsCardNetworkUnionpay SetupIntentPaymentMethodOptionsCardNetwork = "unionpay" SetupIntentPaymentMethodOptionsCardNetworkUnknown SetupIntentPaymentMethodOptionsCardNetwork = "unknown" SetupIntentPaymentMethodOptionsCardNetworkVisa SetupIntentPaymentMethodOptionsCardNetwork = "visa" )
List of values that SetupIntentPaymentMethodOptionsCardNetwork can take
type SetupIntentPaymentMethodOptionsCardParams ¶
type SetupIntentPaymentMethodOptionsCardParams struct { // Configuration options for setting up an eMandate for cards issued in India. MandateOptions *SetupIntentPaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"` // When specified, this parameter signals that a card has been collected // as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This // parameter can only be provided during confirmation. MOTO *bool `form:"moto"` // Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. Network *string `form:"network"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure *string `form:"request_three_d_secure"` }
Configuration for any card setup attempted on this SetupIntent.
type SetupIntentPaymentMethodOptionsCardRequestThreeDSecure ¶
type SetupIntentPaymentMethodOptionsCardRequestThreeDSecure string
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
const ( SetupIntentPaymentMethodOptionsCardRequestThreeDSecureAny SetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "any" SetupIntentPaymentMethodOptionsCardRequestThreeDSecureAutomatic SetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "automatic" SetupIntentPaymentMethodOptionsCardRequestThreeDSecureChallengeOnly SetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "challenge_only" )
List of values that SetupIntentPaymentMethodOptionsCardRequestThreeDSecure can take
type SetupIntentPaymentMethodOptionsLink ¶
type SetupIntentPaymentMethodOptionsLink struct { // [Deprecated] This is a legacy parameter that no longer has any function. PersistentToken string `json:"persistent_token"` }
type SetupIntentPaymentMethodOptionsLinkParams ¶
type SetupIntentPaymentMethodOptionsLinkParams struct { // [Deprecated] This is a legacy parameter that no longer has any function. PersistentToken *string `form:"persistent_token"` }
If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
type SetupIntentPaymentMethodOptionsParams ¶
type SetupIntentPaymentMethodOptionsParams struct { // If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. ACSSDebit *SetupIntentPaymentMethodOptionsACSSDebitParams `form:"acss_debit"` // Configuration for any card setup attempted on this SetupIntent. Card *SetupIntentPaymentMethodOptionsCardParams `form:"card"` // If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. Link *SetupIntentPaymentMethodOptionsLinkParams `form:"link"` // If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. Paypal *SetupIntentPaymentMethodOptionsPaypalParams `form:"paypal"` // If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. SEPADebit *SetupIntentPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"` // If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. USBankAccount *SetupIntentPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"` }
Payment method-specific configuration for this SetupIntent.
type SetupIntentPaymentMethodOptionsPaypal ¶
type SetupIntentPaymentMethodOptionsPaypal struct { // The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. BillingAgreementID string `json:"billing_agreement_id"` }
type SetupIntentPaymentMethodOptionsPaypalParams ¶
type SetupIntentPaymentMethodOptionsPaypalParams struct { // The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. BillingAgreementID *string `form:"billing_agreement_id"` }
If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
type SetupIntentPaymentMethodOptionsSEPADebit ¶
type SetupIntentPaymentMethodOptionsSEPADebit struct {
MandateOptions *SetupIntentPaymentMethodOptionsSEPADebitMandateOptions `json:"mandate_options"`
}
type SetupIntentPaymentMethodOptionsSEPADebitMandateOptions ¶
type SetupIntentPaymentMethodOptionsSEPADebitMandateOptions struct{}
type SetupIntentPaymentMethodOptionsSEPADebitMandateOptionsParams ¶
type SetupIntentPaymentMethodOptionsSEPADebitMandateOptionsParams struct{}
Additional fields for Mandate creation
type SetupIntentPaymentMethodOptionsSEPADebitParams ¶
type SetupIntentPaymentMethodOptionsSEPADebitParams struct { // Additional fields for Mandate creation MandateOptions *SetupIntentPaymentMethodOptionsSEPADebitMandateOptionsParams `form:"mandate_options"` }
If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
type SetupIntentPaymentMethodOptionsUSBankAccount ¶
type SetupIntentPaymentMethodOptionsUSBankAccount struct { FinancialConnections *SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"` // Bank account verification method. VerificationMethod SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"` }
type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnections ¶
type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` // Data features requested to be retrieved upon account creation. Prefetch []SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL string `json:"return_url"` }
type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams ¶
type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. Permissions []*string `form:"permissions"` // List of data features that you would like to retrieve upon account creation. Prefetch []*string `form:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL *string `form:"return_url"` }
Additional fields for Financial Connections Session creation
type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission ¶
type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string
The list of permissions to request. The `payment_method` permission must be included.
const ( SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances" SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "ownership" SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method" SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" )
List of values that SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take
type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch ¶ added in v75.2.0
type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string
Data features requested to be retrieved upon account creation.
const (
SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances"
)
List of values that SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take
type SetupIntentPaymentMethodOptionsUSBankAccountNetworksParams ¶
type SetupIntentPaymentMethodOptionsUSBankAccountNetworksParams struct { // Triggers validations to run across the selected networks Requested []*string `form:"requested"` }
Additional fields for network related functions
type SetupIntentPaymentMethodOptionsUSBankAccountParams ¶
type SetupIntentPaymentMethodOptionsUSBankAccountParams struct { // Additional fields for Financial Connections Session creation FinancialConnections *SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"` // Additional fields for network related functions Networks *SetupIntentPaymentMethodOptionsUSBankAccountNetworksParams `form:"networks"` // Verification method for the intent VerificationMethod *string `form:"verification_method"` }
If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
type SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod ¶
type SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod string
Bank account verification method.
const ( SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic" SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethodInstant SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "instant" SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethodMicrodeposits SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "microdeposits" )
List of values that SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod can take
type SetupIntentSingleUseParams ¶
type SetupIntentSingleUseParams struct { // Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/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://stripe.com/docs/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 *int64 `form:"amount"` // 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 `form:"currency"` }
If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.
type SetupIntentStatus ¶
type SetupIntentStatus string
[Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.
const ( SetupIntentStatusCanceled SetupIntentStatus = "canceled" SetupIntentStatusProcessing SetupIntentStatus = "processing" SetupIntentStatusRequiresAction SetupIntentStatus = "requires_action" SetupIntentStatusRequiresConfirmation SetupIntentStatus = "requires_confirmation" SetupIntentStatusRequiresPaymentMethod SetupIntentStatus = "requires_payment_method" SetupIntentStatusSucceeded SetupIntentStatus = "succeeded" )
List of values that SetupIntentStatus can take
type SetupIntentUsage ¶
type SetupIntentUsage string
Indicates how the payment method is intended to be used in the future.
Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.
const ( SetupIntentUsageOffSession SetupIntentUsage = "off_session" SetupIntentUsageOnSession SetupIntentUsage = "on_session" )
List of values that SetupIntentUsage can take
type SetupIntentVerifyMicrodepositsParams ¶
type SetupIntentVerifyMicrodepositsParams struct { Params `form:"*"` // Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. Amounts []*int64 `form:"amounts"` // A six-character code starting with SM present in the microdeposit sent to the bank account. DescriptorCode *string `form:"descriptor_code"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Verifies microdeposits on a SetupIntent object.
func (*SetupIntentVerifyMicrodepositsParams) AddExpand ¶
func (p *SetupIntentVerifyMicrodepositsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ShippingDetails ¶
type ShippingDetails struct { Address *Address `json:"address"` Carrier string `json:"carrier"` Name string `json:"name"` Phone string `json:"phone"` TrackingNumber string `json:"tracking_number"` }
ShippingDetails is the structure containing shipping information.
type ShippingDetailsParams ¶
type ShippingDetailsParams struct { Address *AddressParams `form:"address"` Carrier *string `form:"carrier"` Name *string `form:"name"` Phone *string `form:"phone"` TrackingNumber *string `form:"tracking_number"` }
ShippingDetailsParams is the structure containing shipping information as parameters
type ShippingRate ¶
type ShippingRate struct { APIResource // Whether the shipping rate can be used for new purchases. Defaults to `true`. Active bool `json:"active"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. DeliveryEstimate *ShippingRateDeliveryEstimate `json:"delivery_estimate"` // The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. DisplayName string `json:"display_name"` FixedAmount *ShippingRateFixedAmount `json:"fixed_amount"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. TaxBehavior ShippingRateTaxBehavior `json:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. TaxCode *TaxCode `json:"tax_code"` // The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. Type ShippingRateType `json:"type"` }
Shipping rates describe the price of shipping presented to your customers and applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping).
func (*ShippingRate) UnmarshalJSON ¶
func (s *ShippingRate) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a ShippingRate. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type ShippingRateDeliveryEstimate ¶
type ShippingRateDeliveryEstimate struct { // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. Maximum *ShippingRateDeliveryEstimateMaximum `json:"maximum"` // The lower bound of the estimated range. If empty, represents no lower bound. Minimum *ShippingRateDeliveryEstimateMinimum `json:"minimum"` }
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
type ShippingRateDeliveryEstimateMaximum ¶
type ShippingRateDeliveryEstimateMaximum struct { // A unit of time. Unit ShippingRateDeliveryEstimateMaximumUnit `json:"unit"` // Must be greater than 0. Value int64 `json:"value"` }
The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
type ShippingRateDeliveryEstimateMaximumParams ¶
type ShippingRateDeliveryEstimateMaximumParams struct { // A unit of time. Unit *string `form:"unit"` // Must be greater than 0. Value *int64 `form:"value"` }
The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
type ShippingRateDeliveryEstimateMaximumUnit ¶
type ShippingRateDeliveryEstimateMaximumUnit string
A unit of time.
const ( ShippingRateDeliveryEstimateMaximumUnitBusinessDay ShippingRateDeliveryEstimateMaximumUnit = "business_day" ShippingRateDeliveryEstimateMaximumUnitDay ShippingRateDeliveryEstimateMaximumUnit = "day" ShippingRateDeliveryEstimateMaximumUnitHour ShippingRateDeliveryEstimateMaximumUnit = "hour" ShippingRateDeliveryEstimateMaximumUnitMonth ShippingRateDeliveryEstimateMaximumUnit = "month" ShippingRateDeliveryEstimateMaximumUnitWeek ShippingRateDeliveryEstimateMaximumUnit = "week" )
List of values that ShippingRateDeliveryEstimateMaximumUnit can take
type ShippingRateDeliveryEstimateMinimum ¶
type ShippingRateDeliveryEstimateMinimum struct { // A unit of time. Unit ShippingRateDeliveryEstimateMinimumUnit `json:"unit"` // Must be greater than 0. Value int64 `json:"value"` }
The lower bound of the estimated range. If empty, represents no lower bound.
type ShippingRateDeliveryEstimateMinimumParams ¶
type ShippingRateDeliveryEstimateMinimumParams struct { // A unit of time. Unit *string `form:"unit"` // Must be greater than 0. Value *int64 `form:"value"` }
The lower bound of the estimated range. If empty, represents no lower bound.
type ShippingRateDeliveryEstimateMinimumUnit ¶
type ShippingRateDeliveryEstimateMinimumUnit string
A unit of time.
const ( ShippingRateDeliveryEstimateMinimumUnitBusinessDay ShippingRateDeliveryEstimateMinimumUnit = "business_day" ShippingRateDeliveryEstimateMinimumUnitDay ShippingRateDeliveryEstimateMinimumUnit = "day" ShippingRateDeliveryEstimateMinimumUnitHour ShippingRateDeliveryEstimateMinimumUnit = "hour" ShippingRateDeliveryEstimateMinimumUnitMonth ShippingRateDeliveryEstimateMinimumUnit = "month" ShippingRateDeliveryEstimateMinimumUnitWeek ShippingRateDeliveryEstimateMinimumUnit = "week" )
List of values that ShippingRateDeliveryEstimateMinimumUnit can take
type ShippingRateDeliveryEstimateParams ¶
type ShippingRateDeliveryEstimateParams struct { // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. Maximum *ShippingRateDeliveryEstimateMaximumParams `form:"maximum"` // The lower bound of the estimated range. If empty, represents no lower bound. Minimum *ShippingRateDeliveryEstimateMinimumParams `form:"minimum"` }
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
type ShippingRateFixedAmount ¶
type ShippingRateFixedAmount struct { // A non-negative integer in cents representing how much to charge. Amount int64 `json:"amount"` // 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 Currency `json:"currency"` // Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*ShippingRateFixedAmountCurrencyOptions `json:"currency_options"` }
type ShippingRateFixedAmountCurrencyOptions ¶
type ShippingRateFixedAmountCurrencyOptions struct { // A non-negative integer in cents representing how much to charge. Amount int64 `json:"amount"` // Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. TaxBehavior ShippingRateFixedAmountCurrencyOptionsTaxBehavior `json:"tax_behavior"` }
Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type ShippingRateFixedAmountCurrencyOptionsParams ¶
type ShippingRateFixedAmountCurrencyOptionsParams struct { // A non-negative integer in cents representing how much to charge. Amount *int64 `form:"amount"` // Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. TaxBehavior *string `form:"tax_behavior"` }
Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type ShippingRateFixedAmountCurrencyOptionsTaxBehavior ¶
type ShippingRateFixedAmountCurrencyOptionsTaxBehavior string
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
const ( ShippingRateFixedAmountCurrencyOptionsTaxBehaviorExclusive ShippingRateFixedAmountCurrencyOptionsTaxBehavior = "exclusive" ShippingRateFixedAmountCurrencyOptionsTaxBehaviorInclusive ShippingRateFixedAmountCurrencyOptionsTaxBehavior = "inclusive" ShippingRateFixedAmountCurrencyOptionsTaxBehaviorUnspecified ShippingRateFixedAmountCurrencyOptionsTaxBehavior = "unspecified" )
List of values that ShippingRateFixedAmountCurrencyOptionsTaxBehavior can take
type ShippingRateFixedAmountParams ¶
type ShippingRateFixedAmountParams struct { // A non-negative integer in cents representing how much to charge. Amount *int64 `form:"amount"` // 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 `form:"currency"` // Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). CurrencyOptions map[string]*ShippingRateFixedAmountCurrencyOptionsParams `form:"currency_options"` }
Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
type ShippingRateList ¶
type ShippingRateList struct { APIResource ListMeta Data []*ShippingRate `json:"data"` }
ShippingRateList is a list of ShippingRates as retrieved from a list endpoint.
type ShippingRateListParams ¶
type ShippingRateListParams struct { ListParams `form:"*"` // Only return shipping rates that are active or inactive. Active *bool `form:"active"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. Created *int64 `form:"created"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. CreatedRange *RangeQueryParams `form:"created"` // Only return shipping rates for the given currency. Currency *string `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of your shipping rates.
func (*ShippingRateListParams) AddExpand ¶
func (p *ShippingRateListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type ShippingRateParams ¶
type ShippingRateParams struct { Params `form:"*"` // Whether the shipping rate can be used for new purchases. Defaults to `true`. Active *bool `form:"active"` // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. DeliveryEstimate *ShippingRateDeliveryEstimateParams `form:"delivery_estimate"` // The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. DisplayName *string `form:"display_name"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. FixedAmount *ShippingRateFixedAmountParams `form:"fixed_amount"` // 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`. Metadata map[string]string `form:"metadata"` // Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. TaxCode *string `form:"tax_code"` // The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. Type *string `form:"type"` }
Creates a new shipping rate object.
func (*ShippingRateParams) AddExpand ¶
func (p *ShippingRateParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*ShippingRateParams) AddMetadata ¶
func (p *ShippingRateParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type ShippingRateTaxBehavior ¶
type ShippingRateTaxBehavior string
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
const ( ShippingRateTaxBehaviorExclusive ShippingRateTaxBehavior = "exclusive" ShippingRateTaxBehaviorInclusive ShippingRateTaxBehavior = "inclusive" ShippingRateTaxBehaviorUnspecified ShippingRateTaxBehavior = "unspecified" )
List of values that ShippingRateTaxBehavior can take
type ShippingRateType ¶
type ShippingRateType string
The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.
const (
ShippingRateTypeFixedAmount ShippingRateType = "fixed_amount"
)
List of values that ShippingRateType can take
type SigmaScheduledQueryRun ¶
type SigmaScheduledQueryRun struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // When the query was run, Sigma contained a snapshot of your Stripe data at this time. DataLoadTime int64 `json:"data_load_time"` Error *SigmaScheduledQueryRunError `json:"error"` // The file object representing the results of the query. File *File `json:"file"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Time at which the result expires and is no longer available for download. ResultAvailableUntil int64 `json:"result_available_until"` // SQL for the query. SQL string `json:"sql"` // The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. Status SigmaScheduledQueryRunStatus `json:"status"` // Title of the query. Title string `json:"title"` }
If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll receive a `sigma.scheduled_query_run.created` webhook each time the query runs. The webhook contains a `ScheduledQueryRun` object, which you can use to retrieve the query results.
type SigmaScheduledQueryRunError ¶
type SigmaScheduledQueryRunError struct { // Information about the run failure. Message string `json:"message"` }
type SigmaScheduledQueryRunList ¶
type SigmaScheduledQueryRunList struct { APIResource ListMeta Data []*SigmaScheduledQueryRun `json:"data"` }
SigmaScheduledQueryRunList is a list of ScheduledQueryRuns as retrieved from a list endpoint.
type SigmaScheduledQueryRunListParams ¶
type SigmaScheduledQueryRunListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of scheduled query runs.
func (*SigmaScheduledQueryRunListParams) AddExpand ¶
func (p *SigmaScheduledQueryRunListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SigmaScheduledQueryRunParams ¶
type SigmaScheduledQueryRunParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of an scheduled query run.
func (*SigmaScheduledQueryRunParams) AddExpand ¶
func (p *SigmaScheduledQueryRunParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SigmaScheduledQueryRunStatus ¶
type SigmaScheduledQueryRunStatus string
The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.
const ( SigmaScheduledQueryRunStatusCanceled SigmaScheduledQueryRunStatus = "canceled" SigmaScheduledQueryRunStatusCompleted SigmaScheduledQueryRunStatus = "completed" SigmaScheduledQueryRunStatusFailed SigmaScheduledQueryRunStatus = "failed" SigmaScheduledQueryRunStatusTimedOut SigmaScheduledQueryRunStatus = "timed_out" )
List of values that SigmaScheduledQueryRunStatus can take
type Source ¶
type Source struct { APIResource ACHCreditTransfer *SourceACHCreditTransfer `json:"ach_credit_transfer"` ACHDebit *SourceACHDebit `json:"ach_debit"` ACSSDebit *SourceACSSDebit `json:"acss_debit"` Alipay *SourceAlipay `json:"alipay"` // A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Amount int64 `json:"amount"` AUBECSDebit *SourceAUBECSDebit `json:"au_becs_debit"` Bancontact *SourceBancontact `json:"bancontact"` Card *SourceCard `json:"card"` CardPresent *SourceCardPresent `json:"card_present"` // The client secret of the source. Used for client-side retrieval using a publishable key. ClientSecret string `json:"client_secret"` CodeVerification *SourceCodeVerification `json:"code_verification"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. Currency Currency `json:"currency"` // The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. Customer string `json:"customer"` EPS *SourceEPS `json:"eps"` // The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. Flow SourceFlow `json:"flow"` Giropay *SourceGiropay `json:"giropay"` // Unique identifier for the object. ID string `json:"id"` IDEAL *SourceIDEAL `json:"ideal"` Klarna *SourceKlarna `json:"klarna"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` Multibanco *SourceMultibanco `json:"multibanco"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Information about the owner of the payment instrument that may be used or required by particular source types. Owner *SourceOwner `json:"owner"` P24 *SourceP24 `json:"p24"` Receiver *SourceReceiver `json:"receiver"` Redirect *SourceRedirect `json:"redirect"` SEPACreditTransfer *SourceSEPACreditTransfer `json:"sepa_credit_transfer"` SEPADebit *SourceSEPADebit `json:"sepa_debit"` Sofort *SourceSofort `json:"sofort"` SourceOrder *SourceSourceOrder `json:"source_order"` // Extra information about a source. This will appear on your customer's statement every time you charge the source. StatementDescriptor string `json:"statement_descriptor"` // The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. Status SourceStatus `json:"status"` ThreeDSecure *SourceThreeDSecure `json:"three_d_secure"` // The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. Type string `json:"type"` // Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. Usage SourceUsage `json:"usage"` WeChat *SourceWeChat `json:"wechat"` }
`Source` objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like a `Card` object: once chargeable, they can be charged, or can be attached to customers.
Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). This newer API provides access to our latest features and payment method types.
Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).
type SourceACHCreditTransfer ¶
type SourceACHCreditTransfer struct { AccountNumber string `json:"account_number"` BankName string `json:"bank_name"` Fingerprint string `json:"fingerprint"` RefundAccountHolderName string `json:"refund_account_holder_name"` RefundAccountHolderType string `json:"refund_account_holder_type"` RefundRoutingNumber string `json:"refund_routing_number"` RoutingNumber string `json:"routing_number"` SwiftCode string `json:"swift_code"` }
type SourceACHDebit ¶
type SourceACSSDebit ¶
type SourceACSSDebit struct { BankAddressCity string `json:"bank_address_city"` BankAddressLine1 string `json:"bank_address_line_1"` BankAddressLine2 string `json:"bank_address_line_2"` BankAddressPostalCode string `json:"bank_address_postal_code"` BankName string `json:"bank_name"` Category string `json:"category"` Country string `json:"country"` Fingerprint string `json:"fingerprint"` Last4 string `json:"last4"` RoutingNumber string `json:"routing_number"` }
type SourceAUBECSDebit ¶
type SourceAlipay ¶
type SourceBancontact ¶
type SourceCard ¶
type SourceCard struct { AddressLine1Check string `json:"address_line1_check"` AddressZipCheck string `json:"address_zip_check"` Brand string `json:"brand"` Country string `json:"country"` CVCCheck string `json:"cvc_check"` Description string `json:"description"` DynamicLast4 string `json:"dynamic_last4"` ExpMonth int64 `json:"exp_month"` ExpYear int64 `json:"exp_year"` Fingerprint string `json:"fingerprint"` Funding string `json:"funding"` IIN string `json:"iin"` Issuer string `json:"issuer"` Last4 string `json:"last4"` Name string `json:"name"` ThreeDSecure string `json:"three_d_secure"` TokenizationMethod string `json:"tokenization_method"` }
type SourceCardPresent ¶
type SourceCardPresent struct { ApplicationCryptogram string `json:"application_cryptogram"` ApplicationPreferredName string `json:"application_preferred_name"` AuthorizationCode string `json:"authorization_code"` AuthorizationResponseCode string `json:"authorization_response_code"` Brand string `json:"brand"` Country string `json:"country"` CVMType string `json:"cvm_type"` DataType string `json:"data_type"` DedicatedFileName string `json:"dedicated_file_name"` Description string `json:"description"` EmvAuthData string `json:"emv_auth_data"` EvidenceCustomerSignature string `json:"evidence_customer_signature"` EvidenceTransactionCertificate string `json:"evidence_transaction_certificate"` ExpMonth int64 `json:"exp_month"` ExpYear int64 `json:"exp_year"` Fingerprint string `json:"fingerprint"` Funding string `json:"funding"` IIN string `json:"iin"` Issuer string `json:"issuer"` Last4 string `json:"last4"` POSDeviceID string `json:"pos_device_id"` POSEntryMode string `json:"pos_entry_mode"` Reader string `json:"reader"` ReadMethod string `json:"read_method"` TerminalVerificationResults string `json:"terminal_verification_results"` TransactionStatusInformation string `json:"transaction_status_information"` }
type SourceCodeVerification ¶
type SourceCodeVerification struct { // The number of attempts remaining to authenticate the source object with a verification code. AttemptsRemaining int64 `json:"attempts_remaining"` // The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). Status SourceCodeVerificationStatus `json:"status"` }
type SourceCodeVerificationStatus ¶
type SourceCodeVerificationStatus string
The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).
const ( SourceCodeVerificationStatusFailed SourceCodeVerificationStatus = "failed" SourceCodeVerificationStatusPending SourceCodeVerificationStatus = "pending" SourceCodeVerificationStatusSucceeded SourceCodeVerificationStatus = "succeeded" )
List of values that SourceCodeVerificationStatus can take
type SourceDetachParams ¶
type SourceDetachParams struct { Params `form:"*"` Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Delete a specified source for a given customer.
func (*SourceDetachParams) AddExpand ¶
func (p *SourceDetachParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SourceFlow ¶
type SourceFlow string
The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.
const ( SourceFlowCodeVerification SourceFlow = "code_verification" SourceFlowNone SourceFlow = "none" SourceFlowReceiver SourceFlow = "receiver" SourceFlowRedirect SourceFlow = "redirect" )
List of values that SourceFlow can take
type SourceGiropay ¶
type SourceIDEAL ¶
type SourceKlarna ¶
type SourceKlarna struct { BackgroundImageURL string `json:"background_image_url"` ClientToken string `json:"client_token"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Locale string `json:"locale"` LogoURL string `json:"logo_url"` PageTitle string `json:"page_title"` PayLaterAssetURLsDescriptive string `json:"pay_later_asset_urls_descriptive"` PayLaterAssetURLsStandard string `json:"pay_later_asset_urls_standard"` PayLaterName string `json:"pay_later_name"` PayLaterRedirectURL string `json:"pay_later_redirect_url"` PaymentMethodCategories string `json:"payment_method_categories"` PayNowAssetURLsDescriptive string `json:"pay_now_asset_urls_descriptive"` PayNowAssetURLsStandard string `json:"pay_now_asset_urls_standard"` PayNowName string `json:"pay_now_name"` PayNowRedirectURL string `json:"pay_now_redirect_url"` PayOverTimeAssetURLsDescriptive string `json:"pay_over_time_asset_urls_descriptive"` PayOverTimeAssetURLsStandard string `json:"pay_over_time_asset_urls_standard"` PayOverTimeName string `json:"pay_over_time_name"` PayOverTimeRedirectURL string `json:"pay_over_time_redirect_url"` PurchaseCountry string `json:"purchase_country"` PurchaseType string `json:"purchase_type"` RedirectURL string `json:"redirect_url"` ShippingDelay int64 `json:"shipping_delay"` ShippingFirstName string `json:"shipping_first_name"` ShippingLastName string `json:"shipping_last_name"` }
type SourceMandateAcceptanceOfflineParams ¶
type SourceMandateAcceptanceOfflineParams struct { // An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. ContactEmail *string `form:"contact_email"` }
The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
type SourceMandateAcceptanceOnlineParams ¶
type SourceMandateAcceptanceOnlineParams struct { // The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. Date *int64 `form:"date"` // The IP address from which the mandate was accepted or refused by the customer. IP *string `form:"ip"` // The user agent of the browser from which the mandate was accepted or refused by the customer. UserAgent *string `form:"user_agent"` }
The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
type SourceMandateAcceptanceParams ¶
type SourceMandateAcceptanceParams struct { // The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. Date *int64 `form:"date"` // The IP address from which the mandate was accepted or refused by the customer. IP *string `form:"ip"` // The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` Offline *SourceMandateAcceptanceOfflineParams `form:"offline"` // The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` Online *SourceMandateAcceptanceOnlineParams `form:"online"` // The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). Status *string `form:"status"` // The type of acceptance information included with the mandate. Either `online` or `offline` Type *string `form:"type"` // The user agent of the browser from which the mandate was accepted or refused by the customer. UserAgent *string `form:"user_agent"` }
The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
type SourceMandateParams ¶
type SourceMandateParams struct { // The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. Acceptance *SourceMandateAcceptanceParams `form:"acceptance"` // The amount specified by the mandate. (Leave null for a mandate covering all amounts) Amount *int64 `form:"amount"` // The currency specified by the mandate. (Must match `currency` of the source) Currency *string `form:"currency"` // The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) Interval *string `form:"interval"` // The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). NotificationMethod *string `form:"notification_method"` }
Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
type SourceMultibanco ¶
type SourceMultibanco struct { Entity string `json:"entity"` Reference string `json:"reference"` RefundAccountHolderAddressCity string `json:"refund_account_holder_address_city"` RefundAccountHolderAddressCountry string `json:"refund_account_holder_address_country"` RefundAccountHolderAddressLine1 string `json:"refund_account_holder_address_line1"` RefundAccountHolderAddressLine2 string `json:"refund_account_holder_address_line2"` RefundAccountHolderAddressPostalCode string `json:"refund_account_holder_address_postal_code"` RefundAccountHolderAddressState string `json:"refund_account_holder_address_state"` RefundAccountHolderName string `json:"refund_account_holder_name"` RefundIBAN string `json:"refund_iban"` }
type SourceOwner ¶
type SourceOwner struct { // Owner's address. Address *Address `json:"address"` // Owner's email address. Email string `json:"email"` // Owner's full name. Name string `json:"name"` // Owner's phone number (including extension). Phone string `json:"phone"` // Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. VerifiedAddress *Address `json:"verified_address"` // Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. VerifiedEmail string `json:"verified_email"` // Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. VerifiedName string `json:"verified_name"` // Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. VerifiedPhone string `json:"verified_phone"` }
Information about the owner of the payment instrument that may be used or required by particular source types.
type SourceOwnerParams ¶
type SourceOwnerParams struct { // Owner's address. Address *AddressParams `form:"address"` // Owner's email address. Email *string `form:"email"` // Owner's full name. Name *string `form:"name"` // Owner's phone number. Phone *string `form:"phone"` }
Information about the owner of the payment instrument that may be used or required by particular source types.
type SourceParams ¶
type SourceParams struct { Params `form:"*"` // Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. Amount *int64 `form:"amount"` // The client secret of the source. Required if a publishable key is used to retrieve the source. ClientSecret *string `form:"client_secret"` // Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Currency *string `form:"currency"` // The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. Flow *string `form:"flow"` // Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. Mandate *SourceMandateParams `form:"mandate"` // 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`. Metadata map[string]string `form:"metadata"` // The source to share. OriginalSource *string `form:"original_source"` // Information about the owner of the payment instrument that may be used or required by particular source types. Owner *SourceOwnerParams `form:"owner"` // Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). Receiver *SourceReceiverParams `form:"receiver"` // Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). Redirect *SourceRedirectParams `form:"redirect"` // Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. SourceOrder *SourceSourceOrderParams `form:"source_order"` // An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. StatementDescriptor *string `form:"statement_descriptor"` // An optional token used to create the source. When passed, token properties will override source parameters. Token *string `form:"token"` // The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) Type *string `form:"type"` Usage *string `form:"usage"` }
Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.
func (*SourceParams) AddExpand ¶
func (p *SourceParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*SourceParams) AddMetadata ¶
func (p *SourceParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type SourceReceiver ¶
type SourceReceiver struct { // The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. Address string `json:"address"` // The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. AmountCharged int64 `json:"amount_charged"` // The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. AmountReceived int64 `json:"amount_received"` // The total amount that was returned to the customer. The amount returned is expressed in the source's currency. AmountReturned int64 `json:"amount_returned"` // Type of refund attribute method, one of `email`, `manual`, or `none`. RefundAttributesMethod SourceReceiverRefundAttributesMethod `json:"refund_attributes_method"` // Type of refund attribute status, one of `missing`, `requested`, or `available`. RefundAttributesStatus SourceReceiverRefundAttributesStatus `json:"refund_attributes_status"` }
type SourceReceiverParams ¶
type SourceReceiverParams struct { // The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. RefundAttributesMethod *string `form:"refund_attributes_method"` }
Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).
type SourceReceiverRefundAttributesMethod ¶
type SourceReceiverRefundAttributesMethod string
Type of refund attribute method, one of `email`, `manual`, or `none`.
const ( SourceReceiverRefundAttributesMethodEmail SourceReceiverRefundAttributesMethod = "email" SourceReceiverRefundAttributesMethodManual SourceReceiverRefundAttributesMethod = "manual" SourceReceiverRefundAttributesMethodNone SourceReceiverRefundAttributesMethod = "none" )
List of values that SourceReceiverRefundAttributesMethod can take
type SourceReceiverRefundAttributesStatus ¶
type SourceReceiverRefundAttributesStatus string
Type of refund attribute status, one of `missing`, `requested`, or `available`.
const ( SourceReceiverRefundAttributesStatusAvailable SourceReceiverRefundAttributesStatus = "available" SourceReceiverRefundAttributesStatusMissing SourceReceiverRefundAttributesStatus = "missing" SourceReceiverRefundAttributesStatusRequested SourceReceiverRefundAttributesStatus = "requested" )
List of values that SourceReceiverRefundAttributesStatus can take
type SourceRedirect ¶
type SourceRedirect struct { // The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. FailureReason SourceRedirectFailureReason `json:"failure_reason"` // The URL you provide to redirect the customer to after they authenticated their payment. ReturnURL string `json:"return_url"` // The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). Status SourceRedirectStatus `json:"status"` // The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. URL string `json:"url"` }
type SourceRedirectFailureReason ¶
type SourceRedirectFailureReason string
The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`.
const ( SourceRedirectFailureReasonDeclined SourceRedirectFailureReason = "declined" SourceRedirectFailureReasonProcessingError SourceRedirectFailureReason = "processing_error" SourceRedirectFailureReasonUserAbort SourceRedirectFailureReason = "user_abort" )
List of values that SourceRedirectFailureReason can take
type SourceRedirectParams ¶
type SourceRedirectParams struct { // The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application. ReturnURL *string `form:"return_url"` }
Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).
type SourceRedirectStatus ¶
type SourceRedirectStatus string
The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).
const ( SourceRedirectStatusFailed SourceRedirectStatus = "failed" SourceRedirectStatusNotRequired SourceRedirectStatus = "not_required" SourceRedirectStatusPending SourceRedirectStatus = "pending" SourceRedirectStatusSucceeded SourceRedirectStatus = "succeeded" )
List of values that SourceRedirectStatus can take
type SourceSEPACreditTransfer ¶
type SourceSEPACreditTransfer struct { BankName string `json:"bank_name"` BIC string `json:"bic"` IBAN string `json:"iban"` RefundAccountHolderAddressCity string `json:"refund_account_holder_address_city"` RefundAccountHolderAddressCountry string `json:"refund_account_holder_address_country"` RefundAccountHolderAddressLine1 string `json:"refund_account_holder_address_line1"` RefundAccountHolderAddressLine2 string `json:"refund_account_holder_address_line2"` RefundAccountHolderAddressPostalCode string `json:"refund_account_holder_address_postal_code"` RefundAccountHolderAddressState string `json:"refund_account_holder_address_state"` RefundAccountHolderName string `json:"refund_account_holder_name"` RefundIBAN string `json:"refund_iban"` }
type SourceSEPADebit ¶
type SourceSofort ¶
type SourceSofort struct { BankCode string `json:"bank_code"` BankName string `json:"bank_name"` BIC string `json:"bic"` Country string `json:"country"` IBANLast4 string `json:"iban_last4"` PreferredLanguage string `json:"preferred_language"` StatementDescriptor string `json:"statement_descriptor"` }
type SourceSourceOrder ¶
type SourceSourceOrder struct { // A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. Amount int64 `json:"amount"` // 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 Currency `json:"currency"` // The email address of the customer placing the order. Email string `json:"email"` // List of items constituting the order. Items []*SourceSourceOrderItem `json:"items"` Shipping ShippingDetails `json:"shipping"` }
type SourceSourceOrderItem ¶
type SourceSourceOrderItem struct { // The amount (price) for this order item. Amount int64 `json:"amount"` // This currency of this order item. Required when `amount` is present. Currency Currency `json:"currency"` // Human-readable description for this order item. Description string `json:"description"` // The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). Parent string `json:"parent"` // The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. Quantity int64 `json:"quantity"` // The type of this order item. Must be `sku`, `tax`, or `shipping`. Type SourceSourceOrderItemType `json:"type"` }
List of items constituting the order.
type SourceSourceOrderItemParams ¶
type SourceSourceOrderItemParams struct { Amount *int64 `form:"amount"` Currency *string `form:"currency"` Description *string `form:"description"` // The ID of the SKU being ordered. Parent *string `form:"parent"` // The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. Quantity *int64 `form:"quantity"` Type *string `form:"type"` }
List of items constituting the order.
type SourceSourceOrderItemType ¶
type SourceSourceOrderItemType string
The type of this order item. Must be `sku`, `tax`, or `shipping`.
const ( SourceSourceOrderItemTypeDiscount SourceSourceOrderItemType = "discount" SourceSourceOrderItemTypeSKU SourceSourceOrderItemType = "sku" SourceSourceOrderItemTypeShipping SourceSourceOrderItemType = "shipping" SourceSourceOrderItemTypeTax SourceSourceOrderItemType = "tax" )
List of values that SourceSourceOrderItemType can take
type SourceSourceOrderParams ¶
type SourceSourceOrderParams struct { // List of items constituting the order. Items []*SourceSourceOrderItemParams `form:"items"` // Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. Shipping *ShippingDetailsParams `form:"shipping"` }
Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
type SourceStatus ¶
type SourceStatus string
The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.
const ( SourceStatusCanceled SourceStatus = "canceled" SourceStatusChargeable SourceStatus = "chargeable" SourceStatusConsumed SourceStatus = "consumed" SourceStatusFailed SourceStatus = "failed" SourceStatusPending SourceStatus = "pending" )
List of values that SourceStatus can take
type SourceThreeDSecure ¶
type SourceThreeDSecure struct { AddressLine1Check string `json:"address_line1_check"` AddressZipCheck string `json:"address_zip_check"` Authenticated bool `json:"authenticated"` Brand string `json:"brand"` Card string `json:"card"` Country string `json:"country"` Customer string `json:"customer"` CVCCheck string `json:"cvc_check"` Description string `json:"description"` DynamicLast4 string `json:"dynamic_last4"` ExpMonth int64 `json:"exp_month"` ExpYear int64 `json:"exp_year"` Fingerprint string `json:"fingerprint"` Funding string `json:"funding"` IIN string `json:"iin"` Issuer string `json:"issuer"` Last4 string `json:"last4"` Name string `json:"name"` ThreeDSecure string `json:"three_d_secure"` TokenizationMethod string `json:"tokenization_method"` }
type SourceTransaction ¶
type SourceTransaction struct { ACHCreditTransfer *SourceTransactionACHCreditTransfer `json:"ach_credit_transfer"` // A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. Amount int64 `json:"amount"` CHFCreditTransfer *SourceTransactionCHFCreditTransfer `json:"chf_credit_transfer"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` GBPCreditTransfer *SourceTransactionGBPCreditTransfer `json:"gbp_credit_transfer"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` PaperCheck *SourceTransactionPaperCheck `json:"paper_check"` SEPACreditTransfer *SourceTransactionSEPACreditTransfer `json:"sepa_credit_transfer"` // The ID of the source this transaction is attached to. Source string `json:"source"` // The status of the transaction, one of `succeeded`, `pending`, or `failed`. Status string `json:"status"` // The type of source this transaction is attached to. Type string `json:"type"` }
Some payment methods have no required amount that a customer must send. Customers can be instructed to send any amount, and it can be made up of multiple transactions. As such, sources can have multiple associated transactions.
type SourceTransactionACHCreditTransfer ¶
type SourceTransactionACHCreditTransfer struct { // Customer data associated with the transfer. CustomerData string `json:"customer_data"` // Bank account fingerprint associated with the transfer. Fingerprint string `json:"fingerprint"` // Last 4 digits of the account number associated with the transfer. Last4 string `json:"last4"` // Routing number associated with the transfer. RoutingNumber string `json:"routing_number"` }
type SourceTransactionCHFCreditTransfer ¶
type SourceTransactionCHFCreditTransfer struct { // Reference associated with the transfer. Reference string `json:"reference"` // Sender's country address. SenderAddressCountry string `json:"sender_address_country"` // Sender's line 1 address. SenderAddressLine1 string `json:"sender_address_line1"` // Sender's bank account IBAN. SenderIBAN string `json:"sender_iban"` // Sender's name. SenderName string `json:"sender_name"` }
type SourceTransactionGBPCreditTransfer ¶
type SourceTransactionGBPCreditTransfer struct { // Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. Fingerprint string `json:"fingerprint"` // The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. FundingMethod string `json:"funding_method"` // Last 4 digits of sender account number associated with the transfer. Last4 string `json:"last4"` // Sender entered arbitrary information about the transfer. Reference string `json:"reference"` // Sender account number associated with the transfer. SenderAccountNumber string `json:"sender_account_number"` // Sender name associated with the transfer. SenderName string `json:"sender_name"` // Sender sort code associated with the transfer. SenderSortCode string `json:"sender_sort_code"` }
type SourceTransactionList ¶
type SourceTransactionList struct { APIResource ListMeta Data []*SourceTransaction `json:"data"` }
SourceTransactionList is a list of SourceTransactions as retrieved from a list endpoint.
type SourceTransactionListParams ¶
type SourceTransactionListParams struct { ListParams `form:"*"` Source *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
List source transactions for a given source.
func (*SourceTransactionListParams) AddExpand ¶
func (p *SourceTransactionListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SourceUsage ¶
type SourceUsage string
Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
const ( SourceUsageReusable SourceUsage = "reusable" SourceUsageSingleUse SourceUsage = "single_use" )
List of values that SourceUsage can take
type SourceWeChat ¶
type StreamingAPIResponse ¶
type StreamingAPIResponse struct { Header http.Header IdempotencyKey string Body io.ReadCloser RequestID string Status string StatusCode int }
StreamingAPIResponse encapsulates some common features of a response from the Stripe API whose body can be streamed. This is used for "file downloads", and the `Body` property is an io.ReadCloser, so the user can stream it to another location such as a file or network request without buffering the entire body into memory.
type StreamingLastResponseSetter ¶
type StreamingLastResponseSetter interface {
SetLastResponse(response *StreamingAPIResponse)
}
StreamingLastResponseSetter defines a type that contains an HTTP response from a Stripe API endpoint.
type Subscription ¶
type Subscription struct { APIResource // ID of the Connect Application that created the subscription. Application *Application `json:"application"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. ApplicationFeePercent float64 `json:"application_fee_percent"` AutomaticTax *SubscriptionAutomaticTax `json:"automatic_tax"` // Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. BillingCycleAnchor int64 `json:"billing_cycle_anchor"` // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"` // A date in the future at which the subscription will automatically get canceled CancelAt int64 `json:"cancel_at"` // If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. CancelAtPeriodEnd bool `json:"cancel_at_period_end"` // If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. CanceledAt int64 `json:"canceled_at"` // Details about why this subscription was cancelled CancellationDetails *SubscriptionCancellationDetails `json:"cancellation_details"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. CollectionMethod SubscriptionCollectionMethod `json:"collection_method"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. CurrentPeriodEnd int64 `json:"current_period_end"` // Start of the current period that the subscription has been invoiced for. CurrentPeriodStart int64 `json:"current_period_start"` // ID of the customer who owns the subscription. Customer *Customer `json:"customer"` // Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. DaysUntilDue int64 `json:"days_until_due"` // ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"` // ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). DefaultSource *PaymentSource `json:"default_source"` // The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. DefaultTaxRates []*TaxRate `json:"default_tax_rates"` // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. Description string `json:"description"` // Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. Discount *Discount `json:"discount"` // If the subscription has ended, the date the subscription ended. EndedAt int64 `json:"ended_at"` // Unique identifier for the object. ID string `json:"id"` // List of subscription items, each with an attached price. Items *SubscriptionItemList `json:"items"` // The most recent invoice this subscription has generated. LatestInvoice *Invoice `json:"latest_invoice"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. NextPendingInvoiceItemInvoice int64 `json:"next_pending_invoice_item_invoice"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. OnBehalfOf *Account `json:"on_behalf_of"` // If specified, payment collection for this subscription will be paused. PauseCollection *SubscriptionPauseCollection `json:"pause_collection"` // Payment settings passed on to invoices created by the subscription. PaymentSettings *SubscriptionPaymentSettings `json:"payment_settings"` // Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. PendingInvoiceItemInterval *SubscriptionPendingInvoiceItemInterval `json:"pending_invoice_item_interval"` // You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). PendingSetupIntent *SetupIntent `json:"pending_setup_intent"` // If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. PendingUpdate *SubscriptionPendingUpdate `json:"pending_update"` // The schedule attached to the subscription Schedule *SubscriptionSchedule `json:"schedule"` // Date when the subscription was first created. The date might differ from the `created` date due to backdating. StartDate int64 `json:"start_date"` // Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. // // For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated. // // A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. // // If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). // // If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. Status SubscriptionStatus `json:"status"` // ID of the test clock this subscription belongs to. TestClock *TestHelpersTestClock `json:"test_clock"` // 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. TransferData *SubscriptionTransferData `json:"transfer_data"` // If the subscription has a trial, the end of that trial. TrialEnd int64 `json:"trial_end"` // Settings related to subscription trials. TrialSettings *SubscriptionTrialSettings `json:"trial_settings"` // If the subscription has a trial, the beginning of that trial. TrialStart int64 `json:"trial_start"` }
Subscriptions allow you to charge a customer on a recurring basis.
Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating)
func (*Subscription) UnmarshalJSON ¶
func (s *Subscription) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a Subscription. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type SubscriptionAddInvoiceItemParams ¶
type SubscriptionAddInvoiceItemParams struct { // The ID of the price object. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. PriceData *InvoiceItemPriceDataParams `form:"price_data"` // Quantity for this item. Defaults to 1. Quantity *int64 `form:"quantity"` // The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. TaxRates []*string `form:"tax_rates"` }
A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
type SubscriptionAutomaticTax ¶
type SubscriptionAutomaticTax struct { // Whether Stripe automatically computes tax on this subscription. Enabled bool `json:"enabled"` }
type SubscriptionAutomaticTaxParams ¶
type SubscriptionAutomaticTaxParams struct { // Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. Enabled *bool `form:"enabled"` }
Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
type SubscriptionBillingThresholds ¶
type SubscriptionBillingThresholds struct { // Monetary threshold that triggers the subscription to create an invoice AmountGTE int64 `json:"amount_gte"` // Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. ResetBillingCycleAnchor bool `json:"reset_billing_cycle_anchor"` }
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
type SubscriptionBillingThresholdsParams ¶
type SubscriptionBillingThresholdsParams struct { // Monetary threshold that triggers the subscription to advance to a new billing period AmountGTE *int64 `form:"amount_gte"` // Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. ResetBillingCycleAnchor *bool `form:"reset_billing_cycle_anchor"` }
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
type SubscriptionCancelCancellationDetailsParams ¶
type SubscriptionCancelCancellationDetailsParams struct { // Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. Comment *string `form:"comment"` // The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. Feedback *string `form:"feedback"` }
Details about why this subscription was cancelled
type SubscriptionCancelParams ¶
type SubscriptionCancelParams struct { Params `form:"*"` // Details about why this subscription was cancelled CancellationDetails *SubscriptionCancelCancellationDetailsParams `form:"cancellation_details"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. InvoiceNow *bool `form:"invoice_now"` // Will generate a proration invoice item that credits remaining unused time until the subscription period end. Prorate *bool `form:"prorate"` }
Cancels a customer's subscription immediately. The customer will not be charged again for the subscription.
Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.
By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
func (*SubscriptionCancelParams) AddExpand ¶
func (p *SubscriptionCancelParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SubscriptionCancellationDetails ¶
type SubscriptionCancellationDetails struct { // Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. Comment string `json:"comment"` // The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. Feedback SubscriptionCancellationDetailsFeedback `json:"feedback"` // Why this subscription was canceled. Reason SubscriptionCancellationDetailsReason `json:"reason"` }
Details about why this subscription was cancelled
type SubscriptionCancellationDetailsFeedback ¶
type SubscriptionCancellationDetailsFeedback string
The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
const ( SubscriptionCancellationDetailsFeedbackCustomerService SubscriptionCancellationDetailsFeedback = "customer_service" SubscriptionCancellationDetailsFeedbackLowQuality SubscriptionCancellationDetailsFeedback = "low_quality" SubscriptionCancellationDetailsFeedbackMissingFeatures SubscriptionCancellationDetailsFeedback = "missing_features" SubscriptionCancellationDetailsFeedbackOther SubscriptionCancellationDetailsFeedback = "other" SubscriptionCancellationDetailsFeedbackSwitchedService SubscriptionCancellationDetailsFeedback = "switched_service" SubscriptionCancellationDetailsFeedbackTooComplex SubscriptionCancellationDetailsFeedback = "too_complex" SubscriptionCancellationDetailsFeedbackTooExpensive SubscriptionCancellationDetailsFeedback = "too_expensive" SubscriptionCancellationDetailsFeedbackUnused SubscriptionCancellationDetailsFeedback = "unused" )
List of values that SubscriptionCancellationDetailsFeedback can take
type SubscriptionCancellationDetailsParams ¶
type SubscriptionCancellationDetailsParams struct { // Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. Comment *string `form:"comment"` // The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. Feedback *string `form:"feedback"` }
Details about why this subscription was cancelled
type SubscriptionCancellationDetailsReason ¶
type SubscriptionCancellationDetailsReason string
Why this subscription was canceled.
const ( SubscriptionCancellationDetailsReasonCancellationRequested SubscriptionCancellationDetailsReason = "cancellation_requested" SubscriptionCancellationDetailsReasonPaymentDisputed SubscriptionCancellationDetailsReason = "payment_disputed" SubscriptionCancellationDetailsReasonPaymentFailed SubscriptionCancellationDetailsReason = "payment_failed" )
List of values that SubscriptionCancellationDetailsReason can take
type SubscriptionCollectionMethod ¶
type SubscriptionCollectionMethod string
Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
const ( SubscriptionCollectionMethodChargeAutomatically SubscriptionCollectionMethod = "charge_automatically" SubscriptionCollectionMethodSendInvoice SubscriptionCollectionMethod = "send_invoice" )
List of values that SubscriptionCollectionMethod can take
type SubscriptionDeleteDiscountParams ¶
type SubscriptionDeleteDiscountParams struct {
Params `form:"*"`
}
Removes the currently applied discount on a subscription.
type SubscriptionItem ¶
type SubscriptionItem struct { APIResource // Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period BillingThresholds *SubscriptionItemBillingThresholds `json:"billing_thresholds"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` Deleted bool `json:"deleted"` // Unique identifier for the object. ID string `json:"id"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. // // Plans define the base price, currency, and billing cycle for recurring purchases of products. // [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. // // 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/products-prices/overview). Plan *Plan `json:"plan"` // Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. // [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. // // For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. // // Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). Price *Price `json:"price"` // The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. Quantity int64 `json:"quantity"` // The `subscription` this `subscription_item` belongs to. Subscription string `json:"subscription"` // The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. TaxRates []*TaxRate `json:"tax_rates"` }
Subscription items allow you to create customer subscriptions with more than one plan, making it easy to represent complex billing relationships.
func (*SubscriptionItem) UnmarshalJSON ¶
func (s *SubscriptionItem) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a SubscriptionItem. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type SubscriptionItemBillingThresholds ¶
type SubscriptionItemBillingThresholds struct { // Usage threshold that triggers the subscription to create an invoice UsageGTE int64 `json:"usage_gte"` }
Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
type SubscriptionItemBillingThresholdsParams ¶
type SubscriptionItemBillingThresholdsParams struct { // Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) UsageGTE *int64 `form:"usage_gte"` }
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
type SubscriptionItemList ¶
type SubscriptionItemList struct { APIResource ListMeta Data []*SubscriptionItem `json:"data"` }
SubscriptionItemList is a list of SubscriptionItems as retrieved from a list endpoint.
type SubscriptionItemListParams ¶
type SubscriptionItemListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The ID of the subscription whose items will be retrieved. Subscription *string `form:"subscription"` }
Returns a list of your subscription items for a given subscription.
func (*SubscriptionItemListParams) AddExpand ¶
func (p *SubscriptionItemListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SubscriptionItemParams ¶
type SubscriptionItemParams struct { Params `form:"*"` // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"` // Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. ClearUsage *bool `form:"clear_usage"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // Only supported on update // Indicates if a customer is on or off-session while an invoice payment is attempted. OffSession *bool `form:"off_session"` // Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. // // Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. // // Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). // // Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. PaymentBehavior *string `form:"payment_behavior"` // The identifier of the new plan for this subscription item. Plan *string `form:"plan"` // The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. PriceData *SubscriptionItemPriceDataParams `form:"price_data"` // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. ProrationBehavior *string `form:"proration_behavior"` // If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. ProrationDate *int64 `form:"proration_date"` // The quantity you'd like to apply to the subscription item you're creating. Quantity *int64 `form:"quantity"` // The identifier of the subscription to modify. Subscription *string `form:"subscription"` // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. TaxRates []*string `form:"tax_rates"` }
Adds a new item to an existing subscription. No existing items will be changed or replaced.
func (*SubscriptionItemParams) AddExpand ¶
func (p *SubscriptionItemParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*SubscriptionItemParams) AddMetadata ¶
func (p *SubscriptionItemParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type SubscriptionItemPriceDataParams ¶
type SubscriptionItemPriceDataParams struct { // 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 `form:"currency"` // The ID of the product that this price will belong to. Product *string `form:"product"` // The recurring components of a price such as `interval` and `interval_count`. Recurring *SubscriptionItemPriceDataRecurringParams `form:"recurring"` // Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. TaxBehavior *string `form:"tax_behavior"` // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. UnitAmount *int64 `form:"unit_amount"` // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline.
type SubscriptionItemPriceDataRecurringParams ¶
type SubscriptionItemPriceDataRecurringParams struct { // Specifies billing frequency. Either `day`, `week`, `month` or `year`. Interval *string `form:"interval"` // The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). IntervalCount *int64 `form:"interval_count"` }
The recurring components of a price such as `interval` and `interval_count`.
type SubscriptionItemUsageRecordSummariesParams ¶
type SubscriptionItemUsageRecordSummariesParams struct { ListParams `form:"*"` SubscriptionItem *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that's been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).
The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn't ended yet. Since new usage records can still be added, the returned summary information for the subscription item's ID should be seen as unstable until the subscription billing period ends.
func (*SubscriptionItemUsageRecordSummariesParams) AddExpand ¶
func (p *SubscriptionItemUsageRecordSummariesParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SubscriptionItemsParams ¶
type SubscriptionItemsParams struct { Params `form:"*"` // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"` // Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. ClearUsage *bool `form:"clear_usage"` // A flag that, if set to `true`, will delete the specified item. Deleted *bool `form:"deleted"` // Subscription item to update. ID *string `form:"id"` // 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`. Metadata map[string]string `form:"metadata"` // Plan ID for this item, as a string. Plan *string `form:"plan"` // The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. PriceData *SubscriptionItemPriceDataParams `form:"price_data"` // Quantity for this item. Quantity *int64 `form:"quantity"` // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. TaxRates []*string `form:"tax_rates"` }
A list of up to 20 subscription items, each with an attached price.
func (*SubscriptionItemsParams) AddMetadata ¶
func (p *SubscriptionItemsParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type SubscriptionList ¶
type SubscriptionList struct { APIResource ListMeta Data []*Subscription `json:"data"` }
SubscriptionList is a list of Subscriptions as retrieved from a list endpoint.
type SubscriptionListAutomaticTaxParams ¶
type SubscriptionListAutomaticTaxParams struct { // Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. Enabled *bool `form:"enabled"` }
Filter subscriptions by their automatic tax settings.
type SubscriptionListParams ¶
type SubscriptionListParams struct { ListParams `form:"*"` // Filter subscriptions by their automatic tax settings. AutomaticTax *SubscriptionListAutomaticTaxParams `form:"automatic_tax"` // The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. CollectionMethod *string `form:"collection_method"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` CurrentPeriodEnd *int64 `form:"current_period_end"` CurrentPeriodEndRange *RangeQueryParams `form:"current_period_end"` CurrentPeriodStart *int64 `form:"current_period_start"` CurrentPeriodStartRange *RangeQueryParams `form:"current_period_start"` // The ID of the customer whose subscriptions will be retrieved. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The ID of the plan whose subscriptions will be retrieved. Plan *string `form:"plan"` // Filter for subscriptions that contain this recurring price ID. Price *string `form:"price"` // The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. Status *string `form:"status"` // Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. TestClock *string `form:"test_clock"` }
By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.
func (*SubscriptionListParams) AddExpand ¶
func (p *SubscriptionListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SubscriptionParams ¶
type SubscriptionParams struct { Params `form:"*"` // A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. AddInvoiceItems []*SubscriptionAddInvoiceItemParams `form:"add_invoice_items"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). ApplicationFeePercent *float64 `form:"application_fee_percent"` // Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. AutomaticTax *SubscriptionAutomaticTaxParams `form:"automatic_tax"` // For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. BackdateStartDate *int64 `form:"backdate_start_date"` // A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. BillingCycleAnchor *int64 `form:"billing_cycle_anchor"` BillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo BillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"` // A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. CancelAt *int64 `form:"cancel_at"` // Boolean indicating whether this subscription should cancel at the end of the current period. CancelAtPeriodEnd *bool `form:"cancel_at_period_end"` // Details about why this subscription was cancelled CancellationDetails *SubscriptionCancellationDetailsParams `form:"cancellation_details"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. CollectionMethod *string `form:"collection_method"` // The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. Coupon *string `form:"coupon"` // 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 `form:"currency"` // The identifier of the customer to subscribe. Customer *string `form:"customer"` // Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. DaysUntilDue *int64 `form:"days_until_due"` // ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). DefaultPaymentMethod *string `form:"default_payment_method"` // ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). DefaultSource *string `form:"default_source"` // The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. DefaultTaxRates []*string `form:"default_tax_rates"` // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A list of up to 20 subscription items, each with an attached price. Items []*SubscriptionItemsParams `form:"items"` // 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`. Metadata map[string]string `form:"metadata"` // Indicates if a customer is on or off-session while an invoice payment is attempted. OffSession *bool `form:"off_session"` // The account on behalf of which to charge, for each of the subscription's invoices. OnBehalfOf *string `form:"on_behalf_of"` // If specified, payment collection for this subscription will be paused. PauseCollection *SubscriptionPauseCollectionParams `form:"pause_collection"` // Only applies to subscriptions with `collection_method=charge_automatically`. // // Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. // // Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. // // Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. // // `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. // // Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first invoice status. PaymentBehavior *string `form:"payment_behavior"` // Payment settings to pass to invoices created by the subscription. PaymentSettings *SubscriptionPaymentSettingsParams `form:"payment_settings"` // Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. PendingInvoiceItemInterval *SubscriptionPendingInvoiceItemIntervalParams `form:"pending_invoice_item_interval"` // The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. PromotionCode *string `form:"promotion_code"` // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. ProrationBehavior *string `form:"proration_behavior"` // If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. ProrationDate *int64 `form:"proration_date"` // If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. TransferData *SubscriptionTransferDataParams `form:"transfer_data"` // Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. TrialEnd *int64 `form:"trial_end"` TrialEndNow *bool `form:"-"` // See custom AppendTo // Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. TrialFromPlan *bool `form:"trial_from_plan"` // Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. TrialPeriodDays *int64 `form:"trial_period_days"` // Settings related to subscription trials. TrialSettings *SubscriptionTrialSettingsParams `form:"trial_settings"` }
Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.
When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. The payment_behavior parameter determines the exact behavior of the initial payment.
To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead. Schedules provide the flexibility to model more complex billing configurations that change over time.
func (*SubscriptionParams) AddExpand ¶
func (p *SubscriptionParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*SubscriptionParams) AddMetadata ¶
func (p *SubscriptionParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type SubscriptionPauseCollection ¶
type SubscriptionPauseCollection struct { // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. Behavior SubscriptionPauseCollectionBehavior `json:"behavior"` // The time after which the subscription will resume collecting payments. ResumesAt int64 `json:"resumes_at"` }
If specified, payment collection for this subscription will be paused.
type SubscriptionPauseCollectionBehavior ¶
type SubscriptionPauseCollectionBehavior string
The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
const ( SubscriptionPauseCollectionBehaviorKeepAsDraft SubscriptionPauseCollectionBehavior = "keep_as_draft" SubscriptionPauseCollectionBehaviorMarkUncollectible SubscriptionPauseCollectionBehavior = "mark_uncollectible" SubscriptionPauseCollectionBehaviorVoid SubscriptionPauseCollectionBehavior = "void" )
List of values that SubscriptionPauseCollectionBehavior can take
type SubscriptionPauseCollectionParams ¶
type SubscriptionPauseCollectionParams struct { // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. Behavior *string `form:"behavior"` // The time after which the subscription will resume collecting payments. ResumesAt *int64 `form:"resumes_at"` }
If specified, payment collection for this subscription will be paused.
type SubscriptionPaymentSettings ¶
type SubscriptionPaymentSettings struct { // Payment-method-specific configuration to provide to invoices created by the subscription. PaymentMethodOptions *SubscriptionPaymentSettingsPaymentMethodOptions `json:"payment_method_options"` // The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). PaymentMethodTypes []SubscriptionPaymentSettingsPaymentMethodType `json:"payment_method_types"` // Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. SaveDefaultPaymentMethod SubscriptionPaymentSettingsSaveDefaultPaymentMethod `json:"save_default_payment_method"` }
Payment settings passed on to invoices created by the subscription.
type SubscriptionPaymentSettingsParams ¶
type SubscriptionPaymentSettingsParams struct { // Payment-method-specific configuration to provide to invoices created by the subscription. PaymentMethodOptions *SubscriptionPaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"` // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). PaymentMethodTypes []*string `form:"payment_method_types"` // Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. SaveDefaultPaymentMethod *string `form:"save_default_payment_method"` }
Payment settings to pass to invoices created by the subscription.
type SubscriptionPaymentSettingsPaymentMethodOptions ¶
type SubscriptionPaymentSettingsPaymentMethodOptions struct { // This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. ACSSDebit *SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebit `json:"acss_debit"` // This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. Bancontact *SubscriptionPaymentSettingsPaymentMethodOptionsBancontact `json:"bancontact"` // This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. Card *SubscriptionPaymentSettingsPaymentMethodOptionsCard `json:"card"` // This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. CustomerBalance *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance `json:"customer_balance"` // This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. Konbini *SubscriptionPaymentSettingsPaymentMethodOptionsKonbini `json:"konbini"` // This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. USBankAccount *SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccount `json:"us_bank_account"` }
Payment-method-specific configuration to provide to invoices created by the subscription.
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebit ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebit struct { MandateOptions *SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"` // Bank account verification method. VerificationMethod SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"` }
This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions struct { // Transaction type of the mandate. TransactionType SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"` }
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams struct { // Transaction type of the mandate. TransactionType *string `form:"transaction_type"` }
Additional fields for Mandate creation
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string
Transaction type of the mandate.
const ( SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business" SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal" )
List of values that SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitParams struct { // Additional fields for Mandate creation MandateOptions *SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"` // Verification method for the intent VerificationMethod *string `form:"verification_method"` }
This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod string
Bank account verification method.
const ( SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodAutomatic SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "automatic" SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodInstant SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "instant" SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits" )
List of values that SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod can take
type SubscriptionPaymentSettingsPaymentMethodOptionsBancontact ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsBancontact struct { // Preferred language of the Bancontact authorization page that the customer is redirected to. PreferredLanguage string `json:"preferred_language"` }
This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.
type SubscriptionPaymentSettingsPaymentMethodOptionsBancontactParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsBancontactParams struct { // Preferred language of the Bancontact authorization page that the customer is redirected to. PreferredLanguage *string `form:"preferred_language"` }
This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
type SubscriptionPaymentSettingsPaymentMethodOptionsCard ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCard struct { MandateOptions *SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions `json:"mandate_options"` // Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. Network SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork `json:"network"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"` }
This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.
type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions struct { // Amount to be charged for future payments. Amount int64 `json:"amount"` // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. AmountType SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType `json:"amount_type"` // A description of the mandate or subscription that is meant to be displayed to the customer. Description string `json:"description"` }
type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType string
One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
const ( SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountTypeFixed SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType = "fixed" SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountTypeMaximum SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType = "maximum" )
List of values that SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType can take
type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsParams struct { // Amount to be charged for future payments. Amount *int64 `form:"amount"` // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. AmountType *string `form:"amount_type"` // A description of the mandate or subscription that is meant to be displayed to the customer. Description *string `form:"description"` }
Configuration options for setting up an eMandate for cards issued in India.
type SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork string
Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
const ( SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkAmex SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "amex" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkCartesBancaires SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "cartes_bancaires" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkDiners SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "diners" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkDiscover SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "discover" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkEFTPOSAU SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "eftpos_au" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkInterac SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "interac" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkJCB SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "jcb" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkMastercard SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "mastercard" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkUnionpay SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "unionpay" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkUnknown SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "unknown" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkVisa SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "visa" )
List of values that SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork can take
type SubscriptionPaymentSettingsPaymentMethodOptionsCardParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCardParams struct { // Configuration options for setting up an eMandate for cards issued in India. MandateOptions *SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"` // Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. Network *string `form:"network"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure *string `form:"request_three_d_secure"` }
This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
type SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure string
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
const ( SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAny SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "any" SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAutomatic SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "automatic" )
List of values that SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure can take
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance struct { BankTransfer *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer `json:"bank_transfer"` // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. FundingType SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"` }
This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer struct { EUBankTransfer *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer `json:"eu_bank_transfer"` // The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. Type string `json:"type"` }
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct { // The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. Country string `json:"country"` }
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams struct { // The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. Country *string `form:"country"` }
Configuration for eu_bank_transfer funding type.
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct { // Configuration for eu_bank_transfer funding type. EUBankTransfer *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"` // The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. Type *string `form:"type"` }
Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType string
The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
const (
SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingTypeBankTransfer SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType = "bank_transfer"
)
List of values that SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType can take
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct { // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. BankTransfer *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"` // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. FundingType *string `form:"funding_type"` }
This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
type SubscriptionPaymentSettingsPaymentMethodOptionsKonbini ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsKonbini struct{}
This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.
type SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniParams struct{}
This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
type SubscriptionPaymentSettingsPaymentMethodOptionsParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsParams struct { // This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. ACSSDebit *SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitParams `form:"acss_debit"` // This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. Bancontact *SubscriptionPaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"` // This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. Card *SubscriptionPaymentSettingsPaymentMethodOptionsCardParams `form:"card"` // This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. CustomerBalance *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"` // This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. Konbini *SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniParams `form:"konbini"` // This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. USBankAccount *SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"` }
Payment-method-specific configuration to provide to invoices created by the subscription.
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccount ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccount struct { FinancialConnections *SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"` // Bank account verification method. VerificationMethod SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"` }
This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` // Data features requested to be retrieved upon account creation. Prefetch []SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"` }
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. Permissions []*string `form:"permissions"` // List of data features that you would like to retrieve upon account creation. Prefetch []*string `form:"prefetch"` }
Additional fields for Financial Connections Session creation
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string
The list of permissions to request. The `payment_method` permission must be included.
const ( SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances" SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method" SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" )
List of values that SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch ¶ added in v75.2.0
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string
Data features requested to be retrieved upon account creation.
const (
SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances"
)
List of values that SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountParams ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountParams struct { // Additional fields for Financial Connections Session creation FinancialConnections *SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"` // Verification method for the intent VerificationMethod *string `form:"verification_method"` }
This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod ¶
type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod string
Bank account verification method.
const ( SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic" SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodInstant SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "instant" SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodMicrodeposits SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "microdeposits" )
List of values that SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod can take
type SubscriptionPaymentSettingsPaymentMethodType ¶
type SubscriptionPaymentSettingsPaymentMethodType string
The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
const ( SubscriptionPaymentSettingsPaymentMethodTypeACHCreditTransfer SubscriptionPaymentSettingsPaymentMethodType = "ach_credit_transfer" SubscriptionPaymentSettingsPaymentMethodTypeACHDebit SubscriptionPaymentSettingsPaymentMethodType = "ach_debit" SubscriptionPaymentSettingsPaymentMethodTypeACSSDebit SubscriptionPaymentSettingsPaymentMethodType = "acss_debit" SubscriptionPaymentSettingsPaymentMethodTypeAUBECSDebit SubscriptionPaymentSettingsPaymentMethodType = "au_becs_debit" SubscriptionPaymentSettingsPaymentMethodTypeBACSDebit SubscriptionPaymentSettingsPaymentMethodType = "bacs_debit" SubscriptionPaymentSettingsPaymentMethodTypeBancontact SubscriptionPaymentSettingsPaymentMethodType = "bancontact" SubscriptionPaymentSettingsPaymentMethodTypeBoleto SubscriptionPaymentSettingsPaymentMethodType = "boleto" SubscriptionPaymentSettingsPaymentMethodTypeCard SubscriptionPaymentSettingsPaymentMethodType = "card" SubscriptionPaymentSettingsPaymentMethodTypeCashApp SubscriptionPaymentSettingsPaymentMethodType = "cashapp" SubscriptionPaymentSettingsPaymentMethodTypeCustomerBalance SubscriptionPaymentSettingsPaymentMethodType = "customer_balance" SubscriptionPaymentSettingsPaymentMethodTypeFPX SubscriptionPaymentSettingsPaymentMethodType = "fpx" SubscriptionPaymentSettingsPaymentMethodTypeGiropay SubscriptionPaymentSettingsPaymentMethodType = "giropay" SubscriptionPaymentSettingsPaymentMethodTypeGrabpay SubscriptionPaymentSettingsPaymentMethodType = "grabpay" SubscriptionPaymentSettingsPaymentMethodTypeIDEAL SubscriptionPaymentSettingsPaymentMethodType = "ideal" SubscriptionPaymentSettingsPaymentMethodTypeKonbini SubscriptionPaymentSettingsPaymentMethodType = "konbini" SubscriptionPaymentSettingsPaymentMethodTypeLink SubscriptionPaymentSettingsPaymentMethodType = "link" SubscriptionPaymentSettingsPaymentMethodTypePayNow SubscriptionPaymentSettingsPaymentMethodType = "paynow" SubscriptionPaymentSettingsPaymentMethodTypePaypal SubscriptionPaymentSettingsPaymentMethodType = "paypal" SubscriptionPaymentSettingsPaymentMethodTypePromptPay SubscriptionPaymentSettingsPaymentMethodType = "promptpay" SubscriptionPaymentSettingsPaymentMethodTypeSEPACreditTransfer SubscriptionPaymentSettingsPaymentMethodType = "sepa_credit_transfer" SubscriptionPaymentSettingsPaymentMethodTypeSEPADebit SubscriptionPaymentSettingsPaymentMethodType = "sepa_debit" SubscriptionPaymentSettingsPaymentMethodTypeSofort SubscriptionPaymentSettingsPaymentMethodType = "sofort" SubscriptionPaymentSettingsPaymentMethodTypeUSBankAccount SubscriptionPaymentSettingsPaymentMethodType = "us_bank_account" SubscriptionPaymentSettingsPaymentMethodTypeWeChatPay SubscriptionPaymentSettingsPaymentMethodType = "wechat_pay" )
List of values that SubscriptionPaymentSettingsPaymentMethodType can take
type SubscriptionPaymentSettingsSaveDefaultPaymentMethod ¶
type SubscriptionPaymentSettingsSaveDefaultPaymentMethod string
Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds.
const ( SubscriptionPaymentSettingsSaveDefaultPaymentMethodOff SubscriptionPaymentSettingsSaveDefaultPaymentMethod = "off" SubscriptionPaymentSettingsSaveDefaultPaymentMethodOnSubscription SubscriptionPaymentSettingsSaveDefaultPaymentMethod = "on_subscription" )
List of values that SubscriptionPaymentSettingsSaveDefaultPaymentMethod can take
type SubscriptionPendingInvoiceItemInterval ¶
type SubscriptionPendingInvoiceItemInterval struct { // Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. Interval SubscriptionPendingInvoiceItemIntervalInterval `json:"interval"` // The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). IntervalCount int64 `json:"interval_count"` }
Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
type SubscriptionPendingInvoiceItemIntervalInterval ¶
type SubscriptionPendingInvoiceItemIntervalInterval string
Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
const ( SubscriptionPendingInvoiceItemIntervalIntervalDay SubscriptionPendingInvoiceItemIntervalInterval = "day" SubscriptionPendingInvoiceItemIntervalIntervalMonth SubscriptionPendingInvoiceItemIntervalInterval = "month" SubscriptionPendingInvoiceItemIntervalIntervalWeek SubscriptionPendingInvoiceItemIntervalInterval = "week" SubscriptionPendingInvoiceItemIntervalIntervalYear SubscriptionPendingInvoiceItemIntervalInterval = "year" )
List of values that SubscriptionPendingInvoiceItemIntervalInterval can take
type SubscriptionPendingInvoiceItemIntervalParams ¶
type SubscriptionPendingInvoiceItemIntervalParams struct { // Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. Interval *string `form:"interval"` // The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). IntervalCount *int64 `form:"interval_count"` }
Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
type SubscriptionPendingUpdate ¶
type SubscriptionPendingUpdate struct { // If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. BillingCycleAnchor int64 `json:"billing_cycle_anchor"` // The point after which the changes reflected by this update will be discarded and no longer applied. ExpiresAt int64 `json:"expires_at"` // List of subscription items, each with an attached plan, that will be set if the update is applied. SubscriptionItems []*SubscriptionItem `json:"subscription_items"` // Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. TrialEnd int64 `json:"trial_end"` // Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. TrialFromPlan bool `json:"trial_from_plan"` }
If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.
type SubscriptionResumeParams ¶
type SubscriptionResumeParams struct { Params `form:"*"` // Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). Setting the value to `unchanged` advances the subscription's billing cycle anchor to the period that surrounds the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). BillingCycleAnchor *string `form:"billing_cycle_anchor"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. ProrationBehavior *string `form:"proration_behavior"` // If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. ProrationDate *int64 `form:"proration_date"` }
Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
func (*SubscriptionResumeParams) AddExpand ¶
func (p *SubscriptionResumeParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SubscriptionSchedule ¶
type SubscriptionSchedule struct { APIResource // ID of the Connect Application that created the schedule. Application *Application `json:"application"` // Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. CanceledAt int64 `json:"canceled_at"` // Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. CompletedAt int64 `json:"completed_at"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. CurrentPhase *SubscriptionScheduleCurrentPhase `json:"current_phase"` // ID of the customer who owns the subscription schedule. Customer *Customer `json:"customer"` DefaultSettings *SubscriptionScheduleDefaultSettings `json:"default_settings"` // Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. EndBehavior SubscriptionScheduleEndBehavior `json:"end_behavior"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Configuration for the subscription schedule's phases. Phases []*SubscriptionSchedulePhase `json:"phases"` // Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. ReleasedAt int64 `json:"released_at"` // ID of the subscription once managed by the subscription schedule (if it is released). ReleasedSubscription *Subscription `json:"released_subscription"` // The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). Status SubscriptionScheduleStatus `json:"status"` // ID of the subscription managed by the subscription schedule. Subscription *Subscription `json:"subscription"` // ID of the test clock this subscription schedule belongs to. TestClock *TestHelpersTestClock `json:"test_clock"` }
A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)
func (*SubscriptionSchedule) UnmarshalJSON ¶
func (s *SubscriptionSchedule) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a SubscriptionSchedule. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type SubscriptionScheduleCancelParams ¶
type SubscriptionScheduleCancelParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. InvoiceNow *bool `form:"invoice_now"` // If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. Prorate *bool `form:"prorate"` }
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
func (*SubscriptionScheduleCancelParams) AddExpand ¶
func (p *SubscriptionScheduleCancelParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SubscriptionScheduleCurrentPhase ¶
type SubscriptionScheduleCurrentPhase struct { // The end of this phase of the subscription schedule. EndDate int64 `json:"end_date"` // The start of this phase of the subscription schedule. StartDate int64 `json:"start_date"` }
Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.
type SubscriptionScheduleDefaultSettings ¶
type SubscriptionScheduleDefaultSettings struct { // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. ApplicationFeePercent float64 `json:"application_fee_percent"` AutomaticTax *SubscriptionAutomaticTax `json:"automatic_tax"` // Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). BillingCycleAnchor SubscriptionScheduleDefaultSettingsBillingCycleAnchor `json:"billing_cycle_anchor"` // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. CollectionMethod *SubscriptionCollectionMethod `json:"collection_method"` // ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"` // Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. Description string `json:"description"` // The subscription schedule's default invoice settings. InvoiceSettings *SubscriptionScheduleDefaultSettingsInvoiceSettings `json:"invoice_settings"` // The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. OnBehalfOf *Account `json:"on_behalf_of"` // The account (if any) the associated 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. TransferData *SubscriptionTransferData `json:"transfer_data"` }
type SubscriptionScheduleDefaultSettingsBillingCycleAnchor ¶
type SubscriptionScheduleDefaultSettingsBillingCycleAnchor string
Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
const ( SubscriptionScheduleDefaultSettingsBillingCycleAnchorAutomatic SubscriptionScheduleDefaultSettingsBillingCycleAnchor = "automatic" SubscriptionScheduleDefaultSettingsBillingCycleAnchorPhaseStart SubscriptionScheduleDefaultSettingsBillingCycleAnchor = "phase_start" )
List of values that SubscriptionScheduleDefaultSettingsBillingCycleAnchor can take
type SubscriptionScheduleDefaultSettingsInvoiceSettings ¶
type SubscriptionScheduleDefaultSettingsInvoiceSettings struct { // Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. DaysUntilDue int64 `json:"days_until_due"` }
The subscription schedule's default invoice settings.
type SubscriptionScheduleDefaultSettingsInvoiceSettingsParams ¶
type SubscriptionScheduleDefaultSettingsInvoiceSettingsParams struct { // Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. DaysUntilDue *int64 `form:"days_until_due"` }
All invoices will be billed using the specified settings.
type SubscriptionScheduleDefaultSettingsParams ¶
type SubscriptionScheduleDefaultSettingsParams struct { Params `form:"*"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). ApplicationFeePercent *float64 `form:"application_fee_percent,high_precision"` // Default settings for automatic tax computation. AutomaticTax *SubscriptionAutomaticTaxParams `form:"automatic_tax"` // Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). BillingCycleAnchor *string `form:"billing_cycle_anchor"` // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. CollectionMethod *string `form:"collection_method"` // ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. DefaultPaymentMethod *string `form:"default_payment_method"` // Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. Description *string `form:"description"` // All invoices will be billed using the specified settings. InvoiceSettings *SubscriptionScheduleDefaultSettingsInvoiceSettingsParams `form:"invoice_settings"` // The account on behalf of which to charge, for each of the associated subscription's invoices. OnBehalfOf *string `form:"on_behalf_of"` // The data with which to automatically create a Transfer for each of the associated subscription's invoices. TransferData *SubscriptionTransferDataParams `form:"transfer_data"` }
Object representing the subscription schedule's default settings.
type SubscriptionScheduleEndBehavior ¶
type SubscriptionScheduleEndBehavior string
Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
const ( SubscriptionScheduleEndBehaviorCancel SubscriptionScheduleEndBehavior = "cancel" SubscriptionScheduleEndBehaviorNone SubscriptionScheduleEndBehavior = "none" SubscriptionScheduleEndBehaviorRelease SubscriptionScheduleEndBehavior = "release" SubscriptionScheduleEndBehaviorRenew SubscriptionScheduleEndBehavior = "renew" )
List of values that SubscriptionScheduleEndBehavior can take
type SubscriptionScheduleList ¶
type SubscriptionScheduleList struct { APIResource ListMeta Data []*SubscriptionSchedule `json:"data"` }
SubscriptionScheduleList is a list of SubscriptionSchedules as retrieved from a list endpoint.
type SubscriptionScheduleListParams ¶
type SubscriptionScheduleListParams struct { ListParams `form:"*"` // Only return subscription schedules that were created canceled the given date interval. CanceledAt *int64 `form:"canceled_at"` // Only return subscription schedules that were created canceled the given date interval. CanceledAtRange *RangeQueryParams `form:"canceled_at"` // Only return subscription schedules that completed during the given date interval. CompletedAt *int64 `form:"completed_at"` // Only return subscription schedules that completed during the given date interval. CompletedAtRange *RangeQueryParams `form:"completed_at"` // Only return subscription schedules that were created during the given date interval. Created *int64 `form:"created"` // Only return subscription schedules that were created during the given date interval. CreatedRange *RangeQueryParams `form:"created"` // Only return subscription schedules for the given customer. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return subscription schedules that were released during the given date interval. ReleasedAt *int64 `form:"released_at"` // Only return subscription schedules that were released during the given date interval. ReleasedAtRange *RangeQueryParams `form:"released_at"` // Only return subscription schedules that have not started yet. Scheduled *bool `form:"scheduled"` }
Retrieves the list of your subscription schedules.
func (*SubscriptionScheduleListParams) AddExpand ¶
func (p *SubscriptionScheduleListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SubscriptionScheduleParams ¶
type SubscriptionScheduleParams struct { Params `form:"*"` // The identifier of the customer to create the subscription schedule for. Customer *string `form:"customer"` // Object representing the subscription schedule's default settings. DefaultSettings *SubscriptionScheduleDefaultSettingsParams `form:"default_settings"` // Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. EndBehavior *string `form:"end_behavior"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. FromSubscription *string `form:"from_subscription"` // 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`. Metadata map[string]string `form:"metadata"` // List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. Phases []*SubscriptionSchedulePhaseParams `form:"phases"` // If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. ProrationBehavior *string `form:"proration_behavior"` // When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. StartDate *int64 `form:"start_date"` StartDateNow *bool `form:"-"` // See custom AppendTo }
Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
func (*SubscriptionScheduleParams) AddExpand ¶
func (p *SubscriptionScheduleParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*SubscriptionScheduleParams) AddMetadata ¶
func (p *SubscriptionScheduleParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type SubscriptionSchedulePhase ¶
type SubscriptionSchedulePhase struct { // A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. AddInvoiceItems []*SubscriptionSchedulePhaseAddInvoiceItem `json:"add_invoice_items"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. ApplicationFeePercent float64 `json:"application_fee_percent"` AutomaticTax *SubscriptionAutomaticTax `json:"automatic_tax"` // Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). BillingCycleAnchor SubscriptionSchedulePhaseBillingCycleAnchor `json:"billing_cycle_anchor"` // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. CollectionMethod *SubscriptionCollectionMethod `json:"collection_method"` // ID of the coupon to use during this phase of the subscription schedule. Coupon *Coupon `json:"coupon"` // 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 Currency `json:"currency"` // ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"` // The default tax rates to apply to the subscription during this phase of the subscription schedule. DefaultTaxRates []*TaxRate `json:"default_tax_rates"` // Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. Description string `json:"description"` // The end of this phase of the subscription schedule. EndDate int64 `json:"end_date"` // The invoice settings applicable during this phase. InvoiceSettings *SubscriptionSchedulePhaseInvoiceSettings `json:"invoice_settings"` // Subscription items to configure the subscription to during this phase of the subscription schedule. Items []*SubscriptionSchedulePhaseItem `json:"items"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. Metadata map[string]string `json:"metadata"` // The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. OnBehalfOf *Account `json:"on_behalf_of"` // If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. ProrationBehavior SubscriptionSchedulePhaseProrationBehavior `json:"proration_behavior"` // The start of this phase of the subscription schedule. StartDate int64 `json:"start_date"` // The account (if any) the associated 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. TransferData *SubscriptionTransferData `json:"transfer_data"` // When the trial ends within the phase. TrialEnd int64 `json:"trial_end"` }
Configuration for the subscription schedule's phases.
type SubscriptionSchedulePhaseAddInvoiceItem ¶
type SubscriptionSchedulePhaseAddInvoiceItem struct { // ID of the price used to generate the invoice item. Price *Price `json:"price"` // The quantity of the invoice item. Quantity int64 `json:"quantity"` // The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. TaxRates []*TaxRate `json:"tax_rates"` }
A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
type SubscriptionSchedulePhaseAddInvoiceItemParams ¶
type SubscriptionSchedulePhaseAddInvoiceItemParams struct { // The ID of the price object. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. PriceData *InvoiceItemPriceDataParams `form:"price_data"` // Quantity for this item. Defaults to 1. Quantity *int64 `form:"quantity"` // The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. TaxRates []*string `form:"tax_rates"` }
A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
type SubscriptionSchedulePhaseAutomaticTaxParams ¶
type SubscriptionSchedulePhaseAutomaticTaxParams struct { // Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. Enabled *bool `form:"enabled"` }
Automatic tax settings for this phase.
type SubscriptionSchedulePhaseBillingCycleAnchor ¶
type SubscriptionSchedulePhaseBillingCycleAnchor string
Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
const ( SubscriptionSchedulePhaseBillingCycleAnchorAutomatic SubscriptionSchedulePhaseBillingCycleAnchor = "automatic" SubscriptionSchedulePhaseBillingCycleAnchorPhaseStart SubscriptionSchedulePhaseBillingCycleAnchor = "phase_start" )
List of values that SubscriptionSchedulePhaseBillingCycleAnchor can take
type SubscriptionSchedulePhaseInvoiceSettings ¶
type SubscriptionSchedulePhaseInvoiceSettings struct { // Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. DaysUntilDue int64 `json:"days_until_due"` }
The invoice settings applicable during this phase.
type SubscriptionSchedulePhaseInvoiceSettingsParams ¶
type SubscriptionSchedulePhaseInvoiceSettingsParams struct { // Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. DaysUntilDue *int64 `form:"days_until_due"` }
All invoices will be billed using the specified settings.
type SubscriptionSchedulePhaseItem ¶
type SubscriptionSchedulePhaseItem struct { // Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period BillingThresholds *SubscriptionItemBillingThresholds `json:"billing_thresholds"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. Metadata map[string]string `json:"metadata"` // ID of the plan to which the customer should be subscribed. Plan *Plan `json:"plan"` // ID of the price to which the customer should be subscribed. Price *Price `json:"price"` // Quantity of the plan to which the customer should be subscribed. Quantity int64 `json:"quantity"` // The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. TaxRates []*TaxRate `json:"tax_rates"` }
Subscription items to configure the subscription to during this phase of the subscription schedule.
type SubscriptionSchedulePhaseItemParams ¶
type SubscriptionSchedulePhaseItemParams struct { // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. Metadata map[string]string `form:"metadata"` // The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. Plan *string `form:"plan"` // The ID of the price object. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. PriceData *SubscriptionItemPriceDataParams `form:"price_data"` // Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. Quantity *int64 `form:"quantity"` // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. TaxRates []*string `form:"tax_rates"` }
List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
func (*SubscriptionSchedulePhaseItemParams) AddMetadata ¶
func (p *SubscriptionSchedulePhaseItemParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type SubscriptionSchedulePhaseParams ¶
type SubscriptionSchedulePhaseParams struct { // A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. AddInvoiceItems []*SubscriptionSchedulePhaseAddInvoiceItemParams `form:"add_invoice_items"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). ApplicationFeePercent *float64 `form:"application_fee_percent"` // Automatic tax settings for this phase. AutomaticTax *SubscriptionSchedulePhaseAutomaticTaxParams `form:"automatic_tax"` // Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). BillingCycleAnchor *string `form:"billing_cycle_anchor"` // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. CollectionMethod *string `form:"collection_method"` // The identifier of the coupon to apply to this phase of the subscription schedule. Coupon *string `form:"coupon"` // 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 `form:"currency"` // ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. DefaultPaymentMethod *string `form:"default_payment_method"` // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. DefaultTaxRates []*string `form:"default_tax_rates"` // Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. Description *string `form:"description"` // The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. EndDate *int64 `form:"end_date"` EndDateNow *bool `form:"-"` // See custom AppendTo // All invoices will be billed using the specified settings. InvoiceSettings *SubscriptionSchedulePhaseInvoiceSettingsParams `form:"invoice_settings"` // List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. Items []*SubscriptionSchedulePhaseItemParams `form:"items"` // Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. Iterations *int64 `form:"iterations"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. Metadata map[string]string `form:"metadata"` // The account on behalf of which to charge, for each of the associated subscription's invoices. OnBehalfOf *string `form:"on_behalf_of"` // Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. ProrationBehavior *string `form:"proration_behavior"` // The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. StartDate *int64 `form:"start_date"` StartDateNow *bool `form:"-"` // See custom AppendTo // The data with which to automatically create a Transfer for each of the associated subscription's invoices. TransferData *SubscriptionTransferDataParams `form:"transfer_data"` // If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. Trial *bool `form:"trial"` // Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` TrialEnd *int64 `form:"trial_end"` TrialEndNow *bool `form:"-"` // See custom AppendTo }
List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
func (*SubscriptionSchedulePhaseParams) AddMetadata ¶
func (p *SubscriptionSchedulePhaseParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type SubscriptionSchedulePhaseProrationBehavior ¶
type SubscriptionSchedulePhaseProrationBehavior string
If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.
const ( SubscriptionSchedulePhaseProrationBehaviorAlwaysInvoice SubscriptionSchedulePhaseProrationBehavior = "always_invoice" SubscriptionSchedulePhaseProrationBehaviorCreateProrations SubscriptionSchedulePhaseProrationBehavior = "create_prorations" SubscriptionSchedulePhaseProrationBehaviorNone SubscriptionSchedulePhaseProrationBehavior = "none" )
List of values that SubscriptionSchedulePhaseProrationBehavior can take
type SubscriptionScheduleReleaseParams ¶
type SubscriptionScheduleReleaseParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Keep any cancellation on the subscription that the schedule has set PreserveCancelDate *bool `form:"preserve_cancel_date"` }
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
func (*SubscriptionScheduleReleaseParams) AddExpand ¶
func (p *SubscriptionScheduleReleaseParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SubscriptionScheduleStatus ¶
type SubscriptionScheduleStatus string
The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
const ( SubscriptionScheduleStatusActive SubscriptionScheduleStatus = "active" SubscriptionScheduleStatusCanceled SubscriptionScheduleStatus = "canceled" SubscriptionScheduleStatusCompleted SubscriptionScheduleStatus = "completed" SubscriptionScheduleStatusNotStarted SubscriptionScheduleStatus = "not_started" SubscriptionScheduleStatusReleased SubscriptionScheduleStatus = "released" )
List of values that SubscriptionScheduleStatus can take
type SubscriptionSearchParams ¶
type SubscriptionSearchParams struct { SearchParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. Page *string `form:"page"` }
Search for subscriptions you've previously created using Stripe's [Search Query Language](https://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.
func (*SubscriptionSearchParams) AddExpand ¶
func (p *SubscriptionSearchParams) AddExpand(f string)
AddExpand appends a new field to expand.
type SubscriptionSearchResult ¶
type SubscriptionSearchResult struct { APIResource SearchMeta Data []*Subscription `json:"data"` }
SubscriptionSearchResult is a list of Subscription search results as retrieved from a search endpoint.
type SubscriptionStatus ¶
type SubscriptionStatus string
Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`.
For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated.
A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.
If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings).
If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
const ( SubscriptionStatusActive SubscriptionStatus = "active" SubscriptionStatusCanceled SubscriptionStatus = "canceled" SubscriptionStatusIncomplete SubscriptionStatus = "incomplete" SubscriptionStatusIncompleteExpired SubscriptionStatus = "incomplete_expired" SubscriptionStatusPastDue SubscriptionStatus = "past_due" SubscriptionStatusPaused SubscriptionStatus = "paused" SubscriptionStatusTrialing SubscriptionStatus = "trialing" SubscriptionStatusUnpaid SubscriptionStatus = "unpaid" )
List of values that SubscriptionStatus can take
type SubscriptionTransferData ¶
type SubscriptionTransferData struct { // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. AmountPercent float64 `json:"amount_percent"` // The account where funds from the payment will be transferred to upon payment success. Destination *Account `json:"destination"` }
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.
type SubscriptionTransferDataParams ¶
type SubscriptionTransferDataParams struct { // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. AmountPercent *float64 `form:"amount_percent"` // ID of an existing, connected Stripe account. Destination *string `form:"destination"` }
If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
type SubscriptionTrialSettings ¶
type SubscriptionTrialSettings struct { // Defines how a subscription behaves when a free trial ends. EndBehavior *SubscriptionTrialSettingsEndBehavior `json:"end_behavior"` }
Settings related to subscription trials.
type SubscriptionTrialSettingsEndBehavior ¶
type SubscriptionTrialSettingsEndBehavior struct { // Indicates how the subscription should change when the trial ends if the user did not provide a payment method. MissingPaymentMethod SubscriptionTrialSettingsEndBehaviorMissingPaymentMethod `json:"missing_payment_method"` }
Defines how a subscription behaves when a free trial ends.
type SubscriptionTrialSettingsEndBehaviorMissingPaymentMethod ¶
type SubscriptionTrialSettingsEndBehaviorMissingPaymentMethod string
Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
const ( SubscriptionTrialSettingsEndBehaviorMissingPaymentMethodCancel SubscriptionTrialSettingsEndBehaviorMissingPaymentMethod = "cancel" SubscriptionTrialSettingsEndBehaviorMissingPaymentMethodCreateInvoice SubscriptionTrialSettingsEndBehaviorMissingPaymentMethod = "create_invoice" SubscriptionTrialSettingsEndBehaviorMissingPaymentMethodPause SubscriptionTrialSettingsEndBehaviorMissingPaymentMethod = "pause" )
List of values that SubscriptionTrialSettingsEndBehaviorMissingPaymentMethod can take
type SubscriptionTrialSettingsEndBehaviorParams ¶
type SubscriptionTrialSettingsEndBehaviorParams struct { // Indicates how the subscription should change when the trial ends if the user did not provide a payment method. MissingPaymentMethod *string `form:"missing_payment_method"` }
Defines how the subscription should behave when the user's free trial ends.
type SubscriptionTrialSettingsParams ¶
type SubscriptionTrialSettingsParams struct { // Defines how the subscription should behave when the user's free trial ends. EndBehavior *SubscriptionTrialSettingsEndBehaviorParams `form:"end_behavior"` }
Settings related to subscription trials.
type SupportedBackend ¶
type SupportedBackend string
SupportedBackend is an enumeration of supported Stripe endpoints. Currently supported values are "api" and "uploads".
type TaxCalculation ¶
type TaxCalculation struct { APIResource // Total after taxes. AmountTotal int64 `json:"amount_total"` // 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 Currency `json:"currency"` // The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. Customer string `json:"customer"` CustomerDetails *TaxCalculationCustomerDetails `json:"customer_details"` // Timestamp of date at which the tax calculation will expire. ExpiresAt int64 `json:"expires_at"` // Unique identifier for the calculation. ID string `json:"id"` // The list of items the customer is purchasing. LineItems *TaxCalculationLineItemList `json:"line_items"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The shipping cost details for the calculation. ShippingCost *TaxCalculationShippingCost `json:"shipping_cost"` // The amount of tax to be collected on top of the line item prices. TaxAmountExclusive int64 `json:"tax_amount_exclusive"` // The amount of tax already included in the line item prices. TaxAmountInclusive int64 `json:"tax_amount_inclusive"` // Breakdown of individual tax amounts that add up to the total. TaxBreakdown []*TaxCalculationTaxBreakdown `json:"tax_breakdown"` // Timestamp of date at which the tax rules and rates in effect applies for the calculation. TaxDate int64 `json:"tax_date"` }
A Tax Calculation allows you to calculate the tax to collect from your customer.
Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom)
type TaxCalculationCustomerDetails ¶
type TaxCalculationCustomerDetails struct { // The customer's postal address (for example, home or business location). Address *Address `json:"address"` // The type of customer address provided. AddressSource TaxCalculationCustomerDetailsAddressSource `json:"address_source"` // The customer's IP address (IPv4 or IPv6). IPAddress string `json:"ip_address"` // The taxability override used for taxation. TaxabilityOverride TaxCalculationCustomerDetailsTaxabilityOverride `json:"taxability_override"` // The customer's tax IDs (for example, EU VAT numbers). TaxIDs []*TaxCalculationCustomerDetailsTaxID `json:"tax_ids"` }
type TaxCalculationCustomerDetailsAddressSource ¶
type TaxCalculationCustomerDetailsAddressSource string
The type of customer address provided.
const ( TaxCalculationCustomerDetailsAddressSourceBilling TaxCalculationCustomerDetailsAddressSource = "billing" TaxCalculationCustomerDetailsAddressSourceShipping TaxCalculationCustomerDetailsAddressSource = "shipping" )
List of values that TaxCalculationCustomerDetailsAddressSource can take
type TaxCalculationCustomerDetailsParams ¶
type TaxCalculationCustomerDetailsParams struct { // The customer's postal address (for example, home or business location). Address *AddressParams `form:"address"` // The type of customer address provided. AddressSource *string `form:"address_source"` // The customer's IP address (IPv4 or IPv6). IPAddress *string `form:"ip_address"` // Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. TaxabilityOverride *string `form:"taxability_override"` // The customer's tax IDs. TaxIDs []*TaxCalculationCustomerDetailsTaxIDParams `form:"tax_ids"` }
Details about the customer, including address and tax IDs.
type TaxCalculationCustomerDetailsTaxID ¶
type TaxCalculationCustomerDetailsTaxID struct { // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown` Type TaxCalculationCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` }
The customer's tax IDs (for example, EU VAT numbers).
type TaxCalculationCustomerDetailsTaxIDParams ¶
type TaxCalculationCustomerDetailsTaxIDParams struct { // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` }
The customer's tax IDs.
type TaxCalculationCustomerDetailsTaxIDType ¶
type TaxCalculationCustomerDetailsTaxIDType string
The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`
const ( TaxCalculationCustomerDetailsTaxIDTypeADNRT TaxCalculationCustomerDetailsTaxIDType = "ad_nrt" TaxCalculationCustomerDetailsTaxIDTypeAETRN TaxCalculationCustomerDetailsTaxIDType = "ae_trn" TaxCalculationCustomerDetailsTaxIDTypeARCUIT TaxCalculationCustomerDetailsTaxIDType = "ar_cuit" TaxCalculationCustomerDetailsTaxIDTypeAUABN TaxCalculationCustomerDetailsTaxIDType = "au_abn" TaxCalculationCustomerDetailsTaxIDTypeAUARN TaxCalculationCustomerDetailsTaxIDType = "au_arn" TaxCalculationCustomerDetailsTaxIDTypeBGUIC TaxCalculationCustomerDetailsTaxIDType = "bg_uic" TaxCalculationCustomerDetailsTaxIDTypeBOTIN TaxCalculationCustomerDetailsTaxIDType = "bo_tin" TaxCalculationCustomerDetailsTaxIDTypeBRCNPJ TaxCalculationCustomerDetailsTaxIDType = "br_cnpj" TaxCalculationCustomerDetailsTaxIDTypeBRCPF TaxCalculationCustomerDetailsTaxIDType = "br_cpf" TaxCalculationCustomerDetailsTaxIDTypeCABN TaxCalculationCustomerDetailsTaxIDType = "ca_bn" TaxCalculationCustomerDetailsTaxIDTypeCAGSTHST TaxCalculationCustomerDetailsTaxIDType = "ca_gst_hst" TaxCalculationCustomerDetailsTaxIDTypeCAPSTBC TaxCalculationCustomerDetailsTaxIDType = "ca_pst_bc" TaxCalculationCustomerDetailsTaxIDTypeCAPSTMB TaxCalculationCustomerDetailsTaxIDType = "ca_pst_mb" TaxCalculationCustomerDetailsTaxIDTypeCAPSTSK TaxCalculationCustomerDetailsTaxIDType = "ca_pst_sk" TaxCalculationCustomerDetailsTaxIDTypeCAQST TaxCalculationCustomerDetailsTaxIDType = "ca_qst" TaxCalculationCustomerDetailsTaxIDTypeCHVAT TaxCalculationCustomerDetailsTaxIDType = "ch_vat" TaxCalculationCustomerDetailsTaxIDTypeCLTIN TaxCalculationCustomerDetailsTaxIDType = "cl_tin" TaxCalculationCustomerDetailsTaxIDTypeCNTIN TaxCalculationCustomerDetailsTaxIDType = "cn_tin" TaxCalculationCustomerDetailsTaxIDTypeCONIT TaxCalculationCustomerDetailsTaxIDType = "co_nit" TaxCalculationCustomerDetailsTaxIDTypeCRTIN TaxCalculationCustomerDetailsTaxIDType = "cr_tin" TaxCalculationCustomerDetailsTaxIDTypeDORCN TaxCalculationCustomerDetailsTaxIDType = "do_rcn" TaxCalculationCustomerDetailsTaxIDTypeECRUC TaxCalculationCustomerDetailsTaxIDType = "ec_ruc" TaxCalculationCustomerDetailsTaxIDTypeEGTIN TaxCalculationCustomerDetailsTaxIDType = "eg_tin" TaxCalculationCustomerDetailsTaxIDTypeESCIF TaxCalculationCustomerDetailsTaxIDType = "es_cif" TaxCalculationCustomerDetailsTaxIDTypeEUOSSVAT TaxCalculationCustomerDetailsTaxIDType = "eu_oss_vat" TaxCalculationCustomerDetailsTaxIDTypeEUVAT TaxCalculationCustomerDetailsTaxIDType = "eu_vat" TaxCalculationCustomerDetailsTaxIDTypeGBVAT TaxCalculationCustomerDetailsTaxIDType = "gb_vat" TaxCalculationCustomerDetailsTaxIDTypeGEVAT TaxCalculationCustomerDetailsTaxIDType = "ge_vat" TaxCalculationCustomerDetailsTaxIDTypeHKBR TaxCalculationCustomerDetailsTaxIDType = "hk_br" TaxCalculationCustomerDetailsTaxIDTypeHUTIN TaxCalculationCustomerDetailsTaxIDType = "hu_tin" TaxCalculationCustomerDetailsTaxIDTypeIDNPWP TaxCalculationCustomerDetailsTaxIDType = "id_npwp" TaxCalculationCustomerDetailsTaxIDTypeILVAT TaxCalculationCustomerDetailsTaxIDType = "il_vat" TaxCalculationCustomerDetailsTaxIDTypeINGST TaxCalculationCustomerDetailsTaxIDType = "in_gst" TaxCalculationCustomerDetailsTaxIDTypeISVAT TaxCalculationCustomerDetailsTaxIDType = "is_vat" TaxCalculationCustomerDetailsTaxIDTypeJPCN TaxCalculationCustomerDetailsTaxIDType = "jp_cn" TaxCalculationCustomerDetailsTaxIDTypeJPRN TaxCalculationCustomerDetailsTaxIDType = "jp_rn" TaxCalculationCustomerDetailsTaxIDTypeJPTRN TaxCalculationCustomerDetailsTaxIDType = "jp_trn" TaxCalculationCustomerDetailsTaxIDTypeKEPIN TaxCalculationCustomerDetailsTaxIDType = "ke_pin" TaxCalculationCustomerDetailsTaxIDTypeKRBRN TaxCalculationCustomerDetailsTaxIDType = "kr_brn" TaxCalculationCustomerDetailsTaxIDTypeLIUID TaxCalculationCustomerDetailsTaxIDType = "li_uid" TaxCalculationCustomerDetailsTaxIDTypeMXRFC TaxCalculationCustomerDetailsTaxIDType = "mx_rfc" TaxCalculationCustomerDetailsTaxIDTypeMYFRP TaxCalculationCustomerDetailsTaxIDType = "my_frp" TaxCalculationCustomerDetailsTaxIDTypeMYITN TaxCalculationCustomerDetailsTaxIDType = "my_itn" TaxCalculationCustomerDetailsTaxIDTypeMYSST TaxCalculationCustomerDetailsTaxIDType = "my_sst" TaxCalculationCustomerDetailsTaxIDTypeNOVAT TaxCalculationCustomerDetailsTaxIDType = "no_vat" TaxCalculationCustomerDetailsTaxIDTypeNZGST TaxCalculationCustomerDetailsTaxIDType = "nz_gst" TaxCalculationCustomerDetailsTaxIDTypePERUC TaxCalculationCustomerDetailsTaxIDType = "pe_ruc" TaxCalculationCustomerDetailsTaxIDTypePHTIN TaxCalculationCustomerDetailsTaxIDType = "ph_tin" TaxCalculationCustomerDetailsTaxIDTypeROTIN TaxCalculationCustomerDetailsTaxIDType = "ro_tin" TaxCalculationCustomerDetailsTaxIDTypeRSPIB TaxCalculationCustomerDetailsTaxIDType = "rs_pib" TaxCalculationCustomerDetailsTaxIDTypeRUINN TaxCalculationCustomerDetailsTaxIDType = "ru_inn" TaxCalculationCustomerDetailsTaxIDTypeRUKPP TaxCalculationCustomerDetailsTaxIDType = "ru_kpp" TaxCalculationCustomerDetailsTaxIDTypeSAVAT TaxCalculationCustomerDetailsTaxIDType = "sa_vat" TaxCalculationCustomerDetailsTaxIDTypeSGGST TaxCalculationCustomerDetailsTaxIDType = "sg_gst" TaxCalculationCustomerDetailsTaxIDTypeSGUEN TaxCalculationCustomerDetailsTaxIDType = "sg_uen" TaxCalculationCustomerDetailsTaxIDTypeSITIN TaxCalculationCustomerDetailsTaxIDType = "si_tin" TaxCalculationCustomerDetailsTaxIDTypeSVNIT TaxCalculationCustomerDetailsTaxIDType = "sv_nit" TaxCalculationCustomerDetailsTaxIDTypeTHVAT TaxCalculationCustomerDetailsTaxIDType = "th_vat" TaxCalculationCustomerDetailsTaxIDTypeTRTIN TaxCalculationCustomerDetailsTaxIDType = "tr_tin" TaxCalculationCustomerDetailsTaxIDTypeTWVAT TaxCalculationCustomerDetailsTaxIDType = "tw_vat" TaxCalculationCustomerDetailsTaxIDTypeUAVAT TaxCalculationCustomerDetailsTaxIDType = "ua_vat" TaxCalculationCustomerDetailsTaxIDTypeUnknown TaxCalculationCustomerDetailsTaxIDType = "unknown" TaxCalculationCustomerDetailsTaxIDTypeUSEIN TaxCalculationCustomerDetailsTaxIDType = "us_ein" TaxCalculationCustomerDetailsTaxIDTypeUYRUC TaxCalculationCustomerDetailsTaxIDType = "uy_ruc" TaxCalculationCustomerDetailsTaxIDTypeVERIF TaxCalculationCustomerDetailsTaxIDType = "ve_rif" TaxCalculationCustomerDetailsTaxIDTypeVNTIN TaxCalculationCustomerDetailsTaxIDType = "vn_tin" TaxCalculationCustomerDetailsTaxIDTypeZAVAT TaxCalculationCustomerDetailsTaxIDType = "za_vat" )
List of values that TaxCalculationCustomerDetailsTaxIDType can take
type TaxCalculationCustomerDetailsTaxabilityOverride ¶
type TaxCalculationCustomerDetailsTaxabilityOverride string
The taxability override used for taxation.
const ( TaxCalculationCustomerDetailsTaxabilityOverrideCustomerExempt TaxCalculationCustomerDetailsTaxabilityOverride = "customer_exempt" TaxCalculationCustomerDetailsTaxabilityOverrideNone TaxCalculationCustomerDetailsTaxabilityOverride = "none" TaxCalculationCustomerDetailsTaxabilityOverrideReverseCharge TaxCalculationCustomerDetailsTaxabilityOverride = "reverse_charge" )
List of values that TaxCalculationCustomerDetailsTaxabilityOverride can take
type TaxCalculationLineItem ¶
type TaxCalculationLineItem struct { // The line item amount in integer cents. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. Amount int64 `json:"amount"` // The amount of tax calculated for this line item, in integer cents. AmountTax int64 `json:"amount_tax"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The ID of an existing [Product](https://stripe.com/docs/api/products/object). Product string `json:"product"` // The number of units of the item being purchased. For reversals, this is the quantity reversed. Quantity int64 `json:"quantity"` // A custom identifier for this line item. Reference string `json:"reference"` // Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. TaxBehavior TaxCalculationLineItemTaxBehavior `json:"tax_behavior"` // Detailed account of taxes relevant to this line item. TaxBreakdown []*TaxCalculationLineItemTaxBreakdown `json:"tax_breakdown"` // The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. TaxCode string `json:"tax_code"` }
type TaxCalculationLineItemList ¶
type TaxCalculationLineItemList struct { APIResource ListMeta Data []*TaxCalculationLineItem `json:"data"` }
TaxCalculationLineItemList is a list of CalculationLineItems as retrieved from a list endpoint.
type TaxCalculationLineItemParams ¶
type TaxCalculationLineItemParams struct { // A positive integer in cents representing the line item's total price. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. Amount *int64 `form:"amount"` // If provided, the product's `tax_code` will be used as the line item's `tax_code`. Product *string `form:"product"` // The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25. Quantity *int64 `form:"quantity"` // A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports). Reference *string `form:"reference"` // Specifies whether the `amount` includes taxes. Defaults to `exclusive`. TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings. TaxCode *string `form:"tax_code"` }
A list of items the customer is purchasing.
type TaxCalculationLineItemTaxBehavior ¶
type TaxCalculationLineItemTaxBehavior string
Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
const ( TaxCalculationLineItemTaxBehaviorExclusive TaxCalculationLineItemTaxBehavior = "exclusive" TaxCalculationLineItemTaxBehaviorInclusive TaxCalculationLineItemTaxBehavior = "inclusive" )
List of values that TaxCalculationLineItemTaxBehavior can take
type TaxCalculationLineItemTaxBreakdown ¶
type TaxCalculationLineItemTaxBreakdown struct { // The amount of tax, in integer cents. Amount int64 `json:"amount"` Jurisdiction *TaxCalculationLineItemTaxBreakdownJurisdiction `json:"jurisdiction"` // Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). Sourcing TaxCalculationLineItemTaxBreakdownSourcing `json:"sourcing"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason TaxCalculationLineItemTaxBreakdownTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in integer cents. TaxableAmount int64 `json:"taxable_amount"` // Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. TaxRateDetails *TaxCalculationLineItemTaxBreakdownTaxRateDetails `json:"tax_rate_details"` }
Detailed account of taxes relevant to this line item.
type TaxCalculationLineItemTaxBreakdownJurisdiction ¶
type TaxCalculationLineItemTaxBreakdownJurisdiction struct { // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // A human-readable name for the jurisdiction imposing the tax. DisplayName string `json:"display_name"` // Indicates the level of the jurisdiction imposing the tax. Level TaxCalculationLineItemTaxBreakdownJurisdictionLevel `json:"level"` // [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. State string `json:"state"` }
type TaxCalculationLineItemTaxBreakdownJurisdictionLevel ¶
type TaxCalculationLineItemTaxBreakdownJurisdictionLevel string
Indicates the level of the jurisdiction imposing the tax.
const ( TaxCalculationLineItemTaxBreakdownJurisdictionLevelCity TaxCalculationLineItemTaxBreakdownJurisdictionLevel = "city" TaxCalculationLineItemTaxBreakdownJurisdictionLevelCountry TaxCalculationLineItemTaxBreakdownJurisdictionLevel = "country" TaxCalculationLineItemTaxBreakdownJurisdictionLevelCounty TaxCalculationLineItemTaxBreakdownJurisdictionLevel = "county" TaxCalculationLineItemTaxBreakdownJurisdictionLevelDistrict TaxCalculationLineItemTaxBreakdownJurisdictionLevel = "district" TaxCalculationLineItemTaxBreakdownJurisdictionLevelState TaxCalculationLineItemTaxBreakdownJurisdictionLevel = "state" )
List of values that TaxCalculationLineItemTaxBreakdownJurisdictionLevel can take
type TaxCalculationLineItemTaxBreakdownSourcing ¶
type TaxCalculationLineItemTaxBreakdownSourcing string
Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
const ( TaxCalculationLineItemTaxBreakdownSourcingDestination TaxCalculationLineItemTaxBreakdownSourcing = "destination" TaxCalculationLineItemTaxBreakdownSourcingOrigin TaxCalculationLineItemTaxBreakdownSourcing = "origin" )
List of values that TaxCalculationLineItemTaxBreakdownSourcing can take
type TaxCalculationLineItemTaxBreakdownTaxRateDetails ¶
type TaxCalculationLineItemTaxBreakdownTaxRateDetails struct { // A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". DisplayName string `json:"display_name"` // The tax rate percentage as a string. For example, 8.5% is represented as "8.5". PercentageDecimal string `json:"percentage_decimal"` // The tax type, such as `vat` or `sales_tax`. TaxType TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType `json:"tax_type"` }
Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
type TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType ¶
type TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType string
The tax type, such as `vat` or `sales_tax`.
const ( TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeAmusementTax TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "amusement_tax" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeCommunicationsTax TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "communications_tax" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeGST TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "gst" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeHST TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "hst" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeIGST TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "igst" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeJCT TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "jct" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeLeaseTax TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "lease_tax" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypePST TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "pst" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeQST TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "qst" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeRST TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "rst" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeSalesTax TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "sales_tax" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeVAT TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "vat" )
List of values that TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType can take
type TaxCalculationLineItemTaxBreakdownTaxabilityReason ¶
type TaxCalculationLineItemTaxBreakdownTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( TaxCalculationLineItemTaxBreakdownTaxabilityReasonCustomerExempt TaxCalculationLineItemTaxBreakdownTaxabilityReason = "customer_exempt" TaxCalculationLineItemTaxBreakdownTaxabilityReasonNotCollecting TaxCalculationLineItemTaxBreakdownTaxabilityReason = "not_collecting" TaxCalculationLineItemTaxBreakdownTaxabilityReasonNotSubjectToTax TaxCalculationLineItemTaxBreakdownTaxabilityReason = "not_subject_to_tax" TaxCalculationLineItemTaxBreakdownTaxabilityReasonNotSupported TaxCalculationLineItemTaxBreakdownTaxabilityReason = "not_supported" TaxCalculationLineItemTaxBreakdownTaxabilityReasonPortionProductExempt TaxCalculationLineItemTaxBreakdownTaxabilityReason = "portion_product_exempt" TaxCalculationLineItemTaxBreakdownTaxabilityReasonPortionReducedRated TaxCalculationLineItemTaxBreakdownTaxabilityReason = "portion_reduced_rated" TaxCalculationLineItemTaxBreakdownTaxabilityReasonPortionStandardRated TaxCalculationLineItemTaxBreakdownTaxabilityReason = "portion_standard_rated" TaxCalculationLineItemTaxBreakdownTaxabilityReasonProductExempt TaxCalculationLineItemTaxBreakdownTaxabilityReason = "product_exempt" TaxCalculationLineItemTaxBreakdownTaxabilityReasonProductExemptHoliday TaxCalculationLineItemTaxBreakdownTaxabilityReason = "product_exempt_holiday" TaxCalculationLineItemTaxBreakdownTaxabilityReasonProportionallyRated TaxCalculationLineItemTaxBreakdownTaxabilityReason = "proportionally_rated" TaxCalculationLineItemTaxBreakdownTaxabilityReasonReducedRated TaxCalculationLineItemTaxBreakdownTaxabilityReason = "reduced_rated" TaxCalculationLineItemTaxBreakdownTaxabilityReasonReverseCharge TaxCalculationLineItemTaxBreakdownTaxabilityReason = "reverse_charge" TaxCalculationLineItemTaxBreakdownTaxabilityReasonStandardRated TaxCalculationLineItemTaxBreakdownTaxabilityReason = "standard_rated" TaxCalculationLineItemTaxBreakdownTaxabilityReasonTaxableBasisReduced TaxCalculationLineItemTaxBreakdownTaxabilityReason = "taxable_basis_reduced" TaxCalculationLineItemTaxBreakdownTaxabilityReasonZeroRated TaxCalculationLineItemTaxBreakdownTaxabilityReason = "zero_rated" )
List of values that TaxCalculationLineItemTaxBreakdownTaxabilityReason can take
type TaxCalculationListLineItemsParams ¶
type TaxCalculationListLineItemsParams struct { ListParams `form:"*"` Calculation *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the line items of a persisted tax calculation as a collection.
func (*TaxCalculationListLineItemsParams) AddExpand ¶
func (p *TaxCalculationListLineItemsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TaxCalculationParams ¶
type TaxCalculationParams struct { Params `form:"*"` // 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 `form:"currency"` // The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`. Customer *string `form:"customer"` // Details about the customer, including address and tax IDs. CustomerDetails *TaxCalculationCustomerDetailsParams `form:"customer_details"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A list of items the customer is purchasing. LineItems []*TaxCalculationLineItemParams `form:"line_items"` // Shipping cost details to be used for the calculation. ShippingCost *TaxCalculationShippingCostParams `form:"shipping_cost"` // Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. TaxDate *int64 `form:"tax_date"` }
Calculates tax based on input and returns a Tax Calculation object.
func (*TaxCalculationParams) AddExpand ¶
func (p *TaxCalculationParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TaxCalculationShippingCost ¶
type TaxCalculationShippingCost struct { // The shipping amount in integer cents. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. Amount int64 `json:"amount"` // The amount of tax calculated for shipping, in integer cents. AmountTax int64 `json:"amount_tax"` // The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). ShippingRate string `json:"shipping_rate"` // Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. TaxBehavior TaxCalculationShippingCostTaxBehavior `json:"tax_behavior"` // Detailed account of taxes relevant to shipping cost. TaxBreakdown []*TaxCalculationShippingCostTaxBreakdown `json:"tax_breakdown"` // The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. TaxCode string `json:"tax_code"` }
The shipping cost details for the calculation.
type TaxCalculationShippingCostParams ¶
type TaxCalculationShippingCostParams struct { // A positive integer in cents representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. Amount *int64 `form:"amount"` // If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. ShippingRate *string `form:"shipping_rate"` // Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. TaxBehavior *string `form:"tax_behavior"` // The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://stripe.com/settings/tax) is used. TaxCode *string `form:"tax_code"` }
Shipping cost details to be used for the calculation.
type TaxCalculationShippingCostTaxBehavior ¶
type TaxCalculationShippingCostTaxBehavior string
Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
const ( TaxCalculationShippingCostTaxBehaviorExclusive TaxCalculationShippingCostTaxBehavior = "exclusive" TaxCalculationShippingCostTaxBehaviorInclusive TaxCalculationShippingCostTaxBehavior = "inclusive" )
List of values that TaxCalculationShippingCostTaxBehavior can take
type TaxCalculationShippingCostTaxBreakdown ¶
type TaxCalculationShippingCostTaxBreakdown struct { // The amount of tax, in integer cents. Amount int64 `json:"amount"` Jurisdiction *TaxCalculationShippingCostTaxBreakdownJurisdiction `json:"jurisdiction"` // Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). Sourcing TaxCalculationShippingCostTaxBreakdownSourcing `json:"sourcing"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason TaxCalculationShippingCostTaxBreakdownTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in integer cents. TaxableAmount int64 `json:"taxable_amount"` // Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. TaxRateDetails *TaxCalculationShippingCostTaxBreakdownTaxRateDetails `json:"tax_rate_details"` }
Detailed account of taxes relevant to shipping cost.
type TaxCalculationShippingCostTaxBreakdownJurisdiction ¶
type TaxCalculationShippingCostTaxBreakdownJurisdiction struct { // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // A human-readable name for the jurisdiction imposing the tax. DisplayName string `json:"display_name"` // Indicates the level of the jurisdiction imposing the tax. Level TaxCalculationShippingCostTaxBreakdownJurisdictionLevel `json:"level"` // [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. State string `json:"state"` }
type TaxCalculationShippingCostTaxBreakdownJurisdictionLevel ¶
type TaxCalculationShippingCostTaxBreakdownJurisdictionLevel string
Indicates the level of the jurisdiction imposing the tax.
const ( TaxCalculationShippingCostTaxBreakdownJurisdictionLevelCity TaxCalculationShippingCostTaxBreakdownJurisdictionLevel = "city" TaxCalculationShippingCostTaxBreakdownJurisdictionLevelCountry TaxCalculationShippingCostTaxBreakdownJurisdictionLevel = "country" TaxCalculationShippingCostTaxBreakdownJurisdictionLevelCounty TaxCalculationShippingCostTaxBreakdownJurisdictionLevel = "county" TaxCalculationShippingCostTaxBreakdownJurisdictionLevelDistrict TaxCalculationShippingCostTaxBreakdownJurisdictionLevel = "district" TaxCalculationShippingCostTaxBreakdownJurisdictionLevelState TaxCalculationShippingCostTaxBreakdownJurisdictionLevel = "state" )
List of values that TaxCalculationShippingCostTaxBreakdownJurisdictionLevel can take
type TaxCalculationShippingCostTaxBreakdownSourcing ¶
type TaxCalculationShippingCostTaxBreakdownSourcing string
Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
const ( TaxCalculationShippingCostTaxBreakdownSourcingDestination TaxCalculationShippingCostTaxBreakdownSourcing = "destination" TaxCalculationShippingCostTaxBreakdownSourcingOrigin TaxCalculationShippingCostTaxBreakdownSourcing = "origin" )
List of values that TaxCalculationShippingCostTaxBreakdownSourcing can take
type TaxCalculationShippingCostTaxBreakdownTaxRateDetails ¶
type TaxCalculationShippingCostTaxBreakdownTaxRateDetails struct { // A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". DisplayName string `json:"display_name"` // The tax rate percentage as a string. For example, 8.5% is represented as "8.5". PercentageDecimal string `json:"percentage_decimal"` // The tax type, such as `vat` or `sales_tax`. TaxType TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType `json:"tax_type"` }
Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
type TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType ¶
type TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType string
The tax type, such as `vat` or `sales_tax`.
const ( TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeAmusementTax TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "amusement_tax" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeCommunicationsTax TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "communications_tax" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeGST TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "gst" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeHST TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "hst" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeIGST TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "igst" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeJCT TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "jct" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeLeaseTax TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "lease_tax" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypePST TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "pst" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeQST TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "qst" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeRST TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "rst" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeSalesTax TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "sales_tax" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeVAT TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "vat" )
List of values that TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType can take
type TaxCalculationShippingCostTaxBreakdownTaxabilityReason ¶
type TaxCalculationShippingCostTaxBreakdownTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( TaxCalculationShippingCostTaxBreakdownTaxabilityReasonCustomerExempt TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "customer_exempt" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonNotCollecting TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "not_collecting" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonNotSubjectToTax TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "not_subject_to_tax" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonNotSupported TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "not_supported" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonPortionProductExempt TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "portion_product_exempt" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonPortionReducedRated TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "portion_reduced_rated" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonPortionStandardRated TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "portion_standard_rated" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonProductExempt TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "product_exempt" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonProductExemptHoliday TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "product_exempt_holiday" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonProportionallyRated TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "proportionally_rated" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonReducedRated TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "reduced_rated" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonReverseCharge TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "reverse_charge" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonStandardRated TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "standard_rated" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonTaxableBasisReduced TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "taxable_basis_reduced" TaxCalculationShippingCostTaxBreakdownTaxabilityReasonZeroRated TaxCalculationShippingCostTaxBreakdownTaxabilityReason = "zero_rated" )
List of values that TaxCalculationShippingCostTaxBreakdownTaxabilityReason can take
type TaxCalculationTaxBreakdown ¶
type TaxCalculationTaxBreakdown struct { // The amount of tax, in integer cents. Amount int64 `json:"amount"` // Specifies whether the tax amount is included in the line item amount. Inclusive bool `json:"inclusive"` // The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. TaxabilityReason TaxCalculationTaxBreakdownTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in integer cents. TaxableAmount int64 `json:"taxable_amount"` TaxRateDetails *TaxCalculationTaxBreakdownTaxRateDetails `json:"tax_rate_details"` }
Breakdown of individual tax amounts that add up to the total.
type TaxCalculationTaxBreakdownTaxRateDetails ¶
type TaxCalculationTaxBreakdownTaxRateDetails struct { // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. PercentageDecimal string `json:"percentage_decimal"` // State, county, province, or region. State string `json:"state"` // The tax type, such as `vat` or `sales_tax`. TaxType TaxCalculationTaxBreakdownTaxRateDetailsTaxType `json:"tax_type"` }
type TaxCalculationTaxBreakdownTaxRateDetailsTaxType ¶
type TaxCalculationTaxBreakdownTaxRateDetailsTaxType string
The tax type, such as `vat` or `sales_tax`.
const ( TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeAmusementTax TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "amusement_tax" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeCommunicationsTax TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "communications_tax" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeGST TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "gst" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeHST TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "hst" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeIGST TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "igst" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeJCT TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "jct" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeLeaseTax TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "lease_tax" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypePST TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "pst" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeQST TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "qst" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeRST TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "rst" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeSalesTax TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "sales_tax" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeVAT TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "vat" )
List of values that TaxCalculationTaxBreakdownTaxRateDetailsTaxType can take
type TaxCalculationTaxBreakdownTaxabilityReason ¶
type TaxCalculationTaxBreakdownTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules.
const ( TaxCalculationTaxBreakdownTaxabilityReasonCustomerExempt TaxCalculationTaxBreakdownTaxabilityReason = "customer_exempt" TaxCalculationTaxBreakdownTaxabilityReasonNotCollecting TaxCalculationTaxBreakdownTaxabilityReason = "not_collecting" TaxCalculationTaxBreakdownTaxabilityReasonNotSubjectToTax TaxCalculationTaxBreakdownTaxabilityReason = "not_subject_to_tax" TaxCalculationTaxBreakdownTaxabilityReasonNotSupported TaxCalculationTaxBreakdownTaxabilityReason = "not_supported" TaxCalculationTaxBreakdownTaxabilityReasonPortionProductExempt TaxCalculationTaxBreakdownTaxabilityReason = "portion_product_exempt" TaxCalculationTaxBreakdownTaxabilityReasonPortionReducedRated TaxCalculationTaxBreakdownTaxabilityReason = "portion_reduced_rated" TaxCalculationTaxBreakdownTaxabilityReasonPortionStandardRated TaxCalculationTaxBreakdownTaxabilityReason = "portion_standard_rated" TaxCalculationTaxBreakdownTaxabilityReasonProductExempt TaxCalculationTaxBreakdownTaxabilityReason = "product_exempt" TaxCalculationTaxBreakdownTaxabilityReasonProductExemptHoliday TaxCalculationTaxBreakdownTaxabilityReason = "product_exempt_holiday" TaxCalculationTaxBreakdownTaxabilityReasonProportionallyRated TaxCalculationTaxBreakdownTaxabilityReason = "proportionally_rated" TaxCalculationTaxBreakdownTaxabilityReasonReducedRated TaxCalculationTaxBreakdownTaxabilityReason = "reduced_rated" TaxCalculationTaxBreakdownTaxabilityReasonReverseCharge TaxCalculationTaxBreakdownTaxabilityReason = "reverse_charge" TaxCalculationTaxBreakdownTaxabilityReasonStandardRated TaxCalculationTaxBreakdownTaxabilityReason = "standard_rated" TaxCalculationTaxBreakdownTaxabilityReasonTaxableBasisReduced TaxCalculationTaxBreakdownTaxabilityReason = "taxable_basis_reduced" TaxCalculationTaxBreakdownTaxabilityReasonZeroRated TaxCalculationTaxBreakdownTaxabilityReason = "zero_rated" )
List of values that TaxCalculationTaxBreakdownTaxabilityReason can take
type TaxCode ¶
type TaxCode struct { APIResource // A detailed description of which types of products the tax code represents. Description string `json:"description"` // Unique identifier for the object. ID string `json:"id"` // A short name for the tax code. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` }
[Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.
func (*TaxCode) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a TaxCode. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type TaxCodeList ¶
type TaxCodeList struct { APIResource ListMeta Data []*TaxCode `json:"data"` }
TaxCodeList is a list of TaxCodes as retrieved from a list endpoint.
type TaxCodeListParams ¶
type TaxCodeListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
func (*TaxCodeListParams) AddExpand ¶
func (p *TaxCodeListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TaxCodeParams ¶
type TaxCodeParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.
func (*TaxCodeParams) AddExpand ¶
func (p *TaxCodeParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TaxDeductedAtSource ¶
type TaxDeductedAtSource struct { // Unique identifier for the object. ID string `json:"id"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. PeriodEnd int64 `json:"period_end"` // The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. PeriodStart int64 `json:"period_start"` // The TAN that was supplied to Stripe when TDS was assessed TaxDeductionAccountNumber string `json:"tax_deduction_account_number"` }
func (*TaxDeductedAtSource) UnmarshalJSON ¶
func (t *TaxDeductedAtSource) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a TaxDeductedAtSource. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type TaxID ¶
type TaxID struct { APIResource // Two-letter ISO code representing the country of the tax ID. Country string `json:"country"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // ID of the customer. Customer *Customer `json:"customer"` Deleted bool `json:"deleted"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` Type TaxIDType `json:"type"` // Value of the tax ID. Value string `json:"value"` // Tax ID verification information. Verification *TaxIDVerification `json:"verification"` }
You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers) or account. Customer and account tax IDs get displayed on related invoices and credit notes.
Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids)
func (*TaxID) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a TaxID. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type TaxIDList ¶
type TaxIDList struct { APIResource ListMeta Data []*TaxID `json:"data"` }
TaxIDList is a list of TaxIds as retrieved from a list endpoint.
type TaxIDListParams ¶
type TaxIDListParams struct { ListParams `form:"*"` Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of tax IDs for a customer.
func (*TaxIDListParams) AddExpand ¶
func (p *TaxIDListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TaxIDParams ¶
type TaxIDParams struct { Params `form:"*"` Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` }
Creates a new tax_id object for a customer.
func (*TaxIDParams) AddExpand ¶
func (p *TaxIDParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TaxIDType ¶
type TaxIDType string
Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown`
const ( TaxIDTypeADNRT TaxIDType = "ad_nrt" TaxIDTypeAETRN TaxIDType = "ae_trn" TaxIDTypeARCUIT TaxIDType = "ar_cuit" TaxIDTypeAUABN TaxIDType = "au_abn" TaxIDTypeAUARN TaxIDType = "au_arn" TaxIDTypeBGUIC TaxIDType = "bg_uic" TaxIDTypeBOTIN TaxIDType = "bo_tin" TaxIDTypeBRCNPJ TaxIDType = "br_cnpj" TaxIDTypeBRCPF TaxIDType = "br_cpf" TaxIDTypeCABN TaxIDType = "ca_bn" TaxIDTypeCAGSTHST TaxIDType = "ca_gst_hst" TaxIDTypeCAPSTBC TaxIDType = "ca_pst_bc" TaxIDTypeCAPSTMB TaxIDType = "ca_pst_mb" TaxIDTypeCAPSTSK TaxIDType = "ca_pst_sk" TaxIDTypeCAQST TaxIDType = "ca_qst" TaxIDTypeCHVAT TaxIDType = "ch_vat" TaxIDTypeCLTIN TaxIDType = "cl_tin" TaxIDTypeCNTIN TaxIDType = "cn_tin" TaxIDTypeCONIT TaxIDType = "co_nit" TaxIDTypeCRTIN TaxIDType = "cr_tin" TaxIDTypeDORCN TaxIDType = "do_rcn" TaxIDTypeECRUC TaxIDType = "ec_ruc" TaxIDTypeEGTIN TaxIDType = "eg_tin" TaxIDTypeESCIF TaxIDType = "es_cif" TaxIDTypeEUOSSVAT TaxIDType = "eu_oss_vat" TaxIDTypeEUVAT TaxIDType = "eu_vat" TaxIDTypeGBVAT TaxIDType = "gb_vat" TaxIDTypeGEVAT TaxIDType = "ge_vat" TaxIDTypeHKBR TaxIDType = "hk_br" TaxIDTypeHUTIN TaxIDType = "hu_tin" TaxIDTypeIDNPWP TaxIDType = "id_npwp" TaxIDTypeILVAT TaxIDType = "il_vat" TaxIDTypeINGST TaxIDType = "in_gst" TaxIDTypeISVAT TaxIDType = "is_vat" TaxIDTypeJPCN TaxIDType = "jp_cn" TaxIDTypeJPRN TaxIDType = "jp_rn" TaxIDTypeJPTRN TaxIDType = "jp_trn" TaxIDTypeKEPIN TaxIDType = "ke_pin" TaxIDTypeKRBRN TaxIDType = "kr_brn" TaxIDTypeLIUID TaxIDType = "li_uid" TaxIDTypeMXRFC TaxIDType = "mx_rfc" TaxIDTypeMYFRP TaxIDType = "my_frp" TaxIDTypeMYITN TaxIDType = "my_itn" TaxIDTypeMYSST TaxIDType = "my_sst" TaxIDTypeNOVAT TaxIDType = "no_vat" TaxIDTypeNZGST TaxIDType = "nz_gst" TaxIDTypePERUC TaxIDType = "pe_ruc" TaxIDTypePHTIN TaxIDType = "ph_tin" TaxIDTypeROTIN TaxIDType = "ro_tin" TaxIDTypeRSPIB TaxIDType = "rs_pib" TaxIDTypeRUINN TaxIDType = "ru_inn" TaxIDTypeRUKPP TaxIDType = "ru_kpp" TaxIDTypeSAVAT TaxIDType = "sa_vat" TaxIDTypeSGGST TaxIDType = "sg_gst" TaxIDTypeSGUEN TaxIDType = "sg_uen" TaxIDTypeSITIN TaxIDType = "si_tin" TaxIDTypeSVNIT TaxIDType = "sv_nit" TaxIDTypeTHVAT TaxIDType = "th_vat" TaxIDTypeTRTIN TaxIDType = "tr_tin" TaxIDTypeTWVAT TaxIDType = "tw_vat" TaxIDTypeUAVAT TaxIDType = "ua_vat" TaxIDTypeUnknown TaxIDType = "unknown" TaxIDTypeUSEIN TaxIDType = "us_ein" TaxIDTypeUYRUC TaxIDType = "uy_ruc" TaxIDTypeVERIF TaxIDType = "ve_rif" TaxIDTypeVNTIN TaxIDType = "vn_tin" TaxIDTypeZAVAT TaxIDType = "za_vat" )
List of values that TaxIDType can take
type TaxIDVerification ¶
type TaxIDVerification struct { // Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. Status TaxIDVerificationStatus `json:"status"` // Verified address. VerifiedAddress string `json:"verified_address"` // Verified name. VerifiedName string `json:"verified_name"` }
Tax ID verification information.
type TaxIDVerificationStatus ¶
type TaxIDVerificationStatus string
Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.
const ( TaxIDVerificationStatusPending TaxIDVerificationStatus = "pending" TaxIDVerificationStatusUnverified TaxIDVerificationStatus = "unverified" TaxIDVerificationStatusVerified TaxIDVerificationStatus = "verified" )
List of values that TaxIDVerificationStatus can take
type TaxRate ¶
type TaxRate struct { APIResource // Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. Active bool `json:"active"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. Description string `json:"description"` // The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. DisplayName string `json:"display_name"` // Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, // this percentage reflects the rate actually used to calculate tax based on the product's taxability // and whether the user is registered to collect taxes in the corresponding jurisdiction. EffectivePercentage float64 `json:"effective_percentage"` // Unique identifier for the object. ID string `json:"id"` // This specifies if the tax rate is inclusive or exclusive. Inclusive bool `json:"inclusive"` // The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. Jurisdiction string `json:"jurisdiction"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. Percentage float64 `json:"percentage"` // [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. State string `json:"state"` // The high-level tax type, such as `vat` or `sales_tax`. TaxType TaxRateTaxType `json:"tax_type"` }
Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
func (*TaxRate) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a TaxRate. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type TaxRateList ¶
type TaxRateList struct { APIResource ListMeta Data []*TaxRate `json:"data"` }
TaxRateList is a list of TaxRates as retrieved from a list endpoint.
type TaxRateListParams ¶
type TaxRateListParams struct { ListParams `form:"*"` // Optional flag to filter by tax rates that are either active or inactive (archived). Active *bool `form:"active"` // Optional range for filtering created date. Created *int64 `form:"created"` // Optional range for filtering created date. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). Inclusive *bool `form:"inclusive"` }
Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.
func (*TaxRateListParams) AddExpand ¶
func (p *TaxRateListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TaxRateParams ¶
type TaxRateParams struct { Params `form:"*"` // Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. Active *bool `form:"active"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country *string `form:"country"` // An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. Description *string `form:"description"` // The display name of the tax rate, which will be shown to users. DisplayName *string `form:"display_name"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // This specifies if the tax rate is inclusive or exclusive. Inclusive *bool `form:"inclusive"` // The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. Jurisdiction *string `form:"jurisdiction"` // 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`. Metadata map[string]string `form:"metadata"` // This represents the tax rate percent out of 100. Percentage *float64 `form:"percentage"` // [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. State *string `form:"state"` // The high-level tax type, such as `vat` or `sales_tax`. TaxType *string `form:"tax_type"` }
Creates a new tax rate.
func (*TaxRateParams) AddExpand ¶
func (p *TaxRateParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TaxRateParams) AddMetadata ¶
func (p *TaxRateParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TaxRateTaxType ¶
type TaxRateTaxType string
The high-level tax type, such as `vat` or `sales_tax`.
const ( TaxRateTaxTypeAmusementTax TaxRateTaxType = "amusement_tax" TaxRateTaxTypeCommunicationsTax TaxRateTaxType = "communications_tax" TaxRateTaxTypeGST TaxRateTaxType = "gst" TaxRateTaxTypeHST TaxRateTaxType = "hst" TaxRateTaxTypeIGST TaxRateTaxType = "igst" TaxRateTaxTypeJCT TaxRateTaxType = "jct" TaxRateTaxTypeLeaseTax TaxRateTaxType = "lease_tax" TaxRateTaxTypePST TaxRateTaxType = "pst" TaxRateTaxTypeQST TaxRateTaxType = "qst" TaxRateTaxTypeRST TaxRateTaxType = "rst" TaxRateTaxTypeSalesTax TaxRateTaxType = "sales_tax" TaxRateTaxTypeServiceTax TaxRateTaxType = "service_tax" TaxRateTaxTypeVAT TaxRateTaxType = "vat" )
List of values that TaxRateTaxType can take
type TaxSettings ¶
type TaxSettings struct { APIResource Defaults *TaxSettingsDefaults `json:"defaults"` // The place where your business is located. HeadOffice *TaxSettingsHeadOffice `json:"head_office"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The `active` status indicates you have all required settings to calculate tax. A status can transition out of `active` when new required settings are introduced. Status TaxSettingsStatus `json:"status"` StatusDetails *TaxSettingsStatusDetails `json:"status_details"` }
You can use Tax `Settings` to manage configurations used by Stripe Tax calculations.
Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api)
type TaxSettingsDefaults ¶
type TaxSettingsDefaults struct { // Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. TaxBehavior TaxSettingsDefaultsTaxBehavior `json:"tax_behavior"` // Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. TaxCode string `json:"tax_code"` }
type TaxSettingsDefaultsParams ¶
type TaxSettingsDefaultsParams struct { // Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. TaxCode *string `form:"tax_code"` }
Default configuration to be used on Stripe Tax calculations.
type TaxSettingsDefaultsTaxBehavior ¶
type TaxSettingsDefaultsTaxBehavior string
Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior.
const ( TaxSettingsDefaultsTaxBehaviorExclusive TaxSettingsDefaultsTaxBehavior = "exclusive" TaxSettingsDefaultsTaxBehaviorInclusive TaxSettingsDefaultsTaxBehavior = "inclusive" TaxSettingsDefaultsTaxBehaviorInferredByCurrency TaxSettingsDefaultsTaxBehavior = "inferred_by_currency" )
List of values that TaxSettingsDefaultsTaxBehavior can take
type TaxSettingsHeadOffice ¶
type TaxSettingsHeadOffice struct {
Address *Address `json:"address"`
}
The place where your business is located.
type TaxSettingsHeadOfficeParams ¶
type TaxSettingsHeadOfficeParams struct { // The location of the business for tax purposes. Address *AddressParams `form:"address"` }
The place where your business is located.
type TaxSettingsParams ¶
type TaxSettingsParams struct { Params `form:"*"` // Default configuration to be used on Stripe Tax calculations. Defaults *TaxSettingsDefaultsParams `form:"defaults"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The place where your business is located. HeadOffice *TaxSettingsHeadOfficeParams `form:"head_office"` }
Retrieves Tax Settings for a merchant.
func (*TaxSettingsParams) AddExpand ¶
func (p *TaxSettingsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TaxSettingsStatus ¶
type TaxSettingsStatus string
The `active` status indicates you have all required settings to calculate tax. A status can transition out of `active` when new required settings are introduced.
const ( TaxSettingsStatusActive TaxSettingsStatus = "active" TaxSettingsStatusPending TaxSettingsStatus = "pending" )
List of values that TaxSettingsStatus can take
type TaxSettingsStatusDetails ¶
type TaxSettingsStatusDetails struct { Active *TaxSettingsStatusDetailsActive `json:"active"` Pending *TaxSettingsStatusDetailsPending `json:"pending"` }
type TaxSettingsStatusDetailsActive ¶
type TaxSettingsStatusDetailsActive struct{}
type TaxSettingsStatusDetailsPending ¶
type TaxSettingsStatusDetailsPending struct { // The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call. MissingFields []string `json:"missing_fields"` }
type TaxTransaction ¶
type TaxTransaction struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. Customer string `json:"customer"` CustomerDetails *TaxTransactionCustomerDetails `json:"customer_details"` // Unique identifier for the transaction. ID string `json:"id"` // The tax collected or refunded, by line item. LineItems *TaxTransactionLineItemList `json:"line_items"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // A custom unique identifier, such as 'myOrder_123'. Reference string `json:"reference"` // If `type=reversal`, contains information about what was reversed. Reversal *TaxTransactionReversal `json:"reversal"` // The shipping cost details for the transaction. ShippingCost *TaxTransactionShippingCost `json:"shipping_cost"` // Timestamp of date at which the tax rules and rates in effect applies for the calculation. TaxDate int64 `json:"tax_date"` // If `reversal`, this transaction reverses an earlier transaction. Type TaxTransactionType `json:"type"` }
A Tax Transaction records the tax collected from or refunded to your customer.
Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction)
type TaxTransactionCreateFromCalculationParams ¶
type TaxTransactionCreateFromCalculationParams struct { Params `form:"*"` // Tax Calculation ID to be used as input when creating the transaction. Calculation *string `form:"calculation"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals. Reference *string `form:"reference"` }
Creates a Tax Transaction from a calculation.
func (*TaxTransactionCreateFromCalculationParams) AddExpand ¶
func (p *TaxTransactionCreateFromCalculationParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TaxTransactionCreateFromCalculationParams) AddMetadata ¶
func (p *TaxTransactionCreateFromCalculationParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TaxTransactionCreateReversalLineItemParams ¶
type TaxTransactionCreateReversalLineItemParams struct { // The amount to reverse, in negative integer cents. Amount *int64 `form:"amount"` // The amount of tax to reverse, in negative integer cents. AmountTax *int64 `form:"amount_tax"` // 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. Metadata map[string]string `form:"metadata"` // The `id` of the line item to reverse in the original transaction. OriginalLineItem *string `form:"original_line_item"` // The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed. Quantity *int64 `form:"quantity"` // A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. Reference *string `form:"reference"` }
The line item amounts to reverse.
func (*TaxTransactionCreateReversalLineItemParams) AddMetadata ¶
func (p *TaxTransactionCreateReversalLineItemParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TaxTransactionCreateReversalParams ¶
type TaxTransactionCreateReversalParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A flat amount to reverse across the entire transaction, in negative integer cents. This value represents the total amount to refund from the transaction, including taxes. FlatAmount *int64 `form:"flat_amount"` // The line item amounts to reverse. LineItems []*TaxTransactionCreateReversalLineItemParams `form:"line_items"` // 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`. Metadata map[string]string `form:"metadata"` // If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. Mode *string `form:"mode"` // The ID of the Transaction to partially or fully reverse. OriginalTransaction *string `form:"original_transaction"` // A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports). Reference *string `form:"reference"` // The shipping cost to reverse. ShippingCost *TaxTransactionCreateReversalShippingCostParams `form:"shipping_cost"` }
Partially or fully reverses a previously created Transaction.
func (*TaxTransactionCreateReversalParams) AddExpand ¶
func (p *TaxTransactionCreateReversalParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TaxTransactionCreateReversalParams) AddMetadata ¶
func (p *TaxTransactionCreateReversalParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TaxTransactionCreateReversalShippingCostParams ¶
type TaxTransactionCreateReversalShippingCostParams struct { // The amount to reverse, in negative integer cents. Amount *int64 `form:"amount"` // The amount of tax to reverse, in negative integer cents. AmountTax *int64 `form:"amount_tax"` }
The shipping cost to reverse.
type TaxTransactionCustomerDetails ¶
type TaxTransactionCustomerDetails struct { // The customer's postal address (for example, home or business location). Address *Address `json:"address"` // The type of customer address provided. AddressSource TaxTransactionCustomerDetailsAddressSource `json:"address_source"` // The customer's IP address (IPv4 or IPv6). IPAddress string `json:"ip_address"` // The taxability override used for taxation. TaxabilityOverride TaxTransactionCustomerDetailsTaxabilityOverride `json:"taxability_override"` // The customer's tax IDs (for example, EU VAT numbers). TaxIDs []*TaxTransactionCustomerDetailsTaxID `json:"tax_ids"` }
type TaxTransactionCustomerDetailsAddressSource ¶
type TaxTransactionCustomerDetailsAddressSource string
The type of customer address provided.
const ( TaxTransactionCustomerDetailsAddressSourceBilling TaxTransactionCustomerDetailsAddressSource = "billing" TaxTransactionCustomerDetailsAddressSourceShipping TaxTransactionCustomerDetailsAddressSource = "shipping" )
List of values that TaxTransactionCustomerDetailsAddressSource can take
type TaxTransactionCustomerDetailsTaxID ¶
type TaxTransactionCustomerDetailsTaxID struct { // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown` Type TaxTransactionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` }
The customer's tax IDs (for example, EU VAT numbers).
type TaxTransactionCustomerDetailsTaxIDType ¶
type TaxTransactionCustomerDetailsTaxIDType string
The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`
const ( TaxTransactionCustomerDetailsTaxIDTypeADNRT TaxTransactionCustomerDetailsTaxIDType = "ad_nrt" TaxTransactionCustomerDetailsTaxIDTypeAETRN TaxTransactionCustomerDetailsTaxIDType = "ae_trn" TaxTransactionCustomerDetailsTaxIDTypeARCUIT TaxTransactionCustomerDetailsTaxIDType = "ar_cuit" TaxTransactionCustomerDetailsTaxIDTypeAUABN TaxTransactionCustomerDetailsTaxIDType = "au_abn" TaxTransactionCustomerDetailsTaxIDTypeAUARN TaxTransactionCustomerDetailsTaxIDType = "au_arn" TaxTransactionCustomerDetailsTaxIDTypeBGUIC TaxTransactionCustomerDetailsTaxIDType = "bg_uic" TaxTransactionCustomerDetailsTaxIDTypeBOTIN TaxTransactionCustomerDetailsTaxIDType = "bo_tin" TaxTransactionCustomerDetailsTaxIDTypeBRCNPJ TaxTransactionCustomerDetailsTaxIDType = "br_cnpj" TaxTransactionCustomerDetailsTaxIDTypeBRCPF TaxTransactionCustomerDetailsTaxIDType = "br_cpf" TaxTransactionCustomerDetailsTaxIDTypeCABN TaxTransactionCustomerDetailsTaxIDType = "ca_bn" TaxTransactionCustomerDetailsTaxIDTypeCAGSTHST TaxTransactionCustomerDetailsTaxIDType = "ca_gst_hst" TaxTransactionCustomerDetailsTaxIDTypeCAPSTBC TaxTransactionCustomerDetailsTaxIDType = "ca_pst_bc" TaxTransactionCustomerDetailsTaxIDTypeCAPSTMB TaxTransactionCustomerDetailsTaxIDType = "ca_pst_mb" TaxTransactionCustomerDetailsTaxIDTypeCAPSTSK TaxTransactionCustomerDetailsTaxIDType = "ca_pst_sk" TaxTransactionCustomerDetailsTaxIDTypeCAQST TaxTransactionCustomerDetailsTaxIDType = "ca_qst" TaxTransactionCustomerDetailsTaxIDTypeCHVAT TaxTransactionCustomerDetailsTaxIDType = "ch_vat" TaxTransactionCustomerDetailsTaxIDTypeCLTIN TaxTransactionCustomerDetailsTaxIDType = "cl_tin" TaxTransactionCustomerDetailsTaxIDTypeCNTIN TaxTransactionCustomerDetailsTaxIDType = "cn_tin" TaxTransactionCustomerDetailsTaxIDTypeCONIT TaxTransactionCustomerDetailsTaxIDType = "co_nit" TaxTransactionCustomerDetailsTaxIDTypeCRTIN TaxTransactionCustomerDetailsTaxIDType = "cr_tin" TaxTransactionCustomerDetailsTaxIDTypeDORCN TaxTransactionCustomerDetailsTaxIDType = "do_rcn" TaxTransactionCustomerDetailsTaxIDTypeECRUC TaxTransactionCustomerDetailsTaxIDType = "ec_ruc" TaxTransactionCustomerDetailsTaxIDTypeEGTIN TaxTransactionCustomerDetailsTaxIDType = "eg_tin" TaxTransactionCustomerDetailsTaxIDTypeESCIF TaxTransactionCustomerDetailsTaxIDType = "es_cif" TaxTransactionCustomerDetailsTaxIDTypeEUOSSVAT TaxTransactionCustomerDetailsTaxIDType = "eu_oss_vat" TaxTransactionCustomerDetailsTaxIDTypeEUVAT TaxTransactionCustomerDetailsTaxIDType = "eu_vat" TaxTransactionCustomerDetailsTaxIDTypeGBVAT TaxTransactionCustomerDetailsTaxIDType = "gb_vat" TaxTransactionCustomerDetailsTaxIDTypeGEVAT TaxTransactionCustomerDetailsTaxIDType = "ge_vat" TaxTransactionCustomerDetailsTaxIDTypeHKBR TaxTransactionCustomerDetailsTaxIDType = "hk_br" TaxTransactionCustomerDetailsTaxIDTypeHUTIN TaxTransactionCustomerDetailsTaxIDType = "hu_tin" TaxTransactionCustomerDetailsTaxIDTypeIDNPWP TaxTransactionCustomerDetailsTaxIDType = "id_npwp" TaxTransactionCustomerDetailsTaxIDTypeILVAT TaxTransactionCustomerDetailsTaxIDType = "il_vat" TaxTransactionCustomerDetailsTaxIDTypeINGST TaxTransactionCustomerDetailsTaxIDType = "in_gst" TaxTransactionCustomerDetailsTaxIDTypeISVAT TaxTransactionCustomerDetailsTaxIDType = "is_vat" TaxTransactionCustomerDetailsTaxIDTypeJPCN TaxTransactionCustomerDetailsTaxIDType = "jp_cn" TaxTransactionCustomerDetailsTaxIDTypeJPRN TaxTransactionCustomerDetailsTaxIDType = "jp_rn" TaxTransactionCustomerDetailsTaxIDTypeJPTRN TaxTransactionCustomerDetailsTaxIDType = "jp_trn" TaxTransactionCustomerDetailsTaxIDTypeKEPIN TaxTransactionCustomerDetailsTaxIDType = "ke_pin" TaxTransactionCustomerDetailsTaxIDTypeKRBRN TaxTransactionCustomerDetailsTaxIDType = "kr_brn" TaxTransactionCustomerDetailsTaxIDTypeLIUID TaxTransactionCustomerDetailsTaxIDType = "li_uid" TaxTransactionCustomerDetailsTaxIDTypeMXRFC TaxTransactionCustomerDetailsTaxIDType = "mx_rfc" TaxTransactionCustomerDetailsTaxIDTypeMYFRP TaxTransactionCustomerDetailsTaxIDType = "my_frp" TaxTransactionCustomerDetailsTaxIDTypeMYITN TaxTransactionCustomerDetailsTaxIDType = "my_itn" TaxTransactionCustomerDetailsTaxIDTypeMYSST TaxTransactionCustomerDetailsTaxIDType = "my_sst" TaxTransactionCustomerDetailsTaxIDTypeNOVAT TaxTransactionCustomerDetailsTaxIDType = "no_vat" TaxTransactionCustomerDetailsTaxIDTypeNZGST TaxTransactionCustomerDetailsTaxIDType = "nz_gst" TaxTransactionCustomerDetailsTaxIDTypePERUC TaxTransactionCustomerDetailsTaxIDType = "pe_ruc" TaxTransactionCustomerDetailsTaxIDTypePHTIN TaxTransactionCustomerDetailsTaxIDType = "ph_tin" TaxTransactionCustomerDetailsTaxIDTypeROTIN TaxTransactionCustomerDetailsTaxIDType = "ro_tin" TaxTransactionCustomerDetailsTaxIDTypeRSPIB TaxTransactionCustomerDetailsTaxIDType = "rs_pib" TaxTransactionCustomerDetailsTaxIDTypeRUINN TaxTransactionCustomerDetailsTaxIDType = "ru_inn" TaxTransactionCustomerDetailsTaxIDTypeRUKPP TaxTransactionCustomerDetailsTaxIDType = "ru_kpp" TaxTransactionCustomerDetailsTaxIDTypeSAVAT TaxTransactionCustomerDetailsTaxIDType = "sa_vat" TaxTransactionCustomerDetailsTaxIDTypeSGGST TaxTransactionCustomerDetailsTaxIDType = "sg_gst" TaxTransactionCustomerDetailsTaxIDTypeSGUEN TaxTransactionCustomerDetailsTaxIDType = "sg_uen" TaxTransactionCustomerDetailsTaxIDTypeSITIN TaxTransactionCustomerDetailsTaxIDType = "si_tin" TaxTransactionCustomerDetailsTaxIDTypeSVNIT TaxTransactionCustomerDetailsTaxIDType = "sv_nit" TaxTransactionCustomerDetailsTaxIDTypeTHVAT TaxTransactionCustomerDetailsTaxIDType = "th_vat" TaxTransactionCustomerDetailsTaxIDTypeTRTIN TaxTransactionCustomerDetailsTaxIDType = "tr_tin" TaxTransactionCustomerDetailsTaxIDTypeTWVAT TaxTransactionCustomerDetailsTaxIDType = "tw_vat" TaxTransactionCustomerDetailsTaxIDTypeUAVAT TaxTransactionCustomerDetailsTaxIDType = "ua_vat" TaxTransactionCustomerDetailsTaxIDTypeUnknown TaxTransactionCustomerDetailsTaxIDType = "unknown" TaxTransactionCustomerDetailsTaxIDTypeUSEIN TaxTransactionCustomerDetailsTaxIDType = "us_ein" TaxTransactionCustomerDetailsTaxIDTypeUYRUC TaxTransactionCustomerDetailsTaxIDType = "uy_ruc" TaxTransactionCustomerDetailsTaxIDTypeVERIF TaxTransactionCustomerDetailsTaxIDType = "ve_rif" TaxTransactionCustomerDetailsTaxIDTypeVNTIN TaxTransactionCustomerDetailsTaxIDType = "vn_tin" TaxTransactionCustomerDetailsTaxIDTypeZAVAT TaxTransactionCustomerDetailsTaxIDType = "za_vat" )
List of values that TaxTransactionCustomerDetailsTaxIDType can take
type TaxTransactionCustomerDetailsTaxabilityOverride ¶
type TaxTransactionCustomerDetailsTaxabilityOverride string
The taxability override used for taxation.
const ( TaxTransactionCustomerDetailsTaxabilityOverrideCustomerExempt TaxTransactionCustomerDetailsTaxabilityOverride = "customer_exempt" TaxTransactionCustomerDetailsTaxabilityOverrideNone TaxTransactionCustomerDetailsTaxabilityOverride = "none" TaxTransactionCustomerDetailsTaxabilityOverrideReverseCharge TaxTransactionCustomerDetailsTaxabilityOverride = "reverse_charge" )
List of values that TaxTransactionCustomerDetailsTaxabilityOverride can take
type TaxTransactionLineItem ¶
type TaxTransactionLineItem struct { // The line item amount in integer cents. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. Amount int64 `json:"amount"` // The amount of tax calculated for this line item, in integer cents. AmountTax int64 `json:"amount_tax"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The ID of an existing [Product](https://stripe.com/docs/api/products/object). Product string `json:"product"` // The number of units of the item being purchased. For reversals, this is the quantity reversed. Quantity int64 `json:"quantity"` // A custom identifier for this line item in the transaction. Reference string `json:"reference"` // If `type=reversal`, contains information about what was reversed. Reversal *TaxTransactionLineItemReversal `json:"reversal"` // Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. TaxBehavior TaxTransactionLineItemTaxBehavior `json:"tax_behavior"` // The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. TaxCode string `json:"tax_code"` // If `reversal`, this line item reverses an earlier transaction. Type TaxTransactionLineItemType `json:"type"` }
type TaxTransactionLineItemList ¶
type TaxTransactionLineItemList struct { APIResource ListMeta Data []*TaxTransactionLineItem `json:"data"` }
TaxTransactionLineItemList is a list of TransactionLineItems as retrieved from a list endpoint.
type TaxTransactionLineItemReversal ¶
type TaxTransactionLineItemReversal struct { // The `id` of the line item to reverse in the original transaction. OriginalLineItem string `json:"original_line_item"` }
If `type=reversal`, contains information about what was reversed.
type TaxTransactionLineItemTaxBehavior ¶
type TaxTransactionLineItemTaxBehavior string
Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
const ( TaxTransactionLineItemTaxBehaviorExclusive TaxTransactionLineItemTaxBehavior = "exclusive" TaxTransactionLineItemTaxBehaviorInclusive TaxTransactionLineItemTaxBehavior = "inclusive" )
List of values that TaxTransactionLineItemTaxBehavior can take
type TaxTransactionLineItemType ¶
type TaxTransactionLineItemType string
If `reversal`, this line item reverses an earlier transaction.
const ( TaxTransactionLineItemTypeReversal TaxTransactionLineItemType = "reversal" TaxTransactionLineItemTypeTransaction TaxTransactionLineItemType = "transaction" )
List of values that TaxTransactionLineItemType can take
type TaxTransactionListLineItemsParams ¶
type TaxTransactionListLineItemsParams struct { ListParams `form:"*"` Transaction *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the line items of a committed standalone transaction as a collection.
func (*TaxTransactionListLineItemsParams) AddExpand ¶
func (p *TaxTransactionListLineItemsParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TaxTransactionParams ¶
type TaxTransactionParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves a Tax Transaction object.
func (*TaxTransactionParams) AddExpand ¶
func (p *TaxTransactionParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TaxTransactionReversal ¶
type TaxTransactionReversal struct { // The `id` of the reversed `Transaction` object. OriginalTransaction string `json:"original_transaction"` }
If `type=reversal`, contains information about what was reversed.
type TaxTransactionShippingCost ¶
type TaxTransactionShippingCost struct { // The shipping amount in integer cents. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. Amount int64 `json:"amount"` // The amount of tax calculated for shipping, in integer cents. AmountTax int64 `json:"amount_tax"` // The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). ShippingRate string `json:"shipping_rate"` // Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. TaxBehavior TaxTransactionShippingCostTaxBehavior `json:"tax_behavior"` // Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.) TaxBreakdown []*TaxTransactionShippingCostTaxBreakdown `json:"tax_breakdown"` // The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. TaxCode string `json:"tax_code"` }
The shipping cost details for the transaction.
type TaxTransactionShippingCostTaxBehavior ¶
type TaxTransactionShippingCostTaxBehavior string
Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
const ( TaxTransactionShippingCostTaxBehaviorExclusive TaxTransactionShippingCostTaxBehavior = "exclusive" TaxTransactionShippingCostTaxBehaviorInclusive TaxTransactionShippingCostTaxBehavior = "inclusive" )
List of values that TaxTransactionShippingCostTaxBehavior can take
type TaxTransactionShippingCostTaxBreakdown ¶
type TaxTransactionShippingCostTaxBreakdown struct { // The amount of tax, in integer cents. Amount int64 `json:"amount"` Jurisdiction *TaxTransactionShippingCostTaxBreakdownJurisdiction `json:"jurisdiction"` // Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). Sourcing TaxTransactionShippingCostTaxBreakdownSourcing `json:"sourcing"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason TaxTransactionShippingCostTaxBreakdownTaxabilityReason `json:"taxability_reason"` // The amount on which tax is calculated, in integer cents. TaxableAmount int64 `json:"taxable_amount"` // Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. TaxRateDetails *TaxTransactionShippingCostTaxBreakdownTaxRateDetails `json:"tax_rate_details"` }
Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.)
type TaxTransactionShippingCostTaxBreakdownJurisdiction ¶
type TaxTransactionShippingCostTaxBreakdownJurisdiction struct { // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // A human-readable name for the jurisdiction imposing the tax. DisplayName string `json:"display_name"` // Indicates the level of the jurisdiction imposing the tax. Level TaxTransactionShippingCostTaxBreakdownJurisdictionLevel `json:"level"` // [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. State string `json:"state"` }
type TaxTransactionShippingCostTaxBreakdownJurisdictionLevel ¶
type TaxTransactionShippingCostTaxBreakdownJurisdictionLevel string
Indicates the level of the jurisdiction imposing the tax.
const ( TaxTransactionShippingCostTaxBreakdownJurisdictionLevelCity TaxTransactionShippingCostTaxBreakdownJurisdictionLevel = "city" TaxTransactionShippingCostTaxBreakdownJurisdictionLevelCountry TaxTransactionShippingCostTaxBreakdownJurisdictionLevel = "country" TaxTransactionShippingCostTaxBreakdownJurisdictionLevelCounty TaxTransactionShippingCostTaxBreakdownJurisdictionLevel = "county" TaxTransactionShippingCostTaxBreakdownJurisdictionLevelDistrict TaxTransactionShippingCostTaxBreakdownJurisdictionLevel = "district" TaxTransactionShippingCostTaxBreakdownJurisdictionLevelState TaxTransactionShippingCostTaxBreakdownJurisdictionLevel = "state" )
List of values that TaxTransactionShippingCostTaxBreakdownJurisdictionLevel can take
type TaxTransactionShippingCostTaxBreakdownSourcing ¶
type TaxTransactionShippingCostTaxBreakdownSourcing string
Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
const ( TaxTransactionShippingCostTaxBreakdownSourcingDestination TaxTransactionShippingCostTaxBreakdownSourcing = "destination" TaxTransactionShippingCostTaxBreakdownSourcingOrigin TaxTransactionShippingCostTaxBreakdownSourcing = "origin" )
List of values that TaxTransactionShippingCostTaxBreakdownSourcing can take
type TaxTransactionShippingCostTaxBreakdownTaxRateDetails ¶
type TaxTransactionShippingCostTaxBreakdownTaxRateDetails struct { // A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". DisplayName string `json:"display_name"` // The tax rate percentage as a string. For example, 8.5% is represented as "8.5". PercentageDecimal string `json:"percentage_decimal"` // The tax type, such as `vat` or `sales_tax`. TaxType TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType `json:"tax_type"` }
Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
type TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType ¶
type TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType string
The tax type, such as `vat` or `sales_tax`.
const ( TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeAmusementTax TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "amusement_tax" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeCommunicationsTax TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "communications_tax" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeGST TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "gst" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeHST TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "hst" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeIGST TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "igst" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeJCT TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "jct" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeLeaseTax TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "lease_tax" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypePST TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "pst" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeQST TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "qst" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeRST TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "rst" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeSalesTax TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "sales_tax" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeVAT TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "vat" )
List of values that TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType can take
type TaxTransactionShippingCostTaxBreakdownTaxabilityReason ¶
type TaxTransactionShippingCostTaxBreakdownTaxabilityReason string
The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
const ( TaxTransactionShippingCostTaxBreakdownTaxabilityReasonCustomerExempt TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "customer_exempt" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonNotCollecting TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "not_collecting" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonNotSubjectToTax TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "not_subject_to_tax" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonNotSupported TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "not_supported" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonPortionProductExempt TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "portion_product_exempt" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonPortionReducedRated TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "portion_reduced_rated" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonPortionStandardRated TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "portion_standard_rated" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonProductExempt TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "product_exempt" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonProductExemptHoliday TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "product_exempt_holiday" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonProportionallyRated TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "proportionally_rated" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonReducedRated TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "reduced_rated" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonReverseCharge TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "reverse_charge" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonStandardRated TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "standard_rated" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonTaxableBasisReduced TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "taxable_basis_reduced" TaxTransactionShippingCostTaxBreakdownTaxabilityReasonZeroRated TaxTransactionShippingCostTaxBreakdownTaxabilityReason = "zero_rated" )
List of values that TaxTransactionShippingCostTaxBreakdownTaxabilityReason can take
type TaxTransactionType ¶
type TaxTransactionType string
If `reversal`, this transaction reverses an earlier transaction.
const ( TaxTransactionTypeReversal TaxTransactionType = "reversal" TaxTransactionTypeTransaction TaxTransactionType = "transaction" )
List of values that TaxTransactionType can take
type TerminalConfiguration ¶
type TerminalConfiguration struct { APIResource BBPOSWisePOSE *TerminalConfigurationBBPOSWisePOSE `json:"bbpos_wisepos_e"` Deleted bool `json:"deleted"` // Unique identifier for the object. ID string `json:"id"` // Whether this Configuration is the default for your account IsAccountDefault bool `json:"is_account_default"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` Offline *TerminalConfigurationOffline `json:"offline"` Tipping *TerminalConfigurationTipping `json:"tipping"` VerifoneP400 *TerminalConfigurationVerifoneP400 `json:"verifone_p400"` }
A Configurations object represents how features should be configured for terminal readers.
type TerminalConfigurationBBPOSWisePOSE ¶
type TerminalConfigurationBBPOSWisePOSE struct { // A File ID representing an image you would like displayed on the reader. Splashscreen *File `json:"splashscreen"` }
type TerminalConfigurationBBPOSWisePOSEParams ¶
type TerminalConfigurationBBPOSWisePOSEParams struct { // A File ID representing an image you would like displayed on the reader. Splashscreen *string `form:"splashscreen"` }
An object containing device type specific settings for BBPOS WisePOS E readers
type TerminalConfigurationList ¶
type TerminalConfigurationList struct { APIResource ListMeta Data []*TerminalConfiguration `json:"data"` }
TerminalConfigurationList is a list of Configurations as retrieved from a list endpoint.
type TerminalConfigurationListParams ¶
type TerminalConfigurationListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // if present, only return the account default or non-default configurations. IsAccountDefault *bool `form:"is_account_default"` }
Returns a list of Configuration objects.
func (*TerminalConfigurationListParams) AddExpand ¶
func (p *TerminalConfigurationListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TerminalConfigurationOffline ¶ added in v75.10.0
type TerminalConfigurationOffline struct { // Determines whether to allow transactions to be collected while reader is offline. Defaults to false. Enabled bool `json:"enabled"` }
type TerminalConfigurationOfflineParams ¶ added in v75.10.0
type TerminalConfigurationOfflineParams struct { // Determines whether to allow transactions to be collected while reader is offline. Defaults to false. Enabled *bool `form:"enabled"` }
Configurations for collecting transactions offline.
type TerminalConfigurationParams ¶
type TerminalConfigurationParams struct { Params `form:"*"` // An object containing device type specific settings for BBPOS WisePOS E readers BBPOSWisePOSE *TerminalConfigurationBBPOSWisePOSEParams `form:"bbpos_wisepos_e"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Configurations for collecting transactions offline. Offline *TerminalConfigurationOfflineParams `form:"offline"` // Tipping configurations for readers supporting on-reader tips Tipping *TerminalConfigurationTippingParams `form:"tipping"` // An object containing device type specific settings for Verifone P400 readers VerifoneP400 *TerminalConfigurationVerifoneP400Params `form:"verifone_p400"` }
Creates a new Configuration object.
func (*TerminalConfigurationParams) AddExpand ¶
func (p *TerminalConfigurationParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TerminalConfigurationTipping ¶
type TerminalConfigurationTipping struct { AUD *TerminalConfigurationTippingAUD `json:"aud"` CAD *TerminalConfigurationTippingCAD `json:"cad"` CHF *TerminalConfigurationTippingCHF `json:"chf"` CZK *TerminalConfigurationTippingCZK `json:"czk"` DKK *TerminalConfigurationTippingDKK `json:"dkk"` EUR *TerminalConfigurationTippingEUR `json:"eur"` GBP *TerminalConfigurationTippingGBP `json:"gbp"` HKD *TerminalConfigurationTippingHKD `json:"hkd"` MYR *TerminalConfigurationTippingMYR `json:"myr"` NOK *TerminalConfigurationTippingNOK `json:"nok"` NZD *TerminalConfigurationTippingNZD `json:"nzd"` SEK *TerminalConfigurationTippingSEK `json:"sek"` SGD *TerminalConfigurationTippingSGD `json:"sgd"` USD *TerminalConfigurationTippingUSD `json:"usd"` }
type TerminalConfigurationTippingAUD ¶
type TerminalConfigurationTippingAUD struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingAUDParams ¶
type TerminalConfigurationTippingAUDParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for AUD
type TerminalConfigurationTippingCAD ¶
type TerminalConfigurationTippingCAD struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingCADParams ¶
type TerminalConfigurationTippingCADParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for CAD
type TerminalConfigurationTippingCHF ¶
type TerminalConfigurationTippingCHF struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingCHFParams ¶
type TerminalConfigurationTippingCHFParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for CHF
type TerminalConfigurationTippingCZK ¶
type TerminalConfigurationTippingCZK struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingCZKParams ¶
type TerminalConfigurationTippingCZKParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for CZK
type TerminalConfigurationTippingDKK ¶
type TerminalConfigurationTippingDKK struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingDKKParams ¶
type TerminalConfigurationTippingDKKParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for DKK
type TerminalConfigurationTippingEUR ¶
type TerminalConfigurationTippingEUR struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingEURParams ¶
type TerminalConfigurationTippingEURParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for EUR
type TerminalConfigurationTippingGBP ¶
type TerminalConfigurationTippingGBP struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingGBPParams ¶
type TerminalConfigurationTippingGBPParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for GBP
type TerminalConfigurationTippingHKD ¶
type TerminalConfigurationTippingHKD struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingHKDParams ¶
type TerminalConfigurationTippingHKDParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for HKD
type TerminalConfigurationTippingMYR ¶
type TerminalConfigurationTippingMYR struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingMYRParams ¶
type TerminalConfigurationTippingMYRParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for MYR
type TerminalConfigurationTippingNOK ¶
type TerminalConfigurationTippingNOK struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingNOKParams ¶
type TerminalConfigurationTippingNOKParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for NOK
type TerminalConfigurationTippingNZD ¶
type TerminalConfigurationTippingNZD struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingNZDParams ¶
type TerminalConfigurationTippingNZDParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for NZD
type TerminalConfigurationTippingParams ¶
type TerminalConfigurationTippingParams struct { // Tipping configuration for AUD AUD *TerminalConfigurationTippingAUDParams `form:"aud"` // Tipping configuration for CAD CAD *TerminalConfigurationTippingCADParams `form:"cad"` // Tipping configuration for CHF CHF *TerminalConfigurationTippingCHFParams `form:"chf"` // Tipping configuration for CZK CZK *TerminalConfigurationTippingCZKParams `form:"czk"` // Tipping configuration for DKK DKK *TerminalConfigurationTippingDKKParams `form:"dkk"` // Tipping configuration for EUR EUR *TerminalConfigurationTippingEURParams `form:"eur"` // Tipping configuration for GBP GBP *TerminalConfigurationTippingGBPParams `form:"gbp"` // Tipping configuration for HKD HKD *TerminalConfigurationTippingHKDParams `form:"hkd"` // Tipping configuration for MYR MYR *TerminalConfigurationTippingMYRParams `form:"myr"` // Tipping configuration for NOK NOK *TerminalConfigurationTippingNOKParams `form:"nok"` // Tipping configuration for NZD NZD *TerminalConfigurationTippingNZDParams `form:"nzd"` // Tipping configuration for SEK SEK *TerminalConfigurationTippingSEKParams `form:"sek"` // Tipping configuration for SGD SGD *TerminalConfigurationTippingSGDParams `form:"sgd"` // Tipping configuration for USD USD *TerminalConfigurationTippingUSDParams `form:"usd"` }
Tipping configurations for readers supporting on-reader tips
type TerminalConfigurationTippingSEK ¶
type TerminalConfigurationTippingSEK struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingSEKParams ¶
type TerminalConfigurationTippingSEKParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for SEK
type TerminalConfigurationTippingSGD ¶
type TerminalConfigurationTippingSGD struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingSGDParams ¶
type TerminalConfigurationTippingSGDParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for SGD
type TerminalConfigurationTippingUSD ¶
type TerminalConfigurationTippingUSD struct { // Fixed amounts displayed when collecting a tip FixedAmounts []int64 `json:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []int64 `json:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold int64 `json:"smart_tip_threshold"` }
type TerminalConfigurationTippingUSDParams ¶
type TerminalConfigurationTippingUSDParams struct { // Fixed amounts displayed when collecting a tip FixedAmounts []*int64 `form:"fixed_amounts"` // Percentages displayed when collecting a tip Percentages []*int64 `form:"percentages"` // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed SmartTipThreshold *int64 `form:"smart_tip_threshold"` }
Tipping configuration for USD
type TerminalConfigurationVerifoneP400 ¶
type TerminalConfigurationVerifoneP400 struct { // A File ID representing an image you would like displayed on the reader. Splashscreen *File `json:"splashscreen"` }
type TerminalConfigurationVerifoneP400Params ¶
type TerminalConfigurationVerifoneP400Params struct { // A File ID representing an image you would like displayed on the reader. Splashscreen *string `form:"splashscreen"` }
An object containing device type specific settings for Verifone P400 readers
type TerminalConnectionToken ¶
type TerminalConnectionToken struct { APIResource // The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). Location string `json:"location"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Your application should pass this token to the Stripe Terminal SDK. Secret string `json:"secret"` }
A Connection Token is used by the Stripe Terminal SDK to connect to a reader.
Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
type TerminalConnectionTokenParams ¶
type TerminalConnectionTokenParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). Location *string `form:"location"` }
To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
func (*TerminalConnectionTokenParams) AddExpand ¶
func (p *TerminalConnectionTokenParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TerminalLocation ¶
type TerminalLocation struct { APIResource Address *Address `json:"address"` // The ID of a configuration that will be used to customize all readers in this location. ConfigurationOverrides string `json:"configuration_overrides"` Deleted bool `json:"deleted"` // The display name of the location. DisplayName string `json:"display_name"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` }
A Location represents a grouping of readers.
Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
func (*TerminalLocation) UnmarshalJSON ¶
func (t *TerminalLocation) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a TerminalLocation. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type TerminalLocationList ¶
type TerminalLocationList struct { APIResource ListMeta Data []*TerminalLocation `json:"data"` }
TerminalLocationList is a list of Locations as retrieved from a list endpoint.
type TerminalLocationListParams ¶
type TerminalLocationListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of Location objects.
func (*TerminalLocationListParams) AddExpand ¶
func (p *TerminalLocationListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TerminalLocationParams ¶
type TerminalLocationParams struct { Params `form:"*"` // The full address of the location. Address *AddressParams `form:"address"` // The ID of a configuration that will be used to customize all readers in this location. ConfigurationOverrides *string `form:"configuration_overrides"` // A name for the location. DisplayName *string `form:"display_name"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` }
Retrieves a Location object.
func (*TerminalLocationParams) AddExpand ¶
func (p *TerminalLocationParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TerminalLocationParams) AddMetadata ¶
func (p *TerminalLocationParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TerminalReader ¶
type TerminalReader struct { APIResource // The most recent action performed by the reader. Action *TerminalReaderAction `json:"action"` Deleted bool `json:"deleted"` // The current software version of the reader. DeviceSwVersion string `json:"device_sw_version"` // Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`. DeviceType TerminalReaderDeviceType `json:"device_type"` // Unique identifier for the object. ID string `json:"id"` // The local IP address of the reader. IPAddress string `json:"ip_address"` // Custom label given to the reader for easier identification. Label string `json:"label"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // The location identifier of the reader. Location *TerminalLocation `json:"location"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Serial number of the reader. SerialNumber string `json:"serial_number"` // The networking status of the reader. Status string `json:"status"` }
A Reader represents a physical device for accepting payment details.
Related guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader)
type TerminalReaderAction ¶
type TerminalReaderAction struct { // Failure code, only set if status is `failed`. FailureCode string `json:"failure_code"` // Detailed failure message, only set if status is `failed`. FailureMessage string `json:"failure_message"` // Represents a reader action to process a payment intent ProcessPaymentIntent *TerminalReaderActionProcessPaymentIntent `json:"process_payment_intent"` // Represents a reader action to process a setup intent ProcessSetupIntent *TerminalReaderActionProcessSetupIntent `json:"process_setup_intent"` // Represents a reader action to refund a payment RefundPayment *TerminalReaderActionRefundPayment `json:"refund_payment"` // Represents a reader action to set the reader display SetReaderDisplay *TerminalReaderActionSetReaderDisplay `json:"set_reader_display"` // Status of the action performed by the reader. Status TerminalReaderActionStatus `json:"status"` // Type of action performed by the reader. Type TerminalReaderActionType `json:"type"` }
The most recent action performed by the reader.
type TerminalReaderActionProcessPaymentIntent ¶
type TerminalReaderActionProcessPaymentIntent struct { // Most recent PaymentIntent processed by the reader. PaymentIntent *PaymentIntent `json:"payment_intent"` // Represents a per-transaction override of a reader configuration ProcessConfig *TerminalReaderActionProcessPaymentIntentProcessConfig `json:"process_config"` }
Represents a reader action to process a payment intent
type TerminalReaderActionProcessPaymentIntentProcessConfig ¶
type TerminalReaderActionProcessPaymentIntentProcessConfig struct { // Override showing a tipping selection screen on this transaction. SkipTipping bool `json:"skip_tipping"` // Represents a per-transaction tipping configuration Tipping *TerminalReaderActionProcessPaymentIntentProcessConfigTipping `json:"tipping"` }
Represents a per-transaction override of a reader configuration
type TerminalReaderActionProcessPaymentIntentProcessConfigTipping ¶
type TerminalReaderActionProcessPaymentIntentProcessConfigTipping struct { // Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). AmountEligible int64 `json:"amount_eligible"` }
Represents a per-transaction tipping configuration
type TerminalReaderActionProcessSetupIntent ¶
type TerminalReaderActionProcessSetupIntent struct { // 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. GeneratedCard string `json:"generated_card"` // Represents a per-setup override of a reader configuration ProcessConfig *TerminalReaderActionProcessSetupIntentProcessConfig `json:"process_config"` // Most recent SetupIntent processed by the reader. SetupIntent *SetupIntent `json:"setup_intent"` }
Represents a reader action to process a setup intent
type TerminalReaderActionProcessSetupIntentProcessConfig ¶
type TerminalReaderActionProcessSetupIntentProcessConfig struct{}
Represents a per-setup override of a reader configuration
type TerminalReaderActionRefundPayment ¶
type TerminalReaderActionRefundPayment struct { // The amount being refunded. Amount int64 `json:"amount"` // Charge that is being refunded. Charge *Charge `json:"charge"` // 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. Metadata map[string]string `json:"metadata"` // Payment intent that is being refunded. PaymentIntent *PaymentIntent `json:"payment_intent"` // The reason for the refund. Reason TerminalReaderActionRefundPaymentReason `json:"reason"` // Unique identifier for the refund object. Refund *Refund `json:"refund"` // Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. RefundApplicationFee bool `json:"refund_application_fee"` // Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. ReverseTransfer bool `json:"reverse_transfer"` }
Represents a reader action to refund a payment
type TerminalReaderActionRefundPaymentReason ¶
type TerminalReaderActionRefundPaymentReason string
The reason for the refund.
const ( TerminalReaderActionRefundPaymentReasonDuplicate TerminalReaderActionRefundPaymentReason = "duplicate" TerminalReaderActionRefundPaymentReasonFraudulent TerminalReaderActionRefundPaymentReason = "fraudulent" TerminalReaderActionRefundPaymentReasonRequestedByCustomer TerminalReaderActionRefundPaymentReason = "requested_by_customer" )
List of values that TerminalReaderActionRefundPaymentReason can take
type TerminalReaderActionSetReaderDisplay ¶
type TerminalReaderActionSetReaderDisplay struct { // Cart object to be displayed by the reader. Cart *TerminalReaderActionSetReaderDisplayCart `json:"cart"` // Type of information to be displayed by the reader. Type TerminalReaderActionSetReaderDisplayType `json:"type"` }
Represents a reader action to set the reader display
type TerminalReaderActionSetReaderDisplayCart ¶
type TerminalReaderActionSetReaderDisplayCart struct { // 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 Currency `json:"currency"` // List of line items in the cart. LineItems []*TerminalReaderActionSetReaderDisplayCartLineItem `json:"line_items"` // Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Tax int64 `json:"tax"` // Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Total int64 `json:"total"` }
Cart object to be displayed by the reader.
type TerminalReaderActionSetReaderDisplayCartLineItem ¶
type TerminalReaderActionSetReaderDisplayCartLineItem struct { // The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount int64 `json:"amount"` // Description of the line item. Description string `json:"description"` // The quantity of the line item. Quantity int64 `json:"quantity"` }
List of line items in the cart.
type TerminalReaderActionSetReaderDisplayType ¶
type TerminalReaderActionSetReaderDisplayType string
Type of information to be displayed by the reader.
const (
TerminalReaderActionSetReaderDisplayTypeCart TerminalReaderActionSetReaderDisplayType = "cart"
)
List of values that TerminalReaderActionSetReaderDisplayType can take
type TerminalReaderActionStatus ¶
type TerminalReaderActionStatus string
Status of the action performed by the reader.
const ( TerminalReaderActionStatusFailed TerminalReaderActionStatus = "failed" TerminalReaderActionStatusInProgress TerminalReaderActionStatus = "in_progress" TerminalReaderActionStatusSucceeded TerminalReaderActionStatus = "succeeded" )
List of values that TerminalReaderActionStatus can take
type TerminalReaderActionType ¶
type TerminalReaderActionType string
Type of action performed by the reader.
const ( TerminalReaderActionTypeProcessPaymentIntent TerminalReaderActionType = "process_payment_intent" TerminalReaderActionTypeProcessSetupIntent TerminalReaderActionType = "process_setup_intent" TerminalReaderActionTypeRefundPayment TerminalReaderActionType = "refund_payment" TerminalReaderActionTypeSetReaderDisplay TerminalReaderActionType = "set_reader_display" )
List of values that TerminalReaderActionType can take
type TerminalReaderCancelActionParams ¶
type TerminalReaderCancelActionParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Cancels the current reader action.
func (*TerminalReaderCancelActionParams) AddExpand ¶
func (p *TerminalReaderCancelActionParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TerminalReaderDeviceType ¶
type TerminalReaderDeviceType string
Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`.
const ( TerminalReaderDeviceTypeBBPOSChipper2X TerminalReaderDeviceType = "bbpos_chipper2x" TerminalReaderDeviceTypeBBPOSWisePad3 TerminalReaderDeviceType = "bbpos_wisepad3" TerminalReaderDeviceTypeBBPOSWisePOSE TerminalReaderDeviceType = "bbpos_wisepos_e" TerminalReaderDeviceTypeSimulatedWisePOSE TerminalReaderDeviceType = "simulated_wisepos_e" TerminalReaderDeviceTypeStripeM2 TerminalReaderDeviceType = "stripe_m2" TerminalReaderDeviceTypeVerifoneP400 TerminalReaderDeviceType = "verifone_P400" )
List of values that TerminalReaderDeviceType can take
type TerminalReaderList ¶
type TerminalReaderList struct { APIResource ListMeta Data []*TerminalReader `json:"data"` }
TerminalReaderList is a list of Readers as retrieved from a list endpoint.
type TerminalReaderListParams ¶
type TerminalReaderListParams struct { ListParams `form:"*"` // Filters readers by device type DeviceType *string `form:"device_type"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A location ID to filter the response list to only readers at the specific location Location *string `form:"location"` // Filters readers by serial number SerialNumber *string `form:"serial_number"` // A status filter to filter readers to only offline or online readers Status *string `form:"status"` }
Returns a list of Reader objects.
func (*TerminalReaderListParams) AddExpand ¶
func (p *TerminalReaderListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TerminalReaderParams ¶
type TerminalReaderParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. Label *string `form:"label"` // The location to assign the reader to. Location *string `form:"location"` // 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`. Metadata map[string]string `form:"metadata"` // A code generated by the reader used for registering to an account. RegistrationCode *string `form:"registration_code"` }
Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
func (*TerminalReaderParams) AddExpand ¶
func (p *TerminalReaderParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TerminalReaderParams) AddMetadata ¶
func (p *TerminalReaderParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TerminalReaderProcessPaymentIntentParams ¶
type TerminalReaderProcessPaymentIntentParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // PaymentIntent ID PaymentIntent *string `form:"payment_intent"` // Configuration overrides ProcessConfig *TerminalReaderProcessPaymentIntentProcessConfigParams `form:"process_config"` }
Initiates a payment flow on a Reader.
func (*TerminalReaderProcessPaymentIntentParams) AddExpand ¶
func (p *TerminalReaderProcessPaymentIntentParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TerminalReaderProcessPaymentIntentProcessConfigParams ¶
type TerminalReaderProcessPaymentIntentProcessConfigParams struct { // Override showing a tipping selection screen on this transaction. SkipTipping *bool `form:"skip_tipping"` // Tipping configuration for this transaction. Tipping *TerminalReaderProcessPaymentIntentProcessConfigTippingParams `form:"tipping"` }
Configuration overrides
type TerminalReaderProcessPaymentIntentProcessConfigTippingParams ¶
type TerminalReaderProcessPaymentIntentProcessConfigTippingParams struct { // Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). AmountEligible *int64 `form:"amount_eligible"` }
Tipping configuration for this transaction.
type TerminalReaderProcessSetupIntentParams ¶
type TerminalReaderProcessSetupIntentParams struct { Params `form:"*"` // Customer Consent Collected CustomerConsentCollected *bool `form:"customer_consent_collected"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Configuration overrides ProcessConfig *TerminalReaderProcessSetupIntentProcessConfigParams `form:"process_config"` // SetupIntent ID SetupIntent *string `form:"setup_intent"` }
Initiates a setup intent flow on a Reader.
func (*TerminalReaderProcessSetupIntentParams) AddExpand ¶
func (p *TerminalReaderProcessSetupIntentParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TerminalReaderProcessSetupIntentProcessConfigParams ¶
type TerminalReaderProcessSetupIntentProcessConfigParams struct{}
Configuration overrides
type TerminalReaderRefundPaymentParams ¶
type TerminalReaderRefundPaymentParams struct { Params `form:"*"` // A positive integer in __cents__ representing how much of this charge to refund. Amount *int64 `form:"amount"` // ID of the Charge to refund. Charge *string `form:"charge"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // ID of the PaymentIntent to refund. PaymentIntent *string `form:"payment_intent"` // Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. RefundApplicationFee *bool `form:"refund_application_fee"` // Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. ReverseTransfer *bool `form:"reverse_transfer"` }
Initiates a refund on a Reader
func (*TerminalReaderRefundPaymentParams) AddExpand ¶
func (p *TerminalReaderRefundPaymentParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TerminalReaderRefundPaymentParams) AddMetadata ¶
func (p *TerminalReaderRefundPaymentParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TerminalReaderSetReaderDisplayCartLineItemParams ¶
type TerminalReaderSetReaderDisplayCartLineItemParams struct { // The price of the item in cents. Amount *int64 `form:"amount"` // The description or name of the item. Description *string `form:"description"` // The quantity of the line item being purchased. Quantity *int64 `form:"quantity"` }
Array of line items that were purchased.
type TerminalReaderSetReaderDisplayCartParams ¶
type TerminalReaderSetReaderDisplayCartParams struct { // 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 `form:"currency"` // Array of line items that were purchased. LineItems []*TerminalReaderSetReaderDisplayCartLineItemParams `form:"line_items"` // The amount of tax in cents. Tax *int64 `form:"tax"` // Total balance of cart due in cents. Total *int64 `form:"total"` }
Cart
type TerminalReaderSetReaderDisplayParams ¶
type TerminalReaderSetReaderDisplayParams struct { Params `form:"*"` // Cart Cart *TerminalReaderSetReaderDisplayCartParams `form:"cart"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Type Type *string `form:"type"` }
Sets reader display to show cart details.
func (*TerminalReaderSetReaderDisplayParams) AddExpand ¶
func (p *TerminalReaderSetReaderDisplayParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersCustomerFundCashBalanceParams ¶
type TestHelpersCustomerFundCashBalanceParams struct { Params `form:"*"` // Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). Amount *int64 `form:"amount"` // 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 `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. Reference *string `form:"reference"` }
Create an incoming testmode bank transfer
func (*TestHelpersCustomerFundCashBalanceParams) AddExpand ¶
func (p *TestHelpersCustomerFundCashBalanceParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingAuthorizationAmountDetailsParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationAmountDetailsParams struct { // The ATM withdrawal fee. ATMFee *int64 `form:"atm_fee"` // The amount of cash requested by the cardholder. CashbackAmount *int64 `form:"cashback_amount"` }
Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
type TestHelpersIssuingAuthorizationCaptureParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationCaptureParams struct { Params `form:"*"` // 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). CaptureAmount *int64 `form:"capture_amount"` // Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. CloseAuthorization *bool `form:"close_authorization"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Additional purchase information that is optionally provided by the merchant. PurchaseDetails *TestHelpersIssuingAuthorizationCapturePurchaseDetailsParams `form:"purchase_details"` }
Capture a test-mode authorization.
func (*TestHelpersIssuingAuthorizationCaptureParams) AddExpand ¶ added in v75.6.0
func (p *TestHelpersIssuingAuthorizationCaptureParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightParams struct { // The time that the flight departed. DepartureAt *int64 `form:"departure_at"` // The name of the passenger. PassengerName *string `form:"passenger_name"` // Whether the ticket is refundable. Refundable *bool `form:"refundable"` // The legs of the trip. Segments []*TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightSegmentParams `form:"segments"` // The travel agency that issued the ticket. TravelAgency *string `form:"travel_agency"` }
Information about the flight that was purchased with this transaction.
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightSegmentParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightSegmentParams struct { // The three-letter IATA airport code of the flight's destination. ArrivalAirportCode *string `form:"arrival_airport_code"` // The airline carrier code. Carrier *string `form:"carrier"` // The three-letter IATA airport code that the flight departed from. DepartureAirportCode *string `form:"departure_airport_code"` // The flight number. FlightNumber *string `form:"flight_number"` // The flight's service class. ServiceClass *string `form:"service_class"` // Whether a stopover is allowed on this flight. StopoverAllowed *bool `form:"stopover_allowed"` }
The legs of the trip.
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFuelParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFuelParams struct { // The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. Type *string `form:"type"` // The units for `volume_decimal`. One of `us_gallon` or `liter`. Unit *string `form:"unit"` // The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. UnitCostDecimal *float64 `form:"unit_cost_decimal,high_precision"` // The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. VolumeDecimal *float64 `form:"volume_decimal,high_precision"` }
Information about fuel that was purchased with this transaction.
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsLodgingParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsLodgingParams struct { // The time of checking into the lodging. CheckInAt *int64 `form:"check_in_at"` // The number of nights stayed at the lodging. Nights *int64 `form:"nights"` }
Information about lodging that was purchased with this transaction.
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsParams struct { // Information about the flight that was purchased with this transaction. Flight *TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightParams `form:"flight"` // Information about fuel that was purchased with this transaction. Fuel *TestHelpersIssuingAuthorizationCapturePurchaseDetailsFuelParams `form:"fuel"` // Information about lodging that was purchased with this transaction. Lodging *TestHelpersIssuingAuthorizationCapturePurchaseDetailsLodgingParams `form:"lodging"` // The line items in the purchase. Receipt []*TestHelpersIssuingAuthorizationCapturePurchaseDetailsReceiptParams `form:"receipt"` // A merchant-specific order number. Reference *string `form:"reference"` }
Additional purchase information that is optionally provided by the merchant.
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsReceiptParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationCapturePurchaseDetailsReceiptParams struct { Description *string `form:"description"` Quantity *float64 `form:"quantity,high_precision"` Total *int64 `form:"total"` UnitCost *int64 `form:"unit_cost"` }
The line items in the purchase.
type TestHelpersIssuingAuthorizationExpireParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationExpireParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Expire a test-mode Authorization.
func (*TestHelpersIssuingAuthorizationExpireParams) AddExpand ¶ added in v75.6.0
func (p *TestHelpersIssuingAuthorizationExpireParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingAuthorizationIncrementParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationIncrementParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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). IncrementAmount *int64 `form:"increment_amount"` // 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. IsAmountControllable *bool `form:"is_amount_controllable"` }
Increment a test-mode Authorization.
func (*TestHelpersIssuingAuthorizationIncrementParams) AddExpand ¶ added in v75.6.0
func (p *TestHelpersIssuingAuthorizationIncrementParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingAuthorizationMerchantDataParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationMerchantDataParams struct { // 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. Category *string `form:"category"` // City where the seller is located City *string `form:"city"` // Country where the seller is located Country *string `form:"country"` // Name of the seller Name *string `form:"name"` // Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. NetworkID *string `form:"network_id"` // Postal code where the seller is located PostalCode *string `form:"postal_code"` // State where the seller is located State *string `form:"state"` // An ID assigned by the seller to the location of the sale. TerminalID *string `form:"terminal_id"` }
Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
type TestHelpersIssuingAuthorizationNetworkDataParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationNetworkDataParams struct { // Identifier assigned to the acquirer by the card network. AcquiringInstitutionID *string `form:"acquiring_institution_id"` }
Details about the authorization, such as identifiers, set by the card network.
type TestHelpersIssuingAuthorizationParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationParams struct { Params `form:"*"` // The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount *int64 `form:"amount"` // Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). AmountDetails *TestHelpersIssuingAuthorizationAmountDetailsParams `form:"amount_details"` // How the card details were provided. Defaults to online. AuthorizationMethod *string `form:"authorization_method"` // Card associated with this authorization. Card *string `form:"card"` // 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). Currency *string `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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. IsAmountControllable *bool `form:"is_amount_controllable"` // Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. MerchantData *TestHelpersIssuingAuthorizationMerchantDataParams `form:"merchant_data"` // Details about the authorization, such as identifiers, set by the card network. NetworkData *TestHelpersIssuingAuthorizationNetworkDataParams `form:"network_data"` // Verifications that Stripe performed on information that the cardholder provided to the merchant. VerificationData *TestHelpersIssuingAuthorizationVerificationDataParams `form:"verification_data"` // 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. Wallet *string `form:"wallet"` }
Create a test-mode authorization.
func (*TestHelpersIssuingAuthorizationParams) AddExpand ¶ added in v75.6.0
func (p *TestHelpersIssuingAuthorizationParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingAuthorizationReverseParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationReverseParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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). ReverseAmount *int64 `form:"reverse_amount"` }
Reverse a test-mode Authorization.
func (*TestHelpersIssuingAuthorizationReverseParams) AddExpand ¶ added in v75.6.0
func (p *TestHelpersIssuingAuthorizationReverseParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingAuthorizationVerificationDataParams ¶ added in v75.6.0
type TestHelpersIssuingAuthorizationVerificationDataParams struct { // Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. AddressLine1Check *string `form:"address_line1_check"` // Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. AddressPostalCodeCheck *string `form:"address_postal_code_check"` // Whether the cardholder provided a CVC and if it matched Stripe's record. CVCCheck *string `form:"cvc_check"` // Whether the cardholder provided an expiry date and if it matched Stripe's record. ExpiryCheck *string `form:"expiry_check"` }
Verifications that Stripe performed on information that the cardholder provided to the merchant.
type TestHelpersIssuingCardDeliverCardParams ¶
type TestHelpersIssuingCardDeliverCardParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Updates the shipping status of the specified Issuing Card object to delivered.
func (*TestHelpersIssuingCardDeliverCardParams) AddExpand ¶
func (p *TestHelpersIssuingCardDeliverCardParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingCardFailCardParams ¶
type TestHelpersIssuingCardFailCardParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Updates the shipping status of the specified Issuing Card object to failure.
func (*TestHelpersIssuingCardFailCardParams) AddExpand ¶
func (p *TestHelpersIssuingCardFailCardParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingCardReturnCardParams ¶
type TestHelpersIssuingCardReturnCardParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Updates the shipping status of the specified Issuing Card object to returned.
func (*TestHelpersIssuingCardReturnCardParams) AddExpand ¶
func (p *TestHelpersIssuingCardReturnCardParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingCardShipCardParams ¶
type TestHelpersIssuingCardShipCardParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Updates the shipping status of the specified Issuing Card object to shipped.
func (*TestHelpersIssuingCardShipCardParams) AddExpand ¶
func (p *TestHelpersIssuingCardShipCardParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingTransactionCreateForceCaptureMerchantDataParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateForceCaptureMerchantDataParams struct { // 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. Category *string `form:"category"` // City where the seller is located City *string `form:"city"` // Country where the seller is located Country *string `form:"country"` // Name of the seller Name *string `form:"name"` // Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. NetworkID *string `form:"network_id"` // Postal code where the seller is located PostalCode *string `form:"postal_code"` // State where the seller is located State *string `form:"state"` // An ID assigned by the seller to the location of the sale. TerminalID *string `form:"terminal_id"` }
Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
type TestHelpersIssuingTransactionCreateForceCaptureParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateForceCaptureParams struct { Params `form:"*"` // The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount *int64 `form:"amount"` // Card associated with this transaction. Card *string `form:"card"` // The currency of the capture. 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). Currency *string `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. MerchantData *TestHelpersIssuingTransactionCreateForceCaptureMerchantDataParams `form:"merchant_data"` // Additional purchase information that is optionally provided by the merchant. PurchaseDetails *TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsParams `form:"purchase_details"` }
Allows the user to capture an arbitrary amount, also known as a forced capture.
func (*TestHelpersIssuingTransactionCreateForceCaptureParams) AddExpand ¶ added in v75.6.0
func (p *TestHelpersIssuingTransactionCreateForceCaptureParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightParams struct { // The time that the flight departed. DepartureAt *int64 `form:"departure_at"` // The name of the passenger. PassengerName *string `form:"passenger_name"` // Whether the ticket is refundable. Refundable *bool `form:"refundable"` // The legs of the trip. Segments []*TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightSegmentParams `form:"segments"` // The travel agency that issued the ticket. TravelAgency *string `form:"travel_agency"` }
Information about the flight that was purchased with this transaction.
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightSegmentParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightSegmentParams struct { // The three-letter IATA airport code of the flight's destination. ArrivalAirportCode *string `form:"arrival_airport_code"` // The airline carrier code. Carrier *string `form:"carrier"` // The three-letter IATA airport code that the flight departed from. DepartureAirportCode *string `form:"departure_airport_code"` // The flight number. FlightNumber *string `form:"flight_number"` // The flight's service class. ServiceClass *string `form:"service_class"` // Whether a stopover is allowed on this flight. StopoverAllowed *bool `form:"stopover_allowed"` }
The legs of the trip.
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFuelParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFuelParams struct { // The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. Type *string `form:"type"` // The units for `volume_decimal`. One of `us_gallon` or `liter`. Unit *string `form:"unit"` // The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. UnitCostDecimal *float64 `form:"unit_cost_decimal,high_precision"` // The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. VolumeDecimal *float64 `form:"volume_decimal,high_precision"` }
Information about fuel that was purchased with this transaction.
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsLodgingParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsLodgingParams struct { // The time of checking into the lodging. CheckInAt *int64 `form:"check_in_at"` // The number of nights stayed at the lodging. Nights *int64 `form:"nights"` }
Information about lodging that was purchased with this transaction.
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsParams struct { // Information about the flight that was purchased with this transaction. Flight *TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightParams `form:"flight"` // Information about fuel that was purchased with this transaction. Fuel *TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFuelParams `form:"fuel"` // Information about lodging that was purchased with this transaction. Lodging *TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsLodgingParams `form:"lodging"` // The line items in the purchase. Receipt []*TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsReceiptParams `form:"receipt"` // A merchant-specific order number. Reference *string `form:"reference"` }
Additional purchase information that is optionally provided by the merchant.
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsReceiptParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsReceiptParams struct { Description *string `form:"description"` Quantity *float64 `form:"quantity,high_precision"` Total *int64 `form:"total"` UnitCost *int64 `form:"unit_cost"` }
The line items in the purchase.
type TestHelpersIssuingTransactionCreateUnlinkedRefundMerchantDataParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateUnlinkedRefundMerchantDataParams struct { // 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. Category *string `form:"category"` // City where the seller is located City *string `form:"city"` // Country where the seller is located Country *string `form:"country"` // Name of the seller Name *string `form:"name"` // Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. NetworkID *string `form:"network_id"` // Postal code where the seller is located PostalCode *string `form:"postal_code"` // State where the seller is located State *string `form:"state"` // An ID assigned by the seller to the location of the sale. TerminalID *string `form:"terminal_id"` }
Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
type TestHelpersIssuingTransactionCreateUnlinkedRefundParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateUnlinkedRefundParams struct { Params `form:"*"` // The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount *int64 `form:"amount"` // Card associated with this unlinked refund transaction. Card *string `form:"card"` // The currency of the unlinked refund. 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). Currency *string `form:"currency"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. MerchantData *TestHelpersIssuingTransactionCreateUnlinkedRefundMerchantDataParams `form:"merchant_data"` // Additional purchase information that is optionally provided by the merchant. PurchaseDetails *TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsParams `form:"purchase_details"` }
Allows the user to refund an arbitrary amount, also known as a unlinked refund.
func (*TestHelpersIssuingTransactionCreateUnlinkedRefundParams) AddExpand ¶ added in v75.6.0
func (p *TestHelpersIssuingTransactionCreateUnlinkedRefundParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightParams struct { // The time that the flight departed. DepartureAt *int64 `form:"departure_at"` // The name of the passenger. PassengerName *string `form:"passenger_name"` // Whether the ticket is refundable. Refundable *bool `form:"refundable"` // The legs of the trip. Segments []*TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightSegmentParams `form:"segments"` // The travel agency that issued the ticket. TravelAgency *string `form:"travel_agency"` }
Information about the flight that was purchased with this transaction.
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightSegmentParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightSegmentParams struct { // The three-letter IATA airport code of the flight's destination. ArrivalAirportCode *string `form:"arrival_airport_code"` // The airline carrier code. Carrier *string `form:"carrier"` // The three-letter IATA airport code that the flight departed from. DepartureAirportCode *string `form:"departure_airport_code"` // The flight number. FlightNumber *string `form:"flight_number"` // The flight's service class. ServiceClass *string `form:"service_class"` // Whether a stopover is allowed on this flight. StopoverAllowed *bool `form:"stopover_allowed"` }
The legs of the trip.
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFuelParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFuelParams struct { // The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. Type *string `form:"type"` // The units for `volume_decimal`. One of `us_gallon` or `liter`. Unit *string `form:"unit"` // The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. UnitCostDecimal *float64 `form:"unit_cost_decimal,high_precision"` // The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. VolumeDecimal *float64 `form:"volume_decimal,high_precision"` }
Information about fuel that was purchased with this transaction.
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsLodgingParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsLodgingParams struct { // The time of checking into the lodging. CheckInAt *int64 `form:"check_in_at"` // The number of nights stayed at the lodging. Nights *int64 `form:"nights"` }
Information about lodging that was purchased with this transaction.
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsParams struct { // Information about the flight that was purchased with this transaction. Flight *TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightParams `form:"flight"` // Information about fuel that was purchased with this transaction. Fuel *TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFuelParams `form:"fuel"` // Information about lodging that was purchased with this transaction. Lodging *TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsLodgingParams `form:"lodging"` // The line items in the purchase. Receipt []*TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsReceiptParams `form:"receipt"` // A merchant-specific order number. Reference *string `form:"reference"` }
Additional purchase information that is optionally provided by the merchant.
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsReceiptParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsReceiptParams struct { Description *string `form:"description"` Quantity *float64 `form:"quantity,high_precision"` Total *int64 `form:"total"` UnitCost *int64 `form:"unit_cost"` }
The line items in the purchase.
type TestHelpersIssuingTransactionRefundParams ¶ added in v75.6.0
type TestHelpersIssuingTransactionRefundParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). RefundAmount *int64 `form:"refund_amount"` }
Refund a test-mode Transaction.
func (*TestHelpersIssuingTransactionRefundParams) AddExpand ¶ added in v75.6.0
func (p *TestHelpersIssuingTransactionRefundParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersRefundExpireParams ¶
type TestHelpersRefundExpireParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Expire a refund with a status of requires_action.
func (*TestHelpersRefundExpireParams) AddExpand ¶
func (p *TestHelpersRefundExpireParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTerminalReaderPresentPaymentMethodCardPresentParams ¶
type TestHelpersTerminalReaderPresentPaymentMethodCardPresentParams struct { // The card number, as a string without any separators. Number *string `form:"number"` }
Simulated data for the card_present payment method.
type TestHelpersTerminalReaderPresentPaymentMethodInteracPresentParams ¶
type TestHelpersTerminalReaderPresentPaymentMethodInteracPresentParams struct { // Card Number Number *string `form:"number"` }
Simulated data for the interac_present payment method.
type TestHelpersTerminalReaderPresentPaymentMethodParams ¶
type TestHelpersTerminalReaderPresentPaymentMethodParams struct { Params `form:"*"` // Simulated on-reader tip amount. AmountTip *int64 `form:"amount_tip"` // Simulated data for the card_present payment method. CardPresent *TestHelpersTerminalReaderPresentPaymentMethodCardPresentParams `form:"card_present"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Simulated data for the interac_present payment method. InteracPresent *TestHelpersTerminalReaderPresentPaymentMethodInteracPresentParams `form:"interac_present"` // Simulated payment type. Type *string `form:"type"` }
Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
func (*TestHelpersTerminalReaderPresentPaymentMethodParams) AddExpand ¶
func (p *TestHelpersTerminalReaderPresentPaymentMethodParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTestClock ¶
type TestHelpersTestClock struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` Deleted bool `json:"deleted"` // Time at which this clock is scheduled to auto delete. DeletesAfter int64 `json:"deletes_after"` // Time at which all objects belonging to this clock are frozen. FrozenTime int64 `json:"frozen_time"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // The custom name supplied at creation. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The status of the Test Clock. Status TestHelpersTestClockStatus `json:"status"` }
A test clock enables deterministic control over objects in testmode. With a test clock, you can create objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.
func (*TestHelpersTestClock) UnmarshalJSON ¶
func (t *TestHelpersTestClock) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a TestHelpersTestClock. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type TestHelpersTestClockAdvanceParams ¶
type TestHelpersTestClockAdvanceParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. FrozenTime *int64 `form:"frozen_time"` }
Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
func (*TestHelpersTestClockAdvanceParams) AddExpand ¶
func (p *TestHelpersTestClockAdvanceParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTestClockList ¶
type TestHelpersTestClockList struct { APIResource ListMeta Data []*TestHelpersTestClock `json:"data"` }
TestHelpersTestClockList is a list of TestClocks as retrieved from a list endpoint.
type TestHelpersTestClockListParams ¶
type TestHelpersTestClockListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of your test clocks.
func (*TestHelpersTestClockListParams) AddExpand ¶
func (p *TestHelpersTestClockListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTestClockParams ¶
type TestHelpersTestClockParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The initial frozen time for this test clock. FrozenTime *int64 `form:"frozen_time"` // The name for this test clock. Name *string `form:"name"` }
Retrieves a test clock.
func (*TestHelpersTestClockParams) AddExpand ¶
func (p *TestHelpersTestClockParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTestClockStatus ¶
type TestHelpersTestClockStatus string
The status of the Test Clock.
const ( TestHelpersTestClockStatusAdvancing TestHelpersTestClockStatus = "advancing" TestHelpersTestClockStatusInternalFailure TestHelpersTestClockStatus = "internal_failure" TestHelpersTestClockStatusReady TestHelpersTestClockStatus = "ready" )
List of values that TestHelpersTestClockStatus can take
type TestHelpersTreasuryInboundTransferFailFailureDetailsParams ¶
type TestHelpersTreasuryInboundTransferFailFailureDetailsParams struct { // Reason for the failure. Code *string `form:"code"` }
Details about a failed InboundTransfer.
type TestHelpersTreasuryInboundTransferFailParams ¶
type TestHelpersTreasuryInboundTransferFailParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Details about a failed InboundTransfer. FailureDetails *TestHelpersTreasuryInboundTransferFailFailureDetailsParams `form:"failure_details"` }
Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
func (*TestHelpersTreasuryInboundTransferFailParams) AddExpand ¶
func (p *TestHelpersTreasuryInboundTransferFailParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTreasuryInboundTransferReturnInboundTransferParams ¶
type TestHelpersTreasuryInboundTransferReturnInboundTransferParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
func (*TestHelpersTreasuryInboundTransferReturnInboundTransferParams) AddExpand ¶
func (p *TestHelpersTreasuryInboundTransferReturnInboundTransferParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTreasuryInboundTransferSucceedParams ¶
type TestHelpersTreasuryInboundTransferSucceedParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
func (*TestHelpersTreasuryInboundTransferSucceedParams) AddExpand ¶
func (p *TestHelpersTreasuryInboundTransferSucceedParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTreasuryOutboundPaymentFailParams ¶
type TestHelpersTreasuryOutboundPaymentFailParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
func (*TestHelpersTreasuryOutboundPaymentFailParams) AddExpand ¶
func (p *TestHelpersTreasuryOutboundPaymentFailParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTreasuryOutboundPaymentPostParams ¶
type TestHelpersTreasuryOutboundPaymentPostParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
func (*TestHelpersTreasuryOutboundPaymentPostParams) AddExpand ¶
func (p *TestHelpersTreasuryOutboundPaymentPostParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentParams ¶
type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Optional hash to set the the return code. ReturnedDetails *TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentReturnedDetailsParams `form:"returned_details"` }
Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
func (*TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentParams) AddExpand ¶
func (p *TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentReturnedDetailsParams ¶
type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentReturnedDetailsParams struct { // The return code to be set on the OutboundPayment object. Code *string `form:"code"` }
Optional hash to set the the return code.
type TestHelpersTreasuryOutboundTransferFailParams ¶
type TestHelpersTreasuryOutboundTransferFailParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
func (*TestHelpersTreasuryOutboundTransferFailParams) AddExpand ¶
func (p *TestHelpersTreasuryOutboundTransferFailParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTreasuryOutboundTransferPostParams ¶
type TestHelpersTreasuryOutboundTransferPostParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
func (*TestHelpersTreasuryOutboundTransferPostParams) AddExpand ¶
func (p *TestHelpersTreasuryOutboundTransferPostParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTreasuryOutboundTransferReturnOutboundTransferParams ¶
type TestHelpersTreasuryOutboundTransferReturnOutboundTransferParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Details about a returned OutboundTransfer. ReturnedDetails *TestHelpersTreasuryOutboundTransferReturnOutboundTransferReturnedDetailsParams `form:"returned_details"` }
Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
func (*TestHelpersTreasuryOutboundTransferReturnOutboundTransferParams) AddExpand ¶
func (p *TestHelpersTreasuryOutboundTransferReturnOutboundTransferParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTreasuryOutboundTransferReturnOutboundTransferReturnedDetailsParams ¶
type TestHelpersTreasuryOutboundTransferReturnOutboundTransferReturnedDetailsParams struct { // Reason for the return. Code *string `form:"code"` }
Details about a returned OutboundTransfer.
type TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsParams ¶
type TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsParams struct { // The source type. Type *string `form:"type"` // Optional fields for `us_bank_account`. USBankAccount *TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccountParams `form:"us_bank_account"` }
Initiating payment method details for the object.
type TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccountParams ¶
type TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccountParams struct { // The bank account holder's name. AccountHolderName *string `form:"account_holder_name"` // The bank account number. AccountNumber *string `form:"account_number"` // The bank account's routing number. RoutingNumber *string `form:"routing_number"` }
Optional fields for `us_bank_account`.
type TestHelpersTreasuryReceivedCreditParams ¶
type TestHelpersTreasuryReceivedCreditParams struct { Params `form:"*"` // Amount (in cents) to be transferred. Amount *int64 `form:"amount"` // 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 `form:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The FinancialAccount to send funds to. FinancialAccount *string `form:"financial_account"` // Initiating payment method details for the object. InitiatingPaymentMethodDetails *TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsParams `form:"initiating_payment_method_details"` // The rails used for the object. Network *string `form:"network"` }
Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
func (*TestHelpersTreasuryReceivedCreditParams) AddExpand ¶
func (p *TestHelpersTreasuryReceivedCreditParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsParams ¶
type TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsParams struct { // The source type. Type *string `form:"type"` // Optional fields for `us_bank_account`. USBankAccount *TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccountParams `form:"us_bank_account"` }
Initiating payment method details for the object.
type TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccountParams ¶
type TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccountParams struct { // The bank account holder's name. AccountHolderName *string `form:"account_holder_name"` // The bank account number. AccountNumber *string `form:"account_number"` // The bank account's routing number. RoutingNumber *string `form:"routing_number"` }
Optional fields for `us_bank_account`.
type TestHelpersTreasuryReceivedDebitParams ¶
type TestHelpersTreasuryReceivedDebitParams struct { Params `form:"*"` // Amount (in cents) to be transferred. Amount *int64 `form:"amount"` // 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 `form:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The FinancialAccount to pull funds from. FinancialAccount *string `form:"financial_account"` // Initiating payment method details for the object. InitiatingPaymentMethodDetails *TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsParams `form:"initiating_payment_method_details"` // The rails used for the object. Network *string `form:"network"` }
Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
func (*TestHelpersTreasuryReceivedDebitParams) AddExpand ¶
func (p *TestHelpersTreasuryReceivedDebitParams) AddExpand(f string)
AddExpand appends a new field to expand.
type Token ¶
type Token struct { APIResource // These bank accounts are payment methods on `Customer` objects. // // On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer // destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). // They can be bank accounts or debit cards as well, and are documented in the links above. // // Related guide: [Bank debits and transfers](https://stripe.com/docs/payments/bank-debits-transfers) BankAccount *BankAccount `json:"bank_account"` // You can store multiple cards on a customer in order to charge the customer // later. You can also store multiple debit cards on a recipient in order to // transfer to those cards later. // // Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) Card *Card `json:"card"` // IP address of the client that generates the token. ClientIP string `json:"client_ip"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Type of the token: `account`, `bank_account`, `card`, or `pii`. Type TokenType `json:"type"` // Determines if you have already used this token (you can only use tokens once). Used bool `json:"used"` }
Tokenization is the process Stripe uses to collect sensitive card or bank account details, or personally identifiable information (PII), directly from your customers in a secure manner. A token representing this information is returned to your server to use. Use our [recommended payments integrations](https://stripe.com/docs/payments) to perform this process on the client-side. This guarantees that no sensitive card data touches your server, and allows your integration to operate in a PCI-compliant way.
If you can't use client-side tokenization, you can also create tokens using the API with either your publishable or secret API key. If your integration uses this method, you're responsible for any PCI compliance that it might require, and you must keep your secret API key safe. Unlike with client-side tokenization, your customer's information isn't sent directly to Stripe, so we can't determine how it's handled or stored.
You can't store or use tokens more than once. To store card or bank account information for later use, create Customer(https://stripe.com/docs/api#customers) objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, performs best with integrations that use client-side tokenization.
type TokenAccountParams ¶
type TokenAccountParams struct { // The business type. BusinessType *string `form:"business_type"` // Information about the company or business. Company *AccountCompanyParams `form:"company"` // Information about the person represented by the account. Individual *PersonParams `form:"individual"` // Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://stripe.com/docs/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"` }
Information for the account this token represents.
type TokenCVCUpdateParams ¶
type TokenCVCUpdateParams struct { // The CVC value, in string form. CVC *string `form:"cvc"` }
The updated CVC value this token represents.
type TokenPIIParams ¶
type TokenPIIParams struct { // The `id_number` for the PII, in string form. IDNumber *string `form:"id_number"` }
The PII this token represents.
type TokenParams ¶
type TokenParams struct { Params `form:"*"` // Information for the account this token represents. Account *TokenAccountParams `form:"account"` // The bank account this token will represent. BankAccount *BankAccountParams `form:"bank_account"` // The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. Card *CardParams `form:"card"` // Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). Customer *string `form:"customer"` // The updated CVC value this token represents. CVCUpdate *TokenCVCUpdateParams `form:"cvc_update"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Information for the person this token represents. Person *PersonParams `form:"person"` // The PII this token represents. PII *TokenPIIParams `form:"pii"` }
Retrieves the token with the given ID.
func (*TokenParams) AddExpand ¶
func (p *TokenParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TokenType ¶
type TokenType string
Type of the token: `account`, `bank_account`, `card`, or `pii`.
type Topup ¶
type Topup struct { APIResource // Amount transferred. Amount int64 `json:"amount"` // ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. ExpectedAvailabilityDate int64 `json:"expected_availability_date"` // Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). FailureCode string `json:"failure_code"` // Message to user further explaining reason for top-up failure if available. FailureMessage string `json:"failure_message"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account. Source *PaymentSource `json:"source"` // Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. StatementDescriptor string `json:"statement_descriptor"` // The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. Status TopupStatus `json:"status"` // A string that identifies this top-up as part of a group. TransferGroup string `json:"transfer_group"` // The following property is deprecated ArrivalDate int64 `json:"arrival_date"` }
To top up your Stripe balance, you create a top-up object. You can retrieve individual top-ups, as well as list all top-ups. Top-ups are identified by a unique, random ID.
Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups)
func (*Topup) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Topup. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type TopupList ¶
type TopupList struct { APIResource ListMeta Data []*Topup `json:"data"` }
TopupList is a list of Topups as retrieved from a list endpoint.
type TopupListParams ¶
type TopupListParams struct { ListParams `form:"*"` // A positive integer representing how much to transfer. Amount *int64 `form:"amount"` // A positive integer representing how much to transfer. AmountRange *RangeQueryParams `form:"amount"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. Created *int64 `form:"created"` // A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. Status *string `form:"status"` }
Returns a list of top-ups.
func (*TopupListParams) AddExpand ¶
func (p *TopupListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TopupParams ¶
type TopupParams struct { Params `form:"*"` // A positive integer representing how much to transfer. Amount *int64 `form:"amount"` // 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 `form:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). Source *string `form:"source"` // Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. StatementDescriptor *string `form:"statement_descriptor"` // A string that identifies this top-up as part of a group. TransferGroup *string `form:"transfer_group"` }
Top up the balance of an account
func (*TopupParams) AddExpand ¶
func (p *TopupParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TopupParams) AddMetadata ¶
func (p *TopupParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TopupStatus ¶
type TopupStatus string
The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`.
const ( TopupStatusCanceled TopupStatus = "canceled" TopupStatusFailed TopupStatus = "failed" TopupStatusPending TopupStatus = "pending" TopupStatusReversed TopupStatus = "reversed" TopupStatusSucceeded TopupStatus = "succeeded" )
List of values that TopupStatus can take
type Transfer ¶
type Transfer struct { APIResource // Amount in cents (or local equivalent) to be transferred. Amount int64 `json:"amount"` // Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). AmountReversed int64 `json:"amount_reversed"` // Balance transaction that describes the impact of this transfer on your account balance. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` // Time that this record of the transfer was first created. Created int64 `json:"created"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // ID of the Stripe account the transfer was sent to. Destination *Account `json:"destination"` // If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. DestinationPayment *Charge `json:"destination_payment"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // A list of reversals that have been applied to the transfer. Reversals *TransferReversalList `json:"reversals"` // Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. Reversed bool `json:"reversed"` // ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. SourceTransaction *Charge `json:"source_transaction"` // The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. SourceType TransferSourceType `json:"source_type"` // A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. TransferGroup string `json:"transfer_group"` }
A `Transfer` object is created when you move funds between Stripe accounts as part of Connect.
Before April 6, 2017, transfers also represented movement of funds from a Stripe account to a card or bank account. This behavior has since been split out into a Payout(https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more information, read about the [transfer/payout split](https://stripe.com/docs/transfer-payout-split).
Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers)
func (*Transfer) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Transfer. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type TransferList ¶
type TransferList struct { APIResource ListMeta Data []*Transfer `json:"data"` }
TransferList is a list of Transfers as retrieved from a list endpoint.
type TransferListParams ¶
type TransferListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Only return transfers for the destination specified by this account ID. Destination *string `form:"destination"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return transfers with the specified transfer group. TransferGroup *string `form:"transfer_group"` }
Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.
func (*TransferListParams) AddExpand ¶
func (p *TransferListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TransferParams ¶
type TransferParams struct { Params `form:"*"` // A positive integer in cents (or local equivalent) representing how much to transfer. Amount *int64 `form:"amount"` // 3-letter [ISO code for currency](https://stripe.com/docs/payouts). Currency *string `form:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // The ID of a connected Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. Destination *string `form:"destination"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details. SourceTransaction *string `form:"source_transaction"` // The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. SourceType *string `form:"source_type"` // A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. TransferGroup *string `form:"transfer_group"` }
To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error.
func (*TransferParams) AddExpand ¶
func (p *TransferParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TransferParams) AddMetadata ¶
func (p *TransferParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TransferReversal ¶
type TransferReversal struct { APIResource // Amount, in cents (or local equivalent). Amount int64 `json:"amount"` // Balance transaction that describes the impact on your account balance. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // Linked payment refund for the transfer reversal. DestinationPaymentRefund *Refund `json:"destination_payment_refund"` // Unique identifier for the object. ID string `json:"id"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // ID of the refund responsible for the transfer reversal. SourceRefund *Refund `json:"source_refund"` // ID of the transfer that was reversed. Transfer *Transfer `json:"transfer"` }
[Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a connected account, either entirely or partially, and can also specify whether to refund any related application fees. Transfer reversals add to the platform's balance and subtract from the destination account's balance.
Reversing a transfer that was made for a [destination charge](https://stripe.com/docs/connect/destination-charges) is allowed only up to the amount of the charge. It is possible to reverse a [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) transfer only if the destination account has enough balance to cover the reversal.
Related guide: [Reversing transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reversing-transfers)
func (*TransferReversal) UnmarshalJSON ¶
func (t *TransferReversal) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a TransferReversal. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type TransferReversalList ¶
type TransferReversalList struct { APIResource ListMeta Data []*TransferReversal `json:"data"` }
TransferReversalList is a list of TransferReversals as retrieved from a list endpoint.
type TransferReversalListParams ¶
type TransferReversalListParams struct { ListParams `form:"*"` ID *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.
func (*TransferReversalListParams) AddExpand ¶
func (p *TransferReversalListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TransferReversalParams ¶
type TransferReversalParams struct { Params `form:"*"` ID *string `form:"-"` // Included in URL // A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. Amount *int64 `form:"amount"` // An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. RefundApplicationFee *bool `form:"refund_application_fee"` }
When you create a new reversal, you must specify a transfer to create it on.
When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.
Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.
func (*TransferReversalParams) AddExpand ¶
func (p *TransferReversalParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TransferReversalParams) AddMetadata ¶
func (p *TransferReversalParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TransferSourceType ¶
type TransferSourceType string
The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.
const ( TransferSourceTypeBankAccount TransferSourceType = "bank_account" TransferSourceTypeCard TransferSourceType = "card" TransferSourceTypeFPX TransferSourceType = "fpx" )
List of values that TransferSourceType can take
type TreasuryCreditReversal ¶
type TreasuryCreditReversal struct { APIResource // Amount (in cents) transferred. Amount int64 `json:"amount"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // The FinancialAccount to reverse funds from. FinancialAccount string `json:"financial_account"` // A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // The rails used to reverse the funds. Network TreasuryCreditReversalNetwork `json:"network"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The ReceivedCredit being reversed. ReceivedCredit string `json:"received_credit"` // Status of the CreditReversal Status TreasuryCreditReversalStatus `json:"status"` StatusTransitions *TreasuryCreditReversalStatusTransitions `json:"status_transitions"` // The Transaction associated with this object. Transaction *TreasuryTransaction `json:"transaction"` }
You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
type TreasuryCreditReversalList ¶
type TreasuryCreditReversalList struct { APIResource ListMeta Data []*TreasuryCreditReversal `json:"data"` }
TreasuryCreditReversalList is a list of CreditReversals as retrieved from a list endpoint.
type TreasuryCreditReversalListParams ¶
type TreasuryCreditReversalListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Returns objects associated with this FinancialAccount. FinancialAccount *string `form:"financial_account"` // Only return CreditReversals for the ReceivedCredit ID. ReceivedCredit *string `form:"received_credit"` // Only return CreditReversals for a given status. Status *string `form:"status"` }
Returns a list of CreditReversals.
func (*TreasuryCreditReversalListParams) AddExpand ¶
func (p *TreasuryCreditReversalListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryCreditReversalNetwork ¶
type TreasuryCreditReversalNetwork string
The rails used to reverse the funds.
const ( TreasuryCreditReversalNetworkACH TreasuryCreditReversalNetwork = "ach" TreasuryCreditReversalNetworkStripe TreasuryCreditReversalNetwork = "stripe" )
List of values that TreasuryCreditReversalNetwork can take
type TreasuryCreditReversalParams ¶
type TreasuryCreditReversalParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // The ReceivedCredit to reverse. ReceivedCredit *string `form:"received_credit"` }
Reverses a ReceivedCredit and creates a CreditReversal object.
func (*TreasuryCreditReversalParams) AddExpand ¶
func (p *TreasuryCreditReversalParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TreasuryCreditReversalParams) AddMetadata ¶
func (p *TreasuryCreditReversalParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TreasuryCreditReversalStatus ¶
type TreasuryCreditReversalStatus string
Status of the CreditReversal
const ( TreasuryCreditReversalStatusCanceled TreasuryCreditReversalStatus = "canceled" TreasuryCreditReversalStatusPosted TreasuryCreditReversalStatus = "posted" TreasuryCreditReversalStatusProcessing TreasuryCreditReversalStatus = "processing" )
List of values that TreasuryCreditReversalStatus can take
type TreasuryCreditReversalStatusTransitions ¶
type TreasuryCreditReversalStatusTransitions struct { // Timestamp describing when the CreditReversal changed status to `posted` PostedAt int64 `json:"posted_at"` }
type TreasuryDebitReversal ¶
type TreasuryDebitReversal struct { APIResource // Amount (in cents) transferred. Amount int64 `json:"amount"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // The FinancialAccount to reverse funds from. FinancialAccount string `json:"financial_account"` // A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"` // Unique identifier for the object. ID string `json:"id"` // Other flows linked to a DebitReversal. LinkedFlows *TreasuryDebitReversalLinkedFlows `json:"linked_flows"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // The rails used to reverse the funds. Network TreasuryDebitReversalNetwork `json:"network"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The ReceivedDebit being reversed. ReceivedDebit string `json:"received_debit"` // Status of the DebitReversal Status TreasuryDebitReversalStatus `json:"status"` StatusTransitions *TreasuryDebitReversalStatusTransitions `json:"status_transitions"` // The Transaction associated with this object. Transaction *TreasuryTransaction `json:"transaction"` }
You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
type TreasuryDebitReversalLinkedFlows ¶
type TreasuryDebitReversalLinkedFlows struct { // Set if there is an Issuing dispute associated with the DebitReversal. IssuingDispute string `json:"issuing_dispute"` }
Other flows linked to a DebitReversal.
type TreasuryDebitReversalList ¶
type TreasuryDebitReversalList struct { APIResource ListMeta Data []*TreasuryDebitReversal `json:"data"` }
TreasuryDebitReversalList is a list of DebitReversals as retrieved from a list endpoint.
type TreasuryDebitReversalListParams ¶
type TreasuryDebitReversalListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Returns objects associated with this FinancialAccount. FinancialAccount *string `form:"financial_account"` // Only return DebitReversals for the ReceivedDebit ID. ReceivedDebit *string `form:"received_debit"` // Only return DebitReversals for a given resolution. Resolution *string `form:"resolution"` // Only return DebitReversals for a given status. Status *string `form:"status"` }
Returns a list of DebitReversals.
func (*TreasuryDebitReversalListParams) AddExpand ¶
func (p *TreasuryDebitReversalListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryDebitReversalNetwork ¶
type TreasuryDebitReversalNetwork string
The rails used to reverse the funds.
const ( TreasuryDebitReversalNetworkACH TreasuryDebitReversalNetwork = "ach" TreasuryDebitReversalNetworkCard TreasuryDebitReversalNetwork = "card" )
List of values that TreasuryDebitReversalNetwork can take
type TreasuryDebitReversalParams ¶
type TreasuryDebitReversalParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // The ReceivedDebit to reverse. ReceivedDebit *string `form:"received_debit"` }
Reverses a ReceivedDebit and creates a DebitReversal object.
func (*TreasuryDebitReversalParams) AddExpand ¶
func (p *TreasuryDebitReversalParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TreasuryDebitReversalParams) AddMetadata ¶
func (p *TreasuryDebitReversalParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TreasuryDebitReversalStatus ¶
type TreasuryDebitReversalStatus string
Status of the DebitReversal
const ( TreasuryDebitReversalStatusFailed TreasuryDebitReversalStatus = "failed" TreasuryDebitReversalStatusProcessing TreasuryDebitReversalStatus = "processing" TreasuryDebitReversalStatusSucceeded TreasuryDebitReversalStatus = "succeeded" )
List of values that TreasuryDebitReversalStatus can take
type TreasuryDebitReversalStatusTransitions ¶
type TreasuryDebitReversalStatusTransitions struct { // Timestamp describing when the DebitReversal changed status to `completed`. CompletedAt int64 `json:"completed_at"` }
type TreasuryFinancialAccount ¶
type TreasuryFinancialAccount struct { APIResource // The array of paths to active Features in the Features hash. ActiveFeatures []TreasuryFinancialAccountActiveFeature `json:"active_features"` // Balance information for the FinancialAccount Balance *TreasuryFinancialAccountBalance `json:"balance"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Country string `json:"country"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. // Stripe or the platform can control Features via the requested field. Features *TreasuryFinancialAccountFeatures `json:"features"` // The set of credentials that resolve to a FinancialAccount. FinancialAddresses []*TreasuryFinancialAccountFinancialAddress `json:"financial_addresses"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The array of paths to pending Features in the Features hash. PendingFeatures []TreasuryFinancialAccountPendingFeature `json:"pending_features"` // The set of functionalities that the platform can restrict on the FinancialAccount. PlatformRestrictions *TreasuryFinancialAccountPlatformRestrictions `json:"platform_restrictions"` // The array of paths to restricted Features in the Features hash. RestrictedFeatures []TreasuryFinancialAccountRestrictedFeature `json:"restricted_features"` // The enum specifying what state the account is in. Status TreasuryFinancialAccountStatus `json:"status"` StatusDetails *TreasuryFinancialAccountStatusDetails `json:"status_details"` // The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. SupportedCurrencies []Currency `json:"supported_currencies"` }
Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. FinancialAccounts serve as the source and destination of Treasury's money movement APIs.
type TreasuryFinancialAccountActiveFeature ¶
type TreasuryFinancialAccountActiveFeature string
The array of paths to active Features in the Features hash.
const ( TreasuryFinancialAccountActiveFeatureCardIssuing TreasuryFinancialAccountActiveFeature = "card_issuing" TreasuryFinancialAccountActiveFeatureDepositInsurance TreasuryFinancialAccountActiveFeature = "deposit_insurance" TreasuryFinancialAccountActiveFeatureFinancialAddressesABA TreasuryFinancialAccountActiveFeature = "financial_addresses.aba" TreasuryFinancialAccountActiveFeatureInboundTransfersACH TreasuryFinancialAccountActiveFeature = "inbound_transfers.ach" TreasuryFinancialAccountActiveFeatureIntraStripeFlows TreasuryFinancialAccountActiveFeature = "intra_stripe_flows" TreasuryFinancialAccountActiveFeatureOutboundPaymentsACH TreasuryFinancialAccountActiveFeature = "outbound_payments.ach" TreasuryFinancialAccountActiveFeatureOutboundPaymentsUSDomesticWire TreasuryFinancialAccountActiveFeature = "outbound_payments.us_domestic_wire" TreasuryFinancialAccountActiveFeatureOutboundTransfersACH TreasuryFinancialAccountActiveFeature = "outbound_transfers.ach" TreasuryFinancialAccountActiveFeatureOutboundTransfersUSDomesticWire TreasuryFinancialAccountActiveFeature = "outbound_transfers.us_domestic_wire" TreasuryFinancialAccountActiveFeatureRemoteDepositCapture TreasuryFinancialAccountActiveFeature = "remote_deposit_capture" )
List of values that TreasuryFinancialAccountActiveFeature can take
type TreasuryFinancialAccountBalance ¶
type TreasuryFinancialAccountBalance struct { // Funds the user can spend right now. Cash map[string]int64 `json:"cash"` // Funds not spendable yet, but will become available at a later time. InboundPending map[string]int64 `json:"inbound_pending"` // Funds in the account, but not spendable because they are being held for pending outbound flows. OutboundPending map[string]int64 `json:"outbound_pending"` }
Balance information for the FinancialAccount
type TreasuryFinancialAccountFeatures ¶
type TreasuryFinancialAccountFeatures struct { APIResource // Toggle settings for enabling/disabling a feature CardIssuing *TreasuryFinancialAccountFeaturesCardIssuing `json:"card_issuing"` // Toggle settings for enabling/disabling a feature DepositInsurance *TreasuryFinancialAccountFeaturesDepositInsurance `json:"deposit_insurance"` // Settings related to Financial Addresses features on a Financial Account FinancialAddresses *TreasuryFinancialAccountFeaturesFinancialAddresses `json:"financial_addresses"` // InboundTransfers contains inbound transfers features for a FinancialAccount. InboundTransfers *TreasuryFinancialAccountFeaturesInboundTransfers `json:"inbound_transfers"` // Toggle settings for enabling/disabling a feature IntraStripeFlows *TreasuryFinancialAccountFeaturesIntraStripeFlows `json:"intra_stripe_flows"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Settings related to Outbound Payments features on a Financial Account OutboundPayments *TreasuryFinancialAccountFeaturesOutboundPayments `json:"outbound_payments"` // OutboundTransfers contains outbound transfers features for a FinancialAccount. OutboundTransfers *TreasuryFinancialAccountFeaturesOutboundTransfers `json:"outbound_transfers"` }
Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. Stripe or the platform can control Features via the requested field.
type TreasuryFinancialAccountFeaturesCardIssuing ¶
type TreasuryFinancialAccountFeaturesCardIssuing struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` // Whether the Feature is operational. Status TreasuryFinancialAccountFeaturesCardIssuingStatus `json:"status"` // Additional details; includes at least one entry when the status is not `active`. StatusDetails []*TreasuryFinancialAccountFeaturesCardIssuingStatusDetail `json:"status_details"` }
Toggle settings for enabling/disabling a feature
type TreasuryFinancialAccountFeaturesCardIssuingParams ¶
type TreasuryFinancialAccountFeaturesCardIssuingParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
type TreasuryFinancialAccountFeaturesCardIssuingStatus ¶
type TreasuryFinancialAccountFeaturesCardIssuingStatus string
Whether the Feature is operational.
const ( TreasuryFinancialAccountFeaturesCardIssuingStatusActive TreasuryFinancialAccountFeaturesCardIssuingStatus = "active" TreasuryFinancialAccountFeaturesCardIssuingStatusPending TreasuryFinancialAccountFeaturesCardIssuingStatus = "pending" TreasuryFinancialAccountFeaturesCardIssuingStatusRestricted TreasuryFinancialAccountFeaturesCardIssuingStatus = "restricted" )
List of values that TreasuryFinancialAccountFeaturesCardIssuingStatus can take
type TreasuryFinancialAccountFeaturesCardIssuingStatusDetail ¶
type TreasuryFinancialAccountFeaturesCardIssuingStatusDetail struct { // Represents the reason why the status is `pending` or `restricted`. Code TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode `json:"code"` // Represents what the user should do, if anything, to activate the Feature. Resolution TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution `json:"resolution"` // The `platform_restrictions` that are restricting this Feature. Restriction TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction `json:"restriction"` }
Additional details; includes at least one entry when the status is not `active`.
type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode ¶
type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode string
Represents the reason why the status is `pending` or `restricted`.
const ( TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeActivating TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "activating" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeCapabilityNotRequested TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "capability_not_requested" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeFinancialAccountClosed TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "financial_account_closed" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRejectedOther TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "rejected_other" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRejectedUnsupportedBusiness TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "rejected_unsupported_business" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRequirementsPastDue TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "requirements_past_due" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "requirements_pending_verification" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRestrictedByPlatform TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "restricted_by_platform" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRestrictedOther TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "restricted_other" )
List of values that TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode can take
type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution ¶
type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution string
Represents what the user should do, if anything, to activate the Feature.
const ( TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolutionContactStripe TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution = "contact_stripe" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution = "provide_information" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolutionRemoveRestriction TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution = "remove_restriction" )
List of values that TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution can take
type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction ¶
type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction string
The `platform_restrictions` that are restricting this Feature.
const ( TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestrictionInboundFlows TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction = "inbound_flows" TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction = "outbound_flows" )
List of values that TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction can take
type TreasuryFinancialAccountFeaturesDepositInsurance ¶
type TreasuryFinancialAccountFeaturesDepositInsurance struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` // Whether the Feature is operational. Status TreasuryFinancialAccountFeaturesDepositInsuranceStatus `json:"status"` // Additional details; includes at least one entry when the status is not `active`. StatusDetails []*TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetail `json:"status_details"` }
Toggle settings for enabling/disabling a feature
type TreasuryFinancialAccountFeaturesDepositInsuranceParams ¶
type TreasuryFinancialAccountFeaturesDepositInsuranceParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
type TreasuryFinancialAccountFeaturesDepositInsuranceStatus ¶
type TreasuryFinancialAccountFeaturesDepositInsuranceStatus string
Whether the Feature is operational.
const ( TreasuryFinancialAccountFeaturesDepositInsuranceStatusActive TreasuryFinancialAccountFeaturesDepositInsuranceStatus = "active" TreasuryFinancialAccountFeaturesDepositInsuranceStatusPending TreasuryFinancialAccountFeaturesDepositInsuranceStatus = "pending" TreasuryFinancialAccountFeaturesDepositInsuranceStatusRestricted TreasuryFinancialAccountFeaturesDepositInsuranceStatus = "restricted" )
List of values that TreasuryFinancialAccountFeaturesDepositInsuranceStatus can take
type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetail ¶
type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetail struct { // Represents the reason why the status is `pending` or `restricted`. Code TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode `json:"code"` // Represents what the user should do, if anything, to activate the Feature. Resolution TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution `json:"resolution"` // The `platform_restrictions` that are restricting this Feature. Restriction TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction `json:"restriction"` }
Additional details; includes at least one entry when the status is not `active`.
type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode ¶
type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode string
Represents the reason why the status is `pending` or `restricted`.
const ( TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeActivating TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "activating" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeCapabilityNotRequested TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "capability_not_requested" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeFinancialAccountClosed TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "financial_account_closed" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRejectedOther TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "rejected_other" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRejectedUnsupportedBusiness TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "rejected_unsupported_business" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRequirementsPastDue TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "requirements_past_due" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "requirements_pending_verification" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRestrictedByPlatform TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "restricted_by_platform" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRestrictedOther TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "restricted_other" )
List of values that TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode can take
type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution ¶
type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution string
Represents what the user should do, if anything, to activate the Feature.
const ( TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolutionContactStripe TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution = "contact_stripe" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution = "provide_information" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolutionRemoveRestriction TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution = "remove_restriction" )
List of values that TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution can take
type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction ¶
type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction string
The `platform_restrictions` that are restricting this Feature.
const ( TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestrictionInboundFlows TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction = "inbound_flows" TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction = "outbound_flows" )
List of values that TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction can take
type TreasuryFinancialAccountFeaturesFinancialAddresses ¶
type TreasuryFinancialAccountFeaturesFinancialAddresses struct { // Toggle settings for enabling/disabling the ABA address feature ABA *TreasuryFinancialAccountFeaturesFinancialAddressesABA `json:"aba"` }
Settings related to Financial Addresses features on a Financial Account
type TreasuryFinancialAccountFeaturesFinancialAddressesABA ¶
type TreasuryFinancialAccountFeaturesFinancialAddressesABA struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` // Whether the Feature is operational. Status TreasuryFinancialAccountFeaturesFinancialAddressesABAStatus `json:"status"` // Additional details; includes at least one entry when the status is not `active`. StatusDetails []*TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetail `json:"status_details"` }
Toggle settings for enabling/disabling the ABA address feature
type TreasuryFinancialAccountFeaturesFinancialAddressesABAParams ¶
type TreasuryFinancialAccountFeaturesFinancialAddressesABAParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Adds an ABA FinancialAddress to the FinancialAccount.
type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatus ¶
type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatus string
Whether the Feature is operational.
const ( TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusActive TreasuryFinancialAccountFeaturesFinancialAddressesABAStatus = "active" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusPending TreasuryFinancialAccountFeaturesFinancialAddressesABAStatus = "pending" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusRestricted TreasuryFinancialAccountFeaturesFinancialAddressesABAStatus = "restricted" )
List of values that TreasuryFinancialAccountFeaturesFinancialAddressesABAStatus can take
type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetail ¶
type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetail struct { // Represents the reason why the status is `pending` or `restricted`. Code TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode `json:"code"` // Represents what the user should do, if anything, to activate the Feature. Resolution TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolution `json:"resolution"` // The `platform_restrictions` that are restricting this Feature. Restriction TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailRestriction `json:"restriction"` }
Additional details; includes at least one entry when the status is not `active`.
type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode ¶
type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode string
Represents the reason why the status is `pending` or `restricted`.
const ( TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCodeActivating TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode = "activating" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCodeCapabilityNotRequested TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode = "capability_not_requested" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCodeFinancialAccountClosed TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode = "financial_account_closed" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCodeRejectedOther TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode = "rejected_other" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCodeRejectedUnsupportedBusiness TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode = "rejected_unsupported_business" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCodeRequirementsPastDue TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode = "requirements_past_due" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode = "requirements_pending_verification" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCodeRestrictedByPlatform TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode = "restricted_by_platform" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCodeRestrictedOther TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode = "restricted_other" )
List of values that TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailCode can take
type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolution ¶
type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolution string
Represents what the user should do, if anything, to activate the Feature.
const ( TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolutionContactStripe TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolution = "contact_stripe" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolution = "provide_information" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolutionRemoveRestriction TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolution = "remove_restriction" )
List of values that TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailResolution can take
type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailRestriction ¶
type TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailRestriction string
The `platform_restrictions` that are restricting this Feature.
const ( TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailRestrictionInboundFlows TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailRestriction = "inbound_flows" TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailRestriction = "outbound_flows" )
List of values that TreasuryFinancialAccountFeaturesFinancialAddressesABAStatusDetailRestriction can take
type TreasuryFinancialAccountFeaturesFinancialAddressesParams ¶
type TreasuryFinancialAccountFeaturesFinancialAddressesParams struct { // Adds an ABA FinancialAddress to the FinancialAccount. ABA *TreasuryFinancialAccountFeaturesFinancialAddressesABAParams `form:"aba"` }
Contains Features that add FinancialAddresses to the FinancialAccount.
type TreasuryFinancialAccountFeaturesInboundTransfers ¶
type TreasuryFinancialAccountFeaturesInboundTransfers struct { // Toggle settings for enabling/disabling an ACH specific feature ACH *TreasuryFinancialAccountFeaturesInboundTransfersACH `json:"ach"` }
InboundTransfers contains inbound transfers features for a FinancialAccount.
type TreasuryFinancialAccountFeaturesInboundTransfersACH ¶
type TreasuryFinancialAccountFeaturesInboundTransfersACH struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` // Whether the Feature is operational. Status TreasuryFinancialAccountFeaturesInboundTransfersACHStatus `json:"status"` // Additional details; includes at least one entry when the status is not `active`. StatusDetails []*TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetail `json:"status_details"` }
Toggle settings for enabling/disabling an ACH specific feature
type TreasuryFinancialAccountFeaturesInboundTransfersACHParams ¶
type TreasuryFinancialAccountFeaturesInboundTransfersACHParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Enables ACH Debits via the InboundTransfers API.
type TreasuryFinancialAccountFeaturesInboundTransfersACHStatus ¶
type TreasuryFinancialAccountFeaturesInboundTransfersACHStatus string
Whether the Feature is operational.
const ( TreasuryFinancialAccountFeaturesInboundTransfersACHStatusActive TreasuryFinancialAccountFeaturesInboundTransfersACHStatus = "active" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusPending TreasuryFinancialAccountFeaturesInboundTransfersACHStatus = "pending" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusRestricted TreasuryFinancialAccountFeaturesInboundTransfersACHStatus = "restricted" )
List of values that TreasuryFinancialAccountFeaturesInboundTransfersACHStatus can take
type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetail ¶
type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetail struct { // Represents the reason why the status is `pending` or `restricted`. Code TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode `json:"code"` // Represents what the user should do, if anything, to activate the Feature. Resolution TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution `json:"resolution"` // The `platform_restrictions` that are restricting this Feature. Restriction TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction `json:"restriction"` }
Additional details; includes at least one entry when the status is not `active`.
type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode ¶
type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode string
Represents the reason why the status is `pending` or `restricted`.
const ( TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeActivating TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "activating" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeCapabilityNotRequested TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "capability_not_requested" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeFinancialAccountClosed TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "financial_account_closed" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRejectedOther TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "rejected_other" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRejectedUnsupportedBusiness TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "rejected_unsupported_business" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRequirementsPastDue TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "requirements_past_due" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "requirements_pending_verification" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRestrictedByPlatform TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "restricted_by_platform" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRestrictedOther TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "restricted_other" )
List of values that TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode can take
type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution ¶
type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution string
Represents what the user should do, if anything, to activate the Feature.
const ( TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolutionContactStripe TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution = "contact_stripe" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution = "provide_information" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolutionRemoveRestriction TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution = "remove_restriction" )
List of values that TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution can take
type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction ¶
type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction string
The `platform_restrictions` that are restricting this Feature.
const ( TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestrictionInboundFlows TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction = "inbound_flows" TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction = "outbound_flows" )
List of values that TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction can take
type TreasuryFinancialAccountFeaturesInboundTransfersParams ¶
type TreasuryFinancialAccountFeaturesInboundTransfersParams struct { // Enables ACH Debits via the InboundTransfers API. ACH *TreasuryFinancialAccountFeaturesInboundTransfersACHParams `form:"ach"` }
Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
type TreasuryFinancialAccountFeaturesIntraStripeFlows ¶
type TreasuryFinancialAccountFeaturesIntraStripeFlows struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` // Whether the Feature is operational. Status TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus `json:"status"` // Additional details; includes at least one entry when the status is not `active`. StatusDetails []*TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetail `json:"status_details"` }
Toggle settings for enabling/disabling a feature
type TreasuryFinancialAccountFeaturesIntraStripeFlowsParams ¶
type TreasuryFinancialAccountFeaturesIntraStripeFlowsParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus ¶
type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus string
Whether the Feature is operational.
const ( TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusActive TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus = "active" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusPending TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus = "pending" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusRestricted TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus = "restricted" )
List of values that TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus can take
type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetail ¶
type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetail struct { // Represents the reason why the status is `pending` or `restricted`. Code TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode `json:"code"` // Represents what the user should do, if anything, to activate the Feature. Resolution TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution `json:"resolution"` // The `platform_restrictions` that are restricting this Feature. Restriction TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction `json:"restriction"` }
Additional details; includes at least one entry when the status is not `active`.
type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode ¶
type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode string
Represents the reason why the status is `pending` or `restricted`.
const ( TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeActivating TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "activating" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeCapabilityNotRequested TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "capability_not_requested" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeFinancialAccountClosed TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "financial_account_closed" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRejectedOther TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "rejected_other" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRejectedUnsupportedBusiness TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "rejected_unsupported_business" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRequirementsPastDue TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "requirements_past_due" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "requirements_pending_verification" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRestrictedByPlatform TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "restricted_by_platform" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRestrictedOther TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "restricted_other" )
List of values that TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode can take
type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution ¶
type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution string
Represents what the user should do, if anything, to activate the Feature.
const ( TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolutionContactStripe TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution = "contact_stripe" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution = "provide_information" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolutionRemoveRestriction TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution = "remove_restriction" )
List of values that TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution can take
type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction ¶
type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction string
The `platform_restrictions` that are restricting this Feature.
const ( TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestrictionInboundFlows TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction = "inbound_flows" TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction = "outbound_flows" )
List of values that TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction can take
type TreasuryFinancialAccountFeaturesOutboundPayments ¶
type TreasuryFinancialAccountFeaturesOutboundPayments struct { // Toggle settings for enabling/disabling an ACH specific feature ACH *TreasuryFinancialAccountFeaturesOutboundPaymentsACH `json:"ach"` // Toggle settings for enabling/disabling a feature USDomesticWire *TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWire `json:"us_domestic_wire"` }
Settings related to Outbound Payments features on a Financial Account
type TreasuryFinancialAccountFeaturesOutboundPaymentsACH ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsACH struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` // Whether the Feature is operational. Status TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus `json:"status"` // Additional details; includes at least one entry when the status is not `active`. StatusDetails []*TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetail `json:"status_details"` }
Toggle settings for enabling/disabling an ACH specific feature
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHParams ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Enables ACH transfers via the OutboundPayments API.
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus string
Whether the Feature is operational.
const ( TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusActive TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus = "active" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusPending TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus = "pending" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusRestricted TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus = "restricted" )
List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus can take
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetail ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetail struct { // Represents the reason why the status is `pending` or `restricted`. Code TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode `json:"code"` // Represents what the user should do, if anything, to activate the Feature. Resolution TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution `json:"resolution"` // The `platform_restrictions` that are restricting this Feature. Restriction TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction `json:"restriction"` }
Additional details; includes at least one entry when the status is not `active`.
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode string
Represents the reason why the status is `pending` or `restricted`.
const ( TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeActivating TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "activating" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeCapabilityNotRequested TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "capability_not_requested" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeFinancialAccountClosed TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "financial_account_closed" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRejectedOther TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "rejected_other" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRejectedUnsupportedBusiness TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "rejected_unsupported_business" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRequirementsPastDue TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "requirements_past_due" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "requirements_pending_verification" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRestrictedByPlatform TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "restricted_by_platform" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRestrictedOther TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "restricted_other" )
List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode can take
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution string
Represents what the user should do, if anything, to activate the Feature.
const ( TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolutionContactStripe TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution = "contact_stripe" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution = "provide_information" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolutionRemoveRestriction TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution = "remove_restriction" )
List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution can take
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction string
The `platform_restrictions` that are restricting this Feature.
const ( TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestrictionInboundFlows TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction = "inbound_flows" TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction = "outbound_flows" )
List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction can take
type TreasuryFinancialAccountFeaturesOutboundPaymentsParams ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsParams struct { // Enables ACH transfers via the OutboundPayments API. ACH *TreasuryFinancialAccountFeaturesOutboundPaymentsACHParams `form:"ach"` // Enables US domestic wire transfers via the OutboundPayments API. USDomesticWire *TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireParams `form:"us_domestic_wire"` }
Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWire ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWire struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` // Whether the Feature is operational. Status TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus `json:"status"` // Additional details; includes at least one entry when the status is not `active`. StatusDetails []*TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetail `json:"status_details"` }
Toggle settings for enabling/disabling a feature
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireParams ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Enables US domestic wire transfers via the OutboundPayments API.
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus string
Whether the Feature is operational.
const ( TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusActive TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus = "active" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusPending TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus = "pending" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusRestricted TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus = "restricted" )
List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus can take
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetail ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetail struct { // Represents the reason why the status is `pending` or `restricted`. Code TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode `json:"code"` // Represents what the user should do, if anything, to activate the Feature. Resolution TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution `json:"resolution"` // The `platform_restrictions` that are restricting this Feature. Restriction TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction `json:"restriction"` }
Additional details; includes at least one entry when the status is not `active`.
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode string
Represents the reason why the status is `pending` or `restricted`.
const ( TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeActivating TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "activating" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeCapabilityNotRequested TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "capability_not_requested" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeFinancialAccountClosed TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "financial_account_closed" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRejectedOther TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "rejected_other" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRejectedUnsupportedBusiness TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "rejected_unsupported_business" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRequirementsPastDue TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "requirements_past_due" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "requirements_pending_verification" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRestrictedByPlatform TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "restricted_by_platform" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRestrictedOther TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "restricted_other" )
List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode can take
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution string
Represents what the user should do, if anything, to activate the Feature.
const ( TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolutionContactStripe TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution = "contact_stripe" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution = "provide_information" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolutionRemoveRestriction TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution = "remove_restriction" )
List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution can take
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction ¶
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction string
The `platform_restrictions` that are restricting this Feature.
const ( TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestrictionInboundFlows TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction = "inbound_flows" TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction = "outbound_flows" )
List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction can take
type TreasuryFinancialAccountFeaturesOutboundTransfers ¶
type TreasuryFinancialAccountFeaturesOutboundTransfers struct { // Toggle settings for enabling/disabling an ACH specific feature ACH *TreasuryFinancialAccountFeaturesOutboundTransfersACH `json:"ach"` // Toggle settings for enabling/disabling a feature USDomesticWire *TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWire `json:"us_domestic_wire"` }
OutboundTransfers contains outbound transfers features for a FinancialAccount.
type TreasuryFinancialAccountFeaturesOutboundTransfersACH ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersACH struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` // Whether the Feature is operational. Status TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus `json:"status"` // Additional details; includes at least one entry when the status is not `active`. StatusDetails []*TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetail `json:"status_details"` }
Toggle settings for enabling/disabling an ACH specific feature
type TreasuryFinancialAccountFeaturesOutboundTransfersACHParams ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersACHParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Enables ACH transfers via the OutboundTransfers API.
type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus string
Whether the Feature is operational.
const ( TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusActive TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus = "active" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusPending TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus = "pending" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusRestricted TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus = "restricted" )
List of values that TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus can take
type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetail ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetail struct { // Represents the reason why the status is `pending` or `restricted`. Code TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode `json:"code"` // Represents what the user should do, if anything, to activate the Feature. Resolution TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution `json:"resolution"` // The `platform_restrictions` that are restricting this Feature. Restriction TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction `json:"restriction"` }
Additional details; includes at least one entry when the status is not `active`.
type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode string
Represents the reason why the status is `pending` or `restricted`.
const ( TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeActivating TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "activating" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeCapabilityNotRequested TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "capability_not_requested" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeFinancialAccountClosed TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "financial_account_closed" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRejectedOther TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "rejected_other" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRejectedUnsupportedBusiness TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "rejected_unsupported_business" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRequirementsPastDue TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "requirements_past_due" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "requirements_pending_verification" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRestrictedByPlatform TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "restricted_by_platform" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRestrictedOther TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "restricted_other" )
List of values that TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode can take
type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution string
Represents what the user should do, if anything, to activate the Feature.
const ( TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolutionContactStripe TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution = "contact_stripe" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution = "provide_information" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolutionRemoveRestriction TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution = "remove_restriction" )
List of values that TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution can take
type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction string
The `platform_restrictions` that are restricting this Feature.
const ( TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestrictionInboundFlows TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction = "inbound_flows" TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction = "outbound_flows" )
List of values that TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction can take
type TreasuryFinancialAccountFeaturesOutboundTransfersParams ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersParams struct { // Enables ACH transfers via the OutboundTransfers API. ACH *TreasuryFinancialAccountFeaturesOutboundTransfersACHParams `form:"ach"` // Enables US domestic wire transfers via the OutboundTransfers API. USDomesticWire *TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireParams `form:"us_domestic_wire"` }
Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWire ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWire struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` // Whether the Feature is operational. Status TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus `json:"status"` // Additional details; includes at least one entry when the status is not `active`. StatusDetails []*TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetail `json:"status_details"` }
Toggle settings for enabling/disabling a feature
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireParams ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Enables US domestic wire transfers via the OutboundTransfers API.
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus string
Whether the Feature is operational.
const ( TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusActive TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus = "active" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusPending TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus = "pending" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusRestricted TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus = "restricted" )
List of values that TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus can take
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetail ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetail struct { // Represents the reason why the status is `pending` or `restricted`. Code TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode `json:"code"` // Represents what the user should do, if anything, to activate the Feature. Resolution TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution `json:"resolution"` // The `platform_restrictions` that are restricting this Feature. Restriction TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction `json:"restriction"` }
Additional details; includes at least one entry when the status is not `active`.
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode string
Represents the reason why the status is `pending` or `restricted`.
const ( TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeActivating TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "activating" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeCapabilityNotRequested TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "capability_not_requested" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeFinancialAccountClosed TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "financial_account_closed" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRejectedOther TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "rejected_other" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRejectedUnsupportedBusiness TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "rejected_unsupported_business" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRequirementsPastDue TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "requirements_past_due" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "requirements_pending_verification" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRestrictedByPlatform TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "restricted_by_platform" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRestrictedOther TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "restricted_other" )
List of values that TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode can take
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution string
Represents what the user should do, if anything, to activate the Feature.
const ( TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolutionContactStripe TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution = "contact_stripe" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution = "provide_information" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolutionRemoveRestriction TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution = "remove_restriction" )
List of values that TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution can take
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction ¶
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction string
The `platform_restrictions` that are restricting this Feature.
const ( TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestrictionInboundFlows TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction = "inbound_flows" TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction = "outbound_flows" )
List of values that TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction can take
type TreasuryFinancialAccountFeaturesParams ¶
type TreasuryFinancialAccountFeaturesParams struct { // Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. CardIssuing *TreasuryFinancialAccountFeaturesCardIssuingParams `form:"card_issuing"` // Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. DepositInsurance *TreasuryFinancialAccountFeaturesDepositInsuranceParams `form:"deposit_insurance"` // Contains Features that add FinancialAddresses to the FinancialAccount. FinancialAddresses *TreasuryFinancialAccountFeaturesFinancialAddressesParams `form:"financial_addresses"` // Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. InboundTransfers *TreasuryFinancialAccountFeaturesInboundTransfersParams `form:"inbound_transfers"` // Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). IntraStripeFlows *TreasuryFinancialAccountFeaturesIntraStripeFlowsParams `form:"intra_stripe_flows"` // Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. OutboundPayments *TreasuryFinancialAccountFeaturesOutboundPaymentsParams `form:"outbound_payments"` // Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. OutboundTransfers *TreasuryFinancialAccountFeaturesOutboundTransfersParams `form:"outbound_transfers"` }
Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.
type TreasuryFinancialAccountFinancialAddress ¶
type TreasuryFinancialAccountFinancialAddress struct { // ABA Records contain U.S. bank account details per the ABA format. ABA *TreasuryFinancialAccountFinancialAddressABA `json:"aba"` // The list of networks that the address supports SupportedNetworks []TreasuryFinancialAccountFinancialAddressSupportedNetwork `json:"supported_networks"` // The type of financial address Type TreasuryFinancialAccountFinancialAddressType `json:"type"` }
The set of credentials that resolve to a FinancialAccount.
type TreasuryFinancialAccountFinancialAddressABA ¶
type TreasuryFinancialAccountFinancialAddressABA struct { // The name of the person or business that owns the bank account. AccountHolderName string `json:"account_holder_name"` // The account number. AccountNumber string `json:"account_number"` // The last four characters of the account number. AccountNumberLast4 string `json:"account_number_last4"` // Name of the bank. BankName string `json:"bank_name"` // Routing number for the account. RoutingNumber string `json:"routing_number"` }
ABA Records contain U.S. bank account details per the ABA format.
type TreasuryFinancialAccountFinancialAddressSupportedNetwork ¶
type TreasuryFinancialAccountFinancialAddressSupportedNetwork string
The list of networks that the address supports
const ( TreasuryFinancialAccountFinancialAddressSupportedNetworkACH TreasuryFinancialAccountFinancialAddressSupportedNetwork = "ach" TreasuryFinancialAccountFinancialAddressSupportedNetworkUSDomesticWire TreasuryFinancialAccountFinancialAddressSupportedNetwork = "us_domestic_wire" )
List of values that TreasuryFinancialAccountFinancialAddressSupportedNetwork can take
type TreasuryFinancialAccountFinancialAddressType ¶
type TreasuryFinancialAccountFinancialAddressType string
The type of financial address
const (
TreasuryFinancialAccountFinancialAddressTypeABA TreasuryFinancialAccountFinancialAddressType = "aba"
)
List of values that TreasuryFinancialAccountFinancialAddressType can take
type TreasuryFinancialAccountList ¶
type TreasuryFinancialAccountList struct { APIResource ListMeta Data []*TreasuryFinancialAccount `json:"data"` }
TreasuryFinancialAccountList is a list of FinancialAccounts as retrieved from a list endpoint.
type TreasuryFinancialAccountListParams ¶
type TreasuryFinancialAccountListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of FinancialAccounts.
func (*TreasuryFinancialAccountListParams) AddExpand ¶
func (p *TreasuryFinancialAccountListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryFinancialAccountParams ¶
type TreasuryFinancialAccountParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. Features *TreasuryFinancialAccountFeaturesParams `form:"features"` // 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`. Metadata map[string]string `form:"metadata"` // The set of functionalities that the platform can restrict on the FinancialAccount. PlatformRestrictions *TreasuryFinancialAccountPlatformRestrictionsParams `form:"platform_restrictions"` // The currencies the FinancialAccount can hold a balance in. SupportedCurrencies []*string `form:"supported_currencies"` }
Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.
func (*TreasuryFinancialAccountParams) AddExpand ¶
func (p *TreasuryFinancialAccountParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TreasuryFinancialAccountParams) AddMetadata ¶
func (p *TreasuryFinancialAccountParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TreasuryFinancialAccountPendingFeature ¶
type TreasuryFinancialAccountPendingFeature string
The array of paths to pending Features in the Features hash.
const ( TreasuryFinancialAccountPendingFeatureCardIssuing TreasuryFinancialAccountPendingFeature = "card_issuing" TreasuryFinancialAccountPendingFeatureDepositInsurance TreasuryFinancialAccountPendingFeature = "deposit_insurance" TreasuryFinancialAccountPendingFeatureFinancialAddressesABA TreasuryFinancialAccountPendingFeature = "financial_addresses.aba" TreasuryFinancialAccountPendingFeatureInboundTransfersACH TreasuryFinancialAccountPendingFeature = "inbound_transfers.ach" TreasuryFinancialAccountPendingFeatureIntraStripeFlows TreasuryFinancialAccountPendingFeature = "intra_stripe_flows" TreasuryFinancialAccountPendingFeatureOutboundPaymentsACH TreasuryFinancialAccountPendingFeature = "outbound_payments.ach" TreasuryFinancialAccountPendingFeatureOutboundPaymentsUSDomesticWire TreasuryFinancialAccountPendingFeature = "outbound_payments.us_domestic_wire" TreasuryFinancialAccountPendingFeatureOutboundTransfersACH TreasuryFinancialAccountPendingFeature = "outbound_transfers.ach" TreasuryFinancialAccountPendingFeatureOutboundTransfersUSDomesticWire TreasuryFinancialAccountPendingFeature = "outbound_transfers.us_domestic_wire" TreasuryFinancialAccountPendingFeatureRemoteDepositCapture TreasuryFinancialAccountPendingFeature = "remote_deposit_capture" )
List of values that TreasuryFinancialAccountPendingFeature can take
type TreasuryFinancialAccountPlatformRestrictions ¶
type TreasuryFinancialAccountPlatformRestrictions struct { // Restricts all inbound money movement. InboundFlows TreasuryFinancialAccountPlatformRestrictionsInboundFlows `json:"inbound_flows"` // Restricts all outbound money movement. OutboundFlows TreasuryFinancialAccountPlatformRestrictionsOutboundFlows `json:"outbound_flows"` }
The set of functionalities that the platform can restrict on the FinancialAccount.
type TreasuryFinancialAccountPlatformRestrictionsInboundFlows ¶
type TreasuryFinancialAccountPlatformRestrictionsInboundFlows string
Restricts all inbound money movement.
const ( TreasuryFinancialAccountPlatformRestrictionsInboundFlowsRestricted TreasuryFinancialAccountPlatformRestrictionsInboundFlows = "restricted" TreasuryFinancialAccountPlatformRestrictionsInboundFlowsUnrestricted TreasuryFinancialAccountPlatformRestrictionsInboundFlows = "unrestricted" )
List of values that TreasuryFinancialAccountPlatformRestrictionsInboundFlows can take
type TreasuryFinancialAccountPlatformRestrictionsOutboundFlows ¶
type TreasuryFinancialAccountPlatformRestrictionsOutboundFlows string
Restricts all outbound money movement.
const ( TreasuryFinancialAccountPlatformRestrictionsOutboundFlowsRestricted TreasuryFinancialAccountPlatformRestrictionsOutboundFlows = "restricted" TreasuryFinancialAccountPlatformRestrictionsOutboundFlowsUnrestricted TreasuryFinancialAccountPlatformRestrictionsOutboundFlows = "unrestricted" )
List of values that TreasuryFinancialAccountPlatformRestrictionsOutboundFlows can take
type TreasuryFinancialAccountPlatformRestrictionsParams ¶
type TreasuryFinancialAccountPlatformRestrictionsParams struct { // Restricts all inbound money movement. InboundFlows *string `form:"inbound_flows"` // Restricts all outbound money movement. OutboundFlows *string `form:"outbound_flows"` }
The set of functionalities that the platform can restrict on the FinancialAccount.
type TreasuryFinancialAccountRestrictedFeature ¶
type TreasuryFinancialAccountRestrictedFeature string
The array of paths to restricted Features in the Features hash.
const ( TreasuryFinancialAccountRestrictedFeatureCardIssuing TreasuryFinancialAccountRestrictedFeature = "card_issuing" TreasuryFinancialAccountRestrictedFeatureDepositInsurance TreasuryFinancialAccountRestrictedFeature = "deposit_insurance" TreasuryFinancialAccountRestrictedFeatureFinancialAddressesABA TreasuryFinancialAccountRestrictedFeature = "financial_addresses.aba" TreasuryFinancialAccountRestrictedFeatureInboundTransfersACH TreasuryFinancialAccountRestrictedFeature = "inbound_transfers.ach" TreasuryFinancialAccountRestrictedFeatureIntraStripeFlows TreasuryFinancialAccountRestrictedFeature = "intra_stripe_flows" TreasuryFinancialAccountRestrictedFeatureOutboundPaymentsACH TreasuryFinancialAccountRestrictedFeature = "outbound_payments.ach" TreasuryFinancialAccountRestrictedFeatureOutboundPaymentsUSDomesticWire TreasuryFinancialAccountRestrictedFeature = "outbound_payments.us_domestic_wire" TreasuryFinancialAccountRestrictedFeatureOutboundTransfersACH TreasuryFinancialAccountRestrictedFeature = "outbound_transfers.ach" TreasuryFinancialAccountRestrictedFeatureOutboundTransfersUSDomesticWire TreasuryFinancialAccountRestrictedFeature = "outbound_transfers.us_domestic_wire" TreasuryFinancialAccountRestrictedFeatureRemoteDepositCapture TreasuryFinancialAccountRestrictedFeature = "remote_deposit_capture" )
List of values that TreasuryFinancialAccountRestrictedFeature can take
type TreasuryFinancialAccountRetrieveFeaturesParams ¶
type TreasuryFinancialAccountRetrieveFeaturesParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves Features information associated with the FinancialAccount.
func (*TreasuryFinancialAccountRetrieveFeaturesParams) AddExpand ¶
func (p *TreasuryFinancialAccountRetrieveFeaturesParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryFinancialAccountStatus ¶
type TreasuryFinancialAccountStatus string
The enum specifying what state the account is in.
const ( TreasuryFinancialAccountStatusClosed TreasuryFinancialAccountStatus = "closed" TreasuryFinancialAccountStatusOpen TreasuryFinancialAccountStatus = "open" )
List of values that TreasuryFinancialAccountStatus can take
type TreasuryFinancialAccountStatusDetails ¶
type TreasuryFinancialAccountStatusDetails struct { // Details related to the closure of this FinancialAccount Closed *TreasuryFinancialAccountStatusDetailsClosed `json:"closed"` }
type TreasuryFinancialAccountStatusDetailsClosed ¶
type TreasuryFinancialAccountStatusDetailsClosed struct { // The array that contains reasons for a FinancialAccount closure. Reasons []TreasuryFinancialAccountStatusDetailsClosedReason `json:"reasons"` }
Details related to the closure of this FinancialAccount
type TreasuryFinancialAccountStatusDetailsClosedReason ¶
type TreasuryFinancialAccountStatusDetailsClosedReason string
The array that contains reasons for a FinancialAccount closure.
const ( TreasuryFinancialAccountStatusDetailsClosedReasonAccountRejected TreasuryFinancialAccountStatusDetailsClosedReason = "account_rejected" TreasuryFinancialAccountStatusDetailsClosedReasonClosedByPlatform TreasuryFinancialAccountStatusDetailsClosedReason = "closed_by_platform" TreasuryFinancialAccountStatusDetailsClosedReasonOther TreasuryFinancialAccountStatusDetailsClosedReason = "other" )
List of values that TreasuryFinancialAccountStatusDetailsClosedReason can take
type TreasuryFinancialAccountUpdateFeaturesCardIssuingParams ¶
type TreasuryFinancialAccountUpdateFeaturesCardIssuingParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
type TreasuryFinancialAccountUpdateFeaturesDepositInsuranceParams ¶
type TreasuryFinancialAccountUpdateFeaturesDepositInsuranceParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesABAParams ¶
type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesABAParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Adds an ABA FinancialAddress to the FinancialAccount.
type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesParams ¶
type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesParams struct { // Adds an ABA FinancialAddress to the FinancialAccount. ABA *TreasuryFinancialAccountUpdateFeaturesFinancialAddressesABAParams `form:"aba"` }
Contains Features that add FinancialAddresses to the FinancialAccount.
type TreasuryFinancialAccountUpdateFeaturesInboundTransfersACHParams ¶
type TreasuryFinancialAccountUpdateFeaturesInboundTransfersACHParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Enables ACH Debits via the InboundTransfers API.
type TreasuryFinancialAccountUpdateFeaturesInboundTransfersParams ¶
type TreasuryFinancialAccountUpdateFeaturesInboundTransfersParams struct { // Enables ACH Debits via the InboundTransfers API. ACH *TreasuryFinancialAccountUpdateFeaturesInboundTransfersACHParams `form:"ach"` }
Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
type TreasuryFinancialAccountUpdateFeaturesIntraStripeFlowsParams ¶
type TreasuryFinancialAccountUpdateFeaturesIntraStripeFlowsParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsACHParams ¶
type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsACHParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Enables ACH transfers via the OutboundPayments API.
type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsParams ¶
type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsParams struct { // Enables ACH transfers via the OutboundPayments API. ACH *TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsACHParams `form:"ach"` // Enables US domestic wire transfers via the OutboundPayments API. USDomesticWire *TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsUSDomesticWireParams `form:"us_domestic_wire"` }
Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsUSDomesticWireParams ¶
type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsUSDomesticWireParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Enables US domestic wire transfers via the OutboundPayments API.
type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersACHParams ¶
type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersACHParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Enables ACH transfers via the OutboundTransfers API.
type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersParams ¶
type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersParams struct { // Enables ACH transfers via the OutboundTransfers API. ACH *TreasuryFinancialAccountUpdateFeaturesOutboundTransfersACHParams `form:"ach"` // Enables US domestic wire transfers via the OutboundTransfers API. USDomesticWire *TreasuryFinancialAccountUpdateFeaturesOutboundTransfersUSDomesticWireParams `form:"us_domestic_wire"` }
Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersUSDomesticWireParams ¶
type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersUSDomesticWireParams struct { // Whether the FinancialAccount should have the Feature. Requested *bool `form:"requested"` }
Enables US domestic wire transfers via the OutboundTransfers API.
type TreasuryFinancialAccountUpdateFeaturesParams ¶
type TreasuryFinancialAccountUpdateFeaturesParams struct { Params `form:"*"` // Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. CardIssuing *TreasuryFinancialAccountUpdateFeaturesCardIssuingParams `form:"card_issuing"` // Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. DepositInsurance *TreasuryFinancialAccountUpdateFeaturesDepositInsuranceParams `form:"deposit_insurance"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Contains Features that add FinancialAddresses to the FinancialAccount. FinancialAddresses *TreasuryFinancialAccountUpdateFeaturesFinancialAddressesParams `form:"financial_addresses"` // Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. InboundTransfers *TreasuryFinancialAccountUpdateFeaturesInboundTransfersParams `form:"inbound_transfers"` // Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). IntraStripeFlows *TreasuryFinancialAccountUpdateFeaturesIntraStripeFlowsParams `form:"intra_stripe_flows"` // Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. OutboundPayments *TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsParams `form:"outbound_payments"` // Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. OutboundTransfers *TreasuryFinancialAccountUpdateFeaturesOutboundTransfersParams `form:"outbound_transfers"` }
Updates the Features associated with a FinancialAccount.
func (*TreasuryFinancialAccountUpdateFeaturesParams) AddExpand ¶
func (p *TreasuryFinancialAccountUpdateFeaturesParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryInboundTransfer ¶
type TreasuryInboundTransfer struct { APIResource // Amount (in cents) transferred. Amount int64 `json:"amount"` // Returns `true` if the InboundTransfer is able to be canceled. Cancelable bool `json:"cancelable"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // Details about this InboundTransfer's failure. Only set when status is `failed`. FailureDetails *TreasuryInboundTransferFailureDetails `json:"failure_details"` // The FinancialAccount that received the funds. FinancialAccount string `json:"financial_account"` // A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"` // Unique identifier for the object. ID string `json:"id"` LinkedFlows *TreasuryInboundTransferLinkedFlows `json:"linked_flows"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The origin payment method to be debited for an InboundTransfer. OriginPaymentMethod string `json:"origin_payment_method"` // Details about the PaymentMethod for an InboundTransfer. OriginPaymentMethodDetails *TreasuryInboundTransferOriginPaymentMethodDetails `json:"origin_payment_method_details"` // Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. Returned bool `json:"returned"` // Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. StatementDescriptor string `json:"statement_descriptor"` // Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. Status TreasuryInboundTransferStatus `json:"status"` StatusTransitions *TreasuryInboundTransferStatusTransitions `json:"status_transitions"` // The Transaction associated with this object. Transaction *TreasuryTransaction `json:"transaction"` }
Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
type TreasuryInboundTransferCancelParams ¶
type TreasuryInboundTransferCancelParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Cancels an InboundTransfer.
func (*TreasuryInboundTransferCancelParams) AddExpand ¶
func (p *TreasuryInboundTransferCancelParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryInboundTransferFailureDetails ¶
type TreasuryInboundTransferFailureDetails struct { // Reason for the failure. Code TreasuryInboundTransferFailureDetailsCode `json:"code"` }
Details about this InboundTransfer's failure. Only set when status is `failed`.
type TreasuryInboundTransferFailureDetailsCode ¶
type TreasuryInboundTransferFailureDetailsCode string
Reason for the failure.
const ( TreasuryInboundTransferFailureDetailsCodeAccountClosed TreasuryInboundTransferFailureDetailsCode = "account_closed" TreasuryInboundTransferFailureDetailsCodeAccountFrozen TreasuryInboundTransferFailureDetailsCode = "account_frozen" TreasuryInboundTransferFailureDetailsCodeBankAccountRestricted TreasuryInboundTransferFailureDetailsCode = "bank_account_restricted" TreasuryInboundTransferFailureDetailsCodeBankOwnershipChanged TreasuryInboundTransferFailureDetailsCode = "bank_ownership_changed" TreasuryInboundTransferFailureDetailsCodeDebitNotAuthorized TreasuryInboundTransferFailureDetailsCode = "debit_not_authorized" TreasuryInboundTransferFailureDetailsCodeIncorrectAccountHolderAddress TreasuryInboundTransferFailureDetailsCode = "incorrect_account_holder_address" TreasuryInboundTransferFailureDetailsCodeIncorrectAccountHolderName TreasuryInboundTransferFailureDetailsCode = "incorrect_account_holder_name" TreasuryInboundTransferFailureDetailsCodeIncorrectAccountHolderTaxID TreasuryInboundTransferFailureDetailsCode = "incorrect_account_holder_tax_id" TreasuryInboundTransferFailureDetailsCodeInsufficientFunds TreasuryInboundTransferFailureDetailsCode = "insufficient_funds" TreasuryInboundTransferFailureDetailsCodeInvalidAccountNumber TreasuryInboundTransferFailureDetailsCode = "invalid_account_number" TreasuryInboundTransferFailureDetailsCodeInvalidCurrency TreasuryInboundTransferFailureDetailsCode = "invalid_currency" TreasuryInboundTransferFailureDetailsCodeNoAccount TreasuryInboundTransferFailureDetailsCode = "no_account" TreasuryInboundTransferFailureDetailsCodeOther TreasuryInboundTransferFailureDetailsCode = "other" )
List of values that TreasuryInboundTransferFailureDetailsCode can take
type TreasuryInboundTransferLinkedFlows ¶
type TreasuryInboundTransferLinkedFlows struct { // If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. ReceivedDebit string `json:"received_debit"` }
type TreasuryInboundTransferList ¶
type TreasuryInboundTransferList struct { APIResource ListMeta Data []*TreasuryInboundTransfer `json:"data"` }
TreasuryInboundTransferList is a list of InboundTransfers as retrieved from a list endpoint.
type TreasuryInboundTransferListParams ¶
type TreasuryInboundTransferListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Returns objects associated with this FinancialAccount. FinancialAccount *string `form:"financial_account"` // Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. Status *string `form:"status"` }
Returns a list of InboundTransfers sent from the specified FinancialAccount.
func (*TreasuryInboundTransferListParams) AddExpand ¶
func (p *TreasuryInboundTransferListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryInboundTransferOriginPaymentMethodDetails ¶
type TreasuryInboundTransferOriginPaymentMethodDetails struct { BillingDetails *TreasuryInboundTransferOriginPaymentMethodDetailsBillingDetails `json:"billing_details"` // The type of the payment method used in the InboundTransfer. Type TreasuryInboundTransferOriginPaymentMethodDetailsType `json:"type"` USBankAccount *TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccount `json:"us_bank_account"` }
Details about the PaymentMethod for an InboundTransfer.
type TreasuryInboundTransferOriginPaymentMethodDetailsType ¶
type TreasuryInboundTransferOriginPaymentMethodDetailsType string
The type of the payment method used in the InboundTransfer.
const (
TreasuryInboundTransferOriginPaymentMethodDetailsTypeUSBankAccount TreasuryInboundTransferOriginPaymentMethodDetailsType = "us_bank_account"
)
List of values that TreasuryInboundTransferOriginPaymentMethodDetailsType can take
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccount ¶
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccount struct { // Account holder type: individual or company. AccountHolderType TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"` // Account type: checkings or savings. Defaults to checking if omitted. AccountType TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType `json:"account_type"` // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four digits of the bank account number. Last4 string `json:"last4"` // The US bank account network used to debit funds. Network TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork `json:"network"` // Routing number of the bank account. RoutingNumber string `json:"routing_number"` }
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType ¶
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType string
Account holder type: individual or company.
const ( TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderTypeCompany TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType = "company" TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType = "individual" )
List of values that TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType can take
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType ¶
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType string
Account type: checkings or savings. Defaults to checking if omitted.
const ( TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountTypeChecking TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType = "checking" TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountTypeSavings TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType = "savings" )
List of values that TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType can take
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork ¶
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork string
The US bank account network used to debit funds.
const (
TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetworkACH TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork = "ach"
)
List of values that TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork can take
type TreasuryInboundTransferParams ¶
type TreasuryInboundTransferParams struct { Params `form:"*"` // Amount (in cents) to be transferred. Amount *int64 `form:"amount"` // 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 `form:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The FinancialAccount to send funds to. FinancialAccount *string `form:"financial_account"` // 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`. Metadata map[string]string `form:"metadata"` // The origin payment method to be debited for the InboundTransfer. OriginPaymentMethod *string `form:"origin_payment_method"` // The complete description that appears on your customers' statements. Maximum 10 characters. StatementDescriptor *string `form:"statement_descriptor"` }
Creates an InboundTransfer.
func (*TreasuryInboundTransferParams) AddExpand ¶
func (p *TreasuryInboundTransferParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TreasuryInboundTransferParams) AddMetadata ¶
func (p *TreasuryInboundTransferParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TreasuryInboundTransferStatus ¶
type TreasuryInboundTransferStatus string
Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.
const ( TreasuryInboundTransferStatusCanceled TreasuryInboundTransferStatus = "canceled" TreasuryInboundTransferStatusFailed TreasuryInboundTransferStatus = "failed" TreasuryInboundTransferStatusProcessing TreasuryInboundTransferStatus = "processing" TreasuryInboundTransferStatusSucceeded TreasuryInboundTransferStatus = "succeeded" )
List of values that TreasuryInboundTransferStatus can take
type TreasuryInboundTransferStatusTransitions ¶
type TreasuryInboundTransferStatusTransitions struct { // Timestamp describing when an InboundTransfer changed status to `canceled`. CanceledAt int64 `json:"canceled_at"` // Timestamp describing when an InboundTransfer changed status to `failed`. FailedAt int64 `json:"failed_at"` // Timestamp describing when an InboundTransfer changed status to `succeeded`. SucceededAt int64 `json:"succeeded_at"` }
type TreasuryOutboundPayment ¶
type TreasuryOutboundPayment struct { APIResource // Amount (in cents) transferred. Amount int64 `json:"amount"` // Returns `true` if the object can be canceled, and `false` otherwise. Cancelable bool `json:"cancelable"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. Customer string `json:"customer"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. DestinationPaymentMethod string `json:"destination_payment_method"` // Details about the PaymentMethod for an OutboundPayment. DestinationPaymentMethodDetails *TreasuryOutboundPaymentDestinationPaymentMethodDetails `json:"destination_payment_method_details"` // Details about the end user. EndUserDetails *TreasuryOutboundPaymentEndUserDetails `json:"end_user_details"` // The date when funds are expected to arrive in the destination account. ExpectedArrivalDate int64 `json:"expected_arrival_date"` // The FinancialAccount that funds were pulled from. FinancialAccount string `json:"financial_account"` // A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Details about a returned OutboundPayment. Only set when the status is `returned`. ReturnedDetails *TreasuryOutboundPaymentReturnedDetails `json:"returned_details"` // The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). StatementDescriptor string `json:"statement_descriptor"` // Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. Status TreasuryOutboundPaymentStatus `json:"status"` StatusTransitions *TreasuryOutboundPaymentStatusTransitions `json:"status_transitions"` // The Transaction associated with this object. Transaction *TreasuryTransaction `json:"transaction"` }
Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
type TreasuryOutboundPaymentCancelParams ¶
type TreasuryOutboundPaymentCancelParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Cancel an OutboundPayment.
func (*TreasuryOutboundPaymentCancelParams) AddExpand ¶
func (p *TreasuryOutboundPaymentCancelParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryOutboundPaymentDestinationPaymentMethodDataBillingDetailsParams ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDataBillingDetailsParams struct { // Billing address. Address *AddressParams `form:"address"` // Email address. Email *string `form:"email"` // Full name. Name *string `form:"name"` // Billing phone number (including extension). Phone *string `form:"phone"` }
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
type TreasuryOutboundPaymentDestinationPaymentMethodDataParams ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDataParams struct { // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. BillingDetails *TreasuryOutboundPaymentDestinationPaymentMethodDataBillingDetailsParams `form:"billing_details"` // Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. FinancialAccount *string `form:"financial_account"` // 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`. Metadata map[string]string `form:"metadata"` // 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. Type *string `form:"type"` // Required hash if type is set to `us_bank_account`. USBankAccount *TreasuryOutboundPaymentDestinationPaymentMethodDataUSBankAccountParams `form:"us_bank_account"` }
Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.
func (*TreasuryOutboundPaymentDestinationPaymentMethodDataParams) AddMetadata ¶
func (p *TreasuryOutboundPaymentDestinationPaymentMethodDataParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TreasuryOutboundPaymentDestinationPaymentMethodDataUSBankAccountParams ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDataUSBankAccountParams struct { // Account holder type: individual or company. AccountHolderType *string `form:"account_holder_type"` // Account number of the bank account. AccountNumber *string `form:"account_number"` // Account type: checkings or savings. Defaults to checking if omitted. AccountType *string `form:"account_type"` // The ID of a Financial Connections Account to use as a payment method. FinancialConnectionsAccount *string `form:"financial_connections_account"` // Routing number of the bank account. RoutingNumber *string `form:"routing_number"` }
Required hash if type is set to `us_bank_account`.
type TreasuryOutboundPaymentDestinationPaymentMethodDetails ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDetails struct { BillingDetails *TreasuryOutboundPaymentDestinationPaymentMethodDetailsBillingDetails `json:"billing_details"` FinancialAccount *TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccount `json:"financial_account"` // The type of the payment method used in the OutboundPayment. Type TreasuryOutboundPaymentDestinationPaymentMethodDetailsType `json:"type"` USBankAccount *TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccount `json:"us_bank_account"` }
Details about the PaymentMethod for an OutboundPayment.
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccount ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccount struct { // Token of the FinancialAccount. ID string `json:"id"` // The rails used to send funds. Network TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork `json:"network"` }
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork string
The rails used to send funds.
const (
TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetworkStripe TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork = "stripe"
)
List of values that TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork can take
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsType ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsType string
The type of the payment method used in the OutboundPayment.
const ( TreasuryOutboundPaymentDestinationPaymentMethodDetailsTypeFinancialAccount TreasuryOutboundPaymentDestinationPaymentMethodDetailsType = "financial_account" TreasuryOutboundPaymentDestinationPaymentMethodDetailsTypeUSBankAccount TreasuryOutboundPaymentDestinationPaymentMethodDetailsType = "us_bank_account" )
List of values that TreasuryOutboundPaymentDestinationPaymentMethodDetailsType can take
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccount ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccount struct { // Account holder type: individual or company. AccountHolderType TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"` // Account type: checkings or savings. Defaults to checking if omitted. AccountType TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType `json:"account_type"` // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four digits of the bank account number. Last4 string `json:"last4"` // The US bank account network used to send funds. Network TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork `json:"network"` // Routing number of the bank account. RoutingNumber string `json:"routing_number"` }
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType string
Account holder type: individual or company.
const ( TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderTypeCompany TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType = "company" TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType = "individual" )
List of values that TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType can take
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType string
Account type: checkings or savings. Defaults to checking if omitted.
const ( TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountTypeChecking TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType = "checking" TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountTypeSavings TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType = "savings" )
List of values that TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType can take
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork ¶
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork string
The US bank account network used to send funds.
const ( TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetworkACH TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork = "ach" TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetworkUSDomesticWire TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork = "us_domestic_wire" )
List of values that TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork can take
type TreasuryOutboundPaymentDestinationPaymentMethodOptionsParams ¶
type TreasuryOutboundPaymentDestinationPaymentMethodOptionsParams struct { // Optional fields for `us_bank_account`. USBankAccount *TreasuryOutboundPaymentDestinationPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"` }
Payment method-specific configuration for this OutboundPayment.
type TreasuryOutboundPaymentDestinationPaymentMethodOptionsUSBankAccountParams ¶
type TreasuryOutboundPaymentDestinationPaymentMethodOptionsUSBankAccountParams struct { // The US bank account network that must be used for this OutboundPayment. If not set, we will default to the PaymentMethod's preferred network. Network *string `form:"network"` }
Optional fields for `us_bank_account`.
type TreasuryOutboundPaymentEndUserDetails ¶
type TreasuryOutboundPaymentEndUserDetails struct { // IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. IPAddress string `json:"ip_address"` // `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. Present bool `json:"present"` }
Details about the end user.
type TreasuryOutboundPaymentEndUserDetailsParams ¶
type TreasuryOutboundPaymentEndUserDetailsParams struct { // IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. IPAddress *string `form:"ip_address"` // `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. Present *bool `form:"present"` }
End user details.
type TreasuryOutboundPaymentList ¶
type TreasuryOutboundPaymentList struct { APIResource ListMeta Data []*TreasuryOutboundPayment `json:"data"` }
TreasuryOutboundPaymentList is a list of OutboundPayments as retrieved from a list endpoint.
type TreasuryOutboundPaymentListParams ¶
type TreasuryOutboundPaymentListParams struct { ListParams `form:"*"` // Only return OutboundPayments sent to this customer. Customer *string `form:"customer"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Returns objects associated with this FinancialAccount. FinancialAccount *string `form:"financial_account"` // Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. Status *string `form:"status"` }
Returns a list of OutboundPayments sent from the specified FinancialAccount.
func (*TreasuryOutboundPaymentListParams) AddExpand ¶
func (p *TreasuryOutboundPaymentListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryOutboundPaymentParams ¶
type TreasuryOutboundPaymentParams struct { Params `form:"*"` // Amount (in cents) to be transferred. Amount *int64 `form:"amount"` // 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 `form:"currency"` // ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. Customer *string `form:"customer"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. DestinationPaymentMethod *string `form:"destination_payment_method"` // Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. DestinationPaymentMethodData *TreasuryOutboundPaymentDestinationPaymentMethodDataParams `form:"destination_payment_method_data"` // Payment method-specific configuration for this OutboundPayment. DestinationPaymentMethodOptions *TreasuryOutboundPaymentDestinationPaymentMethodOptionsParams `form:"destination_payment_method_options"` // End user details. EndUserDetails *TreasuryOutboundPaymentEndUserDetailsParams `form:"end_user_details"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The FinancialAccount to pull funds from. FinancialAccount *string `form:"financial_account"` // 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`. Metadata map[string]string `form:"metadata"` // 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 `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`. StatementDescriptor *string `form:"statement_descriptor"` }
Creates an OutboundPayment.
func (*TreasuryOutboundPaymentParams) AddExpand ¶
func (p *TreasuryOutboundPaymentParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TreasuryOutboundPaymentParams) AddMetadata ¶
func (p *TreasuryOutboundPaymentParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TreasuryOutboundPaymentReturnedDetails ¶
type TreasuryOutboundPaymentReturnedDetails struct { // Reason for the return. Code TreasuryOutboundPaymentReturnedDetailsCode `json:"code"` // The Transaction associated with this object. Transaction *TreasuryTransaction `json:"transaction"` }
Details about a returned OutboundPayment. Only set when the status is `returned`.
type TreasuryOutboundPaymentReturnedDetailsCode ¶
type TreasuryOutboundPaymentReturnedDetailsCode string
Reason for the return.
const ( TreasuryOutboundPaymentReturnedDetailsCodeAccountClosed TreasuryOutboundPaymentReturnedDetailsCode = "account_closed" TreasuryOutboundPaymentReturnedDetailsCodeAccountFrozen TreasuryOutboundPaymentReturnedDetailsCode = "account_frozen" TreasuryOutboundPaymentReturnedDetailsCodeBankAccountRestricted TreasuryOutboundPaymentReturnedDetailsCode = "bank_account_restricted" TreasuryOutboundPaymentReturnedDetailsCodeBankOwnershipChanged TreasuryOutboundPaymentReturnedDetailsCode = "bank_ownership_changed" TreasuryOutboundPaymentReturnedDetailsCodeDeclined TreasuryOutboundPaymentReturnedDetailsCode = "declined" TreasuryOutboundPaymentReturnedDetailsCodeIncorrectAccountHolderName TreasuryOutboundPaymentReturnedDetailsCode = "incorrect_account_holder_name" TreasuryOutboundPaymentReturnedDetailsCodeInvalidAccountNumber TreasuryOutboundPaymentReturnedDetailsCode = "invalid_account_number" TreasuryOutboundPaymentReturnedDetailsCodeInvalidCurrency TreasuryOutboundPaymentReturnedDetailsCode = "invalid_currency" TreasuryOutboundPaymentReturnedDetailsCodeNoAccount TreasuryOutboundPaymentReturnedDetailsCode = "no_account" TreasuryOutboundPaymentReturnedDetailsCodeOther TreasuryOutboundPaymentReturnedDetailsCode = "other" )
List of values that TreasuryOutboundPaymentReturnedDetailsCode can take
type TreasuryOutboundPaymentStatus ¶
type TreasuryOutboundPaymentStatus string
Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.
const ( TreasuryOutboundPaymentStatusCanceled TreasuryOutboundPaymentStatus = "canceled" TreasuryOutboundPaymentStatusFailed TreasuryOutboundPaymentStatus = "failed" TreasuryOutboundPaymentStatusPosted TreasuryOutboundPaymentStatus = "posted" TreasuryOutboundPaymentStatusProcessing TreasuryOutboundPaymentStatus = "processing" TreasuryOutboundPaymentStatusReturned TreasuryOutboundPaymentStatus = "returned" )
List of values that TreasuryOutboundPaymentStatus can take
type TreasuryOutboundPaymentStatusTransitions ¶
type TreasuryOutboundPaymentStatusTransitions struct { // Timestamp describing when an OutboundPayment changed status to `canceled`. CanceledAt int64 `json:"canceled_at"` // Timestamp describing when an OutboundPayment changed status to `failed`. FailedAt int64 `json:"failed_at"` // Timestamp describing when an OutboundPayment changed status to `posted`. PostedAt int64 `json:"posted_at"` // Timestamp describing when an OutboundPayment changed status to `returned`. ReturnedAt int64 `json:"returned_at"` }
type TreasuryOutboundTransfer ¶
type TreasuryOutboundTransfer struct { APIResource // Amount (in cents) transferred. Amount int64 `json:"amount"` // Returns `true` if the object can be canceled, and `false` otherwise. Cancelable bool `json:"cancelable"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // The PaymentMethod used as the payment instrument for an OutboundTransfer. DestinationPaymentMethod string `json:"destination_payment_method"` DestinationPaymentMethodDetails *TreasuryOutboundTransferDestinationPaymentMethodDetails `json:"destination_payment_method_details"` // The date when funds are expected to arrive in the destination account. ExpectedArrivalDate int64 `json:"expected_arrival_date"` // The FinancialAccount that funds were pulled from. FinancialAccount string `json:"financial_account"` // A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Details about a returned OutboundTransfer. Only set when the status is `returned`. ReturnedDetails *TreasuryOutboundTransferReturnedDetails `json:"returned_details"` // Information about the OutboundTransfer to be sent to the recipient account. StatementDescriptor string `json:"statement_descriptor"` // Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. Status TreasuryOutboundTransferStatus `json:"status"` StatusTransitions *TreasuryOutboundTransferStatusTransitions `json:"status_transitions"` // The Transaction associated with this object. Transaction *TreasuryTransaction `json:"transaction"` }
Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
type TreasuryOutboundTransferCancelParams ¶
type TreasuryOutboundTransferCancelParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
An OutboundTransfer can be canceled if the funds have not yet been paid out.
func (*TreasuryOutboundTransferCancelParams) AddExpand ¶
func (p *TreasuryOutboundTransferCancelParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryOutboundTransferDestinationPaymentMethodDetails ¶
type TreasuryOutboundTransferDestinationPaymentMethodDetails struct { BillingDetails *TreasuryOutboundTransferDestinationPaymentMethodDetailsBillingDetails `json:"billing_details"` // The type of the payment method used in the OutboundTransfer. Type TreasuryOutboundTransferDestinationPaymentMethodDetailsType `json:"type"` USBankAccount *TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccount `json:"us_bank_account"` }
type TreasuryOutboundTransferDestinationPaymentMethodDetailsType ¶
type TreasuryOutboundTransferDestinationPaymentMethodDetailsType string
The type of the payment method used in the OutboundTransfer.
const (
TreasuryOutboundTransferDestinationPaymentMethodDetailsTypeUSBankAccount TreasuryOutboundTransferDestinationPaymentMethodDetailsType = "us_bank_account"
)
List of values that TreasuryOutboundTransferDestinationPaymentMethodDetailsType can take
type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccount ¶
type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccount struct { // Account holder type: individual or company. AccountHolderType TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"` // Account type: checkings or savings. Defaults to checking if omitted. AccountType TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType `json:"account_type"` // Name of the bank associated with the bank account. BankName string `json:"bank_name"` // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Fingerprint string `json:"fingerprint"` // Last four digits of the bank account number. Last4 string `json:"last4"` // The US bank account network used to send funds. Network TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork `json:"network"` // Routing number of the bank account. RoutingNumber string `json:"routing_number"` }
type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType ¶
type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType string
Account holder type: individual or company.
const ( TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderTypeCompany TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType = "company" TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType = "individual" )
List of values that TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType can take
type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType ¶
type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType string
Account type: checkings or savings. Defaults to checking if omitted.
const ( TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountTypeChecking TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType = "checking" TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountTypeSavings TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType = "savings" )
List of values that TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType can take
type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork ¶
type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork string
The US bank account network used to send funds.
const ( TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetworkACH TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork = "ach" TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetworkUSDomesticWire TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork = "us_domestic_wire" )
List of values that TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork can take
type TreasuryOutboundTransferDestinationPaymentMethodOptionsParams ¶
type TreasuryOutboundTransferDestinationPaymentMethodOptionsParams struct { // Optional fields for `us_bank_account`. USBankAccount *TreasuryOutboundTransferDestinationPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"` }
Hash describing payment method configuration details.
type TreasuryOutboundTransferDestinationPaymentMethodOptionsUSBankAccountParams ¶
type TreasuryOutboundTransferDestinationPaymentMethodOptionsUSBankAccountParams struct { // Designate the OutboundTransfer as using a US bank account network configuration. Network *string `form:"network"` }
Optional fields for `us_bank_account`.
type TreasuryOutboundTransferList ¶
type TreasuryOutboundTransferList struct { APIResource ListMeta Data []*TreasuryOutboundTransfer `json:"data"` }
TreasuryOutboundTransferList is a list of OutboundTransfers as retrieved from a list endpoint.
type TreasuryOutboundTransferListParams ¶
type TreasuryOutboundTransferListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Returns objects associated with this FinancialAccount. FinancialAccount *string `form:"financial_account"` // Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. Status *string `form:"status"` }
Returns a list of OutboundTransfers sent from the specified FinancialAccount.
func (*TreasuryOutboundTransferListParams) AddExpand ¶
func (p *TreasuryOutboundTransferListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryOutboundTransferParams ¶
type TreasuryOutboundTransferParams struct { Params `form:"*"` // Amount (in cents) to be transferred. Amount *int64 `form:"amount"` // 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 `form:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description *string `form:"description"` // The PaymentMethod to use as the payment instrument for the OutboundTransfer. DestinationPaymentMethod *string `form:"destination_payment_method"` // Hash describing payment method configuration details. DestinationPaymentMethodOptions *TreasuryOutboundTransferDestinationPaymentMethodOptionsParams `form:"destination_payment_method_options"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The FinancialAccount to pull funds from. FinancialAccount *string `form:"financial_account"` // 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`. Metadata map[string]string `form:"metadata"` // Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. StatementDescriptor *string `form:"statement_descriptor"` }
Creates an OutboundTransfer.
func (*TreasuryOutboundTransferParams) AddExpand ¶
func (p *TreasuryOutboundTransferParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*TreasuryOutboundTransferParams) AddMetadata ¶
func (p *TreasuryOutboundTransferParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
type TreasuryOutboundTransferReturnedDetails ¶
type TreasuryOutboundTransferReturnedDetails struct { // Reason for the return. Code TreasuryOutboundTransferReturnedDetailsCode `json:"code"` // The Transaction associated with this object. Transaction *TreasuryTransaction `json:"transaction"` }
Details about a returned OutboundTransfer. Only set when the status is `returned`.
type TreasuryOutboundTransferReturnedDetailsCode ¶
type TreasuryOutboundTransferReturnedDetailsCode string
Reason for the return.
const ( TreasuryOutboundTransferReturnedDetailsCodeAccountClosed TreasuryOutboundTransferReturnedDetailsCode = "account_closed" TreasuryOutboundTransferReturnedDetailsCodeAccountFrozen TreasuryOutboundTransferReturnedDetailsCode = "account_frozen" TreasuryOutboundTransferReturnedDetailsCodeBankAccountRestricted TreasuryOutboundTransferReturnedDetailsCode = "bank_account_restricted" TreasuryOutboundTransferReturnedDetailsCodeBankOwnershipChanged TreasuryOutboundTransferReturnedDetailsCode = "bank_ownership_changed" TreasuryOutboundTransferReturnedDetailsCodeDeclined TreasuryOutboundTransferReturnedDetailsCode = "declined" TreasuryOutboundTransferReturnedDetailsCodeIncorrectAccountHolderName TreasuryOutboundTransferReturnedDetailsCode = "incorrect_account_holder_name" TreasuryOutboundTransferReturnedDetailsCodeInvalidAccountNumber TreasuryOutboundTransferReturnedDetailsCode = "invalid_account_number" TreasuryOutboundTransferReturnedDetailsCodeInvalidCurrency TreasuryOutboundTransferReturnedDetailsCode = "invalid_currency" TreasuryOutboundTransferReturnedDetailsCodeNoAccount TreasuryOutboundTransferReturnedDetailsCode = "no_account" TreasuryOutboundTransferReturnedDetailsCodeOther TreasuryOutboundTransferReturnedDetailsCode = "other" )
List of values that TreasuryOutboundTransferReturnedDetailsCode can take
type TreasuryOutboundTransferStatus ¶
type TreasuryOutboundTransferStatus string
Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`.
const ( TreasuryOutboundTransferStatusCanceled TreasuryOutboundTransferStatus = "canceled" TreasuryOutboundTransferStatusFailed TreasuryOutboundTransferStatus = "failed" TreasuryOutboundTransferStatusPosted TreasuryOutboundTransferStatus = "posted" TreasuryOutboundTransferStatusProcessing TreasuryOutboundTransferStatus = "processing" TreasuryOutboundTransferStatusReturned TreasuryOutboundTransferStatus = "returned" )
List of values that TreasuryOutboundTransferStatus can take
type TreasuryOutboundTransferStatusTransitions ¶
type TreasuryOutboundTransferStatusTransitions struct { // Timestamp describing when an OutboundTransfer changed status to `canceled` CanceledAt int64 `json:"canceled_at"` // Timestamp describing when an OutboundTransfer changed status to `failed` FailedAt int64 `json:"failed_at"` // Timestamp describing when an OutboundTransfer changed status to `posted` PostedAt int64 `json:"posted_at"` // Timestamp describing when an OutboundTransfer changed status to `returned` ReturnedAt int64 `json:"returned_at"` }
type TreasuryReceivedCredit ¶
type TreasuryReceivedCredit struct { APIResource // Amount (in cents) transferred. Amount int64 `json:"amount"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. FailureCode TreasuryReceivedCreditFailureCode `json:"failure_code"` // The FinancialAccount that received the funds. FinancialAccount string `json:"financial_account"` // A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"` // Unique identifier for the object. ID string `json:"id"` InitiatingPaymentMethodDetails *TreasuryReceivedCreditInitiatingPaymentMethodDetails `json:"initiating_payment_method_details"` LinkedFlows *TreasuryReceivedCreditLinkedFlows `json:"linked_flows"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // The rails used to send the funds. Network TreasuryReceivedCreditNetwork `json:"network"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Details describing when a ReceivedCredit may be reversed. ReversalDetails *TreasuryReceivedCreditReversalDetails `json:"reversal_details"` // Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. Status TreasuryReceivedCreditStatus `json:"status"` // The Transaction associated with this object. Transaction *TreasuryTransaction `json:"transaction"` }
ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
type TreasuryReceivedCreditFailureCode ¶
type TreasuryReceivedCreditFailureCode string
Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.
const ( TreasuryReceivedCreditFailureCodeAccountClosed TreasuryReceivedCreditFailureCode = "account_closed" TreasuryReceivedCreditFailureCodeAccountFrozen TreasuryReceivedCreditFailureCode = "account_frozen" TreasuryReceivedCreditFailureCodeOther TreasuryReceivedCreditFailureCode = "other" )
List of values that TreasuryReceivedCreditFailureCode can take
type TreasuryReceivedCreditInitiatingPaymentMethodDetails ¶
type TreasuryReceivedCreditInitiatingPaymentMethodDetails struct { // Set when `type` is `balance`. Balance TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance `json:"balance"` BillingDetails *TreasuryReceivedCreditInitiatingPaymentMethodDetailsBillingDetails `json:"billing_details"` FinancialAccount *TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount `json:"financial_account"` // Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. IssuingCard string `json:"issuing_card"` // Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. Type TreasuryReceivedCreditInitiatingPaymentMethodDetailsType `json:"type"` USBankAccount *TreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccount `json:"us_bank_account"` }
type TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance ¶
type TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance string
Set when `type` is `balance`.
const (
TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalancePayments TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance = "payments"
)
List of values that TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance can take
type TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount ¶
type TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount struct { // The FinancialAccount ID. ID string `json:"id"` // The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. Network TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork `json:"network"` }
type TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork ¶
type TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork string
The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.
const (
TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetworkStripe TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork = "stripe"
)
List of values that TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork can take
type TreasuryReceivedCreditInitiatingPaymentMethodDetailsType ¶
type TreasuryReceivedCreditInitiatingPaymentMethodDetailsType string
Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
const ( TreasuryReceivedCreditInitiatingPaymentMethodDetailsTypeBalance TreasuryReceivedCreditInitiatingPaymentMethodDetailsType = "balance" TreasuryReceivedCreditInitiatingPaymentMethodDetailsTypeFinancialAccount TreasuryReceivedCreditInitiatingPaymentMethodDetailsType = "financial_account" TreasuryReceivedCreditInitiatingPaymentMethodDetailsTypeIssuingCard TreasuryReceivedCreditInitiatingPaymentMethodDetailsType = "issuing_card" TreasuryReceivedCreditInitiatingPaymentMethodDetailsTypeStripe TreasuryReceivedCreditInitiatingPaymentMethodDetailsType = "stripe" TreasuryReceivedCreditInitiatingPaymentMethodDetailsTypeUSBankAccount TreasuryReceivedCreditInitiatingPaymentMethodDetailsType = "us_bank_account" )
List of values that TreasuryReceivedCreditInitiatingPaymentMethodDetailsType can take
type TreasuryReceivedCreditLinkedFlows ¶
type TreasuryReceivedCreditLinkedFlows struct { // The CreditReversal created as a result of this ReceivedCredit being reversed. CreditReversal string `json:"credit_reversal"` // Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. IssuingAuthorization string `json:"issuing_authorization"` // Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. IssuingTransaction string `json:"issuing_transaction"` // ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. SourceFlow string `json:"source_flow"` // The expandable object of the source flow. SourceFlowDetails *TreasuryReceivedCreditLinkedFlowsSourceFlowDetails `json:"source_flow_details"` // The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). SourceFlowType string `json:"source_flow_type"` }
type TreasuryReceivedCreditLinkedFlowsSourceFlowDetails ¶
type TreasuryReceivedCreditLinkedFlowsSourceFlowDetails struct { // You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. CreditReversal *TreasuryCreditReversal `json:"credit_reversal"` // Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). // // Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. OutboundPayment *TreasuryOutboundPayment `json:"outbound_payment"` // A `Payout` object is created when you receive funds from Stripe, or when you // initiate a payout to either a bank account or debit card of a [connected // Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, // and list all payouts. Payouts are made on [varying // schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and // industry. // // Related guide: [Receiving payouts](https://stripe.com/docs/payouts) Payout *Payout `json:"payout"` // The type of the source flow that originated the ReceivedCredit. Type TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType `json:"type"` }
The expandable object of the source flow.
type TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType ¶
type TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType string
The type of the source flow that originated the ReceivedCredit.
const ( TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsTypeCreditReversal TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType = "credit_reversal" TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsTypeOther TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType = "other" TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsTypeOutboundPayment TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType = "outbound_payment" TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsTypePayout TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType = "payout" )
List of values that TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType can take
type TreasuryReceivedCreditList ¶
type TreasuryReceivedCreditList struct { APIResource ListMeta Data []*TreasuryReceivedCredit `json:"data"` }
TreasuryReceivedCreditList is a list of ReceivedCredits as retrieved from a list endpoint.
type TreasuryReceivedCreditListLinkedFlowsParams ¶
type TreasuryReceivedCreditListLinkedFlowsParams struct { // The source flow type. SourceFlowType *string `form:"source_flow_type"` }
Only return ReceivedCredits described by the flow.
type TreasuryReceivedCreditListParams ¶
type TreasuryReceivedCreditListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The FinancialAccount that received the funds. FinancialAccount *string `form:"financial_account"` // Only return ReceivedCredits described by the flow. LinkedFlows *TreasuryReceivedCreditListLinkedFlowsParams `form:"linked_flows"` // Only return ReceivedCredits that have the given status: `succeeded` or `failed`. Status *string `form:"status"` }
Returns a list of ReceivedCredits.
func (*TreasuryReceivedCreditListParams) AddExpand ¶
func (p *TreasuryReceivedCreditListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryReceivedCreditNetwork ¶
type TreasuryReceivedCreditNetwork string
The rails used to send the funds.
const ( TreasuryReceivedCreditNetworkACH TreasuryReceivedCreditNetwork = "ach" TreasuryReceivedCreditNetworkCard TreasuryReceivedCreditNetwork = "card" TreasuryReceivedCreditNetworkStripe TreasuryReceivedCreditNetwork = "stripe" TreasuryReceivedCreditNetworkUSDomesticWire TreasuryReceivedCreditNetwork = "us_domestic_wire" )
List of values that TreasuryReceivedCreditNetwork can take
type TreasuryReceivedCreditParams ¶
type TreasuryReceivedCreditParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
func (*TreasuryReceivedCreditParams) AddExpand ¶
func (p *TreasuryReceivedCreditParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryReceivedCreditReversalDetails ¶
type TreasuryReceivedCreditReversalDetails struct { // Time before which a ReceivedCredit can be reversed. Deadline int64 `json:"deadline"` // Set if a ReceivedCredit cannot be reversed. RestrictedReason TreasuryReceivedCreditReversalDetailsRestrictedReason `json:"restricted_reason"` }
Details describing when a ReceivedCredit may be reversed.
type TreasuryReceivedCreditReversalDetailsRestrictedReason ¶
type TreasuryReceivedCreditReversalDetailsRestrictedReason string
Set if a ReceivedCredit cannot be reversed.
const ( TreasuryReceivedCreditReversalDetailsRestrictedReasonAlreadyReversed TreasuryReceivedCreditReversalDetailsRestrictedReason = "already_reversed" TreasuryReceivedCreditReversalDetailsRestrictedReasonDeadlinePassed TreasuryReceivedCreditReversalDetailsRestrictedReason = "deadline_passed" TreasuryReceivedCreditReversalDetailsRestrictedReasonNetworkRestricted TreasuryReceivedCreditReversalDetailsRestrictedReason = "network_restricted" TreasuryReceivedCreditReversalDetailsRestrictedReasonOther TreasuryReceivedCreditReversalDetailsRestrictedReason = "other" TreasuryReceivedCreditReversalDetailsRestrictedReasonSourceFlowRestricted TreasuryReceivedCreditReversalDetailsRestrictedReason = "source_flow_restricted" )
List of values that TreasuryReceivedCreditReversalDetailsRestrictedReason can take
type TreasuryReceivedCreditStatus ¶
type TreasuryReceivedCreditStatus string
Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.
const ( TreasuryReceivedCreditStatusFailed TreasuryReceivedCreditStatus = "failed" TreasuryReceivedCreditStatusSucceeded TreasuryReceivedCreditStatus = "succeeded" )
List of values that TreasuryReceivedCreditStatus can take
type TreasuryReceivedDebit ¶
type TreasuryReceivedDebit struct { APIResource // Amount (in cents) transferred. Amount int64 `json:"amount"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. FailureCode TreasuryReceivedDebitFailureCode `json:"failure_code"` // The FinancialAccount that funds were pulled from. FinancialAccount string `json:"financial_account"` // A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"` // Unique identifier for the object. ID string `json:"id"` InitiatingPaymentMethodDetails *TreasuryReceivedDebitInitiatingPaymentMethodDetails `json:"initiating_payment_method_details"` LinkedFlows *TreasuryReceivedDebitLinkedFlows `json:"linked_flows"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // The network used for the ReceivedDebit. Network TreasuryReceivedDebitNetwork `json:"network"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Details describing when a ReceivedDebit might be reversed. ReversalDetails *TreasuryReceivedDebitReversalDetails `json:"reversal_details"` // Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. Status TreasuryReceivedDebitStatus `json:"status"` // The Transaction associated with this object. Transaction *TreasuryTransaction `json:"transaction"` }
ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
type TreasuryReceivedDebitFailureCode ¶
type TreasuryReceivedDebitFailureCode string
Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.
const ( TreasuryReceivedDebitFailureCodeAccountClosed TreasuryReceivedDebitFailureCode = "account_closed" TreasuryReceivedDebitFailureCodeAccountFrozen TreasuryReceivedDebitFailureCode = "account_frozen" TreasuryReceivedDebitFailureCodeInsufficientFunds TreasuryReceivedDebitFailureCode = "insufficient_funds" TreasuryReceivedDebitFailureCodeOther TreasuryReceivedDebitFailureCode = "other" )
List of values that TreasuryReceivedDebitFailureCode can take
type TreasuryReceivedDebitInitiatingPaymentMethodDetails ¶
type TreasuryReceivedDebitInitiatingPaymentMethodDetails struct { // Set when `type` is `balance`. Balance TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance `json:"balance"` BillingDetails *TreasuryReceivedDebitInitiatingPaymentMethodDetailsBillingDetails `json:"billing_details"` FinancialAccount *TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount `json:"financial_account"` // Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. IssuingCard string `json:"issuing_card"` // Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. Type TreasuryReceivedDebitInitiatingPaymentMethodDetailsType `json:"type"` USBankAccount *TreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccount `json:"us_bank_account"` }
type TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance ¶
type TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance string
Set when `type` is `balance`.
const (
TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalancePayments TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance = "payments"
)
List of values that TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance can take
type TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount ¶
type TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount struct { // The FinancialAccount ID. ID string `json:"id"` // The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. Network TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork `json:"network"` }
type TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork ¶
type TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork string
The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.
const (
TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetworkStripe TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork = "stripe"
)
List of values that TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork can take
type TreasuryReceivedDebitInitiatingPaymentMethodDetailsType ¶
type TreasuryReceivedDebitInitiatingPaymentMethodDetailsType string
Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
const ( TreasuryReceivedDebitInitiatingPaymentMethodDetailsTypeBalance TreasuryReceivedDebitInitiatingPaymentMethodDetailsType = "balance" TreasuryReceivedDebitInitiatingPaymentMethodDetailsTypeFinancialAccount TreasuryReceivedDebitInitiatingPaymentMethodDetailsType = "financial_account" TreasuryReceivedDebitInitiatingPaymentMethodDetailsTypeIssuingCard TreasuryReceivedDebitInitiatingPaymentMethodDetailsType = "issuing_card" TreasuryReceivedDebitInitiatingPaymentMethodDetailsTypeStripe TreasuryReceivedDebitInitiatingPaymentMethodDetailsType = "stripe" TreasuryReceivedDebitInitiatingPaymentMethodDetailsTypeUSBankAccount TreasuryReceivedDebitInitiatingPaymentMethodDetailsType = "us_bank_account" )
List of values that TreasuryReceivedDebitInitiatingPaymentMethodDetailsType can take
type TreasuryReceivedDebitLinkedFlows ¶
type TreasuryReceivedDebitLinkedFlows struct { // The DebitReversal created as a result of this ReceivedDebit being reversed. DebitReversal string `json:"debit_reversal"` // Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. InboundTransfer string `json:"inbound_transfer"` // Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. IssuingAuthorization string `json:"issuing_authorization"` // Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. IssuingTransaction string `json:"issuing_transaction"` }
type TreasuryReceivedDebitList ¶
type TreasuryReceivedDebitList struct { APIResource ListMeta Data []*TreasuryReceivedDebit `json:"data"` }
TreasuryReceivedDebitList is a list of ReceivedDebits as retrieved from a list endpoint.
type TreasuryReceivedDebitListParams ¶
type TreasuryReceivedDebitListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The FinancialAccount that funds were pulled from. FinancialAccount *string `form:"financial_account"` // Only return ReceivedDebits that have the given status: `succeeded` or `failed`. Status *string `form:"status"` }
Returns a list of ReceivedDebits.
func (*TreasuryReceivedDebitListParams) AddExpand ¶
func (p *TreasuryReceivedDebitListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryReceivedDebitNetwork ¶
type TreasuryReceivedDebitNetwork string
The network used for the ReceivedDebit.
const ( TreasuryReceivedDebitNetworkACH TreasuryReceivedDebitNetwork = "ach" TreasuryReceivedDebitNetworkCard TreasuryReceivedDebitNetwork = "card" TreasuryReceivedDebitNetworkStripe TreasuryReceivedDebitNetwork = "stripe" )
List of values that TreasuryReceivedDebitNetwork can take
type TreasuryReceivedDebitParams ¶
type TreasuryReceivedDebitParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list
func (*TreasuryReceivedDebitParams) AddExpand ¶
func (p *TreasuryReceivedDebitParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryReceivedDebitReversalDetails ¶
type TreasuryReceivedDebitReversalDetails struct { // Time before which a ReceivedDebit can be reversed. Deadline int64 `json:"deadline"` // Set if a ReceivedDebit can't be reversed. RestrictedReason TreasuryReceivedDebitReversalDetailsRestrictedReason `json:"restricted_reason"` }
Details describing when a ReceivedDebit might be reversed.
type TreasuryReceivedDebitReversalDetailsRestrictedReason ¶
type TreasuryReceivedDebitReversalDetailsRestrictedReason string
Set if a ReceivedDebit can't be reversed.
const ( TreasuryReceivedDebitReversalDetailsRestrictedReasonAlreadyReversed TreasuryReceivedDebitReversalDetailsRestrictedReason = "already_reversed" TreasuryReceivedDebitReversalDetailsRestrictedReasonDeadlinePassed TreasuryReceivedDebitReversalDetailsRestrictedReason = "deadline_passed" TreasuryReceivedDebitReversalDetailsRestrictedReasonNetworkRestricted TreasuryReceivedDebitReversalDetailsRestrictedReason = "network_restricted" TreasuryReceivedDebitReversalDetailsRestrictedReasonOther TreasuryReceivedDebitReversalDetailsRestrictedReason = "other" TreasuryReceivedDebitReversalDetailsRestrictedReasonSourceFlowRestricted TreasuryReceivedDebitReversalDetailsRestrictedReason = "source_flow_restricted" )
List of values that TreasuryReceivedDebitReversalDetailsRestrictedReason can take
type TreasuryReceivedDebitStatus ¶
type TreasuryReceivedDebitStatus string
Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`.
const ( TreasuryReceivedDebitStatusFailed TreasuryReceivedDebitStatus = "failed" TreasuryReceivedDebitStatusSucceeded TreasuryReceivedDebitStatus = "succeeded" )
List of values that TreasuryReceivedDebitStatus can take
type TreasuryTransaction ¶
type TreasuryTransaction struct { APIResource // Amount (in cents) transferred. Amount int64 `json:"amount"` // Change to a FinancialAccount's balance BalanceImpact *TreasuryTransactionBalanceImpact `json:"balance_impact"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. Description string `json:"description"` // A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. Entries *TreasuryTransactionEntryList `json:"entries"` // The FinancialAccount associated with this object. FinancialAccount string `json:"financial_account"` // ID of the flow that created the Transaction. Flow string `json:"flow"` // Details of the flow that created the Transaction. FlowDetails *TreasuryTransactionFlowDetails `json:"flow_details"` // Type of the flow that created the Transaction. FlowType TreasuryTransactionFlowType `json:"flow_type"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // Status of the Transaction. Status TreasuryTransactionStatus `json:"status"` StatusTransitions *TreasuryTransactionStatusTransitions `json:"status_transitions"` }
Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance.
func (*TreasuryTransaction) UnmarshalJSON ¶
func (t *TreasuryTransaction) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a TreasuryTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type TreasuryTransactionBalanceImpact ¶
type TreasuryTransactionBalanceImpact struct { // The change made to funds the user can spend right now. Cash int64 `json:"cash"` // The change made to funds that are not spendable yet, but will become available at a later time. InboundPending int64 `json:"inbound_pending"` // The change made to funds in the account, but not spendable because they are being held for pending outbound flows. OutboundPending int64 `json:"outbound_pending"` }
Change to a FinancialAccount's balance
type TreasuryTransactionEntry ¶
type TreasuryTransactionEntry struct { APIResource // Change to a FinancialAccount's balance BalanceImpact *TreasuryTransactionEntryBalanceImpact `json:"balance_impact"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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 Currency `json:"currency"` // When the TransactionEntry will impact the FinancialAccount's balance. EffectiveAt int64 `json:"effective_at"` // The FinancialAccount associated with this object. FinancialAccount string `json:"financial_account"` // Token of the flow associated with the TransactionEntry. Flow string `json:"flow"` // Details of the flow associated with the TransactionEntry. FlowDetails *TreasuryTransactionEntryFlowDetails `json:"flow_details"` // Type of the flow associated with the TransactionEntry. FlowType TreasuryTransactionEntryFlowType `json:"flow_type"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The Transaction associated with this object. Transaction *TreasuryTransaction `json:"transaction"` // The specific money movement that generated the TransactionEntry. Type TreasuryTransactionEntryType `json:"type"` }
TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).
type TreasuryTransactionEntryBalanceImpact ¶
type TreasuryTransactionEntryBalanceImpact struct { // The change made to funds the user can spend right now. Cash int64 `json:"cash"` // The change made to funds that are not spendable yet, but will become available at a later time. InboundPending int64 `json:"inbound_pending"` // The change made to funds in the account, but not spendable because they are being held for pending outbound flows. OutboundPending int64 `json:"outbound_pending"` }
Change to a FinancialAccount's balance
type TreasuryTransactionEntryFlowDetails ¶
type TreasuryTransactionEntryFlowDetails struct { // You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. CreditReversal *TreasuryCreditReversal `json:"credit_reversal"` // You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. DebitReversal *TreasuryDebitReversal `json:"debit_reversal"` // Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. InboundTransfer *TreasuryInboundTransfer `json:"inbound_transfer"` // When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` // object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the // purchase to be completed successfully. // // Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) IssuingAuthorization *IssuingAuthorization `json:"issuing_authorization"` // Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). // // Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. OutboundPayment *TreasuryOutboundPayment `json:"outbound_payment"` // Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. // // Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. OutboundTransfer *TreasuryOutboundTransfer `json:"outbound_transfer"` // ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. ReceivedCredit *TreasuryReceivedCredit `json:"received_credit"` // ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. ReceivedDebit *TreasuryReceivedDebit `json:"received_debit"` // Type of the flow that created the Transaction. Set to the same value as `flow_type`. Type TreasuryTransactionEntryFlowDetailsType `json:"type"` }
Details of the flow associated with the TransactionEntry.
type TreasuryTransactionEntryFlowDetailsType ¶
type TreasuryTransactionEntryFlowDetailsType string
Type of the flow that created the Transaction. Set to the same value as `flow_type`.
const ( TreasuryTransactionEntryFlowDetailsTypeCreditReversal TreasuryTransactionEntryFlowDetailsType = "credit_reversal" TreasuryTransactionEntryFlowDetailsTypeDebitReversal TreasuryTransactionEntryFlowDetailsType = "debit_reversal" TreasuryTransactionEntryFlowDetailsTypeInboundTransfer TreasuryTransactionEntryFlowDetailsType = "inbound_transfer" TreasuryTransactionEntryFlowDetailsTypeIssuingAuthorization TreasuryTransactionEntryFlowDetailsType = "issuing_authorization" TreasuryTransactionEntryFlowDetailsTypeOther TreasuryTransactionEntryFlowDetailsType = "other" TreasuryTransactionEntryFlowDetailsTypeOutboundPayment TreasuryTransactionEntryFlowDetailsType = "outbound_payment" TreasuryTransactionEntryFlowDetailsTypeOutboundTransfer TreasuryTransactionEntryFlowDetailsType = "outbound_transfer" TreasuryTransactionEntryFlowDetailsTypeReceivedCredit TreasuryTransactionEntryFlowDetailsType = "received_credit" TreasuryTransactionEntryFlowDetailsTypeReceivedDebit TreasuryTransactionEntryFlowDetailsType = "received_debit" )
List of values that TreasuryTransactionEntryFlowDetailsType can take
type TreasuryTransactionEntryFlowType ¶
type TreasuryTransactionEntryFlowType string
Type of the flow associated with the TransactionEntry.
const ( TreasuryTransactionEntryFlowTypeCreditReversal TreasuryTransactionEntryFlowType = "credit_reversal" TreasuryTransactionEntryFlowTypeDebitReversal TreasuryTransactionEntryFlowType = "debit_reversal" TreasuryTransactionEntryFlowTypeInboundTransfer TreasuryTransactionEntryFlowType = "inbound_transfer" TreasuryTransactionEntryFlowTypeIssuingAuthorization TreasuryTransactionEntryFlowType = "issuing_authorization" TreasuryTransactionEntryFlowTypeOther TreasuryTransactionEntryFlowType = "other" TreasuryTransactionEntryFlowTypeOutboundPayment TreasuryTransactionEntryFlowType = "outbound_payment" TreasuryTransactionEntryFlowTypeOutboundTransfer TreasuryTransactionEntryFlowType = "outbound_transfer" TreasuryTransactionEntryFlowTypeReceivedCredit TreasuryTransactionEntryFlowType = "received_credit" TreasuryTransactionEntryFlowTypeReceivedDebit TreasuryTransactionEntryFlowType = "received_debit" )
List of values that TreasuryTransactionEntryFlowType can take
type TreasuryTransactionEntryList ¶
type TreasuryTransactionEntryList struct { APIResource ListMeta Data []*TreasuryTransactionEntry `json:"data"` }
TreasuryTransactionEntryList is a list of TransactionEntries as retrieved from a list endpoint.
type TreasuryTransactionEntryListParams ¶
type TreasuryTransactionEntryListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` EffectiveAt *int64 `form:"effective_at"` EffectiveAtRange *RangeQueryParams `form:"effective_at"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Returns objects associated with this FinancialAccount. FinancialAccount *string `form:"financial_account"` // The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. OrderBy *string `form:"order_by"` // Only return TransactionEntries associated with this Transaction. Transaction *string `form:"transaction"` }
Retrieves a list of TransactionEntry objects.
func (*TreasuryTransactionEntryListParams) AddExpand ¶
func (p *TreasuryTransactionEntryListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryTransactionEntryParams ¶
type TreasuryTransactionEntryParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves a TransactionEntry object.
func (*TreasuryTransactionEntryParams) AddExpand ¶
func (p *TreasuryTransactionEntryParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryTransactionEntryType ¶
type TreasuryTransactionEntryType string
The specific money movement that generated the TransactionEntry.
const ( TreasuryTransactionEntryTypeCreditReversal TreasuryTransactionEntryType = "credit_reversal" TreasuryTransactionEntryTypeCreditReversalPosting TreasuryTransactionEntryType = "credit_reversal_posting" TreasuryTransactionEntryTypeDebitReversal TreasuryTransactionEntryType = "debit_reversal" TreasuryTransactionEntryTypeInboundTransfer TreasuryTransactionEntryType = "inbound_transfer" TreasuryTransactionEntryTypeInboundTransferReturn TreasuryTransactionEntryType = "inbound_transfer_return" TreasuryTransactionEntryTypeIssuingAuthorizationHold TreasuryTransactionEntryType = "issuing_authorization_hold" TreasuryTransactionEntryTypeIssuingAuthorizationRelease TreasuryTransactionEntryType = "issuing_authorization_release" TreasuryTransactionEntryTypeOther TreasuryTransactionEntryType = "other" TreasuryTransactionEntryTypeOutboundPayment TreasuryTransactionEntryType = "outbound_payment" TreasuryTransactionEntryTypeOutboundPaymentCancellation TreasuryTransactionEntryType = "outbound_payment_cancellation" TreasuryTransactionEntryTypeOutboundPaymentFailure TreasuryTransactionEntryType = "outbound_payment_failure" TreasuryTransactionEntryTypeOutboundPaymentPosting TreasuryTransactionEntryType = "outbound_payment_posting" TreasuryTransactionEntryTypeOutboundPaymentReturn TreasuryTransactionEntryType = "outbound_payment_return" TreasuryTransactionEntryTypeOutboundTransfer TreasuryTransactionEntryType = "outbound_transfer" TreasuryTransactionEntryTypeOutboundTransferCancellation TreasuryTransactionEntryType = "outbound_transfer_cancellation" TreasuryTransactionEntryTypeOutboundTransferFailure TreasuryTransactionEntryType = "outbound_transfer_failure" TreasuryTransactionEntryTypeOutboundTransferPosting TreasuryTransactionEntryType = "outbound_transfer_posting" TreasuryTransactionEntryTypeOutboundTransferReturn TreasuryTransactionEntryType = "outbound_transfer_return" TreasuryTransactionEntryTypeReceivedCredit TreasuryTransactionEntryType = "received_credit" TreasuryTransactionEntryTypeReceivedDebit TreasuryTransactionEntryType = "received_debit" )
List of values that TreasuryTransactionEntryType can take
type TreasuryTransactionFlowDetails ¶
type TreasuryTransactionFlowDetails struct { // You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. CreditReversal *TreasuryCreditReversal `json:"credit_reversal"` // You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. DebitReversal *TreasuryDebitReversal `json:"debit_reversal"` // Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. InboundTransfer *TreasuryInboundTransfer `json:"inbound_transfer"` // When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` // object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the // purchase to be completed successfully. // // Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) IssuingAuthorization *IssuingAuthorization `json:"issuing_authorization"` // Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). // // Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. OutboundPayment *TreasuryOutboundPayment `json:"outbound_payment"` // Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. // // Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. OutboundTransfer *TreasuryOutboundTransfer `json:"outbound_transfer"` // ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. ReceivedCredit *TreasuryReceivedCredit `json:"received_credit"` // ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. ReceivedDebit *TreasuryReceivedDebit `json:"received_debit"` // Type of the flow that created the Transaction. Set to the same value as `flow_type`. Type TreasuryTransactionFlowDetailsType `json:"type"` }
Details of the flow that created the Transaction.
type TreasuryTransactionFlowDetailsType ¶
type TreasuryTransactionFlowDetailsType string
Type of the flow that created the Transaction. Set to the same value as `flow_type`.
const ( TreasuryTransactionFlowDetailsTypeCreditReversal TreasuryTransactionFlowDetailsType = "credit_reversal" TreasuryTransactionFlowDetailsTypeDebitReversal TreasuryTransactionFlowDetailsType = "debit_reversal" TreasuryTransactionFlowDetailsTypeInboundTransfer TreasuryTransactionFlowDetailsType = "inbound_transfer" TreasuryTransactionFlowDetailsTypeIssuingAuthorization TreasuryTransactionFlowDetailsType = "issuing_authorization" TreasuryTransactionFlowDetailsTypeOther TreasuryTransactionFlowDetailsType = "other" TreasuryTransactionFlowDetailsTypeOutboundPayment TreasuryTransactionFlowDetailsType = "outbound_payment" TreasuryTransactionFlowDetailsTypeOutboundTransfer TreasuryTransactionFlowDetailsType = "outbound_transfer" TreasuryTransactionFlowDetailsTypeReceivedCredit TreasuryTransactionFlowDetailsType = "received_credit" TreasuryTransactionFlowDetailsTypeReceivedDebit TreasuryTransactionFlowDetailsType = "received_debit" )
List of values that TreasuryTransactionFlowDetailsType can take
type TreasuryTransactionFlowType ¶
type TreasuryTransactionFlowType string
Type of the flow that created the Transaction.
const ( TreasuryTransactionFlowTypeCreditReversal TreasuryTransactionFlowType = "credit_reversal" TreasuryTransactionFlowTypeDebitReversal TreasuryTransactionFlowType = "debit_reversal" TreasuryTransactionFlowTypeInboundTransfer TreasuryTransactionFlowType = "inbound_transfer" TreasuryTransactionFlowTypeIssuingAuthorization TreasuryTransactionFlowType = "issuing_authorization" TreasuryTransactionFlowTypeOther TreasuryTransactionFlowType = "other" TreasuryTransactionFlowTypeOutboundPayment TreasuryTransactionFlowType = "outbound_payment" TreasuryTransactionFlowTypeOutboundTransfer TreasuryTransactionFlowType = "outbound_transfer" TreasuryTransactionFlowTypeReceivedCredit TreasuryTransactionFlowType = "received_credit" TreasuryTransactionFlowTypeReceivedDebit TreasuryTransactionFlowType = "received_debit" )
List of values that TreasuryTransactionFlowType can take
type TreasuryTransactionList ¶
type TreasuryTransactionList struct { APIResource ListMeta Data []*TreasuryTransaction `json:"data"` }
TreasuryTransactionList is a list of Transactions as retrieved from a list endpoint.
type TreasuryTransactionListParams ¶
type TreasuryTransactionListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Returns objects associated with this FinancialAccount. FinancialAccount *string `form:"financial_account"` // The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. OrderBy *string `form:"order_by"` // Only return Transactions that have the given status: `open`, `posted`, or `void`. Status *string `form:"status"` // A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. StatusTransitions *TreasuryTransactionListStatusTransitionsParams `form:"status_transitions"` }
Retrieves a list of Transaction objects.
func (*TreasuryTransactionListParams) AddExpand ¶
func (p *TreasuryTransactionListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryTransactionListStatusTransitionsParams ¶
type TreasuryTransactionListStatusTransitionsParams struct { // Returns Transactions with `posted_at` within the specified range. PostedAt *int64 `form:"posted_at"` // Returns Transactions with `posted_at` within the specified range. PostedAtRange *RangeQueryParams `form:"posted_at"` }
A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.
type TreasuryTransactionParams ¶
type TreasuryTransactionParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Retrieves the details of an existing Transaction.
func (*TreasuryTransactionParams) AddExpand ¶
func (p *TreasuryTransactionParams) AddExpand(f string)
AddExpand appends a new field to expand.
type TreasuryTransactionStatus ¶
type TreasuryTransactionStatus string
Status of the Transaction.
const ( TreasuryTransactionStatusOpen TreasuryTransactionStatus = "open" TreasuryTransactionStatusPosted TreasuryTransactionStatus = "posted" TreasuryTransactionStatusVoid TreasuryTransactionStatus = "void" )
List of values that TreasuryTransactionStatus can take
type UsageRecord ¶
type UsageRecord struct { APIResource // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The usage quantity for the specified date. Quantity int64 `json:"quantity"` // The ID of the subscription item this usage record contains data for. SubscriptionItem string `json:"subscription_item"` // The timestamp when this usage occurred. Timestamp int64 `json:"timestamp"` }
Usage records allow you to report customer usage and metrics to Stripe for metered billing of subscription prices.
Related guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing)
type UsageRecordParams ¶
type UsageRecordParams struct { Params `form:"*"` SubscriptionItem *string `form:"-"` // Included in URL // Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. Action *string `form:"action"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The usage quantity for the specified timestamp. Quantity *int64 `form:"quantity"` // The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. Timestamp *int64 `form:"timestamp"` TimestampNow *bool `form:"-"` // See custom AppendTo }
Creates a usage record for a specified subscription item and date, and fills it with a quantity.
Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the [metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) plan, Stripe helps you send accurate invoices to your customers.
The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan's aggregate_usage [parameter](https://stripe.com/docs/api/plans/create#create_plan-aggregate_usage). When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.
The default pricing model for metered billing is [per-unit pricing. For finer granularity, you can configure metered billing to have a <a href="https://stripe.com/docs/billing/subscriptions/tiers">tiered pricing](https://stripe.com/docs/api/plans/object#plan_object-billing_scheme) model.
func (*UsageRecordParams) AddExpand ¶
func (p *UsageRecordParams) AddExpand(f string)
AddExpand appends a new field to expand.
type UsageRecordSummary ¶
type UsageRecordSummary struct { // Unique identifier for the object. ID string `json:"id"` // The invoice in which this usage period has been billed for. Invoice string `json:"invoice"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` Period *Period `json:"period"` // The ID of the subscription item this summary is describing. SubscriptionItem string `json:"subscription_item"` // The total usage within this usage period. TotalUsage int64 `json:"total_usage"` }
type UsageRecordSummaryList ¶
type UsageRecordSummaryList struct { APIResource ListMeta Data []*UsageRecordSummary `json:"data"` }
UsageRecordSummaryList is a list of UsageRecordSummaries as retrieved from a list endpoint.
type UsageRecordSummaryListParams ¶
type UsageRecordSummaryListParams struct { ListParams `form:"*"` SubscriptionItem *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that's been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).
The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn't ended yet. Since new usage records can still be added, the returned summary information for the subscription item's ID should be seen as unstable until the subscription billing period ends.
func (*UsageRecordSummaryListParams) AddExpand ¶
func (p *UsageRecordSummaryListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type VerificationFieldsList ¶
type VerificationFieldsList struct { AdditionalFields []string `json:"additional"` Minimum []string `json:"minimum"` }
VerificationFieldsList lists the fields needed for an account verification. For more details see https://stripe.com/docs/api#country_spec_object-verification_fields.
type WebhookEndpoint ¶
type WebhookEndpoint struct { APIResource // The API version events are rendered as for this webhook endpoint. APIVersion string `json:"api_version"` // The ID of the associated Connect application. Application string `json:"application"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` Deleted bool `json:"deleted"` // An optional description of what the webhook is used for. Description string `json:"description"` // The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. EnabledEvents []string `json:"enabled_events"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // 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. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation. Secret string `json:"secret"` // The status of the webhook. It can be `enabled` or `disabled`. Status string `json:"status"` // The URL of the webhook endpoint. URL string `json:"url"` }
You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be notified about events that happen in your Stripe account or connected accounts.
Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.
Related guide: [Setting up webhooks](https://stripe.com/docs/webhooks/configure)
type WebhookEndpointList ¶
type WebhookEndpointList struct { APIResource ListMeta Data []*WebhookEndpoint `json:"data"` }
WebhookEndpointList is a list of WebhookEndpoints as retrieved from a list endpoint.
type WebhookEndpointListParams ¶
type WebhookEndpointListParams struct { ListParams `form:"*"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` }
Returns a list of your webhook endpoints.
func (*WebhookEndpointListParams) AddExpand ¶
func (p *WebhookEndpointListParams) AddExpand(f string)
AddExpand appends a new field to expand.
type WebhookEndpointParams ¶
type WebhookEndpointParams struct { Params `form:"*"` // Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. Connect *bool `form:"connect"` // An optional description of what the webhook is used for. Description *string `form:"description"` // Disable the webhook endpoint if set to true. Disabled *bool `form:"disabled"` // The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. EnabledEvents []*string `form:"enabled_events"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // 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`. Metadata map[string]string `form:"metadata"` // The URL of the webhook endpoint. URL *string `form:"url"` // This parameter is only available on creation. // We recommend setting the API version that the library is pinned to. See apiversion in stripe.go // Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. APIVersion *string `form:"api_version"` }
A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.
func (*WebhookEndpointParams) AddExpand ¶
func (p *WebhookEndpointParams) AddExpand(f string)
AddExpand appends a new field to expand.
func (*WebhookEndpointParams) AddMetadata ¶
func (p *WebhookEndpointParams) AddMetadata(key string, value string)
AddMetadata adds a new key-value pair to the Metadata.
Source Files ¶
- account.go
- accountlink.go
- accountsession.go
- address.go
- api_version.go
- applepaydomain.go
- application.go
- applicationfee.go
- apps_secret.go
- balance.go
- balancetransaction.go
- bankaccount.go
- billingportal_configuration.go
- billingportal_session.go
- capability.go
- card.go
- cashbalance.go
- charge.go
- checkout_session.go
- connectcollectiontransfer.go
- countryspec.go
- coupon.go
- creditnote.go
- creditnotelineitem.go
- currency.go
- customer.go
- customerbalancetransaction.go
- customercashbalancetransaction.go
- discount.go
- dispute.go
- ephemeralkey.go
- error.go
- event.go
- feerefund.go
- file.go
- filelink.go
- financialconnections_account.go
- financialconnections_accountowner.go
- financialconnections_accountownership.go
- financialconnections_session.go
- fundinginstructions.go
- identity_verificationreport.go
- identity_verificationsession.go
- invoice.go
- invoiceitem.go
- invoicelineitem.go
- issuing_authorization.go
- issuing_card.go
- issuing_cardholder.go
- issuing_dispute.go
- issuing_token.go
- issuing_transaction.go
- iter.go
- lineitem.go
- log.go
- loginlink.go
- mandate.go
- oauth.go
- params.go
- paymentintent.go
- paymentlink.go
- paymentmethod.go
- paymentmethodconfiguration.go
- paymentmethoddomain.go
- paymentsource.go
- payout.go
- person.go
- plan.go
- platformtaxfee.go
- price.go
- product.go
- promotioncode.go
- quote.go
- radar_earlyfraudwarning.go
- radar_valuelist.go
- radar_valuelistitem.go
- refund.go
- reporting_reportrun.go
- reporting_reporttype.go
- reservetransaction.go
- review.go
- search_iter.go
- search_params.go
- setupattempt.go
- setupintent.go
- shippingrate.go
- sigma_scheduledqueryrun.go
- source.go
- sourcetransaction.go
- stripe.go
- stripe_go115.go
- subscription.go
- subscriptionitem.go
- subscriptionschedule.go
- tax_calculation.go
- tax_calculationlineitem.go
- tax_settings.go
- tax_transaction.go
- tax_transactionlineitem.go
- taxcode.go
- taxdeductedatsource.go
- taxid.go
- taxrate.go
- terminal_configuration.go
- terminal_connectiontoken.go
- terminal_location.go
- terminal_reader.go
- testhelpers_customer.go
- testhelpers_refund.go
- testhelpers_testclock.go
- testhelpersissuing_authorization.go
- testhelpersissuing_card.go
- testhelpersissuing_transaction.go
- testhelpersterminal_reader.go
- testhelperstreasury_inboundtransfer.go
- testhelperstreasury_outboundpayment.go
- testhelperstreasury_outboundtransfer.go
- testhelperstreasury_receivedcredit.go
- testhelperstreasury_receiveddebit.go
- token.go
- topup.go
- transfer.go
- transferreversal.go
- treasury_creditreversal.go
- treasury_debitreversal.go
- treasury_financialaccount.go
- treasury_financialaccountfeatures.go
- treasury_inboundtransfer.go
- treasury_outboundpayment.go
- treasury_outboundtransfer.go
- treasury_receivedcredit.go
- treasury_receiveddebit.go
- treasury_transaction.go
- treasury_transactionentry.go
- usagerecord.go
- usagerecordsummary.go
- webhookendpoint.go
Directories ¶
Path | Synopsis |
---|---|
Package account provides the /accounts APIs
|
Package account provides the /accounts APIs |
Package accountlink provides the /account_links APIs
|
Package accountlink provides the /account_links APIs |
Package accountsession provides the /account_sessions APIs
|
Package accountsession provides the /account_sessions APIs |
Package applepaydomain provides the /apple_pay/domains APIs
|
Package applepaydomain provides the /apple_pay/domains APIs |
Package applicationfee provides the /application_fees APIs
|
Package applicationfee provides the /application_fees APIs |
apps
|
|
secret
Package secret provides the /apps/secrets APIs
|
Package secret provides the /apps/secrets APIs |
Package balance provides the /balance APIs
|
Package balance provides the /balance APIs |
Package balancetransaction provides the /balance_transactions APIs
|
Package balancetransaction provides the /balance_transactions APIs |
Package bankaccount provides the bankaccount related APIs
|
Package bankaccount provides the bankaccount related APIs |
billingportal
|
|
configuration
Package configuration provides the /billing_portal/configurations APIs
|
Package configuration provides the /billing_portal/configurations APIs |
session
Package session provides the /billing_portal/sessions APIs
|
Package session provides the /billing_portal/sessions APIs |
Package capability provides the /accounts/{account}/capabilities APIs
|
Package capability provides the /accounts/{account}/capabilities APIs |
Package card provides the card related APIs
|
Package card provides the card related APIs |
Package cashbalance provides the /customers/{customer}/cash_balance APIs
|
Package cashbalance provides the /customers/{customer}/cash_balance APIs |
Package charge provides the /charges APIs
|
Package charge provides the /charges APIs |
checkout
|
|
session
Package session provides the /checkout/sessions APIs
|
Package session provides the /checkout/sessions APIs |
Package client provides a Stripe client for invoking APIs across all resources
|
Package client provides a Stripe client for invoking APIs across all resources |
Package countryspec provides the /country_specs APIs
|
Package countryspec provides the /country_specs APIs |
Package coupon provides the /coupons APIs
|
Package coupon provides the /coupons APIs |
Package creditnote provides the /credit_notes APIs
|
Package creditnote provides the /credit_notes APIs |
Package customer provides the /customers APIs
|
Package customer provides the /customers APIs |
Package customerbalancetransaction provides the /customers/{customer}/balance_transactions APIs
|
Package customerbalancetransaction provides the /customers/{customer}/balance_transactions APIs |
Package customercashbalancetransaction provides the /customers/{customer}/cash_balance_transactions APIs
|
Package customercashbalancetransaction provides the /customers/{customer}/cash_balance_transactions APIs |
Package dispute provides the /disputes APIs
|
Package dispute provides the /disputes APIs |
Package ephemeralkey provides the /ephemeral_keys APIs
|
Package ephemeralkey provides the /ephemeral_keys APIs |
Package event provides the /events APIs
|
Package event provides the /events APIs |
Package feerefund provides the /application_fees/{id}/refunds APIs
|
Package feerefund provides the /application_fees/{id}/refunds APIs |
Package file provides the /files APIs
|
Package file provides the /files APIs |
Package filelink provides the /file_links APIs
|
Package filelink provides the /file_links APIs |
financialconnections
|
|
account
Package account provides the /financial_connections/accounts APIs
|
Package account provides the /financial_connections/accounts APIs |
session
Package session provides the /financial_connections/sessions APIs
|
Package session provides the /financial_connections/sessions APIs |
identity
|
|
verificationreport
Package verificationreport provides the /identity/verification_reports APIs
|
Package verificationreport provides the /identity/verification_reports APIs |
verificationsession
Package verificationsession provides the /identity/verification_sessions APIs
|
Package verificationsession provides the /identity/verification_sessions APIs |
Package invoice provides the /invoices APIs
|
Package invoice provides the /invoices APIs |
Package invoiceitem provides the /invoiceitems APIs
|
Package invoiceitem provides the /invoiceitems APIs |
issuing
|
|
authorization
Package authorization provides the /issuing/authorizations APIs
|
Package authorization provides the /issuing/authorizations APIs |
card
Package card provides the /issuing/cards APIs
|
Package card provides the /issuing/cards APIs |
cardholder
Package cardholder provides the /issuing/cardholders APIs For more details, see: https://stripe.com/docs/api/?lang=go#issuing_cardholders
|
Package cardholder provides the /issuing/cardholders APIs For more details, see: https://stripe.com/docs/api/?lang=go#issuing_cardholders |
dispute
Package dispute provides the /issuing/disputes APIs
|
Package dispute provides the /issuing/disputes APIs |
token
Package token provides the /issuing/tokens APIs
|
Package token provides the /issuing/tokens APIs |
transaction
Package transaction provides the /issuing/transactions APIs
|
Package transaction provides the /issuing/transactions APIs |
Package loginlink provides the /accounts/{account}/login_links APIs
|
Package loginlink provides the /accounts/{account}/login_links APIs |
Package mandate provides the /mandates APIs
|
Package mandate provides the /mandates APIs |
Package oauth provides the OAuth APIs
|
Package oauth provides the OAuth APIs |
Package paymentintent provides the /payment_intents APIs
|
Package paymentintent provides the /payment_intents APIs |
Package paymentlink provides the /payment_links APIs
|
Package paymentlink provides the /payment_links APIs |
Package paymentmethod provides the /payment_methods APIs
|
Package paymentmethod provides the /payment_methods APIs |
Package paymentmethodconfiguration provides the /payment_method_configurations APIs
|
Package paymentmethodconfiguration provides the /payment_method_configurations APIs |
Package paymentmethoddomain provides the /payment_method_domains APIs
|
Package paymentmethoddomain provides the /payment_method_domains APIs |
Package paymentsource provides the /customers/{customer}/sources APIs
|
Package paymentsource provides the /customers/{customer}/sources APIs |
Package payout provides the /payouts APIs
|
Package payout provides the /payouts APIs |
Package person provides the /accounts/{account}/persons APIs
|
Package person provides the /accounts/{account}/persons APIs |
Package plan provides the /plans APIs
|
Package plan provides the /plans APIs |
Package price provides the /prices APIs
|
Package price provides the /prices APIs |
Package product provides the /products APIs
|
Package product provides the /products APIs |
Package promotioncode provides the /promotion_codes APIs
|
Package promotioncode provides the /promotion_codes APIs |
Package quote provides the /quotes APIs
|
Package quote provides the /quotes APIs |
radar
|
|
earlyfraudwarning
Package earlyfraudwarning provides the /radar/early_fraud_warnings APIs
|
Package earlyfraudwarning provides the /radar/early_fraud_warnings APIs |
valuelist
Package valuelist provides the /radar/value_lists APIs
|
Package valuelist provides the /radar/value_lists APIs |
valuelistitem
Package valuelistitem provides the /radar/value_list_items APIs For more details, see: https://stripe.com/docs/api/radar/list_items?lang=go
|
Package valuelistitem provides the /radar/value_list_items APIs For more details, see: https://stripe.com/docs/api/radar/list_items?lang=go |
Package refund provides the /refunds APIs
|
Package refund provides the /refunds APIs |
reporting
|
|
reportrun
Package reportrun provides the /reporting/report_runs APIs
|
Package reportrun provides the /reporting/report_runs APIs |
reporttype
Package reporttype provides the /reporting/report_types APIs
|
Package reporttype provides the /reporting/report_types APIs |
Package review provides the /reviews APIs
|
Package review provides the /reviews APIs |
scripts
|
|
check_api_clients
A script that tries to make sure that all API clients (structs called `Client`) defined throughout all subpackages are included in the master list as a field on the `client.API` type.
|
A script that tries to make sure that all API clients (structs called `Client`) defined throughout all subpackages are included in the master list as a field on the `client.API` type. |
test_with_stripe_mock
A script that wraps the run of the project test suite and starts stripe-mock with a custom OpenAPI + fixtures bundle if one was found in the appropriate spot (see `pathSpec` below).
|
A script that wraps the run of the project test suite and starts stripe-mock with a custom OpenAPI + fixtures bundle if one was found in the appropriate spot (see `pathSpec` below). |
Package setupattempt provides the /setup_attempts APIs For more details, see: https://stripe.com/docs/api/?lang=go#setup_attempts
|
Package setupattempt provides the /setup_attempts APIs For more details, see: https://stripe.com/docs/api/?lang=go#setup_attempts |
Package setupintent provides the /setup_intents APIs
|
Package setupintent provides the /setup_intents APIs |
Package shippingrate provides the /shipping_rates APIs
|
Package shippingrate provides the /shipping_rates APIs |
sigma
|
|
scheduledqueryrun
Package scheduledqueryrun provides the /sigma/scheduled_query_runs APIs For more details, see: https://stripe.com/docs/api#scheduled_queries
|
Package scheduledqueryrun provides the /sigma/scheduled_query_runs APIs For more details, see: https://stripe.com/docs/api#scheduled_queries |
Package source provides the /sources APIs
|
Package source provides the /sources APIs |
Package sourcetransaction provides the sourcetransaction related APIs
|
Package sourcetransaction provides the sourcetransaction related APIs |
Package subscription provides the /subscriptions APIs
|
Package subscription provides the /subscriptions APIs |
Package subscriptionitem provides the /subscription_items APIs
|
Package subscriptionitem provides the /subscription_items APIs |
Package subscriptionschedule provides the /subscription_schedules APIs
|
Package subscriptionschedule provides the /subscription_schedules APIs |
tax
|
|
calculation
Package calculation provides the /tax/calculations APIs
|
Package calculation provides the /tax/calculations APIs |
settings
Package settings provides the /tax/settings APIs
|
Package settings provides the /tax/settings APIs |
transaction
Package transaction provides the /tax/transactions APIs
|
Package transaction provides the /tax/transactions APIs |
Package taxcode provides the /tax_codes APIs
|
Package taxcode provides the /tax_codes APIs |
Package taxid provides the /customers/{customer}/tax_ids APIs
|
Package taxid provides the /customers/{customer}/tax_ids APIs |
Package taxrate provides the /tax_rates APIs
|
Package taxrate provides the /tax_rates APIs |
terminal
|
|
configuration
Package configuration provides the /terminal/configurations APIs
|
Package configuration provides the /terminal/configurations APIs |
connectiontoken
Package connectiontoken provides the /terminal/connection_tokens APIs
|
Package connectiontoken provides the /terminal/connection_tokens APIs |
location
Package location provides the /terminal/locations APIs
|
Package location provides the /terminal/locations APIs |
reader
Package reader provides the /terminal/readers APIs
|
Package reader provides the /terminal/readers APIs |
testhelpers
|
|
customer
Package customer provides the /customers APIs
|
Package customer provides the /customers APIs |
issuing/authorization
Package authorization provides the /issuing/authorizations APIs
|
Package authorization provides the /issuing/authorizations APIs |
issuing/card
Package card provides the /issuing/cards APIs
|
Package card provides the /issuing/cards APIs |
issuing/transaction
Package transaction provides the /issuing/transactions APIs
|
Package transaction provides the /issuing/transactions APIs |
refund
Package refund provides the /refunds APIs
|
Package refund provides the /refunds APIs |
terminal/reader
Package reader provides the /terminal/readers APIs
|
Package reader provides the /terminal/readers APIs |
testclock
Package testclock provides the /test_helpers/test_clocks APIs
|
Package testclock provides the /test_helpers/test_clocks APIs |
treasury/inboundtransfer
Package inboundtransfer provides the /treasury/inbound_transfers APIs
|
Package inboundtransfer provides the /treasury/inbound_transfers APIs |
treasury/outboundpayment
Package outboundpayment provides the /treasury/outbound_payments APIs
|
Package outboundpayment provides the /treasury/outbound_payments APIs |
treasury/outboundtransfer
Package outboundtransfer provides the /treasury/outbound_transfers APIs
|
Package outboundtransfer provides the /treasury/outbound_transfers APIs |
treasury/receivedcredit
Package receivedcredit provides the /treasury/received_credits APIs
|
Package receivedcredit provides the /treasury/received_credits APIs |
treasury/receiveddebit
Package receiveddebit provides the /treasury/received_debits APIs
|
Package receiveddebit provides the /treasury/received_debits APIs |
Package token provides the /tokens APIs
|
Package token provides the /tokens APIs |
Package topup provides the /topups APIs
|
Package topup provides the /topups APIs |
Package transfer provides the /transfers APIs
|
Package transfer provides the /transfers APIs |
Package transferreversal provides the /transfers/{id}/reversals APIs
|
Package transferreversal provides the /transfers/{id}/reversals APIs |
treasury
|
|
creditreversal
Package creditreversal provides the /treasury/credit_reversals APIs
|
Package creditreversal provides the /treasury/credit_reversals APIs |
debitreversal
Package debitreversal provides the /treasury/debit_reversals APIs
|
Package debitreversal provides the /treasury/debit_reversals APIs |
financialaccount
Package financialaccount provides the /treasury/financial_accounts APIs
|
Package financialaccount provides the /treasury/financial_accounts APIs |
inboundtransfer
Package inboundtransfer provides the /treasury/inbound_transfers APIs
|
Package inboundtransfer provides the /treasury/inbound_transfers APIs |
outboundpayment
Package outboundpayment provides the /treasury/outbound_payments APIs
|
Package outboundpayment provides the /treasury/outbound_payments APIs |
outboundtransfer
Package outboundtransfer provides the /treasury/outbound_transfers APIs
|
Package outboundtransfer provides the /treasury/outbound_transfers APIs |
receivedcredit
Package receivedcredit provides the /treasury/received_credits APIs
|
Package receivedcredit provides the /treasury/received_credits APIs |
receiveddebit
Package receiveddebit provides the /treasury/received_debits APIs
|
Package receiveddebit provides the /treasury/received_debits APIs |
transaction
Package transaction provides the /treasury/transactions APIs
|
Package transaction provides the /treasury/transactions APIs |
transactionentry
Package transactionentry provides the /treasury/transaction_entries APIs
|
Package transactionentry provides the /treasury/transaction_entries APIs |
Package usagerecord provides the /subscription_items/{subscription_item}/usage_records APIs
|
Package usagerecord provides the /subscription_items/{subscription_item}/usage_records APIs |
Package usagerecordsummary provides the /subscription_items/{subscription_item}/usage_record_summaries APIs
|
Package usagerecordsummary provides the /subscription_items/{subscription_item}/usage_record_summaries APIs |
Package webhookendpoint provides the /webhook_endpoints APIs
|
Package webhookendpoint provides the /webhook_endpoints APIs |