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 APIConnectionError
- type APIError
- type APIResource
- type APIResponse
- type Account
- type AccountAddress
- type AccountAddressParams
- type AccountBusinessProfile
- type AccountBusinessProfileParams
- type AccountBusinessType
- type AccountCapabilities
- type AccountCapabilitiesAUBECSDebitPaymentsParams
- type AccountCapabilitiesBACSDebitPaymentsParams
- type AccountCapabilitiesBancontactPaymentsParams
- type AccountCapabilitiesCardIssuingParams
- type AccountCapabilitiesCardPaymentsParams
- type AccountCapabilitiesCartesBancairesPaymentsParams
- type AccountCapabilitiesEPSPaymentsParams
- type AccountCapabilitiesFPXPaymentsParams
- type AccountCapabilitiesGiropayPaymentsParams
- type AccountCapabilitiesGrabpayPaymentsParams
- type AccountCapabilitiesIdealPaymentsParams
- type AccountCapabilitiesJCBPaymentsParams
- type AccountCapabilitiesLegacyPaymentsParams
- type AccountCapabilitiesOXXOPaymentsParams
- type AccountCapabilitiesP24PaymentsParams
- type AccountCapabilitiesParams
- type AccountCapabilitiesSEPADebitPaymentsParams
- type AccountCapabilitiesSofortPaymentsParams
- type AccountCapabilitiesTaxReportingUS1099KParams
- type AccountCapabilitiesTaxReportingUS1099MISCParams
- type AccountCapabilitiesTransfersParams
- type AccountCapability
- type AccountCapabilityStatus
- type AccountCompany
- type AccountCompanyParams
- type AccountCompanyStructure
- type AccountCompanyVerification
- type AccountCompanyVerificationDocument
- type AccountCompanyVerificationDocumentDetailsCode
- type AccountCompanyVerificationDocumentParams
- type AccountCompanyVerificationParams
- type AccountDeclineOn
- type AccountDeclineSettingsParams
- type AccountDocumentsBankAccountOwnershipVerificationParams
- type AccountDocumentsCompanyLicenseParams
- type AccountDocumentsCompanyMemorandumOfAssociationParams
- type AccountDocumentsCompanyMinisterialDecreeParams
- type AccountDocumentsCompanyRegistrationVerificationParams
- type AccountDocumentsCompanyTaxIDVerificationParams
- type AccountDocumentsParams
- type AccountExternalAccountParams
- type AccountLink
- type AccountLinkCollect
- type AccountLinkParams
- type AccountLinkType
- type AccountList
- type AccountListParams
- type AccountParams
- type AccountPayoutSchedule
- type AccountRejectParams
- type AccountRejectReason
- type AccountRequirements
- type AccountRequirementsDisabledReason
- type AccountRequirementsError
- type AccountSettings
- type AccountSettingsBACSDebitPayments
- type AccountSettingsBACSDebitPaymentsParams
- type AccountSettingsBranding
- type AccountSettingsBrandingParams
- type AccountSettingsCardPayments
- type AccountSettingsCardPaymentsParams
- type AccountSettingsDashboard
- type AccountSettingsDashboardParams
- type AccountSettingsParams
- type AccountSettingsPayments
- type AccountSettingsPaymentsParams
- type AccountSettingsPayouts
- type AccountSettingsPayoutsParams
- type AccountSettingsSEPADebitPayments
- 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 AuthenticationError
- 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) Do(req *http.Request, body *bytes.Buffer, v LastResponseSetter) 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 BalanceDetails
- type BalanceParams
- type BalanceSourceType
- type BalanceTransaction
- type BalanceTransactionFee
- type BalanceTransactionList
- type BalanceTransactionListParams
- type BalanceTransactionParams
- type BalanceTransactionReportingCategory
- type BalanceTransactionSource
- type BalanceTransactionSourceType
- type BalanceTransactionStatus
- type BalanceTransactionType
- type BankAccount
- type BankAccountAccountHolderType
- type BankAccountAvailablePayoutMethod
- type BankAccountList
- type BankAccountListParams
- type BankAccountParams
- type BankAccountStatus
- type BillingDetails
- type BillingDetailsParams
- 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 BillingPortalConfigurationFeaturesSubscriptionCancelMode
- type BillingPortalConfigurationFeaturesSubscriptionCancelParams
- type BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior
- type BillingPortalConfigurationFeaturesSubscriptionUpdate
- type BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate
- type BillingPortalConfigurationFeaturesSubscriptionUpdateParams
- type BillingPortalConfigurationFeaturesSubscriptionUpdateProduct
- type BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams
- type BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior
- type BillingPortalConfigurationList
- type BillingPortalConfigurationListParams
- type BillingPortalConfigurationParams
- type BillingPortalSession
- type BillingPortalSessionParams
- type Capability
- type CapabilityDisabledReason
- type CapabilityList
- type CapabilityListParams
- type CapabilityParams
- type CapabilityRequirements
- type CapabilityStatus
- type CaptureParams
- type Card
- type CardAvailablePayoutMethod
- type CardBrand
- type CardError
- type CardFunding
- type CardList
- type CardListParams
- type CardParams
- type CardTokenizationMethod
- type CardVerification
- type Charge
- type ChargeFraudStripeReport
- type ChargeFraudUserReport
- type ChargeLevel3
- type ChargeLevel3LineItem
- type ChargeLevel3LineItemsParams
- type ChargeLevel3Params
- type ChargeList
- type ChargeListParams
- type ChargeOutcome
- type ChargeOutcomeRule
- type ChargeParams
- type ChargePaymentMethodDetails
- type ChargePaymentMethodDetailsAUBECSDebit
- type ChargePaymentMethodDetailsAchCreditTransfer
- type ChargePaymentMethodDetailsAchDebit
- type ChargePaymentMethodDetailsAcssDebit
- type ChargePaymentMethodDetailsAfterpayClearpay
- type ChargePaymentMethodDetailsAlipay
- type ChargePaymentMethodDetailsBACSDebit
- type ChargePaymentMethodDetailsBancontact
- type ChargePaymentMethodDetailsCard
- type ChargePaymentMethodDetailsCardChecks
- type ChargePaymentMethodDetailsCardInstallments
- type ChargePaymentMethodDetailsCardPresent
- type ChargePaymentMethodDetailsCardPresentReceipt
- type ChargePaymentMethodDetailsCardPresentReceiptAccountType
- type ChargePaymentMethodDetailsCardThreeDSecure
- type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow
- type ChargePaymentMethodDetailsCardThreeDSecureResult
- type ChargePaymentMethodDetailsCardThreeDSecureResultReason
- type ChargePaymentMethodDetailsCardWallet
- type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout
- type ChargePaymentMethodDetailsCardWalletApplePay
- type ChargePaymentMethodDetailsCardWalletGooglePay
- type ChargePaymentMethodDetailsCardWalletMasterpass
- type ChargePaymentMethodDetailsCardWalletSamsungPay
- type ChargePaymentMethodDetailsCardWalletVisaCheckout
- type ChargePaymentMethodDetailsEps
- type ChargePaymentMethodDetailsFPX
- type ChargePaymentMethodDetailsGiropay
- type ChargePaymentMethodDetailsGrabpay
- type ChargePaymentMethodDetailsIdeal
- type ChargePaymentMethodDetailsInteracPresent
- type ChargePaymentMethodDetailsInteracPresentReceipt
- type ChargePaymentMethodDetailsKlarna
- type ChargePaymentMethodDetailsMultibanco
- type ChargePaymentMethodDetailsOXXO
- type ChargePaymentMethodDetailsP24
- type ChargePaymentMethodDetailsSepaDebit
- type ChargePaymentMethodDetailsSofort
- type ChargePaymentMethodDetailsStripeAccount
- type ChargePaymentMethodDetailsType
- type ChargePaymentMethodDetailsWechat
- type ChargeTransferData
- type ChargeTransferDataParams
- type CheckoutSession
- type CheckoutSessionCustomerDetails
- type CheckoutSessionCustomerDetailsTaxExempt
- type CheckoutSessionCustomerDetailsTaxIDs
- type CheckoutSessionCustomerDetailsTaxIDsType
- type CheckoutSessionDiscountParams
- type CheckoutSessionLineItemAdjustableQuantityParams
- type CheckoutSessionLineItemParams
- type CheckoutSessionLineItemPriceDataParams
- type CheckoutSessionLineItemPriceDataProductDataParams
- type CheckoutSessionLineItemPriceDataRecurringParams
- type CheckoutSessionList
- type CheckoutSessionListLineItemsParams
- type CheckoutSessionListParams
- type CheckoutSessionMode
- type CheckoutSessionParams
- type CheckoutSessionPaymentIntentDataParams
- type CheckoutSessionPaymentIntentDataTransferDataParams
- type CheckoutSessionPaymentStatus
- type CheckoutSessionSetupIntentDataParams
- type CheckoutSessionShippingAddressCollection
- type CheckoutSessionShippingAddressCollectionParams
- type CheckoutSessionSubmitType
- type CheckoutSessionSubscriptionDataItemsParams
- type CheckoutSessionSubscriptionDataParams
- type CheckoutSessionTotalDetails
- type CheckoutSessionTotalDetailsBreakdown
- type CheckoutSessionTotalDetailsBreakdownDiscount
- type CheckoutSessionTotalDetailsBreakdownTax
- type CodeVerificationFlow
- type Country
- type CountrySpec
- type CountrySpecList
- type CountrySpecListParams
- type CountrySpecParams
- type Coupon
- type CouponAppliesTo
- type CouponAppliesToParams
- type CouponDuration
- type CouponList
- type CouponListParams
- type CouponParams
- type CreditNote
- type CreditNoteDiscountAmount
- type CreditNoteLineItem
- type CreditNoteLineItemDiscountAmount
- type CreditNoteLineItemList
- type CreditNoteLineItemListParams
- type CreditNoteLineItemListPreviewParams
- type CreditNoteLineItemType
- type CreditNoteLineParams
- type CreditNoteList
- type CreditNoteListParams
- type CreditNoteParams
- type CreditNotePreviewParams
- type CreditNoteReason
- type CreditNoteStatus
- type CreditNoteTaxAmount
- type CreditNoteType
- type CreditNoteVoidParams
- type Currency
- type Customer
- type CustomerBalanceTransaction
- type CustomerBalanceTransactionList
- type CustomerBalanceTransactionListParams
- type CustomerBalanceTransactionParams
- type CustomerBalanceTransactionType
- type CustomerInvoiceCustomField
- type CustomerInvoiceCustomFieldParams
- type CustomerInvoiceSettings
- type CustomerInvoiceSettingsParams
- type CustomerList
- type CustomerListParams
- type CustomerParams
- type CustomerShippingDetails
- type CustomerShippingDetailsParams
- type CustomerSourceParams
- type CustomerTaxExempt
- type CustomerTaxIDDataParams
- type DOB
- type DOBParams
- type Deauthorize
- type DeauthorizeParams
- type DeclineCode
- type DeliveryEstimate
- type DestinationParams
- type Discount
- type DiscountParams
- type Dispute
- type DisputeEvidence
- type DisputeEvidenceParams
- type DisputeList
- type DisputeListParams
- type DisputeParams
- 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 EvidenceDetails
- type ExternalAccount
- type ExternalAccountList
- type ExternalAccountType
- 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 FraudDetails
- type FraudDetailsParams
- type IdempotencyError
- type IdentityVerificationStatus
- type InvalidRequestError
- type Inventory
- type InventoryParams
- type Invoice
- type InvoiceBillingReason
- type InvoiceCollectionMethod
- type InvoiceCustomField
- type InvoiceCustomFieldParams
- type InvoiceCustomerTaxID
- type InvoiceDiscountAmount
- type InvoiceDiscountParams
- type InvoiceFinalizeParams
- type InvoiceItem
- type InvoiceItemDiscountParams
- type InvoiceItemList
- type InvoiceItemListParams
- type InvoiceItemParams
- type InvoiceItemPeriodParams
- type InvoiceItemPriceDataParams
- type InvoiceLine
- type InvoiceLineDiscountAmount
- type InvoiceLineList
- type InvoiceLineListParams
- type InvoiceLineType
- type InvoiceList
- type InvoiceListParams
- type InvoiceMarkUncollectibleParams
- type InvoiceParams
- type InvoicePayParams
- type InvoicePaymentSettings
- type InvoicePaymentSettingsParams
- type InvoicePaymentSettingsPaymentMethodOptions
- type InvoicePaymentSettingsPaymentMethodOptionsBancontact
- type InvoicePaymentSettingsPaymentMethodOptionsBancontactParams
- type InvoicePaymentSettingsPaymentMethodOptionsCard
- type InvoicePaymentSettingsPaymentMethodOptionsCardParams
- type InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure
- type InvoicePaymentSettingsPaymentMethodOptionsParams
- type InvoicePaymentSettingsPaymentMethodType
- type InvoiceSendParams
- type InvoiceStatus
- type InvoiceStatusTransitions
- type InvoiceTaxAmount
- type InvoiceThresholdReason
- type InvoiceThresholdReasonItemReason
- type InvoiceTransferData
- type InvoiceTransferDataParams
- type InvoiceUpcomingInvoiceItemParams
- type InvoiceUpcomingInvoiceItemPeriodParams
- type InvoiceVoidParams
- type IssuingAuthorization
- type IssuingAuthorizationAmountDetails
- type IssuingAuthorizationApproveParams
- type IssuingAuthorizationAuthorizationMethod
- type IssuingAuthorizationDeclineParams
- type IssuingAuthorizationList
- type IssuingAuthorizationListParams
- type IssuingAuthorizationMerchantData
- type IssuingAuthorizationParams
- type IssuingAuthorizationPendingRequest
- type IssuingAuthorizationRequestHistory
- type IssuingAuthorizationRequestHistoryReason
- type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity
- type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName
- type IssuingAuthorizationStatus
- type IssuingAuthorizationVerificationData
- type IssuingAuthorizationVerificationDataCheck
- type IssuingAuthorizationWalletType
- type IssuingCard
- type IssuingCardCancellationReason
- type IssuingCardList
- type IssuingCardListParams
- type IssuingCardParams
- type IssuingCardReplacementReason
- type IssuingCardShipping
- type IssuingCardShippingCarrier
- type IssuingCardShippingParams
- type IssuingCardShippingService
- type IssuingCardShippingStatus
- type IssuingCardShippingType
- type IssuingCardSpendingControls
- type IssuingCardSpendingControlsParams
- type IssuingCardSpendingControlsSpendingLimit
- type IssuingCardSpendingControlsSpendingLimitInterval
- type IssuingCardSpendingControlsSpendingLimitParams
- type IssuingCardStatus
- type IssuingCardType
- type IssuingCardholder
- type IssuingCardholderBilling
- type IssuingCardholderBillingParams
- type IssuingCardholderCompany
- type IssuingCardholderCompanyParams
- type IssuingCardholderIndividual
- type IssuingCardholderIndividualDOB
- type IssuingCardholderIndividualDOBParams
- type IssuingCardholderIndividualParams
- type IssuingCardholderIndividualVerification
- type IssuingCardholderIndividualVerificationDocument
- type IssuingCardholderIndividualVerificationDocumentParams
- type IssuingCardholderIndividualVerificationParams
- type IssuingCardholderList
- type IssuingCardholderListParams
- type IssuingCardholderParams
- 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 IssuingDisputeEvidenceServiceNotAsDescribedProductType
- type IssuingDisputeList
- type IssuingDisputeListParams
- type IssuingDisputeParams
- type IssuingDisputeStatus
- type IssuingDisputeSubmitParams
- 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 IssuingTransactionType
- type Iter
- type LastResponseSetter
- type Level
- type LeveledLogger
- type LeveledLoggerInterface
- type LineItem
- type LineItemDiscount
- type LineItemList
- type LineItemTax
- 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 MandatePaymentMethodDetailsAUBECSDebit
- type MandatePaymentMethodDetailsBACSDebit
- type MandatePaymentMethodDetailsBACSDebitNetworkStatus
- type MandatePaymentMethodDetailsCard
- type MandatePaymentMethodDetailsSepaDebit
- type MandateSingleUse
- type MandateStatus
- type MandateType
- type OAuthScopeType
- type OAuthStripeUserBusinessType
- type OAuthStripeUserGender
- type OAuthStripeUserParams
- type OAuthToken
- type OAuthTokenParams
- type OAuthTokenType
- type Order
- type OrderDeliveryEstimateType
- type OrderItem
- type OrderItemParams
- type OrderItemParent
- type OrderItemParentType
- type OrderItemType
- type OrderList
- type OrderListParams
- type OrderParams
- type OrderPayParams
- type OrderReturn
- type OrderReturnList
- type OrderReturnListParams
- type OrderReturnParams
- type OrderStatus
- type OrderUpdateParams
- type OrderUpdateShippingParams
- type PIIParams
- type PackageDimensions
- type PackageDimensionsParams
- type Params
- type ParamsContainer
- type PaymentIntent
- type PaymentIntentCancelParams
- type PaymentIntentCancellationReason
- type PaymentIntentCaptureMethod
- type PaymentIntentCaptureParams
- type PaymentIntentConfirmParams
- type PaymentIntentConfirmationMethod
- type PaymentIntentList
- type PaymentIntentListParams
- type PaymentIntentMandateDataCustomerAcceptanceOfflineParams
- type PaymentIntentMandateDataCustomerAcceptanceOnlineParams
- type PaymentIntentMandateDataCustomerAcceptanceParams
- type PaymentIntentMandateDataParams
- type PaymentIntentNextAction
- type PaymentIntentNextActionAlipayHandleRedirect
- type PaymentIntentNextActionOXXODisplayDetails
- type PaymentIntentNextActionRedirectToURL
- type PaymentIntentNextActionType
- type PaymentIntentOffSession
- type PaymentIntentParams
- type PaymentIntentPaymentMethodDataParams
- type PaymentIntentPaymentMethodOptions
- type PaymentIntentPaymentMethodOptionsAlipay
- type PaymentIntentPaymentMethodOptionsAlipayParams
- type PaymentIntentPaymentMethodOptionsBancontact
- type PaymentIntentPaymentMethodOptionsBancontactParams
- type PaymentIntentPaymentMethodOptionsCard
- type PaymentIntentPaymentMethodOptionsCardInstallments
- type PaymentIntentPaymentMethodOptionsCardInstallmentsParams
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlan
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType
- type PaymentIntentPaymentMethodOptionsCardParams
- type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure
- type PaymentIntentPaymentMethodOptionsOXXO
- type PaymentIntentPaymentMethodOptionsOXXOParams
- type PaymentIntentPaymentMethodOptionsParams
- type PaymentIntentPaymentMethodOptionsSofort
- type PaymentIntentPaymentMethodOptionsSofortParams
- type PaymentIntentSetupFutureUsage
- type PaymentIntentStatus
- type PaymentIntentTransferData
- type PaymentIntentTransferDataParams
- type PaymentMethod
- type PaymentMethodAUBECSDebit
- type PaymentMethodAUBECSDebitParams
- type PaymentMethodAfterpayClearpay
- type PaymentMethodAfterpayClearpayParams
- type PaymentMethodAlipay
- type PaymentMethodAlipayParams
- type PaymentMethodAttachParams
- type PaymentMethodBACSDebit
- type PaymentMethodBACSDebitParams
- type PaymentMethodBancontact
- type PaymentMethodBancontactParams
- type PaymentMethodCard
- type PaymentMethodCardBrand
- type PaymentMethodCardChecks
- type PaymentMethodCardNetwork
- type PaymentMethodCardNetworks
- type PaymentMethodCardParams
- type PaymentMethodCardPresent
- type PaymentMethodCardThreeDSecureUsage
- type PaymentMethodCardWallet
- type PaymentMethodCardWalletType
- type PaymentMethodDetachParams
- 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 PaymentMethodInteracPresentParams
- type PaymentMethodList
- type PaymentMethodListParams
- type PaymentMethodOXXO
- type PaymentMethodOXXOParams
- type PaymentMethodP24
- type PaymentMethodP24Params
- type PaymentMethodParams
- type PaymentMethodSepaDebit
- type PaymentMethodSepaDebitGeneratedFrom
- type PaymentMethodSepaDebitParams
- type PaymentMethodSofort
- type PaymentMethodSofortParams
- type PaymentMethodType
- type PaymentSource
- type PaymentSourceType
- type Payout
- type PayoutDestination
- type PayoutDestinationType
- type PayoutFailureCode
- type PayoutInterval
- type PayoutList
- type PayoutListParams
- type PayoutMethodType
- type PayoutParams
- type PayoutReverseParams
- type PayoutScheduleParams
- type PayoutSourceType
- type PayoutStatus
- type PayoutType
- type Period
- type PermissionError
- type Person
- type PersonList
- type PersonListParams
- type PersonParams
- type PersonPoliticalExposure
- type PersonVerification
- type PersonVerificationDetailsCode
- type PersonVerificationDocument
- type PersonVerificationDocumentParams
- type PersonVerificationParams
- 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 Price
- type PriceBillingScheme
- type PriceList
- type PriceListParams
- type PriceParams
- type PriceProductDataParams
- type PriceRecurring
- type PriceRecurringAggregateUsage
- type PriceRecurringInterval
- type PriceRecurringListParams
- type PriceRecurringParams
- type PriceRecurringUsageType
- type PriceTier
- type PriceTierParams
- type PriceTiersMode
- type PriceTransformQuantity
- type PriceTransformQuantityParams
- type PriceTransformQuantityRound
- type PriceType
- type Product
- type ProductList
- type ProductListParams
- type ProductParams
- type ProductType
- type PromotionCode
- type PromotionCodeList
- type PromotionCodeListParams
- type PromotionCodeParams
- type PromotionCodeRestrictions
- type PromotionCodeRestrictionsParams
- type Query
- 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 RateLimitError
- type ReceiverFlow
- type RedirectFlow
- type RedirectParams
- type Refund
- type RefundFailureReason
- type RefundList
- type RefundListParams
- type RefundParams
- type RefundReason
- type RefundStatus
- type Relationship
- type RelationshipListParams
- type RelationshipParams
- type ReportRun
- type ReportRunList
- type ReportRunListParams
- type ReportRunParameters
- type ReportRunParametersParams
- type ReportRunParams
- type ReportRunStatus
- type ReportType
- type ReportTypeList
- type ReportTypeListParams
- type ReportTypeParams
- type Requirements
- type Reversal
- type ReversalList
- type ReversalListParams
- type ReversalParams
- type Review
- type ReviewApproveParams
- type ReviewClosedReason
- type ReviewIPAddressLocation
- type ReviewList
- type ReviewListParams
- type ReviewOpenedReason
- type ReviewParams
- type ReviewReasonType
- type ReviewSession
- type SKU
- type SKUInventoryType
- type SKUInventoryValue
- type SKUList
- type SKUListParams
- type SKUParams
- type SetupAttempt
- type SetupAttemptList
- type SetupAttemptListParams
- type SetupAttemptPaymentMethodDetails
- type SetupAttemptPaymentMethodDetailsBancontact
- type SetupAttemptPaymentMethodDetailsCard
- type SetupAttemptPaymentMethodDetailsCardThreeDSecure
- type SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow
- type SetupAttemptPaymentMethodDetailsCardThreeDSecureResult
- type SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason
- type SetupAttemptPaymentMethodDetailsIdeal
- type SetupAttemptPaymentMethodDetailsSofort
- type SetupAttemptPaymentMethodDetailsType
- type SetupAttemptStatus
- type SetupAttemptUsage
- type SetupIntent
- type SetupIntentCancelParams
- type SetupIntentCancellationReason
- type SetupIntentConfirmParams
- type SetupIntentList
- type SetupIntentListParams
- type SetupIntentMandateDataCustomerAcceptanceOfflineParams
- type SetupIntentMandateDataCustomerAcceptanceOnlineParams
- type SetupIntentMandateDataCustomerAcceptanceParams
- type SetupIntentMandateDataParams
- type SetupIntentNextAction
- type SetupIntentNextActionRedirectToURL
- type SetupIntentNextActionType
- type SetupIntentParams
- type SetupIntentPaymentMethodOptions
- type SetupIntentPaymentMethodOptionsCard
- type SetupIntentPaymentMethodOptionsCardParams
- type SetupIntentPaymentMethodOptionsCardRequestThreeDSecure
- type SetupIntentPaymentMethodOptionsParams
- type SetupIntentSingleUseParams
- type SetupIntentStatus
- type SetupIntentUsage
- type Shipping
- type ShippingDetails
- type ShippingDetailsParams
- type ShippingMethod
- type ShippingParams
- type SigmaScheduledQueryRun
- type SigmaScheduledQueryRunList
- type SigmaScheduledQueryRunListParams
- type SigmaScheduledQueryRunParams
- type SigmaScheduledQueryRunStatus
- type Source
- type SourceCodeVerificationFlowStatus
- type SourceFlow
- type SourceList
- type SourceListParams
- type SourceMandate
- type SourceMandateAcceptance
- type SourceMandateAcceptanceOfflineParams
- type SourceMandateAcceptanceOnlineParams
- type SourceMandateAcceptanceParams
- type SourceMandateAcceptanceStatus
- type SourceMandateNotificationMethod
- type SourceMandateParams
- type SourceObjectDetachParams
- type SourceObjectParams
- type SourceOrderItemsParams
- type SourceOrderParams
- type SourceOwner
- type SourceOwnerParams
- type SourceParams
- type SourceReceiverParams
- type SourceRedirectFlowFailureReason
- type SourceRedirectFlowStatus
- type SourceRefundAttributesMethod
- type SourceRefundAttributesStatus
- type SourceSourceOrder
- type SourceSourceOrderItemType
- type SourceSourceOrderItems
- type SourceStatus
- type SourceTransaction
- type SourceTransactionList
- type SourceTransactionListParams
- type SourceUsage
- type SourceVerifyParams
- type StatusTransitions
- type StatusTransitionsFilterParams
- type Subscription
- type SubscriptionAddInvoiceItemParams
- type SubscriptionBillingThresholds
- type SubscriptionBillingThresholdsParams
- type SubscriptionCancelParams
- type SubscriptionCollectionMethod
- type SubscriptionItem
- type SubscriptionItemBillingThresholds
- type SubscriptionItemBillingThresholdsParams
- type SubscriptionItemList
- type SubscriptionItemListParams
- type SubscriptionItemParams
- type SubscriptionItemPriceDataParams
- type SubscriptionItemPriceDataRecurringParams
- type SubscriptionItemsParams
- type SubscriptionList
- type SubscriptionListParams
- type SubscriptionParams
- type SubscriptionPauseCollection
- type SubscriptionPauseCollectionBehavior
- type SubscriptionPauseCollectionParams
- type SubscriptionPaymentBehavior
- type SubscriptionPendingInvoiceItemInterval
- type SubscriptionPendingInvoiceItemIntervalInterval
- type SubscriptionPendingInvoiceItemIntervalParams
- type SubscriptionPendingUpdate
- type SubscriptionProrationBehavior
- type SubscriptionSchedule
- type SubscriptionScheduleCancelParams
- type SubscriptionScheduleCurrentPhase
- type SubscriptionScheduleDefaultSettings
- type SubscriptionScheduleDefaultSettingsParams
- type SubscriptionScheduleEndBehavior
- type SubscriptionScheduleInvoiceSettings
- type SubscriptionScheduleInvoiceSettingsParams
- type SubscriptionScheduleList
- type SubscriptionScheduleListParams
- type SubscriptionScheduleParams
- type SubscriptionSchedulePhase
- type SubscriptionSchedulePhaseAddInvoiceItem
- type SubscriptionSchedulePhaseAddInvoiceItemParams
- type SubscriptionSchedulePhaseAddInvoiceItemPriceDataParams
- type SubscriptionSchedulePhaseAddInvoiceItemPriceDataRecurringParams
- type SubscriptionSchedulePhaseBillingCycleAnchor
- type SubscriptionSchedulePhaseItem
- type SubscriptionSchedulePhaseItemParams
- type SubscriptionSchedulePhaseParams
- type SubscriptionScheduleReleaseParams
- type SubscriptionScheduleStatus
- type SubscriptionStatus
- type SubscriptionTransferData
- type SubscriptionTransferDataParams
- type SupportedBackend
- type TaxID
- type TaxIDList
- type TaxIDListParams
- type TaxIDParams
- type TaxIDType
- type TaxIDVerification
- type TaxIDVerificationStatus
- type TaxRate
- type TaxRateList
- type TaxRateListParams
- type TaxRateParams
- type TerminalConnectionToken
- type TerminalConnectionTokenParams
- type TerminalLocation
- type TerminalLocationList
- type TerminalLocationListParams
- type TerminalLocationParams
- type TerminalReader
- type TerminalReaderGetParams
- type TerminalReaderList
- type TerminalReaderListParams
- type TerminalReaderParams
- type Token
- type TokenAccountParams
- type TokenCVCUpdateParams
- type TokenParams
- type TokenType
- type Topup
- type TopupList
- type TopupListParams
- type TopupParams
- type Transfer
- type TransferDestination
- type TransferList
- type TransferListParams
- type TransferParams
- type TransferSourceType
- type UsageRecord
- type UsageRecordParams
- type UsageRecordSummary
- type UsageRecordSummaryList
- type UsageRecordSummaryListParams
- type VerificationDocumentDetailsCode
- 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 = "2020-08-27" // 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" // 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.
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 APIConnectionError ¶
type APIConnectionError struct {
// contains filtered or unexported fields
}
APIConnectionError is a failure to connect to the Stripe API.
func (*APIConnectionError) Error ¶
func (e *APIConnectionError) Error() string
Error serializes the error object to JSON and returns it as a string.
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 Account ¶
type Account struct { APIResource BusinessProfile *AccountBusinessProfile `json:"business_profile"` BusinessType AccountBusinessType `json:"business_type"` Capabilities *AccountCapabilities `json:"capabilities"` ChargesEnabled bool `json:"charges_enabled"` Company *AccountCompany `json:"company"` Country string `json:"country"` Created int64 `json:"created"` DefaultCurrency Currency `json:"default_currency"` Deleted bool `json:"deleted"` DetailsSubmitted bool `json:"details_submitted"` Email string `json:"email"` ExternalAccounts *ExternalAccountList `json:"external_accounts"` ID string `json:"id"` Individual *Person `json:"individual"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` PayoutsEnabled bool `json:"payouts_enabled"` Requirements *AccountRequirements `json:"requirements"` Settings *AccountSettings `json:"settings"` TOSAcceptance *AccountTOSAcceptance `json:"tos_acceptance"` Type AccountType `json:"type"` }
Account is the resource representing your Stripe account. For more details see https://stripe.com/docs/api/#account.
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 AccountAddress ¶
type AccountAddress 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"` // Town/cho-me. Note that this is only used for Kana/Kanji representations // of an address. Town string `json:"town"` }
AccountAddress is the structure for an account address.
type AccountAddressParams ¶
type AccountAddressParams 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"` // Town/cho-me. Note that this is only used for Kana/Kanji representations // of an address. Town *string `form:"town"` }
AccountAddressParams represents an address during account creation/updates.
type AccountBusinessProfile ¶
type AccountBusinessProfile struct { MCC string `json:"mcc"` Name string `json:"name"` ProductDescription string `json:"product_description"` SupportAddress *Address `json:"support_address"` SupportEmail string `json:"support_email"` SupportPhone string `json:"support_phone"` SupportURL string `json:"support_url"` URL string `json:"url"` }
AccountBusinessProfile represents optional information related to the business.
type AccountBusinessProfileParams ¶
type AccountBusinessProfileParams struct { MCC *string `form:"mcc"` Name *string `form:"name"` ProductDescription *string `form:"product_description"` SupportAddress *AddressParams `form:"support_address"` SupportEmail *string `form:"support_email"` SupportPhone *string `form:"support_phone"` SupportURL *string `form:"support_url"` URL *string `form:"url"` }
AccountBusinessProfileParams are the parameters allowed for an account's business information
type AccountBusinessType ¶
type AccountBusinessType string
AccountBusinessType describes the business type associated with an account.
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 { AUBECSDebitPayments AccountCapabilityStatus `json:"au_becs_debit_payments"` BACSDebitPayments AccountCapabilityStatus `json:"bacs_debit_payments"` BancontactPayments AccountCapabilityStatus `json:"bancontact_payments"` CardIssuing AccountCapabilityStatus `json:"card_issuing"` CardPayments AccountCapabilityStatus `json:"card_payments"` CartesBancairesPayments AccountCapabilityStatus `json:"cartes_bancaires_payments"` EPSPayments AccountCapabilityStatus `json:"eps_payments"` FPXPayments AccountCapabilityStatus `json:"fpx_payments"` GiropayPayments AccountCapabilityStatus `json:"giropay_payments"` GrabpayPayments AccountCapabilityStatus `json:"grabpay_payments"` IdealPayments AccountCapabilityStatus `json:"ideal_payments"` JCBPayments AccountCapabilityStatus `json:"jcb_payments"` LegacyPayments AccountCapabilityStatus `json:"legacy_payments"` OXXOPayments AccountCapabilityStatus `json:"oxxo_payments"` P24Payments AccountCapabilityStatus `json:"p24_payments"` SEPADebitPayments AccountCapabilityStatus `json:"sepa_debit_payments"` SofortPayments AccountCapabilityStatus `json:"sofort_payments"` TaxReportingUS1099K AccountCapabilityStatus `json:"tax_reporting_us_1099_k"` TaxReportingUS1099MISC AccountCapabilityStatus `json:"tax_reporting_us_1099_misc"` Transfers AccountCapabilityStatus `json:"transfers"` }
AccountCapabilities is the resource representing the capabilities enabled on that account.
type AccountCapabilitiesAUBECSDebitPaymentsParams ¶
type AccountCapabilitiesAUBECSDebitPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesAUBECSDebitPaymentsParams represent allowed parameters to configure the AU BECS Debit capability on an account.
type AccountCapabilitiesBACSDebitPaymentsParams ¶
type AccountCapabilitiesBACSDebitPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesBACSDebitPaymentsParams represent allowed parameters to configure the BACS Debit capability on an account.
type AccountCapabilitiesBancontactPaymentsParams ¶ added in v72.10.0
type AccountCapabilitiesBancontactPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesBancontactPaymentsParams represent allowed parameters to configure the bancontact payments capability on an account.
type AccountCapabilitiesCardIssuingParams ¶
type AccountCapabilitiesCardIssuingParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesCardIssuingParams represent allowed parameters to configure the Issuing capability on an account.
type AccountCapabilitiesCardPaymentsParams ¶
type AccountCapabilitiesCardPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesCardPaymentsParams represent allowed parameters to configure the card payments capability on an account.
type AccountCapabilitiesCartesBancairesPaymentsParams ¶
type AccountCapabilitiesCartesBancairesPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesCartesBancairesPaymentsParams represent allowed parameters to configure the Cartes Bancaires payments capability on an account.
type AccountCapabilitiesEPSPaymentsParams ¶ added in v72.10.0
type AccountCapabilitiesEPSPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesEPSPaymentsParams represent allowed parameters to configure the EPS payments capability on an account.
type AccountCapabilitiesFPXPaymentsParams ¶
type AccountCapabilitiesFPXPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesFPXPaymentsParams represent allowed parameters to configure the FPX payments capability on an account.
type AccountCapabilitiesGiropayPaymentsParams ¶ added in v72.10.0
type AccountCapabilitiesGiropayPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesGiropayPaymentsParams represent allowed parameters to configure the giropay payments capability on an account.
type AccountCapabilitiesGrabpayPaymentsParams ¶ added in v72.25.0
type AccountCapabilitiesGrabpayPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesGrabpayPaymentsParams represent allowed parameters to configure the grabpay payments capability on an account.
type AccountCapabilitiesIdealPaymentsParams ¶ added in v72.10.0
type AccountCapabilitiesIdealPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesIdealPaymentsParams represent allowed parameters to configure the ideal payments capability on an account.
type AccountCapabilitiesJCBPaymentsParams ¶
type AccountCapabilitiesJCBPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesJCBPaymentsParams represent allowed parameters to configure the JCB payments capability on an account.
type AccountCapabilitiesLegacyPaymentsParams ¶
type AccountCapabilitiesLegacyPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesLegacyPaymentsParams represent allowed parameters to configure the legacy payments capability on an account.
type AccountCapabilitiesOXXOPaymentsParams ¶ added in v72.8.0
type AccountCapabilitiesOXXOPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesOXXOPaymentsParams represent allowed parameters to configure the OXXO capability on an account.
type AccountCapabilitiesP24PaymentsParams ¶ added in v72.10.0
type AccountCapabilitiesP24PaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesP24PaymentsParams represent allowed parameters to configure the P24 payments capability on an account.
type AccountCapabilitiesParams ¶
type AccountCapabilitiesParams struct { AUBECSDebitPayments *AccountCapabilitiesAUBECSDebitPaymentsParams `form:"au_becs_debit_payments"` BACSDebitPayments *AccountCapabilitiesBACSDebitPaymentsParams `form:"bacs_debit_payments"` BancontactPayments *AccountCapabilitiesBancontactPaymentsParams `form:"bancontact_payments"` CardIssuing *AccountCapabilitiesCardIssuingParams `form:"card_issuing"` CardPayments *AccountCapabilitiesCardPaymentsParams `form:"card_payments"` CartesBancairesPayments *AccountCapabilitiesCartesBancairesPaymentsParams `form:"cartes_bancaires_payments"` EPSPayments *AccountCapabilitiesEPSPaymentsParams `form:"eps_payments"` FPXPayments *AccountCapabilitiesFPXPaymentsParams `form:"fpx_payments"` GiropayPayments *AccountCapabilitiesGiropayPaymentsParams `form:"giropay_payments"` GrabpayPayments *AccountCapabilitiesGrabpayPaymentsParams `form:"grabpay_payments"` IdealPayments *AccountCapabilitiesIdealPaymentsParams `form:"ideal_payments"` JCBPayments *AccountCapabilitiesJCBPaymentsParams `form:"jcb_payments"` LegacyPayments *AccountCapabilitiesLegacyPaymentsParams `form:"legacy_payments"` OXXOPayments *AccountCapabilitiesOXXOPaymentsParams `form:"oxxo_payments"` P24Payments *AccountCapabilitiesP24PaymentsParams `form:"p24_payments"` SEPADebitPayments *AccountCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments"` SofortPayments *AccountCapabilitiesSofortPaymentsParams `form:"sofort_payments"` TaxReportingUS1099K *AccountCapabilitiesTaxReportingUS1099KParams `form:"tax_reporting_us_1099_k"` TaxReportingUS1099MISC *AccountCapabilitiesTaxReportingUS1099MISCParams `form:"tax_reporting_us_1099_misc"` Transfers *AccountCapabilitiesTransfersParams `form:"transfers"` }
AccountCapabilitiesParams represent allowed parameters to configure capabilities on an account.
type AccountCapabilitiesSEPADebitPaymentsParams ¶ added in v72.10.0
type AccountCapabilitiesSEPADebitPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesSEPADebitPaymentsParams represent allowed parameters to configure the SEPA Debit payments capability on an account.
type AccountCapabilitiesSofortPaymentsParams ¶ added in v72.10.0
type AccountCapabilitiesSofortPaymentsParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesSofortPaymentsParams represent allowed parameters to configure the sofort payments capability on an account.
type AccountCapabilitiesTaxReportingUS1099KParams ¶
type AccountCapabilitiesTaxReportingUS1099KParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesTaxReportingUS1099KParams represent allowed parameters to configure the 1099-K capability on an account.
type AccountCapabilitiesTaxReportingUS1099MISCParams ¶
type AccountCapabilitiesTaxReportingUS1099MISCParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesTaxReportingUS1099MISCParams represent allowed parameters to configure the 1099-Misc capability on an account.
type AccountCapabilitiesTransfersParams ¶
type AccountCapabilitiesTransfersParams struct {
Requested *bool `form:"requested"`
}
AccountCapabilitiesTransfersParams represent allowed parameters to configure the transfers capability on an account.
type AccountCapability ¶
type AccountCapability string
AccountCapability maps to a given capability for an account.
const ( AccountCapabilityAUBECSDebitPayments AccountCapability = "au_becs_debit_payments" AccountCapabilityBACSDebitPayments AccountCapability = "bacs_debit_payments" AccountCapabilityBancontactPayments AccountCapability = "bancontact_payments" AccountCapabilityCardIssuing AccountCapability = "card_issuing" AccountCapabilityCardPayments AccountCapability = "card_payments" AccountCapabilityCartesBancairesPayments AccountCapability = "cartes_bancaires_payments" AccountCapabilityEPSPayments AccountCapability = "eps_payments" AccountCapabilityFPXPayments AccountCapability = "fpx_payments" AccountCapabilityGiropayPayments AccountCapability = "giropay_payments" AccountCapabilityGrabpayPayments AccountCapability = "grabpay_payments" AccountCapabilityIdealPayments AccountCapability = "ideal_payments" AccountCapabilityJCBPayments AccountCapability = "jcb_payments" AccountCapabilityLegacyPayments AccountCapability = "legacy_payments" AccountCapabilityOXXOPayments AccountCapability = "oxxo_payments" AccountCapabilityP24Payments AccountCapability = "p24_payments" AccountCapabilitySEPADebitPayments AccountCapability = "sepa_debit_payments" AccountCapabilitySofortPayments AccountCapability = "sofort_payments" AccountCapabilityTaxReportingUS1099K AccountCapability = "tax_reporting_us_1099_k" AccountCapabilityTaxReportingUS1099MISC AccountCapability = "tax_reporting_us_1099_misc" AccountCapabilityTransfers AccountCapability = "transfers" )
List of values that AccountCapability can take.
type AccountCapabilityStatus ¶
type AccountCapabilityStatus string
AccountCapabilityStatus is the status a given capability can have
const ( AccountCapabilityStatusActive AccountCapabilityStatus = "active" AccountCapabilityStatusInactive AccountCapabilityStatus = "inactive" AccountCapabilityStatusPending AccountCapabilityStatus = "pending" )
List of values that AccountCapabilityStatus can take.
type AccountCompany ¶
type AccountCompany struct { Address *AccountAddress `json:"address"` AddressKana *AccountAddress `json:"address_kana"` AddressKanji *AccountAddress `json:"address_kanji"` DirectorsProvided bool `json:"directors_provided"` ExecutivesProvided bool `json:"executives_provided"` Name string `json:"name"` NameKana string `json:"name_kana"` NameKanji string `json:"name_kanji"` OwnersProvided bool `json:"owners_provided"` Phone string `json:"phone"` RegistrationNumber string `json:"registration_number"` Structure AccountCompanyStructure `json:"structure"` TaxIDProvided bool `json:"tax_id_provided"` TaxIDRegistrar string `json:"tax_id_registrar"` VATIDProvided bool `json:"vat_id_provided"` Verification *AccountCompanyVerification `json:"verification"` }
AccountCompany represents details about the company or business associated with the account.
type AccountCompanyParams ¶
type AccountCompanyParams struct { Address *AccountAddressParams `form:"address"` AddressKana *AccountAddressParams `form:"address_kana"` AddressKanji *AccountAddressParams `form:"address_kanji"` DirectorsProvided *bool `form:"directors_provided"` ExecutivesProvided *bool `form:"executives_provided"` Name *string `form:"name"` NameKana *string `form:"name_kana"` NameKanji *string `form:"name_kanji"` OwnersProvided *bool `form:"owners_provided"` RegistrationNumber *string `form:"registration_number"` Structure *string `form:"structure"` Phone *string `form:"phone"` TaxID *string `form:"tax_id"` TaxIDRegistrar *string `form:"tax_id_registrar"` VATID *string `form:"vat_id"` Verification *AccountCompanyVerificationParams `form:"verification"` }
AccountCompanyParams are the parameters describing the company associated with the account.
type AccountCompanyStructure ¶
type AccountCompanyStructure string
AccountCompanyStructure describes the structure associated with a company.
const ( AccountCompanyStructureGovernmentInstrumentality AccountCompanyStructure = "government_instrumentality" AccountCompanyStructureGovernmentalUnit AccountCompanyStructure = "governmental_unit" AccountCompanyStructureIncorporatedNonProfit AccountCompanyStructure = "incorporated_non_profit" AccountCompanyStructureLimitedLiabilityPartnership AccountCompanyStructure = "limited_liability_partnership" 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" AccountCompanyStructureSoleProprietorship AccountCompanyStructure = "sole_proprietorship" AccountCompanyStructureTaxExemptGovernmentInstrumentality AccountCompanyStructure = "tax_exempt_government_instrumentality" AccountCompanyStructureUnincorporatedAssociation AccountCompanyStructure = "unincorporated_association" AccountCompanyStructureUnincorporatedNonProfit AccountCompanyStructure = "unincorporated_non_profit" )
List of values that AccountCompanyStructure can take.
type AccountCompanyVerification ¶
type AccountCompanyVerification struct {
Document *AccountCompanyVerificationDocument `json:"document"`
}
AccountCompanyVerification represents details about a company's verification state.
type AccountCompanyVerificationDocument ¶
type AccountCompanyVerificationDocument struct { Back *File `json:"back"` Details string `json:"details"` DetailsCode AccountCompanyVerificationDocumentDetailsCode `json:"details_code"` Front *File `json:"front"` }
AccountCompanyVerificationDocument represents details about a company's verification state.
type AccountCompanyVerificationDocumentDetailsCode ¶
type AccountCompanyVerificationDocumentDetailsCode string
AccountCompanyVerificationDocumentDetailsCode is a machine-readable code specifying the verification state of a document associated with a company.
const ( AccountCompanyVerificationDocumentDetailsCodeDocumentCorrupt AccountCompanyVerificationDocumentDetailsCode = "document_corrupt" AccountCompanyVerificationDocumentDetailsCodeDocumentFailedCopy AccountCompanyVerificationDocumentDetailsCode = "document_failed_copy" AccountCompanyVerificationDocumentDetailsCodeDocumentFailedOther AccountCompanyVerificationDocumentDetailsCode = "document_failed_other" AccountCompanyVerificationDocumentDetailsCodeDocumentFailedTestMode AccountCompanyVerificationDocumentDetailsCode = "document_failed_test_mode" AccountCompanyVerificationDocumentDetailsCodeDocumentFraudulent AccountCompanyVerificationDocumentDetailsCode = "document_fraudulent" AccountCompanyVerificationDocumentDetailsCodeDocumentInvalid AccountCompanyVerificationDocumentDetailsCode = "document_invalid" AccountCompanyVerificationDocumentDetailsCodeDocumentManipulated AccountCompanyVerificationDocumentDetailsCode = "document_manipulated" AccountCompanyVerificationDocumentDetailsCodeDocumentNotReadable AccountCompanyVerificationDocumentDetailsCode = "document_not_readable" AccountCompanyVerificationDocumentDetailsCodeDocumentNotUploaded AccountCompanyVerificationDocumentDetailsCode = "document_not_uploaded" AccountCompanyVerificationDocumentDetailsCodeDocumentTooLarge AccountCompanyVerificationDocumentDetailsCode = "document_too_large" )
List of values that AccountCompanyVerificationDocumentDetailsCode can take.
type AccountCompanyVerificationDocumentParams ¶
type AccountCompanyVerificationDocumentParams struct { Back *string `form:"back"` Front *string `form:"front"` }
AccountCompanyVerificationDocumentParams are the parameters allowed to pass for a document verifying a company.
type AccountCompanyVerificationParams ¶
type AccountCompanyVerificationParams struct {
Document *AccountCompanyVerificationDocumentParams `form:"document"`
}
AccountCompanyVerificationParams are the parameters allowed to verify a company.
type AccountDeclineOn ¶
type AccountDeclineOn struct { AVSFailure bool `json:"avs_failure"` CVCFailure bool `json:"cvc_failure"` }
AccountDeclineOn represents card charges decline behavior for that account.
type AccountDeclineSettingsParams ¶
type AccountDeclineSettingsParams struct { AVSFailure *bool `form:"avs_failure"` CVCFailure *bool `form:"cvc_failure"` }
AccountDeclineSettingsParams represents the parameters allowed for configuring card declines on connected accounts.
type AccountDocumentsBankAccountOwnershipVerificationParams ¶ added in v72.28.0
type AccountDocumentsBankAccountOwnershipVerificationParams struct {
Files []*string `form:"files"`
}
AccountDocumentsBankAccountOwnershipVerificationParams represents the parameters allowed for passing bank account ownership verification documents on an account.
type AccountDocumentsCompanyLicenseParams ¶ added in v72.29.0
type AccountDocumentsCompanyLicenseParams struct {
Files []*string `form:"files"`
}
AccountDocumentsCompanyLicenseParams represents the parameters allowed for passing company license verification documents on an account.
type AccountDocumentsCompanyMemorandumOfAssociationParams ¶ added in v72.29.0
type AccountDocumentsCompanyMemorandumOfAssociationParams struct {
Files []*string `form:"files"`
}
AccountDocumentsCompanyMemorandumOfAssociationParams represents the parameters allowed for passing company memorandum of association documents on an account.
type AccountDocumentsCompanyMinisterialDecreeParams ¶ added in v72.29.0
type AccountDocumentsCompanyMinisterialDecreeParams struct {
Files []*string `form:"files"`
}
AccountDocumentsCompanyMinisterialDecreeParams represents the parameters allowed for passing company ministerial decree documents on an account.
type AccountDocumentsCompanyRegistrationVerificationParams ¶ added in v72.29.0
type AccountDocumentsCompanyRegistrationVerificationParams struct {
Files []*string `form:"files"`
}
AccountDocumentsCompanyRegistrationVerificationParams represents the parameters allowed for passing company registration verification documents.
type AccountDocumentsCompanyTaxIDVerificationParams ¶ added in v72.29.0
type AccountDocumentsCompanyTaxIDVerificationParams struct {
Files []*string `form:"files"`
}
AccountDocumentsCompanyTaxIDVerificationParams represents the parameters allowed for passing company tax id verification documents on an account.
type AccountDocumentsParams ¶ added in v72.28.0
type AccountDocumentsParams struct { BankAccountOwnershipVerification *AccountDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"` CompanyLicense *AccountDocumentsCompanyLicenseParams `form:"company_license"` CompanyMemorandumOfAssocation *AccountDocumentsCompanyMemorandumOfAssociationParams `form:"company_memorandum_of_association"` CompanyMinisterialDecree *AccountDocumentsCompanyMinisterialDecreeParams `form:"company_ministerial_decree"` CompanyRegistrationVerification *AccountDocumentsCompanyRegistrationVerificationParams `form:"company_registration_verification"` CompanyTaxIDVerification *AccountDocumentsCompanyTaxIDVerificationParams `form:"company_tax_id_verification"` }
AccountDocumentsParams represents the parameters allowed for passing additional documents on an account.
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 AccountLink ¶
type AccountLink struct { APIResource Created int64 `json:"created"` ExpiresAt int64 `json:"expires_at"` Object string `json:"object"` URL string `json:"url"` }
AccountLink is the resource representing an account link. For more details see https://stripe.com/docs/api/#account_links.
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:"*"` Account *string `form:"account"` Collect *string `form:"collect"` RefreshURL *string `form:"refresh_url"` ReturnURL *string `form:"return_url"` Type *string `form:"type"` }
AccountLinkParams are the parameters allowed during an account link creation.
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 returned from a list endpoint.
type AccountListParams ¶
type AccountListParams struct {
ListParams `form:"*"`
}
AccountListParams are the parameters allowed during account listing.
type AccountParams ¶
type AccountParams struct { Params `form:"*"` AccountToken *string `form:"account_token"` BusinessProfile *AccountBusinessProfileParams `form:"business_profile"` BusinessType *string `form:"business_type"` Capabilities *AccountCapabilitiesParams `form:"capabilities"` Company *AccountCompanyParams `form:"company"` Country *string `form:"country"` DefaultCurrency *string `form:"default_currency"` Documents *AccountDocumentsParams `form:"documents"` Email *string `form:"email"` ExternalAccount *AccountExternalAccountParams `form:"external_account"` Individual *PersonParams `form:"individual"` Settings *AccountSettingsParams `form:"settings"` TOSAcceptance *AccountTOSAcceptanceParams `form:"tos_acceptance"` Type *string `form:"type"` // This parameter is deprecated. Prefer using Capabilities instead. RequestedCapabilities []*string `form:"requested_capabilities"` }
AccountParams are the parameters allowed during account creation/updates.
type AccountPayoutSchedule ¶
type AccountPayoutSchedule struct { DelayDays int64 `json:"delay_days"` Interval PayoutInterval `json:"interval"` MonthlyAnchor int64 `json:"monthly_anchor"` WeeklyAnchor string `json:"weekly_anchor"` }
AccountPayoutSchedule is the structure for an account's payout schedule.
type AccountRejectParams ¶
AccountRejectParams is the structure for the Reject function.
type AccountRejectReason ¶
type AccountRejectReason string
AccountRejectReason describes the valid reason to reject an account
const ( AccountRejectReasonFraud AccountRejectReason = "fraud" AccountRejectReasonOther AccountRejectReason = "other" AccountRejectReasonTermsOfService AccountRejectReason = "terms_of_service" )
List of values that AccountRejectReason can take.
type AccountRequirements ¶
type AccountRequirements struct { CurrentDeadline int64 `json:"current_deadline"` CurrentlyDue []string `json:"currently_due"` DisabledReason AccountRequirementsDisabledReason `json:"disabled_reason"` Errors []*AccountRequirementsError `json:"errors"` EventuallyDue []string `json:"eventually_due"` PastDue []string `json:"past_due"` PendingVerification []string `json:"pending_verification"` }
AccountRequirements represents information that needs to be collected for an account.
type AccountRequirementsDisabledReason ¶
type AccountRequirementsDisabledReason string
AccountRequirementsDisabledReason describes why an account is disabled.
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 { Code string `json:"code"` Reason string `json:"reason"` Requirement string `json:"requirement"` }
AccountRequirementsError represents details about an error with a requirement.
type AccountSettings ¶
type AccountSettings struct { BACSDebitPayments *AccountSettingsBACSDebitPayments `json:"bacs_debit_payments"` Branding *AccountSettingsBranding `json:"branding"` CardPayments *AccountSettingsCardPayments `json:"card_payments"` Dashboard *AccountSettingsDashboard `json:"dashboard"` Payments *AccountSettingsPayments `json:"payments"` Payouts *AccountSettingsPayouts `json:"payouts"` SEPADebitPayments *AccountSettingsSEPADebitPayments `json:"sepa_debit_payments"` }
AccountSettings represents options for customizing how the account functions within Stripe.
type AccountSettingsBACSDebitPayments ¶
type AccountSettingsBACSDebitPayments struct {
DisplayName string `json:"display_name"`
}
AccountSettingsBACSDebitPayments represents settings specific to the account’s charging via BACS Debit.
type AccountSettingsBACSDebitPaymentsParams ¶
type AccountSettingsBACSDebitPaymentsParams struct {
DisplayName *string `form:"display_name"`
}
AccountSettingsBACSDebitPaymentsParams represent allowed parameters to configure settings specific to BACS Debit charging on the account.
type AccountSettingsBranding ¶
type AccountSettingsBranding struct { Icon *File `json:"icon"` Logo *File `json:"logo"` PrimaryColor string `json:"primary_color"` SecondaryColor string `json:"secondary_color"` }
AccountSettingsBranding represents settings specific to the account's branding.
type AccountSettingsBrandingParams ¶
type AccountSettingsBrandingParams struct { Icon *string `form:"icon"` Logo *string `form:"logo"` PrimaryColor *string `form:"primary_color"` SecondaryColor *string `form:"secondary_color"` }
AccountSettingsBrandingParams represent allowed parameters to configure settings specific to the account’s branding.
type AccountSettingsCardPayments ¶
type AccountSettingsCardPayments struct { DeclineOn *AccountDeclineOn `json:"decline_on"` StatementDescriptorPrefix string `json:"statement_descriptor_prefix"` }
AccountSettingsCardPayments represents settings specific to card charging on the account.
type AccountSettingsCardPaymentsParams ¶
type AccountSettingsCardPaymentsParams struct { DeclineOn *AccountDeclineSettingsParams `form:"decline_on"` StatementDescriptorPrefix *string `form:"statement_descriptor_prefix"` }
AccountSettingsCardPaymentsParams represent allowed parameters to configure settings specific to card charging on the account.
type AccountSettingsDashboard ¶
type AccountSettingsDashboard struct { DisplayName string `json:"display_name"` Timezone string `json:"timezone"` }
AccountSettingsDashboard represents settings specific to the account's Dashboard.
type AccountSettingsDashboardParams ¶
type AccountSettingsDashboardParams struct { DisplayName *string `form:"display_name"` Timezone *string `form:"timezone"` }
AccountSettingsDashboardParams represent allowed parameters to configure settings for the account's Dashboard.
type AccountSettingsParams ¶
type AccountSettingsParams struct { BACSDebitPayments *AccountSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"` Branding *AccountSettingsBrandingParams `form:"branding"` CardPayments *AccountSettingsCardPaymentsParams `form:"card_payments"` Dashboard *AccountSettingsDashboardParams `form:"dashboard"` Payments *AccountSettingsPaymentsParams `form:"payments"` Payouts *AccountSettingsPayoutsParams `form:"payouts"` }
AccountSettingsParams are the parameters allowed for the account's settings.
type AccountSettingsPayments ¶
type AccountSettingsPayments struct { StatementDescriptor string `json:"statement_descriptor"` StatementDescriptorKana string `json:"statement_descriptor_kana"` StatementDescriptorKanji string `json:"statement_descriptor_kanji"` }
AccountSettingsPayments represents settings that apply across payment methods for charging on the account.
type AccountSettingsPaymentsParams ¶
type AccountSettingsPaymentsParams struct { StatementDescriptor *string `form:"statement_descriptor"` StatementDescriptorKana *string `form:"statement_descriptor_kana"` StatementDescriptorKanji *string `form:"statement_descriptor_kanji"` }
AccountSettingsPaymentsParams represent allowed parameters to configure settings across payment methods for charging on the account.
type AccountSettingsPayouts ¶
type AccountSettingsPayouts struct { DebitNegativeBalances bool `json:"debit_negative_balances"` Schedule *AccountPayoutSchedule `json:"schedule"` StatementDescriptor string `json:"statement_descriptor"` }
AccountSettingsPayouts represents settings specific to the account’s payouts.
type AccountSettingsPayoutsParams ¶
type AccountSettingsPayoutsParams struct { DebitNegativeBalances *bool `form:"debit_negative_balances"` Schedule *PayoutScheduleParams `form:"schedule"` StatementDescriptor *string `form:"statement_descriptor"` }
AccountSettingsPayoutsParams represent allowed parameters to configure settings specific to the account’s payouts.
type AccountSettingsSEPADebitPayments ¶
type AccountSettingsSEPADebitPayments struct {
CreditorID string `json:"creditor_id"`
}
AccountSettingsSEPADebitPayments represents settings specific to the account’s charging via SEPA Debit.
type AccountTOSAcceptance ¶
type AccountTOSAcceptance struct { Date int64 `json:"date"` IP string `json:"ip"` UserAgent string `json:"user_agent"` ServiceAgreement AccountTOSAcceptanceServiceAgreement `json:"service_agreement"` }
AccountTOSAcceptance represents status of acceptance of our terms of services for the account.
type AccountTOSAcceptanceParams ¶
type AccountTOSAcceptanceParams struct { Date *int64 `form:"date"` IP *string `form:"ip"` UserAgent *string `form:"user_agent"` ServiceAgreement *string `form:"service_agreement"` }
AccountTOSAcceptanceParams represents tos_acceptance during account creation/updates.
type AccountTOSAcceptanceServiceAgreement ¶
type AccountTOSAcceptanceServiceAgreement string
AccountTOSAcceptanceServiceAgreement describes the TOS Service agreement of an account
const ( AccountTOSAcceptanceServiceAgreementFull AccountTOSAcceptanceServiceAgreement = "full" AccountTOSAcceptanceServiceAgreementRecipient AccountTOSAcceptanceServiceAgreement = "recipient" )
List of values that AccountTOSAcceptanceServiceAgreement can take.
type AccountType ¶
type AccountType string
AccountType is the type of an account.
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 { Currency Currency `json:"currency"` SourceTypes map[BalanceSourceType]int64 `json:"source_types"` Value int64 `json:"amount"` }
Amount is a structure wrapping an amount value and its currency.
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 Created int64 `json:"created"` Deleted bool `json:"deleted"` DomainName string `json:"domain_name"` ID string `json:"id"` Livemode bool `json:"livemode"` Object string `json:"object"` }
ApplePayDomain is the resource representing a Stripe ApplePayDomain object
type ApplePayDomainList ¶
type ApplePayDomainList struct { APIResource ListMeta Data []*ApplePayDomain `json:"data"` }
ApplePayDomainList is a list of ApplePayDomains as returned from a list endpoint.
type ApplePayDomainListParams ¶
type ApplePayDomainListParams struct { ListParams `form:"*"` DomainName *string `form:"domain_name"` }
ApplePayDomainListParams are the parameters allowed during ApplePayDomain listing.
type ApplePayDomainParams ¶
ApplePayDomainParams is the set of parameters that can be used when creating an ApplePayDomain object.
type Application ¶
type Application struct { ID string `json:"id"` Name string `json:"name"` Object string `json:"object"` }
Application describes the properties for an Application.
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 Account *Account `json:"account"` Amount int64 `json:"amount"` AmountRefunded int64 `json:"amount_refunded"` Application string `json:"application"` BalanceTransaction *BalanceTransaction `json:"balance_transaction"` Charge *Charge `json:"charge"` Created int64 `json:"created"` Currency Currency `json:"currency"` ID string `json:"id"` Livemode bool `json:"livemode"` OriginatingTransaction *Charge `json:"originating_transaction"` Refunded bool `json:"refunded"` Refunds *FeeRefundList `json:"refunds"` }
ApplicationFee is the resource representing a Stripe application fee. For more details see https://stripe.com/docs/api#application_fees.
func (*ApplicationFee) UnmarshalJSON ¶
func (f *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 application fees as retrieved from a list endpoint.
type ApplicationFeeListParams ¶
type ApplicationFeeListParams struct { ListParams `form:"*"` Charge *string `form:"charge"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` }
ApplicationFeeListParams is the set of parameters that can be used when listing application fees. For more details see https://stripe.com/docs/api#list_application_fees.
type ApplicationFeeParams ¶
type ApplicationFeeParams struct {
Params `form:"*"`
}
ApplicationFeeParams is the set of parameters that can be used when refunding an application fee. For more details see https://stripe.com/docs/api#refund_application_fee.
type AuthenticationError ¶
type AuthenticationError struct {
// contains filtered or unexported fields
}
AuthenticationError is a failure to properly authenticate during a request.
func (*AuthenticationError) Error ¶
func (e *AuthenticationError) Error() string
Error serializes the error object to JSON and returns it as a string.
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 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) 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) 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. You should only need to use this for testing purposes or on App Engine.
type Balance ¶
type Balance struct { APIResource Available []*Amount `json:"available"` ConnectReserved []*Amount `json:"connect_reserved"` InstantAvailable []*Amount `json:"instant_available"` Issuing *BalanceDetails `json:"issuing"` Livemode bool `json:"livemode"` Object string `json:"object"` Pending []*Amount `json:"pending"` }
Balance is the resource representing your Stripe balance. For more details see https://stripe.com/docs/api/#balance.
type BalanceDetails ¶
type BalanceDetails struct {
Available []*Amount `json:"available"`
}
BalanceDetails is the resource representing details about a specific product's balance.
type BalanceParams ¶
type BalanceParams struct {
Params `form:"*"`
}
BalanceParams is the set of parameters that can be used when retrieving a balance. For more details see https://stripe.com/docs/api#balance.
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 Amount int64 `json:"amount"` AvailableOn int64 `json:"available_on"` Created int64 `json:"created"` Currency Currency `json:"currency"` Description string `json:"description"` ExchangeRate float64 `json:"exchange_rate"` ID string `json:"id"` Fee int64 `json:"fee"` FeeDetails []*BalanceTransactionFee `json:"fee_details"` Net int64 `json:"net"` ReportingCategory BalanceTransactionReportingCategory `json:"reporting_category"` Source *BalanceTransactionSource `json:"source"` Status BalanceTransactionStatus `json:"status"` Type BalanceTransactionType `json:"type"` }
BalanceTransaction is the resource representing the balance transaction. For more details see https://stripe.com/docs/api/#balance.
func (*BalanceTransaction) UnmarshalJSON ¶
func (t *BalanceTransaction) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a Transaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type BalanceTransactionFee ¶
type BalanceTransactionFee struct { Amount int64 `json:"amount"` Application string `json:"application"` Currency Currency `json:"currency"` Description string `json:"description"` Type string `json:"type"` }
BalanceTransactionFee is a structure that breaks down the fees in a transaction.
type BalanceTransactionList ¶
type BalanceTransactionList struct { APIResource ListMeta Data []*BalanceTransaction `json:"data"` }
BalanceTransactionList is a list of transactions as returned from a list endpoint.
type BalanceTransactionListParams ¶
type BalanceTransactionListParams struct { ListParams `form:"*"` AvailableOn *int64 `form:"available_on"` AvailableOnRange *RangeQueryParams `form:"available_on"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Currency *string `form:"currency"` Payout *string `form:"payout"` Source *string `form:"source"` Type *string `form:"type"` }
BalanceTransactionListParams is the set of parameters that can be used when listing balance transactions. For more details see https://stripe.com/docs/api/#balance_history.
type BalanceTransactionParams ¶
type BalanceTransactionParams struct {
Params `form:"*"`
}
BalanceTransactionParams is the set of parameters that can be used when retrieving a transaction. For more details see https://stripe.com/docs/api#retrieve_balance_transaction.
type BalanceTransactionReportingCategory ¶
type BalanceTransactionReportingCategory string
BalanceTransactionReportingCategory represents reporting categories for balance transactions.
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 { ApplicationFee *ApplicationFee `json:"-"` Charge *Charge `json:"-"` Dispute *Dispute `json:"-"` ID string `json:"id"` IssuingAuthorization *IssuingAuthorization `json:"-"` IssuingDispute *IssuingDispute `json:"-"` IssuingTransaction *IssuingAuthorization `json:"-"` Payout *Payout `json:"-"` Refund *Refund `json:"-"` Reversal *Reversal `json:"-"` Transfer *Transfer `json:"-"` Type BalanceTransactionSourceType `json:"object"` }
BalanceTransactionSource describes the source of a balance Transaction. The Type should indicate which object is fleshed out. For more details see https://stripe.com/docs/api#retrieve_balance_transaction
func (*BalanceTransactionSource) UnmarshalJSON ¶
func (s *BalanceTransactionSource) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a BalanceTransactionSource. This custom unmarshaling is needed because the specific type of transaction source it refers to is specified in the JSON
type BalanceTransactionSourceType ¶
type BalanceTransactionSourceType string
BalanceTransactionSourceType consts represent valid balance transaction sources.
const ( BalanceTransactionSourceTypeApplicationFee BalanceTransactionSourceType = "application_fee" BalanceTransactionSourceTypeCharge BalanceTransactionSourceType = "charge" BalanceTransactionSourceTypeDispute BalanceTransactionSourceType = "dispute" BalanceTransactionSourceTypeIssuingAuthorization BalanceTransactionSourceType = "issuing.authorization" BalanceTransactionSourceTypeIssuingDispute BalanceTransactionSourceType = "issuing.dispute" BalanceTransactionSourceTypeIssuingTransaction BalanceTransactionSourceType = "issuing.transaction" BalanceTransactionSourceTypePayout BalanceTransactionSourceType = "payout" BalanceTransactionSourceTypeRefund BalanceTransactionSourceType = "refund" BalanceTransactionSourceTypeReversal BalanceTransactionSourceType = "reversal" BalanceTransactionSourceTypeTransfer BalanceTransactionSourceType = "transfer" )
List of values that BalanceTransactionSourceType can take.
type BalanceTransactionStatus ¶
type BalanceTransactionStatus string
BalanceTransactionStatus is the list of allowed values for the balance transaction's status.
const ( BalanceTransactionStatusAvailable BalanceTransactionStatus = "available" BalanceTransactionStatusPending BalanceTransactionStatus = "pending" )
List of values that BalanceTransactionStatus can take.
type BalanceTransactionType ¶
type BalanceTransactionType string
BalanceTransactionType is the list of allowed values for the balance transaction's type.
const ( BalanceTransactionTypeAdjustment BalanceTransactionType = "adjustment" BalanceTransactionTypeAnticipationRepayment BalanceTransactionType = "anticipation_repayment" BalanceTransactionTypeApplicationFee BalanceTransactionType = "application_fee" BalanceTransactionTypeApplicationFeeRefund BalanceTransactionType = "application_fee_refund" BalanceTransactionTypeCharge BalanceTransactionType = "charge" BalanceTransactionTypeContribution BalanceTransactionType = "contribution" BalanceTransactionTypeIssuingAuthorizationHold BalanceTransactionType = "issuing_authorization_hold" BalanceTransactionTypeIssuingAuthorizationRelease BalanceTransactionType = "issuing_authorization_release" BalanceTransactionTypeIssuingAuthorizationDispute BalanceTransactionType = "issuing_dispute" BalanceTransactionTypeIssuingAuthorizationTransaction BalanceTransactionType = "issuing_transaction" BalanceTransactionTypePayment BalanceTransactionType = "payment" BalanceTransactionTypePaymentFailureRefund BalanceTransactionType = "payment_failure_refund" BalanceTransactionTypePaymentRefund BalanceTransactionType = "payment_refund" BalanceTransactionTypePayout BalanceTransactionType = "payout" BalanceTransactionTypePayoutCancel BalanceTransactionType = "payout_cancel" BalanceTransactionTypePayoutFailure BalanceTransactionType = "payout_failure" BalanceTransactionTypeRefund BalanceTransactionType = "refund" BalanceTransactionTypeStripeFee BalanceTransactionType = "stripe_fee" BalanceTransactionTypeTransfer BalanceTransactionType = "transfer" BalanceTransactionTypeTransferRefund BalanceTransactionType = "transfer_refund" )
List of values that BalanceTransactionType can take.
type BankAccount ¶
type BankAccount struct { APIResource Account *Account `json:"account"` AccountHolderName string `json:"account_holder_name"` AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"` AvailablePayoutMethods []BankAccountAvailablePayoutMethod `json:"available_payout_methods"` BankName string `json:"bank_name"` Country string `json:"country"` Currency Currency `json:"currency"` Customer *Customer `json:"customer"` DefaultForCurrency bool `json:"default_for_currency"` Deleted bool `json:"deleted"` Fingerprint string `json:"fingerprint"` ID string `json:"id"` Last4 string `json:"last4"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` RoutingNumber string `json:"routing_number"` Status BankAccountStatus `json:"status"` }
BankAccount represents a Stripe bank account.
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
BankAccountAccountHolderType is the list of allowed values for the bank account holder type.
const ( BankAccountAccountHolderTypeCompany BankAccountAccountHolderType = "company" BankAccountAccountHolderTypeIndividual BankAccountAccountHolderType = "individual" )
List of values that BankAccountAccountHolderType can take.
type BankAccountAvailablePayoutMethod ¶ added in v72.1.0
type BankAccountAvailablePayoutMethod string
BankAccountAvailablePayoutMethod is a set of available payout methods for the card.
const ( BankAccountAvailablePayoutMethodInstant BankAccountAvailablePayoutMethod = "instant" BankAccountAvailablePayoutMethodStandard BankAccountAvailablePayoutMethod = "standard" )
List of values that CardAvailablePayoutMethod can take.
type BankAccountList ¶
type BankAccountList struct { APIResource ListMeta Data []*BankAccount `json:"data"` }
BankAccountList is a list object for bank accounts.
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:"-"` // The identifier of the parent customer under which the bank accounts are // nested. Either Account or Customer should be populated. Customer *string `form:"-"` }
BankAccountListParams is the set of parameters that can be used when listing bank accounts.
type BankAccountParams ¶
type BankAccountParams struct { Params `form:"*"` // Account is the identifier of the parent account under which bank // accounts are nested. Account *string `form:"-"` AccountHolderName *string `form:"account_holder_name"` AccountHolderType *string `form:"account_holder_type"` AccountNumber *string `form:"account_number"` Country *string `form:"country"` Currency *string `form:"currency"` Customer *string `form:"-"` DefaultForCurrency *bool `form:"default_for_currency"` RoutingNumber *string `form:"routing_number"` // Token is a token referencing an external account like one returned from // Stripe.js. Token *string `form:"-"` // ID is used when tokenizing a bank account for shared customers ID *string `form:"*"` }
BankAccountParams is the set of parameters that can be used when updating a bank account.
Note that while form annotations are used for updates, bank accounts have some unusual logic on creates that necessitates manual handling of all parameters. See AppendToAsSourceOrExternalAccount.
func (*BankAccountParams) AppendToAsSourceOrExternalAccount ¶
func (a *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 BankAccountStatus ¶
type BankAccountStatus string
BankAccountStatus is the list of allowed values for the bank account's status.
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 BillingDetails ¶
type BillingDetails struct { Address *Address `json:"address"` Email string `json:"email"` Name string `json:"name"` Phone string `json:"phone"` }
BillingDetails represents the billing details associated with a PaymentMethod.
type BillingDetailsParams ¶
type BillingDetailsParams struct { Address *AddressParams `form:"address"` Email *string `form:"email"` Name *string `form:"name"` Phone *string `form:"phone"` }
BillingDetailsParams is the set of parameters that can be used as billing details when creating or updating a PaymentMethod
type BillingPortalConfiguration ¶ added in v72.35.0
type BillingPortalConfiguration struct { APIResource Active bool `json:"active"` Application string `json:"application"` BusinessProfile *BillingPortalConfigurationBusinessProfile `json:"business_profile"` Created int64 `json:"created"` DefaultReturnURL string `json:"default_return_url"` Features *BillingPortalConfigurationFeatures `json:"features"` ID string `json:"id"` IsDefault bool `json:"is_default"` Livemode bool `json:"livemode"` Object string `json:"object"` Updated int64 `json:"updated"` }
BillingPortalConfiguration is a configuration that describes the functionality and behavior of a PortalSession. For more details see https://stripe.com/docs/api/customer_portal.
func (*BillingPortalConfiguration) UnmarshalJSON ¶ added in v72.35.0
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 ¶ added in v72.35.0
type BillingPortalConfigurationBusinessProfile struct { Headline string `json:"headline"` PrivacyPolicyURL string `json:"privacy_policy_url"` TermsOfServiceURL string `json:"terms_of_service_url"` }
BillingPortalConfigurationBusinessProfile represents the business profile details on a portal configuration.
type BillingPortalConfigurationBusinessProfileParams ¶ added in v72.35.0
type BillingPortalConfigurationBusinessProfileParams struct { Headline *string `form:"headline"` PrivacyPolicyURL *string `form:"privacy_policy_url"` TermsOfServiceURL *string `form:"terms_of_service_url"` }
BillingPortalConfigurationBusinessProfileParams lets you pass the business profile details associated with a portal configuration.
type BillingPortalConfigurationFeatures ¶ added in v72.35.0
type BillingPortalConfigurationFeatures struct { CustomerUpdate *BillingPortalConfigurationFeaturesCustomerUpdate `json:"customer_update"` InvoiceHistory *BillingPortalConfigurationFeaturesInvoiceHistory `json:"invoice_history"` PaymentMethodUpdate *BillingPortalConfigurationFeaturesPaymentMethodUpdate `json:"payment_method_update"` SubscriptionCancel *BillingPortalConfigurationFeaturesSubscriptionCancel `json:"subscription_cancel"` SubscriptionUpdate *BillingPortalConfigurationFeaturesSubscriptionUpdate `json:"subscription_update"` }
BillingPortalConfigurationFeatures represents details about the features enabled in the portal configuration.
type BillingPortalConfigurationFeaturesCustomerUpdate ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesCustomerUpdate struct { AllowedUpdates []BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate `json:"allowed_updates"` Enabled bool `json:"enabled"` }
BillingPortalConfigurationFeaturesCustomerUpdate represents the customer update details on a portal configuration.
type BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate string
BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate describes a type of customer updates that may be supported on a portal configuration
const ( BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateAddress BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "address" BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateEmail BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "email" BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdatePhone BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "phone" BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateShipping BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "shipping" BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateTaxID BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "tax_id" )
List of values that BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate can take.
type BillingPortalConfigurationFeaturesCustomerUpdateParams ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesCustomerUpdateParams struct { AllowedUpdates []*string `form:"allowed_updates"` Enabled *bool `form:"enabled"` }
BillingPortalConfigurationFeaturesCustomerUpdateParams lets you pass the customer update details on a portal configuration.
type BillingPortalConfigurationFeaturesInvoiceHistory ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesInvoiceHistory struct {
Enabled bool `json:"enabled"`
}
BillingPortalConfigurationFeaturesInvoiceHistory represents the invoice history details on a portal configuration.
type BillingPortalConfigurationFeaturesInvoiceHistoryParams ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesInvoiceHistoryParams struct {
Enabled *bool `form:"enabled"`
}
BillingPortalConfigurationFeaturesInvoiceHistoryParams lets you pass the invoice history details on a portal configuration.
type BillingPortalConfigurationFeaturesParams ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesParams struct { CustomerUpdate *BillingPortalConfigurationFeaturesCustomerUpdateParams `form:"customer_update"` InvoiceHistory *BillingPortalConfigurationFeaturesInvoiceHistoryParams `form:"invoice_history"` PaymentMethodUpdate *BillingPortalConfigurationFeaturesPaymentMethodUpdateParams `form:"payment_method_update"` SubscriptionCancel *BillingPortalConfigurationFeaturesSubscriptionCancelParams `form:"subscription_cancel"` SubscriptionUpdate *BillingPortalConfigurationFeaturesSubscriptionUpdateParams `form:"subscription_update"` }
BillingPortalConfigurationFeaturesParams lets you pass details about the features available in the portal.
type BillingPortalConfigurationFeaturesPaymentMethodUpdate ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesPaymentMethodUpdate struct {
Enabled bool `json:"enabled"`
}
BillingPortalConfigurationFeaturesPaymentMethodUpdate represents the payment method update details on a portal configuration.
type BillingPortalConfigurationFeaturesPaymentMethodUpdateParams ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesPaymentMethodUpdateParams struct {
Enabled *bool `form:"enabled"`
}
BillingPortalConfigurationFeaturesPaymentMethodUpdateParams lets you pass the payment method update details on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionCancel ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesSubscriptionCancel struct { Enabled bool `json:"enabled"` Mode BillingPortalConfigurationFeaturesSubscriptionCancelMode `json:"mode"` ProrationBehavior BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior `json:"proration_behavior"` }
BillingPortalConfigurationFeaturesSubscriptionCancel represents the subscription cancel details on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionCancelMode ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesSubscriptionCancelMode string
BillingPortalConfigurationFeaturesSubscriptionCancelMode describes 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 ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesSubscriptionCancelParams struct { Enabled *bool `form:"enabled"` Mode *string `form:"mode"` ProrationBehavior *string `form:"proration_behavior"` }
BillingPortalConfigurationFeaturesSubscriptionCancelParams lets you pass the subscription cancel deetails on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior string
BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior describes whether to create prorations when canceling subscriptions.
const ( BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorAlwaysInvoice BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "always_invoice" BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorCreateProrations BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "create_prorations" BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorNone BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "none" )
List of values that BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior can take.
type BillingPortalConfigurationFeaturesSubscriptionUpdate ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesSubscriptionUpdate struct { DefaultAllowedUpdates []BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate `json:"default_allowed_updates"` Enabled bool `json:"enabled"` Products []*BillingPortalConfigurationFeaturesSubscriptionUpdateProduct `json:"products"` ProrationBehavior BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior `json:"proration_behavior"` }
BillingPortalConfigurationFeaturesSubscriptionUpdate represents the subscription update details on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate string
BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate describes a type of subscription update that may be supported on a portal configuration.
const ( BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdatePrice BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate = "price" BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdatePromotionCode BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate = "promotion_code" BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdateQuantity BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate = "quantity" )
List of values that BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate can take.
type BillingPortalConfigurationFeaturesSubscriptionUpdateParams ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesSubscriptionUpdateParams struct { DefaultAllowedUpdates []*string `form:"default_allowed_updates"` Enabled *bool `form:"enabled"` Products []*BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams `form:"products"` ProrationBehavior *string `form:"proration_behavior"` }
BillingPortalConfigurationFeaturesSubscriptionUpdateParams lets you pass subscription update details on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionUpdateProduct ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesSubscriptionUpdateProduct struct { Prices []string `json:"prices"` Product string `json:"product"` }
BillingPortalConfigurationFeaturesSubscriptionUpdateProduct represents the subscription update details on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams struct { Prices []*string `form:"prices"` Product *string `form:"product"` }
BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams lets you pass product details on the subscription update on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior ¶ added in v72.35.0
type BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior string
BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior determines how to handle prorations resulting from subscription updates.
const ( BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehaviorAlwaysInvoice BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior = "always_invoice" BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehaviorCreateProrations BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior = "create_prorations" BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehaviorNone BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior = "none" )
List of values that BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior can take.
type BillingPortalConfigurationList ¶ added in v72.35.0
type BillingPortalConfigurationList struct { APIResource ListMeta Data []*BillingPortalConfiguration `json:"data"` }
BillingPortalConfigurationList is a list of portal configurations as returned from a list endpoint.
type BillingPortalConfigurationListParams ¶ added in v72.35.0
type BillingPortalConfigurationListParams struct { ListParams `form:"*"` Active *bool `form:"active"` IsDefault *bool `form:"is_default"` }
BillingPortalConfigurationListParams is the set of parameters that can be used when listing portal configurations.
type BillingPortalConfigurationParams ¶ added in v72.35.0
type BillingPortalConfigurationParams struct { Params `form:"*"` Active *bool `form:"active"` BusinessProfile *BillingPortalConfigurationBusinessProfileParams `form:"business_profile"` DefaultReturnURL *string `form:"default_return_url"` Features *BillingPortalConfigurationFeaturesParams `form:"features"` }
BillingPortalConfigurationParams is the set of parameters that can be passed when creating or updating a portal configuration.
type BillingPortalSession ¶
type BillingPortalSession struct { APIResource Created int64 `json:"created"` Configuration *BillingPortalConfiguration `json:"configuration"` Customer string `json:"customer"` ID string `json:"id"` Livemode bool `json:"livemode"` Object string `json:"object"` OnBehalfOf string `json:"on_behalf_of"` ReturnURL string `json:"return_url"` URL string `json:"url"` }
BillingPortalSession is the resource representing a billing portal session.
func (*BillingPortalSession) UnmarshalJSON ¶
func (p *BillingPortalSession) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a billing portal session. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type BillingPortalSessionParams ¶
type BillingPortalSessionParams struct { Params `form:"*"` Configuration *string `form:"configuration"` Customer *string `form:"customer"` OnBehalfOf *string `form:"on_behalf_of"` ReturnURL *string `form:"return_url"` }
BillingPortalSessionParams is the set of parameters that can be used when creating a billing portal session.
type Capability ¶
type Capability struct { APIResource Account *Account `json:"account"` ID string `json:"id"` Object string `json:"object"` Requested bool `json:"requested"` RequestedAt int64 `json:"requested_at"` Requirements *CapabilityRequirements `json:"requirements"` Status CapabilityStatus `json:"status"` }
Capability is the resource representing a Stripe capability. For more details see https://stripe.com/docs/api/capabilities
func (*Capability) UnmarshalJSON ¶
func (c *Capability) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a Capability. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type CapabilityDisabledReason ¶
type CapabilityDisabledReason string
CapabilityDisabledReason describes why a capability is disabled.
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 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 }
CapabilityListParams is the set of parameters that can be used when listing capabilities. For more detail see https://stripe.com/docs/api/capabilities/list
type CapabilityParams ¶
type CapabilityParams struct { Params `form:"*"` Account *string `form:"-"` // Included in URL Requested *bool `form:"requested"` }
CapabilityParams is the set of parameters that can be used when updating a capability. For more details see https://stripe.com/docs/api/capabilities/update
type CapabilityRequirements ¶
type CapabilityRequirements struct { CurrentDeadline int64 `json:"current_deadline"` CurrentlyDue []string `json:"currently_due"` DisabledReason CapabilityDisabledReason `json:"disabled_reason"` Errors []*AccountRequirementsError `json:"errors"` EventuallyDue []string `json:"eventually_due"` PastDue []string `json:"past_due"` PendingVerification []string `json:"pending_verification"` }
CapabilityRequirements represents information that needs to be collected for a capability.
type CapabilityStatus ¶
type CapabilityStatus string
CapabilityStatus describes the different statuses for a capability's status.
const ( CapabilityStatusActive CapabilityStatus = "active" CapabilityStatusInactive CapabilityStatus = "inactive" CapabilityStatusPending CapabilityStatus = "pending" CapabilityStatusUnrequested CapabilityStatus = "unrequested" )
List of values that CapabilityStatus can take.
type CaptureParams ¶
type CaptureParams struct { Params `form:"*"` Amount *int64 `form:"amount"` ApplicationFeeAmount *int64 `form:"application_fee_amount"` ExchangeRate *float64 `form:"exchange_rate"` ReceiptEmail *string `form:"receipt_email"` StatementDescriptor *string `form:"statement_descriptor"` StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` TransferGroup *string `form:"transfer_group"` TransferData *ChargeTransferDataParams `form:"transfer_data"` }
CaptureParams is the set of parameters that can be used when capturing a charge.
type Card ¶
type Card struct { APIResource AddressCity string `json:"address_city"` AddressCountry string `json:"address_country"` AddressLine1 string `json:"address_line1"` AddressLine1Check CardVerification `json:"address_line1_check"` AddressLine2 string `json:"address_line2"` AddressState string `json:"address_state"` AddressZip string `json:"address_zip"` AddressZipCheck CardVerification `json:"address_zip_check"` AvailablePayoutMethods []CardAvailablePayoutMethod `json:"available_payout_methods"` Brand CardBrand `json:"brand"` CVCCheck CardVerification `json:"cvc_check"` Country string `json:"country"` Currency Currency `json:"currency"` Customer *Customer `json:"customer"` 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. Description string `json:"description"` DynamicLast4 string `json:"dynamic_last4"` ExpMonth uint8 `json:"exp_month"` ExpYear uint16 `json:"exp_year"` Fingerprint string `json:"fingerprint"` Funding CardFunding `json:"funding"` 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. 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. Issuer string `json:"issuer"` Last4 string `json:"last4"` Metadata map[string]string `json:"metadata"` Name string `json:"name"` TokenizationMethod CardTokenizationMethod `json:"tokenization_method"` }
Card is the resource representing a Stripe credit/debit card. For more details see https://stripe.com/docs/api#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 CardAvailablePayoutMethod ¶
type CardAvailablePayoutMethod string
CardAvailablePayoutMethod is a set of available payout methods for the card.
const ( CardAvailablePayoutMethodInstant CardAvailablePayoutMethod = "Instant" CardAvailablePayoutMethodStandard CardAvailablePayoutMethod = "Standard" )
List of values that CardAvailablePayoutMethod can take.
type CardBrand ¶
type CardBrand string
CardBrand is the list of allowed values for the card's brand.
const ( CardBrandAmex 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 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
CardFunding is the list of allowed values for the card's funding.
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 object for cards.
type CardListParams ¶
type CardListParams struct { ListParams `form:"*"` Account *string `form:"-"` Customer *string `form:"-"` }
CardListParams is the set of parameters that can be used when listing cards. For more details see https://stripe.com/docs/api#list_cards.
type CardParams ¶
type CardParams struct { Params `form:"*"` Account *string `form:"-"` AddressCity *string `form:"address_city"` AddressCountry *string `form:"address_country"` AddressLine1 *string `form:"address_line1"` AddressLine2 *string `form:"address_line2"` AddressState *string `form:"address_state"` AddressZip *string `form:"address_zip"` CVC *string `form:"cvc"` Currency *string `form:"currency"` Customer *string `form:"-"` DefaultForCurrency *bool `form:"default_for_currency"` ExpMonth *string `form:"exp_month"` ExpYear *string `form:"exp_year"` Name *string `form:"name"` Number *string `form:"number"` Token *string `form:"-"` // ID is used when tokenizing a card for shared customers ID string `form:"*"` }
CardParams is the set of parameters that can be used when creating or updating a card. For more details see https://stripe.com/docs/api#create_card and https://stripe.com/docs/api#update_card.
Note that while form annotations are used for tokenization and updates, cards have some unusual logic on creates that necessitates manual handling of all parameters. See AppendToAsCardSourceOrExternalAccount.
func (*CardParams) AppendToAsCardSourceOrExternalAccount ¶
func (c *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
CardTokenizationMethod is the list of allowed values for the card's tokenization method.
const ( TokenizationMethodAndroidPay CardTokenizationMethod = "android_pay" TokenizationMethodApplePay CardTokenizationMethod = "apple_pay" )
List of values that CardTokenizationMethod can take.
type CardVerification ¶
type CardVerification string
CardVerification is the list of allowed verification responses.
const ( CardVerificationFail CardVerification = "fail" CardVerificationPass CardVerification = "pass" CardVerificationUnchecked CardVerification = "unchecked" )
List of values that CardVerification can take.
type Charge ¶
type Charge struct { APIResource Amount int64 `json:"amount"` AmountCaptured int64 `json:"amount_captured"` AmountRefunded int64 `json:"amount_refunded"` Application *Application `json:"application"` ApplicationFee *ApplicationFee `json:"application_fee"` ApplicationFeeAmount int64 `json:"application_fee_amount"` AuthorizationCode string `json:"authorization_code"` BalanceTransaction *BalanceTransaction `json:"balance_transaction"` BillingDetails *BillingDetails `json:"billing_details"` CalculatedStatementDescriptor string `json:"calculated_statement_descriptor"` Captured bool `json:"captured"` Created int64 `json:"created"` Currency Currency `json:"currency"` Customer *Customer `json:"customer"` Description string `json:"description"` Destination *Account `json:"destination"` Dispute *Dispute `json:"dispute"` Disputed bool `json:"disputed"` FailureCode string `json:"failure_code"` FailureMessage string `json:"failure_message"` FraudDetails *FraudDetails `json:"fraud_details"` ID string `json:"id"` Invoice *Invoice `json:"invoice"` Level3 ChargeLevel3 `json:"level3"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` OnBehalfOf *Account `json:"on_behalf_of"` Outcome *ChargeOutcome `json:"outcome"` Paid bool `json:"paid"` PaymentIntent *PaymentIntent `json:"payment_intent"` PaymentMethod string `json:"payment_method"` PaymentMethodDetails *ChargePaymentMethodDetails `json:"payment_method_details"` ReceiptEmail string `json:"receipt_email"` ReceiptNumber string `json:"receipt_number"` ReceiptURL string `json:"receipt_url"` Refunded bool `json:"refunded"` Refunds *RefundList `json:"refunds"` Review *Review `json:"review"` Shipping *ShippingDetails `json:"shipping"` Source *PaymentSource `json:"source"` SourceTransfer *Transfer `json:"source_transfer"` StatementDescriptor string `json:"statement_descriptor"` StatementDescriptorSuffix string `json:"statement_descriptor_suffix"` Status string `json:"status"` Transfer *Transfer `json:"transfer"` TransferData *ChargeTransferData `json:"transfer_data"` TransferGroup string `json:"transfer_group"` }
Charge is the resource representing a Stripe charge. For more details see https://stripe.com/docs/api#charges.
Example (Get) ¶
package main import ( "log" stripe "github.com/stripe/stripe-go/v72" "github.com/stripe/stripe-go/v72/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/v72" "github.com/stripe/stripe-go/v72/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 ChargeFraudStripeReport ¶
type ChargeFraudStripeReport string
ChargeFraudStripeReport is the list of allowed values for reporting fraud.
const (
ChargeFraudStripeReportFraudulent ChargeFraudStripeReport = "fraudulent"
)
List of values that ChargeFraudStripeReport can take.
type ChargeFraudUserReport ¶
type ChargeFraudUserReport string
ChargeFraudUserReport is the list of allowed values for reporting fraud.
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"` ShippingFromZip string `json:"shipping_from_zip"` ShippingAmount int64 `json:"shipping_amount"` }
ChargeLevel3 represents the Level III data. This is in private beta and would be empty for most integrations
type ChargeLevel3LineItem ¶
type ChargeLevel3LineItem struct { DiscountAmount int64 `json:"discount_amount"` ProductCode string `json:"product_code"` ProductDescription string `json:"product_description"` Quantity int64 `json:"quantity"` TaxAmount int64 `json:"tax_amount"` UnitCost int64 `json:"unit_cost"` }
ChargeLevel3LineItem represents a line item on level III data. This is in private beta and would be empty for most integrations
type ChargeLevel3LineItemsParams ¶
type ChargeLevel3LineItemsParams struct { DiscountAmount *int64 `form:"discount_amount"` ProductCode *string `form:"product_code"` ProductDescription *string `form:"product_description"` Quantity *int64 `form:"quantity"` TaxAmount *int64 `form:"tax_amount"` UnitCost *int64 `form:"unit_cost"` }
ChargeLevel3LineItemsParams is the set of parameters that represent a line item on level III data.
type ChargeLevel3Params ¶
type ChargeLevel3Params struct { CustomerReference *string `form:"customer_reference"` LineItems []*ChargeLevel3LineItemsParams `form:"line_items"` MerchantReference *string `form:"merchant_reference"` ShippingAddressZip *string `form:"shipping_address_zip"` ShippingFromZip *string `form:"shipping_from_zip"` ShippingAmount *int64 `form:"shipping_amount"` }
ChargeLevel3Params is the set of parameters that can be used for the Level III data.
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"` Customer *string `form:"customer"` PaymentIntent *string `form:"payment_intent"` TransferGroup *string `form:"transfer_group"` }
ChargeListParams is the set of parameters that can be used when listing charges.
type ChargeOutcome ¶
type ChargeOutcome struct { NetworkStatus string `json:"network_status"` Reason string `json:"reason"` RiskLevel string `json:"risk_level"` RiskScore int64 `json:"risk_score"` Rule *ChargeOutcomeRule `json:"rule"` SellerMessage string `json:"seller_message"` Type string `json:"type"` }
ChargeOutcome is the charge's outcome that details whether a payment was accepted and why.
type ChargeOutcomeRule ¶
type ChargeOutcomeRule struct { Action string `json:"action"` ID string `json:"id"` Predicate string `json:"predicate"` }
ChargeOutcomeRule tells you the Radar rule that blocked the charge, if any.
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 *int64 `form:"amount"` ApplicationFeeAmount *int64 `form:"application_fee_amount"` Capture *bool `form:"capture"` Currency *string `form:"currency"` Customer *string `form:"customer"` Description *string `form:"description"` Destination *DestinationParams `form:"destination"` ExchangeRate *float64 `form:"exchange_rate"` FraudDetails *FraudDetailsParams `form:"fraud_details"` Level3 *ChargeLevel3Params `form:"level3"` OnBehalfOf *string `form:"on_behalf_of"` ReceiptEmail *string `form:"receipt_email"` Shipping *ShippingDetailsParams `form:"shipping"` Source *SourceParams `form:"*"` // SourceParams has custom encoding so brought to top level with "*" StatementDescriptor *string `form:"statement_descriptor"` StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` TransferData *ChargeTransferDataParams `form:"transfer_data"` TransferGroup *string `form:"transfer_group"` }
ChargeParams is the set of parameters that can be used when creating or updating a charge.
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"` AfterpayClearpay *ChargePaymentMethodDetailsAfterpayClearpay `json:"afterpay_clearpay"` Alipay *ChargePaymentMethodDetailsAlipay `json:"alipay"` AUBECSDebit *ChargePaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"` BACSDebit *ChargePaymentMethodDetailsBACSDebit `json:"bacs_debit"` Bancontact *ChargePaymentMethodDetailsBancontact `json:"bancontact"` Card *ChargePaymentMethodDetailsCard `json:"card"` CardPresent *ChargePaymentMethodDetailsCardPresent `json:"card_present"` Eps *ChargePaymentMethodDetailsEps `json:"eps"` FPX *ChargePaymentMethodDetailsFPX `json:"fpx"` Giropay *ChargePaymentMethodDetailsGiropay `json:"giropay"` Grabpay *ChargePaymentMethodDetailsGrabpay `json:"grabpay"` Ideal *ChargePaymentMethodDetailsIdeal `json:"ideal"` Klarna *ChargePaymentMethodDetailsKlarna `json:"klarna"` Multibanco *ChargePaymentMethodDetailsMultibanco `json:"multibanco"` OXXO *ChargePaymentMethodDetailsOXXO `json:"oxxo"` P24 *ChargePaymentMethodDetailsP24 `json:"p24"` SepaDebit *ChargePaymentMethodDetailsSepaDebit `json:"sepa_debit"` Sofort *ChargePaymentMethodDetailsSofort `json:"sofort"` StripeAccount *ChargePaymentMethodDetailsStripeAccount `json:"stripe_account"` Type ChargePaymentMethodDetailsType `json:"type"` Wechat *ChargePaymentMethodDetailsWechat `json:"wechat"` }
ChargePaymentMethodDetails represents the details about the PaymentMethod associated with the charge.
type ChargePaymentMethodDetailsAUBECSDebit ¶
type ChargePaymentMethodDetailsAUBECSDebit struct { BSBNumber string `json:"bsb_number"` Fingerprint string `json:"fingerprint"` Last4 string `json:"last4"` Mandate string `json:"mandate"` }
ChargePaymentMethodDetailsAUBECSDebit represents details about the AU BECS DD PaymentMethod.
type ChargePaymentMethodDetailsAchCreditTransfer ¶
type ChargePaymentMethodDetailsAchCreditTransfer struct { AccountNumber string `json:"account_number"` BankName string `json:"bank_name"` RoutingNumber string `json:"routing_number"` SwiftCode string `json:"swift_code"` }
ChargePaymentMethodDetailsAchCreditTransfer represents details about the ACH Credit Transfer PaymentMethod.
type ChargePaymentMethodDetailsAchDebit ¶
type ChargePaymentMethodDetailsAchDebit struct { AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"` BankName string `json:"bank_name"` Country string `json:"country"` Fingerprint string `json:"fingerprint"` Last4 string `json:"last4"` RoutingNumber string `json:"routing_number"` }
ChargePaymentMethodDetailsAchDebit represents details about the ACH Debit PaymentMethod.
type ChargePaymentMethodDetailsAcssDebit ¶
type ChargePaymentMethodDetailsAcssDebit struct { BankName string `json:"bank_name"` Fingerprint string `json:"fingerprint"` InstitutionNumber string `json:"institution_number"` Last4 string `json:"last4"` Mandate string `json:"mandate"` TransitNumber string `json:"transit_number"` }
ChargePaymentMethodDetailsAcssDebit represents details about the ACSS Debit PaymentMethod.
type ChargePaymentMethodDetailsAfterpayClearpay ¶ added in v72.34.0
type ChargePaymentMethodDetailsAfterpayClearpay struct{}
ChargePaymentMethodDetailsAfterpayClearpay represents details about the AfterpayClearpay PaymentMethod.
type ChargePaymentMethodDetailsAlipay ¶
type ChargePaymentMethodDetailsAlipay struct { Fingerprint string `json:"fingerprint"` TransactionID string `json:"transaction_id"` }
ChargePaymentMethodDetailsAlipay represents details about the Alipay PaymentMethod.
type ChargePaymentMethodDetailsBACSDebit ¶
type ChargePaymentMethodDetailsBACSDebit struct { Fingerprint string `json:"fingerprint"` Last4 string `json:"last4"` Mandate string `json:"mandate"` SortCode string `json:"sort_code"` }
ChargePaymentMethodDetailsBACSDebit represents details about the BECS Debit PaymentMethod.
type ChargePaymentMethodDetailsBancontact ¶
type ChargePaymentMethodDetailsBancontact struct { BankCode string `json:"bank_code"` BankName string `json:"bank_name"` Bic string `json:"bic"` IbanLast4 string `json:"iban_last4"` PreferredLanguage string `json:"preferred_language"` VerifiedName string `json:"verified_name"` GeneratedSepaDebit *PaymentMethod `json:"generated_sepa_debit"` GeneratedSepaDebitMandate *Mandate `json:"generated_sepa_debit_mandate"` }
ChargePaymentMethodDetailsBancontact represents details about the Bancontact PaymentMethod.
type ChargePaymentMethodDetailsCard ¶
type ChargePaymentMethodDetailsCard struct { Brand PaymentMethodCardBrand `json:"brand"` Checks *ChargePaymentMethodDetailsCardChecks `json:"checks"` Country string `json:"country"` ExpMonth uint64 `json:"exp_month"` ExpYear uint64 `json:"exp_year"` Fingerprint string `json:"fingerprint"` Funding CardFunding `json:"funding"` Installments *ChargePaymentMethodDetailsCardInstallments `json:"installments"` Last4 string `json:"last4"` Network PaymentMethodCardNetwork `json:"network"` MOTO bool `json:"moto"` ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"` 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. Description string `json:"description"` IIN string `json:"iin"` Issuer string `json:"issuer"` }
ChargePaymentMethodDetailsCard represents details about the Card PaymentMethod.
type ChargePaymentMethodDetailsCardChecks ¶
type ChargePaymentMethodDetailsCardChecks struct { AddressLine1Check CardVerification `json:"address_line1_check"` AddressPostalCodeCheck CardVerification `json:"address_postal_code_check"` CVCCheck CardVerification `json:"cvc_check"` }
ChargePaymentMethodDetailsCardChecks represents the checks associated with the charge's Card PaymentMethod.
type ChargePaymentMethodDetailsCardInstallments ¶
type ChargePaymentMethodDetailsCardInstallments struct {
Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"`
}
ChargePaymentMethodDetailsCardInstallments represents details about the installment plan chosen for this charge.
type ChargePaymentMethodDetailsCardPresent ¶
type ChargePaymentMethodDetailsCardPresent struct { Brand PaymentMethodCardBrand `json:"brand"` CardholderName string `json:"cardholder_name"` Country string `json:"country"` EmvAuthData string `json:"emv_auth_data"` ExpMonth uint64 `json:"exp_month"` ExpYear uint64 `json:"exp_year"` Fingerprint string `json:"fingerprint"` Funding CardFunding `json:"funding"` GeneratedCard string `json:"generated_card"` Last4 string `json:"last4"` Network PaymentMethodCardNetwork `json:"network"` ReadMethod string `json:"read_method"` 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. Description string `json:"description"` IIN string `json:"iin"` Issuer string `json:"issuer"` }
ChargePaymentMethodDetailsCardPresent represents details about the Card Present PaymentMethod.
type ChargePaymentMethodDetailsCardPresentReceipt ¶
type ChargePaymentMethodDetailsCardPresentReceipt struct { AccountType ChargePaymentMethodDetailsCardPresentReceiptAccountType `json:"account_type"` ApplicationCryptogram string `json:"application_cryptogram"` ApplicationPreferredName string `json:"application_preferred_name"` AuthorizationCode string `json:"authorization_code"` AuthorizationResponseCode string `json:"authorization_response_code"` CardholderVerificationMethod string `json:"cardholder_verification_method"` DedicatedFileName string `json:"dedicated_file_name"` TerminalVerificationResults string `json:"terminal_verification_results"` TransactionStatusInformation string `json:"transaction_status_information"` }
ChargePaymentMethodDetailsCardPresentReceipt represents details about the receipt on a Card Present PaymentMethod.
type ChargePaymentMethodDetailsCardPresentReceiptAccountType ¶
type ChargePaymentMethodDetailsCardPresentReceiptAccountType string
ChargePaymentMethodDetailsCardPresentReceiptAccountType indicates the type of account backing a card present transaction.
const ( ChargePaymentMethodDetailsCardPresentReceiptAccountTypeChecking ChargePaymentMethodDetailsCardPresentReceiptAccountType = "checking" ChargePaymentMethodDetailsCardPresentReceiptAccountTypeCredit ChargePaymentMethodDetailsCardPresentReceiptAccountType = "credit" ChargePaymentMethodDetailsCardPresentReceiptAccountTypePrepaid ChargePaymentMethodDetailsCardPresentReceiptAccountType = "prepaid" ChargePaymentMethodDetailsCardPresentReceiptAccountTypeUnknown ChargePaymentMethodDetailsCardPresentReceiptAccountType = "unknown" )
List of values that ChargePaymentMethodDetailsCardThreeDSecureResult can take.
type ChargePaymentMethodDetailsCardThreeDSecure ¶
type ChargePaymentMethodDetailsCardThreeDSecure struct { AuthenticationFlow ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow `json:"authentication_flow"` Result ChargePaymentMethodDetailsCardThreeDSecureResult `json:"result"` ResultReason ChargePaymentMethodDetailsCardThreeDSecureResultReason `json:"result_reason"` Version string `json:"version"` }
ChargePaymentMethodDetailsCardThreeDSecure represents details about 3DS associated with the charge's PaymentMethod.
type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow ¶
type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow string
ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow indicates the type of 3D Secure authentication performed.
const ( ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowChallenge ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "challenge" ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowFrictionless ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "frictionless" )
List of values that ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow can take.
type ChargePaymentMethodDetailsCardThreeDSecureResult ¶
type ChargePaymentMethodDetailsCardThreeDSecureResult string
ChargePaymentMethodDetailsCardThreeDSecureResult indicates the outcome of 3D Secure authentication.
const ( ChargePaymentMethodDetailsCardThreeDSecureResultAttemptAcknowledged ChargePaymentMethodDetailsCardThreeDSecureResult = "attempt_acknowledged" ChargePaymentMethodDetailsCardThreeDSecureResultAuthenticated ChargePaymentMethodDetailsCardThreeDSecureResult = "authenticated" ChargePaymentMethodDetailsCardThreeDSecureResultFailed ChargePaymentMethodDetailsCardThreeDSecureResult = "failed" ChargePaymentMethodDetailsCardThreeDSecureResultNotSupported ChargePaymentMethodDetailsCardThreeDSecureResult = "not_supported" ChargePaymentMethodDetailsCardThreeDSecureResultProcessingError ChargePaymentMethodDetailsCardThreeDSecureResult = "processing_error" )
List of values that ChargePaymentMethodDetailsCardThreeDSecureResult can take.
type ChargePaymentMethodDetailsCardThreeDSecureResultReason ¶
type ChargePaymentMethodDetailsCardThreeDSecureResultReason string
ChargePaymentMethodDetailsCardThreeDSecureResultReason represents dditional information about why 3D Secure succeeded or failed
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"` DynamicLast4 string `json:"dynamic_last4"` GooglePay *ChargePaymentMethodDetailsCardWalletGooglePay `json:"google_pay"` Masterpass *ChargePaymentMethodDetailsCardWalletMasterpass `json:"masterpass"` SamsungPay *ChargePaymentMethodDetailsCardWalletSamsungPay `json:"samsung_pay"` Type PaymentMethodCardWalletType `json:"type"` VisaCheckout *ChargePaymentMethodDetailsCardWalletVisaCheckout `json:"visa_checkout"` }
ChargePaymentMethodDetailsCardWallet represents the details of the card wallet if this Card PaymentMethod is part of a card wallet.
type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout ¶
type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout struct { }
ChargePaymentMethodDetailsCardWalletAmexExpressCheckout represents the details of the Amex Express Checkout wallet.
type ChargePaymentMethodDetailsCardWalletApplePay ¶
type ChargePaymentMethodDetailsCardWalletApplePay struct { }
ChargePaymentMethodDetailsCardWalletApplePay represents the details of the Apple Pay wallet.
type ChargePaymentMethodDetailsCardWalletGooglePay ¶
type ChargePaymentMethodDetailsCardWalletGooglePay struct { }
ChargePaymentMethodDetailsCardWalletGooglePay represents the details of the Google Pay wallet.
type ChargePaymentMethodDetailsCardWalletMasterpass ¶
type ChargePaymentMethodDetailsCardWalletMasterpass struct { BillingAddress *Address `json:"billing_address"` Email string `json:"email"` Name string `json:"name"` ShippingAddress *Address `json:"shipping_address"` }
ChargePaymentMethodDetailsCardWalletMasterpass represents the details of the Masterpass wallet.
type ChargePaymentMethodDetailsCardWalletSamsungPay ¶
type ChargePaymentMethodDetailsCardWalletSamsungPay struct { }
ChargePaymentMethodDetailsCardWalletSamsungPay represents the details of the Samsung Pay wallet.
type ChargePaymentMethodDetailsCardWalletVisaCheckout ¶
type ChargePaymentMethodDetailsCardWalletVisaCheckout struct { BillingAddress *Address `json:"billing_address"` Email string `json:"email"` Name string `json:"name"` ShippingAddress *Address `json:"shipping_address"` }
ChargePaymentMethodDetailsCardWalletVisaCheckout represents the details of the Visa Checkout wallet.
type ChargePaymentMethodDetailsEps ¶
type ChargePaymentMethodDetailsEps struct { Bank string `json:"bank"` VerifiedName string `json:"verified_name"` }
ChargePaymentMethodDetailsEps represents details about the EPS PaymentMethod.
type ChargePaymentMethodDetailsFPX ¶
type ChargePaymentMethodDetailsFPX struct { AccountHolderType PaymentMethodFPXAccountHolderType `json:"account_holder_type"` Bank string `json:"bank"` TransactionID string `json:"transaction_id"` }
ChargePaymentMethodDetailsFPX represents details about the FPX PaymentMethod.
type ChargePaymentMethodDetailsGiropay ¶
type ChargePaymentMethodDetailsGiropay struct { BankCode string `json:"bank_code"` BankName string `json:"bank_name"` Bic string `json:"bic"` VerifiedName string `json:"verified_name"` }
ChargePaymentMethodDetailsGiropay represents details about the Giropay PaymentMethod.
type ChargePaymentMethodDetailsGrabpay ¶ added in v72.24.0
type ChargePaymentMethodDetailsGrabpay struct {
TransactionID string `json:"transaction_id"`
}
ChargePaymentMethodDetailsGrabpay represents details about the Grabpay PaymentMethod.
type ChargePaymentMethodDetailsIdeal ¶
type ChargePaymentMethodDetailsIdeal struct { Bank string `json:"bank"` Bic string `json:"bic"` IbanLast4 string `json:"iban_last4"` VerifiedName string `json:"verified_name"` GeneratedSepaDebit *PaymentMethod `json:"generated_sepa_debit"` GeneratedSepaDebitMandate *Mandate `json:"generated_sepa_debit_mandate"` }
ChargePaymentMethodDetailsIdeal represents details about the Ideal PaymentMethod.
type ChargePaymentMethodDetailsInteracPresent ¶
type ChargePaymentMethodDetailsInteracPresent struct { Brand string `json:"brand"` CardholderName string `json:"cardholder_name"` Country string `json:"country"` EmvAuthData string `json:"emv_auth_data"` ExpMonth int64 `json:"exp_month"` ExpYear int64 `json:"exp_year"` Fingerprint string `json:"fingerprint"` Funding string `json:"funding"` GeneratedCard string `json:"generated_card"` Last4 string `json:"last4"` Network string `json:"network"` PreferredLocales []string `json:"preferred_locales"` ReadMethod string `json:"read_method"` 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. Description string `json:"description"` IIN string `json:"iin"` Issuer string `json:"issuer"` }
ChargePaymentMethodDetailsInteracPresent represents details about the InteracPresent PaymentMethod.
type ChargePaymentMethodDetailsInteracPresentReceipt ¶
type ChargePaymentMethodDetailsInteracPresentReceipt struct { AccountType string `json:"account_type"` ApplicationCryptogram string `json:"application_cryptogram"` ApplicationPreferredName string `json:"application_preferred_name"` AuthorizationCode string `json:"authorization_code"` AuthorizationResponseCode string `json:"authorization_response_code"` CardholderVerificationMethod string `json:"cardholder_verification_method"` DedicatedFileName string `json:"dedicated_file_name"` TerminalVerificationResults string `json:"terminal_verification_results"` TransactionStatusInformation string `json:"transaction_status_information"` }
ChargePaymentMethodDetailsInteracPresentReceipt represents details about the InteracPresent Receipt.
type ChargePaymentMethodDetailsKlarna ¶
type ChargePaymentMethodDetailsKlarna struct { }
ChargePaymentMethodDetailsKlarna represents details for the Klarna PaymentMethod.
type ChargePaymentMethodDetailsMultibanco ¶
type ChargePaymentMethodDetailsMultibanco struct { Entity string `json:"entity"` Reference string `json:"reference"` }
ChargePaymentMethodDetailsMultibanco represents details about the Multibanco PaymentMethod.
type ChargePaymentMethodDetailsOXXO ¶ added in v72.7.0
type ChargePaymentMethodDetailsOXXO struct {
Number string `json:"number"`
}
ChargePaymentMethodDetailsOXXO represents details about the OXXO PaymentMethod.
type ChargePaymentMethodDetailsP24 ¶
type ChargePaymentMethodDetailsP24 struct { Bank string `json:"bank"` Reference string `json:"reference"` VerifiedName string `json:"verified_name"` }
ChargePaymentMethodDetailsP24 represents details about the P24 PaymentMethod.
type ChargePaymentMethodDetailsSepaDebit ¶
type ChargePaymentMethodDetailsSepaDebit struct { BankCode string `json:"bank_code"` BranchCode string `json:"branch_code"` Country string `json:"country"` Fingerprint string `json:"fingerprint"` Last4 string `json:"last4"` Mandate *Mandate `json:"mandate"` }
ChargePaymentMethodDetailsSepaDebit represents details about the Sepa Debit PaymentMethod.
type ChargePaymentMethodDetailsSofort ¶
type ChargePaymentMethodDetailsSofort struct { BankCode string `json:"bank_code"` BankName string `json:"bank_name"` Bic string `json:"bic"` Country string `json:"country"` IbanLast4 string `json:"iban_last4"` VerifiedName string `json:"verified_name"` GeneratedSepaDebit *PaymentMethod `json:"generated_sepa_debit"` GeneratedSepaDebitMandate *Mandate `json:"generated_sepa_debit_mandate"` }
ChargePaymentMethodDetailsSofort represents details about the Sofort PaymentMethod.
type ChargePaymentMethodDetailsStripeAccount ¶
type ChargePaymentMethodDetailsStripeAccount struct { }
ChargePaymentMethodDetailsStripeAccount represents details about the StripeAccount PaymentMethod.
type ChargePaymentMethodDetailsType ¶
type ChargePaymentMethodDetailsType string
ChargePaymentMethodDetailsType is the type of the PaymentMethod associated with the Charge's payment method details.
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 ChargePaymentMethodDetailsWechat ¶
type ChargePaymentMethodDetailsWechat struct { }
ChargePaymentMethodDetailsWechat represents details about the Wechat PaymentMethod.
type ChargeTransferData ¶
type ChargeTransferData struct { Amount int64 `form:"amount"` Destination *Account `json:"destination"` }
ChargeTransferData represents the information for the transfer_data associated with a charge.
type ChargeTransferDataParams ¶
type ChargeTransferDataParams struct { Amount *int64 `form:"amount"` // This parameter can only be used on Charge creation. Destination *string `form:"destination"` }
ChargeTransferDataParams is the set of parameters allowed for the transfer_data hash.
type CheckoutSession ¶
type CheckoutSession struct { APIResource AllowPromotionCodes bool `json:"allow_promotion_codes"` CancelURL string `json:"cancel_url"` CustomerDetails *CheckoutSessionCustomerDetails `json:"customer_details"` AmountSubtotal int64 `json:"amount_subtotal"` AmountTotal int64 `json:"amount_total"` ClientReferenceID string `json:"client_reference_id"` Currency Currency `json:"currency"` Customer *Customer `json:"customer"` CustomerEmail string `json:"customer_email"` Deleted bool `json:"deleted"` ID string `json:"id"` LineItems *LineItemList `json:"line_items"` Livemode bool `json:"livemode"` Locale string `json:"locale"` Metadata map[string]string `json:"metadata"` Mode CheckoutSessionMode `json:"mode"` Object string `json:"object"` PaymentIntent *PaymentIntent `json:"payment_intent"` PaymentMethodTypes []string `json:"payment_method_types"` PaymentStatus CheckoutSessionPaymentStatus `json:"payment_status"` SetupIntent *SetupIntent `json:"setup_intent"` Shipping *ShippingDetails `json:"shipping"` ShippingAddressCollection *CheckoutSessionShippingAddressCollection `json:"shipping_address_collection"` Subscription *Subscription `json:"subscription"` SubmitType CheckoutSessionSubmitType `json:"submit_type"` SuccessURL string `json:"success_url"` TotalDetails *CheckoutSessionTotalDetails `json:"total_details"` }
CheckoutSession is the resource representing a Stripe checkout session. For more details see https://stripe.com/docs/api/checkout/sessions/object
func (*CheckoutSession) UnmarshalJSON ¶
func (p *CheckoutSession) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a checkout session. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type CheckoutSessionCustomerDetails ¶ added in v72.30.0
type CheckoutSessionCustomerDetails struct { Email string `json:"email"` TaxExempt CheckoutSessionCustomerDetailsTaxExempt `json:"tax_exempt"` TaxIDs []*CheckoutSessionCustomerDetailsTaxIDs `json:"tax_ids"` }
CheckoutSessionCustomerDetails represent the customer details including the tax exempt status and the customer's tax IDs.
type CheckoutSessionCustomerDetailsTaxExempt ¶ added in v72.30.0
type CheckoutSessionCustomerDetailsTaxExempt string
CheckoutSessionCustomerDetailsTaxExempt is the list of allowed values for tax_exempt inside customer_details of a checkout session.
const ( CheckoutSessionCustomerDetailsTaxExemptExempt CheckoutSessionCustomerDetailsTaxExempt = "exempt" CheckoutSessionCustomerDetailsTaxExemptNone CheckoutSessionCustomerDetailsTaxExempt = "none" CheckoutSessionCustomerDetailsTaxExemptReverse CheckoutSessionCustomerDetailsTaxExempt = "reverse" )
List of values that CheckoutSessionCustomerDetailsTaxExempt can take.
type CheckoutSessionCustomerDetailsTaxIDs ¶ added in v72.30.0
type CheckoutSessionCustomerDetailsTaxIDs struct { Type CheckoutSessionCustomerDetailsTaxIDsType `json:"type"` Value string `json:"value"` }
CheckoutSessionCustomerDetailsTaxIDs represent customer's tax IDs at the time of checkout.
type CheckoutSessionCustomerDetailsTaxIDsType ¶ added in v72.30.0
type CheckoutSessionCustomerDetailsTaxIDsType string
CheckoutSessionCustomerDetailsTaxIDsType is the list of allowed values for type on the tax_ids inside customer_details of a checkout session.
const ( CheckoutSessionCustomerDetailsTaxIDsTypeAETRN CheckoutSessionCustomerDetailsTaxIDsType = "ae_trn" CheckoutSessionCustomerDetailsTaxIDsTypeAUABN CheckoutSessionCustomerDetailsTaxIDsType = "au_abn" CheckoutSessionCustomerDetailsTaxIDsTypeBRCNPJ CheckoutSessionCustomerDetailsTaxIDsType = "br_cnpj" CheckoutSessionCustomerDetailsTaxIDsTypeBRCPF CheckoutSessionCustomerDetailsTaxIDsType = "br_cpf" CheckoutSessionCustomerDetailsTaxIDsTypeCABN CheckoutSessionCustomerDetailsTaxIDsType = "ca_bn" CheckoutSessionCustomerDetailsTaxIDsTypeCAQST CheckoutSessionCustomerDetailsTaxIDsType = "ca_qst" CheckoutSessionCustomerDetailsTaxIDsTypeCHVAT CheckoutSessionCustomerDetailsTaxIDsType = "ch_vat" CheckoutSessionCustomerDetailsTaxIDsTypeCLTIN CheckoutSessionCustomerDetailsTaxIDsType = "cl_tin" CheckoutSessionCustomerDetailsTaxIDsTypeESCIF CheckoutSessionCustomerDetailsTaxIDsType = "es_cif" CheckoutSessionCustomerDetailsTaxIDsTypeEUVAT CheckoutSessionCustomerDetailsTaxIDsType = "eu_vat" CheckoutSessionCustomerDetailsTaxIDsTypeGBVAT CheckoutSessionCustomerDetailsTaxIDsType = "gb_vat" CheckoutSessionCustomerDetailsTaxIDsTypeHKBR CheckoutSessionCustomerDetailsTaxIDsType = "hk_br" CheckoutSessionCustomerDetailsTaxIDsTypeIDNPWP CheckoutSessionCustomerDetailsTaxIDsType = "id_npwp" CheckoutSessionCustomerDetailsTaxIDsTypeINGST CheckoutSessionCustomerDetailsTaxIDsType = "in_gst" CheckoutSessionCustomerDetailsTaxIDsTypeJPCN CheckoutSessionCustomerDetailsTaxIDsType = "jp_cn" CheckoutSessionCustomerDetailsTaxIDsTypeJPRN CheckoutSessionCustomerDetailsTaxIDsType = "jp_rn" CheckoutSessionCustomerDetailsTaxIDsTypeKRBRN CheckoutSessionCustomerDetailsTaxIDsType = "kr_brn" CheckoutSessionCustomerDetailsTaxIDsTypeLIUID CheckoutSessionCustomerDetailsTaxIDsType = "li_uid" CheckoutSessionCustomerDetailsTaxIDsTypeMXRFC CheckoutSessionCustomerDetailsTaxIDsType = "mx_rfc" CheckoutSessionCustomerDetailsTaxIDsTypeMYFRP CheckoutSessionCustomerDetailsTaxIDsType = "my_frp" CheckoutSessionCustomerDetailsTaxIDsTypeMYITN CheckoutSessionCustomerDetailsTaxIDsType = "my_itn" CheckoutSessionCustomerDetailsTaxIDsTypeMYSST CheckoutSessionCustomerDetailsTaxIDsType = "my_sst" CheckoutSessionCustomerDetailsTaxIDsTypeNOVAT CheckoutSessionCustomerDetailsTaxIDsType = "no_vat" CheckoutSessionCustomerDetailsTaxIDsTypeNZGST CheckoutSessionCustomerDetailsTaxIDsType = "nz_gst" CheckoutSessionCustomerDetailsTaxIDsTypeRUINN CheckoutSessionCustomerDetailsTaxIDsType = "ru_inn" CheckoutSessionCustomerDetailsTaxIDsTypeRUKPP CheckoutSessionCustomerDetailsTaxIDsType = "ru_kpp" CheckoutSessionCustomerDetailsTaxIDsTypeSAVAT CheckoutSessionCustomerDetailsTaxIDsType = "sa_vat" CheckoutSessionCustomerDetailsTaxIDsTypeSGGST CheckoutSessionCustomerDetailsTaxIDsType = "sg_gst" CheckoutSessionCustomerDetailsTaxIDsTypeSGUEN CheckoutSessionCustomerDetailsTaxIDsType = "sg_uen" CheckoutSessionCustomerDetailsTaxIDsTypeTHVAT CheckoutSessionCustomerDetailsTaxIDsType = "th_vat" CheckoutSessionCustomerDetailsTaxIDsTypeTWVAT CheckoutSessionCustomerDetailsTaxIDsType = "tw_vat" CheckoutSessionCustomerDetailsTaxIDsTypeUnknown CheckoutSessionCustomerDetailsTaxIDsType = "unknown" CheckoutSessionCustomerDetailsTaxIDsTypeUSEIN CheckoutSessionCustomerDetailsTaxIDsType = "us_ein" CheckoutSessionCustomerDetailsTaxIDsTypeZAVAT CheckoutSessionCustomerDetailsTaxIDsType = "za_vat" )
List of values that CheckoutSessionCustomerDetailsTaxIDsType can take.
type CheckoutSessionDiscountParams ¶ added in v72.16.0
type CheckoutSessionDiscountParams struct { Coupon *string `form:"coupon"` PromotionCode *string `form:"promotion_code"` }
CheckoutSessionDiscountParams is the set of parameters allowed for discounts on a checkout session.
type CheckoutSessionLineItemAdjustableQuantityParams ¶ added in v72.34.0
type CheckoutSessionLineItemAdjustableQuantityParams struct { Enabled *bool `form:"enabled"` Maximum *int64 `form:"maximum"` Minimum *int64 `form:"minimum"` }
CheckoutSessionLineItemAdjustableQuantityParams represents the parameters for an adjustable quantity on a checkout session's line items.
type CheckoutSessionLineItemParams ¶
type CheckoutSessionLineItemParams struct { AdjustableQuantity *CheckoutSessionLineItemAdjustableQuantityParams `form:"adjustable_quantity"` Amount *int64 `form:"amount"` Currency *string `form:"currency"` Description *string `form:"description"` DynamicTaxRates []*string `form:"dynamic_tax_rates"` Images []*string `form:"images"` Name *string `form:"name"` Price *string `form:"price"` PriceData *CheckoutSessionLineItemPriceDataParams `form:"price_data"` Quantity *int64 `form:"quantity"` TaxRates []*string `form:"tax_rates"` }
CheckoutSessionLineItemParams is the set of parameters allowed for a line item on a checkout session.
type CheckoutSessionLineItemPriceDataParams ¶
type CheckoutSessionLineItemPriceDataParams struct { Currency *string `form:"currency"` Product *string `form:"product"` ProductData *CheckoutSessionLineItemPriceDataProductDataParams `form:"product_data"` Recurring *CheckoutSessionLineItemPriceDataRecurringParams `form:"recurring"` UnitAmount *int64 `form:"unit_amount"` UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
CheckoutSessionLineItemPriceDataParams is a structure representing the parameters to create an inline price for a line item.
type CheckoutSessionLineItemPriceDataProductDataParams ¶
type CheckoutSessionLineItemPriceDataProductDataParams struct { Description *string `form:"description"` Images []*string `form:"images"` Metadata map[string]string `form:"metadata"` Name *string `form:"name"` }
CheckoutSessionLineItemPriceDataProductDataParams is the set of parameters that can be used when creating a product created inline for a line item.
type CheckoutSessionLineItemPriceDataRecurringParams ¶
type CheckoutSessionLineItemPriceDataRecurringParams struct { AggregateUsage *string `form:"aggregate_usage"` Interval *string `form:"interval"` IntervalCount *int64 `form:"interval_count"` TrialPeriodDays *int64 `form:"trial_period_days"` UsageType *string `form:"usage_type"` }
CheckoutSessionLineItemPriceDataRecurringParams is the set of parameters for the recurring components of a price created inline for a line item.
type CheckoutSessionList ¶
type CheckoutSessionList struct { APIResource ListMeta Data []*CheckoutSession `json:"data"` }
CheckoutSessionList is a list of sessions as retrieved from a list endpoint.
type CheckoutSessionListLineItemsParams ¶
type CheckoutSessionListLineItemsParams struct { ListParams `form:"*"` Session *string `form:"-"` // Included in URL }
CheckoutSessionListLineItemsParams is the set of parameters that can be used when listing line items on a session.
type CheckoutSessionListParams ¶
type CheckoutSessionListParams struct { ListParams `form:"*"` PaymentIntent *string `form:"payment_intent"` Subscription *string `form:"subscription"` }
CheckoutSessionListParams is the set of parameters that can be used when listing sessions. For more details see: https://stripe.com/docs/api/checkout/sessions/list
type CheckoutSessionMode ¶
type CheckoutSessionMode string
CheckoutSessionMode is the list of allowed values for the mode on a 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:"*"` AllowPromotionCodes *bool `form:"allow_promotion_codes"` BillingAddressCollection *string `form:"billing_address_collection"` CancelURL *string `form:"cancel_url"` ClientReferenceID *string `form:"client_reference_id"` Customer *string `form:"customer"` CustomerEmail *string `form:"customer_email"` Discounts []*CheckoutSessionDiscountParams `form:"discounts"` LineItems []*CheckoutSessionLineItemParams `form:"line_items"` Locale *string `form:"locale"` Mode *string `form:"mode"` PaymentIntentData *CheckoutSessionPaymentIntentDataParams `form:"payment_intent_data"` PaymentMethodTypes []*string `form:"payment_method_types"` SetupIntentData *CheckoutSessionSetupIntentDataParams `form:"setup_intent_data"` ShippingAddressCollection *CheckoutSessionShippingAddressCollectionParams `form:"shipping_address_collection"` ShippingRates []*string `form:"shipping_rates"` SubmitType *string `form:"submit_type"` SubscriptionData *CheckoutSessionSubscriptionDataParams `form:"subscription_data"` SuccessURL *string `form:"success_url"` }
CheckoutSessionParams is the set of parameters that can be used when creating a checkout session. For more details see https://stripe.com/docs/api/checkout/sessions/create
type CheckoutSessionPaymentIntentDataParams ¶
type CheckoutSessionPaymentIntentDataParams struct { Params `form:"*"` ApplicationFeeAmount *int64 `form:"application_fee_amount"` CaptureMethod *string `form:"capture_method"` Description *string `form:"description"` Metadata map[string]string `form:"metadata"` OnBehalfOf *string `form:"on_behalf_of"` ReceiptEmail *string `form:"receipt_email"` SetupFutureUsage *string `form:"setup_future_usage"` Shipping *ShippingDetailsParams `form:"shipping"` StatementDescriptor *string `form:"statement_descriptor"` StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` TransferData *CheckoutSessionPaymentIntentDataTransferDataParams `form:"transfer_data"` TransferGroup *string `form:"transfer_group"` }
CheckoutSessionPaymentIntentDataParams is the set of parameters allowed for the payment intent creation on a checkout session.
type CheckoutSessionPaymentIntentDataTransferDataParams ¶
type CheckoutSessionPaymentIntentDataTransferDataParams struct { Amount *int64 `form:"amount"` Destination *string `form:"destination"` }
CheckoutSessionPaymentIntentDataTransferDataParams is the set of parameters allowed for the transfer_data hash.
type CheckoutSessionPaymentStatus ¶ added in v72.1.0
type CheckoutSessionPaymentStatus string
CheckoutSessionPaymentStatus is the list of allowed values for the payment status on a Session.`
const ( CheckoutSessionPaymentStatusNoPaymentRequired CheckoutSessionPaymentStatus = "no_payment_required" CheckoutSessionPaymentStatusPaid CheckoutSessionPaymentStatus = "paid" CheckoutSessionPaymentStatusUnpaid CheckoutSessionPaymentStatus = "unpaid" )
List of values that CheckoutSessionPaymentStatus can take.
type CheckoutSessionSetupIntentDataParams ¶
type CheckoutSessionSetupIntentDataParams struct { Params `form:"*"` Description *string `form:"description"` OnBehalfOf *string `form:"on_behalf_of"` }
CheckoutSessionSetupIntentDataParams is the set of parameters allowed for the setup intent creation on a checkout session.
type CheckoutSessionShippingAddressCollection ¶
type CheckoutSessionShippingAddressCollection struct {
AllowedCountries []string `json:"allowed_countries"`
}
CheckoutSessionShippingAddressCollection is the set of parameters allowed for the shipping address collection.
type CheckoutSessionShippingAddressCollectionParams ¶
type CheckoutSessionShippingAddressCollectionParams struct {
AllowedCountries []*string `form:"allowed_countries"`
}
CheckoutSessionShippingAddressCollectionParams is the set of parameters allowed for the shipping address collection.
type CheckoutSessionSubmitType ¶
type CheckoutSessionSubmitType string
CheckoutSessionSubmitType is the list of allowed values for the submit type on a Session.
const ( CheckoutSessionSubmitTypeAuto CheckoutSessionSubmitType = "auto" CheckoutSessionSubmitTypeBook CheckoutSessionSubmitType = "book" CheckoutSessionSubmitTypeDonate CheckoutSessionSubmitType = "donate" CheckoutSessionSubmitTypePay CheckoutSessionSubmitType = "pay" )
List of values that CheckoutSessionSubmitType can take.
type CheckoutSessionSubscriptionDataItemsParams ¶
type CheckoutSessionSubscriptionDataItemsParams struct { Plan *string `form:"plan"` Quantity *int64 `form:"quantity"` TaxRates []*string `form:"tax_rates"` }
CheckoutSessionSubscriptionDataItemsParams is the set of parameters allowed for one item on a checkout session associated with a subscription.
type CheckoutSessionSubscriptionDataParams ¶
type CheckoutSessionSubscriptionDataParams struct { Params `form:"*"` ApplicationFeePercent *float64 `form:"application_fee_percent"` Coupon *string `form:"coupon"` DefaultTaxRates []*string `form:"default_tax_rates"` Items []*CheckoutSessionSubscriptionDataItemsParams `form:"items"` Metadata map[string]string `form:"metadata"` TrialEnd *int64 `form:"trial_end"` TrialFromPlan *bool `form:"trial_from_plan"` TrialPeriodDays *int64 `form:"trial_period_days"` }
CheckoutSessionSubscriptionDataParams is the set of parameters allowed for the subscription creation on a checkout session.
type CheckoutSessionTotalDetails ¶
type CheckoutSessionTotalDetails struct { AmountDiscount int64 `json:"amount_discount"` AmountShipping int64 `json:"amount_shipping"` AmountTax int64 `json:"amount_tax"` Breakdown *CheckoutSessionTotalDetailsBreakdown `json:"breakdown"` }
CheckoutSessionTotalDetails is the set of properties detailing how the amounts were calculated.
type CheckoutSessionTotalDetailsBreakdown ¶
type CheckoutSessionTotalDetailsBreakdown struct { Discounts []*CheckoutSessionTotalDetailsBreakdownDiscount `json:"discounts"` Taxes []*CheckoutSessionTotalDetailsBreakdownTax `json:"taxes"` }
CheckoutSessionTotalDetailsBreakdown is the set of properties detailing a breakdown of taxes and discounts applied to a session if any.
type CheckoutSessionTotalDetailsBreakdownDiscount ¶
type CheckoutSessionTotalDetailsBreakdownDiscount struct { Amount int64 `json:"amount"` Discount *Discount `json:"discount"` }
CheckoutSessionTotalDetailsBreakdownDiscount represent the details of one discount applied to a session.
type CheckoutSessionTotalDetailsBreakdownTax ¶
type CheckoutSessionTotalDetailsBreakdownTax struct { Amount int64 `json:"amount"` TaxRate *TaxRate `json:"tax_rate"` }
CheckoutSessionTotalDetailsBreakdownTax represent the details of tax rate applied to a session.
type CodeVerificationFlow ¶
type CodeVerificationFlow struct { AttemptsRemaining int64 `json:"attempts_remaining"` Status SourceCodeVerificationFlowStatus `json:"status"` }
CodeVerificationFlow informs of the state of a verification authentication flow.
type CountrySpec ¶
type CountrySpec struct { APIResource DefaultCurrency Currency `json:"default_currency"` ID string `json:"id"` SupportedBankAccountCurrencies map[Currency][]Country `json:"supported_bank_account_currencies"` SupportedPaymentCurrencies []Currency `json:"supported_payment_currencies"` SupportedPaymentMethods []string `json:"supported_payment_methods"` SupportedTransferCountries []string `json:"supported_transfer_countries"` VerificationFields map[AccountBusinessType]*VerificationFieldsList `json:"verification_fields"` }
CountrySpec is the resource representing the rules required for a Stripe account. For more details see https://stripe.com/docs/api/#country_specs.
type CountrySpecList ¶
type CountrySpecList struct { APIResource ListMeta Data []*CountrySpec `json:"data"` }
CountrySpecList is a list of country specs as retrieved from a list endpoint.
type CountrySpecListParams ¶
type CountrySpecListParams struct {
ListParams `form:"*"`
}
CountrySpecListParams are the parameters allowed during CountrySpec listing.
type CountrySpecParams ¶
type CountrySpecParams struct {
Params `form:"*"`
}
CountrySpecParams are the parameters allowed during CountrySpec retrieval.
type Coupon ¶
type Coupon struct { APIResource AmountOff int64 `json:"amount_off"` AppliesTo *CouponAppliesTo `json:"applies_to"` Created int64 `json:"created"` Currency Currency `json:"currency"` Deleted bool `json:"deleted"` Duration CouponDuration `json:"duration"` DurationInMonths int64 `json:"duration_in_months"` ID string `json:"id"` Livemode bool `json:"livemode"` MaxRedemptions int64 `json:"max_redemptions"` Metadata map[string]string `json:"metadata"` Name string `json:"name"` Object string `json:"object"` PercentOff float64 `json:"percent_off"` RedeemBy int64 `json:"redeem_by"` TimesRedeemed int64 `json:"times_redeemed"` Valid bool `json:"valid"` }
Coupon is the resource representing a Stripe coupon. For more details see https://stripe.com/docs/api#coupons.
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 {
Products []string `json:"products"`
}
CouponAppliesTo represents the products a coupon applies to.
type CouponAppliesToParams ¶
type CouponAppliesToParams struct {
Products []*string `form:"products"`
}
CouponAppliesToParams controls the products that a coupon applies to.
type CouponDuration ¶
type CouponDuration string
CouponDuration is the list of allowed values for the coupon's duration.
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:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` }
CouponListParams is the set of parameters that can be used when listing coupons. For more detail see https://stripe.com/docs/api#list_coupons.
type CouponParams ¶
type CouponParams struct { Params `form:"*"` AmountOff *int64 `form:"amount_off"` AppliesTo *CouponAppliesToParams `form:"applies_to"` Currency *string `form:"currency"` Duration *string `form:"duration"` DurationInMonths *int64 `form:"duration_in_months"` ID *string `form:"id"` MaxRedemptions *int64 `form:"max_redemptions"` Name *string `form:"name"` PercentOff *float64 `form:"percent_off"` RedeemBy *int64 `form:"redeem_by"` }
CouponParams is the set of parameters that can be used when creating a coupon. For more details see https://stripe.com/docs/api#create_coupon.
type CreditNote ¶
type CreditNote struct { APIResource Amount int64 `json:"amount"` Created int64 `json:"created"` Currency Currency `json:"currency"` Customer *Customer `json:"customer"` CustomerBalanceTransaction *CustomerBalanceTransaction `json:"customer_balance_transaction"` DiscountAmount int64 `json:"discount_amount"` DiscountAmounts []*CreditNoteDiscountAmount `json:"discount_amounts"` Invoice *Invoice `json:"invoice"` ID string `json:"id"` Lines *CreditNoteLineItemList `json:"lines"` Livemode bool `json:"livemode"` Memo string `json:"memo"` Metadata map[string]string `json:"metadata"` Number string `json:"number"` Object string `json:"object"` OutOfBandAmount int64 `json:"out_of_band_amount"` PDF string `json:"pdf"` Reason CreditNoteReason `json:"reason"` Refund *Refund `json:"refund"` Status CreditNoteStatus `json:"status"` Subtotal int64 `json:"subtotal"` TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"` Total int64 `json:"total"` Type CreditNoteType `json:"type"` VoidedAt int64 `json:"voided_at"` }
CreditNote is the resource representing a Stripe credit note. For more details see https://stripe.com/docs/api/credit_notes/object.
func (*CreditNote) UnmarshalJSON ¶
func (i *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 { Amount int64 `json:"amount"` Discount *Discount `json:"discount"` }
CreditNoteDiscountAmount represents the aggregate amounts calculated per discount for all line items.
type CreditNoteLineItem ¶
type CreditNoteLineItem struct { Amount int64 `json:"amount"` Description string `json:"description"` DiscountAmount int64 `json:"discount_amount"` DiscountAmounts []*CreditNoteLineItemDiscountAmount `json:"discount_amounts"` ID string `json:"id"` InvoiceLineItem string `json:"invoice_line_item"` Livemode bool `json:"livemode"` Object string `json:"object"` Quantity int64 `json:"quantity"` TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"` TaxRates []*TaxRate `json:"tax_rates"` Type CreditNoteLineItemType `json:"type"` UnitAmount int64 `json:"unit_amount"` UnitAmountDecimal float64 `json:"unit_amount_decimal,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
type CreditNoteLineItemDiscountAmount ¶
type CreditNoteLineItemDiscountAmount struct { Amount int64 `json:"amount"` Discount *Discount `json:"discount"` }
CreditNoteLineItemDiscountAmount represents the amount of discount calculated per discount for this line item.
type CreditNoteLineItemList ¶
type CreditNoteLineItemList struct { APIResource ListMeta Data []*CreditNoteLineItem `json:"data"` }
CreditNoteLineItemList is a list of credit note line items as retrieved from a list endpoint.
type CreditNoteLineItemListParams ¶
type CreditNoteLineItemListParams struct { ListParams `form:"*"` // ID is the credit note ID to list line items for. ID *string `form:"-"` // Goes in the URL }
CreditNoteLineItemListParams is the set of parameters that can be used when listing credit note line items.
type CreditNoteLineItemListPreviewParams ¶
type CreditNoteLineItemListPreviewParams struct { ListParams `form:"*"` Amount *int64 `form:"amount"` CreditAmount *int64 `form:"credit_amount"` Invoice *string `form:"invoice"` Lines []*CreditNoteLineParams `form:"lines"` Memo *string `form:"memo"` OutOfBandAmount *int64 `form:"out_of_band_amount"` Reason *string `form:"reason"` Refund *string `form:"refund"` RefundAmount *int64 `form:"refund_amount"` }
CreditNoteLineItemListPreviewParams is the set of parameters that can be used when previewing a credit note's line items
type CreditNoteLineItemType ¶
type CreditNoteLineItemType string
CreditNoteLineItemType is the list of allowed values for the credit note line item's type.
const ( CreditNoteLineItemTypeCustomLineItem CreditNoteLineItemType = "custom_line_item" CreditNoteLineItemTypeInvoiceLineItem CreditNoteLineItemType = "invoice_line_item" )
List of values that CreditNoteType can take.
type CreditNoteLineParams ¶
type CreditNoteLineParams struct { Amount *int64 `form:"amount"` Description *string `form:"description"` InvoiceLineItem *string `form:"invoice_line_item"` Quantity *int64 `form:"quantity"` TaxRates []*string `form:"tax_rates"` UnitAmount *int64 `form:"unit_amount"` UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` Type *string `form:"type"` }
CreditNoteLineParams is the set of parameters that can be used for a line item when creating or previewing a credit note.
type CreditNoteList ¶
type CreditNoteList struct { APIResource ListMeta Data []*CreditNote `json:"data"` }
CreditNoteList is a list of credit notes as retrieved from a list endpoint.
type CreditNoteListParams ¶
type CreditNoteListParams struct { ListParams `form:"*"` Customer *string `form:"customer"` Invoice *string `form:"invoice"` }
CreditNoteListParams is the set of parameters that can be used when listing credit notes. For more details see https://stripe.com/docs/api/credit_notes/list.
type CreditNoteParams ¶
type CreditNoteParams struct { Params `form:"*"` Amount *int64 `form:"amount"` CreditAmount *int64 `form:"credit_amount"` Invoice *string `form:"invoice"` Lines []*CreditNoteLineParams `form:"lines"` Memo *string `form:"memo"` OutOfBandAmount *int64 `form:"out_of_band_amount"` Reason *string `form:"reason"` Refund *string `form:"refund"` RefundAmount *int64 `form:"refund_amount"` }
CreditNoteParams is the set of parameters that can be used when creating or updating a credit note. For more details see https://stripe.com/docs/api/credit_notes/create, https://stripe.com/docs/api/credit_notes/update.
type CreditNotePreviewParams ¶
type CreditNotePreviewParams struct { Params `form:"*"` Amount *int64 `form:"amount"` CreditAmount *int64 `form:"credit_amount"` Invoice *string `form:"invoice"` Lines []*CreditNoteLineParams `form:"lines"` Memo *string `form:"memo"` OutOfBandAmount *int64 `form:"out_of_band_amount"` Reason *string `form:"reason"` Refund *string `form:"refund"` RefundAmount *int64 `form:"refund_amount"` }
CreditNotePreviewParams is the set of parameters that can be used when previewing a credit note. For more details see https://stripe.com/docs/api/credit_notes/preview.
type CreditNoteReason ¶
type CreditNoteReason string
CreditNoteReason is the reason why a given credit note was created.
const ( CreditNoteReasonDuplicate CreditNoteReason = "duplicate" CreditNoteReasonFraudulent CreditNoteReason = "fraudulent" CreditNoteReasonOrderChange CreditNoteReason = "order_change" CreditNoteReasonProductUnsatisfactory CreditNoteReason = "product_unsatisfactory" )
List of values that CreditNoteReason can take.
type CreditNoteStatus ¶
type CreditNoteStatus string
CreditNoteStatus is the list of allowed values for the credit note's status.
const ( CreditNoteStatusIssued CreditNoteStatus = "issued" CreditNoteStatusVoid CreditNoteStatus = "void" )
List of values that CreditNoteStatus can take.
type CreditNoteTaxAmount ¶
type CreditNoteTaxAmount struct { Amount int64 `json:"amount"` Inclusive bool `json:"inclusive"` TaxRate *TaxRate `json:"tax_rate"` }
CreditNoteTaxAmount represent the tax amount applied to a credit note.
type CreditNoteType ¶
type CreditNoteType string
CreditNoteType is the list of allowed values for the credit note's type.
const ( CreditNoteTypePostPayment CreditNoteType = "post_payment" CreditNoteTypePrePayment CreditNoteType = "pre_payment" )
List of values that CreditNoteType can take.
type CreditNoteVoidParams ¶
type CreditNoteVoidParams struct {
Params `form:"*"`
}
CreditNoteVoidParams is the set of parameters that can be used when voiding invoices.
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 Address Address `json:"address"` Balance int64 `json:"balance"` Created int64 `json:"created"` Currency Currency `json:"currency"` DefaultSource *PaymentSource `json:"default_source"` Deleted bool `json:"deleted"` Delinquent bool `json:"delinquent"` Description string `json:"description"` Discount *Discount `json:"discount"` Email string `json:"email"` ID string `json:"id"` InvoicePrefix string `json:"invoice_prefix"` InvoiceSettings *CustomerInvoiceSettings `json:"invoice_settings"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Name string `json:"name"` NextInvoiceSequence int64 `json:"next_invoice_sequence"` Phone string `json:"phone"` PreferredLocales []string `json:"preferred_locales"` Shipping *CustomerShippingDetails `json:"shipping"` Sources *SourceList `json:"sources"` Subscriptions *SubscriptionList `json:"subscriptions"` TaxExempt CustomerTaxExempt `json:"tax_exempt"` TaxIDs *TaxIDList `json:"tax_ids"` }
Customer is the resource representing a Stripe customer. For more details see https://stripe.com/docs/api#customers.
Example (Delete) ¶
package main import ( "log" stripe "github.com/stripe/stripe-go/v72" "github.com/stripe/stripe-go/v72/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 Amount int64 `json:"amount"` Created int64 `json:"created"` CreditNote *CreditNote `json:"credit_note"` Currency Currency `json:"currency"` Customer *Customer `json:"customer"` Description string `json:"description"` EndingBalance int64 `json:"ending_balance"` ID string `json:"id"` Invoice *Invoice `json:"invoice"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` Type CustomerBalanceTransactionType `json:"type"` }
CustomerBalanceTransaction is the resource representing a customer balance transaction. For more details see https://stripe.com/docs/api/customers/customer_balance_transaction_object
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 customer balance transactions as retrieved from a list endpoint.
type CustomerBalanceTransactionListParams ¶
type CustomerBalanceTransactionListParams struct { ListParams `form:"*"` Customer *string `form:"-"` // Included in URL }
CustomerBalanceTransactionListParams is the set of parameters that can be used when listing customer balance transactions. For more detail see https://stripe.com/docs/api/customers/customer_balance_transactions
type CustomerBalanceTransactionParams ¶
type CustomerBalanceTransactionParams struct { Params `form:"*"` Customer *string `form:"-"` // Included in URL Amount *int64 `form:"amount"` Currency *string `form:"currency"` Description *string `form:"description"` }
CustomerBalanceTransactionParams is the set of parameters that can be used when creating or updating a customer balance transactions. For more details see https://stripe.com/docs/api/customers/create_customer_balance_transaction
type CustomerBalanceTransactionType ¶
type CustomerBalanceTransactionType string
CustomerBalanceTransactionType is the list of allowed values for the customer's balance transaction type.
const ( CustomerBalanceTransactionTypeAdjustment CustomerBalanceTransactionType = "adjustment" CustomerBalanceTransactionTypeAppliedToInvoice CustomerBalanceTransactionType = "applied_to_invoice" CustomerBalanceTransactionTypeCreditNote CustomerBalanceTransactionType = "credit_note" CustomerBalanceTransactionTypeInitial CustomerBalanceTransactionType = "initial" 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 CustomerBalanceTransactionDuration can take.
type CustomerInvoiceCustomField ¶
CustomerInvoiceCustomField represents a custom field associated with the customer's invoices.
type CustomerInvoiceCustomFieldParams ¶
type CustomerInvoiceCustomFieldParams struct { Name *string `form:"name"` Value *string `form:"value"` }
CustomerInvoiceCustomFieldParams represents the parameters associated with one custom field on the customer's invoices.
type CustomerInvoiceSettings ¶
type CustomerInvoiceSettings struct { CustomFields []*CustomerInvoiceCustomField `json:"custom_fields"` DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"` }
CustomerInvoiceSettings is the structure containing the default settings for invoices associated with this customer.
type CustomerInvoiceSettingsParams ¶
type CustomerInvoiceSettingsParams struct { CustomFields []*CustomerInvoiceCustomFieldParams `form:"custom_fields"` DefaultPaymentMethod *string `form:"default_payment_method"` }
CustomerInvoiceSettingsParams is the structure containing the default settings for invoices associated with 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"` Email *string `form:"email"` }
CustomerListParams is the set of parameters that can be used when listing customers. For more details see https://stripe.com/docs/api#list_customers.
type CustomerParams ¶
type CustomerParams struct { Params `form:"*"` Address *AddressParams `form:"address"` Balance *int64 `form:"balance"` Coupon *string `form:"coupon"` DefaultSource *string `form:"default_source"` Description *string `form:"description"` Email *string `form:"email"` InvoicePrefix *string `form:"invoice_prefix"` InvoiceSettings *CustomerInvoiceSettingsParams `form:"invoice_settings"` Name *string `form:"name"` NextInvoiceSequence *int64 `form:"next_invoice_sequence"` PaymentMethod *string `form:"payment_method"` Phone *string `form:"phone"` PreferredLocales []*string `form:"preferred_locales"` PromotionCode *string `form:"promotion_code"` Shipping *CustomerShippingDetailsParams `form:"shipping"` Source *SourceParams `form:"*"` // SourceParams has custom encoding so brought to top level with "*" TaxExempt *string `form:"tax_exempt"` TaxIDData []*CustomerTaxIDDataParams `form:"tax_id_data"` Token *string `form:"-"` // This doesn't seem to be used? }
CustomerParams is the set of parameters that can be used when creating or updating a customer. For more details see https://stripe.com/docs/api#create_customer and https://stripe.com/docs/api#update_customer.
func (*CustomerParams) SetSource ¶
func (cp *CustomerParams) SetSource(sp interface{}) error
SetSource adds valid sources to a CustomerParams object, returning an error for unsupported sources.
type CustomerShippingDetails ¶
type CustomerShippingDetails struct { Address Address `json:"address"` Name string `json:"name"` Phone string `json:"phone"` }
CustomerShippingDetails is the structure containing shipping information.
type CustomerShippingDetailsParams ¶
type CustomerShippingDetailsParams struct { Address *AddressParams `form:"address"` Name *string `form:"name"` Phone *string `form:"phone"` }
CustomerShippingDetailsParams is the structure containing shipping information.
type CustomerSourceParams ¶
type CustomerSourceParams struct { Params `form:"*"` Customer *string `form:"-"` // Goes in the URL Source *SourceParams `form:"*"` // SourceParams has custom encoding so brought to top level with "*" }
CustomerSourceParams are used to manipulate a given Stripe Customer object's payment sources. For more details see https://stripe.com/docs/api#sources
func (*CustomerSourceParams) SetSource ¶
func (cp *CustomerSourceParams) SetSource(sp interface{}) error
SetSource adds valid sources to a CustomerSourceParams object, returning an error for unsupported sources.
type CustomerTaxExempt ¶
type CustomerTaxExempt string
CustomerTaxExempt is the type of tax exemption associated with a customer.
const ( CustomerTaxExemptExempt CustomerTaxExempt = "exempt" CustomerTaxExemptNone CustomerTaxExempt = "none" CustomerTaxExemptReverse CustomerTaxExempt = "reverse" )
List of values that CustomerTaxExempt can take.
type CustomerTaxIDDataParams ¶
CustomerTaxIDDataParams lets you pass the tax id details associated with a Customer.
type DOBParams ¶
type DOBParams struct { Day *int64 `form:"day"` Month *int64 `form:"month"` Year *int64 `form:"year"` }
DOBParams represents a DOB during account creation/updates.
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" 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.
type DeliveryEstimate ¶
type DeliveryEstimate struct { // If Type == Exact Date string `json:"date"` // If Type == Range Earliest string `json:"earliest"` Latest string `json:"latest"` Type OrderDeliveryEstimateType `json:"type"` }
DeliveryEstimate represent the properties available for a shipping method's estimated delivery.
type DestinationParams ¶
DestinationParams describes the parameters available for the destination hash when creating a charge.
type Discount ¶
type Discount struct { APIResource CheckoutSession *CheckoutSession `json:"checkout_session"` Coupon *Coupon `json:"coupon"` Customer string `json:"customer"` Deleted bool `json:"deleted"` End int64 `json:"end"` ID string `json:"id"` Invoice string `json:"invoice"` InvoiceItem string `json:"invoice_item"` Object string `json:"object"` PromotionCode *PromotionCode `json:"promotion_code"` Start int64 `json:"start"` Subscription string `json:"subscription"` }
Discount is the resource representing a Stripe discount. For more details see https://stripe.com/docs/api#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 DiscountParams ¶
type DiscountParams struct {
Params `form:"*"`
}
DiscountParams is the set of parameters that can be used when deleting a discount.
type Dispute ¶
type Dispute struct { APIResource Amount int64 `json:"amount"` BalanceTransactions []*BalanceTransaction `json:"balance_transactions"` Charge *Charge `json:"charge"` Created int64 `json:"created"` Currency Currency `json:"currency"` Evidence *DisputeEvidence `json:"evidence"` EvidenceDetails *EvidenceDetails `json:"evidence_details"` ID string `json:"id"` IsChargeRefundable bool `json:"is_charge_refundable"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` PaymentIntent *PaymentIntent `json:"payment_intent"` Reason DisputeReason `json:"reason"` Status DisputeStatus `json:"status"` }
Dispute is the resource representing a Stripe dispute. For more details see https://stripe.com/docs/api#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 { AccessActivityLog string `json:"access_activity_log"` BillingAddress string `json:"billing_address"` CancellationPolicy *File `json:"cancellation_policy"` CancellationPolicyDisclosure string `json:"cancellation_policy_disclosure"` CancellationRebuttal string `json:"cancellation_rebuttal"` CustomerCommunication *File `json:"customer_communication"` CustomerEmailAddress string `json:"customer_email_address"` CustomerName string `json:"customer_name"` CustomerPurchaseIP string `json:"customer_purchase_ip"` CustomerSignature *File `json:"customer_signature"` DuplicateChargeDocumentation *File `json:"duplicate_charge_documentation"` DuplicateChargeExplanation string `json:"duplicate_charge_explanation"` DuplicateChargeID string `json:"duplicate_charge_id"` ProductDescription string `json:"product_description"` Receipt *File `json:"receipt"` RefundPolicy *File `json:"refund_policy"` RefundPolicyDisclosure string `json:"refund_policy_disclosure"` RefundRefusalExplanation string `json:"refund_refusal_explanation"` ServiceDate string `json:"service_date"` ServiceDocumentation *File `json:"service_documentation"` ShippingAddress string `json:"shipping_address"` ShippingCarrier string `json:"shipping_carrier"` ShippingDate string `json:"shipping_date"` ShippingDocumentation *File `json:"shipping_documentation"` ShippingTrackingNumber string `json:"shipping_tracking_number"` UncategorizedFile *File `json:"uncategorized_file"` UncategorizedText string `json:"uncategorized_text"` }
DisputeEvidence is the structure that contains various details about the evidence submitted for the dispute. Almost all fields are strings since there structures (i.e. address) do not typically get parsed by anyone and are thus presented as-received.
type DisputeEvidenceParams ¶
type DisputeEvidenceParams struct { AccessActivityLog *string `form:"access_activity_log"` BillingAddress *string `form:"billing_address"` CancellationPolicy *string `form:"cancellation_policy"` CancellationPolicyDisclosure *string `form:"cancellation_policy_disclosure"` CancellationRebuttal *string `form:"cancellation_rebuttal"` CustomerCommunication *string `form:"customer_communication"` CustomerEmailAddress *string `form:"customer_email_address"` CustomerName *string `form:"customer_name"` CustomerPurchaseIP *string `form:"customer_purchase_ip"` CustomerSignature *string `form:"customer_signature"` DuplicateChargeDocumentation *string `form:"duplicate_charge_documentation"` DuplicateChargeExplanation *string `form:"duplicate_charge_explanation"` DuplicateChargeID *string `form:"duplicate_charge_id"` ProductDescription *string `form:"product_description"` Receipt *string `form:"receipt"` RefundPolicy *string `form:"refund_policy"` RefundPolicyDisclosure *string `form:"refund_policy_disclosure"` RefundRefusalExplanation *string `form:"refund_refusal_explanation"` ServiceDate *string `form:"service_date"` ServiceDocumentation *string `form:"service_documentation"` ShippingAddress *string `form:"shipping_address"` ShippingCarrier *string `form:"shipping_carrier"` ShippingDate *string `form:"shipping_date"` ShippingDocumentation *string `form:"shipping_documentation"` ShippingTrackingNumber *string `form:"shipping_tracking_number"` UncategorizedFile *string `form:"uncategorized_file"` UncategorizedText *string `form:"uncategorized_text"` }
DisputeEvidenceParams is the set of parameters that can be used when submitting evidence for disputes.
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:"*"` Charge *string `form:"charge"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` PaymentIntent *string `form:"payment_intent"` }
DisputeListParams is the set of parameters that can be used when listing disputes. For more details see https://stripe.com/docs/api#list_disputes.
type DisputeParams ¶
type DisputeParams struct { Params `form:"*"` Evidence *DisputeEvidenceParams `form:"evidence"` Submit *bool `form:"submit"` }
DisputeParams is the set of parameters that can be used when updating a dispute. For more details see https://stripe.com/docs/api#update_dispute.
type DisputeReason ¶
type DisputeReason string
DisputeReason is the list of allowed values for a discount's reason.
const ( DisputeReasonCreditNotProcessed DisputeReason = "credit_not_processed" DisputeReasonDuplicate DisputeReason = "duplicate" DisputeReasonFraudulent DisputeReason = "fraudulent" DisputeReasonGeneral DisputeReason = "general" 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
DisputeStatus is the list of allowed values for a discount's status.
const ( DisputeStatusChargeRefunded DisputeStatus = "charge_refunded" 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 AssociatedObjects []struct { ID string `json:"id"` Type string `json:"type"` } `json:"associated_objects"` Created int64 `json:"created"` Expires int64 `json:"expires"` ID string `json:"id"` Livemode bool `json:"livemode"` // 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:"-"` }
EphemeralKey is the resource representing a Stripe ephemeral key. This is used by Mobile SDKs to for example manage a Customer's payment methods.
func (*EphemeralKey) UnmarshalJSON ¶
func (e *EphemeralKey) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an EphemeralKey. This custom unmarshaling is needed because we need to store the raw JSON on the object so it may be passed back to the frontend.
type EphemeralKeyParams ¶
type EphemeralKeyParams struct { Params `form:"*"` Customer *string `form:"customer"` IssuingCard *string `form:"issuing_card"` StripeVersion *string `form:"-"` // This goes in the `Stripe-Version` header }
EphemeralKeyParams is the set of parameters that can be used when creating an ephemeral key.
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"` 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 ( ErrorCodeAccountAlreadyExists ErrorCode = "account_already_exists" ErrorCodeAccountCountryInvalidAddress ErrorCode = "account_country_invalid_address" ErrorCodeAccountInvalid ErrorCode = "account_invalid" ErrorCodeAccountNumberInvalid ErrorCode = "account_number_invalid" ErrorCodeAlipayUpgradeRequired ErrorCode = "alipay_upgrade_required" ErrorCodeAmountTooLarge ErrorCode = "amount_too_large" ErrorCodeAmountTooSmall ErrorCode = "amount_too_small" ErrorCodeAPIKeyExpired ErrorCode = "api_key_expired" ErrorCodeAuthenticationRequired ErrorCode = "authentication_required" ErrorCodeBalanceInsufficient ErrorCode = "balance_insufficient" ErrorCodeBankAccountDeclined ErrorCode = "bank_account_declined" ErrorCodeBankAccountExists ErrorCode = "bank_account_exists" ErrorCodeBankAccountUnusable ErrorCode = "bank_account_unusable" ErrorCodeBankAccountUnverified ErrorCode = "bank_account_unverified" ErrorCodeBankAccountVerificationFailed ErrorCode = "bank_account_verification_failed" ErrorCodeBitcoinUpgradeRequired ErrorCode = "bitcoin_upgrade_required" ErrorCodeCardDeclinedRateLimitExceeded ErrorCode = "card_decline_rate_limit_exceeded" ErrorCodeCardDeclined ErrorCode = "card_declined" 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" ErrorCodeCountryUnsupported ErrorCode = "country_unsupported" ErrorCodeCouponExpired ErrorCode = "coupon_expired" ErrorCodeCustomerMaxPaymentMethods ErrorCode = "customer_max_payment_methods" ErrorCodeCustomerMaxSubscriptions ErrorCode = "customer_max_subscriptions" 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" ErrorCodeInstantPayoutsUnsupported ErrorCode = "instant_payouts_unsupported" ErrorCodeInvalidCardType ErrorCode = "invalid_card_type" ErrorCodeInvalidCharacters ErrorCode = "invalid_characters" ErrorCodeInvalidChargeAmount ErrorCode = "invalid_charge_amount" ErrorCodeInvalidCVC ErrorCode = "invalid_cvc" ErrorCodeInvalidExpiryMonth ErrorCode = "invalid_expiry_month" ErrorCodeInvalidExpiryYear ErrorCode = "invalid_expiry_year" ErrorCodeInvalidNumber ErrorCode = "invalid_number" ErrorCodeInvalidSourceUsage ErrorCode = "invalid_source_usage" ErrorCodeInvoiceNoCustomerLineItems ErrorCode = "invoice_no_customer_line_items" ErrorCodeInvoiceNoSubscriptionLineItems ErrorCode = "invoice_no_subscription_line_items" ErrorCodeInvoiceNotEditable ErrorCode = "invoice_not_editable" ErrorCodeInvoicePamentIntentRequiresAction ErrorCode = "invoice_payment_intent_requires_action" ErrorCodeInvoiceUpcomingNone ErrorCode = "invoice_upcoming_none" ErrorCodeLivemodeMismatch ErrorCode = "livemode_mismatch" ErrorCodeLockTimeout ErrorCode = "lock_timeout" ErrorCodeMissing ErrorCode = "missing" ErrorCodeNotAllowedOnStandardAccount ErrorCode = "not_allowed_on_standard_account" ErrorCodeOrderCreationFailed ErrorCode = "order_creation_failed" ErrorCodeOrderRequiredSettings ErrorCode = "order_required_settings" ErrorCodeOrderStatusInvalid ErrorCode = "order_status_invalid" ErrorCodeOrderUpstreamTimeout ErrorCode = "order_upstream_timeout" ErrorCodeOutOfInventory ErrorCode = "out_of_inventory" 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" ErrorCodePaymentIntentPaymentAttemptFailed ErrorCode = "payment_intent_payment_attempt_failed" ErrorCodePaymentIntentUnexpectedState ErrorCode = "payment_intent_unexpected_state" ErrorCodePaymentMethodUnactivated ErrorCode = "payment_method_unactivated" ErrorCodePaymentMethodUnexpectedState ErrorCode = "payment_method_unexpected_state" ErrorCodePayoutsNotAllowed ErrorCode = "payouts_not_allowed" ErrorCodePlatformAPIKeyExpired ErrorCode = "platform_api_key_expired" ErrorCodePostalCodeInvalid ErrorCode = "postal_code_invalid" ErrorCodeProcessingError ErrorCode = "processing_error" ErrorCodeProductInactive ErrorCode = "product_inactive" ErrorCodeRateLimit ErrorCode = "rate_limit" ErrorCodeResourceAlreadyExists ErrorCode = "resource_already_exists" ErrorCodeResourceMissing ErrorCode = "resource_missing" ErrorCodeRoutingNumberInvalid ErrorCode = "routing_number_invalid" ErrorCodeSecretKeyRequired ErrorCode = "secret_key_required" ErrorCodeSepaUnsupportedAccount ErrorCode = "sepa_unsupported_account" ErrorCodeSetupAttemptFailed ErrorCode = "setup_attempt_failed" ErrorCodeSetupIntentAuthenticationFailure ErrorCode = "setup_intent_authentication_failure" ErrorCodeSetupIntentInvalidParameter ErrorCode = "setup_intent_invalid_parameter" ErrorCodeSetupIntentUnexpectedState ErrorCode = "setup_intent_unexpected_state" ErrorCodeShippingCalculationFailed ErrorCode = "shipping_calculation_failed" ErrorCodeSkuInactive ErrorCode = "sku_inactive" ErrorCodeStateUnsupported ErrorCode = "state_unsupported" ErrorCodeTaxIDInvalid ErrorCode = "tax_id_invalid" ErrorCodeTaxesCalculationFailed ErrorCode = "taxes_calculation_failed" ErrorCodeTestmodeChargesOnly ErrorCode = "testmode_charges_only" ErrorCodeTLSVersionUnsupported ErrorCode = "tls_version_unsupported" ErrorCodeTokenAlreadyUsed ErrorCode = "token_already_used" ErrorCodeTokenInUse ErrorCode = "token_in_use" ErrorCodeTransfersNotAllowed ErrorCode = "transfers_not_allowed" ErrorCodeUpstreamOrderCreationFailed ErrorCode = "upstream_order_creation_failed" ErrorCodeURLInvalid ErrorCode = "url_invalid" // The following error code can be returned though is undocumented ErrorCodeInvalidSwipeData ErrorCode = "invalid_swipe_data" )
List of values that ErrorCode can take.
type ErrorType ¶
type ErrorType string
ErrorType is the list of allowed values for the error's type.
const ( ErrorTypeAPI ErrorType = "api_error" ErrorTypeAPIConnection ErrorType = "api_connection_error" ErrorTypeAuthentication ErrorType = "authentication_error" ErrorTypeCard ErrorType = "card_error" ErrorTypeIdempotency ErrorType = "idempotency_error" ErrorTypeInvalidRequest ErrorType = "invalid_request_error" ErrorTypePermission ErrorType = "more_permissions_required" ErrorTypeRateLimit ErrorType = "rate_limit_error" )
List of values that ErrorType can take.
type Event ¶
type Event struct { APIResource Account string `json:"account"` Created int64 `json:"created"` Data *EventData `json:"data"` ID string `json:"id"` Livemode bool `json:"livemode"` PendingWebhooks int64 `json:"pending_webhooks"` Request *EventRequest `json:"request"` Type string `json:"type"` }
Event is the resource representing a Stripe event. For more details see https://stripe.com/docs/api#events.
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 map[string]interface{} `json:"-"` PreviousAttributes map[string]interface{} `json:"previous_attributes"` Raw json.RawMessage `json:"object"` }
EventData is the unmarshalled object as a map.
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"` DeliverySuccess *bool `form:"delivery_success"` Type *string `form:"type"` Types []*string `form:"types"` }
EventListParams is the set of parameters that can be used when listing events. For more details see https://stripe.com/docs/api#list_events.
type EventParams ¶
type EventParams struct {
Params `form:"*"`
}
EventParams is the set of parameters that can be used when retrieving events. For more details see https://stripe.com/docs/api#retrieve_events.
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 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. IdempotencyKey string `json:"idempotency_key"` }
EventRequest contains information on a request that created an event.
type EvidenceDetails ¶
type EvidenceDetails struct { DueBy int64 `json:"due_by"` HasEvidence bool `json:"has_evidence"` PastDue bool `json:"past_due"` SubmissionCount int64 `json:"submission_count"` }
EvidenceDetails is the structure representing more details about the dispute.
type ExternalAccount ¶
type ExternalAccount struct { // BankAccount is a bank account attached to an account. Populated only if // the external account is a bank account. BankAccount *BankAccount // Card is a card attached to an account. Populated only if the external // account is a card. Card *Card ID string `json:"id"` Type ExternalAccountType `json:"object"` }
ExternalAccount is an external account (a bank account or card) that's attached to an account. It contains fields that will be conditionally populated depending on its type.
func (*ExternalAccount) UnmarshalJSON ¶
func (ea *ExternalAccount) UnmarshalJSON(data []byte) error
UnmarshalJSON implements Unmarshaler.UnmarshalJSON.
type ExternalAccountList ¶
type ExternalAccountList struct { APIResource ListMeta // Values contains any external accounts (bank accounts and/or cards) // currently attached to this account. Data []*ExternalAccount `json:"data"` }
ExternalAccountList is a list of external accounts that may be either bank accounts or cards.
type ExternalAccountType ¶
type ExternalAccountType string
ExternalAccountType is the type of an external account.
const ( ExternalAccountTypeBankAccount ExternalAccountType = "bank_account" ExternalAccountTypeCard ExternalAccountType = "card" )
List of values that ExternalAccountType 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 int64 `json:"amount"` BalanceTransaction *BalanceTransaction `json:"balance_transaction"` Created int64 `json:"created"` Currency Currency `json:"currency"` Fee *ApplicationFee `json:"fee"` ID string `json:"id"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` }
FeeRefund is the resource representing a Stripe application fee refund. For more details see https://stripe.com/docs/api#fee_refunds.
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 object for application fee refunds.
type FeeRefundListParams ¶
type FeeRefundListParams struct { ListParams `form:"*"` ApplicationFee *string `form:"-"` // Included in URL }
FeeRefundListParams is the set of parameters that can be used when listing application fee refunds. For more details see https://stripe.com/docs/api#list_fee_refunds.
type FeeRefundParams ¶
type FeeRefundParams struct { Params `form:"*"` ApplicationFee *string `form:"-"` // Included in URL Amount *int64 `form:"amount"` }
FeeRefundParams is the set of parameters that can be used when refunding an application fee. For more details see https://stripe.com/docs/api#fee_refund.
type File ¶
type File struct { APIResource Created int64 `json:"created"` ExpiresAt int64 `json:"expires_at"` Filename string `json:"filename"` ID string `json:"id"` Links *FileLinkList `json:"links"` Object string `json:"object"` Purpose FilePurpose `json:"purpose"` Size int64 `json:"size"` Type string `json:"type"` URL string `json:"url"` }
File is the resource representing a Stripe file. For more details see https://stripe.com/docs/api#file_object.
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:"*"` Create *bool `form:"create"` ExpiresAt *int64 `form:"expires_at"` }
FileFileLinkDataParams is the set of parameters allowed for the file_link_data hash.
type FileLink ¶
type FileLink struct { APIResource Created int64 `json:"created"` Expired bool `json:"expired"` ExpiresAt int64 `json:"expires_at"` File *File `json:"file"` ID string `json:"id"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` URL string `json:"url"` }
FileLink is the resource representing a Stripe file link. For more details see https://stripe.com/docs/api#file_links.
func (*FileLink) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a file link. This custom unmarshaling is needed because the resulting property may be an ID or the full struct if it was expanded.
type FileLinkList ¶
type FileLinkList struct { APIResource ListMeta Data []*FileLink `json:"data"` }
FileLinkList is a list of file links as retrieved from a list endpoint.
type FileLinkListParams ¶
type FileLinkListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Expired *bool `form:"expired"` File *string `form:"file"` }
FileLinkListParams is the set of parameters that can be used when listing file links.
type FileLinkParams ¶
type FileLinkParams struct { Params `form:"*"` ExpiresAt *int64 `form:"expires_at"` File *string `form:"file"` }
FileLinkParams is the set of parameters that can be used when creating or updating a file link.
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"` Purpose *string `form:"purpose"` }
FileListParams is the set of parameters that can be used when listing files. For more details see https://stripe.com/docs/api#list_files.
type FileParams ¶
type FileParams struct { Params `form:"*"` // 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 Purpose *string FileLinkData *FileFileLinkDataParams }
FileParams is the set of parameters that can be used when creating a file. For more details see https://stripe.com/docs/api#create_file.
type FilePurpose ¶
type FilePurpose string
FilePurpose is the purpose of a particular file.
const ( FilePurposeAccountRequirement FilePurpose = "account_requirement" FilePurposeAdditionalVerification FilePurpose = "additional_verification" FilePurposeBusinessIcon FilePurpose = "business_icon" FilePurposeBusinessLogo FilePurpose = "business_logo" FilePurposeCustomerSignature FilePurpose = "customer_signature" FilePurposeDocumentProviderIdentityDocument FilePurpose = "document_provider_identity_document" FilePurposeDisputeEvidence FilePurpose = "dispute_evidence" FilePurposeFinanceReportRun FilePurpose = "finance_report_run" FilePurposeFoundersStockDocument FilePurpose = "founders_stock_document" FilePurposeIdentityDocument FilePurpose = "identity_document" FilePurposePCIDocument FilePurpose = "pci_document" FilePurposeSigmaScheduledQuery FilePurpose = "sigma_scheduled_query" FilePurposeTaxDocumentUserUpload FilePurpose = "tax_document_user_upload" )
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 FraudDetails ¶
type FraudDetails struct { UserReport ChargeFraudUserReport `json:"user_report"` StripeReport ChargeFraudStripeReport `json:"stripe_report"` }
FraudDetails is the structure detailing fraud status.
type FraudDetailsParams ¶
type FraudDetailsParams struct {
UserReport *string `form:"user_report"`
}
FraudDetailsParams provides information on the fraud details for a charge.
type IdempotencyError ¶ added in v72.37.0
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 ¶ added in v72.37.0
func (e *IdempotencyError) Error() string
Error serializes the error object to JSON and returns it as a string.
type IdentityVerificationStatus ¶
type IdentityVerificationStatus string
IdentityVerificationStatus describes the different statuses for identity verification.
const ( IdentityVerificationStatusPending IdentityVerificationStatus = "pending" IdentityVerificationStatusUnverified IdentityVerificationStatus = "unverified" IdentityVerificationStatusVerified IdentityVerificationStatus = "verified" )
List of values that IdentityVerificationStatus 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 Inventory ¶
type Inventory struct { Quantity int64 `json:"quantity"` Type SKUInventoryType `json:"type"` Value SKUInventoryValue `json:"value"` }
Inventory represents the inventory options of a SKU.
type InventoryParams ¶
type InventoryParams struct { Quantity *int64 `form:"quantity"` Type *string `form:"type"` Value *string `form:"value"` }
InventoryParams is the set of parameters allowed as inventory on a SKU.
type Invoice ¶
type Invoice struct { APIResource AccountCountry string `json:"account_country"` AccountName string `json:"account_name"` AccountTaxIDs []*TaxID `json:"account_tax_ids"` AmountDue int64 `json:"amount_due"` AmountPaid int64 `json:"amount_paid"` AmountRemaining int64 `json:"amount_remaining"` ApplicationFeeAmount int64 `json:"application_fee_amount"` AttemptCount int64 `json:"attempt_count"` Attempted bool `json:"attempted"` AutoAdvance bool `json:"auto_advance"` BillingReason InvoiceBillingReason `json:"billing_reason"` Charge *Charge `json:"charge"` CollectionMethod *InvoiceCollectionMethod `json:"collection_method"` Created int64 `json:"created"` Currency Currency `json:"currency"` CustomFields []*InvoiceCustomField `json:"custom_fields"` Customer *Customer `json:"customer"` CustomerAddress *Address `json:"customer_address"` CustomerEmail string `json:"customer_email"` CustomerName *string `json:"customer_name"` CustomerPhone *string `json:"customer_phone"` CustomerShipping *CustomerShippingDetails `json:"customer_shipping"` CustomerTaxExempt CustomerTaxExempt `json:"customer_tax_exempt"` CustomerTaxIDs []*InvoiceCustomerTaxID `json:"customer_tax_ids"` DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"` DefaultSource *PaymentSource `json:"default_source"` DefaultTaxRates []*TaxRate `json:"default_tax_rates"` Deleted bool `json:"deleted"` Description string `json:"description"` Discount *Discount `json:"discount"` Discounts []*Discount `json:"discounts"` DueDate int64 `json:"due_date"` EndingBalance int64 `json:"ending_balance"` HostedInvoiceURL string `json:"hosted_invoice_url"` ID string `json:"id"` InvoicePDF string `json:"invoice_pdf"` LastFinalizationError *Error `json:"last_finalization_error"` Lines *InvoiceLineList `json:"lines"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` NextPaymentAttempt int64 `json:"next_payment_attempt"` Number string `json:"number"` Object string `json:"object"` OnBehalfOf *Account `json:"on_behalf_of"` Paid bool `json:"paid"` PaymentIntent *PaymentIntent `json:"payment_intent"` PaymentSettings *InvoicePaymentSettings `json:"payment_settings"` PeriodEnd int64 `json:"period_end"` PeriodStart int64 `json:"period_start"` PostPaymentCreditNotesAmount int64 `json:"post_payment_credit_notes_amount"` PrePaymentCreditNotesAmount int64 `json:"pre_payment_credit_notes_amount"` ReceiptNumber string `json:"receipt_number"` StartingBalance int64 `json:"starting_balance"` StatementDescriptor string `json:"statement_descriptor"` Status InvoiceStatus `json:"status"` StatusTransitions InvoiceStatusTransitions `json:"status_transitions"` Subscription *Subscription `json:"subscription"` SubscriptionProrationDate int64 `json:"subscription_proration_date"` Subtotal int64 `json:"subtotal"` Tax int64 `json:"tax"` ThreasholdReason *InvoiceThresholdReason `json:"threshold_reason"` Total int64 `json:"total"` TotalDiscountAmounts []*InvoiceDiscountAmount `json:"total_discount_amounts"` TotalTaxAmounts []*InvoiceTaxAmount `json:"total_tax_amounts"` TransferData *InvoiceTransferData `json:"transfer_data"` WebhooksDeliveredAt int64 `json:"webhooks_delivered_at"` }
Invoice is the resource representing a Stripe invoice. For more details see https://stripe.com/docs/api#invoice_object.
Example (Update) ¶
package main import ( "log" stripe "github.com/stripe/stripe-go/v72" "github.com/stripe/stripe-go/v72/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 InvoiceBillingReason ¶
type InvoiceBillingReason string
InvoiceBillingReason is the reason why a given invoice was created
const ( InvoiceBillingReasonManual InvoiceBillingReason = "manual" 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
InvoiceCollectionMethod is the type of collection method for this invoice.
const ( InvoiceCollectionMethodChargeAutomatically InvoiceCollectionMethod = "charge_automatically" InvoiceCollectionMethodSendInvoice InvoiceCollectionMethod = "send_invoice" )
List of values that InvoiceCollectionMethod can take.
type InvoiceCustomField ¶
InvoiceCustomField is a structure representing a custom field on an invoice.
type InvoiceCustomFieldParams ¶
InvoiceCustomFieldParams represents the parameters associated with one custom field on an invoice.
type InvoiceCustomerTaxID ¶
InvoiceCustomerTaxID is a structure representing a customer tax id on an invoice.
type InvoiceDiscountAmount ¶
type InvoiceDiscountAmount struct { Amount int64 `json:"amount"` Discount *Discount `json:"discount"` }
InvoiceDiscountAmount represents the aggregate amounts calculated per discount for all line items.
type InvoiceDiscountParams ¶
type InvoiceDiscountParams struct { Coupon *string `form:"coupon"` Discount *string `form:"discount"` }
InvoiceDiscountParams represents the parameters associated with the discounts to apply to an invoice.
type InvoiceFinalizeParams ¶
InvoiceFinalizeParams is the set of parameters that can be used when finalizing invoices.
type InvoiceItem ¶
type InvoiceItem struct { APIResource Amount int64 `json:"amount"` Currency Currency `json:"currency"` Customer *Customer `json:"customer"` Date int64 `json:"date"` Deleted bool `json:"deleted"` Description string `json:"description"` Discountable bool `json:"discountable"` Discounts []*Discount `json:"discounts"` ID string `json:"id"` Invoice *Invoice `json:"invoice"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Period *Period `json:"period"` Plan *Plan `json:"plan"` Price *Price `json:"price"` Proration bool `json:"proration"` Quantity int64 `json:"quantity"` Subscription *Subscription `json:"subscription"` TaxRates []*TaxRate `json:"tax_rates"` UnitAmount int64 `json:"unit_amount"` UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` }
InvoiceItem is the resource represneting a Stripe invoice item. For more details see https://stripe.com/docs/api#invoiceitems.
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 { Coupon *string `form:"coupon"` Discount *string `form:"discount"` }
InvoiceItemDiscountParams represents the parameters associated with the discounts to apply to an invoice item.
type InvoiceItemList ¶
type InvoiceItemList struct { APIResource ListMeta Data []*InvoiceItem `json:"data"` }
InvoiceItemList is a list of invoice items as retrieved from a list endpoint.
type InvoiceItemListParams ¶
type InvoiceItemListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Customer *string `form:"customer"` Invoice *string `form:"invoice"` Pending *bool `form:"pending"` }
InvoiceItemListParams is the set of parameters that can be used when listing invoice items. For more details see https://stripe.com/docs/api#list_invoiceitems.
type InvoiceItemParams ¶
type InvoiceItemParams struct { Params `form:"*"` Amount *int64 `form:"amount"` Currency *string `form:"currency"` Customer *string `form:"customer"` Description *string `form:"description"` Discountable *bool `form:"discountable"` Discounts []*InvoiceItemDiscountParams `form:"discounts"` Invoice *string `form:"invoice"` Period *InvoiceItemPeriodParams `form:"period"` Price *string `form:"price"` PriceData *InvoiceItemPriceDataParams `form:"price_data"` Quantity *int64 `form:"quantity"` Subscription *string `form:"subscription"` TaxRates []*string `form:"tax_rates"` UnitAmount *int64 `form:"unit_amount"` UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
InvoiceItemParams is the set of parameters that can be used when creating or updating an invoice item. For more details see https://stripe.com/docs/api#create_invoiceitem and https://stripe.com/docs/api#update_invoiceitem.
type InvoiceItemPeriodParams ¶
InvoiceItemPeriodParams represents the period associated with that invoice item.
type InvoiceItemPriceDataParams ¶
type InvoiceItemPriceDataParams struct { Currency *string `form:"currency"` Product *string `form:"product"` UnitAmount *int64 `form:"unit_amount"` UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
InvoiceItemPriceDataParams is a structure representing the parameters to create an inline price.
type InvoiceLine ¶
type InvoiceLine struct { Amount int64 `json:"amount"` Currency Currency `json:"currency"` Description string `json:"description"` Discountable bool `json:"discountable"` Discounts []*Discount `json:"discounts"` DiscountAmounts []*InvoiceLineDiscountAmount `json:"discount_amounts"` ID string `json:"id"` InvoiceItem string `json:"invoice_item"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` Period *Period `json:"period"` Plan *Plan `json:"plan"` Price *Price `json:"price"` Proration bool `json:"proration"` Quantity int64 `json:"quantity"` Subscription string `json:"subscription"` SubscriptionItem string `json:"subscription_item"` TaxAmounts []*InvoiceTaxAmount `json:"tax_amounts"` TaxRates []*TaxRate `json:"tax_rates"` Type InvoiceLineType `json:"type"` UnifiedProration bool `json:"unified_proration"` }
InvoiceLine is the resource representing a Stripe invoice line item. For more details see https://stripe.com/docs/api#invoice_line_item_object.
type InvoiceLineDiscountAmount ¶
type InvoiceLineDiscountAmount struct { Amount int64 `json:"amount"` Discount *Discount `json:"discount"` }
InvoiceLineDiscountAmount represents the amount of discount calculated per discount for this line item.
type InvoiceLineList ¶
type InvoiceLineList struct { APIResource ListMeta Data []*InvoiceLine `json:"data"` }
InvoiceLineList is a list object for invoice line items.
type InvoiceLineListParams ¶
type InvoiceLineListParams struct { ListParams `form:"*"` Customer *string `form:"customer"` // ID is the invoice ID to list invoice lines for. ID *string `form:"-"` // Goes in the URL Subscription *string `form:"subscription"` }
InvoiceLineListParams is the set of parameters that can be used when listing invoice line items. For more details see https://stripe.com/docs/api#invoice_lines.
type InvoiceLineType ¶
type InvoiceLineType string
InvoiceLineType is the list of allowed values for the invoice line's type.
const ( InvoiceLineTypeInvoiceItem InvoiceLineType = "invoiceitem" InvoiceLineTypeSubscription InvoiceLineType = "subscription" )
List of values that InvoiceLineType 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 InvoiceListParams ¶
type InvoiceListParams struct { ListParams `form:"*"` CollectionMethod *string `form:"collection_method"` Customer *string `form:"customer"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` DueDate *int64 `form:"due_date"` DueDateRange *RangeQueryParams `form:"due_date"` Status *string `form:"status"` Subscription *string `form:"subscription"` }
InvoiceListParams is the set of parameters that can be used when listing invoices. For more details see https://stripe.com/docs/api#list_customer_invoices.
type InvoiceMarkUncollectibleParams ¶
type InvoiceMarkUncollectibleParams struct {
Params `form:"*"`
}
InvoiceMarkUncollectibleParams is the set of parameters that can be used when marking invoices as uncollectible.
type InvoiceParams ¶
type InvoiceParams struct { Params `form:"*"` AccountTaxIDs []*string `form:"account_tax_ids"` AutoAdvance *bool `form:"auto_advance"` ApplicationFeeAmount *int64 `form:"application_fee_amount"` CollectionMethod *string `form:"collection_method"` CustomFields []*InvoiceCustomFieldParams `form:"custom_fields"` Customer *string `form:"customer"` DaysUntilDue *int64 `form:"days_until_due"` DefaultPaymentMethod *string `form:"default_payment_method"` DefaultSource *string `form:"default_source"` DefaultTaxRates []*string `form:"default_tax_rates"` Description *string `form:"description"` Discounts []*InvoiceDiscountParams `form:"discounts"` DueDate *int64 `form:"due_date"` OnBehalfOf *string `form:"on_behalf_of"` Paid *bool `form:"paid"` PaymentSettings *InvoicePaymentSettingsParams `form:"payment_settings"` StatementDescriptor *string `form:"statement_descriptor"` Subscription *string `form:"subscription"` TransferData *InvoiceTransferDataParams `form:"transfer_data"` Coupon *string `form:"coupon"` InvoiceItems []*InvoiceUpcomingInvoiceItemParams `form:"invoice_items"` SubscriptionBillingCycleAnchor *int64 `form:"subscription_billing_cycle_anchor"` SubscriptionBillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo SubscriptionBillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo SubscriptionCancelAt *int64 `form:"subscription_cancel_at"` SubscriptionCancelAtPeriodEnd *bool `form:"subscription_cancel_at_period_end"` SubscriptionCancelNow *bool `form:"subscription_cancel_now"` SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"` SubscriptionItems []*SubscriptionItemsParams `form:"subscription_items"` SubscriptionPlan *string `form:"subscription_plan"` SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"` SubscriptionProrationDate *int64 `form:"subscription_proration_date"` SubscriptionQuantity *int64 `form:"subscription_quantity"` SubscriptionStartDate *int64 `form:"subscription_start_date"` SubscriptionTrialEnd *int64 `form:"subscription_trial_end"` SubscriptionTrialEndNow *bool `form:"-"` // See custom AppendTo SubscriptionTrialFromPlan *bool `form:"subscription_trial_from_plan"` }
InvoiceParams is the set of parameters that can be used when creating or updating an invoice. For more details see https://stripe.com/docs/api#create_invoice, https://stripe.com/docs/api#update_invoice.
func (*InvoiceParams) AppendTo ¶
func (p *InvoiceParams) AppendTo(body *form.Values, keyParts []string)
AppendTo implements custom encoding logic for InvoiceParams so that the special "now" value for subscription_billing_cycle_anchor can be implemented (they're otherwise timestamps rather than strings).
type InvoicePayParams ¶
type InvoicePayParams struct { Params `form:"*"` Forgive *bool `form:"forgive"` OffSession *bool `form:"off_session"` PaidOutOfBand *bool `form:"paid_out_of_band"` PaymentMethod *string `form:"payment_method"` Source *string `form:"source"` }
InvoicePayParams is the set of parameters that can be used when paying invoices. For more details, see: https://stripe.com/docs/api#pay_invoice.
type InvoicePaymentSettings ¶ added in v72.33.0
type InvoicePaymentSettings struct { PaymentMethodOptions *InvoicePaymentSettingsPaymentMethodOptions `json:"payment_method_options"` PaymentMethodTypes []InvoicePaymentSettingsPaymentMethodType `json:"payment_method_types"` }
InvoicePaymentSettings represents configuration settings to provide to the invoice's PaymentIntent.
type InvoicePaymentSettingsParams ¶ added in v72.33.0
type InvoicePaymentSettingsParams struct { PaymentMethodOptions *InvoicePaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"` PaymentMethodTypes []*string `form:"payment_method_types"` }
InvoicePaymentSettingsParams is the set of parameters allowed for the payment_settings on an invoice.
type InvoicePaymentSettingsPaymentMethodOptions ¶ added in v72.33.0
type InvoicePaymentSettingsPaymentMethodOptions struct { Bancontact *InvoicePaymentSettingsPaymentMethodOptionsBancontact `json:"bancontact"` Card *InvoicePaymentSettingsPaymentMethodOptionsCard `json:"card"` }
InvoicePaymentSettingsPaymentMethodOptions represents payment-method-specific configuration to provide to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsBancontact ¶ added in v72.33.0
type InvoicePaymentSettingsPaymentMethodOptionsBancontact struct {
PreferredLanguage string `json:"preferred_language"`
}
InvoicePaymentSettingsPaymentMethodOptionsBancontact contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsBancontactParams ¶ added in v72.33.0
type InvoicePaymentSettingsPaymentMethodOptionsBancontactParams struct {
PreferredLanguage *string `form:"preferred_language"`
}
InvoicePaymentSettingsPaymentMethodOptionsBancontactParams is the set of parameters allowed for bancontact on payment_method_options on payment_settings on an invoice.
type InvoicePaymentSettingsPaymentMethodOptionsCard ¶ added in v72.33.0
type InvoicePaymentSettingsPaymentMethodOptionsCard struct {
RequestThreeDSecure InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
}
InvoicePaymentSettingsPaymentMethodOptionsCard contains details about the Card payment method options to pass to the invoice's PaymentIntent.
type InvoicePaymentSettingsPaymentMethodOptionsCardParams ¶ added in v72.33.0
type InvoicePaymentSettingsPaymentMethodOptionsCardParams struct {
RequestThreeDSecure *string `form:"request_three_d_secure"`
}
InvoicePaymentSettingsPaymentMethodOptionsCardParams is the set of parameters allowed for payment method options when using the card payment method.
type InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure ¶ added in v72.33.0
type InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure string
InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure represents the options for requesting 3D Secure.
const ( InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAny InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "any" InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAutomatic InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "automatic" )
List of values that InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure can take.
type InvoicePaymentSettingsPaymentMethodOptionsParams ¶ added in v72.33.0
type InvoicePaymentSettingsPaymentMethodOptionsParams struct { Bancontact *InvoicePaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"` Card *InvoicePaymentSettingsPaymentMethodOptionsCardParams `form:"card"` }
InvoicePaymentSettingsPaymentMethodOptionsParams is the set of parameters allowed for specific payment methods on an invoice's payment settings.
type InvoicePaymentSettingsPaymentMethodType ¶ added in v72.33.0
type InvoicePaymentSettingsPaymentMethodType string
InvoicePaymentSettingsPaymentMethodType represents the payment method type to provide to the invoice's PaymentIntent.
const ( InvoicePaymentSettingsPaymentMethodTypeAchCreditTransfer InvoicePaymentSettingsPaymentMethodType = "ach_credit_transfer" InvoicePaymentSettingsPaymentMethodTypeAchDebit InvoicePaymentSettingsPaymentMethodType = "ach_debit" InvoicePaymentSettingsPaymentMethodTypeAUBECSDebit InvoicePaymentSettingsPaymentMethodType = "au_becs_debit" InvoicePaymentSettingsPaymentMethodTypeBACSDebit InvoicePaymentSettingsPaymentMethodType = "bacs_debit" InvoicePaymentSettingsPaymentMethodTypeBancontact InvoicePaymentSettingsPaymentMethodType = "bancontact" InvoicePaymentSettingsPaymentMethodTypeCard InvoicePaymentSettingsPaymentMethodType = "card" InvoicePaymentSettingsPaymentMethodTypeFPX InvoicePaymentSettingsPaymentMethodType = "fpx" InvoicePaymentSettingsPaymentMethodTypeGiropay InvoicePaymentSettingsPaymentMethodType = "giropay" InvoicePaymentSettingsPaymentMethodTypeIdeal InvoicePaymentSettingsPaymentMethodType = "ideal" InvoicePaymentSettingsPaymentMethodTypeSepaCreditTransfer InvoicePaymentSettingsPaymentMethodType = "sepa_credit_transfer" InvoicePaymentSettingsPaymentMethodTypeSepaDebit InvoicePaymentSettingsPaymentMethodType = "sepa_debit" InvoicePaymentSettingsPaymentMethodTypeSofort InvoicePaymentSettingsPaymentMethodType = "sofort" )
List of values that InvoicePaymentSettingsPaymentMethodType can take.
type InvoiceSendParams ¶
type InvoiceSendParams struct {
Params `form:"*"`
}
InvoiceSendParams is the set of parameters that can be used when sending invoices.
type InvoiceStatus ¶
type InvoiceStatus string
InvoiceStatus is the reason why a given invoice was created
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 { FinalizedAt int64 `json:"finalized_at"` MarkedUncollectibleAt int64 `json:"marked_uncollectible_at"` PaidAt int64 `json:"paid_at"` VoidedAt int64 `json:"voided_at"` }
InvoiceStatusTransitions are the timestamps at which the invoice status was updated.
type InvoiceTaxAmount ¶
type InvoiceTaxAmount struct { Amount int64 `json:"amount"` Inclusive bool `json:"inclusive"` TaxRate *TaxRate `json:"tax_rate"` }
InvoiceTaxAmount is a structure representing one of the tax amounts on an invoice.
type InvoiceThresholdReason ¶
type InvoiceThresholdReason struct { AmountGTE int64 `json:"amount_gte"` ItemReasons []*InvoiceThresholdReasonItemReason `json:"item_reasons"` }
InvoiceThresholdReason is a structure representing a reason for a billing threshold.
type InvoiceThresholdReasonItemReason ¶
type InvoiceThresholdReasonItemReason struct { LineItemIDs []string `json:"line_item_ids"` UsageGTE int64 `json:"usage_gte"` }
InvoiceThresholdReasonItemReason is a structure representing the line items that triggered an invoice.
type InvoiceTransferData ¶
type InvoiceTransferData struct { Amount int64 `json:"amount"` Destination *Account `json:"destination"` }
InvoiceTransferData represents the information for the transfer_data associated with an invoice.
type InvoiceTransferDataParams ¶
type InvoiceTransferDataParams struct { Amount *int64 `form:"amount"` Destination *string `form:"destination"` }
InvoiceTransferDataParams is the set of parameters allowed for the transfer_data hash.
type InvoiceUpcomingInvoiceItemParams ¶
type InvoiceUpcomingInvoiceItemParams struct { Amount *int64 `form:"amount"` Currency *string `form:"currency"` Description *string `form:"description"` Discountable *bool `form:"discountable"` Discounts []*InvoiceItemDiscountParams `form:"discounts"` InvoiceItem *string `form:"invoiceitem"` Period *InvoiceUpcomingInvoiceItemPeriodParams `form:"period"` Price *string `form:"price"` PriceData *InvoiceItemPriceDataParams `form:"price_data"` Quantity *int64 `form:"quantity"` Schedule *string `form:"schedule"` TaxRates []*string `form:"tax_rates"` UnitAmount *int64 `form:"unit_amount"` UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
InvoiceUpcomingInvoiceItemParams is the set of parameters that can be used when adding or modifying invoice items on an upcoming invoice. For more details see https://stripe.com/docs/api#upcoming_invoice-invoice_items.
type InvoiceUpcomingInvoiceItemPeriodParams ¶
type InvoiceUpcomingInvoiceItemPeriodParams struct { End *int64 `form:"end"` Start *int64 `form:"start"` }
InvoiceUpcomingInvoiceItemPeriodParams represents the period associated with that invoice item
type InvoiceVoidParams ¶
type InvoiceVoidParams struct {
Params `form:"*"`
}
InvoiceVoidParams is the set of parameters that can be used when voiding invoices.
type IssuingAuthorization ¶
type IssuingAuthorization struct { APIResource Amount int64 `json:"amount"` AmountDetails *IssuingAuthorizationAmountDetails `json:"amount_details"` Approved bool `json:"approved"` AuthorizationMethod IssuingAuthorizationAuthorizationMethod `json:"authorization_method"` BalanceTransactions []*BalanceTransaction `json:"balance_transactions"` Card *IssuingCard `json:"card"` Cardholder *IssuingCardholder `json:"cardholder"` Created int64 `json:"created"` Currency Currency `json:"currency"` ID string `json:"id"` Livemode bool `json:"livemode"` MerchantAmount int64 `json:"merchant_amount"` MerchantCurrency Currency `json:"merchant_currency"` MerchantData *IssuingAuthorizationMerchantData `json:"merchant_data"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` PendingRequest *IssuingAuthorizationPendingRequest `json:"pending_request"` RequestHistory []*IssuingAuthorizationRequestHistory `json:"request_history"` Status IssuingAuthorizationStatus `json:"status"` Transactions []*IssuingTransaction `json:"transactions"` VerificationData *IssuingAuthorizationVerificationData `json:"verification_data"` Wallet IssuingAuthorizationWalletType `json:"wallet"` }
IssuingAuthorization is the resource representing a Stripe issuing authorization.
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 {
ATMFee int64 `json:"atm_fee"`
}
IssuingAuthorizationAmountDetails is the resource representing the breakdown of the amount.
type IssuingAuthorizationApproveParams ¶
IssuingAuthorizationApproveParams is the set of parameters that can be used when approving an issuing authorization.
type IssuingAuthorizationAuthorizationMethod ¶
type IssuingAuthorizationAuthorizationMethod string
IssuingAuthorizationAuthorizationMethod is the list of possible values for the authorization method on an issuing authorization.
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:"*"`
}
IssuingAuthorizationDeclineParams is the set of parameters that can be used when declining an issuing authorization.
type IssuingAuthorizationList ¶
type IssuingAuthorizationList struct { APIResource ListMeta Data []*IssuingAuthorization `json:"data"` }
IssuingAuthorizationList is a list of issuing authorizations as retrieved from a list endpoint.
type IssuingAuthorizationListParams ¶
type IssuingAuthorizationListParams struct { ListParams `form:"*"` Card *string `form:"card"` Cardholder *string `form:"cardholder"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Status *string `form:"status"` }
IssuingAuthorizationListParams is the set of parameters that can be used when listing issuing authorizations.
type IssuingAuthorizationMerchantData ¶
type IssuingAuthorizationMerchantData struct { Category string `json:"category"` City string `json:"city"` Country string `json:"country"` Name string `json:"name"` NetworkID string `json:"network_id"` PostalCode string `json:"postal_code"` State string `json:"state"` }
IssuingAuthorizationMerchantData is the resource representing merchant data on Issuing APIs.
type IssuingAuthorizationParams ¶
type IssuingAuthorizationParams struct {
Params `form:"*"`
}
IssuingAuthorizationParams is the set of parameters that can be used when updating an issuing authorization.
type IssuingAuthorizationPendingRequest ¶
type IssuingAuthorizationPendingRequest struct { Amount int64 `json:"amount"` AmountDetails *IssuingAuthorizationAmountDetails `json:"amount_details"` Currency Currency `json:"currency"` IsAmountControllable bool `json:"is_amount_controllable"` MerchantAmount int64 `json:"merchant_amount"` MerchantCurrency Currency `json:"merchant_currency"` }
IssuingAuthorizationPendingRequest is the resource representing details about the pending authorization request.
type IssuingAuthorizationRequestHistory ¶
type IssuingAuthorizationRequestHistory struct { Amount int64 `json:"amount"` AmountDetails *IssuingAuthorizationAmountDetails `json:"amount_details"` Approved bool `json:"approved"` Created int64 `json:"created"` Currency Currency `json:"currency"` MerchantAmount int64 `json:"merchant_amount"` MerchantCurrency Currency `json:"merchant_currency"` Reason IssuingAuthorizationRequestHistoryReason `json:"reason"` }
IssuingAuthorizationRequestHistory is the resource representing a request history on an issuing authorization.
type IssuingAuthorizationRequestHistoryReason ¶
type IssuingAuthorizationRequestHistoryReason string
IssuingAuthorizationRequestHistoryReason is the list of possible values for the request history reason on an issuing authorization.
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" IssuingAuthorizationRequestHistoryReasonWebhookTimeout IssuingAuthorizationRequestHistoryReason = "webhook_timeout" )
List of values that IssuingAuthorizationRequestHistoryReason can take.
type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity ¶
type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity string
IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity is the list of possible values for the entity that owns the authorization control.
const ( IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntityAccount IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity = "account" IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntityCard IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity = "card" IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntityCardholder IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity = "cardholder" )
List of values that IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity can take.
type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName ¶
type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName string
IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName is the list of possible values for the name associated with the authorization control.
const ( IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNameAllowedCategories IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName = "allowed_categories" IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNameBlockedCategories IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName = "blocked_categories" IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNameMaxAmount IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName = "max_amount" IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNameMaxApprovals IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName = "max_approvals" IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNameSpendingLimits IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName = "spending_limits" )
List of values that IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName can take.
type IssuingAuthorizationStatus ¶
type IssuingAuthorizationStatus string
IssuingAuthorizationStatus is the possible values for status for an issuing authorization.
const ( IssuingAuthorizationStatusClosed IssuingAuthorizationStatus = "closed" IssuingAuthorizationStatusPending IssuingAuthorizationStatus = "pending" IssuingAuthorizationStatusReversed IssuingAuthorizationStatus = "reversed" )
List of values that IssuingAuthorizationStatus can take.
type IssuingAuthorizationVerificationData ¶
type IssuingAuthorizationVerificationData struct { AddressLine1Check IssuingAuthorizationVerificationDataCheck `json:"address_line1_check"` AddressPostalCodeCheck IssuingAuthorizationVerificationDataCheck `json:"address_postal_code_check"` CVCCheck IssuingAuthorizationVerificationDataCheck `json:"cvc_check"` ExpiryCheck IssuingAuthorizationVerificationDataCheck `json:"expiry_check"` }
IssuingAuthorizationVerificationData is the resource representing verification data on an issuing authorization.
type IssuingAuthorizationVerificationDataCheck ¶
type IssuingAuthorizationVerificationDataCheck string
IssuingAuthorizationVerificationDataCheck is the list of possible values for result of a check for verification data on an issuing authorization.
const ( IssuingAuthorizationVerificationDataCheckMatch IssuingAuthorizationVerificationDataCheck = "match" IssuingAuthorizationVerificationDataCheckMismatch IssuingAuthorizationVerificationDataCheck = "mismatch" IssuingAuthorizationVerificationDataCheckNotProvided IssuingAuthorizationVerificationDataCheck = "not_provided" )
List of values that IssuingAuthorizationVerificationDataCheck can take.
type IssuingAuthorizationWalletType ¶
type IssuingAuthorizationWalletType string
IssuingAuthorizationWalletType is the list of possible values for the authorization's wallet provider.
const ( IssuingAuthorizationWalletTypeApplePay IssuingAuthorizationWalletType = "apple_pay" IssuingAuthorizationWalletTypeGooglePay IssuingAuthorizationWalletType = "google_pay" IssuingAuthorizationWalletTypeSamsungPay IssuingAuthorizationWalletType = "samsung_pay" )
List of values that IssuingAuthorizationWalletType can take.
type IssuingCard ¶
type IssuingCard struct { APIResource Brand string `json:"brand"` CancellationReason IssuingCardCancellationReason `json:"cancellation_reason"` Cardholder *IssuingCardholder `json:"cardholder"` Created int64 `json:"created"` Currency Currency `json:"currency"` CVC string `json:"cvc"` ExpMonth int64 `json:"exp_month"` ExpYear int64 `json:"exp_year"` ID string `json:"id"` Last4 string `json:"last4"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Number string `json:"number"` Object string `json:"object"` ReplacedBy *IssuingCard `json:"replaced_by"` ReplacementFor *IssuingCard `json:"replacement_for"` ReplacementReason IssuingCardReplacementReason `json:"replacement_reason"` Shipping *IssuingCardShipping `json:"shipping"` SpendingControls *IssuingCardSpendingControls `json:"spending_controls"` Status IssuingCardStatus `json:"status"` Type IssuingCardType `json:"type"` }
IssuingCard is the resource representing a Stripe issuing card.
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
IssuingCardCancellationReason is the list of possible values for the cancellation reason on an issuing card.
const ( IssuingCardCancellationReasonLost IssuingCardCancellationReason = "lost" IssuingCardCancellationReasonStolen IssuingCardCancellationReason = "stolen" )
List of values that IssuingCardReplacementReason can take.
type IssuingCardList ¶
type IssuingCardList struct { APIResource ListMeta Data []*IssuingCard `json:"data"` }
IssuingCardList is a list of issuing cards as retrieved from a list endpoint.
type IssuingCardListParams ¶
type IssuingCardListParams struct { ListParams `form:"*"` Cardholder *string `form:"cardholder"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` ExpMonth *int64 `form:"exp_month"` ExpYear *int64 `form:"exp_year"` Last4 *string `form:"last4"` Status *string `form:"status"` Type *string `form:"type"` }
IssuingCardListParams is the set of parameters that can be used when listing issuing cards.
type IssuingCardParams ¶
type IssuingCardParams struct { Params `form:"*"` Cardholder *string `form:"cardholder"` Currency *string `form:"currency"` ReplacementFor *string `form:"replacement_for"` ReplacementReason *string `form:"replacement_reason"` SpendingControls *IssuingCardSpendingControlsParams `form:"spending_controls"` Shipping *IssuingCardShippingParams `form:"shipping"` Status *string `form:"status"` Type *string `form:"type"` // The following parameter is only supported when updating a card CancellationReason *string `form:"cancellation_reason"` }
IssuingCardParams is the set of parameters that can be used when creating or updating an issuing card.
type IssuingCardReplacementReason ¶
type IssuingCardReplacementReason string
IssuingCardReplacementReason is the list of possible values for the replacement reason on an issuing card.
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"` Carrier IssuingCardShippingCarrier `json:"carrier"` ETA int64 `json:"eta"` Name string `json:"name"` Service IssuingCardShippingService `json:"service"` Status IssuingCardShippingStatus `json:"status"` TrackingNumber string `json:"tracking_number"` TrackingURL string `json:"tracking_url"` Type IssuingCardShippingType `json:"type"` }
IssuingCardShipping is the resource representing shipping on an issuing card.
type IssuingCardShippingCarrier ¶
type IssuingCardShippingCarrier string
IssuingCardShippingCarrier is the list of possible values for the shipping carrier on an issuing card.
const ( IssuingCardShippingCarrierFEDEX IssuingCardShippingCarrier = "fedex" IssuingCardShippingCarrierUSPS IssuingCardShippingCarrier = "usps" )
List of values that IssuingCardShippingCarrier can take.
type IssuingCardShippingParams ¶
type IssuingCardShippingParams struct { Address *AddressParams `form:"address"` Name string `form:"name"` Service *string `form:"service"` Type *string `form:"type"` }
IssuingCardShippingParams is the set of parameters that can be used for the shipping parameter.
type IssuingCardShippingService ¶
type IssuingCardShippingService string
IssuingCardShippingService is the shipment service for a card.
const ( IssuingCardShippingServiceExpress IssuingCardShippingService = "express" IssuingCardShippingServicePriority IssuingCardShippingService = "priority" IssuingCardShippingServiceStandard IssuingCardShippingService = "standard" )
List of values that IssuingCardShippingService can take.
type IssuingCardShippingStatus ¶
type IssuingCardShippingStatus string
IssuingCardShippingStatus is the list of possible values for the shipping status on an issuing 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
IssuingCardShippingType is the list of possible values for the shipping type on an issuing card.
const ( IssuingCardShippingTypeBulk IssuingCardShippingType = "bulk" IssuingCardShippingTypeIndividual IssuingCardShippingType = "individual" )
List of values that IssuingCardShippingType can take.
type IssuingCardSpendingControls ¶
type IssuingCardSpendingControls struct { AllowedCategories []string `json:"allowed_categories"` BlockedCategories []string `json:"blocked_categories"` SpendingLimits []*IssuingCardSpendingControlsSpendingLimit `json:"spending_limits"` SpendingLimitsCurrency Currency `json:"spending_limits_currency"` }
IssuingCardSpendingControls is the resource representing spending controls for an issuing card.
type IssuingCardSpendingControlsParams ¶
type IssuingCardSpendingControlsParams struct { AllowedCategories []*string `form:"allowed_categories"` BlockedCategories []*string `form:"blocked_categories"` SpendingLimits []*IssuingCardSpendingControlsSpendingLimitParams `form:"spending_limits"` SpendingLimitsCurrency *string `form:"spending_limits_currency"` }
IssuingCardSpendingControlsParams is the set of parameters that can be used to configure the spending controls for an issuing card
type IssuingCardSpendingControlsSpendingLimit ¶
type IssuingCardSpendingControlsSpendingLimit struct { Amount int64 `json:"amount"` Categories []string `json:"categories"` Interval IssuingCardSpendingControlsSpendingLimitInterval `json:"interval"` }
IssuingCardSpendingControlsSpendingLimit is the resource representing a spending limit for an issuing card.
type IssuingCardSpendingControlsSpendingLimitInterval ¶
type IssuingCardSpendingControlsSpendingLimitInterval string
IssuingCardSpendingControlsSpendingLimitInterval is the list of possible values for the interval for a spending limit on an issuing card.
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 IssuingCardShippingStatus can take.
type IssuingCardSpendingControlsSpendingLimitParams ¶
type IssuingCardSpendingControlsSpendingLimitParams struct { Amount *int64 `form:"amount"` Categories []*string `form:"categories"` Interval *string `form:"interval"` }
IssuingCardSpendingControlsSpendingLimitParams is the set of parameters that can be used to represent a given spending limit for an issuing card.
type IssuingCardStatus ¶
type IssuingCardStatus string
IssuingCardStatus is the list of possible values for status on an issuing card.
const ( IssuingCardStatusActive IssuingCardStatus = "active" IssuingCardStatusCanceled IssuingCardStatus = "canceled" IssuingCardStatusInactive IssuingCardStatus = "inactive" )
List of values that IssuingCardStatus can take.
type IssuingCardType ¶
type IssuingCardType string
IssuingCardType is the type of an issuing card.
const ( IssuingCardTypePhysical IssuingCardType = "physical" IssuingCardTypeVirtual IssuingCardType = "virtual" )
List of values that IssuingCardType can take.
type IssuingCardholder ¶
type IssuingCardholder struct { APIResource Billing *IssuingCardholderBilling `json:"billing"` Company *IssuingCardholderCompany `json:"company"` Created int64 `json:"created"` Email string `json:"email"` ID string `json:"id"` Individual *IssuingCardholderIndividual `json:"individual"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Name string `json:"name"` Object string `json:"object"` PhoneNumber string `json:"phone_number"` Requirements *IssuingCardholderRequirements `json:"requirements"` SpendingControls *IssuingCardholderSpendingControls `json:"spending_controls"` Status IssuingCardholderStatus `json:"status"` Type IssuingCardholderType `json:"type"` }
IssuingCardholder is the resource representing a Stripe issuing 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"`
}
IssuingCardholderBilling is the resource representing the billing hash with the Issuing APIs.
type IssuingCardholderBillingParams ¶
type IssuingCardholderBillingParams struct {
Address *AddressParams `form:"address"`
}
IssuingCardholderBillingParams is the set of parameters that can be used for billing with the Issuing APIs.
type IssuingCardholderCompany ¶
type IssuingCardholderCompany struct {
TaxIDProvided bool `json:"tax_id_provided"`
}
IssuingCardholderCompany represents additional information about a company cardholder.
type IssuingCardholderCompanyParams ¶
type IssuingCardholderCompanyParams struct {
TaxID *string `form:"tax_id"`
}
IssuingCardholderCompanyParams represents additional information about a company cardholder.
type IssuingCardholderIndividual ¶
type IssuingCardholderIndividual struct { DOB *IssuingCardholderIndividualDOB `json:"dob"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Verification *IssuingCardholderIndividualVerification `json:"verification"` }
IssuingCardholderIndividual represents additional information about an individual cardholder.
type IssuingCardholderIndividualDOB ¶
type IssuingCardholderIndividualDOB struct { Day int64 `json:"day"` Month int64 `json:"month"` Year int64 `json:"year"` }
IssuingCardholderIndividualDOB represents the date of birth of the issuing card hoder individual.
type IssuingCardholderIndividualDOBParams ¶
type IssuingCardholderIndividualDOBParams struct { Day *int64 `form:"day"` Month *int64 `form:"month"` Year *int64 `form:"year"` }
IssuingCardholderIndividualDOBParams represents the date of birth of the cardholder individual.
type IssuingCardholderIndividualParams ¶
type IssuingCardholderIndividualParams struct { DOB *IssuingCardholderIndividualDOBParams `form:"dob"` FirstName *string `form:"first_name"` LastName *string `form:"last_name"` Verification *IssuingCardholderIndividualVerificationParams `form:"verification"` }
IssuingCardholderIndividualParams represents additional information about an `individual` cardholder.
type IssuingCardholderIndividualVerification ¶
type IssuingCardholderIndividualVerification struct {
Document *IssuingCardholderIndividualVerificationDocument `json:"document"`
}
IssuingCardholderIndividualVerification represents the Government-issued ID document for this cardholder
type IssuingCardholderIndividualVerificationDocument ¶
type IssuingCardholderIndividualVerificationDocument struct { Back *File `json:"back"` Front *File `json:"front"` }
IssuingCardholderIndividualVerificationDocument represents an identifying document, either a passport or local ID card.
type IssuingCardholderIndividualVerificationDocumentParams ¶
type IssuingCardholderIndividualVerificationDocumentParams struct { Back *string `form:"back"` Front *string `form:"front"` }
IssuingCardholderIndividualVerificationDocumentParams represents an identifying document, either a passport or local ID card.
type IssuingCardholderIndividualVerificationParams ¶
type IssuingCardholderIndividualVerificationParams struct {
Document *IssuingCardholderIndividualVerificationDocumentParams `form:"document"`
}
IssuingCardholderIndividualVerificationParams represents government-issued ID document for this cardholder.
type IssuingCardholderList ¶
type IssuingCardholderList struct { APIResource ListMeta Data []*IssuingCardholder `json:"data"` }
IssuingCardholderList is a list of issuing cardholders as retrieved from a list endpoint.
type IssuingCardholderListParams ¶
type IssuingCardholderListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Email *string `form:"email"` PhoneNumber *string `form:"phone_number"` Status *string `form:"status"` Type *string `form:"type"` }
IssuingCardholderListParams is the set of parameters that can be used when listing issuing cardholders.
type IssuingCardholderParams ¶
type IssuingCardholderParams struct { Params `form:"*"` Billing *IssuingCardholderBillingParams `form:"billing"` Company *IssuingCardholderCompanyParams `form:"company"` Email *string `form:"email"` Individual *IssuingCardholderIndividualParams `form:"individual"` Name *string `form:"name"` PhoneNumber *string `form:"phone_number"` SpendingControls *IssuingCardholderSpendingControlsParams `form:"spending_controls"` Status *string `form:"status"` Type *string `form:"type"` }
IssuingCardholderParams is the set of parameters that can be used when creating or updating an issuing cardholder.
type IssuingCardholderRequirements ¶
type IssuingCardholderRequirements struct { DisabledReason IssuingCardholderRequirementsDisabledReason `json:"disabled_reason"` PastDue []string `json:"past_due"` }
IssuingCardholderRequirements contains the verification requirements for the cardholder.
type IssuingCardholderRequirementsDisabledReason ¶
type IssuingCardholderRequirementsDisabledReason string
IssuingCardholderRequirementsDisabledReason is the possible values for the disabled reason on an issuing cardholder.
const ( IssuingCardholderRequirementsDisabledReasonListed IssuingCardholderRequirementsDisabledReason = "listed" IssuingCardholderRequirementsDisabledReasonRejectedListed IssuingCardholderRequirementsDisabledReason = "rejected.listed" IssuingCardholderRequirementsDisabledReasonUnderReview IssuingCardholderRequirementsDisabledReason = "under_review" )
List of values that IssuingCardholderRequirementsDisabledReason can take.
type IssuingCardholderSpendingControls ¶
type IssuingCardholderSpendingControls struct { AllowedCategories []string `json:"allowed_categories"` BlockedCategories []string `json:"blocked_categories"` SpendingLimits []*IssuingCardholderSpendingControlsSpendingLimit `json:"spending_limits"` SpendingLimitsCurrency Currency `json:"spending_limits_currency"` }
IssuingCardholderSpendingControls is the resource representing spending controls for an issuing cardholder.
type IssuingCardholderSpendingControlsParams ¶
type IssuingCardholderSpendingControlsParams struct { AllowedCategories []*string `form:"allowed_categories"` BlockedCategories []*string `form:"blocked_categories"` SpendingLimits []*IssuingCardholderSpendingControlsSpendingLimitParams `form:"spending_limits"` SpendingLimitsCurrency *string `form:"spending_limits_currency"` }
IssuingCardholderSpendingControlsParams is the set of parameters that can be used to configure the spending controls for an issuing cardholder
type IssuingCardholderSpendingControlsSpendingLimit ¶
type IssuingCardholderSpendingControlsSpendingLimit struct { Amount int64 `json:"amount"` Categories []string `json:"categories"` Interval IssuingCardholderSpendingControlsSpendingLimitInterval `json:"interval"` }
IssuingCardholderSpendingControlsSpendingLimit is the resource representing a spending limit for an issuing cardholder.
type IssuingCardholderSpendingControlsSpendingLimitInterval ¶
type IssuingCardholderSpendingControlsSpendingLimitInterval string
IssuingCardholderSpendingControlsSpendingLimitInterval is the list of possible values for the interval for a spending limit on an issuing cardholder.
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 IssuingCardShippingStatus can take.
type IssuingCardholderSpendingControlsSpendingLimitParams ¶
type IssuingCardholderSpendingControlsSpendingLimitParams struct { Amount *int64 `form:"amount"` Categories []*string `form:"categories"` Interval *string `form:"interval"` }
IssuingCardholderSpendingControlsSpendingLimitParams is the set of parameters that can be used to represent a given spending limit for an issuing cardholder.
type IssuingCardholderStatus ¶
type IssuingCardholderStatus string
IssuingCardholderStatus is the possible values for status on an issuing cardholder.
const ( IssuingCardholderStatusActive IssuingCardholderStatus = "active" IssuingCardholderStatusInactive IssuingCardholderStatus = "inactive" )
List of values that IssuingCardholderStatus can take.
type IssuingCardholderType ¶
type IssuingCardholderType string
IssuingCardholderType is the type of an issuing cardholder.
const ( IssuingCardholderTypeCompany IssuingCardholderType = "company" IssuingCardholderTypeIndividual IssuingCardholderType = "individual" )
List of values that IssuingCardholderType can take.
type IssuingDispute ¶
type IssuingDispute struct { APIResource Amount int64 `json:"amount"` BalanceTransactions []*BalanceTransaction `json:"balance_transactions"` Created int64 `json:"created"` Currency Currency `json:"currency"` Evidence *IssuingDisputeEvidence `json:"evidence"` ID string `json:"id"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` Status *IssuingDisputeStatus `json:"status"` Transaction *IssuingTransaction `json:"transaction"` }
IssuingDispute is the resource representing an issuing dispute.
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 ¶ added in v72.1.0
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"` Reason IssuingDisputeEvidenceReason `json:"reason"` ServiceNotAsDescribed *IssuingDisputeEvidenceServiceNotAsDescribed `json:"service_not_as_described"` }
IssuingDisputeEvidence is the resource representing the evidence of an issuing dispute.
type IssuingDisputeEvidenceCanceled ¶ added in v72.1.0
type IssuingDisputeEvidenceCanceled struct { AdditionalDocumentation *File `json:"additional_documentation"` CanceledAt int64 `json:"canceled_at"` CancellationPolicyProvided bool `json:"cancellation_policy_provided"` CancellationReason string `json:"cancellation_reason"` ExpectedAt int64 `json:"expected_at"` Explanation string `json:"explanation"` ProductDescription string `json:"product_description"` ProductType IssuingDisputeEvidenceCanceledProductType `json:"product_type"` ReturnStatus IssuingDisputeEvidenceCanceledReturnStatus `json:"return_status"` ReturnedAt int64 `json:"returned_at"` }
IssuingDisputeEvidenceCanceled is the resource representing the evidence of an issuing dispute with a reason set to canceled.
type IssuingDisputeEvidenceCanceledParams ¶ added in v72.1.0
type IssuingDisputeEvidenceCanceledParams struct { AdditionalDocumentation *string `form:"additional_documentation"` CanceledAt *int64 `form:"canceled_at"` CancellationPolicyProvided *bool `form:"cancellation_policy_provided"` CancellationReason *string `form:"cancellation_reason"` ExpectedAt *int64 `form:"expected_at"` Explanation *string `form:"explanation"` ProductDescription *string `form:"product_description"` ProductType *string `form:"product_type"` ReturnStatus *string `form:"return_status"` ReturnedAt *int64 `form:"returned_at"` }
IssuingDisputeEvidenceCanceledParams is the resource representing the evidence of an issuing dispute with a reason set to canceled.
type IssuingDisputeEvidenceCanceledProductType ¶ added in v72.1.0
type IssuingDisputeEvidenceCanceledProductType string
IssuingDisputeEvidenceCanceledProductType is the list of allowed product types on an issuing dispute of type canceled.
const ( IssuingDisputeEvidenceCanceledProductTypeMerchandise IssuingDisputeEvidenceCanceledProductType = "merchandise" IssuingDisputeEvidenceCanceledProductTypeService IssuingDisputeEvidenceCanceledProductType = "service" )
List of values that IssuingDisputeEvidenceProductType can take.
type IssuingDisputeEvidenceCanceledReturnStatus ¶ added in v72.1.0
type IssuingDisputeEvidenceCanceledReturnStatus string
IssuingDisputeEvidenceCanceledReturnStatus is the list of allowed return status on an issuing dispute of type canceled.
const ( IssuingDisputeEvidenceCanceledReturnStatusMerchantRejected IssuingDisputeEvidenceCanceledReturnStatus = "merchant_rejected" IssuingDisputeEvidenceCanceledReturnStatusSuccessful IssuingDisputeEvidenceCanceledReturnStatus = "successful" )
List of values that IssuingDisputeEvidenceCanceledReturnStatus can take.
type IssuingDisputeEvidenceDuplicate ¶ added in v72.1.0
type IssuingDisputeEvidenceDuplicate struct { AdditionalDocumentation *File `json:"additional_documentation"` CardStatement *File `json:"card_statement"` CashReceipt *File `json:"cash_receipt"` CheckImage *File `json:"check_image"` Explanation string `json:"explanation"` OriginalTransaction string `json:"original_transaction"` }
IssuingDisputeEvidenceDuplicate is the resource representing the evidence of an issuing dispute with a reason set to duplicate.
type IssuingDisputeEvidenceDuplicateParams ¶ added in v72.1.0
type IssuingDisputeEvidenceDuplicateParams struct { AdditionalDocumentation *string `form:"additional_documentation"` CardStatement *string `form:"card_statement"` CashReceipt *string `form:"cash_receipt"` CheckImage *string `form:"check_image"` Explanation *string `form:"explanation"` OriginalTransaction *string `form:"original_transaction"` }
IssuingDisputeEvidenceDuplicateParams is the resource representing the evidence of an issuing dispute with a reason set to duplicate.
type IssuingDisputeEvidenceFraudulent ¶ added in v72.1.0
type IssuingDisputeEvidenceFraudulent struct { AdditionalDocumentation *File `json:"additional_documentation"` Explanation string `json:"explanation"` }
IssuingDisputeEvidenceFraudulent is the resource representing the evidence of an issuing dispute with a reason set to fraudulent.
type IssuingDisputeEvidenceFraudulentParams ¶ added in v72.1.0
type IssuingDisputeEvidenceFraudulentParams struct { AdditionalDocumentation *string `form:"additional_documentation"` Explanation *string `form:"explanation"` }
IssuingDisputeEvidenceFraudulentParams is the resource representing the evidence of an issuing dispute with a reason set to fraudulent.
type IssuingDisputeEvidenceMerchandiseNotAsDescribed ¶ added in v72.1.0
type IssuingDisputeEvidenceMerchandiseNotAsDescribed struct { AdditionalDocumentation *File `json:"additional_documentation"` Explanation string `json:"explanation"` ReceivedAt int64 `json:"received_at"` ReturnDescription string `json:"return_description"` ReturnStatus IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus `json:"return_status"` ReturnedAt int64 `json:"returned_at"` }
IssuingDisputeEvidenceMerchandiseNotAsDescribed is the resource representing the evidence of an issuing dispute with a reason set to merchandise not as described.
type IssuingDisputeEvidenceMerchandiseNotAsDescribedParams ¶ added in v72.1.0
type IssuingDisputeEvidenceMerchandiseNotAsDescribedParams struct { AdditionalDocumentation *string `form:"additional_documentation"` Explanation *string `form:"explanation"` ReceivedAt *int64 `form:"received_at"` ReturnDescription *string `form:"return_description"` ReturnStatus *string `form:"return_status"` ReturnedAt *int64 `form:"returned_at"` }
IssuingDisputeEvidenceMerchandiseNotAsDescribedParams is the resource representing the evidence of an issuing dispute with a reason set to merchandise not as described.
type IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus ¶ added in v72.1.0
type IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus string
IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus is the list of allowed return status on an issuing dispute of type merchandise not as described.
const ( IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatusMerchantRejected IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus = "merchant_rejected" IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatusSuccessful IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus = "successful" )
List of values that IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus can take.
type IssuingDisputeEvidenceNotReceived ¶ added in v72.1.0
type IssuingDisputeEvidenceNotReceived struct { AdditionalDocumentation *File `json:"additional_documentation"` ExpectedAt int64 `json:"expected_at"` Explanation string `json:"explanation"` ProductDescription string `json:"product_description"` ProductType IssuingDisputeEvidenceNotReceivedProductType `json:"product_type"` }
IssuingDisputeEvidenceNotReceived is the resource representing the evidence of an issuing dispute with a reason set to not received.
type IssuingDisputeEvidenceNotReceivedParams ¶ added in v72.1.0
type IssuingDisputeEvidenceNotReceivedParams struct { AdditionalDocumentation *string `form:"additional_documentation"` ExpectedAt *int64 `form:"expected_at"` Explanation *string `form:"explanation"` ProductDescription *string `form:"product_description"` ProductType *string `form:"product_type"` }
IssuingDisputeEvidenceNotReceivedParams is the resource representing the evidence of an issuing dispute with a reason set to not received.
type IssuingDisputeEvidenceNotReceivedProductType ¶ added in v72.1.0
type IssuingDisputeEvidenceNotReceivedProductType string
IssuingDisputeEvidenceNotReceivedProductType is the list of allowed product types on an issuing dispute of type not received.
const ( IssuingDisputeEvidenceNotReceivedProductTypeMerchandise IssuingDisputeEvidenceNotReceivedProductType = "merchandise" IssuingDisputeEvidenceNotReceivedProductTypeService IssuingDisputeEvidenceNotReceivedProductType = "service" )
List of values that IssuingDisputeEvidenceNotReceivedProductType can take.
type IssuingDisputeEvidenceOther ¶ added in v72.1.0
type IssuingDisputeEvidenceOther struct { AdditionalDocumentation *File `json:"additional_documentation"` Explanation string `json:"explanation"` ProductDescription string `json:"product_description"` ProductType IssuingDisputeEvidenceOtherProductType `json:"product_type"` }
IssuingDisputeEvidenceOther is the resource representing the evidence of an issuing dispute with a reason set to other.
type IssuingDisputeEvidenceOtherParams ¶ added in v72.1.0
type IssuingDisputeEvidenceOtherParams struct { AdditionalDocumentation *string `form:"additional_documentation"` Explanation *string `form:"explanation"` ProductDescription *string `form:"product_description"` ProductType *string `form:"product_type"` }
IssuingDisputeEvidenceOtherParams is the resource representing the evidence of an issuing dispute with a reason set to other.
type IssuingDisputeEvidenceOtherProductType ¶ added in v72.1.0
type IssuingDisputeEvidenceOtherProductType string
IssuingDisputeEvidenceOtherProductType is the list of allowed product types on an issuing dispute of type other.
const ( IssuingDisputeEvidenceOtherProductTypeMerchandise IssuingDisputeEvidenceOtherProductType = "merchandise" IssuingDisputeEvidenceOtherProductTypeService IssuingDisputeEvidenceOtherProductType = "service" )
List of values that IssuingDisputeEvidenceNotReceivedProductType can take.
type IssuingDisputeEvidenceParams ¶ added in v72.1.0
type IssuingDisputeEvidenceParams struct { Canceled *IssuingDisputeEvidenceCanceledParams `form:"canceled"` Duplicate *IssuingDisputeEvidenceDuplicateParams `form:"duplicate"` Fraudulent *IssuingDisputeEvidenceFraudulentParams `form:"fraudulent"` MerchandiseNotAsDescribed *IssuingDisputeEvidenceMerchandiseNotAsDescribedParams `form:"merchandise_not_as_described"` NotReceived *IssuingDisputeEvidenceNotReceivedParams `form:"not_received"` Other *IssuingDisputeEvidenceOtherParams `form:"other"` Reason *string `form:"reason"` ServiceNotAsDescribed *IssuingDisputeEvidenceServiceNotAsDescribedParams `form:"service_not_as_described"` }
IssuingDisputeEvidenceParams is the set of parameters for the evidence on an issuing dispute
type IssuingDisputeEvidenceReason ¶ added in v72.1.0
type IssuingDisputeEvidenceReason string
IssuingDisputeEvidenceReason is the list of allowed reasons for the evidence on an issuing dispute.
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 ¶ added in v72.1.0
type IssuingDisputeEvidenceServiceNotAsDescribed struct { AdditionalDocumentation *File `json:"additional_documentation"` CanceledAt int64 `json:"canceled_at"` Explanation string `json:"explanation"` ProductDescription string `json:"product_description"` ProductType IssuingDisputeEvidenceServiceNotAsDescribedProductType `json:"product_type"` }
IssuingDisputeEvidenceServiceNotAsDescribed is the resource representing the evidence of an issuing dispute with a reason set to service not as described.
type IssuingDisputeEvidenceServiceNotAsDescribedParams ¶ added in v72.1.0
type IssuingDisputeEvidenceServiceNotAsDescribedParams struct { AdditionalDocumentation *string `form:"additional_documentation"` CanceledAt *int64 `form:"canceled_at"` Explanation *string `form:"explanation"` ProductDescription *string `form:"product_description"` ProductType *string `form:"product_type"` }
IssuingDisputeEvidenceServiceNotAsDescribedParams is the resource representing the evidence of an issuing dispute with a reason set to service not as described.
type IssuingDisputeEvidenceServiceNotAsDescribedProductType ¶ added in v72.1.0
type IssuingDisputeEvidenceServiceNotAsDescribedProductType string
IssuingDisputeEvidenceServiceNotAsDescribedProductType is the list of allowed product types on an issuing dispute of type service not as described.
const ( IssuingDisputeEvidenceServiceNotAsDescribedProductTypeMerchandise IssuingDisputeEvidenceServiceNotAsDescribedProductType = "merchandise" IssuingDisputeEvidenceServiceNotAsDescribedProductTypeService IssuingDisputeEvidenceServiceNotAsDescribedProductType = "service" )
List of values that IssuingDisputeEvidenceServiceNotAsDescribedProductType can take.
type IssuingDisputeList ¶
type IssuingDisputeList struct { APIResource ListMeta Data []*IssuingDispute `json:"data"` }
IssuingDisputeList is a list of issuing disputes as retrieved from a list endpoint.
type IssuingDisputeListParams ¶
type IssuingDisputeListParams struct { ListParams `form:"*"` Status *string `form:"status"` Transaction *string `form:"transaction"` }
IssuingDisputeListParams is the set of parameters that can be used when listing issuing dispute.
type IssuingDisputeParams ¶
type IssuingDisputeParams struct { Params `form:"*"` Evidence *IssuingDisputeEvidenceParams `form:"evidence"` Transaction *string `form:"transaction"` }
IssuingDisputeParams is the set of parameters that can be used when creating or updating an issuing dispute.
type IssuingDisputeStatus ¶ added in v72.1.0
type IssuingDisputeStatus string
IssuingDisputeStatus is the list of allowed values for status on an issuing 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 ¶ added in v72.1.0
type IssuingDisputeSubmitParams struct {
Params `form:"*"`
}
IssuingDisputeSubmitParams is the set of parameters that can be used when submitting an issuing dispute.
type IssuingTransaction ¶
type IssuingTransaction struct { APIResource Amount int64 `json:"amount"` AmountDetails *IssuingTransactionAmountDetails `json:"amount_details"` Authorization *IssuingAuthorization `json:"authorization"` BalanceTransaction *BalanceTransaction `json:"balance_transaction"` Card *IssuingCard `json:"card"` Cardholder *IssuingCardholder `json:"cardholder"` Created int64 `json:"created"` Currency Currency `json:"currency"` Dispute *IssuingDispute `json:"dispute"` ID string `json:"id"` Livemode bool `json:"livemode"` MerchantData *IssuingAuthorizationMerchantData `json:"merchant_data"` MerchantAmount int64 `json:"merchant_amount"` MerchantCurrency Currency `json:"merchant_currency"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` PurchaseDetails *IssuingTransactionPurchaseDetails `json:"purchase_details"` Type IssuingTransactionType `json:"type"` }
IssuingTransaction is the resource representing a Stripe issuing transaction.
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 {
ATMFee int64 `json:"atm_fee"`
}
IssuingTransactionAmountDetails is the resource representing the breakdown of the amount.
type IssuingTransactionList ¶
type IssuingTransactionList struct { APIResource ListMeta Data []*IssuingTransaction `json:"data"` }
IssuingTransactionList is a list of issuing transactions as retrieved from a list endpoint.
type IssuingTransactionListParams ¶
type IssuingTransactionListParams struct { ListParams `form:"*"` Card *string `form:"card"` Cardholder *string `form:"cardholder"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Type *string `form:"type"` }
IssuingTransactionListParams is the set of parameters that can be used when listing issuing transactions.
type IssuingTransactionParams ¶
type IssuingTransactionParams struct {
Params `form:"*"`
}
IssuingTransactionParams is the set of parameters that can be used when creating or updating an issuing transaction.
type IssuingTransactionPurchaseDetails ¶
type IssuingTransactionPurchaseDetails struct { Flight *IssuingTransactionPurchaseDetailsFlight `json:"flight"` Fuel *IssuingTransactionPurchaseDetailsFuel `json:"fuel"` Lodging *IssuingTransactionPurchaseDetailsLodging `json:"lodging"` Receipt []*IssuingTransactionPurchaseDetailsReceipt `json:"receipt"` Reference string `json:"reference"` }
IssuingTransactionPurchaseDetails contains extra information provided by the merchant.
type IssuingTransactionPurchaseDetailsFlight ¶
type IssuingTransactionPurchaseDetailsFlight struct { DepartureAt int64 `json:"departure_at"` PassengerName string `json:"passenger_name"` Refundable bool `json:"refundable"` Segments []*IssuingTransactionPurchaseDetailsFlightSegment `json:"segments"` TravelAgency string `json:"travel_agency"` }
IssuingTransactionPurchaseDetailsFlight contains extra information about the flight in this transaction.
type IssuingTransactionPurchaseDetailsFlightSegment ¶
type IssuingTransactionPurchaseDetailsFlightSegment struct { ArrivalAirportCode string `json:"arrival_airport_code"` Carrier string `json:"carrier"` DepartureAirportCode string `json:"departure_airport_code"` FlightNumber string `json:"flight_number"` ServiceClass string `json:"service_class"` StopoverAllowed bool `json:"stopover_allowed"` }
IssuingTransactionPurchaseDetailsFlightSegment contains extra information about the flight in this transaction.
type IssuingTransactionPurchaseDetailsFuel ¶
type IssuingTransactionPurchaseDetailsFuel struct { Type IssuingTransactionPurchaseDetailsFuelType `json:"type"` Unit IssuingTransactionPurchaseDetailsFuelUnit `json:"unit"` UnitCostDecimal float64 `json:"unit_cost_decimal,string"` VolumeDecimal float64 `json:"volume_decimal,string"` }
IssuingTransactionPurchaseDetailsFuel contains extra information about the fuel purchase in this transaction.
type IssuingTransactionPurchaseDetailsFuelType ¶
type IssuingTransactionPurchaseDetailsFuelType string
IssuingTransactionPurchaseDetailsFuelType is the type of fuel purchased in a transaction.
const ( IssuingTransactionPurchaseDetailsFuelTypeDiesel IssuingTransactionPurchaseDetailsFuelType = "diesel" IssuingTransactionPurchaseDetailsFuelTypeOther IssuingTransactionPurchaseDetailsFuelType = "other" IssuingTransactionPurchaseDetailsFuelTypeUnleadedPlus IssuingTransactionPurchaseDetailsFuelType = "unleaded_plus" IssuingTransactionPurchaseDetailsFuelTypeUnleadedRegular IssuingTransactionPurchaseDetailsFuelType = "unleaded_regular" IssuingTransactionPurchaseDetailsFuelTypeUnleadedSuper IssuingTransactionPurchaseDetailsFuelType = "unleaded_super" )
List of values that IssuingTransactionType can take.
type IssuingTransactionPurchaseDetailsFuelUnit ¶
type IssuingTransactionPurchaseDetailsFuelUnit string
IssuingTransactionPurchaseDetailsFuelUnit is the unit of fuel purchased in a transaction.
const ( IssuingTransactionPurchaseDetailsFuelUnitLiter IssuingTransactionPurchaseDetailsFuelUnit = "liter" IssuingTransactionPurchaseDetailsFuelUnitUSGallon IssuingTransactionPurchaseDetailsFuelUnit = "us_gallon" )
List of values that IssuingTransactionPurchaseDetailsFuelUnit can take.
type IssuingTransactionPurchaseDetailsLodging ¶
type IssuingTransactionPurchaseDetailsLodging struct { CheckInAt int64 `json:"check_in_at"` Nights int64 `json:"nights"` }
IssuingTransactionPurchaseDetailsLodging contains extra information about the lodging purchase in this transaction.
type IssuingTransactionPurchaseDetailsReceipt ¶
type IssuingTransactionPurchaseDetailsReceipt struct { Description string `json:"description"` Quantity float64 `json:"quantity"` Total int64 `json:"total"` UnitCost int64 `json:"unit_cost"` }
IssuingTransactionPurchaseDetailsReceipt contains extra information about the line items this transaction.
type IssuingTransactionType ¶
type IssuingTransactionType string
IssuingTransactionType is the type of an issuing transaction.
const ( IssuingTransactionTypeCapture IssuingTransactionType = "capture" IssuingTransactionTypeRefund IssuingTransactionType = "refund" )
List of values that IssuingTransactionType 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 { APIResource AmountSubtotal int64 `json:"amount_subtotal"` AmountTotal int64 `json:"amount_total"` Currency Currency `json:"currency"` Description string `json:"description"` Discounts []*LineItemDiscount `json:"discounts"` Deleted bool `json:"deleted"` ID string `json:"id"` Object string `json:"object"` Price *Price `json:"price"` Quantity int64 `json:"quantity"` Taxes []*LineItemTax `json:"taxes"` }
LineItem is the resource representing a line item.
func (*LineItem) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a LineItem. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type LineItemDiscount ¶
LineItemDiscount represent the details of one discount applied to a line item.
type LineItemList ¶
type LineItemList struct { APIResource ListMeta Data []*LineItem `json:"data"` }
LineItemList is a list of prices as returned from a list endpoint.
type LineItemTax ¶
type LineItemTax struct { Amount int64 `json:"amount"` Rate *TaxRate `json:"rate"` // This property never worked. Use Rate instead. // TODO: Remove in the next major version TaxRate *TaxRate `json:"tax_rate"` }
LineItemTax represent the details of one tax rate applied to a line item.
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"` 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 appends a new field to expand.
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 Created int64 `json:"created"` Object string `json:"object"` URL string `json:"url"` }
LoginLink is the resource representing a login link for Express accounts. For more details see https://stripe.com/docs/api#login_link_object
type LoginLinkParams ¶
type LoginLinkParams struct { Params `form:"*"` Account *string `form:"-"` // Included in URL RedirectURL *string `form:"redirect_url"` }
LoginLinkParams is the set of parameters that can be used when creating a login_link. For more details see https://stripe.com/docs/api#create_login_link.
type Mandate ¶
type Mandate struct { APIResource CustomerAcceptance *MandateCustomerAcceptance `json:"customer_acceptance"` ID string `json:"id"` Livemode bool `json:"livemode"` MultiUse *MandateMultiUse `json:"multi_use"` Object string `json:"object"` PaymentMethod *PaymentMethod `json:"payment_method"` PaymentMethodDetails *MandatePaymentMethodDetails `json:"payment_method_details"` SingleUse *MandateSingleUse `json:"single_use"` Status MandateStatus `json:"status"` Type MandateType `json:"type"` }
Mandate is the resource representing a Mandate.
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 { AcceptedAt int64 `json:"accepted_at"` Offline *MandateCustomerAcceptanceOffline `json:"offline"` Online *MandateCustomerAcceptanceOnline `json:"online"` Type MandateCustomerAcceptanceType `json:"type"` }
MandateCustomerAcceptance represents details about the customer acceptance for a mandate.
type MandateCustomerAcceptanceOffline ¶
type MandateCustomerAcceptanceOffline struct { }
MandateCustomerAcceptanceOffline represents details about the customer acceptance of an offline mandate.
type MandateCustomerAcceptanceOnline ¶
type MandateCustomerAcceptanceOnline struct { IPAddress string `json:"ip_address"` UserAgent string `json:"user_agent"` }
MandateCustomerAcceptanceOnline represents details about the customer acceptance of an online mandate.
type MandateCustomerAcceptanceType ¶
type MandateCustomerAcceptanceType string
MandateCustomerAcceptanceType is the list of allowed values for the type of customer acceptance for a given mandate.
const ( MandateCustomerAcceptanceTypeOffline MandateCustomerAcceptanceType = "offline" MandateCustomerAcceptanceTypeOnline MandateCustomerAcceptanceType = "online" )
List of values that MandateStatus can take.
type MandateMultiUse ¶
type MandateMultiUse struct { }
MandateMultiUse represents details about a multi-use mandate.
type MandateParams ¶
type MandateParams struct {
Params `form:"*"`
}
MandateParams is the set of parameters that can be used when retrieving a mandate.
type MandatePaymentMethodDetails ¶
type MandatePaymentMethodDetails struct { AUBECSDebit *MandatePaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"` BACSDebit *MandatePaymentMethodDetailsBACSDebit `json:"bacs_debit"` Card *MandatePaymentMethodDetailsCard `json:"card"` SepaDebit *MandatePaymentMethodDetailsSepaDebit `json:"sepa_debit"` Type PaymentMethodType `json:"type"` }
MandatePaymentMethodDetails represents details about the payment method associated with this mandate.
type MandatePaymentMethodDetailsAUBECSDebit ¶
type MandatePaymentMethodDetailsAUBECSDebit struct {
URL string `json:"url"`
}
MandatePaymentMethodDetailsAUBECSDebit represents details about the Australia BECS debit account associated with this mandate.
type MandatePaymentMethodDetailsBACSDebit ¶
type MandatePaymentMethodDetailsBACSDebit struct { NetworkStatus MandatePaymentMethodDetailsBACSDebitNetworkStatus `json:"network_status"` Reference string `json:"reference"` URL string `json:"url"` }
MandatePaymentMethodDetailsBACSDebit represents details about the BACS debit account associated with this mandate.
type MandatePaymentMethodDetailsBACSDebitNetworkStatus ¶
type MandatePaymentMethodDetailsBACSDebitNetworkStatus string
MandatePaymentMethodDetailsBACSDebitNetworkStatus is the list of allowed values for the status with the network for a given mandate.
const ( MandatePaymentMethodDetailsBACSDebitNetworkStatusAccepted MandatePaymentMethodDetailsBACSDebitNetworkStatus = "accepted" MandatePaymentMethodDetailsBACSDebitNetworkStatusPending MandatePaymentMethodDetailsBACSDebitNetworkStatus = "pending" MandatePaymentMethodDetailsBACSDebitNetworkStatusRefused MandatePaymentMethodDetailsBACSDebitNetworkStatus = "refused" MandatePaymentMethodDetailsBACSDebitNetworkStatusRevoked MandatePaymentMethodDetailsBACSDebitNetworkStatus = "revoked" )
List of values that MandateStatus can take.
type MandatePaymentMethodDetailsCard ¶
type MandatePaymentMethodDetailsCard struct { }
MandatePaymentMethodDetailsCard represents details about the card associated with this mandate.
type MandatePaymentMethodDetailsSepaDebit ¶
type MandatePaymentMethodDetailsSepaDebit struct { Reference string `json:"reference"` URL string `json:"url"` }
MandatePaymentMethodDetailsSepaDebit represents details about the SEPA debit bank account associated with this mandate.
type MandateSingleUse ¶
MandateSingleUse represents details about a single-use mandate.
type MandateStatus ¶
type MandateStatus string
MandateStatus is the list of allowed values for the mandate status.
const ( MandateStatusActive MandateStatus = "active" MandateStatusInactive MandateStatus = "inactive" MandateStatusPending MandateStatus = "pending" )
List of values that MandateStatus can take.
type MandateType ¶
type MandateType string
MandateType is the list of allowed values for the mandate type.
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 Order ¶
type Order struct { APIResource Amount int64 `json:"amount"` AmountReturned int64 `json:"amount_returned"` Application string `json:"application"` ApplicationFee int64 `json:"application_fee"` Charge *Charge `json:"charge"` Created int64 `json:"created"` Currency Currency `json:"currency"` Customer Customer `json:"customer"` Email string `json:"email"` ID string `json:"id"` Items []*OrderItem `json:"items"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Returns *OrderReturnList `json:"returns"` SelectedShippingMethod *string `json:"selected_shipping_method"` Shipping *Shipping `json:"shipping"` ShippingMethods []*ShippingMethod `json:"shipping_methods"` Status string `json:"status"` StatusTransitions StatusTransitions `json:"status_transitions"` Updated int64 `json:"updated"` UpstreamID string `json:"upstream_id"` }
Order is the resource representing a Stripe charge. For more details see https://stripe.com/docs/api#orders.
func (*Order) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of an Order. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type OrderDeliveryEstimateType ¶
type OrderDeliveryEstimateType string
OrderDeliveryEstimateType represents the type of delivery estimate for shipping methods
const ( OrderDeliveryEstimateTypeExact OrderDeliveryEstimateType = "exact" OrderDeliveryEstimateTypeRange OrderDeliveryEstimateType = "range" )
List of values that OrderDeliveryEstimateType can take.
type OrderItem ¶
type OrderItem struct { Amount int64 `json:"amount"` Currency Currency `json:"currency"` Description string `json:"description"` Parent *OrderItemParent `json:"parent"` Quantity int64 `json:"quantity"` Type OrderItemType `json:"type"` }
OrderItem is the resource representing an order item.
type OrderItemParams ¶
type OrderItemParams struct { Amount *int64 `form:"amount"` Currency *string `form:"currency"` Description *string `form:"description"` Parent *string `form:"parent"` Quantity *int64 `form:"quantity"` Type *string `form:"type"` }
OrderItemParams is the set of parameters describing an order item on order creation or update.
type OrderItemParent ¶
type OrderItemParent struct { ID string `json:"id"` SKU *SKU `json:"-"` Type OrderItemParentType `json:"object"` }
OrderItemParent describes the parent of an order item.
func (*OrderItemParent) UnmarshalJSON ¶
func (p *OrderItemParent) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an OrderItemParent. This custom unmarshaling is needed because the resulting property may be an id or a full SKU struct if it was expanded.
type OrderItemParentType ¶
type OrderItemParentType string
OrderItemParentType represents the type of order item parent
const ( OrderItemParentTypeCoupon OrderItemParentType = "coupon" OrderItemParentTypeDiscount OrderItemParentType = "discount" OrderItemParentTypeSKU OrderItemParentType = "sku" OrderItemParentTypeShipping OrderItemParentType = "shipping" OrderItemParentTypeTax OrderItemParentType = "tax" )
List of values that OrderItemParentType can take.
type OrderItemType ¶
type OrderItemType string
OrderItemType represents the type of order item
const ( OrderItemTypeCoupon OrderItemType = "coupon" OrderItemTypeDiscount OrderItemType = "discount" OrderItemTypeSKU OrderItemType = "sku" OrderItemTypeShipping OrderItemType = "shipping" OrderItemTypeTax OrderItemType = "tax" )
List of values that OrderItemType can take.
type OrderList ¶
type OrderList struct { APIResource ListMeta Data []*Order `json:"data"` }
OrderList is a list of orders as retrieved from a list endpoint.
type OrderListParams ¶
type OrderListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Customer *string `form:"customer"` IDs []*string `form:"ids"` Status *string `form:"status"` StatusTransitions *StatusTransitionsFilterParams `form:"status_transitions"` UpstreamIDs []*string `form:"upstream_ids"` }
OrderListParams is the set of parameters that can be used when listing orders.
type OrderParams ¶
type OrderParams struct { Params `form:"*"` Coupon *string `form:"coupon"` Currency *string `form:"currency"` Customer *string `form:"customer"` Email *string `form:"email"` Items []*OrderItemParams `form:"items"` Shipping *ShippingParams `form:"shipping"` }
OrderParams is the set of parameters that can be used when creating an order.
type OrderPayParams ¶
type OrderPayParams struct { Params `form:"*"` ApplicationFee *int64 `form:"application_fee"` Customer *string `form:"customer"` Email *string `form:"email"` Source *SourceParams `form:"*"` // SourceParams has custom encoding so brought to top level with "*" }
OrderPayParams is the set of parameters that can be used when paying orders.
func (*OrderPayParams) SetSource ¶
func (op *OrderPayParams) SetSource(sp interface{}) error
SetSource adds valid sources to a OrderParams object, returning an error for unsupported sources.
type OrderReturn ¶
type OrderReturn struct { APIResource Amount int64 `json:"amount"` Created int64 `json:"created"` Currency Currency `json:"currency"` ID string `json:"id"` Items []*OrderItem `json:"items"` Livemode bool `json:"livemode"` Order *Order `json:"order"` Refund *Refund `json:"refund"` }
OrderReturn is the resource representing an order return. For more details see https://stripe.com/docs/api#order_returns.
func (*OrderReturn) UnmarshalJSON ¶
func (r *OrderReturn) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an OrderReturn. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type OrderReturnList ¶
type OrderReturnList struct { APIResource ListMeta Data []*OrderReturn `json:"data"` }
OrderReturnList is a list of order returns as retrieved from a list endpoint.
type OrderReturnListParams ¶
type OrderReturnListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Order *string `form:"order"` }
OrderReturnListParams is the set of parameters that can be used when listing order returns.
type OrderReturnParams ¶
type OrderReturnParams struct { Params `form:"*"` Items []*OrderItemParams `form:"items"` Order *string `form:"-"` // Included in the URL }
OrderReturnParams is the set of parameters that can be used when returning orders.
type OrderStatus ¶
type OrderStatus string
OrderStatus represents the statuses of an order object.
const ( OrderStatusCanceled OrderStatus = "canceled" OrderStatusCreated OrderStatus = "created" OrderStatusFulfilled OrderStatus = "fulfilled" OrderStatusPaid OrderStatus = "paid" OrderStatusReturned OrderStatus = "returned" )
List of values that OrderStatus can take.
type OrderUpdateParams ¶
type OrderUpdateParams struct { Params `form:"*"` Coupon *string `form:"coupon"` SelectedShippingMethod *string `form:"selected_shipping_method"` Shipping *OrderUpdateShippingParams `form:"shipping"` Status *string `form:"status"` }
OrderUpdateParams is the set of parameters that can be used when updating an order.
type OrderUpdateShippingParams ¶
type OrderUpdateShippingParams struct { Carrier *string `form:"carrier"` TrackingNumber *string `form:"tracking_number"` }
OrderUpdateShippingParams is the set of parameters that can be used for the shipping hash on order update.
type PackageDimensions ¶
type PackageDimensions struct { Height float64 `json:"height"` Length float64 `json:"length"` Weight float64 `json:"weight"` Width float64 `json:"width"` }
PackageDimensions represents the dimension of a product or a SKU from the perspective of shipping.
type PackageDimensionsParams ¶
type PackageDimensionsParams struct { Height *float64 `form:"height"` Length *float64 `form:"length"` Weight *float64 `form:"weight"` Width *float64 `form:"width"` }
PackageDimensionsParams represents the set of parameters for the the dimension of a product or a SKU from the perspective of shipping .
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:"-"` 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 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) AddMetadata ¶
AddMetadata adds a new key-value pair to the Metadata.
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 int64 `json:"amount"` AmountCapturable int64 `json:"amount_capturable"` AmountReceived int64 `json:"amount_received"` Application *Application `json:"application"` ApplicationFeeAmount int64 `json:"application_fee_amount"` CanceledAt int64 `json:"canceled_at"` CancellationReason PaymentIntentCancellationReason `json:"cancellation_reason"` CaptureMethod PaymentIntentCaptureMethod `json:"capture_method"` Charges *ChargeList `json:"charges"` ClientSecret string `json:"client_secret"` ConfirmationMethod PaymentIntentConfirmationMethod `json:"confirmation_method"` Created int64 `json:"created"` Currency string `json:"currency"` Customer *Customer `json:"customer"` Description string `json:"description"` Invoice *Invoice `json:"invoice"` LastPaymentError *Error `json:"last_payment_error"` Livemode bool `json:"livemode"` ID string `json:"id"` Metadata map[string]string `json:"metadata"` NextAction *PaymentIntentNextAction `json:"next_action"` OnBehalfOf *Account `json:"on_behalf_of"` PaymentMethod *PaymentMethod `json:"payment_method"` PaymentMethodOptions *PaymentIntentPaymentMethodOptions `json:"payment_method_options"` PaymentMethodTypes []string `json:"payment_method_types"` ReceiptEmail string `json:"receipt_email"` Review *Review `json:"review"` SetupFutureUsage PaymentIntentSetupFutureUsage `json:"setup_future_usage"` Shipping ShippingDetails `json:"shipping"` Source *PaymentSource `json:"source"` StatementDescriptor string `json:"statement_descriptor"` StatementDescriptorSuffix string `json:"statement_descriptor_suffix"` Status PaymentIntentStatus `json:"status"` TransferData *PaymentIntentTransferData `json:"transfer_data"` TransferGroup string `json:"transfer_group"` }
PaymentIntent is the resource representing a Stripe payout. For more details see https://stripe.com/docs/api#payment_intents.
func (*PaymentIntent) UnmarshalJSON ¶
func (p *PaymentIntent) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a Payment Intent. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type PaymentIntentCancelParams ¶
type PaymentIntentCancelParams struct { Params `form:"*"` CancellationReason *string `form:"cancellation_reason"` }
PaymentIntentCancelParams is the set of parameters that can be used when canceling a payment intent.
type PaymentIntentCancellationReason ¶
type PaymentIntentCancellationReason string
PaymentIntentCancellationReason is the list of allowed values for the cancelation reason.
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
PaymentIntentCaptureMethod is the list of allowed values for the capture method.
const ( PaymentIntentCaptureMethodAutomatic PaymentIntentCaptureMethod = "automatic" PaymentIntentCaptureMethodManual PaymentIntentCaptureMethod = "manual" )
List of values that PaymentIntentCaptureMethod can take.
type PaymentIntentCaptureParams ¶
type PaymentIntentCaptureParams struct { Params `form:"*"` AmountToCapture *int64 `form:"amount_to_capture"` ApplicationFeeAmount *int64 `form:"application_fee_amount"` StatementDescriptor *string `form:"statement_descriptor"` StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` TransferData *PaymentIntentTransferDataParams `form:"transfer_data"` }
PaymentIntentCaptureParams is the set of parameters that can be used when capturing a payment intent.
type PaymentIntentConfirmParams ¶
type PaymentIntentConfirmParams struct { Params `form:"*"` ErrorOnRequiresAction *bool `form:"error_on_requires_action"` Mandate *string `form:"mandate"` MandateData *PaymentIntentMandateDataParams `form:"mandate_data"` OffSession *bool `form:"off_session"` PaymentMethod *string `form:"payment_method"` PaymentMethodData *PaymentIntentPaymentMethodDataParams `form:"payment_method_data"` PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"` PaymentMethodTypes []*string `form:"payment_method_types"` ReceiptEmail *string `form:"receipt_email"` ReturnURL *string `form:"return_url"` SetupFutureUsage *string `form:"setup_future_usage"` Shipping *ShippingDetailsParams `form:"shipping"` UseStripeSDK *bool `form:"use_stripe_sdk"` }
PaymentIntentConfirmParams is the set of parameters that can be used when confirming a payment intent.
type PaymentIntentConfirmationMethod ¶
type PaymentIntentConfirmationMethod string
PaymentIntentConfirmationMethod is the list of allowed values for the confirmation method.
const ( PaymentIntentConfirmationMethodAutomatic PaymentIntentConfirmationMethod = "automatic" PaymentIntentConfirmationMethodManual PaymentIntentConfirmationMethod = "manual" )
List of values that PaymentIntentConfirmationMethod can take.
type PaymentIntentList ¶
type PaymentIntentList struct { APIResource ListMeta Data []*PaymentIntent `json:"data"` }
PaymentIntentList is a list of payment intents as retrieved from a list endpoint.
type PaymentIntentListParams ¶
type PaymentIntentListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Customer *string `form:"customer"` }
PaymentIntentListParams is the set of parameters that can be used when listing payment intents. For more details see https://stripe.com/docs/api#list_payouts.
type PaymentIntentMandateDataCustomerAcceptanceOfflineParams ¶
type PaymentIntentMandateDataCustomerAcceptanceOfflineParams struct { }
PaymentIntentMandateDataCustomerAcceptanceOfflineParams is the set of parameters for the customer acceptance of an offline mandate.
type PaymentIntentMandateDataCustomerAcceptanceOnlineParams ¶
type PaymentIntentMandateDataCustomerAcceptanceOnlineParams struct { IPAddress *string `form:"ip_address"` UserAgent *string `form:"user_agent"` }
PaymentIntentMandateDataCustomerAcceptanceOnlineParams is the set of parameters for the customer acceptance of an online mandate.
type PaymentIntentMandateDataCustomerAcceptanceParams ¶
type PaymentIntentMandateDataCustomerAcceptanceParams struct { AcceptedAt int64 `form:"accepted_at"` Offline *PaymentIntentMandateDataCustomerAcceptanceOfflineParams `form:"offline"` Online *PaymentIntentMandateDataCustomerAcceptanceOnlineParams `form:"online"` Type MandateCustomerAcceptanceType `form:"type"` }
PaymentIntentMandateDataCustomerAcceptanceParams is the set of parameters for the customer acceptance of a mandate.
type PaymentIntentMandateDataParams ¶
type PaymentIntentMandateDataParams struct {
CustomerAcceptance *PaymentIntentMandateDataCustomerAcceptanceParams `form:"customer_acceptance"`
}
PaymentIntentMandateDataParams is the set of parameters controlling the creation of the mandate associated with this PaymentIntent.
type PaymentIntentNextAction ¶
type PaymentIntentNextAction struct { AlipayHandleRedirect *PaymentIntentNextActionAlipayHandleRedirect `json:"alipay_handle_redirect"` OXXODisplayDetails *PaymentIntentNextActionOXXODisplayDetails `json:"oxxo_display_details"` RedirectToURL *PaymentIntentNextActionRedirectToURL `json:"redirect_to_url"` Type PaymentIntentNextActionType `json:"type"` }
PaymentIntentNextAction represents the type of action to take on a payment intent.
type PaymentIntentNextActionAlipayHandleRedirect ¶
type PaymentIntentNextActionAlipayHandleRedirect struct { NativeData string `json:"native_data"` NativeURL string `json:"native_url"` ReturnURL string `json:"return_url"` URL string `json:"url"` }
PaymentIntentNextActionAlipayHandleRedirect represents the resource for the next action of type "handle_alipay_redirect".
type PaymentIntentNextActionOXXODisplayDetails ¶ added in v72.7.0
type PaymentIntentNextActionOXXODisplayDetails struct { ExpiresAfter int64 `json:"expires_after"` HostedVoucherURL string `json:"hosted_voucher_url"` Number string `json:"number"` }
PaymentIntentNextActionOXXODisplayDetails represents the resource for the next action of type "oxxo_display_details".
type PaymentIntentNextActionRedirectToURL ¶
type PaymentIntentNextActionRedirectToURL struct { ReturnURL string `json:"return_url"` URL string `json:"url"` }
PaymentIntentNextActionRedirectToURL represents the resource for the next action of type "redirect_to_url".
type PaymentIntentNextActionType ¶
type PaymentIntentNextActionType string
PaymentIntentNextActionType is the list of allowed values for the next action's type.
const ( PaymentIntentNextActionTypeAlipayHandleRedirect PaymentIntentNextActionType = "alipay_handle_redirect" PaymentIntentNextActionTypeOXXODisplayDetails PaymentIntentNextActionType = "oxxo_display_details" PaymentIntentNextActionTypeRedirectToURL PaymentIntentNextActionType = "redirect_to_url" )
List of values that PaymentIntentNextActionType can take.
type PaymentIntentOffSession ¶
type PaymentIntentOffSession string
PaymentIntentOffSession is the list of allowed values for types of off-session.
const ( PaymentIntentOffSessionOneOff PaymentIntentOffSession = "one_off" PaymentIntentOffSessionRecurring PaymentIntentOffSession = "recurring" )
List of values that PaymentIntentOffSession can take.
type PaymentIntentParams ¶
type PaymentIntentParams struct { Params `form:"*"` Amount *int64 `form:"amount"` ApplicationFeeAmount *int64 `form:"application_fee_amount"` CaptureMethod *string `form:"capture_method"` Confirm *bool `form:"confirm"` ConfirmationMethod *string `form:"confirmation_method"` Currency *string `form:"currency"` Customer *string `form:"customer"` Description *string `form:"description"` Mandate *string `form:"mandate"` MandateData *PaymentIntentMandateDataParams `form:"mandate_data"` OnBehalfOf *string `form:"on_behalf_of"` PaymentMethod *string `form:"payment_method"` PaymentMethodData *PaymentIntentPaymentMethodDataParams `form:"payment_method_data"` PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"` PaymentMethodTypes []*string `form:"payment_method_types"` ReceiptEmail *string `form:"receipt_email"` ReturnURL *string `form:"return_url"` SetupFutureUsage *string `form:"setup_future_usage"` Shipping *ShippingDetailsParams `form:"shipping"` StatementDescriptor *string `form:"statement_descriptor"` StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` TransferData *PaymentIntentTransferDataParams `form:"transfer_data"` TransferGroup *string `form:"transfer_group"` // Those parameters only works if you confirm on creation. ErrorOnRequiresAction *bool `form:"error_on_requires_action"` OffSession *bool `form:"off_session"` UseStripeSDK *bool `form:"use_stripe_sdk"` }
PaymentIntentParams is the set of parameters that can be used when handling a payment intent.
type PaymentIntentPaymentMethodDataParams ¶
type PaymentIntentPaymentMethodDataParams struct { AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"` Alipay *PaymentMethodAlipayParams `form:"alipay"` AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"` BillingDetails *BillingDetailsParams `form:"billing_details"` Card *PaymentMethodCardParams `form:"card"` EPS *PaymentMethodEPSParams `form:"eps"` FPX *PaymentMethodFPXParams `form:"fpx"` Grabpay *PaymentMethodGrabpayParams `form:"grabpay"` Ideal *PaymentMethodIdealParams `form:"ideal"` OXXO *PaymentMethodOXXOParams `form:"oxxo"` P24 *PaymentMethodP24Params `form:"p24"` SepaDebit *PaymentMethodSepaDebitParams `form:"sepa_debit"` Type *string `form:"type"` }
PaymentIntentPaymentMethodDataParams represents the type-specific parameters associated with a payment method on payment intent.
type PaymentIntentPaymentMethodOptions ¶
type PaymentIntentPaymentMethodOptions struct { Alipay *PaymentIntentPaymentMethodOptionsAlipay `json:"alipay"` Bancontact *PaymentIntentPaymentMethodOptionsBancontact `json:"bancontact"` Card *PaymentIntentPaymentMethodOptionsCard `json:"card"` OXXO *PaymentIntentPaymentMethodOptionsOXXO `json:"oxxo"` Sofort *PaymentIntentPaymentMethodOptionsSofort `json:"sofort"` }
PaymentIntentPaymentMethodOptions is the set of payment method-specific options associated with that payment intent.
type PaymentIntentPaymentMethodOptionsAlipay ¶
type PaymentIntentPaymentMethodOptionsAlipay struct { }
PaymentIntentPaymentMethodOptionsAlipay is the set of Alipay-specific options associated with that payment intent.
type PaymentIntentPaymentMethodOptionsAlipayParams ¶
type PaymentIntentPaymentMethodOptionsAlipayParams struct { }
PaymentIntentPaymentMethodOptionsAlipayParams represents the Alipay-specific options applied to a PaymentIntent.
type PaymentIntentPaymentMethodOptionsBancontact ¶
type PaymentIntentPaymentMethodOptionsBancontact struct {
PreferredLanguage string `json:"preferred_language"`
}
PaymentIntentPaymentMethodOptionsBancontact is the set of bancontact-specific options associated with that payment intent.
type PaymentIntentPaymentMethodOptionsBancontactParams ¶
type PaymentIntentPaymentMethodOptionsBancontactParams struct {
PreferredLanguage *string `form:"preferred_language"`
}
PaymentIntentPaymentMethodOptionsBancontactParams represents the bancontact-specific options applied to a PaymentIntent.
type PaymentIntentPaymentMethodOptionsCard ¶
type PaymentIntentPaymentMethodOptionsCard struct { Installments *PaymentIntentPaymentMethodOptionsCardInstallments `json:"installments"` Network PaymentMethodCardNetwork `json:"network"` RequestThreeDSecure PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"` }
PaymentIntentPaymentMethodOptionsCard is the set of card-specific options associated with that payment intent.
type PaymentIntentPaymentMethodOptionsCardInstallments ¶
type PaymentIntentPaymentMethodOptionsCardInstallments struct { AvailablePlans []*PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"available_plans"` Enabled bool `json:"enabled"` Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"` }
PaymentIntentPaymentMethodOptionsCardInstallments describe the installment options available for a card associated with that payment intent.
type PaymentIntentPaymentMethodOptionsCardInstallmentsParams ¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsParams struct { Enabled *bool `form:"enabled"` Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"` }
PaymentIntentPaymentMethodOptionsCardInstallmentsParams controls whether to enable installment plans for this payment intent.
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlan ¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlan struct { Count int64 `json:"count"` Interval PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval `json:"interval"` Type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType `json:"type"` }
PaymentIntentPaymentMethodOptionsCardInstallmentsPlan describe a specific card installment plan.
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval ¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval string
PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval is the interval of a card installment plan.
const (
PaymentIntentPaymentMethodOptionsCardInstallmentsPlanIntervalMonth PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval = "month"
)
List of values that PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval can take.
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams ¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams struct { Count *int64 `form:"count"` Interval *string `form:"interval"` Type *string `form:"type"` }
PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams represents details about the installment plan chosen for this payment intent.
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType ¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType string
PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType is the type of a card installment plan.
const (
PaymentIntentPaymentMethodOptionsCardInstallmentsPlanTypeFixedCount PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType = "fixed_count"
)
List of values that PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType can take.
type PaymentIntentPaymentMethodOptionsCardParams ¶
type PaymentIntentPaymentMethodOptionsCardParams struct { CVCToken *string `form:"cvc_token"` Installments *PaymentIntentPaymentMethodOptionsCardInstallmentsParams `form:"installments"` MOTO *bool `form:"moto"` Network *string `form:"network"` RequestThreeDSecure *string `form:"request_three_d_secure"` }
PaymentIntentPaymentMethodOptionsCardParams represents the card-specific options applied to a PaymentIntent.
type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure ¶
type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure string
PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure is the list of allowed values controlling when to request 3D Secure on a PaymentIntent.
const ( PaymentIntentPaymentMethodOptionsCardRequestThreeDSecureAny PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure = "any" PaymentIntentPaymentMethodOptionsCardRequestThreeDSecureAutomatic PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure = "automatic" )
List of values that PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure can take.
type PaymentIntentPaymentMethodOptionsOXXO ¶ added in v72.7.0
type PaymentIntentPaymentMethodOptionsOXXO struct {
ExpiresAfterDays int64 `json:"expires_after_days"`
}
PaymentIntentPaymentMethodOptionsOXXO is the set of OXXO-specific options associated with that payment intent.
type PaymentIntentPaymentMethodOptionsOXXOParams ¶ added in v72.7.0
type PaymentIntentPaymentMethodOptionsOXXOParams struct {
ExpiresAfterDays *int64 `form:"expires_after_days"`
}
PaymentIntentPaymentMethodOptionsOXXOParams represents the OXXO-specific options applied to a PaymentIntent.
type PaymentIntentPaymentMethodOptionsParams ¶
type PaymentIntentPaymentMethodOptionsParams struct { Alipay *PaymentIntentPaymentMethodOptionsAlipayParams `form:"alipay"` Bancontact *PaymentIntentPaymentMethodOptionsBancontactParams `form:"bancontact"` Card *PaymentIntentPaymentMethodOptionsCardParams `form:"card"` OXXO *PaymentIntentPaymentMethodOptionsOXXOParams `form:"oxxo"` Sofort *PaymentIntentPaymentMethodOptionsSofortParams `form:"sofort"` }
PaymentIntentPaymentMethodOptionsParams represents the type-specific payment method options applied to a PaymentIntent.
type PaymentIntentPaymentMethodOptionsSofort ¶ added in v72.2.0
type PaymentIntentPaymentMethodOptionsSofort struct {
PreferredLanguage string `json:"preferred_language"`
}
PaymentIntentPaymentMethodOptionsSofort is the set of sofort-specific options associated with that payment intent.
type PaymentIntentPaymentMethodOptionsSofortParams ¶ added in v72.2.0
type PaymentIntentPaymentMethodOptionsSofortParams struct {
PreferredLanguage *string `form:"preferred_language"`
}
PaymentIntentPaymentMethodOptionsSofortParams represents the sofort-specific options applied to a PaymentIntent.
type PaymentIntentSetupFutureUsage ¶
type PaymentIntentSetupFutureUsage string
PaymentIntentSetupFutureUsage is the list of allowed values for SetupFutureUsage.
const ( PaymentIntentSetupFutureUsageOffSession PaymentIntentSetupFutureUsage = "off_session" PaymentIntentSetupFutureUsageOnSession PaymentIntentSetupFutureUsage = "on_session" )
List of values that PaymentIntentSetupFutureUsage can take.
type PaymentIntentStatus ¶
type PaymentIntentStatus string
PaymentIntentStatus is the list of allowed values for the payment intent's status.
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 int64 `json:"amount"` Destination *Account `json:"destination"` }
PaymentIntentTransferData represents the information for the transfer associated with a payment intent.
type PaymentIntentTransferDataParams ¶
type PaymentIntentTransferDataParams struct { Amount *int64 `form:"amount"` Destination *string `form:"destination"` }
PaymentIntentTransferDataParams is the set of parameters allowed for the transfer hash.
type PaymentMethod ¶
type PaymentMethod struct { APIResource 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 *BillingDetails `json:"billing_details"` Card *PaymentMethodCard `json:"card"` CardPresent *PaymentMethodCardPresent `json:"card_present"` Created int64 `json:"created"` Customer *Customer `json:"customer"` EPS *PaymentMethodEPS `json:"eps"` FPX *PaymentMethodFPX `json:"fpx"` Giropay *PaymentMethodGiropay `json:"giropay"` Grabpay *PaymentMethodGrabpay `json:"grabpay"` ID string `json:"id"` Ideal *PaymentMethodIdeal `json:"ideal"` InteracPresent *PaymentMethodInteracPresent `json:"interac_present"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` OXXO *PaymentMethodOXXO `json:"oxxo"` P24 *PaymentMethodP24 `json:"p24"` SepaDebit *PaymentMethodSepaDebit `json:"sepa_debit"` Sofort *PaymentMethodSofort `json:"sofort"` Type PaymentMethodType `json:"type"` }
PaymentMethod is the resource representing a PaymentMethod.
func (*PaymentMethod) UnmarshalJSON ¶
func (i *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 PaymentMethodAUBECSDebit ¶
type PaymentMethodAUBECSDebit struct { BSBNumber string `json:"bsb_number"` Fingerprint string `json:"fingerprint"` Last4 string `json:"last4"` }
PaymentMethodAUBECSDebit represents AUBECSDebit-specific properties (Australia Only).
type PaymentMethodAUBECSDebitParams ¶
type PaymentMethodAUBECSDebitParams struct { AccountNumber *string `form:"account_number"` BSBNumber *string `form:"bsb_number"` }
PaymentMethodAUBECSDebitParams is the set of parameters allowed for the `AUBECSDebit` hash when creating a PaymentMethod of type AUBECSDebit.
type PaymentMethodAfterpayClearpay ¶ added in v72.34.0
type PaymentMethodAfterpayClearpay struct { }
PaymentMethodAfterpayClearpay represents the AfterpayClearpay properties.
type PaymentMethodAfterpayClearpayParams ¶ added in v72.34.0
type PaymentMethodAfterpayClearpayParams struct{}
PaymentMethodAfterpayClearpayParams is the set of parameters allowed for the `afterpay_clearpay` hash when creating a PaymentMethod of type AfterpayClearpay.
type PaymentMethodAlipay ¶
type PaymentMethodAlipay struct { }
PaymentMethodAlipay represents the Alipay properties.
type PaymentMethodAlipayParams ¶
type PaymentMethodAlipayParams struct { }
PaymentMethodAlipayParams is the set of parameters allowed for the `alipay` hash when creating a PaymentMethod of type Alipay.
type PaymentMethodAttachParams ¶
PaymentMethodAttachParams is the set of parameters that can be used when attaching a PaymentMethod to a Customer.
type PaymentMethodBACSDebit ¶
type PaymentMethodBACSDebit struct { Fingerprint string `json:"fingerprint"` Last4 string `json:"last4"` SortCode string `json:"sort_code"` }
PaymentMethodBACSDebit represents the BACS Debit properties.
type PaymentMethodBACSDebitParams ¶
type PaymentMethodBACSDebitParams struct { AccountNumber *string `form:"account_number"` SortCode *string `form:"sort_code"` }
PaymentMethodBACSDebitParams is the set of parameters allowed for BACS Debit payment method.
type PaymentMethodBancontact ¶
type PaymentMethodBancontact struct { }
PaymentMethodBancontact represents the Bancontact properties.
type PaymentMethodBancontactParams ¶
type PaymentMethodBancontactParams struct { }
PaymentMethodBancontactParams is the set of parameters allowed for the `bancontact` hash when creating a PaymentMethod of type Bancontact.
type PaymentMethodCard ¶
type PaymentMethodCard struct { Brand PaymentMethodCardBrand `json:"brand"` Checks *PaymentMethodCardChecks `json:"checks"` Country string `json:"country"` ExpMonth uint64 `json:"exp_month"` ExpYear uint64 `json:"exp_year"` Fingerprint string `json:"fingerprint"` Funding CardFunding `json:"funding"` Last4 string `json:"last4"` Networks *PaymentMethodCardNetworks `json:"networks"` ThreeDSecureUsage *PaymentMethodCardThreeDSecureUsage `json:"three_d_secure_usage"` 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. Description string `json:"description"` IIN string `json:"iin"` Issuer string `json:"issuer"` }
PaymentMethodCard represents the card-specific properties.
type PaymentMethodCardBrand ¶
type PaymentMethodCardBrand string
PaymentMethodCardBrand is the list of allowed values for the brand property on a Card PaymentMethod.
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 { AddressLine1Check CardVerification `json:"address_line1_check"` AddressPostalCodeCheck CardVerification `json:"address_postal_code_check"` CVCCheck CardVerification `json:"cvc_check"` }
PaymentMethodCardChecks represents the checks associated with a Card PaymentMethod.
type PaymentMethodCardNetwork ¶
type PaymentMethodCardNetwork string
PaymentMethodCardNetwork is the list of allowed values to represent the network used for a card-like transaction.
const ( PaymentMethodCardNetworkAmex PaymentMethodCardNetwork = "amex" PaymentMethodCardNetworkDiners PaymentMethodCardNetwork = "diners" PaymentMethodCardNetworkDiscover PaymentMethodCardNetwork = "discover" PaymentMethodCardNetworkInterac PaymentMethodCardNetwork = "interac" PaymentMethodCardNetworkJCB PaymentMethodCardNetwork = "jcb" PaymentMethodCardNetworkMastercard PaymentMethodCardNetwork = "mastercard" PaymentMethodCardNetworkUnionpay PaymentMethodCardNetwork = "unionpay" PaymentMethodCardNetworkUnknown PaymentMethodCardNetwork = "unknown" PaymentMethodCardNetworkVisa PaymentMethodCardNetwork = "visa" )
List of values that PaymentMethodCardNetwork can take.
type PaymentMethodCardNetworks ¶
type PaymentMethodCardNetworks struct { Available []PaymentMethodCardNetwork `json:"available"` Preferred PaymentMethodCardNetwork `json:"preferred"` }
PaymentMethodCardNetworks represents the card networks that can be used to process the payment.
type PaymentMethodCardParams ¶
type PaymentMethodCardParams struct { CVC *string `form:"cvc"` ExpMonth *string `form:"exp_month"` ExpYear *string `form:"exp_year"` Number *string `form:"number"` Token *string `form:"token"` }
PaymentMethodCardParams is the set of parameters allowed for the `card` hash when creating a PaymentMethod of type card.
type PaymentMethodCardPresent ¶
type PaymentMethodCardPresent struct { }
PaymentMethodCardPresent represents the card-present-specific properties.
type PaymentMethodCardThreeDSecureUsage ¶
type PaymentMethodCardThreeDSecureUsage struct {
Supported bool `json:"supported"`
}
PaymentMethodCardThreeDSecureUsage represents the 3DS usage for that Card PaymentMethod.
type PaymentMethodCardWallet ¶
type PaymentMethodCardWallet struct { DynamicLast4 string `json:"dynamic_last4"` Type PaymentMethodCardWalletType `json:"type"` }
PaymentMethodCardWallet represents the details of the card wallet if this Card PaymentMethod is part of a card wallet.
type PaymentMethodCardWalletType ¶
type PaymentMethodCardWalletType string
PaymentMethodCardWalletType is the list of allowed values for the type a wallet can take on a Card PaymentMethod.
const ( PaymentMethodCardWalletTypeAmexExpressCheckout PaymentMethodCardWalletType = "amex_express_checkout" PaymentMethodCardWalletTypeApplePay PaymentMethodCardWalletType = "apple_pay" PaymentMethodCardWalletTypeGooglePay PaymentMethodCardWalletType = "google_pay" PaymentMethodCardWalletTypeMasterpass PaymentMethodCardWalletType = "masterpass" PaymentMethodCardWalletTypeSamsungPay PaymentMethodCardWalletType = "samsung_pay" PaymentMethodCardWalletTypeVisaCheckout PaymentMethodCardWalletType = "visa_checkout" )
List of values that PaymentMethodCardWalletType can take.
type PaymentMethodDetachParams ¶
type PaymentMethodDetachParams struct {
Params `form:"*"`
}
PaymentMethodDetachParams is the set of parameters that can be used when detaching a PaymentMethod.
type PaymentMethodEPS ¶
type PaymentMethodEPS struct {
Bank string `json:"bank"`
}
PaymentMethodEPS represents the EPS properties.
type PaymentMethodEPSParams ¶
type PaymentMethodEPSParams struct {
Bank *string `form:"bank"`
}
PaymentMethodEPSParams is the set of parameters allowed for the `eps` hash when creating a PaymentMethod of type EPS.
type PaymentMethodFPX ¶
type PaymentMethodFPX struct { AccountHolderType PaymentMethodFPXAccountHolderType `json:"account_holder_type"` Bank string `json:"bank"` TransactionID string `json:"transaction_id"` }
PaymentMethodFPX represents FPX-specific properties (Malaysia Only).
type PaymentMethodFPXAccountHolderType ¶
type PaymentMethodFPXAccountHolderType string
PaymentMethodFPXAccountHolderType is a list of string values that FPX AccountHolderType accepts.
const ( PaymentMethodFPXAccountHolderTypeIndividual PaymentMethodFPXAccountHolderType = "individual" PaymentMethodFPXAccountHolderTypeCompany PaymentMethodFPXAccountHolderType = "company" )
List of values that PaymentMethodFPXAccountHolderType can take
type PaymentMethodFPXParams ¶
type PaymentMethodFPXParams struct { AccountHolderType *string `form:"account_holder_type"` Bank *string `form:"bank"` }
PaymentMethodFPXParams is the set of parameters allowed for the `fpx` hash when creating a PaymentMethod of type fpx.
type PaymentMethodGiropay ¶
type PaymentMethodGiropay struct { }
PaymentMethodGiropay represents the Giropay properties.
type PaymentMethodGiropayParams ¶
type PaymentMethodGiropayParams struct { }
PaymentMethodGiropayParams is the set of parameters allowed for the `giropay` hash when creating a PaymentMethod of type Giropay.
type PaymentMethodGrabpay ¶ added in v72.24.0
type PaymentMethodGrabpay struct { }
PaymentMethodGrabpay represents the Grabpay properties.
type PaymentMethodGrabpayParams ¶ added in v72.24.0
type PaymentMethodGrabpayParams struct { }
PaymentMethodGrabpayParams is the set of parameters allowed for the `grabpay` hash when creating a PaymentMethod of type Grabpay.
type PaymentMethodIdeal ¶
PaymentMethodIdeal represents the iDEAL-specific properties.
type PaymentMethodIdealParams ¶
type PaymentMethodIdealParams struct {
Bank *string `form:"bank"`
}
PaymentMethodIdealParams is the set of parameters allowed for the `ideal` hash when creating a PaymentMethod of type ideal.
type PaymentMethodInteracPresent ¶
type PaymentMethodInteracPresent struct { }
PaymentMethodInteracPresent represents the interac present properties.
type PaymentMethodInteracPresentParams ¶
type PaymentMethodInteracPresentParams struct { }
PaymentMethodInteracPresentParams is the set of parameters allowed for the `interac_present` hash when creating a PaymentMethod of type interac_present.
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:"*"` Customer *string `form:"customer"` Type *string `form:"type"` }
PaymentMethodListParams is the set of parameters that can be used when listing PaymentMethods.
type PaymentMethodOXXO ¶ added in v72.7.0
type PaymentMethodOXXO struct { }
PaymentMethodOXXO represents the OXXO-specific properties.
type PaymentMethodOXXOParams ¶ added in v72.7.0
type PaymentMethodOXXOParams struct { }
PaymentMethodOXXOParams is the set of parameters allowed for the `oxxo` hash when creating a PaymentMethod of type OXXO.
type PaymentMethodP24 ¶
type PaymentMethodP24 struct {
Bank string `json:"bank"`
}
PaymentMethodP24 represents the P24 properties.
type PaymentMethodP24Params ¶
type PaymentMethodP24Params struct { Bank *string `form:"bank"` TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"` }
PaymentMethodP24Params is the set of parameters allowed for the `p24` hash when creating a PaymentMethod of type P24.
type PaymentMethodParams ¶
type PaymentMethodParams struct { Params `form:"*"` AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"` Alipay *PaymentMethodAlipayParams `form:"alipay"` AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"` BACSDebit *PaymentMethodBACSDebitParams `form:"bacs_debit"` Bancontact *PaymentMethodBancontactParams `form:"bancontact"` BillingDetails *BillingDetailsParams `form:"billing_details"` Card *PaymentMethodCardParams `form:"card"` EPS *PaymentMethodEPSParams `form:"eps"` FPX *PaymentMethodFPXParams `form:"fpx"` Giropay *PaymentMethodGiropayParams `form:"giropay"` Grabpay *PaymentMethodGrabpayParams `form:"grabpay"` Ideal *PaymentMethodIdealParams `form:"ideal"` InteracPresent *PaymentMethodInteracPresentParams `form:"interac_present"` OXXO *PaymentMethodOXXOParams `form:"oxxo"` P24 *PaymentMethodP24Params `form:"p24"` SepaDebit *PaymentMethodSepaDebitParams `form:"sepa_debit"` Sofort *PaymentMethodSofortParams `form:"sofort"` Type *string `form:"type"` // The following parameters are used when cloning a PaymentMethod to the connected account Customer *string `form:"customer"` PaymentMethod *string `form:"payment_method"` }
PaymentMethodParams is the set of parameters that can be used when creating or updating a PaymentMethod.
type PaymentMethodSepaDebit ¶
type PaymentMethodSepaDebit struct { BankCode string `json:"bank_code"` BranchCode string `json:"branch_code"` Country string `json:"country"` Fingerprint string `json:"fingerprint"` Last4 string `json:"last4"` GeneratedFrom *PaymentMethodSepaDebitGeneratedFrom `json:"generated_from"` }
PaymentMethodSepaDebit represents the SEPA-debit-specific properties.
type PaymentMethodSepaDebitGeneratedFrom ¶ added in v72.12.0
type PaymentMethodSepaDebitGeneratedFrom struct { Charge *Charge `json:"charge"` SetupAttempt *SetupAttempt `json:"setup_attempt"` }
PaymentMethodSepaDebitGeneratedFrom represents information about the object that generated this PaymentMethod
type PaymentMethodSepaDebitParams ¶
type PaymentMethodSepaDebitParams struct {
Iban *string `form:"iban"`
}
PaymentMethodSepaDebitParams is the set of parameters allowed for the `sepa_debit` hash when creating a PaymentMethod of type sepa_debit.
type PaymentMethodSofort ¶ added in v72.2.0
type PaymentMethodSofort struct {
Country string `json:"country"`
}
PaymentMethodSofort represents the Sofort-specific properties.
type PaymentMethodSofortParams ¶ added in v72.2.0
type PaymentMethodSofortParams struct {
Country *string `form:"country"`
}
PaymentMethodSofortParams is the set of parameters allowed for the `sofort` hash when creating a PaymentMethod of type sofort.
type PaymentMethodType ¶
type PaymentMethodType string
PaymentMethodType is the list of allowed values for the payment method type.
const ( PaymentMethodTypeAfterpayClearpay PaymentMethodType = "afterpay_clearpay" PaymentMethodTypeAlipay PaymentMethodType = "alipay" PaymentMethodTypeAUBECSDebit PaymentMethodType = "au_becs_debit" PaymentMethodTypeBACSDebit PaymentMethodType = "bacs_debit" PaymentMethodTypeBancontact PaymentMethodType = "bancontact" PaymentMethodTypeCard PaymentMethodType = "card" PaymentMethodTypeCardPresent PaymentMethodType = "card_present" PaymentMethodTypeEPS PaymentMethodType = "eps" PaymentMethodTypeFPX PaymentMethodType = "fpx" PaymentMethodTypeGiropay PaymentMethodType = "giropay" PaymentMethodTypeGrabpay PaymentMethodType = "grabpay" PaymentMethodTypeIdeal PaymentMethodType = "ideal" PaymentMethodTypeInteracPresent PaymentMethodType = "interac_present" PaymentMethodTypeOXXO PaymentMethodType = "oxxo" PaymentMethodTypeP24 PaymentMethodType = "p24" PaymentMethodTypeSepaDebit PaymentMethodType = "sepa_debit" PaymentMethodTypeSofort PaymentMethodType = "sofort" )
List of values that PaymentMethodType can take.
type PaymentSource ¶
type PaymentSource struct { APIResource BankAccount *BankAccount `json:"-"` Card *Card `json:"-"` Deleted bool `json:"deleted"` ID string `json:"id"` SourceObject *Source `json:"-"` Type PaymentSourceType `json:"object"` }
PaymentSource describes the payment source used to make a Charge. The Type should indicate which object is fleshed out (eg. BankAccount or Card) For more details see https://stripe.com/docs/api#retrieve_charge
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 PaymentSourceType ¶
type PaymentSourceType string
PaymentSourceType consts represent valid payment sources.
const ( PaymentSourceTypeAccount PaymentSourceType = "account" PaymentSourceTypeBankAccount PaymentSourceType = "bank_account" PaymentSourceTypeCard PaymentSourceType = "card" PaymentSourceTypeObject PaymentSourceType = "source" )
List of values that PaymentSourceType can take.
type Payout ¶
type Payout struct { APIResource Amount int64 `json:"amount"` ArrivalDate int64 `json:"arrival_date"` Automatic bool `json:"automatic"` BalanceTransaction *BalanceTransaction `json:"balance_transaction"` BankAccount *BankAccount `json:"bank_account"` Card *Card `json:"card"` Created int64 `json:"created"` Currency Currency `json:"currency"` Description *string `json:"description"` Destination *PayoutDestination `json:"destination"` FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"` FailureCode PayoutFailureCode `json:"failure_code"` FailureMessage string `json:"failure_message"` ID string `json:"id"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Method PayoutMethodType `json:"method"` OriginalPayout *Payout `json:"original_payout"` ReversedBy *Payout `json:"reversed_by"` SourceType PayoutSourceType `json:"source_type"` StatementDescriptor string `json:"statement_descriptor"` Status PayoutStatus `json:"status"` Type PayoutType `json:"type"` }
Payout is the resource representing a Stripe payout. For more details see https://stripe.com/docs/api#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 { BankAccount *BankAccount `json:"-"` Card *Card `json:"-"` ID string `json:"id"` Type PayoutDestinationType `json:"object"` }
PayoutDestination describes the destination of a Payout. The Type should indicate which object is fleshed out For more details see https://stripe.com/docs/api/go#payout_object
func (*PayoutDestination) UnmarshalJSON ¶
func (d *PayoutDestination) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a PayoutDestination. This custom unmarshaling is needed because the specific type of destination it refers to is specified in the JSON
type PayoutDestinationType ¶
type PayoutDestinationType string
PayoutDestinationType consts represent valid payout destinations.
const ( PayoutDestinationTypeBankAccount PayoutDestinationType = "bank_account" PayoutDestinationTypeCard PayoutDestinationType = "card" )
List of values that PayoutDestinationType can take.
type PayoutFailureCode ¶
type PayoutFailureCode string
PayoutFailureCode is the list of allowed values for the payout's failure code.
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" PayoutFailureCodeInsufficientFunds PayoutFailureCode = "insufficient_funds" PayoutFailureCodeInvalidAccountNumber PayoutFailureCode = "invalid_account_number" PayoutFailureCodeInvalidCurrency PayoutFailureCode = "invalid_currency" PayoutFailureCodeNoAccount PayoutFailureCode = "no_account" )
List of values that PayoutFailureCode can take.
type PayoutInterval ¶
type PayoutInterval string
PayoutInterval describes the payout interval.
const ( PayoutIntervalDaily PayoutInterval = "daily" PayoutIntervalManual PayoutInterval = "manual" PayoutIntervalMonthly PayoutInterval = "monthly" PayoutIntervalWeekly PayoutInterval = "weekly" )
List of values that PayoutInterval 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"` Destination *string `form:"destination"` Status *string `form:"status"` }
PayoutListParams is the set of parameters that can be used when listing payouts. For more details see https://stripe.com/docs/api#list_payouts.
type PayoutMethodType ¶
type PayoutMethodType string
PayoutMethodType represents the type of payout
const ( PayoutMethodInstant PayoutMethodType = "instant" PayoutMethodStandard PayoutMethodType = "standard" )
List of values that PayoutMethodType can take.
type PayoutParams ¶
type PayoutParams struct { Params `form:"*"` Amount *int64 `form:"amount"` Currency *string `form:"currency"` Description *string `form:"description"` Destination *string `form:"destination"` Method *string `form:"method"` SourceType *string `form:"source_type"` StatementDescriptor *string `form:"statement_descriptor"` }
PayoutParams is the set of parameters that can be used when creating or updating a payout. For more details see https://stripe.com/docs/api#create_payout and https://stripe.com/docs/api#update_payout.
type PayoutReverseParams ¶ added in v72.15.0
type PayoutReverseParams struct {
Params `form:"*"`
}
PayoutReverseParams is the set of parameters that can be used when reversing a payout.
type PayoutScheduleParams ¶
type PayoutScheduleParams struct { DelayDays *int64 `form:"delay_days"` DelayDaysMinimum *bool `form:"-"` // See custom AppendTo Interval *string `form:"interval"` MonthlyAnchor *int64 `form:"monthly_anchor"` WeeklyAnchor *string `form:"weekly_anchor"` }
PayoutScheduleParams are the parameters allowed for payout schedules.
type PayoutSourceType ¶
type PayoutSourceType string
PayoutSourceType is the list of allowed values for the payout's source_type field.
const ( PayoutSourceTypeBankAccount PayoutSourceType = "bank_account" PayoutSourceTypeCard PayoutSourceType = "card" PayoutSourceTypeFPX PayoutSourceType = "fpx" )
List of values that PayoutSourceType can take.
type PayoutStatus ¶
type PayoutStatus string
PayoutStatus is the list of allowed values for the payout's status.
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
PayoutType is the list of allowed values for the payout's type.
const ( PayoutTypeBank PayoutType = "bank_account" PayoutTypeCard PayoutType = "card" )
List of values that PayoutType can take.
type PermissionError ¶
type PermissionError struct {
// contains filtered or unexported fields
}
PermissionError results when you attempt to make an API request for which your API key doesn't have the right permissions.
func (*PermissionError) Error ¶
func (e *PermissionError) Error() string
Error serializes the error object to JSON and returns it as a string.
type Person ¶
type Person struct { APIResource Account string `json:"account"` Address *AccountAddress `json:"address"` AddressKana *AccountAddress `json:"address_kana"` AddressKanji *AccountAddress `json:"address_kanji"` Deleted bool `json:"deleted"` DOB *DOB `json:"dob"` Email string `json:"email"` FirstName string `json:"first_name"` FirstNameKana string `json:"first_name_kana"` FirstNameKanji string `json:"first_name_kanji"` Gender string `json:"gender"` ID string `json:"id"` IDNumberProvided bool `json:"id_number_provided"` LastName string `json:"last_name"` LastNameKana string `json:"last_name_kana"` LastNameKanji string `json:"last_name_kanji"` MaidenName string `json:"maiden_name"` Nationality string `json:"nationality"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` Phone string `json:"phone"` PoliticalExposure PersonPoliticalExposure `json:"political_exposure"` Relationship *Relationship `json:"relationship"` Requirements *Requirements `json:"requirements"` SSNLast4Provided bool `json:"ssn_last_4_provided"` Verification *PersonVerification `json:"verification"` }
Person is the resource representing a Stripe person. For more details see https://stripe.com/docs/api#persons.
func (*Person) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Person. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
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 Relationship *RelationshipListParams `form:"relationship"` }
PersonListParams is the set of parameters that can be used when listing persons. For more detail see https://stripe.com/docs/api#list_persons.
type PersonParams ¶
type PersonParams struct { Params `form:"*"` Account *string `form:"-"` // Included in URL Address *AccountAddressParams `form:"address"` AddressKana *AccountAddressParams `form:"address_kana"` AddressKanji *AccountAddressParams `form:"address_kanji"` DOB *DOBParams `form:"dob"` 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"` IDNumber *string `form:"id_number"` LastName *string `form:"last_name"` LastNameKana *string `form:"last_name_kana"` LastNameKanji *string `form:"last_name_kanji"` MaidenName *string `form:"maiden_name"` Nationality *string `form:"nationality"` PersonToken *string `form:"person_token"` Phone *string `form:"phone"` PoliticalExposure *string `form:"political_exposure"` Relationship *RelationshipParams `form:"relationship"` SSNLast4 *string `form:"ssn_last_4"` Verification *PersonVerificationParams `form:"verification"` }
PersonParams is the set of parameters that can be used when creating or updating a person. For more details see https://stripe.com/docs/api#create_person.
type PersonPoliticalExposure ¶
type PersonPoliticalExposure string
PersonPoliticalExposure describes the political exposure of a given person.
const ( PersonPoliticalExposureExisting PersonPoliticalExposure = "existing" PersonPoliticalExposureNone PersonPoliticalExposure = "none" )
List of values that IdentityVerificationStatus can take.
type PersonVerification ¶
type PersonVerification struct { AdditionalDocument *PersonVerificationDocument `json:"additional_document"` Details string `json:"details"` DetailsCode PersonVerificationDetailsCode `json:"details_code"` Document *PersonVerificationDocument `json:"document"` Status IdentityVerificationStatus `json:"status"` }
PersonVerification is the structure for a person's verification details.
type PersonVerificationDetailsCode ¶
type PersonVerificationDetailsCode string
PersonVerificationDetailsCode is a machine-readable code specifying the verification state of a person.
const ( PersonVerificationDetailsCodeFailedKeyedIdentity PersonVerificationDetailsCode = "failed_keyed_identity" PersonVerificationDetailsCodeFailedOther PersonVerificationDetailsCode = "failed_other" PersonVerificationDetailsCodeScanNameMismatch PersonVerificationDetailsCode = "scan_name_mismatch" )
List of values that IdentityVerificationDetailsCode can take.
type PersonVerificationDocument ¶
type PersonVerificationDocument struct { Back *File `json:"back"` Details string `json:"details"` DetailsCode VerificationDocumentDetailsCode `json:"details_code"` Front *File `json:"front"` }
PersonVerificationDocument represents the documents associated with a Person.
type PersonVerificationDocumentParams ¶
type PersonVerificationDocumentParams struct { Back *string `form:"back"` Front *string `form:"front"` }
PersonVerificationDocumentParams represents the parameters available for the document verifying a person's identity.
type PersonVerificationParams ¶
type PersonVerificationParams struct { AdditionalDocument *PersonVerificationDocumentParams `form:"additional_document"` Document *PersonVerificationDocumentParams `form:"document"` }
PersonVerificationParams is used to represent parameters associated with a person's verification details.
type Plan ¶
type Plan struct { APIResource Active bool `json:"active"` AggregateUsage string `json:"aggregate_usage"` Amount int64 `json:"amount"` AmountDecimal float64 `json:"amount_decimal,string"` BillingScheme PlanBillingScheme `json:"billing_scheme"` Created int64 `json:"created"` Currency Currency `json:"currency"` Deleted bool `json:"deleted"` ID string `json:"id"` Interval PlanInterval `json:"interval"` IntervalCount int64 `json:"interval_count"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Nickname string `json:"nickname"` Product *Product `json:"product"` Tiers []*PlanTier `json:"tiers"` TiersMode string `json:"tiers_mode"` TransformUsage *PlanTransformUsage `json:"transform_usage"` TrialPeriodDays int64 `json:"trial_period_days"` UsageType PlanUsageType `json:"usage_type"` }
Plan is the resource representing a Stripe plan. For more details see https://stripe.com/docs/api#plans.
Example (List) ¶
package main import ( "log" stripe "github.com/stripe/stripe-go/v72" "github.com/stripe/stripe-go/v72/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
PlanAggregateUsage is the list of allowed values for a plan's aggregate usage.
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
PlanBillingScheme is the list of allowed values for a plan's billing scheme.
const ( PlanBillingSchemePerUnit PlanBillingScheme = "per_unit" PlanBillingSchemeTiered PlanBillingScheme = "tiered" )
List of values that PlanBillingScheme can take.
type PlanInterval ¶
type PlanInterval string
PlanInterval is the list of allowed values for a plan's interval.
const ( PlanIntervalDay PlanInterval = "day" PlanIntervalWeek PlanInterval = "week" PlanIntervalMonth PlanInterval = "month" 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 returned from a list endpoint.
type PlanListParams ¶
type PlanListParams struct { ListParams `form:"*"` Active *bool `form:"active"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Product *string `form:"product"` }
PlanListParams is the set of parameters that can be used when listing plans. For more details see https://stripe.com/docs/api#list_plans.
type PlanParams ¶
type PlanParams struct { Params `form:"*"` Active *bool `form:"active"` AggregateUsage *string `form:"aggregate_usage"` Amount *int64 `form:"amount"` AmountDecimal *float64 `form:"amount_decimal,high_precision"` BillingScheme *string `form:"billing_scheme"` Currency *string `form:"currency"` ID *string `form:"id"` Interval *string `form:"interval"` IntervalCount *int64 `form:"interval_count"` Nickname *string `form:"nickname"` Product *PlanProductParams `form:"product"` ProductID *string `form:"product"` Tiers []*PlanTierParams `form:"tiers"` TiersMode *string `form:"tiers_mode"` TransformUsage *PlanTransformUsageParams `form:"transform_usage"` TrialPeriodDays *int64 `form:"trial_period_days"` UsageType *string `form:"usage_type"` }
PlanParams is the set of parameters that can be used when creating or updating a plan. For more details see https://stripe.com/docs/api#create_plan and https://stripe.com/docs/api#update_plan.
type PlanProductParams ¶
type PlanProductParams struct { Active *bool `form:"active"` ID *string `form:"id"` Name *string `form:"name"` Metadata map[string]string `form:"metadata"` StatementDescriptor *string `form:"statement_descriptor"` UnitLabel *string `form:"unit_label"` }
PlanProductParams is the set of parameters that can be used when creating a product inside a plan This can only be used on plan creation and won't work on plan update. For more details see https://stripe.com/docs/api#create_plan-product and https://stripe.com/docs/api#update_plan-product
type PlanTier ¶
type PlanTier struct { FlatAmount int64 `json:"flat_amount"` FlatAmountDecimal float64 `json:"flat_amount_decimal,string"` UnitAmount int64 `json:"unit_amount"` UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` UpTo int64 `json:"up_to"` }
PlanTier configures tiered pricing
type PlanTierParams ¶
type PlanTierParams struct { Params `form:"*"` FlatAmount *int64 `form:"flat_amount"` FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"` UnitAmount *int64 `form:"unit_amount"` UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` UpTo *int64 `form:"-"` // handled in custom AppendTo UpToInf *bool `form:"-"` // handled in custom AppendTo }
PlanTierParams configures tiered pricing
type PlanTiersMode ¶
type PlanTiersMode string
PlanTiersMode is the list of allowed values for a plan's tiers mode.
const ( PlanTiersModeGraduated PlanTiersMode = "graduated" PlanTiersModeVolume PlanTiersMode = "volume" )
List of values that PlanTiersMode can take.
type PlanTransformUsage ¶
type PlanTransformUsage struct { DivideBy int64 `json:"divide_by"` Round PlanTransformUsageRound `json:"round"` }
PlanTransformUsage represents the bucket billing configuration.
type PlanTransformUsageParams ¶
type PlanTransformUsageParams struct { DivideBy *int64 `form:"divide_by"` Round *string `form:"round"` }
PlanTransformUsageParams represents the bucket billing configuration.
type PlanTransformUsageRound ¶
type PlanTransformUsageRound string
PlanTransformUsageRound is the list of allowed values for a plan's transform usage round logic.
const ( PlanTransformUsageRoundDown PlanTransformUsageRound = "down" PlanTransformUsageRoundUp PlanTransformUsageRound = "up" )
List of values that PlanTransformUsageRound can take.
type PlanUsageType ¶
type PlanUsageType string
PlanUsageType is the list of allowed values for a plan's usage type.
const ( PlanUsageTypeLicensed PlanUsageType = "licensed" PlanUsageTypeMetered PlanUsageType = "metered" )
List of values that PlanUsageType can take.
type Price ¶
type Price struct { APIResource Active bool `json:"active"` BillingScheme PriceBillingScheme `json:"billing_scheme"` Created int64 `json:"created"` Currency Currency `json:"currency"` Deleted bool `json:"deleted"` ID string `json:"id"` Livemode bool `json:"livemode"` LookupKey string `json:"lookup_key"` Metadata map[string]string `json:"metadata"` Nickname string `json:"nickname"` Object string `json:"object"` Product *Product `json:"product"` Recurring *PriceRecurring `json:"recurring"` Tiers []*PriceTier `json:"tiers"` TiersMode PriceTiersMode `json:"tiers_mode"` TransformQuantity *PriceTransformQuantity `json:"transform_quantity"` Type PriceType `json:"type"` UnitAmount int64 `json:"unit_amount"` UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` }
Price is the resource representing a Stripe price. For more details see https://stripe.com/docs/api#prices.
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
PriceBillingScheme is the list of allowed values for a price's billing scheme.
const ( PriceBillingSchemePerUnit PriceBillingScheme = "per_unit" PriceBillingSchemeTiered PriceBillingScheme = "tiered" )
List of values that PriceBillingScheme can take.
type PriceList ¶
type PriceList struct { APIResource ListMeta Data []*Price `json:"data"` }
PriceList is a list of prices as returned from a list endpoint.
type PriceListParams ¶
type PriceListParams struct { ListParams `form:"*"` Active *bool `form:"active"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Currency *string `form:"currency"` LookupKeys []*string `form:"lookup_keys"` Product *string `form:"product"` Recurring *PriceRecurringListParams `form:"recurring"` Type *string `form:"type"` }
PriceListParams is the set of parameters that can be used when listing prices. For more details see https://stripe.com/docs/api#list_prices.
type PriceParams ¶
type PriceParams struct { Params `form:"*"` Active *bool `form:"active"` BillingScheme *string `form:"billing_scheme"` Currency *string `form:"currency"` LookupKey *string `form:"lookup_key"` Nickname *string `form:"nickname"` Product *string `form:"product"` ProductData *PriceProductDataParams `form:"product_data"` Recurring *PriceRecurringParams `form:"recurring"` Tiers []*PriceTierParams `form:"tiers"` TiersMode *string `form:"tiers_mode"` TransferLookupKey *bool `form:"transfer_lookup_key"` TransformQuantity *PriceTransformQuantityParams `form:"transform_quantity"` UnitAmount *int64 `form:"unit_amount"` UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
PriceParams is the set of parameters that can be used when creating or updating a price. For more details see https://stripe.com/docs/api#create_price and https://stripe.com/docs/api#update_price.
type PriceProductDataParams ¶
type PriceProductDataParams struct { Active *bool `form:"active"` ID *string `form:"id"` Name *string `form:"name"` Metadata map[string]string `form:"metadata"` StatementDescriptor *string `form:"statement_descriptor"` UnitLabel *string `form:"unit_label"` }
PriceProductDataParams is the set of parameters that can be used when creating a product inside a price.
type PriceRecurring ¶
type PriceRecurring struct { AggregateUsage PriceRecurringAggregateUsage `json:"aggregate_usage"` Interval PriceRecurringInterval `json:"interval"` IntervalCount int64 `json:"interval_count"` TrialPeriodDays int64 `json:"trial_period_days"` UsageType PriceRecurringUsageType `json:"usage_type"` }
PriceRecurring represents the recurring components of a price.
type PriceRecurringAggregateUsage ¶
type PriceRecurringAggregateUsage string
PriceRecurringAggregateUsage is the list of allowed values for a price's aggregate usage.
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
PriceRecurringInterval is the list of allowed values for a price's recurring interval.
const ( PriceRecurringIntervalDay PriceRecurringInterval = "day" PriceRecurringIntervalWeek PriceRecurringInterval = "week" PriceRecurringIntervalMonth PriceRecurringInterval = "month" PriceRecurringIntervalYear PriceRecurringInterval = "year" )
List of values that PriceRecurringInterval can take.
type PriceRecurringListParams ¶
type PriceRecurringListParams struct { Interval *string `form:"interval"` UsageType *string `form:"usage_type"` }
PriceRecurringListParams is the set of parameters that can be used when listing recurring prices.
type PriceRecurringParams ¶
type PriceRecurringParams struct { AggregateUsage *string `form:"aggregate_usage"` Interval *string `form:"interval"` IntervalCount *int64 `form:"interval_count"` TrialPeriodDays *int64 `form:"trial_period_days"` UsageType *string `form:"usage_type"` }
PriceRecurringParams is the set of parameters for the recurring components of a price.
type PriceRecurringUsageType ¶
type PriceRecurringUsageType string
PriceRecurringUsageType is the list of allowed values for a price's usage type.
const ( PriceRecurringUsageTypeLicensed PriceRecurringUsageType = "licensed" PriceRecurringUsageTypeMetered PriceRecurringUsageType = "metered" )
List of values that PriceUsageType can take.
type PriceTier ¶
type PriceTier struct { FlatAmount int64 `json:"flat_amount"` FlatAmountDecimal float64 `json:"flat_amount_decimal,string"` UnitAmount int64 `json:"unit_amount"` UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` UpTo int64 `json:"up_to"` }
PriceTier configures tiered pricing
type PriceTierParams ¶
type PriceTierParams struct { FlatAmount *int64 `form:"flat_amount"` FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"` UnitAmount *int64 `form:"unit_amount"` UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` UpTo *int64 `form:"-"` // handled in custom AppendTo UpToInf *bool `form:"-"` // handled in custom AppendTo }
PriceTierParams configures tiered pricing
type PriceTiersMode ¶
type PriceTiersMode string
PriceTiersMode is the list of allowed values for a price's tiers mode.
const ( PriceTiersModeGraduated PriceTiersMode = "graduated" PriceTiersModeVolume PriceTiersMode = "volume" )
List of values that PriceTiersMode can take.
type PriceTransformQuantity ¶
type PriceTransformQuantity struct { DivideBy int64 `json:"divide_by"` Round PriceTransformQuantityRound `json:"round"` }
PriceTransformQuantity represents how to calculate the final amount based on the quantity.
type PriceTransformQuantityParams ¶
type PriceTransformQuantityParams struct { DivideBy *int64 `form:"divide_by"` Round *string `form:"round"` }
PriceTransformQuantityParams represents the parameter controlling the calculation of the final amount based on the quantity.
type PriceTransformQuantityRound ¶
type PriceTransformQuantityRound string
PriceTransformQuantityRound is the list of allowed values for a price's transform quantity rounding logic.
const ( PriceTransformQuantityRoundDown PriceTransformQuantityRound = "down" PriceTransformQuantityRoundUp PriceTransformQuantityRound = "up" )
List of values that PriceTransformQuantityRound can take.
type Product ¶
type Product struct { APIResource Active bool `json:"active"` Attributes []string `json:"attributes"` Caption string `json:"caption"` Created int64 `json:"created"` DeactivateOn []string `json:"deactivate_on"` Deleted bool `json:"deleted"` Description string `json:"description"` ID string `json:"id"` Images []string `json:"images"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Name string `json:"name"` Object string `json:"object"` PackageDimensions *PackageDimensions `json:"package_dimensions"` Shippable bool `json:"shippable"` StatementDescriptor string `json:"statement_descriptor"` Type ProductType `json:"type"` UnitLabel string `json:"unit_label"` Updated int64 `json:"updated"` URL string `json:"url"` }
Product is the resource representing a Stripe product. For more details see https://stripe.com/docs/api#products.
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 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:"*"` Active *bool `form:"active"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` IDs []*string `form:"ids"` Shippable *bool `form:"shippable"` Type *string `form:"type"` URL *string `form:"url"` }
ProductListParams is the set of parameters that can be used when listing products.
type ProductParams ¶
type ProductParams struct { Params `form:"*"` Active *bool `form:"active"` Attributes []*string `form:"attributes"` Caption *string `form:"caption"` DeactivateOn []*string `form:"deactivate_on"` Description *string `form:"description"` ID *string `form:"id"` Images []*string `form:"images"` Name *string `form:"name"` PackageDimensions *PackageDimensionsParams `form:"package_dimensions"` Shippable *bool `form:"shippable"` StatementDescriptor *string `form:"statement_descriptor"` Type *string `form:"type"` UnitLabel *string `form:"unit_label"` URL *string `form:"url"` }
ProductParams is the set of parameters that can be used when creating or updating a product.
type ProductType ¶
type ProductType string
ProductType is the type of a product.
const ( ProductTypeGood ProductType = "good" ProductTypeService ProductType = "service" )
List of values that ProductType can take.
type PromotionCode ¶
type PromotionCode struct { APIResource Active bool `json:"active"` Code string `json:"code"` Coupon *Coupon `json:"coupon"` Created int64 `json:"created"` Customer *Customer `json:"customer"` ExpiresAt int64 `json:"expires_at"` ID string `json:"id"` Livemode bool `json:"livemode"` MaxRedemptions int64 `json:"max_redemptions"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` Restrictions *PromotionCodeRestrictions `json:"restrictions"` TimesRedeemed int64 `json:"times_redeemed"` }
PromotionCode is the resource representing a Stripe promotion code.
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 promotion codes as retrieved from a list endpoint.
type PromotionCodeListParams ¶
type PromotionCodeListParams struct { ListParams `form:"*"` Active *bool `form:"active"` Code *string `form:"code"` Coupon *string `form:"coupon"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Customer *string `form:"customer"` }
PromotionCodeListParams is the set of parameters that can be used when listing promotion codes.
type PromotionCodeParams ¶
type PromotionCodeParams struct { Params `form:"*"` Active *bool `form:"active"` Code *string `form:"code"` Coupon *string `form:"coupon"` Customer *string `form:"customer"` ExpiresAt *int64 `form:"expires_at"` MaxRedemptions *int64 `form:"max_redemptions"` Restrictions *PromotionCodeRestrictionsParams `form:"restrictions"` }
PromotionCodeParams is the set of parameters that can be used when creating a promotion code.
type PromotionCodeRestrictions ¶
type PromotionCodeRestrictions struct { FirstTimeTransaction bool `json:"first_time_transaction"` MinimumAmount int64 `json:"minimum_amount"` MinimumAmountCurrency Currency `json:"minimum_amount_currency"` }
PromotionCodeRestrictions is the set of restrictions associated with a promotion code.
type PromotionCodeRestrictionsParams ¶
type PromotionCodeRestrictionsParams struct { FirstTimeTransaction *bool `form:"first_time_transaction"` MinimumAmount *int64 `form:"minimum_amount"` MinimumAmountCurrency *string `form:"minimum_amount_currency"` }
PromotionCodeRestrictionsParams is the set of parameters for restrictions on a promotion code.
type Query ¶
type Query func(*Params, *form.Values) ([]interface{}, ListContainer, error)
Query is the function used to get a page listing.
type RadarEarlyFraudWarning ¶
type RadarEarlyFraudWarning struct { APIResource Actionable bool `json:"actionable"` Charge *Charge `json:"charge"` Created int64 `json:"created"` FraudType RadarEarlyFraudWarningFraudType `json:"fraud_type"` ID string `json:"id"` Livemode bool `json:"livemode"` }
RadarEarlyFraudWarning is the resource representing an early fraud warning. For more details see https://stripe.com/docs/api/early_fraud_warnings/object.
type RadarEarlyFraudWarningFraudType ¶
type RadarEarlyFraudWarningFraudType string
RadarEarlyFraudWarningFraudType are strings that map to the type of fraud labelled by the issuer.
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 Values []*RadarEarlyFraudWarning `json:"data"` }
RadarEarlyFraudWarningList is a list of early fraud warnings as retrieved from a list endpoint.
type RadarEarlyFraudWarningListParams ¶
type RadarEarlyFraudWarningListParams struct { ListParams `form:"*"` Charge *string `form:"charge"` }
RadarEarlyFraudWarningListParams is the set of parameters that can be used when listing early fraud warnings. For more details see https://stripe.com/docs/api/early_fraud_warnings/list.
type RadarEarlyFraudWarningParams ¶
type RadarEarlyFraudWarningParams struct {
Params `form:"*"`
}
RadarEarlyFraudWarningParams is the set of parameters that can be used when retrieving early fraud warnings. For more details see https://stripe.com/docs/api/early_fraud_warnings/retrieve.
type RadarValueList ¶
type RadarValueList struct { APIResource Alias string `json:"alias"` Created int64 `json:"created"` CreatedBy string `json:"created_by"` Deleted bool `json:"deleted"` ID string `json:"id"` ItemType RadarValueListItemType `json:"item_type"` ListItems *RadarValueListItemList `json:"list_items"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Name string `json:"name"` Object string `json:"object"` Updated int64 `json:"updated"` UpdatedBy string `json:"updated_by"` }
RadarValueList is the resource representing a value list.
type RadarValueListItem ¶
type RadarValueListItem struct { APIResource Created int64 `json:"created"` CreatedBy string `json:"created_by"` Deleted bool `json:"deleted"` ID string `json:"id"` Livemode bool `json:"livemode"` Name string `json:"name"` Object string `json:"object"` Value string `json:"value"` RadarValueList string `json:"value_list"` }
RadarValueListItem is the resource representing a value list item.
type RadarValueListItemList ¶
type RadarValueListItemList struct { APIResource ListMeta Data []*RadarValueListItem `json:"data"` }
RadarValueListItemList is a list of value list items as retrieved from a list endpoint.
type RadarValueListItemListParams ¶
type RadarValueListItemListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` RadarValueList *string `form:"value_list"` Value *string `form:"value"` }
RadarValueListItemListParams is the set of parameters that can be used when listing value list items.
type RadarValueListItemParams ¶
type RadarValueListItemParams struct { Params `form:"*"` Value *string `form:"value"` RadarValueList *string `form:"value_list"` }
RadarValueListItemParams is the set of parameters that can be used when creating a value list item.
type RadarValueListItemType ¶
type RadarValueListItemType string
RadarValueListItemType is the possible values for a type of value list items.
const ( RadarValueListItemTypeCardBin RadarValueListItemType = "card_bin" RadarValueListItemTypeCardFingerprint RadarValueListItemType = "card_fingerprint" RadarValueListItemTypeCaseSensitiveString RadarValueListItemType = "case_sensitive_string" RadarValueListItemTypeCountry RadarValueListItemType = "country" RadarValueListItemTypeEmail RadarValueListItemType = "email" RadarValueListItemTypeIPAddress RadarValueListItemType = "ip_address" RadarValueListItemTypeString RadarValueListItemType = "string" )
List of values that RadarValueListItemType can take.
type RadarValueListList ¶
type RadarValueListList struct { APIResource ListMeta Data []*RadarValueList `json:"data"` }
RadarValueListList is a list of value lists as retrieved from a list endpoint.
type RadarValueListListParams ¶
type RadarValueListListParams struct { ListParams `form:"*"` Alias *string `form:"alias"` Contains *string `form:"contains"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` }
RadarValueListListParams is the set of parameters that can be used when listing value lists.
type RadarValueListParams ¶
type RadarValueListParams struct { Params `form:"*"` Alias *string `form:"alias"` ItemType *string `form:"item_type"` Name *string `form:"name"` }
RadarValueListParams is the set of parameters that can be used when creating a value list.
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 RateLimitError ¶
type RateLimitError struct {
// contains filtered or unexported fields
}
RateLimitError occurs when the Stripe API is hit to with too many requests too quickly and indicates that the current request has been rate limited.
func (*RateLimitError) Error ¶
func (e *RateLimitError) Error() string
Error serializes the error object to JSON and returns it as a string.
type ReceiverFlow ¶
type ReceiverFlow struct { Address string `json:"address"` AmountCharged int64 `json:"amount_charged"` AmountReceived int64 `json:"amount_received"` AmountReturned int64 `json:"amount_returned"` RefundAttributesMethod SourceRefundAttributesMethod `json:"refund_attributes_method"` RefundAttributesStatus SourceRefundAttributesStatus `json:"refund_attributes_status"` }
ReceiverFlow informs of the state of a receiver authentication flow.
type RedirectFlow ¶
type RedirectFlow struct { FailureReason SourceRedirectFlowFailureReason `json:"failure_reason"` ReturnURL string `json:"return_url"` Status SourceRedirectFlowStatus `json:"status"` URL string `json:"url"` }
RedirectFlow informs of the state of a redirect authentication flow.
type RedirectParams ¶
type RedirectParams struct {
ReturnURL *string `form:"return_url"`
}
RedirectParams is the set of parameters allowed for the redirect hash on source creation or update.
type Refund ¶
type Refund struct { APIResource Amount int64 `json:"amount"` BalanceTransaction *BalanceTransaction `json:"balance_transaction"` Charge *Charge `json:"charge"` Created int64 `json:"created"` Currency Currency `json:"currency"` FailureReason RefundFailureReason `json:"failure_reason"` FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"` ID string `json:"id"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` PaymentIntent *PaymentIntent `json:"payment_intent"` Reason RefundReason `json:"reason"` ReceiptNumber string `json:"receipt_number"` SourceTransferReversal *Reversal `json:"source_transfer_reversal"` Status RefundStatus `json:"status"` TransferReversal *Reversal `json:"transfer_reversal"` }
Refund is the resource representing a Stripe refund. For more details see https://stripe.com/docs/api#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 RefundFailureReason ¶
type RefundFailureReason string
RefundFailureReason is, if set, the reason the refund failed.
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 object for refunds.
type RefundListParams ¶
type RefundListParams struct { ListParams `form:"*"` Charge *string `form:"charge"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` PaymentIntent *string `form:"payment_intent"` }
RefundListParams is the set of parameters that can be used when listing refunds. For more details see https://stripe.com/docs/api#list_refunds.
type RefundParams ¶
type RefundParams struct { Params `form:"*"` Amount *int64 `form:"amount"` Charge *string `form:"charge"` PaymentIntent *string `form:"payment_intent"` Reason *string `form:"reason"` RefundApplicationFee *bool `form:"refund_application_fee"` ReverseTransfer *bool `form:"reverse_transfer"` }
RefundParams is the set of parameters that can be used when refunding a charge. For more details see https://stripe.com/docs/api#refund.
type RefundReason ¶
type RefundReason string
RefundReason is, if set, the reason the refund is being made
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
RefundStatus is the status of the refund.
const ( RefundStatusCanceled RefundStatus = "canceled" RefundStatusFailed RefundStatus = "failed" RefundStatusPending RefundStatus = "pending" RefundStatusSucceeded RefundStatus = "succeeded" )
List of values that RefundStatus can take.
type Relationship ¶
type Relationship struct { Director bool `json:"director"` Executive bool `json:"executive"` Owner bool `json:"owner"` PercentOwnership float64 `json:"percent_ownership"` Representative bool `json:"representative"` Title string `json:"title"` }
Relationship represents how the Person relates to the business.
type RelationshipListParams ¶
type RelationshipListParams struct { Director *bool `form:"director"` Executive *bool `form:"executive"` Owner *bool `form:"owner"` Representative *bool `form:"representative"` }
RelationshipListParams is used to filter persons by the relationship
type RelationshipParams ¶
type RelationshipParams struct { Director *bool `form:"director"` Executive *bool `form:"executive"` Owner *bool `form:"owner"` PercentOwnership *float64 `form:"percent_ownership"` Representative *bool `form:"representative"` Title *string `form:"title"` }
RelationshipParams is used to set the relationship between an account and a person.
type ReportRun ¶
type ReportRun struct { APIResource Created int64 `json:"created"` Error string `json:"error"` ID string `json:"id"` Livemode bool `json:"livemode"` Object string `json:"object"` Parameters *ReportRunParameters `json:"parameters"` ReportType string `json:"report_type"` Result *File `json:"result"` Status ReportRunStatus `json:"status"` SucceededAt int64 `json:"succeeded_at"` }
ReportRun is the resource representing a report run.
type ReportRunList ¶
type ReportRunList struct { APIResource ListMeta Data []*ReportRun `json:"data"` }
ReportRunList is a list of report runs as retrieved from a list endpoint.
type ReportRunListParams ¶
type ReportRunListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` }
ReportRunListParams is the set of parameters that can be used when listing report runs.
type ReportRunParameters ¶
type ReportRunParameters struct { Columns []string `json:"columns"` ConnectedAccount string `json:"connected_account"` Currency Currency `json:"currency"` IntervalEnd int64 `json:"interval_end"` IntervalStart int64 `json:"interval_start"` Payout string `json:"payout"` ReportingCategory string `json:"reporting_category"` Timezone string `json:"timezone"` }
ReportRunParameters describes the parameters hash on a report run.
type ReportRunParametersParams ¶
type ReportRunParametersParams struct { Columns []*string `form:"columns"` ConnectedAccount *string `form:"connected_account"` Currency *string `form:"currency"` IntervalEnd *int64 `form:"interval_end"` IntervalStart *int64 `form:"interval_start"` Payout *string `form:"payout"` ReportingCategory *string `form:"reporting_category"` Timezone *string `form:"timezone"` }
ReportRunParametersParams is the set of parameters that can be used when creating a report run.
type ReportRunParams ¶
type ReportRunParams struct { Params `form:"*"` Parameters *ReportRunParametersParams `form:"parameters"` ReportType *string `form:"report_type"` }
ReportRunParams is the set of parameters that can be used when creating a report run.
type ReportRunStatus ¶
type ReportRunStatus string
ReportRunStatus is the possible values for status on a report run.
const ( ReportRunStatusFailed ReportRunStatus = "failed" ReportRunStatusPending ReportRunStatus = "pending" ReportRunStatusSucceeded ReportRunStatus = "succeeded" )
List of values that ReportRunStatus can take.
type ReportType ¶
type ReportType struct { APIResource DefaultColumns []string `json:"default_columns"` Created int64 `json:"created"` DataAvailableEnd int64 `json:"data_available_end"` DataAvailableStart int64 `json:"data_available_start"` ID string `json:"id"` Name string `json:"name"` Object string `json:"object"` Updated int64 `json:"updated"` Version int64 `json:"version"` }
ReportType is the resource representing a report type.
type ReportTypeList ¶
type ReportTypeList struct { APIResource ListMeta Data []*ReportType `json:"data"` }
ReportTypeList is a list of report types as retrieved from a list endpoint.
type ReportTypeListParams ¶
type ReportTypeListParams struct {
ListParams `form:"*"`
}
ReportTypeListParams is the set of parameters that can be used when listing report types.
type ReportTypeParams ¶
type ReportTypeParams struct {
Params `form:"*"`
}
ReportTypeParams is the set of parameters that can be used when retrieving a report type.
type Requirements ¶
type Requirements struct { CurrentlyDue []string `json:"currently_due"` Errors []*AccountRequirementsError `json:"errors"` EventuallyDue []string `json:"eventually_due"` PastDue []string `json:"past_due"` PendingVerification []string `json:"pending_verification"` }
Requirements represents what's missing to verify a Person.
type Reversal ¶
type Reversal struct { APIResource Amount int64 `json:"amount"` BalanceTransaction *BalanceTransaction `json:"balance_transaction"` Created int64 `json:"created"` Currency Currency `json:"currency"` Description string `json:"description"` DestinationPaymentRefund *Refund `json:"destination_payment_refund"` ID string `json:"id"` Metadata map[string]string `json:"metadata"` SourceRefund *Refund `json:"source_refund"` Transfer string `json:"transfer"` }
Reversal represents a transfer reversal.
func (*Reversal) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a Reversal. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type ReversalList ¶
type ReversalList struct { APIResource ListMeta Data []*Reversal `json:"data"` }
ReversalList is a list of object for reversals.
type ReversalListParams ¶
type ReversalListParams struct { ListParams `form:"*"` Transfer *string `form:"-"` // Included in URL }
ReversalListParams is the set of parameters that can be used when listing reversals.
type ReversalParams ¶
type ReversalParams struct { Params `form:"*"` Amount *int64 `form:"amount"` Description *string `form:"description"` RefundApplicationFee *bool `form:"refund_application_fee"` Transfer *string `form:"-"` // Included in URL }
ReversalParams is the set of parameters that can be used when reversing a transfer.
type Review ¶
type Review struct { APIResource BillingZip string `json:"billing_zip"` Charge *Charge `json:"charge"` ClosedReason ReviewClosedReason `json:"closed_reason"` Created int64 `json:"created"` ID string `json:"id"` IPAddress string `json:"ip_address"` IPAddressLocation *ReviewIPAddressLocation `json:"ip_address_location"` Livemode bool `json:"livemode"` Object string `json:"object"` Open bool `json:"open"` OpenedReason ReviewOpenedReason `json:"opened_reason"` PaymentIntent *PaymentIntent `json:"payment_intent"` Reason ReviewReasonType `json:"reason"` Session *ReviewSession `json:"session"` }
Review is the resource representing a Radar review. For more details see https://stripe.com/docs/api#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:"*"`
}
ReviewApproveParams is the set of parameters that can be used when approving a review.
type ReviewClosedReason ¶
type ReviewClosedReason string
ReviewClosedReason describes the reason why the review is closed.
const ( ReviewClosedReasonApproved ReviewClosedReason = "approved" ReviewClosedReasonDisputed ReviewClosedReason = "disputed" ReviewClosedReasonRefunded ReviewClosedReason = "refunded" ReviewClosedReasonRefundedAsFraud ReviewClosedReason = "refunded_as_fraud" )
List of values that ReviewClosedReason can take.
type ReviewIPAddressLocation ¶
type ReviewIPAddressLocation struct { City string `json:"city"` Country string `json:"country"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Region string `json:"region"` }
ReviewIPAddressLocation represents information about the IP associated with a review.
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"` }
ReviewListParams is the set of parameters that can be used when listing reviews.
type ReviewOpenedReason ¶
type ReviewOpenedReason string
ReviewOpenedReason describes the reason why the review is opened.
const ( ReviewOpenedReasonManual ReviewOpenedReason = "manual" ReviewOpenedReasonRule ReviewOpenedReason = "rule" )
List of values that ReviewOpenedReason can take.
type ReviewParams ¶
type ReviewParams struct {
Params `form:"*"`
}
ReviewParams is the set of parameters that can be used when approving a review.
type ReviewReasonType ¶
type ReviewReasonType string
ReviewReasonType describes the reason why the review is open or closed.
const ( ReviewReasonApproved ReviewReasonType = "approved" ReviewReasonDisputed ReviewReasonType = "disputed" ReviewReasonManual ReviewReasonType = "manual" ReviewReasonRefunded ReviewReasonType = "refunded" ReviewReasonRefundedAsFraud ReviewReasonType = "refunded_as_fraud" ReviewReasonRule ReviewReasonType = "rule" )
List of values that ReviewReasonType can take.
type ReviewSession ¶
type ReviewSession struct { Browser string `json:"browser"` Device string `json:"device"` Platform string `json:"platform"` Version string `json:"version"` }
ReviewSession represents information about the browser session associated with a review.
type SKU ¶
type SKU struct { APIResource Active bool `json:"active"` Attributes map[string]string `json:"attributes"` Created int64 `json:"created"` Currency Currency `json:"currency"` Description string `json:"description"` ID string `json:"id"` Image string `json:"image"` Inventory *Inventory `json:"inventory"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` PackageDimensions *PackageDimensions `json:"package_dimensions"` Price int64 `json:"price"` Product *Product `json:"product"` Updated int64 `json:"updated"` }
SKU is the resource representing a SKU. For more details see https://stripe.com/docs/api#skus.
func (*SKU) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of a SKU. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type SKUInventoryType ¶
type SKUInventoryType string
SKUInventoryType describe's the possible value for inventory type
const ( SKUInventoryTypeBucket SKUInventoryType = "bucket" SKUInventoryTypeFinite SKUInventoryType = "finite" SKUInventoryTypeInfinite SKUInventoryType = "infinite" )
List of values that SKUInventoryType can take.
type SKUInventoryValue ¶
type SKUInventoryValue string
SKUInventoryValue describe's the possible value for inventory value
const ( SKUInventoryValueInStock SKUInventoryValue = "in_stock" SKUInventoryValueLimited SKUInventoryValue = "limited" SKUInventoryValueOutOfStock SKUInventoryValue = "out_of_stock" )
List of values that SKUInventoryValue can take.
type SKUList ¶
type SKUList struct { APIResource ListMeta Data []*SKU `json:"data"` }
SKUList is a list of SKUs as returned from a list endpoint.
type SKUListParams ¶
type SKUListParams struct { ListParams `form:"*"` Active *bool `form:"active"` Attributes map[string]string `form:"attributes"` IDs []*string `form:"ids"` InStock *bool `form:"in_stock"` Product *string `form:"product"` }
SKUListParams is the set of parameters that can be used when listing SKUs.
type SKUParams ¶
type SKUParams struct { Params `form:"*"` Active *bool `form:"active"` Attributes map[string]string `form:"attributes"` Currency *string `form:"currency"` Description *string `form:"description"` ID *string `form:"id"` Image *string `form:"image"` Inventory *InventoryParams `form:"inventory"` PackageDimensions *PackageDimensionsParams `form:"package_dimensions"` Price *int64 `form:"price"` Product *string `form:"product"` }
SKUParams is the set of parameters allowed on SKU creation or update.
type SetupAttempt ¶ added in v72.9.0
type SetupAttempt struct { APIResource Application *Application `json:"application"` Created int64 `json:"created"` Customer *Customer `json:"customer"` ID string `json:"id"` Livemode bool `json:"livemode"` Object string `json:"object"` OnBehalfOf *Account `json:"on_behalf_of"` PaymentMethod *PaymentMethod `json:"payment_method"` PaymentMethodDetails *SetupAttemptPaymentMethodDetails `json:"payment_method_details"` SetupError *Error `json:"setup_error"` Status SetupAttemptStatus `json:"status"` Usage SetupAttemptUsage `json:"usage"` }
SetupAttempt is the resource representing a Stripe setup attempt.
func (*SetupAttempt) UnmarshalJSON ¶ added in v72.9.0
func (p *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 SetupAttemptList ¶ added in v72.9.0
type SetupAttemptList struct { APIResource ListMeta Data []*SetupAttempt `json:"data"` }
SetupAttemptList is a list of setup attempts as retrieved from a list endpoint.
type SetupAttemptListParams ¶ added in v72.9.0
type SetupAttemptListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` SetupIntent *string `form:"setup_intent"` }
SetupAttemptListParams is the set of parameters that can be used when listing setup attempts.
type SetupAttemptPaymentMethodDetails ¶ added in v72.9.0
type SetupAttemptPaymentMethodDetails struct { Bancontact *SetupAttemptPaymentMethodDetailsBancontact `json:"bancontact"` Card *SetupAttemptPaymentMethodDetailsCard `json:"card"` Ideal *SetupAttemptPaymentMethodDetailsIdeal `json:"ideal"` Sofort *SetupAttemptPaymentMethodDetailsSofort `json:"sofort"` Type SetupAttemptPaymentMethodDetailsType `json:"type"` }
SetupAttemptPaymentMethodDetails represents the details about the PaymentMethod associated with the setup attempt.
type SetupAttemptPaymentMethodDetailsBancontact ¶ added in v72.12.0
type SetupAttemptPaymentMethodDetailsBancontact struct { BankCode string `json:"bank_code"` BankName string `json:"bank_name"` Bic string `json:"bic"` GeneratedSepaDebit *PaymentMethod `json:"generated_sepa_debit"` GeneratedSepaDebitMandate *Mandate `json:"generated_sepa_debit_mandate"` IbanLast4 string `json:"iban_last4"` PreferredLanguage string `json:"preferred_language"` VerifiedName string `json:"verified_name"` }
SetupAttemptPaymentMethodDetailsBancontact represents details about the Bancontact PaymentMethod.
type SetupAttemptPaymentMethodDetailsCard ¶ added in v72.9.0
type SetupAttemptPaymentMethodDetailsCard struct {
ThreeDSecure *SetupAttemptPaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"`
}
SetupAttemptPaymentMethodDetailsCard represents details about the Card PaymentMethod.
type SetupAttemptPaymentMethodDetailsCardThreeDSecure ¶ added in v72.9.0
type SetupAttemptPaymentMethodDetailsCardThreeDSecure struct { AuthenticationFlow SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow `json:"authentication_flow"` Result SetupAttemptPaymentMethodDetailsCardThreeDSecureResult `json:"result"` ResultReason SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason `json:"result_reason"` Version string `json:"version"` }
SetupAttemptPaymentMethodDetailsCardThreeDSecure represents details about 3DS associated with the setup attempt's payment method.
type SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow ¶ added in v72.9.0
type SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow string
SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow indicates the type of 3D Secure authentication performed.
const ( SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlowChallenge SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "challenge" SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlowFrictionless SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "frictionless" )
List of values that SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow can take.
type SetupAttemptPaymentMethodDetailsCardThreeDSecureResult ¶ added in v72.9.0
type SetupAttemptPaymentMethodDetailsCardThreeDSecureResult string
SetupAttemptPaymentMethodDetailsCardThreeDSecureResult indicates the outcome of 3D Secure authentication.
const ( SetupAttemptPaymentMethodDetailsCardThreeDSecureResultAttemptAcknowledged SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "attempt_acknowledged" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultAuthenticated SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "authenticated" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultFailed SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "failed" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultNotSupported SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "not_supported" SetupAttemptPaymentMethodDetailsCardThreeDSecureResultProcessingError SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "processing_error" )
List of values that SetupAttemptPaymentMethodDetailsCardThreeDSecureResult can take.
type SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason ¶ added in v72.9.0
type SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason string
SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason represents dditional information about why 3D Secure succeeded or failed
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 SetupAttemptPaymentMethodDetailsIdeal ¶ added in v72.12.0
type SetupAttemptPaymentMethodDetailsIdeal struct { Bank string `json:"bank"` Bic string `json:"bic"` GeneratedSepaDebit *PaymentMethod `json:"generated_sepa_debit"` GeneratedSepaDebitMandate *Mandate `json:"generated_sepa_debit_mandate"` IbanLast4 string `json:"iban_last4"` VerifiedName string `json:"verified_name"` }
SetupAttemptPaymentMethodDetailsIdeal represents details about the Bancontact PaymentMethod.
type SetupAttemptPaymentMethodDetailsSofort ¶ added in v72.12.0
type SetupAttemptPaymentMethodDetailsSofort struct { BankCode string `json:"bank_code"` BankName string `json:"bank_name"` Bic string `json:"bic"` GeneratedSepaDebit *PaymentMethod `json:"generated_sepa_debit"` GeneratedSepaDebitMandate *Mandate `json:"generated_sepa_debit_mandate"` IbanLast4 string `json:"iban_last4"` PreferredLanguage string `json:"preferred_language"` VerifiedName string `json:"verified_name"` }
SetupAttemptPaymentMethodDetailsSofort represents details about the Bancontact PaymentMethod.
type SetupAttemptPaymentMethodDetailsType ¶ added in v72.9.0
type SetupAttemptPaymentMethodDetailsType string
SetupAttemptPaymentMethodDetailsType is the type of the payment method associated with the setup attempt's payment method details.
const (
SetupAttemptPaymentMethodDetailsTypeCard SetupAttemptPaymentMethodDetailsType = "card"
)
List of values that SetupAttemptPaymentMethodDetailsType can take.
type SetupAttemptStatus ¶ added in v72.9.0
type SetupAttemptStatus string
SetupAttemptStatus is the list of allowed values for the setup attempt's status.
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 ¶ added in v72.9.0
type SetupAttemptUsage string
SetupAttemptUsage is the list of allowed values for usage.
const ( SetupAttemptUsageOffSession SetupAttemptUsage = "off_session" SetupAttemptUsageOnSession SetupAttemptUsage = "on_session" )
List of values that SetupAttemptUsage can take.
type SetupIntent ¶
type SetupIntent struct { APIResource Application *Application `json:"application"` CancellationReason SetupIntentCancellationReason `json:"cancellation_reason"` ClientSecret string `json:"client_secret"` Created int64 `json:"created"` Customer *Customer `json:"customer"` Description string `json:"description"` ID string `json:"id"` LastSetupError *Error `json:"last_setup_error"` LatestAttempt *SetupAttempt `json:"latest_attempt"` Livemode bool `json:"livemode"` Mandate *Mandate `json:"mandate"` Metadata map[string]string `json:"metadata"` NextAction *SetupIntentNextAction `json:"next_action"` Object string `json:"object"` OnBehalfOf *Account `json:"on_behalf_of"` PaymentMethod *PaymentMethod `json:"payment_method"` PaymentMethodOptions *SetupIntentPaymentMethodOptions `json:"payment_method_options"` PaymentMethodTypes []string `json:"payment_method_types"` SingleUseMandate *Mandate `json:"single_use_mandate"` Status SetupIntentStatus `json:"status"` Usage SetupIntentUsage `json:"usage"` }
SetupIntent is the resource representing a Stripe payout. For more details see https://stripe.com/docs/api#payment_intents.
func (*SetupIntent) UnmarshalJSON ¶
func (p *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 SetupIntentCancelParams ¶
type SetupIntentCancelParams struct { Params `form:"*"` CancellationReason *string `form:"cancellation_reason"` }
SetupIntentCancelParams is the set of parameters that can be used when canceling a setup intent.
type SetupIntentCancellationReason ¶
type SetupIntentCancellationReason string
SetupIntentCancellationReason is the list of allowed values for the cancelation reason.
const ( SetupIntentCancellationReasonAbandoned SetupIntentCancellationReason = "abandoned" SetupIntentCancellationReasonFailedInvoice SetupIntentCancellationReason = "failed_invoice" SetupIntentCancellationReasonFraudulent SetupIntentCancellationReason = "fraudulent" SetupIntentCancellationReasonRequestedByCustomer SetupIntentCancellationReason = "requested_by_customer" )
List of values that SetupIntentCancellationReason can take.
type SetupIntentConfirmParams ¶
type SetupIntentConfirmParams struct { Params `form:"*"` MandateData *SetupIntentMandateDataParams `form:"mandate_data"` PaymentMethod *string `form:"payment_method"` PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"` ReturnURL *string `form:"return_url"` }
SetupIntentConfirmParams is the set of parameters that can be used when confirming a setup intent.
type SetupIntentList ¶
type SetupIntentList struct { APIResource ListMeta Data []*SetupIntent `json:"data"` }
SetupIntentList is a list of setup intents as retrieved from a list endpoint.
type SetupIntentListParams ¶
type SetupIntentListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Customer *string `form:"customer"` PaymentMethod *string `form:"payment_method"` }
SetupIntentListParams is the set of parameters that can be used when listing setup intents. For more details see https://stripe.com/docs/api#list_payouts.
type SetupIntentMandateDataCustomerAcceptanceOfflineParams ¶
type SetupIntentMandateDataCustomerAcceptanceOfflineParams struct { }
SetupIntentMandateDataCustomerAcceptanceOfflineParams is the set of parameters for the customer acceptance of an offline mandate.
type SetupIntentMandateDataCustomerAcceptanceOnlineParams ¶
type SetupIntentMandateDataCustomerAcceptanceOnlineParams struct { IPAddress *string `form:"ip_address"` UserAgent *string `form:"user_agent"` }
SetupIntentMandateDataCustomerAcceptanceOnlineParams is the set of parameters for the customer acceptance of an online mandate.
type SetupIntentMandateDataCustomerAcceptanceParams ¶
type SetupIntentMandateDataCustomerAcceptanceParams struct { AcceptedAt int64 `form:"accepted_at"` Offline *SetupIntentMandateDataCustomerAcceptanceOfflineParams `form:"offline"` Online *SetupIntentMandateDataCustomerAcceptanceOnlineParams `form:"online"` Type MandateCustomerAcceptanceType `form:"type"` }
SetupIntentMandateDataCustomerAcceptanceParams is the set of parameters for the customer acceptance of a mandate.
type SetupIntentMandateDataParams ¶
type SetupIntentMandateDataParams struct {
CustomerAcceptance *SetupIntentMandateDataCustomerAcceptanceParams `form:"customer_acceptance"`
}
SetupIntentMandateDataParams is the set of parameters controlling the creation of the mandate associated with this SetupIntent.
type SetupIntentNextAction ¶
type SetupIntentNextAction struct { RedirectToURL *SetupIntentNextActionRedirectToURL `json:"redirect_to_url"` Type SetupIntentNextActionType `json:"type"` }
SetupIntentNextAction represents the type of action to take on a setup intent.
type SetupIntentNextActionRedirectToURL ¶
type SetupIntentNextActionRedirectToURL struct { ReturnURL string `json:"return_url"` URL string `json:"url"` }
SetupIntentNextActionRedirectToURL represents the resource for the next action of type "redirect_to_url".
type SetupIntentNextActionType ¶
type SetupIntentNextActionType string
SetupIntentNextActionType is the list of allowed values for the next action's type.
const (
SetupIntentNextActionTypeRedirectToURL SetupIntentNextActionType = "redirect_to_url"
)
List of values that SetupIntentNextActionType can take.
type SetupIntentParams ¶
type SetupIntentParams struct { Params `form:"*"` Confirm *bool `form:"confirm"` Customer *string `form:"customer"` Description *string `form:"description"` MandateData *SetupIntentMandateDataParams `form:"mandate_data"` OnBehalfOf *string `form:"on_behalf_of"` PaymentMethod *string `form:"payment_method"` PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"` PaymentMethodTypes []*string `form:"payment_method_types"` ReturnURL *string `form:"return_url"` SingleUse *SetupIntentSingleUseParams `form:"single_use"` Usage *string `form:"usage"` }
SetupIntentParams is the set of parameters that can be used when handling a setup intent.
type SetupIntentPaymentMethodOptions ¶
type SetupIntentPaymentMethodOptions struct {
Card *SetupIntentPaymentMethodOptionsCard `json:"card"`
}
SetupIntentPaymentMethodOptions represents the type-specific payment method options applied to a SetupIntent.
type SetupIntentPaymentMethodOptionsCard ¶
type SetupIntentPaymentMethodOptionsCard struct {
RequestThreeDSecure SetupIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
}
SetupIntentPaymentMethodOptionsCard represents the card-specific options applied to a SetupIntent.
type SetupIntentPaymentMethodOptionsCardParams ¶
type SetupIntentPaymentMethodOptionsCardParams struct { MOTO *bool `form:"moto"` RequestThreeDSecure *string `form:"request_three_d_secure"` }
SetupIntentPaymentMethodOptionsCardParams represents the card-specific options applied to a SetupIntent.
type SetupIntentPaymentMethodOptionsCardRequestThreeDSecure ¶
type SetupIntentPaymentMethodOptionsCardRequestThreeDSecure string
SetupIntentPaymentMethodOptionsCardRequestThreeDSecure is the list of allowed values controlling when to request 3D Secure on a SetupIntent.
const ( SetupIntentPaymentMethodOptionsCardRequestThreeDSecureAny SetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "any" SetupIntentPaymentMethodOptionsCardRequestThreeDSecureAutomatic SetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "automatic" )
List of values that SetupIntentNextActionType can take.
type SetupIntentPaymentMethodOptionsParams ¶
type SetupIntentPaymentMethodOptionsParams struct {
Card *SetupIntentPaymentMethodOptionsCardParams `form:"card"`
}
SetupIntentPaymentMethodOptionsParams represents the type-specific payment method options applied to a SetupIntent.
type SetupIntentSingleUseParams ¶
type SetupIntentSingleUseParams struct { Amount *int64 `form:"amount"` Currency *string `form:"currency"` }
SetupIntentSingleUseParams represents the single-use mandate-specific parameters.
type SetupIntentStatus ¶
type SetupIntentStatus string
SetupIntentStatus is the list of allowed values for the setup intent's status.
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
SetupIntentUsage is the list of allowed values for the setup intent's usage.
const ( SetupIntentUsageOffSession SetupIntentUsage = "off_session" SetupIntentUsageOnSession SetupIntentUsage = "on_session" )
List of values that SetupIntentUsage can take.
type Shipping ¶
type Shipping struct { Address *Address `json:"address"` Carrier string `json:"carrier"` Name string `json:"name"` Phone string `json:"phone"` TrackingNumber string `json:"tracking_number"` }
Shipping describes the shipping hash on an order.
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 ShippingMethod ¶
type ShippingMethod struct { Amount int64 `json:"amount"` ID string `json:"id"` Currency Currency `json:"currency"` DeliveryEstimate *DeliveryEstimate `json:"delivery_estimate"` Description string `json:"description"` }
ShippingMethod describes a shipping method as available on an order.
type ShippingParams ¶
type ShippingParams struct { Address *AddressParams `form:"address"` Name *string `form:"name"` Phone *string `form:"phone"` }
ShippingParams is the set of parameters that can be used for the shipping hash on order creation.
type SigmaScheduledQueryRun ¶
type SigmaScheduledQueryRun struct { APIResource Created int64 `json:"created"` DataLoadTime int64 `json:"data_load_time"` Error string `json:"error"` File *File `json:"file"` ID string `json:"id"` Livemode bool `json:"livemode"` Object string `json:"object"` ResultAvailableUntil int64 `json:"result_available_until"` SQL string `json:"sql"` Status SigmaScheduledQueryRunStatus `json:"status"` Query string `json:"query"` Title string `json:"title"` }
SigmaScheduledQueryRun is the resource representing a scheduled query run.
func (*SigmaScheduledQueryRun) UnmarshalJSON ¶
func (i *SigmaScheduledQueryRun) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of an SigmaScheduledQueryRun. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type SigmaScheduledQueryRunList ¶
type SigmaScheduledQueryRunList struct { APIResource ListMeta Data []*SigmaScheduledQueryRun `json:"data"` }
SigmaScheduledQueryRunList is a list of scheduled query runs as retrieved from a list endpoint.
type SigmaScheduledQueryRunListParams ¶
type SigmaScheduledQueryRunListParams struct {
ListParams `form:"*"`
}
SigmaScheduledQueryRunListParams is the set of parameters that can be used when listing scheduled query runs.
type SigmaScheduledQueryRunParams ¶
type SigmaScheduledQueryRunParams struct {
Params `form:"*"`
}
SigmaScheduledQueryRunParams is the set of parameters that can be used when updating a scheduled query run.
type SigmaScheduledQueryRunStatus ¶
type SigmaScheduledQueryRunStatus string
SigmaScheduledQueryRunStatus is the possible values for status for a scheduled query run.
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 Amount int64 `json:"amount"` ClientSecret string `json:"client_secret"` CodeVerification *CodeVerificationFlow `json:"code_verification,omitempty"` Created int64 `json:"created"` Currency Currency `json:"currency"` Customer string `json:"customer"` Flow SourceFlow `json:"flow"` ID string `json:"id"` Livemode bool `json:"livemode"` Mandate *SourceMandate `json:"mandate"` Metadata map[string]string `json:"metadata"` Owner *SourceOwner `json:"owner"` Receiver *ReceiverFlow `json:"receiver,omitempty"` Redirect *RedirectFlow `json:"redirect,omitempty"` StatementDescriptor string `json:"statement_descriptor"` SourceOrder *SourceSourceOrder `json:"source_order"` Status SourceStatus `json:"status"` Type string `json:"type"` TypeData map[string]interface{} Usage SourceUsage `json:"usage"` }
Source is the resource representing a Source. For more details see https://stripe.com/docs/api#sources.
func (*Source) UnmarshalJSON ¶
UnmarshalJSON handles deserialization of an Source. This custom unmarshaling is needed to extract the type specific data (accessible under `TypeData`) but stored in JSON under a hash named after the `type` of the source.
type SourceCodeVerificationFlowStatus ¶
type SourceCodeVerificationFlowStatus string
SourceCodeVerificationFlowStatus represents the possible statuses of a code verification flow.
const ( SourceCodeVerificationFlowStatusFailed SourceCodeVerificationFlowStatus = "failed" SourceCodeVerificationFlowStatusPending SourceCodeVerificationFlowStatus = "pending" SourceCodeVerificationFlowStatusSucceeded SourceCodeVerificationFlowStatus = "succeeded" )
List of values that SourceCodeVerificationFlowStatus can take.
type SourceFlow ¶
type SourceFlow string
SourceFlow represents the possible flows of a source object.
const ( SourceFlowCodeVerification SourceFlow = "code_verification" SourceFlowNone SourceFlow = "none" SourceFlowReceiver SourceFlow = "receiver" SourceFlowRedirect SourceFlow = "redirect" )
List of values that SourceFlow can take.
type SourceList ¶
type SourceList struct { APIResource ListMeta Data []*PaymentSource `json:"data"` }
SourceList is a list object for cards.
type SourceListParams ¶
type SourceListParams struct { ListParams `form:"*"` Customer *string `form:"-"` // Handled in URL }
SourceListParams are used to enumerate the payment sources that are attached to a Customer.
type SourceMandate ¶
type SourceMandate struct { Acceptance *SourceMandateAcceptance `json:"acceptance"` NotificationMethod SourceMandateNotificationMethod `json:"notification_method"` Reference string `json:"reference"` URL string `json:"url"` }
SourceMandate describes a source mandate.
type SourceMandateAcceptance ¶
type SourceMandateAcceptance struct { Date int64 `json:"date"` IP string `json:"ip"` Status SourceMandateAcceptanceStatus `json:"status"` UserAgent string `json:"user_agent"` }
SourceMandateAcceptance describes a source mandate acceptance state.
type SourceMandateAcceptanceOfflineParams ¶
type SourceMandateAcceptanceOfflineParams struct {
ContactEmail *string `form:"contact_email"`
}
SourceMandateAcceptanceOfflineParams describes the set of parameters for offline accepted mandate
type SourceMandateAcceptanceOnlineParams ¶
type SourceMandateAcceptanceOnlineParams struct { Date *int64 `form:"date"` IP *string `form:"ip"` UserAgent *string `form:"user_agent"` }
SourceMandateAcceptanceOnlineParams describes the set of parameters for online accepted mandate
type SourceMandateAcceptanceParams ¶
type SourceMandateAcceptanceParams struct { Date *int64 `form:"date"` IP *string `form:"ip"` Offline *SourceMandateAcceptanceOfflineParams `form:"offline"` Online *SourceMandateAcceptanceOnlineParams `form:"online"` Status *string `form:"status"` Type *string `form:"type"` UserAgent *string `form:"user_agent"` }
SourceMandateAcceptanceParams describes the set of parameters allowed for the `acceptance` hash on source creation or update.
type SourceMandateAcceptanceStatus ¶
type SourceMandateAcceptanceStatus string
SourceMandateAcceptanceStatus represents the possible failure reasons of a redirect flow.
const ( SourceMandateAcceptanceStatusAccepted SourceMandateAcceptanceStatus = "accepted" SourceMandateAcceptanceStatusRefused SourceMandateAcceptanceStatus = "refused" )
List of values that SourceMandateAcceptanceStatus can take.
type SourceMandateNotificationMethod ¶
type SourceMandateNotificationMethod string
SourceMandateNotificationMethod represents the possible methods of notification for a mandate.
const ( SourceMandateNotificationMethodEmail SourceMandateNotificationMethod = "email" SourceMandateNotificationMethodManual SourceMandateNotificationMethod = "manual" SourceMandateNotificationMethodNone SourceMandateNotificationMethod = "none" )
List of values that SourceMandateNotificationMethod can take.
type SourceMandateParams ¶
type SourceMandateParams struct { Amount *int64 `form:"amount"` Acceptance *SourceMandateAcceptanceParams `form:"acceptance"` Currency *string `form:"currency"` Interval *string `form:"interval"` NotificationMethod *string `form:"notification_method"` }
SourceMandateParams describes the set of parameters allowed for the `mandate` hash on source creation or update.
type SourceObjectDetachParams ¶
SourceObjectDetachParams is the set of parameters that can be used when detaching a source from a customer.
type SourceObjectParams ¶
type SourceObjectParams struct { Params `form:"*"` Amount *int64 `form:"amount"` Currency *string `form:"currency"` Customer *string `form:"customer"` Flow *string `form:"flow"` Mandate *SourceMandateParams `form:"mandate"` OriginalSource *string `form:"original_source"` Owner *SourceOwnerParams `form:"owner"` Receiver *SourceReceiverParams `form:"receiver"` Redirect *RedirectParams `form:"redirect"` SourceOrder *SourceOrderParams `form:"source_order"` StatementDescriptor *string `form:"statement_descriptor"` Token *string `form:"token"` Type *string `form:"type"` TypeData map[string]string `form:"-"` Usage *string `form:"usage"` }
SourceObjectParams is the set of parameters allowed on source creation or update.
type SourceOrderItemsParams ¶
type SourceOrderItemsParams struct { Amount *int64 `form:"amount"` Currency *string `form:"currency"` Description *string `form:"description"` Parent *string `form:"parent"` Quantity *int64 `form:"quantity"` Type *string `form:"type"` }
SourceOrderItemsParams is the set of parameters allowed for the items on a source order for a source.
type SourceOrderParams ¶
type SourceOrderParams struct { Items []*SourceOrderItemsParams `form:"items"` Shipping *ShippingDetailsParams `form:"shipping"` }
SourceOrderParams is the set of parameters allowed for the source order of a source.
type SourceOwner ¶
type SourceOwner struct { Address *Address `json:"address,omitempty"` Email string `json:"email"` Name string `json:"name"` Phone string `json:"phone"` VerifiedAddress *Address `json:"verified_address,omitempty"` VerifiedEmail string `json:"verified_email"` VerifiedName string `json:"verified_name"` VerifiedPhone string `json:"verified_phone"` }
SourceOwner describes the owner hash on a source.
type SourceOwnerParams ¶
type SourceOwnerParams struct { Address *AddressParams `form:"address"` Email *string `form:"email"` Name *string `form:"name"` Phone *string `form:"phone"` }
SourceOwnerParams is the set of parameters allowed for the owner hash on source creation or update.
type SourceParams ¶
type SourceParams struct { Card *CardParams `form:"-"` Token *string `form:"source"` }
SourceParams is a union struct used to describe an arbitrary payment source.
func SourceParamsFor ¶
func SourceParamsFor(obj interface{}) (*SourceParams, error)
SourceParamsFor creates SourceParams objects around supported payment sources, returning errors if not.
Currently supported source types are Card (CardParams) and Tokens/IDs (string), where Tokens could be single use card tokens
type SourceReceiverParams ¶
type SourceReceiverParams struct {
RefundAttributesMethod *string `form:"refund_attributes_method"`
}
SourceReceiverParams is the set of parameters allowed for the `receiver` hash on source creation or update.
type SourceRedirectFlowFailureReason ¶
type SourceRedirectFlowFailureReason string
SourceRedirectFlowFailureReason represents the possible failure reasons of a redirect flow.
const ( SourceRedirectFlowFailureReasonDeclined SourceRedirectFlowFailureReason = "declined" SourceRedirectFlowFailureReasonProcessingError SourceRedirectFlowFailureReason = "processing_error" SourceRedirectFlowFailureReasonUserAbort SourceRedirectFlowFailureReason = "user_abort" )
List of values that SourceRedirectFlowFailureReason can take.
type SourceRedirectFlowStatus ¶
type SourceRedirectFlowStatus string
SourceRedirectFlowStatus represents the possible statuses of a redirect flow.
const ( SourceRedirectFlowStatusFailed SourceRedirectFlowStatus = "failed" SourceRedirectFlowStatusNotRequired SourceRedirectFlowStatus = "not_required" SourceRedirectFlowStatusPending SourceRedirectFlowStatus = "pending" SourceRedirectFlowStatusSucceeded SourceRedirectFlowStatus = "succeeded" )
List of values that SourceRedirectFlowStatus can take.
type SourceRefundAttributesMethod ¶
type SourceRefundAttributesMethod string
SourceRefundAttributesMethod are the possible method to retrieve a receiver's refund attributes.
const ( SourceRefundAttributesMethodEmail SourceRefundAttributesMethod = "email" SourceRefundAttributesMethodManual SourceRefundAttributesMethod = "manual" )
List of values that SourceRefundAttributesMethod can take.
type SourceRefundAttributesStatus ¶
type SourceRefundAttributesStatus string
SourceRefundAttributesStatus are the possible status of a receiver's refund attributes.
const ( SourceRefundAttributesStatusAvailable SourceRefundAttributesStatus = "available" SourceRefundAttributesStatusMissing SourceRefundAttributesStatus = "missing" SourceRefundAttributesStatusRequested SourceRefundAttributesStatus = "requested" )
List of values that SourceRefundAttributesStatus can take.
type SourceSourceOrder ¶
type SourceSourceOrder struct { Amount int64 `json:"amount"` Currency Currency `json:"currency"` Email string `json:"email"` Items *[]SourceSourceOrderItems `json:"items"` Shipping *ShippingDetails `json:"shipping"` }
SourceSourceOrder describes a source order for a source.
type SourceSourceOrderItemType ¶
type SourceSourceOrderItemType string
SourceSourceOrderItemType describes the type of source order items on source orders for sources.
const ( SourceSourceOrderItemTypeDiscount SourceSourceOrderItemType = "discount" SourceSourceOrderItemTypeSKU SourceSourceOrderItemType = "sku" SourceSourceOrderItemTypeShipping SourceSourceOrderItemType = "shipping" SourceSourceOrderItemTypeTax SourceSourceOrderItemType = "tax" )
The list of possible values for source order item types.
type SourceSourceOrderItems ¶
type SourceSourceOrderItems struct { Amount int64 `json:"amount"` Currency Currency `json:"currency"` Description string `json:"description"` Quantity int64 `json:"quantity"` Type SourceSourceOrderItemType `json:"type"` }
SourceSourceOrderItems describes the items on source orders for sources.
type SourceStatus ¶
type SourceStatus string
SourceStatus represents the possible statuses of a source object.
const ( SourceStatusCanceled SourceStatus = "canceled" SourceStatusChargeable SourceStatus = "chargeable" SourceStatusConsumed SourceStatus = "consumed" SourceStatusFailed SourceStatus = "failed" SourceStatusPending SourceStatus = "pending" )
List of values that SourceStatus can take.
type SourceTransaction ¶
type SourceTransaction struct { Amount int64 `json:"amount"` Created int64 `json:"created"` Currency Currency `json:"currency"` CustomerData string `json:"customer_data"` ID string `json:"id"` Livemode bool `json:"livemode"` Source string `json:"source"` Type string `json:"type"` TypeData map[string]interface{} }
SourceTransaction is the resource representing a Stripe source transaction.
func (*SourceTransaction) UnmarshalJSON ¶
func (t *SourceTransaction) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a SourceTransaction. This custom unmarshaling is needed to extract the type specific data (accessible under `TypeData`) but stored in JSON under a hash named after the `type` of the source transaction.
type SourceTransactionList ¶
type SourceTransactionList struct { APIResource ListMeta Data []*SourceTransaction `json:"data"` }
SourceTransactionList is a list object for SourceTransactions.
type SourceTransactionListParams ¶
type SourceTransactionListParams struct { ListParams `form:"*"` Source *string `form:"-"` // Sent in with the URL }
SourceTransactionListParams is the set of parameters that can be used when listing SourceTransactions.
type SourceUsage ¶
type SourceUsage string
SourceUsage represents the possible usages of a source object.
const ( SourceUsageReusable SourceUsage = "reusable" SourceUsageSingleUse SourceUsage = "single_use" )
List of values that SourceUsage can take.
type SourceVerifyParams ¶
type SourceVerifyParams struct { Params `form:"*"` Amounts [2]int64 `form:"amounts"` // Amounts is used when verifying bank accounts Customer *string `form:"-"` // Goes in the URL Values []*string `form:"values"` // Values is used when verifying sources }
SourceVerifyParams are used to verify a customer source For more details see https://stripe.com/docs/guides/ach-beta
type StatusTransitions ¶
type StatusTransitions struct { Canceled int64 `json:"canceled"` Fulfilled int64 `json:"fulfilled"` Paid int64 `json:"paid"` Returned int64 `json:"returned"` }
StatusTransitions are the timestamps at which the order status was updated.
type StatusTransitionsFilterParams ¶
type StatusTransitionsFilterParams struct { Canceled *int64 `form:"canceled"` CanceledRange *RangeQueryParams `form:"canceled"` Fulfilled *int64 `form:"fulfilled"` FulfilledRange *RangeQueryParams `form:"fulfilled"` Paid *int64 `form:"paid"` PaidRange *RangeQueryParams `form:"paid"` Returned *int64 `form:"returned"` ReturnedRange *RangeQueryParams `form:"returned"` }
StatusTransitionsFilterParams are parameters that can used to filter on status_transition when listing orders.
type Subscription ¶
type Subscription struct { APIResource ApplicationFeePercent float64 `json:"application_fee_percent"` BillingCycleAnchor int64 `json:"billing_cycle_anchor"` BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"` CancelAt int64 `json:"cancel_at"` CancelAtPeriodEnd bool `json:"cancel_at_period_end"` CanceledAt int64 `json:"canceled_at"` CollectionMethod SubscriptionCollectionMethod `json:"collection_method"` Created int64 `json:"created"` CurrentPeriodEnd int64 `json:"current_period_end"` CurrentPeriodStart int64 `json:"current_period_start"` Customer *Customer `json:"customer"` DaysUntilDue int64 `json:"days_until_due"` DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"` DefaultSource *PaymentSource `json:"default_source"` DefaultTaxRates []*TaxRate `json:"default_tax_rates"` Discount *Discount `json:"discount"` EndedAt int64 `json:"ended_at"` ID string `json:"id"` Items *SubscriptionItemList `json:"items"` LatestInvoice *Invoice `json:"latest_invoice"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` NextPendingInvoiceItemInvoice int64 `json:"next_pending_invoice_item_invoice"` Object string `json:"object"` OnBehalfOf *Account `json:"on_behalf_of"` PauseCollection SubscriptionPauseCollection `json:"pause_collection"` PendingInvoiceItemInterval SubscriptionPendingInvoiceItemInterval `json:"pending_invoice_item_interval"` PendingSetupIntent *SetupIntent `json:"pending_setup_intent"` PendingUpdate *SubscriptionPendingUpdate `json:"pending_update"` Plan *Plan `json:"plan"` Quantity int64 `json:"quantity"` Schedule *SubscriptionSchedule `json:"schedule"` StartDate int64 `json:"start_date"` Status SubscriptionStatus `json:"status"` TransferData *SubscriptionTransferData `json:"transfer_data"` TrialEnd int64 `json:"trial_end"` TrialStart int64 `json:"trial_start"` }
Subscription is the resource representing a Stripe subscription. For more details see https://stripe.com/docs/api#subscriptions.
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 { Price *string `form:"price"` PriceData *InvoiceItemPriceDataParams `form:"price_data"` Quantity *int64 `form:"quantity"` TaxRates []*string `form:"tax_rates"` }
SubscriptionAddInvoiceItemParams is a structure representing the parameters allowed to control the invoice items to add at to a subscription's first invoice.
type SubscriptionBillingThresholds ¶
type SubscriptionBillingThresholds struct { AmountGTE int64 `json:"amount_gte"` ResetBillingCycleAnchor bool `json:"reset_billing_cycle_anchor"` }
SubscriptionBillingThresholds is a structure representing the billing thresholds for a subscription.
type SubscriptionBillingThresholdsParams ¶
type SubscriptionBillingThresholdsParams struct { AmountGTE *int64 `form:"amount_gte"` ResetBillingCycleAnchor *bool `form:"reset_billing_cycle_anchor"` }
SubscriptionBillingThresholdsParams is a structure representing the parameters allowed to control billing thresholds for a subscription.
type SubscriptionCancelParams ¶
type SubscriptionCancelParams struct { Params `form:"*"` InvoiceNow *bool `form:"invoice_now"` Prorate *bool `form:"prorate"` }
SubscriptionCancelParams is the set of parameters that can be used when canceling a subscription. For more details see https://stripe.com/docs/api#cancel_subscription
type SubscriptionCollectionMethod ¶
type SubscriptionCollectionMethod string
SubscriptionCollectionMethod is the type of collection method for this subscription's invoices.
const ( SubscriptionCollectionMethodChargeAutomatically SubscriptionCollectionMethod = "charge_automatically" SubscriptionCollectionMethodSendInvoice SubscriptionCollectionMethod = "send_invoice" )
List of values that SubscriptionCollectionMethod can take.
type SubscriptionItem ¶
type SubscriptionItem struct { APIResource BillingThresholds SubscriptionItemBillingThresholds `json:"billing_thresholds"` Created int64 `json:"created"` Deleted bool `json:"deleted"` ID string `json:"id"` Metadata map[string]string `json:"metadata"` Plan *Plan `json:"plan"` Price *Price `json:"price"` Quantity int64 `json:"quantity"` Subscription string `json:"subscription"` TaxRates []*TaxRate `json:"tax_rates"` }
SubscriptionItem is the resource representing a Stripe subscription item. For more details see https://stripe.com/docs/api#subscription_items.
type SubscriptionItemBillingThresholds ¶
type SubscriptionItemBillingThresholds struct {
UsageGTE int64 `form:"usage_gte"`
}
SubscriptionItemBillingThresholds is a structure representing the billing thresholds for a subscription item.
type SubscriptionItemBillingThresholdsParams ¶
type SubscriptionItemBillingThresholdsParams struct {
UsageGTE *int64 `form:"usage_gte"`
}
SubscriptionItemBillingThresholdsParams is a structure representing the parameters allowed to control billing thresholds for a subscription item.
type SubscriptionItemList ¶
type SubscriptionItemList struct { APIResource ListMeta Data []*SubscriptionItem `json:"data"` }
SubscriptionItemList is a list of invoice items as retrieved from a list endpoint.
type SubscriptionItemListParams ¶
type SubscriptionItemListParams struct { ListParams `form:"*"` Subscription *string `form:"subscription"` }
SubscriptionItemListParams is the set of parameters that can be used when listing invoice items. For more details see https://stripe.com/docs/api#list_invoiceitems.
type SubscriptionItemParams ¶
type SubscriptionItemParams struct { Params `form:"*"` ID *string `form:"-"` // Handled in URL BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"` ClearUsage *bool `form:"clear_usage"` PaymentBehavior *string `form:"payment_behavior"` Plan *string `form:"plan"` Price *string `form:"price"` PriceData *SubscriptionItemPriceDataParams `form:"price_data"` ProrationDate *int64 `form:"proration_date"` ProrationBehavior *string `form:"proration_behavior"` Quantity *int64 `form:"quantity"` Subscription *string `form:"subscription"` TaxRates []*string `form:"tax_rates"` // The following parameters are only supported on updates OffSession *bool `form:"off_session"` }
SubscriptionItemParams is the set of parameters that can be used when creating or updating a subscription item. For more details see https://stripe.com/docs/api#create_subscription_item and https://stripe.com/docs/api#update_subscription_item.
type SubscriptionItemPriceDataParams ¶
type SubscriptionItemPriceDataParams struct { Currency *string `form:"currency"` Product *string `form:"product"` Recurring *SubscriptionItemPriceDataRecurringParams `form:"recurring"` UnitAmount *int64 `form:"unit_amount"` UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
SubscriptionItemPriceDataParams is a structure representing the parameters to create an inline price for a subscription item.
type SubscriptionItemPriceDataRecurringParams ¶
type SubscriptionItemPriceDataRecurringParams struct { Interval *string `form:"interval"` IntervalCount *int64 `form:"interval_count"` }
SubscriptionItemPriceDataRecurringParams is a structure representing the parameters to create an inline recurring price for a subscription item.
type SubscriptionItemsParams ¶
type SubscriptionItemsParams struct { Params `form:"*"` BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"` ClearUsage *bool `form:"clear_usage"` Deleted *bool `form:"deleted"` ID *string `form:"id"` Plan *string `form:"plan"` Price *string `form:"price"` PriceData *SubscriptionItemPriceDataParams `form:"price_data"` Quantity *int64 `form:"quantity"` TaxRates []*string `form:"tax_rates"` }
SubscriptionItemsParams is the set of parameters that can be used when creating or updating a subscription item on a subscription For more details see https://stripe.com/docs/api#create_subscription and https://stripe.com/docs/api#update_subscription.
type SubscriptionList ¶
type SubscriptionList struct { APIResource ListMeta Data []*Subscription `json:"data"` }
SubscriptionList is a list object for subscriptions.
type SubscriptionListParams ¶
type SubscriptionListParams struct { ListParams `form:"*"` 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"` Customer string `form:"customer"` Plan string `form:"plan"` Price string `form:"price"` Status string `form:"status"` }
SubscriptionListParams is the set of parameters that can be used when listing active subscriptions. For more details see https://stripe.com/docs/api#list_subscriptions.
type SubscriptionParams ¶
type SubscriptionParams struct { Params `form:"*"` AddInvoiceItems []*SubscriptionAddInvoiceItemParams `form:"add_invoice_items"` ApplicationFeePercent *float64 `form:"application_fee_percent"` BackdateStartDate *int64 `form:"backdate_start_date"` BillingCycleAnchor *int64 `form:"billing_cycle_anchor"` BillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo BillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"` CancelAt *int64 `form:"cancel_at"` CancelAtPeriodEnd *bool `form:"cancel_at_period_end"` Card *CardParams `form:"card"` CollectionMethod *string `form:"collection_method"` Coupon *string `form:"coupon"` Customer *string `form:"customer"` DaysUntilDue *int64 `form:"days_until_due"` DefaultPaymentMethod *string `form:"default_payment_method"` DefaultSource *string `form:"default_source"` DefaultTaxRates []*string `form:"default_tax_rates"` Items []*SubscriptionItemsParams `form:"items"` OffSession *bool `form:"off_session"` OnBehalfOf *string `form:"on_behalf_of"` PauseCollection *SubscriptionPauseCollectionParams `form:"pause_collection"` PaymentBehavior *string `form:"payment_behavior"` PendingInvoiceItemInterval *SubscriptionPendingInvoiceItemIntervalParams `form:"pending_invoice_item_interval"` Plan *string `form:"plan"` PromotionCode *string `form:"promotion_code"` ProrationBehavior *string `form:"proration_behavior"` ProrationDate *int64 `form:"proration_date"` Quantity *int64 `form:"quantity"` TrialEnd *int64 `form:"trial_end"` TransferData *SubscriptionTransferDataParams `form:"transfer_data"` TrialEndNow *bool `form:"-"` // See custom AppendTo TrialFromPlan *bool `form:"trial_from_plan"` TrialPeriodDays *int64 `form:"trial_period_days"` }
SubscriptionParams is the set of parameters that can be used when creating or updating a subscription. For more details see https://stripe.com/docs/api#create_subscription and https://stripe.com/docs/api#update_subscription.
func (*SubscriptionParams) AppendTo ¶
func (p *SubscriptionParams) AppendTo(body *form.Values, keyParts []string)
AppendTo implements custom encoding logic for SubscriptionParams so that the special "now" value for billing_cycle_anchor and trial_end can be implemented (they're otherwise timestamps rather than strings).
type SubscriptionPauseCollection ¶
type SubscriptionPauseCollection struct { Behavior SubscriptionPauseCollectionBehavior `json:"behavior"` ResumesAt int64 `json:"resumes_at"` }
SubscriptionPauseCollection if specified, payment collection for this subscription will be paused.
type SubscriptionPauseCollectionBehavior ¶
type SubscriptionPauseCollectionBehavior string
SubscriptionPauseCollectionBehavior is the payment collection behavior a paused subscription.
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 { Behavior *string `form:"behavior"` ResumesAt *int64 `form:"resumes_at"` }
SubscriptionPauseCollectionParams is the set of parameters allowed for the pause_collection hash.
type SubscriptionPaymentBehavior ¶
type SubscriptionPaymentBehavior string
SubscriptionPaymentBehavior lets you control the behavior of subscription creation in case of a failed payment.
const ( SubscriptionPaymentBehaviorAllowIncomplete SubscriptionPaymentBehavior = "allow_incomplete" SubscriptionPaymentBehaviorErrorIfIncomplete SubscriptionPaymentBehavior = "error_if_incomplete" SubscriptionPaymentBehaviorPendingIfIncomplete SubscriptionPaymentBehavior = "pending_if_incomplete" )
List of values that SubscriptionPaymentBehavior can take.
type SubscriptionPendingInvoiceItemInterval ¶
type SubscriptionPendingInvoiceItemInterval struct { Interval SubscriptionPendingInvoiceItemIntervalInterval `json:"interval"` IntervalCount int64 `json:"interval_count"` }
SubscriptionPendingInvoiceItemInterval represents the interval at which to invoice pending invoice items.
type SubscriptionPendingInvoiceItemIntervalInterval ¶
type SubscriptionPendingInvoiceItemIntervalInterval string
SubscriptionPendingInvoiceItemIntervalInterval controls the interval at which pending invoice items should be invoiced.
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 { Interval *string `form:"interval"` IntervalCount *int64 `form:"interval_count"` }
SubscriptionPendingInvoiceItemIntervalParams is the set of parameters allowed for the transfer_data hash.
type SubscriptionPendingUpdate ¶
type SubscriptionPendingUpdate struct { BillingCycleAnchor int64 `json:"billing_cycle_anchor"` ExpiresAt int64 `json:"expires_at"` SubscriptionItems []*SubscriptionItem `json:"subscription_items"` TrialEnd int64 `json:"trial_end"` TrialFromPlan bool `json:"trial_from_plan"` }
SubscriptionPendingUpdate represents deferred changes that will be applied when latest invoice is paid.
type SubscriptionProrationBehavior ¶
type SubscriptionProrationBehavior string
SubscriptionProrationBehavior determines how to handle prorations when billing cycles change.
const ( SubscriptionProrationBehaviorAlwaysInvoice SubscriptionProrationBehavior = "always_invoice" SubscriptionProrationBehaviorCreateProrations SubscriptionProrationBehavior = "create_prorations" SubscriptionProrationBehaviorNone SubscriptionProrationBehavior = "none" )
List of values that SubscriptionProrationBehavior can take.
type SubscriptionSchedule ¶
type SubscriptionSchedule struct { APIResource CanceledAt int64 `json:"canceled_at"` CompletedAt int64 `json:"completed_at"` Created int64 `json:"created"` CurrentPhase *SubscriptionScheduleCurrentPhase `json:"current_phase"` Customer *Customer `json:"customer"` DefaultSettings *SubscriptionScheduleDefaultSettings `json:"default_settings"` EndBehavior SubscriptionScheduleEndBehavior `json:"end_behavior"` ID string `json:"id"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` Phases []*SubscriptionSchedulePhase `json:"phases"` ReleasedSubscription *Subscription `json:"released_subscription"` Status SubscriptionScheduleStatus `json:"status"` Subscription *Subscription `json:"subscription"` }
SubscriptionSchedule is the resource representing a Stripe subscription schedule.
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:"*"` InvoiceNow *bool `form:"invoice_now"` Prorate *bool `form:"prorate"` }
SubscriptionScheduleCancelParams is the set of parameters that can be used when canceling a subscription schedule.
type SubscriptionScheduleCurrentPhase ¶
type SubscriptionScheduleCurrentPhase struct { EndDate int64 `json:"end_date"` StartDate int64 `json:"start_date"` }
SubscriptionScheduleCurrentPhase is a structure the current phase's period.
type SubscriptionScheduleDefaultSettings ¶
type SubscriptionScheduleDefaultSettings struct { ApplicationFeePercent float64 `json:"application_fee_percent,string"` BillingCycleAnchor SubscriptionSchedulePhaseBillingCycleAnchor `json:"billing_cycle_anchor"` BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"` CollectionMethod SubscriptionCollectionMethod `json:"collection_method"` DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"` InvoiceSettings *SubscriptionScheduleInvoiceSettings `json:"invoice_settings"` TransferData *SubscriptionTransferData `json:"transfer_data"` }
SubscriptionScheduleDefaultSettings is a structure representing the subscription schedule’s default settings.
type SubscriptionScheduleDefaultSettingsParams ¶
type SubscriptionScheduleDefaultSettingsParams struct { Params `form:"*"` ApplicationFeePercent *float64 `form:"application_fee_percent,high_precision"` BillingCycleAnchor *string `form:"billing_cycle_anchor"` BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"` CollectionMethod *string `form:"collection_method"` DefaultPaymentMethod *string `form:"default_payment_method"` InvoiceSettings *SubscriptionScheduleInvoiceSettingsParams `form:"invoice_settings"` TransferData *SubscriptionTransferDataParams `form:"transfer_data"` }
SubscriptionScheduleDefaultSettingsParams is the set of parameters representing the subscription schedule’s default settings.
type SubscriptionScheduleEndBehavior ¶
type SubscriptionScheduleEndBehavior string
SubscriptionScheduleEndBehavior describe what happens to a schedule when it ends.
const ( SubscriptionScheduleEndBehaviorCancel SubscriptionScheduleEndBehavior = "cancel" SubscriptionScheduleEndBehaviorRelease SubscriptionScheduleEndBehavior = "release" )
List of values that SubscriptionScheduleEndBehavior can take.
type SubscriptionScheduleInvoiceSettings ¶
type SubscriptionScheduleInvoiceSettings struct {
DaysUntilDue int64 `json:"days_until_due"`
}
SubscriptionScheduleInvoiceSettings is a structure representing the settings applied to invoices associated with a subscription schedule.
type SubscriptionScheduleInvoiceSettingsParams ¶
type SubscriptionScheduleInvoiceSettingsParams struct {
DaysUntilDue *int64 `form:"days_until_due"`
}
SubscriptionScheduleInvoiceSettingsParams is a structure representing the parameters allowed to control invoice settings on invoices associated with a subscription schedule.
type SubscriptionScheduleList ¶
type SubscriptionScheduleList struct { APIResource ListMeta Data []*SubscriptionSchedule `json:"data"` }
SubscriptionScheduleList is a list object for subscription schedules.
type SubscriptionScheduleListParams ¶
type SubscriptionScheduleListParams struct { ListParams `form:"*"` CanceledAt int64 `form:"canceled_at"` CanceledAtRange *RangeQueryParams `form:"canceled_at"` CompletedAt int64 `form:"completed_at"` CompletedAtRange *RangeQueryParams `form:"completed_at"` Created int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Customer string `form:"customer"` ReleasedAt int64 `form:"released_at"` ReleasedAtRange *RangeQueryParams `form:"released_at"` Scheduled *bool `form:"scheduled"` }
SubscriptionScheduleListParams is the set of parameters that can be used when listing subscription schedules.
type SubscriptionScheduleParams ¶
type SubscriptionScheduleParams struct { Params `form:"*"` Customer *string `form:"customer"` DefaultSettings *SubscriptionScheduleDefaultSettingsParams `form:"default_settings"` EndBehavior *string `form:"end_behavior"` FromSubscription *string `form:"from_subscription"` ProrationBehavior *string `form:"proration_behavior"` Phases []*SubscriptionSchedulePhaseParams `form:"phases"` StartDate *int64 `form:"start_date"` StartDateNow *bool `form:"-"` // See custom AppendTo }
SubscriptionScheduleParams is the set of parameters that can be used when creating or updating a subscription schedule.
func (*SubscriptionScheduleParams) AppendTo ¶
func (p *SubscriptionScheduleParams) AppendTo(body *form.Values, keyParts []string)
AppendTo implements custom encoding logic for SubscriptionScheduleParams so that the special "now" value for start_date can be implemented (they're otherwise timestamps rather than strings).
type SubscriptionSchedulePhase ¶
type SubscriptionSchedulePhase struct { AddInvoiceItems []*SubscriptionSchedulePhaseAddInvoiceItem `json:"add_invoice_items"` ApplicationFeePercent float64 `json:"application_fee_percent"` BillingCycleAnchor SubscriptionSchedulePhaseBillingCycleAnchor `json:"billing_cycle_anchor"` BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"` CollectionMethod SubscriptionCollectionMethod `json:"collection_method"` Coupon *Coupon `json:"coupon"` DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"` DefaultTaxRates []*TaxRate `json:"default_tax_rates"` EndDate int64 `json:"end_date"` InvoiceSettings *SubscriptionScheduleInvoiceSettings `json:"invoice_settings"` Items []*SubscriptionSchedulePhaseItem `json:"items"` StartDate int64 `json:"start_date"` TransferData *SubscriptionTransferData `json:"transfer_data"` TrialEnd int64 `json:"trial_end"` }
SubscriptionSchedulePhase is a structure a phase of a subscription schedule.
type SubscriptionSchedulePhaseAddInvoiceItem ¶
type SubscriptionSchedulePhaseAddInvoiceItem struct { Price *Price `json:"price"` Quantity int64 `json:"quantity"` TaxRates []*TaxRate `json:"tax_rates"` }
SubscriptionSchedulePhaseAddInvoiceItem represents the invoice items to add when the phase starts.
type SubscriptionSchedulePhaseAddInvoiceItemParams ¶
type SubscriptionSchedulePhaseAddInvoiceItemParams struct { Price *string `form:"price"` PriceData *InvoiceItemPriceDataParams `form:"price_data"` Quantity *int64 `form:"quantity"` TaxRates []*string `form:"tax_rates"` }
SubscriptionSchedulePhaseAddInvoiceItemParams is a structure representing the parameters allowed to control the invoice items to add at the start of a phase.
type SubscriptionSchedulePhaseAddInvoiceItemPriceDataParams ¶
type SubscriptionSchedulePhaseAddInvoiceItemPriceDataParams struct { Currency *string `form:"currency"` Product *string `form:"product"` Recurring *SubscriptionSchedulePhaseAddInvoiceItemPriceDataRecurringParams `form:"recurring"` UnitAmount *int64 `form:"unit_amount"` UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"` }
SubscriptionSchedulePhaseAddInvoiceItemPriceDataParams is a structure representing the parameters to create an inline price for a given invoice item.
type SubscriptionSchedulePhaseAddInvoiceItemPriceDataRecurringParams ¶
type SubscriptionSchedulePhaseAddInvoiceItemPriceDataRecurringParams struct { AggregateUsage *string `form:"aggregate_usage"` Interval *string `form:"interval"` IntervalCount *int64 `form:"interval_count"` TrialPeriodDays *int64 `form:"trial_period_days"` UsageType *string `form:"usage_type"` }
SubscriptionSchedulePhaseAddInvoiceItemPriceDataRecurringParams is a structure representing the parameters to create an inline recurring price for a given invoice item.
type SubscriptionSchedulePhaseBillingCycleAnchor ¶
type SubscriptionSchedulePhaseBillingCycleAnchor string
SubscriptionSchedulePhaseBillingCycleAnchor is the list of allowed values for the schedule's billing_cycle_anchor.
const ( SubscriptionSchedulePhaseBillingCycleAnchorAutomatic SubscriptionSchedulePhaseBillingCycleAnchor = "automatic" SubscriptionSchedulePhaseBillingCycleAnchorPhaseStart SubscriptionSchedulePhaseBillingCycleAnchor = "phase_start" )
List of values for SubscriptionSchedulePhaseBillingCycleAnchor
type SubscriptionSchedulePhaseItem ¶
type SubscriptionSchedulePhaseItem struct { BillingThresholds *SubscriptionItemBillingThresholds `json:"billing_thresholds"` Plan *Plan `json:"plan"` Price *Price `json:"price"` Quantity int64 `json:"quantity"` TaxRates []*TaxRate `json:"tax_rates"` }
SubscriptionSchedulePhaseItem represents plan details for a given phase
type SubscriptionSchedulePhaseItemParams ¶
type SubscriptionSchedulePhaseItemParams struct { BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"` Plan *string `form:"plan"` Price *string `form:"price"` PriceData *SubscriptionItemPriceDataParams `form:"price_data"` Quantity *int64 `form:"quantity"` TaxRates []*string `form:"tax_rates"` }
SubscriptionSchedulePhaseItemParams is a structure representing the parameters allowed to control a specic plan on a phase on a subscription schedule.
type SubscriptionSchedulePhaseParams ¶
type SubscriptionSchedulePhaseParams struct { AddInvoiceItems []*SubscriptionSchedulePhaseAddInvoiceItemParams `form:"add_invoice_items"` ApplicationFeePercent *float64 `form:"application_fee_percent"` BillingCycleAnchor *string `form:"billing_cycle_anchor"` BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"` CollectionMethod *string `form:"collection_method"` Coupon *string `form:"coupon"` DefaultPaymentMethod *string `form:"default_payment_method"` DefaultTaxRates []*string `form:"default_tax_rates"` EndDate *int64 `form:"end_date"` InvoiceSettings *SubscriptionScheduleInvoiceSettingsParams `form:"invoice_settings"` Iterations *int64 `form:"iterations"` Items []*SubscriptionSchedulePhaseItemParams `form:"items"` ProrationBehavior *string `form:"proration_behavior"` StartDate *int64 `form:"start_date"` TransferData *SubscriptionTransferDataParams `form:"transfer_data"` Trial *bool `form:"trial"` TrialEnd *int64 `form:"trial_end"` }
SubscriptionSchedulePhaseParams is a structure representing the parameters allowed to control a phase on a subscription schedule.
type SubscriptionScheduleReleaseParams ¶
type SubscriptionScheduleReleaseParams struct { Params `form:"*"` PreserveCancelDate *bool `form:"preserve_cancel_date"` }
SubscriptionScheduleReleaseParams is the set of parameters that can be used when releasing a subscription schedule.
type SubscriptionScheduleStatus ¶
type SubscriptionScheduleStatus string
SubscriptionScheduleStatus is the list of allowed values for the schedule's status.
const ( SubscriptionScheduleStatusActive SubscriptionScheduleStatus = "active" SubscriptionScheduleStatusCanceled SubscriptionScheduleStatus = "canceled" SubscriptionScheduleStatusCompleted SubscriptionScheduleStatus = "completed" SubscriptionScheduleStatusPastDue SubscriptionScheduleStatus = "not_started" SubscriptionScheduleStatusTrialing SubscriptionScheduleStatus = "released" )
List of values that SubscriptionScheduleStatus can take.
type SubscriptionStatus ¶
type SubscriptionStatus string
SubscriptionStatus is the list of allowed values for the subscription's status.
const ( SubscriptionStatusActive SubscriptionStatus = "active" SubscriptionStatusAll SubscriptionStatus = "all" SubscriptionStatusCanceled SubscriptionStatus = "canceled" SubscriptionStatusIncomplete SubscriptionStatus = "incomplete" SubscriptionStatusIncompleteExpired SubscriptionStatus = "incomplete_expired" SubscriptionStatusPastDue SubscriptionStatus = "past_due" SubscriptionStatusTrialing SubscriptionStatus = "trialing" SubscriptionStatusUnpaid SubscriptionStatus = "unpaid" )
List of values that SubscriptionStatus can take.
type SubscriptionTransferData ¶
type SubscriptionTransferData struct { AmountPercent float64 `json:"amount_percent"` Destination *Account `json:"destination"` }
SubscriptionTransferData represents the information for the transfer_data associated with a subscription.
type SubscriptionTransferDataParams ¶
type SubscriptionTransferDataParams struct { AmountPercent *float64 `form:"amount_percent"` Destination *string `form:"destination"` }
SubscriptionTransferDataParams is the set of parameters allowed for the transfer_data hash.
type SupportedBackend ¶
type SupportedBackend string
SupportedBackend is an enumeration of supported Stripe endpoints. Currently supported values are "api" and "uploads".
type TaxID ¶
type TaxID struct { APIResource Country string `json:"country"` Created int64 `json:"created"` Customer *Customer `json:"customer"` Deleted bool `json:"deleted"` ID string `json:"id"` Livemode bool `json:"livemode"` Object string `json:"object"` Type TaxIDType `json:"type"` Value string `json:"value"` Verification *TaxIDVerification `json:"verification"` }
TaxID is the resource representing a customer's tax id. For more details see https://stripe.com/docs/api/customers/tax_id_object
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 tax ids as retrieved from a list endpoint.
type TaxIDListParams ¶
type TaxIDListParams struct { ListParams `form:"*"` Customer *string `form:"-"` }
TaxIDListParams is the set of parameters that can be used when listing tax ids. For more detail see https://stripe.com/docs/api/customers/tax_ids
type TaxIDParams ¶
type TaxIDParams struct { Params `form:"*"` Customer *string `form:"-"` Type *string `form:"type"` Value *string `form:"value"` }
TaxIDParams is the set of parameters that can be used when creating a tax id. For more details see https://stripe.com/docs/api/customers/create_tax_id
type TaxIDType ¶
type TaxIDType string
TaxIDType is the list of allowed values for the tax id's type..
const ( TaxIDTypeAETRN TaxIDType = "ae_trn" TaxIDTypeAUABN TaxIDType = "au_abn" TaxIDTypeBRCNPJ TaxIDType = "br_cnpj" TaxIDTypeBRCPF TaxIDType = "br_cpf" TaxIDTypeCABN TaxIDType = "ca_bn" TaxIDTypeCAQST TaxIDType = "ca_qst" TaxIDTypeCHVAT TaxIDType = "ch_vat" TaxIDTypeCLTIN TaxIDType = "cl_tin" TaxIDTypeESCIF TaxIDType = "es_cif" TaxIDTypeEUVAT TaxIDType = "eu_vat" TaxIDTypeGBVAT TaxIDType = "gb_vat" TaxIDTypeHKBR TaxIDType = "hk_br" TaxIDTypeIDNPWP TaxIDType = "id_npwp" TaxIDTypeINGST TaxIDType = "in_gst" TaxIDTypeJPCN TaxIDType = "jp_cn" TaxIDTypeJPRN TaxIDType = "jp_rn" TaxIDTypeKRBRN TaxIDType = "kr_brn" TaxIDTypeLIUID TaxIDType = "li_uid" TaxIDTypeMXRFC TaxIDType = "mx_rfc" TaxIDTypeMYITN TaxIDType = "my_itn" TaxIDTypeMYFRP TaxIDType = "my_frp" TaxIDTypeMYSST TaxIDType = "my_sst" TaxIDTypeNOVAT TaxIDType = "no_vat" TaxIDTypeNZGST TaxIDType = "nz_gst" TaxIDTypeRUINN TaxIDType = "ru_inn" TaxIDTypeRUKPP TaxIDType = "ru_kpp" TaxIDTypeSAVAT TaxIDType = "sa_vat" TaxIDTypeSGUEN TaxIDType = "sg_uen" TaxIDTypeSGGST TaxIDType = "sg_gst" TaxIDTypeTHVAT TaxIDType = "th_vat" TaxIDTypeTWVAT TaxIDType = "tw_vat" TaxIDTypeUSEIN TaxIDType = "us_ein" TaxIDTypeZAVAT TaxIDType = "za_vat" TaxIDTypeUnknown TaxIDType = "unknown" )
List of values that TaxIDType can take.
type TaxIDVerification ¶
type TaxIDVerification struct { Status TaxIDVerificationStatus `json:"status"` VerifiedAddress string `json:"verified_address"` VerifiedName string `json:"verified_name"` }
TaxIDVerification represents the verification details of a customer's tax id.
type TaxIDVerificationStatus ¶
type TaxIDVerificationStatus string
TaxIDVerificationStatus is the list of allowed values for the tax id's verification status..
const ( TaxIDVerificationStatusPending TaxIDVerificationStatus = "pending" TaxIDVerificationStatusUnverified TaxIDVerificationStatus = "unverified" TaxIDVerificationStatusVerified TaxIDVerificationStatus = "verified" )
List of values that TaxIDDuration can take.
type TaxRate ¶
type TaxRate struct { APIResource Active bool `json:"active"` Country string `json:"country"` Created int64 `json:"created"` Description string `json:"description"` DisplayName string `json:"display_name"` ID string `json:"id"` Inclusive bool `json:"inclusive"` Jurisdiction string `json:"jurisdiction"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` Percentage float64 `json:"percentage"` State string `json:"state"` }
TaxRate is the resource representing a Stripe tax rate. For more details see https://stripe.com/docs/api/tax_rates/object.
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 tax rates as retrieved from a list endpoint.
type TaxRateListParams ¶
type TaxRateListParams struct { ListParams `form:"*"` Active *bool `form:"active"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Inclusive *bool `form:"inclusive"` }
TaxRateListParams is the set of parameters that can be used when listing tax rates. For more detail see https://stripe.com/docs/api/tax_rates/list.
type TaxRateParams ¶
type TaxRateParams struct { Params `form:"*"` Active *bool `form:"active"` Country *string `form:"country"` Description *string `form:"description"` DisplayName *string `form:"display_name"` Inclusive *bool `form:"inclusive"` Jurisdiction *string `form:"jurisdiction"` Percentage *float64 `form:"percentage"` State *string `form:"state"` }
TaxRateParams is the set of parameters that can be used when creating a tax rate. For more details see https://stripe.com/docs/api/tax_rates/create.
type TerminalConnectionToken ¶
type TerminalConnectionToken struct { APIResource Location string `json:"location"` Object string `json:"object"` Secret string `json:"secret"` }
TerminalConnectionToken is the resource representing a Stripe terminal connection token.
type TerminalConnectionTokenParams ¶
TerminalConnectionTokenParams is the set of parameters that can be used when creating a terminal connection token.
type TerminalLocation ¶
type TerminalLocation struct { APIResource Address *AccountAddressParams `json:"address"` Deleted bool `json:"deleted"` DisplayName string `json:"display_name"` ID string `json:"id"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` }
TerminalLocation is the resource representing a Stripe terminal location.
type TerminalLocationList ¶
type TerminalLocationList struct { APIResource ListMeta Data []*TerminalLocation `json:"data"` }
TerminalLocationList is a list of terminal readers as retrieved from a list endpoint.
type TerminalLocationListParams ¶
type TerminalLocationListParams struct {
ListParams `form:"*"`
}
TerminalLocationListParams is the set of parameters that can be used when listing temrinal locations.
type TerminalLocationParams ¶
type TerminalLocationParams struct { Params `form:"*"` Address *AccountAddressParams `form:"address"` DisplayName *string `form:"display_name"` }
TerminalLocationParams is the set of parameters that can be used when creating or updating a terminal location.
type TerminalReader ¶
type TerminalReader struct { APIResource Deleted bool `json:"deleted"` DeviceSwVersion string `json:"device_sw_version"` DeviceType string `json:"device_type"` ID string `json:"id"` IPAddress string `json:"ip_address"` Label string `json:"label"` Livemode bool `json:"livemode"` Location string `json:"location"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` SerialNumber string `json:"serial_number"` Status string `json:"status"` }
TerminalReader is the resource representing a Stripe terminal reader.
type TerminalReaderGetParams ¶
type TerminalReaderGetParams struct {
Params `form:"*"`
}
TerminalReaderGetParams is the set of parameters that can be used to get a terminal reader.
type TerminalReaderList ¶
type TerminalReaderList struct { APIResource ListMeta Data []*TerminalReader `json:"data"` Location *string `json:"location"` Status *string `json:"status"` }
TerminalReaderList is a list of terminal readers as retrieved from a list endpoint.
type TerminalReaderListParams ¶
type TerminalReaderListParams struct { ListParams `form:"*"` DeviceType *string `form:"device_type"` Location *string `form:"location"` Status *string `form:"status"` }
TerminalReaderListParams is the set of parameters that can be used when listing temrinal readers.
type TerminalReaderParams ¶
type TerminalReaderParams struct { Params `form:"*"` Label *string `form:"label"` Location *string `form:"location"` RegistrationCode *string `form:"registration_code"` }
TerminalReaderParams is the set of parameters that can be used for creating or updating a terminal reader.
type Token ¶
type Token struct { APIResource BankAccount *BankAccount `json:"bank_account"` Card *Card `json:"card"` ClientIP string `json:"client_ip"` Created int64 `json:"created"` // Email is an undocumented field but included for all tokens created // with Stripe Checkout. Email string `json:"email"` ID string `json:"id"` Livemode bool `json:"livemode"` Type TokenType `json:"type"` Used bool `json:"used"` }
Token is the resource representing a Stripe token. For more details see https://stripe.com/docs/api#tokens.
type TokenAccountParams ¶ added in v72.26.0
type TokenAccountParams struct { BusinessType *string `form:"business_type"` Company *AccountCompanyParams `form:"company"` Individual *PersonParams `form:"individual"` TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"` }
TokenAccountParams is the set of parameters that can be used when creating a Account token.
type TokenCVCUpdateParams ¶ added in v72.20.0
type TokenCVCUpdateParams struct {
CVC *string `form:"cvc"`
}
TokenCVCUpdateParams is the set of parameters that can be used when creating a CVC token.
type TokenParams ¶
type TokenParams struct { Params `form:"*"` Account *TokenAccountParams `form:"account"` BankAccount *BankAccountParams `form:"bank_account"` Card *CardParams `form:"card"` Customer *string `form:"customer"` CVCUpdate *TokenCVCUpdateParams `form:"cvc_update"` Person *PersonParams `form:"person"` // Email is an undocumented parameter used by Stripe Checkout // It may be removed from the API without notice. Email *string `form:"email"` PII *PIIParams `form:"pii"` }
TokenParams is the set of parameters that can be used when creating a token. For more details see: - https://stripe.com/docs/api#create_card_token - https://stripe.com/docs/api#create_bank_account_token - https://stripe.com/docs/api/tokens/create_account - https://stripe.com/docs/api/tokens/create_person
type Topup ¶
type Topup struct { APIResource Amount int64 `json:"amount"` BalanceTransaction *BalanceTransaction `json:"balance_transaction"` Created int64 `json:"created"` Currency Currency `json:"currency"` Description string `json:"description"` ExpectedAvailabilityDate int64 `json:"expected_availability_date"` FailureCode string `json:"failure_code"` FailureMessage string `json:"failure_message"` ID string `json:"id"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` Source *PaymentSource `json:"source"` StatementDescriptor string `json:"statement_descriptor"` Status string `json:"status"` TransferGroup string `json:"transfer_group"` // The following property is deprecated ArrivalDate int64 `json:"arrival_date"` }
Topup is the resource representing a Stripe top-up. For more details see https://stripe.com/docs/api#topups.
type TopupList ¶
type TopupList struct { APIResource ListMeta Data []*Topup `json:"data"` }
TopupList is a list of top-ups as retrieved from a list endpoint.
type TopupListParams ¶
type TopupListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` }
TopupListParams is the set of parameters that can be used when listing top-ups. For more details see https://stripe.com/docs/api#list_topups.
type TopupParams ¶
type TopupParams struct { Params `form:"*"` Amount *int64 `form:"amount"` Currency *string `form:"currency"` Description *string `form:"description"` Source *SourceParams `form:"*"` // SourceParams has custom encoding so brought to top level with "*" StatementDescriptor *string `form:"statement_descriptor"` TransferGroup *string `form:"transfer_group"` }
TopupParams is the set of parameters that can be used when creating or updating a top-up. For more details see https://stripe.com/docs/api#create_topup and https://stripe.com/docs/api#update_topup.
func (*TopupParams) SetSource ¶
func (p *TopupParams) SetSource(sp interface{}) error
SetSource adds valid sources to a TopupParams object, returning an error for unsupported sources.
type Transfer ¶
type Transfer struct { APIResource Amount int64 `json:"amount"` AmountReversed int64 `json:"amount_reversed"` BalanceTransaction *BalanceTransaction `json:"balance_transaction"` Created int64 `json:"created"` Currency Currency `json:"currency"` Description string `json:"description"` Destination *TransferDestination `json:"destination"` DestinationPayment *Charge `json:"destination_payment"` ID string `json:"id"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Reversals *ReversalList `json:"reversals"` Reversed bool `json:"reversed"` SourceTransaction *BalanceTransactionSource `json:"source_transaction"` SourceType TransferSourceType `json:"source_type"` TransferGroup string `json:"transfer_group"` }
Transfer is the resource representing a Stripe transfer. For more details see https://stripe.com/docs/api#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 TransferDestination ¶
TransferDestination describes the destination of a Transfer. The Type should indicate which object is fleshed out For more details see https://stripe.com/docs/api/go#transfer_object
func (*TransferDestination) UnmarshalJSON ¶
func (d *TransferDestination) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a TransferDestination. This custom unmarshaling is needed because the specific type of destination it refers to is specified in the JSON
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"` Destination *string `form:"destination"` TransferGroup *string `form:"transfer_group"` }
TransferListParams is the set of parameters that can be used when listing transfers. For more details see https://stripe.com/docs/api#list_transfers.
type TransferParams ¶
type TransferParams struct { Params `form:"*"` Amount *int64 `form:"amount"` Currency *string `form:"currency"` Description *string `form:"description"` Destination *string `form:"destination"` SourceTransaction *string `form:"source_transaction"` SourceType *string `form:"source_type"` TransferGroup *string `form:"transfer_group"` }
TransferParams is the set of parameters that can be used when creating or updating a transfer. For more details see https://stripe.com/docs/api#create_transfer and https://stripe.com/docs/api#update_transfer.
type TransferSourceType ¶
type TransferSourceType string
TransferSourceType is the list of allowed values for the transfer's source_type field.
const ( TransferSourceTypeBankAccount TransferSourceType = "bank_account" TransferSourceTypeCard TransferSourceType = "card" TransferSourceTypeFPX TransferSourceType = "fpx" )
List of values that TransferSourceType can take.
type UsageRecord ¶
type UsageRecord struct { APIResource ID string `json:"id"` Livemode bool `json:"livemode"` Object string `json:"object"` Quantity int64 `json:"quantity"` SubscriptionItem string `json:"subscription_item"` Timestamp int64 `json:"timestamp"` }
UsageRecord represents a usage record. See https://stripe.com/docs/api#usage_records
type UsageRecordParams ¶
type UsageRecordParams struct { Params `form:"*"` SubscriptionItem *string `form:"-"` // Included in URL Action *string `form:"action"` Quantity *int64 `form:"quantity"` Timestamp *int64 `form:"timestamp"` }
UsageRecordParams create a usage record for a specified subscription item and date, and fills it with a quantity.
type UsageRecordSummary ¶
type UsageRecordSummary struct { ID string `json:"id"` Invoice string `json:"invoice"` Livemode bool `json:"livemode"` Object string `json:"object"` Period *Period `json:"period"` SubscriptionItem string `json:"subscription_item"` TotalUsage int64 `json:"total_usage"` }
UsageRecordSummary represents a usage record summary. See https://stripe.com/docs/api#usage_records
type UsageRecordSummaryList ¶
type UsageRecordSummaryList struct { APIResource ListMeta Data []*UsageRecordSummary `json:"data"` }
UsageRecordSummaryList is a list of usage record summaries as retrieved from a list endpoint.
type UsageRecordSummaryListParams ¶
type UsageRecordSummaryListParams struct { ListParams `form:"*"` SubscriptionItem *string `form:"-"` // Included in URL }
UsageRecordSummaryListParams is the set of parameters that can be used when listing charges.
type VerificationDocumentDetailsCode ¶
type VerificationDocumentDetailsCode string
VerificationDocumentDetailsCode is a machine-readable code specifying the verification state of a document associated with a person.
const ( VerificationDocumentDetailsCodeDocumentCorrupt VerificationDocumentDetailsCode = "document_corrupt" VerificationDocumentDetailsCodeDocumentFailedCopy VerificationDocumentDetailsCode = "document_failed_copy" VerificationDocumentDetailsCodeDocumentFailedGreyscale VerificationDocumentDetailsCode = "document_failed_greyscale" VerificationDocumentDetailsCodeDocumentFailedOther VerificationDocumentDetailsCode = "document_failed_other" VerificationDocumentDetailsCodeDocumentFailedTestMode VerificationDocumentDetailsCode = "document_failed_test_mode" VerificationDocumentDetailsCodeDocumentFraudulent VerificationDocumentDetailsCode = "document_fraudulent" VerificationDocumentDetailsCodeDocumentIDTypeNotSupported VerificationDocumentDetailsCode = "document_id_type_not_supported" VerificationDocumentDetailsCodeDocumentIDCountryNotSupported VerificationDocumentDetailsCode = "document_id_country_not_supported" VerificationDocumentDetailsCodeDocumentManipulated VerificationDocumentDetailsCode = "document_manipulated" VerificationDocumentDetailsCodeDocumentMissingBack VerificationDocumentDetailsCode = "document_missing_back" VerificationDocumentDetailsCodeDocumentMissingFront VerificationDocumentDetailsCode = "document_missing_front" VerificationDocumentDetailsCodeDocumentNotReadable VerificationDocumentDetailsCode = "document_not_readable" VerificationDocumentDetailsCodeDocumentNotUploaded VerificationDocumentDetailsCode = "document_not_uploaded" VerificationDocumentDetailsCodeDocumentTooLarge VerificationDocumentDetailsCode = "document_too_large" )
List of values that IdentityVerificationDetailsCode can take.
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 APIVersion string `json:"api_version"` Application string `json:"application"` Connect bool `json:"connect"` Created int64 `json:"created"` Deleted bool `json:"deleted"` Description string `json:"description"` EnabledEvents []string `json:"enabled_events"` ID string `json:"id"` Livemode bool `json:"livemode"` Metadata map[string]string `json:"metadata"` Object string `json:"object"` Secret string `json:"secret"` Status string `json:"status"` URL string `json:"url"` }
WebhookEndpoint is the resource representing a Stripe webhook endpoint. For more details see https://stripe.com/docs/api#webhook_endpoints.
func (*WebhookEndpoint) UnmarshalJSON ¶
func (w *WebhookEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON handles deserialization of a WebhookEndpoint. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.
type WebhookEndpointList ¶
type WebhookEndpointList struct { APIResource ListMeta Data []*WebhookEndpoint `json:"data"` }
WebhookEndpointList is a list of webhook endpoints as retrieved from a list endpoint.
type WebhookEndpointListParams ¶
type WebhookEndpointListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` }
WebhookEndpointListParams is the set of parameters that can be used when listing webhook endpoints. For more detail see https://stripe.com/docs/api#list_webhook_endpoints.
type WebhookEndpointParams ¶
type WebhookEndpointParams struct { Params `form:"*"` Connect *bool `form:"connect"` Description *string `form:"description"` Disabled *bool `form:"disabled"` EnabledEvents []*string `form:"enabled_events"` 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 APIVersion *string `form:"api_version"` }
WebhookEndpointParams is the set of parameters that can be used when creating a webhook endpoint. For more details see https://stripe.com/docs/api#create_webhook_endpoint.
Source Files ¶
- account.go
- accountlink.go
- address.go
- applepaydomain.go
- application.go
- balance.go
- balancetransaction.go
- bankaccount.go
- billingportal_configuration.go
- billingportal_session.go
- capability.go
- card.go
- charge.go
- checkout_session.go
- countryspec.go
- coupon.go
- creditnote.go
- currency.go
- customer.go
- customerbalancetransaction.go
- discount.go
- dispute.go
- ephemeralkey.go
- error.go
- event.go
- fee.go
- feerefund.go
- file.go
- filelink.go
- invoice.go
- invoiceitem.go
- issuing_authorization.go
- issuing_card.go
- issuing_cardholder.go
- issuing_dispute.go
- issuing_transaction.go
- iter.go
- lineitem.go
- log.go
- loginlink.go
- mandate.go
- oauth.go
- order.go
- orderreturn.go
- params.go
- paymentintent.go
- paymentmethod.go
- paymentsource.go
- payout.go
- person.go
- plan.go
- price.go
- product.go
- promotioncode.go
- radar_earlyfraudwarning.go
- radar_valuelist.go
- radar_valuelistitem.go
- refund.go
- reporting_reportrun.go
- reporting_reporttype.go
- reversal.go
- review.go
- setupattempt.go
- setupintent.go
- sigma_scheduledqueryrun.go
- sku.go
- source.go
- sourcetransaction.go
- stripe.go
- stripe_go115.go
- sub.go
- subitem.go
- subschedule.go
- taxid.go
- taxrate.go
- terminal_connectiontoken.go
- terminal_location.go
- terminal_reader.go
- token.go
- topup.go
- transfer.go
- usagerecord.go
- usagerecordsummary.go
- webhookendpoint.go
Directories ¶
Path | Synopsis |
---|---|
Package account provides API functions related to accounts.
|
Package account provides API functions related to accounts. |
Package accountlink provides API functions related to account links.
|
Package accountlink provides API functions related to account links. |
Package applepaydomain provides the /apple_pay/domains APIs
|
Package applepaydomain provides the /apple_pay/domains 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 /bank_accounts APIs
|
Package bankaccount provides the /bank_accounts APIs |
billingportal
|
|
configuration
Package configuration provides API functions related to billing portal configurations.
|
Package configuration provides API functions related to billing portal configurations. |
session
Package session provides API functions related to billing portal sessions.
|
Package session provides API functions related to billing portal sessions. |
Package capability provides the /accounts/capabilities APIs
|
Package capability provides the /accounts/capabilities APIs |
Package card provides the /cards APIs
|
Package card provides the /cards APIs |
Package charge provides API functions related to charges.
|
Package charge provides API functions related to charges. |
checkout
|
|
session
Package session provides API functions related to checkout sessions.
|
Package session provides API functions related to checkout sessions. |
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 /balance_transactions APIs
|
Package customerbalancetransaction provides the /balance_transactions APIs |
Package discount provides the discount-related APIs
|
Package discount provides the discount-related 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 fee provides the /application_fees APIs
|
Package fee provides the /application_fees APIs |
Package feerefund provides the /application_fees/refunds APIs
|
Package feerefund provides the /application_fees/refunds APIs |
Package file provides the file related APIs
|
Package file provides the file related APIs |
Package filelink provides API functions related to file links.
|
Package filelink provides API functions related to file links. |
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 API functions related to issuing authorizations.
|
Package authorization provides API functions related to issuing authorizations. |
card
Package card provides API functions related to issuing cards.
|
Package card provides API functions related to issuing cards. |
cardholder
Package cardholder provides API functions related to issuing cardholders.
|
Package cardholder provides API functions related to issuing cardholders. |
dispute
Package dispute provides API functions related to issuing disputes.
|
Package dispute provides API functions related to issuing disputes. |
transaction
Package transaction provides API functions related to issuing transactions.
|
Package transaction provides API functions related to issuing transactions. |
Package lineitem provides the tools needs to interact with the LineItem resource.
|
Package lineitem provides the tools needs to interact with the LineItem resource. |
Package loginlink provides the /login_links APIs
|
Package loginlink provides the /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 API functions related to payment intents.
|
Package paymentintent provides API functions related to payment intents. |
Package paymentmethod provides the /payment_methods APIs
|
Package paymentmethod provides the /payment_methods APIs |
Package paymentsource provides the /sources APIs
|
Package paymentsource provides the /sources APIs |
Package payout provides the /payouts APIs
|
Package payout provides the /payouts APIs |
Package person provides the /accounts/persons APIs
|
Package person provides the /accounts/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 promotioncode provides the /promotion_codes APIs
|
Package promotioncode provides the /promotion_codes APIs |
radar
|
|
earlyfraudwarning
Package earlyfraudwarning provides API functions related to early fraud warnings.
|
Package earlyfraudwarning provides API functions related to early fraud warnings. |
valuelist
Package valuelist provides API functions related to value lists.
|
Package valuelist provides API functions related to value lists. |
valuelistitem
Package valuelistitem provides API functions related to value list items.
|
Package valuelistitem provides API functions related to value list items. |
Package refund provides the /refunds APIs
|
Package refund provides the /refunds APIs |
reporting
|
|
reportrun
Package reportrun provides API functions related to report runs.
|
Package reportrun provides API functions related to report runs. |
reporttype
Package reporttype provides API functions related to report types.
|
Package reporttype provides API functions related to report types. |
Package reversal provides the /transfers/reversals APIs
|
Package reversal provides the /transfers/reversals 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 API functions related to setup attempts.
|
Package setupattempt provides API functions related to setup attempts. |
Package setupintent provides API functions related to setup intents.
|
Package setupintent provides API functions related to setup intents. |
sigma
|
|
scheduledqueryrun
Package scheduledqueryrun provides API functions related to scheduled query runs.
|
Package scheduledqueryrun provides API functions related to scheduled query runs. |
Package sourcetransaction provides the /source/transactions APIs.
|
Package sourcetransaction provides the /source/transactions APIs. |
Package sub provides the /subscriptions APIs
|
Package sub provides the /subscriptions APIs |
Package subitem provides the /subscription_items APIs
|
Package subitem provides the /subscription_items APIs |
Package subschedule provides the /subscription_schedules APIs
|
Package subschedule provides the /subscription_schedules APIs |
Package taxid provides the /customers/cus_1 APIs
|
Package taxid provides the /customers/cus_1 APIs |
Package taxrate provides the /tax_rates APIs
|
Package taxrate provides the /tax_rates APIs |
terminal
|
|
connectiontoken
Package connectiontoken provides API functions related to terminal connection tokens
|
Package connectiontoken provides API functions related to terminal connection tokens |
location
Package location provides API functions related to terminal locations
|
Package location provides API functions related to terminal locations |
reader
Package reader provides API functions related to terminal readers
|
Package reader provides API functions related to terminal readers |
Package token provides the /tokens APIs
|
Package token provides the /tokens APIs |
Package transfer provides the /transfers APIs
|
Package transfer provides the /transfers APIs |
Package usagerecord provides the /subscription_items/{SUBSCRIPTION_ITEM_ID}/usage_records APIs
|
Package usagerecord provides the /subscription_items/{SUBSCRIPTION_ITEM_ID}/usage_records APIs |
Package usagerecordsummary provides the /subscription_items/{SUBSCRIPTION_ITEM_ID}/usage_record_summaries APIs
|
Package usagerecordsummary provides the /subscription_items/{SUBSCRIPTION_ITEM_ID}/usage_record_summaries APIs |
Package webhookendpoint provides the /webhook_endpoints APIs
|
Package webhookendpoint provides the /webhook_endpoints APIs |