stripe
packagemoduleThis package is not in the latest version of its module.
Details
Valid go.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
README¶
Go Stripe
The officialStripe Go client library.
Installation
Install stripe-go with:
go get -u github.com/stripe/stripe-goThen, import it using:
import ( "github.com/stripe/stripe-go" "github.com/stripe/stripe-go/customer")Go Module Support
The library currentlydoes not ship with first-class support for Gomodules. We put in support for it before, but ran into compatibility problemsfor existing installations using Dep (see discussion incloser to the bottomof this thread), andreverted support. Our currentplan is to wait for better module compatibility in Dep (see apreliminarypatch here), give the release a little grace time to becomemore widely distributed, then bring support back.
For now, require stripe-go ingo.mod with a version but without aversionsuffix in the path like so:
module github.com/my/packagerequire ( github.com/stripe/stripe-go v70.15.0)And use the same style of import paths as above:
import ( "github.com/stripe/stripe-go" "github.com/stripe/stripe-go/customer")Documentation
For a comprehensive list of examples, check out theAPIdocumentation.
For details on all the functionality in this library, see theGoDocdocumentation.
Below are a few simple examples:
Customers
params := &stripe.CustomerParams{Description: stripe.String("Stripe Developer"),Email: stripe.String("gostripe@stripe.com"),}customer, err := customer.New(params)PaymentIntents
params := &stripe.PaymentIntentListParams{ Customer: stripe.String(customer.ID),}// set this so you can easily retry your request in case of a timeoutparams.Params.IdempotencyKey = stripe.NewIdempotencyKey()i := paymentintent.List(params)for i.Next() {pi := i.PaymentIntent()}if err := i.Err(); err != nil {// handle}Events
i := event.List(nil)for i.Next() {e := i.Event()// access event data via e.GetObjectValue("resource_name_based_on_type", "resource_property_name")// alternatively you can access values via e.Data.Object["resource_name_based_on_type"].(map[string]interface{})["resource_property_name"]// access previous attributes via e.GetPreviousValue("resource_name_based_on_type", "resource_property_name")// alternatively you can access values via e.Data.PrevPreviousAttributes["resource_name_based_on_type"].(map[string]interface{})["resource_property_name"]}Alternatively, you can use theevent.Data.Raw property to unmarshal to theappropriate struct.
Authentication with Connect
There are two ways of authenticating requests when performing actions on behalfof a connected account, one that uses theStripe-Account header containing anaccount's ID, and one that uses the account's keys. Usually the former is therecommended approach.See the documentation for more information.
To use theStripe-Account approach, useSetStripeAccount() on aListParamsorParams class. For example:
// For a list requestlistParams := &stripe.CustomerListParams{}listParams.SetStripeAccount("acct_123")// For any other kind of requestparams := &stripe.CustomerParams{}params.SetStripeAccount("acct_123")To use a key, pass it toAPI'sInit function:
import ("github.com/stripe/stripe-go""github.com/stripe/stripe-go/client")stripe := &client.API{}stripe.Init("access_token", nil)Google AppEngine
If you're running the client in a Google AppEngine environment, you'll need tocreate a per-request Stripe client since thehttp.DefaultClient is notavailable. Here's a sample handler:
import ("fmt""net/http""google.golang.org/appengine""google.golang.org/appengine/urlfetch""github.com/stripe/stripe-go""github.com/stripe/stripe-go/client")func handler(w http.ResponseWriter, r *http.Request) { c := appengine.NewContext(r) httpClient := urlfetch.Client(c) sc := stripeClient.New("sk_test_123", stripe.NewBackends(httpClient)) params := &stripe.CustomerParams{ Description: stripe.String("Stripe Developer"), Email: stripe.String("gostripe@stripe.com"), } customer, err := sc.Customers.New(params) if err != nil { fmt.Fprintf(w, "Could not create customer: %v", err) } fmt.Fprintf(w, "Customer created: %v", customer.ID)}Usage
While some resources may contain more/less APIs, the following pattern isapplied throughout the library for a given$resource$:
Without a Client
If you're only dealing with a single key, you can simply import the packagesrequired for the resources you're interacting with without the need to create aclient.
import ("github.com/stripe/stripe-go""github.com/stripe/stripe-go/$resource$")// Setupstripe.Key = "sk_key"stripe.SetBackend("api", backend) // optional, useful for mocking// Create$resource$, err := $resource$.New(stripe.$Resource$Params)// Get$resource$, err := $resource$.Get(id, stripe.$Resource$Params)// Update$resource$, err := $resource$.Update(stripe.$Resource$Params)// DeleteresourceDeleted, err := $resource$.Del(id, stripe.$Resource$Params)// Listi := $resource$.List(stripe.$Resource$ListParams)for i.Next() {$resource$ := i.$Resource$()}if err := i.Err(); err != nil {// handle}With a Client
If you're dealing with multiple keys, it is recommended you useclient.API.This allows you to create as many clients as needed, each with their ownindividual key.
import ("github.com/stripe/stripe-go""github.com/stripe/stripe-go/client")// Setupsc := &client.API{}sc.Init("sk_key", nil) // the second parameter overrides the backends used if needed for mocking// Create$resource$, err := sc.$Resource$s.New(stripe.$Resource$Params)// Get$resource$, err := sc.$Resource$s.Get(id, stripe.$Resource$Params)// Update$resource$, err := sc.$Resource$s.Update(stripe.$Resource$Params)// DeleteresourceDeleted, err := sc.$Resource$s.Del(id, stripe.$Resource$Params)// Listi := sc.$Resource$s.List(stripe.$Resource$ListParams)for i.Next() {resource := i.$Resource$()}if err := i.Err(); err != nil {// handle}Configuring Automatic Retries
You can enable automatic retries on requests that fail due to a transientproblem by configuring the maximum number of retries:
import ("github.com/stripe/stripe-go""github.com/stripe/stripe-go/client")config := &stripe.BackendConfig{ MaxNetworkRetries: 2,}sc := &client.API{}sc.Init("sk_key", &stripe.Backends{ API: stripe.GetBackendWithConfig(stripe.APIBackend, config), Uploads: stripe.GetBackendWithConfig(stripe.UploadsBackend, config),})coupon, err := sc.Coupons.New(...)Various errors can trigger a retry, like a connection error or a timeout, andalso certain API responses like HTTP status409 Conflict.
Idempotency keys are added to requests to guarantee thatretries are safe.
Configuring Logging
Configure logging using the globalDefaultLeveledLogger variable:
stripe.DefaultLeveledLogger = &stripe.LeveledLogger{ Level: stripe.LevelInfo,}Or on a per-backend basis:
config := &stripe.BackendConfig{ LeveledLogger: &stripe.LeveledLogger{ Level: stripe.LevelInfo, },}It's possible to use non-Stripe leveled loggers as well. Stripe expects loggersto comply to the following interface:
type LeveledLoggerInterface interface {Debugf(format string, v ...interface{})Errorf(format string, v ...interface{})Infof(format string, v ...interface{})Warnf(format string, v ...interface{})}Some loggers likeLogrus and Zap'sSugaredLoggersupport this interface out-of-the-box so it's possible to setDefaultLeveledLogger to a*logrus.Logger or*zap.SugaredLogger directly.For others it may be necessary to write a thin shim layer to support them.
Writing a Plugin
If you're writing a plugin that uses the library, we'd appreciate it if youidentified usingstripe.SetAppInfo:
stripe.SetAppInfo(&stripe.AppInfo{ Name: "MyAwesomePlugin", URL: "https://myawesomeplugin.info", Version: "1.2.34",})This information is passed along when the library makes calls to the StripeAPI. Note that whileName is always required,URL andVersion areoptional.
Request latency telemetry
By default, the library sends request latency telemetry to Stripe. Thesenumbers help Stripe improve the overall latency of its API for all users.
You can disable this behavior if you prefer:
config := &stripe.BackendConfig{EnableTelemetry: false,}Development
Pull requests from the community are welcome. If you submit one, please keepthe following guidelines in mind:
- Code must be
go fmtcompliant. - All types, structs and funcs should be documented.
- Ensure that
make testsucceeds.
Test
The test suite needs testify'srequire package to run:
github.com/stretchr/testify/requireBefore running the tests, make sure to grab all of the package's dependencies:
go get -t -vIt also depends onstripe-mock, so make sure to fetch and run it from abackground terminal (stripe-mock's README also containsinstructions for installing via Homebrew and other methods):
go get -u github.com/stripe/stripe-mockstripe-mockRun all tests:
make testRun tests for one package:
go test ./invoiceRun a single test:
go test ./invoice -run TestInvoiceGetFor any requests, bug or comments, pleaseopen an issue orsubmit apull request.
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 Account
- type AccountAddress
- type AccountAddressParams
- type AccountBusinessProfile
- type AccountBusinessProfileParams
- type AccountBusinessType
- type AccountCapabilities
- 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 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 AccountSettingsBranding
- type AccountSettingsBrandingParams
- type AccountSettingsCardPayments
- type AccountSettingsCardPaymentsParams
- type AccountSettingsDashboard
- type AccountSettingsDashboardParams
- type AccountSettingsParams
- type AccountSettingsPayments
- type AccountSettingsPaymentsParams
- type AccountSettingsPayouts
- type AccountSettingsPayoutsParams
- type AccountTOSAcceptance
- type AccountTOSAcceptanceParams
- 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 AuthorizationControlsParams
- type AuthorizeURLParams
- type Backend
- type BackendConfig
- type BackendImplementation
- func (s *BackendImplementation) Call(method, path, key string, params ParamsContainer, v interface{}) 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, v interface{}) error
- func (s *BackendImplementation) Do(req *http.Request, body *bytes.Buffer, v interface{}) 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 int)
- func (s *BackendImplementation) SetNetworkRetriesSleep(sleep bool)
- func (s *BackendImplementation) UnmarshalJSONVerbose(statusCode int, body []byte, v interface{}) error
- type Backends
- type Balance
- 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 BankAccountList
- type BankAccountListParams
- type BankAccountParams
- type BankAccountStatus
- type BillingDetails
- type BillingDetailsParams
- type BitcoinReceiver
- type BitcoinReceiverList
- type BitcoinReceiverListParams
- type BitcoinTransaction
- type BitcoinTransactionList
- type BitcoinTransactionListParams
- 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 ChargePaymentMethodDetailsAlipay
- type ChargePaymentMethodDetailsBancontact
- type ChargePaymentMethodDetailsBitcoin
- type ChargePaymentMethodDetailsCard
- type ChargePaymentMethodDetailsCardChecks
- type ChargePaymentMethodDetailsCardInstallments
- type ChargePaymentMethodDetailsCardPresent
- type ChargePaymentMethodDetailsCardPresentReceipt
- type ChargePaymentMethodDetailsCardThreeDSecure
- type ChargePaymentMethodDetailsCardWallet
- type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout
- type ChargePaymentMethodDetailsCardWalletApplePay
- type ChargePaymentMethodDetailsCardWalletGooglePay
- type ChargePaymentMethodDetailsCardWalletMasterpass
- type ChargePaymentMethodDetailsCardWalletSamsungPay
- type ChargePaymentMethodDetailsCardWalletVisaCheckout
- type ChargePaymentMethodDetailsEps
- type ChargePaymentMethodDetailsFPX
- type ChargePaymentMethodDetailsGiropay
- type ChargePaymentMethodDetailsIdeal
- type ChargePaymentMethodDetailsKlarna
- type ChargePaymentMethodDetailsMultibanco
- type ChargePaymentMethodDetailsP24
- type ChargePaymentMethodDetailsSepaDebit
- type ChargePaymentMethodDetailsSofort
- type ChargePaymentMethodDetailsStripeAccount
- type ChargePaymentMethodDetailsType
- type ChargePaymentMethodDetailsWechat
- type ChargeTransferData
- type ChargeTransferDataParams
- type CheckoutSession
- type CheckoutSessionDisplayItem
- type CheckoutSessionDisplayItemCustom
- type CheckoutSessionDisplayItemType
- type CheckoutSessionLineItemParams
- type CheckoutSessionList
- type CheckoutSessionListParams
- type CheckoutSessionMode
- type CheckoutSessionParams
- type CheckoutSessionPaymentIntentDataParams
- type CheckoutSessionPaymentIntentDataTransferDataParams
- type CheckoutSessionSetupIntentDataParams
- type CheckoutSessionShippingAddressCollection
- type CheckoutSessionShippingAddressCollectionParams
- type CheckoutSessionSubmitType
- type CheckoutSessionSubscriptionDataItemsParams
- type CheckoutSessionSubscriptionDataParams
- type CodeVerificationFlow
- type Country
- type CountrySpec
- type CountrySpecList
- type CountrySpecListParams
- type CountrySpecParams
- type Coupon
- type CouponDuration
- type CouponList
- type CouponListParams
- type CouponParams
- type CreditNote
- type CreditNoteLineItem
- 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 ExchangeRate
- type ExchangeRateList
- type ExchangeRateListParams
- type ExchangeRateParams
- 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 IdentityVerificationStatus
- type InvalidRequestError
- type Inventory
- type InventoryParams
- type Invoice
- type InvoiceBillingReason
- type InvoiceCollectionMethod
- type InvoiceCustomField
- type InvoiceCustomFieldParams
- type InvoiceCustomerTaxID
- type InvoiceFinalizeParams
- type InvoiceItem
- type InvoiceItemList
- type InvoiceItemListParams
- type InvoiceItemParams
- type InvoiceItemPeriodParams
- type InvoiceLine
- type InvoiceLineList
- type InvoiceLineListParams
- type InvoiceLineType
- type InvoiceList
- type InvoiceListParams
- type InvoiceMarkUncollectibleParams
- type InvoiceParams
- type InvoicePayParams
- 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 IssuingAuthorizationAuthorizationControls
- type IssuingAuthorizationAuthorizationMethod
- type IssuingAuthorizationControlsSpendingLimits
- type IssuingAuthorizationControlsSpendingLimitsParams
- type IssuingAuthorizationList
- type IssuingAuthorizationListParams
- type IssuingAuthorizationParams
- type IssuingAuthorizationPendingRequest
- type IssuingAuthorizationRequestHistory
- type IssuingAuthorizationRequestHistoryReason
- type IssuingAuthorizationRequestHistoryViolatedAuthorizationControl
- type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity
- type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName
- type IssuingAuthorizationStatus
- type IssuingAuthorizationVerificationData
- type IssuingAuthorizationVerificationDataAuthentication
- type IssuingAuthorizationVerificationDataCheck
- type IssuingAuthorizationVerificationDataThreeDSecure
- type IssuingAuthorizationVerificationDataThreeDSecureResult
- type IssuingAuthorizationWalletProviderType
- type IssuingAuthorizationWalletType
- type IssuingBilling
- type IssuingBillingParams
- type IssuingCard
- type IssuingCardAuthorizationControls
- type IssuingCardCancellationReason
- type IssuingCardDetails
- type IssuingCardList
- type IssuingCardListParams
- type IssuingCardPIN
- type IssuingCardPINStatus
- type IssuingCardParams
- type IssuingCardReplacementReason
- type IssuingCardShipping
- type IssuingCardShippingParams
- type IssuingCardShippingService
- type IssuingCardShippingSpeed
- type IssuingCardShippingStatus
- type IssuingCardShippingType
- type IssuingCardSpendingControls
- type IssuingCardSpendingControlsParams
- type IssuingCardSpendingControlsSpendingLimit
- type IssuingCardSpendingControlsSpendingLimitInterval
- type IssuingCardSpendingControlsSpendingLimitParams
- type IssuingCardStatus
- type IssuingCardType
- type IssuingCardholder
- 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 IssuingDisputeEvidenceFraudulent
- type IssuingDisputeEvidenceFraudulentParams
- type IssuingDisputeEvidenceOther
- type IssuingDisputeEvidenceOtherParams
- type IssuingDisputeEvidenceParams
- type IssuingDisputeList
- type IssuingDisputeListParams
- type IssuingDisputeParams
- type IssuingDisputeReason
- type IssuingDisputeStatus
- type IssuingMerchantData
- type IssuingSpendingLimitInterval
- type IssuingTransaction
- type IssuingTransactionList
- type IssuingTransactionListParams
- type IssuingTransactionParams
- type IssuingTransactionType
- type Iter
- type Level
- type LeveledLogger
- type LeveledLoggerInterface
- 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 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 PaymentIntentNextActionRedirectToURL
- type PaymentIntentNextActionType
- type PaymentIntentOffSession
- type PaymentIntentParams
- type PaymentIntentPaymentMethodOptions
- type PaymentIntentPaymentMethodOptionsCard
- type PaymentIntentPaymentMethodOptionsCardInstallments
- type PaymentIntentPaymentMethodOptionsCardInstallmentsParams
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlan
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams
- type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType
- type PaymentIntentPaymentMethodOptionsCardParams
- type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure
- type PaymentIntentPaymentMethodOptionsParams
- type PaymentIntentSetupFutureUsage
- type PaymentIntentStatus
- type PaymentIntentTransferData
- type PaymentIntentTransferDataParams
- type PaymentMethod
- type PaymentMethodAUBECSDebit
- type PaymentMethodAUBECSDebitParams
- type PaymentMethodAttachParams
- type PaymentMethodCard
- type PaymentMethodCardBrand
- type PaymentMethodCardChecks
- type PaymentMethodCardNetwork
- type PaymentMethodCardParams
- type PaymentMethodCardPresent
- type PaymentMethodCardThreeDSecureUsage
- type PaymentMethodCardWallet
- type PaymentMethodCardWalletType
- type PaymentMethodDetachParams
- type PaymentMethodFPX
- type PaymentMethodFPXAccountHolderType
- type PaymentMethodFPXParams
- type PaymentMethodIdeal
- type PaymentMethodIdealParams
- type PaymentMethodList
- type PaymentMethodListParams
- type PaymentMethodParams
- type PaymentMethodSepaDebit
- type PaymentMethodSepaDebitParams
- 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 PayoutScheduleParams
- type PayoutSourceType
- type PayoutStatus
- type PayoutType
- type Period
- type PermissionError
- type Person
- type PersonList
- type PersonListParams
- type PersonParams
- 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 Printfer
- type Product
- type ProductList
- type ProductListParams
- type ProductParams
- type ProductType
- 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 Recipient
- type RecipientList
- type RecipientListParams
- type RecipientParams
- type RecipientTransfer
- type RecipientTransferDestination
- type RecipientTransferDestinationType
- type RecipientTransferFailureCode
- type RecipientTransferMethodType
- type RecipientTransferSourceType
- type RecipientTransferStatus
- type RecipientTransferType
- type RecipientType
- 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 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 SubscriptionBillingThresholds
- type SubscriptionBillingThresholdsParams
- type SubscriptionCancelParams
- type SubscriptionCollectionMethod
- type SubscriptionItem
- type SubscriptionItemBillingThresholds
- type SubscriptionItemBillingThresholdsParams
- type SubscriptionItemList
- type SubscriptionItemListParams
- type SubscriptionItemParams
- 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 SubscriptionSchedulePhaseItem
- type SubscriptionSchedulePhaseItemParams
- type SubscriptionSchedulePhaseParams
- type SubscriptionScheduleReleaseParams
- type SubscriptionScheduleRenewalInterval
- 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 TaxRatePercentageRangeQueryParams
- type TerminalConnectionToken
- type TerminalConnectionTokenParams
- type TerminalLocation
- type TerminalLocationList
- type TerminalLocationListParams
- type TerminalLocationParams
- type TerminalReader
- type TerminalReaderGetParams
- type TerminalReaderList
- type TerminalReaderListParams
- type TerminalReaderParams
- type ThreeDSecure
- type ThreeDSecureParams
- type ThreeDSecureStatus
- type Token
- 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 versionAPIVersionstring = "2020-03-02"// APIBackend is a constant representing the API service backend.APIBackendSupportedBackend = "api"// APIURL is the URL of the API service backend.APIURLstring = "https://api.stripe.com"// ConnectURL is the URL for OAuth.ConnectURLstring = "https://connect.stripe.com"// ConnectBackend is a constant representing the connect service backend for// OAuth.ConnectBackendSupportedBackend = "connect"// UnknownPlatform is the string returned as the system name if we couldn't get// one from `uname`.UnknownPlatformstring = "unknown platform"// UploadsBackend is a constant representing the uploads service backend.UploadsBackendSupportedBackend = "uploads"// UploadsURL is the URL of the uploads service backend.UploadsURLstring = "https://files.stripe.com")
const (UsageRecordActionIncrementstring = "increment"UsageRecordActionSetstring = "set")
Possible values for the action parameter on usage record creation.
Variables¶
var EnableTelemetry =trueEnableTelemetry is a global override for enabling client telemetry, whichsends request performance metrics to Stripe via the `X-Stripe-Client-Telemetry`header. If set to true, all clients will send telemetry metrics. Defaults totrue.
Telemetry can also be disabled on a per-client basis by instead creating a`BackendConfig` with `EnableTelemetry: false`.
var KeystringKey is the Stripe API key used globally in the binding.
var LogLevel = 2LogLevel is the logging level for this library.0: no logging1: errors only2: errors + informational (default)3: errors + informational + debug
Deprecated: Logging should be configured with DefaultLeveledLogger instead.
Functions¶
funcBoolValue¶
BoolValue returns the value of the bool pointer passed in orfalse if the pointer is nil.
funcFloat64Slice¶
Float64Slice returns a slice of float64 pointers given a slice of float64s.
funcFloat64Value¶
Float64Value returns the value of the float64 pointer passed in or0 if the pointer is nil.
funcFormatURLPath¶
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 pathand returns a formatted string.
This is mostly a pass through to Sprintf. It exists to make itit impossible to accidentally provide a parameter type that would beformatted improperly; for example, a string pointer instead of a string.
It also URL-escapes every given parameter. This usually isn't necessary fora standard Stripe ID, but is needed in places where user-provided IDs areallowed, like in coupons or plans. We apply it broadly for extra safety.
funcInt64Slice¶
Int64Slice returns a slice of int64 pointers given a slice of int64s.
funcInt64Value¶
Int64Value returns the value of the int64 pointer passed in or0 if the pointer is nil.
funcNewIdempotencyKey¶
func NewIdempotencyKey()string
NewIdempotencyKey generates a new idempotency key thatcan be used on a request.
funcParseID¶
ParseID attempts to parse a string scalar from a given JSON value which isstill encoded as []byte. If the value was a string, it returns the stringalong with true as the second return value. If not, false is returned as thesecond return value.
The purpose of this function is to detect whether a given value in aresponse from the Stripe API is a string ID or an expanded object.
funcSetBackend¶
func SetBackend(backendSupportedBackend, bBackend)
SetBackend sets the backend used in the binding.
funcSetHTTPClient¶
SetHTTPClient overrides the default HTTP client.This is useful if you're running in a Google AppEngine environmentwhere the http.DefaultClient is not available.
funcStringSlice¶
StringSlice returns a slice of string pointers given a slice of strings.
funcStringValue¶
StringValue returns the value of the string pointer passed in or"" if the pointer is nil.
Types¶
typeAPIConnectionError¶
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.
typeAPIError¶
type APIError struct {// contains filtered or unexported fields}APIError is a catch all for any errors not covered by other types (andshould be extremely uncommon).
typeAccount¶
type Account struct {BusinessProfile *AccountBusinessProfile `json:"business_profile"`BusinessTypeAccountBusinessType `json:"business_type"`Capabilities *AccountCapabilities `json:"capabilities"`ChargesEnabledbool `json:"charges_enabled"`Company *AccountCompany `json:"company"`Countrystring `json:"country"`Createdint64 `json:"created"`DefaultCurrencyCurrency `json:"default_currency"`Deletedbool `json:"deleted"`DetailsSubmittedbool `json:"details_submitted"`Emailstring `json:"email"`ExternalAccounts *ExternalAccountList `json:"external_accounts"`IDstring `json:"id"`Individual *Person `json:"individual"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`PayoutsEnabledbool `json:"payouts_enabled"`Requirements *AccountRequirements `json:"requirements"`Settings *AccountSettings `json:"settings"`TOSAcceptance *AccountTOSAcceptance `json:"tos_acceptance"`TypeAccountType `json:"type"`}Account is the resource representing your Stripe account.For more details seehttps://stripe.com/docs/api/#account.
func (*Account)UnmarshalJSON¶
UnmarshalJSON handles deserialization of an account.This custom unmarshaling is needed because the resultingproperty may be an ID or the full struct if it was expanded.
typeAccountAddress¶
type AccountAddress struct {Citystring `json:"city"`Countrystring `json:"country"`Line1string `json:"line1"`Line2string `json:"line2"`PostalCodestring `json:"postal_code"`Statestring `json:"state"`// Town/cho-me. Note that this is only used for Kana/Kanji representations// of an address.Townstring `json:"town"`}AccountAddress is the structure for an account address.
typeAccountAddressParams¶
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.
typeAccountBusinessProfile¶
type AccountBusinessProfile struct {MCCstring `json:"mcc"`Namestring `json:"name"`ProductDescriptionstring `json:"product_description"`SupportAddress *Address `json:"support_address"`SupportEmailstring `json:"support_email"`SupportPhonestring `json:"support_phone"`SupportURLstring `json:"support_url"`URLstring `json:"url"`}AccountBusinessProfile represents optional information related to the business.
typeAccountBusinessProfileParams¶
type AccountBusinessProfileParams struct {MCC *string `form:"mcc"`Name *string `form:"name"`ProductDescription *string `form:"product_description"`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
typeAccountBusinessType¶
type AccountBusinessTypestring
AccountBusinessType describes the business type associated with an account.
const (AccountBusinessTypeCompanyAccountBusinessType = "company"AccountBusinessTypeGovernmentEntityAccountBusinessType = "government_entity"AccountBusinessTypeIndividualAccountBusinessType = "individual"AccountBusinessTypeNonProfitAccountBusinessType = "non_profit")
List of values that AccountBusinessType can take.
typeAccountCapabilities¶
type AccountCapabilities struct {AUBECSDebitPaymentsAccountCapabilityStatus `json:"au_becs_debit_payments"`CardPaymentsAccountCapabilityStatus `json:"card_payments"`LegacyPaymentsAccountCapabilityStatus `json:"legacy_payments"`TaxReportingUS1099KAccountCapabilityStatus `json:"tax_reporting_us_1099_k"`TaxReportingUS1099MISCAccountCapabilityStatus `json:"tax_reporting_us_1099_misc"`TransfersAccountCapabilityStatus `json:"transfers"`}AccountCapabilities is the resource representing the capabilities enabled on that account.
typeAccountCapability¶
type AccountCapabilitystring
AccountCapability maps to a given capability for an account.
const (AccountCapabilityAUBECSDebitPaymentsAccountCapability = "au_becs_debit_payments"AccountCapabilityCardIssuingAccountCapability = "card_issuing"AccountCapabilityCardPaymentsAccountCapability = "card_payments"AccountCapabilityLegacyPaymentsAccountCapability = "legacy_payments"AccountCapabilityTaxReportingUS1099KAccountCapability = "tax_reporting_us_1099_k"AccountCapabilityTaxReportingUS1099MISCAccountCapability = "tax_reporting_us_1099_misc"AccountCapabilityTransfersAccountCapability = "transfers")
List of values that AccountCapability can take.
typeAccountCapabilityStatus¶
type AccountCapabilityStatusstring
AccountCapabilityStatus is the status a given capability can have
const (AccountCapabilityStatusActiveAccountCapabilityStatus = "active"AccountCapabilityStatusInactiveAccountCapabilityStatus = "inactive"AccountCapabilityStatusPendingAccountCapabilityStatus = "pending")
List of values that AccountCapabilityStatus can take.
typeAccountCompany¶
type AccountCompany struct {Address *AccountAddress `json:"address"`AddressKana *AccountAddress `json:"address_kana"`AddressKanji *AccountAddress `json:"address_kanji"`DirectorsProvidedbool `json:"directors_provided"`ExecutivesProvidedbool `json:"executives_provided"`Namestring `json:"name"`NameKanastring `json:"name_kana"`NameKanjistring `json:"name_kanji"`OwnersProvidedbool `json:"owners_provided"`Phonestring `json:"phone"`StructureAccountCompanyStructure `json:"structure"`TaxIDProvidedbool `json:"tax_id_provided"`TaxIDRegistrarstring `json:"tax_id_registrar"`VATIDProvidedbool `json:"vat_id_provided"`Verification *AccountCompanyVerification `json:"verification"`}AccountCompany represents details about the company or business associated with the account.
typeAccountCompanyParams¶
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"`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.
typeAccountCompanyStructure¶
type AccountCompanyStructurestring
AccountCompanyStructure describes the structure associated with a company.
const (AccountCompanyStructureGovernmentInstrumentalityAccountCompanyStructure = "government_instrumentality"AccountCompanyStructureGovernmentalUnitAccountCompanyStructure = "governmental_unit"AccountCompanyStructureIncorporatedNonProfitAccountCompanyStructure = "incorporated_non_profit"AccountCompanyStructureMultiMemberLLCAccountCompanyStructure = "multi_member_llc"AccountCompanyStructurePrivateCorporationAccountCompanyStructure = "private_corporation"AccountCompanyStructurePrivatePartnershipAccountCompanyStructure = "private_partnership"AccountCompanyStructurePublicCorporationAccountCompanyStructure = "public_corporation"AccountCompanyStructurePublicPartnershipAccountCompanyStructure = "public_partnership"AccountCompanyStructureTaxExemptGovernmentInstrumentalityAccountCompanyStructure = "tax_exempt_government_instrumentality"AccountCompanyStructureUnincorporatedAssociationAccountCompanyStructure = "unincorporated_association"AccountCompanyStructureUnincorporatedNonProfitAccountCompanyStructure = "unincorporated_non_profit")
List of values that AccountCompanyStructure can take.
typeAccountCompanyVerification¶
type AccountCompanyVerification struct {Document *AccountCompanyVerificationDocument `json:"document"`}AccountCompanyVerification represents details about a company's verification state.
typeAccountCompanyVerificationDocument¶
type AccountCompanyVerificationDocument struct {Back *File `json:"back"`Detailsstring `json:"details"`DetailsCodeAccountCompanyVerificationDocumentDetailsCode `json:"details_code"`Front *File `json:"front"`}AccountCompanyVerificationDocument represents details about a company's verification state.
typeAccountCompanyVerificationDocumentDetailsCode¶
type AccountCompanyVerificationDocumentDetailsCodestring
AccountCompanyVerificationDocumentDetailsCode is a machine-readable code specifying theverification state of a document associated with a company.
const (AccountCompanyVerificationDocumentDetailsCodeDocumentCorruptAccountCompanyVerificationDocumentDetailsCode = "document_corrupt"AccountCompanyVerificationDocumentDetailsCodeDocumentFailedCopyAccountCompanyVerificationDocumentDetailsCode = "document_failed_copy"AccountCompanyVerificationDocumentDetailsCodeDocumentFailedOtherAccountCompanyVerificationDocumentDetailsCode = "document_failed_other"AccountCompanyVerificationDocumentDetailsCodeDocumentFailedTestModeAccountCompanyVerificationDocumentDetailsCode = "document_failed_test_mode"AccountCompanyVerificationDocumentDetailsCodeDocumentFraudulentAccountCompanyVerificationDocumentDetailsCode = "document_fraudulent"AccountCompanyVerificationDocumentDetailsCodeDocumentInvalidAccountCompanyVerificationDocumentDetailsCode = "document_invalid"AccountCompanyVerificationDocumentDetailsCodeDocumentManipulatedAccountCompanyVerificationDocumentDetailsCode = "document_manipulated"AccountCompanyVerificationDocumentDetailsCodeDocumentNotReadableAccountCompanyVerificationDocumentDetailsCode = "document_not_readable"AccountCompanyVerificationDocumentDetailsCodeDocumentNotUploadedAccountCompanyVerificationDocumentDetailsCode = "document_not_uploaded"AccountCompanyVerificationDocumentDetailsCodeDocumentTooLargeAccountCompanyVerificationDocumentDetailsCode = "document_too_large")
List of values that AccountCompanyVerificationDocumentDetailsCode can take.
typeAccountCompanyVerificationDocumentParams¶
type AccountCompanyVerificationDocumentParams struct {Back *string `form:"back"`Front *string `form:"front"`}AccountCompanyVerificationDocumentParams are the parameters allowed to pass for a documentverifying a company.
typeAccountCompanyVerificationParams¶
type AccountCompanyVerificationParams struct {Document *AccountCompanyVerificationDocumentParams `form:"document"`}AccountCompanyVerificationParams are the parameters allowed to verify a company.
typeAccountDeclineOn¶
type AccountDeclineOn struct {AVSFailurebool `json:"avs_failure"`CVCFailurebool `json:"cvc_failure"`}AccountDeclineOn represents card charges decline behavior for that account.
typeAccountDeclineSettingsParams¶
type AccountDeclineSettingsParams struct {AVSFailure *bool `form:"avs_failure"`CVCFailure *bool `form:"cvc_failure"`}AccountDeclineSettingsParams represents the parameters allowed for configuringcard declines on connected accounts.
typeAccountExternalAccountParams¶
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 anexternal account when creating an account. It should either have Token setor everything else.
func (*AccountExternalAccountParams)AppendTo¶
func (p *AccountExternalAccountParams) AppendTo(body *form.Values, keyParts []string)
AppendTo implements custom encoding logic for AccountExternalAccountParamsso that we can send the special required `object` field up along with theother specified parameters or the token value.
typeAccountLink¶
type AccountLink struct {Createdint64 `json:"created"`ExpiresAtint64 `json:"expires_at"`Objectstring `json:"object"`URLstring `json:"url"`}AccountLink is the resource representing an account link.For more details seehttps://stripe.com/docs/api/#account_links.
typeAccountLinkCollect¶
type AccountLinkCollectstring
AccountLinkCollect describes what information the platform wants to collect with the account link.
const (AccountLinkCollectCurrentlyDueAccountLinkCollect = "currently_due"AccountLinkCollectEventuallyDueAccountLinkCollect = "eventually_due")
List of values that AccountLinkCollect can take.
typeAccountLinkParams¶
type AccountLinkParams struct {Params `form:"*"`Account *string `form:"account"`Collect *string `form:"collect"`FailureURL *string `form:"failure_url"`SuccessURL *string `form:"success_url"`Type *string `form:"type"`}AccountLinkParams are the parameters allowed during an account link creation.
typeAccountLinkType¶
type AccountLinkTypestring
AccountLinkType is the type of an account link.
const (AccountLinkTypeCustomAccountUpdateAccountLinkType = "custom_account_update"AccountLinkTypeCustomAccountVerificationAccountLinkType = "custom_account_verification")
List of values that AccountLinkType can take.
typeAccountList¶
AccountList is a list of accounts as returned from a list endpoint.
typeAccountListParams¶
type AccountListParams struct {ListParams `form:"*"`}AccountListParams are the parameters allowed during account listing.
typeAccountParams¶
type AccountParams struct {Params `form:"*"`AccountToken *string `form:"account_token"`BusinessProfile *AccountBusinessProfileParams `form:"business_profile"`BusinessType *string `form:"business_type"`Company *AccountCompanyParams `form:"company"`Country *string `form:"country"`DefaultCurrency *string `form:"default_currency"`Email *string `form:"email"`ExternalAccount *AccountExternalAccountParams `form:"external_account"`Individual *PersonParams `form:"individual"`RequestedCapabilities []*string `form:"requested_capabilities"`Settings *AccountSettingsParams `form:"settings"`TOSAcceptance *AccountTOSAcceptanceParams `form:"tos_acceptance"`Type *string `form:"type"`}AccountParams are the parameters allowed during account creation/updates.
typeAccountPayoutSchedule¶
type AccountPayoutSchedule struct {DelayDaysint64 `json:"delay_days"`IntervalPayoutInterval `json:"interval"`MonthlyAnchorint64 `json:"monthly_anchor"`WeeklyAnchorstring `json:"weekly_anchor"`}AccountPayoutSchedule is the structure for an account's payout schedule.
typeAccountRejectParams¶
AccountRejectParams is the structure for the Reject function.
typeAccountRejectReason¶
type AccountRejectReasonstring
AccountRejectReason describes the valid reason to reject an account
const (AccountRejectReasonFraudAccountRejectReason = "fraud"AccountRejectReasonOtherAccountRejectReason = "other"AccountRejectReasonTermsOfServiceAccountRejectReason = "terms_of_service")
List of values that AccountRejectReason can take.
typeAccountRequirements¶
type AccountRequirements struct {CurrentDeadlineint64 `json:"current_deadline"`CurrentlyDue []string `json:"currently_due"`DisabledReasonAccountRequirementsDisabledReason `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.
typeAccountRequirementsDisabledReason¶
type AccountRequirementsDisabledReasonstring
AccountRequirementsDisabledReason describes why an account is disabled.
const (AccountRequirementsDisabledReasonFieldsNeededAccountRequirementsDisabledReason = "fields_needed"AccountRequirementsDisabledReasonListedAccountRequirementsDisabledReason = "listed"AccountRequirementsDisabledReasonOtherAccountRequirementsDisabledReason = "other"AccountRequirementsDisabledReasonRejectedFraudAccountRequirementsDisabledReason = "rejected.fraud"AccountRequirementsDisabledReasonRejectedListedAccountRequirementsDisabledReason = "rejected.listed"AccountRequirementsDisabledReasonRejectedOtherAccountRequirementsDisabledReason = "rejected.other"AccountRequirementsDisabledReasonRejectedTermsOfServiceAccountRequirementsDisabledReason = "rejected.terms_of_service"AccountRequirementsDisabledReasonUnderReviewAccountRequirementsDisabledReason = "under_review")
List of values that AccountRequirementsDisabledReason can take.
typeAccountRequirementsError¶
type AccountRequirementsError struct {Codestring `json:"code"`Reasonstring `json:"reason"`Requirementstring `json:"requirement"`}AccountRequirementsError represents details about an error with a requirement.
typeAccountSettings¶
type AccountSettings struct {Branding *AccountSettingsBranding `json:"branding"`CardPayments *AccountSettingsCardPayments `json:"card_payments"`Dashboard *AccountSettingsDashboard `json:"dashboard"`Payments *AccountSettingsPayments `json:"payments"`Payouts *AccountSettingsPayouts `json:"payouts"`}AccountSettings represents options for customizing how the account functions within Stripe.
typeAccountSettingsBranding¶
type AccountSettingsBranding struct {Icon *File `json:"icon"`Logo *File `json:"logo"`PrimaryColorstring `json:"primary_color"`SecondaryColorstring `json:"secondary_color"`}AccountSettingsBranding represents settings specific to the account's branding.
typeAccountSettingsBrandingParams¶
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 theaccount’s branding.
typeAccountSettingsCardPayments¶
type AccountSettingsCardPayments struct {DeclineOn *AccountDeclineOn `json:"decline_on"`StatementDescriptorPrefixstring `json:"statement_descriptor_prefix"`}AccountSettingsCardPayments represents settings specific to card charging on the account.
typeAccountSettingsCardPaymentsParams¶
type AccountSettingsCardPaymentsParams struct {DeclineOn *AccountDeclineSettingsParams `form:"decline_on"`StatementDescriptorPrefix *string `form:"statement_descriptor_prefix"`}AccountSettingsCardPaymentsParams represent allowed parameters to configure settings specific tocard charging on the account.
typeAccountSettingsDashboard¶
type AccountSettingsDashboard struct {DisplayNamestring `json:"display_name"`Timezonestring `json:"timezone"`}AccountSettingsDashboard represents settings specific to the account's Dashboard.
typeAccountSettingsDashboardParams¶
type AccountSettingsDashboardParams struct {DisplayName *string `form:"display_name"`Timezone *string `form:"timezone"`}AccountSettingsDashboardParams represent allowed parameters to configure settings for theaccount's Dashboard.
typeAccountSettingsParams¶
type AccountSettingsParams struct {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.
typeAccountSettingsPayments¶
type AccountSettingsPayments struct {StatementDescriptorstring `json:"statement_descriptor"`StatementDescriptorKanastring `json:"statement_descriptor_kana"`StatementDescriptorKanjistring `json:"statement_descriptor_kanji"`}AccountSettingsPayments represents settings that apply across payment methods for charging onthe account.
typeAccountSettingsPaymentsParams¶
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 paymentmethods for charging on the account.
typeAccountSettingsPayouts¶
type AccountSettingsPayouts struct {DebitNegativeBalancesbool `json:"debit_negative_balances"`Schedule *AccountPayoutSchedule `json:"schedule"`StatementDescriptorstring `json:"statement_descriptor"`}AccountSettingsPayouts represents settings specific to the account’s payouts.
typeAccountSettingsPayoutsParams¶
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 theaccount’s payouts.
typeAccountTOSAcceptance¶
type AccountTOSAcceptance struct {Dateint64 `json:"date"`IPstring `json:"ip"`UserAgentstring `json:"user_agent"`}AccountTOSAcceptance represents status of acceptance of our terms of services for the account.
typeAccountTOSAcceptanceParams¶
type AccountTOSAcceptanceParams struct {Date *int64 `form:"date"`IP *string `form:"ip"`UserAgent *string `form:"user_agent"`}AccountTOSAcceptanceParams represents tos_acceptance during account creation/updates.
typeAccountType¶
type AccountTypestring
AccountType is the type of an account.
const (AccountTypeCustomAccountType = "custom"AccountTypeExpressAccountType = "express"AccountTypeStandardAccountType = "standard")
List of values that AccountType can take.
typeAddress¶
type Address struct {Citystring `json:"city"`Countrystring `json:"country"`Line1string `json:"line1"`Line2string `json:"line2"`PostalCodestring `json:"postal_code"`Statestring `json:"state"`}Address describes common properties for an Address hash.
typeAddressParams¶
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.
typeAmount¶
type Amount struct {CurrencyCurrency `json:"currency"`SourceTypes map[BalanceSourceType]int64 `json:"source_types"`Valueint64 `json:"amount"`}Amount is a structure wrapping an amount value and its currency.
typeAppInfo¶
type AppInfo struct {Namestring `json:"name"`PartnerIDstring `json:"partner_id"`URLstring `json:"url"`Versionstring `json:"version"`}AppInfo contains information about the "app" which this integration belongsto. This should be reserved for plugins that wish to identify themselveswith Stripe.
typeApplePayDomain¶
type ApplePayDomain struct {Createdint64 `json:"created"`Deletedbool `json:"deleted"`DomainNamestring `json:"domain_name"`IDstring `json:"id"`Livemodebool `json:"livemode"`}ApplePayDomain is the resource representing a Stripe ApplePayDomain object
typeApplePayDomainList¶
type ApplePayDomainList struct {ListMetaData []*ApplePayDomain `json:"data"`}ApplePayDomainList is a list of ApplePayDomains as returned from a list endpoint.
typeApplePayDomainListParams¶
type ApplePayDomainListParams struct {ListParams `form:"*"`}ApplePayDomainListParams are the parameters allowed during ApplePayDomain listing.
typeApplePayDomainParams¶
ApplePayDomainParams is the set of parameters that can be used when creating an ApplePayDomain object.
typeApplication¶
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 resultingproperty may be an id or the full struct if it was expanded.
typeApplicationFee¶
type ApplicationFee struct {Account *Account `json:"account"`Amountint64 `json:"amount"`AmountRefundedint64 `json:"amount_refunded"`Applicationstring `json:"application"`BalanceTransaction *BalanceTransaction `json:"balance_transaction"`Charge *Charge `json:"charge"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`IDstring `json:"id"`Livemodebool `json:"livemode"`OriginatingTransaction *Charge `json:"originating_transaction"`Refundedbool `json:"refunded"`Refunds *FeeRefundList `json:"refunds"`}ApplicationFee is the resource representing a Stripe application fee.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typeApplicationFeeList¶
type ApplicationFeeList struct {ListMetaData []*ApplicationFee `json:"data"`}ApplicationFeeList is a list of application fees as retrieved from a list endpoint.
typeApplicationFeeListParams¶
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 seehttps://stripe.com/docs/api#list_application_fees.
typeApplicationFeeParams¶
type ApplicationFeeParams struct {Params `form:"*"`}ApplicationFeeParams is the set of parameters that can be used when refunding an application fee.For more details seehttps://stripe.com/docs/api#refund_application_fee.
typeAuthenticationError¶
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.
typeAuthorizationControlsParams¶
type AuthorizationControlsParams struct {AllowedCategories []*string `form:"allowed_categories"`BlockedCategories []*string `form:"blocked_categories"`MaxApprovals *int64 `form:"max_approvals"`SpendingLimits []*IssuingAuthorizationControlsSpendingLimitsParams `form:"spending_limits"`// The following parameter only applies to CardholderSpendingLimitsCurrency *string `form:"spending_limits_currency"`// The following parameter is deprecatedMaxAmount *int64 `form:"max_amount"`}AuthorizationControlsParams is the set of parameters that can be used for the shipping parameter.This is deprecated and will be removed in the next major version.
typeAuthorizeURLParams¶
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.
typeBackend¶
type Backend interface {Call(method, path, keystring, paramsParamsContainer, v interface{})errorCallRaw(method, path, keystring, body *form.Values, params *Params, v interface{})errorCallMultipart(method, path, key, boundarystring, body *bytes.Buffer, params *Params, v interface{})errorSetMaxNetworkRetries(maxNetworkRetriesint)}Backend is an interface for making calls against a Stripe service.This interface exists to enable mocking for during testing if needed.
funcGetBackend¶
func GetBackend(backendTypeSupportedBackend)Backend
GetBackend returns one of the library's supported backends based off of thegiven argument.
It returns an existing default backend if one's already been created.
funcGetBackendWithConfig¶
func GetBackendWithConfig(backendTypeSupportedBackend, config *BackendConfig)Backend
GetBackendWithConfig is the same as GetBackend except that it can be given aconfiguration struct that will configure certain aspects of the backendthat's return.
typeBackendConfig¶
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.//// Defaults to false.EnableTelemetrybool// 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.LeveledLoggerLeveledLoggerInterface// LogLevel is the logging level of the library and defined by://// 0: no logging// 1: errors only// 2: errors + informational (default)// 3: errors + informational + debug//// Defaults to 0 (no logging), so please make sure to set this if you want// to see logging output in your custom configuration.//// Deprecated: Logging should be configured with LeveledLogger instead.LogLevelint// Logger is where this backend will write its logs.//// If left unset, it'll be set to Logger.//// Deprecated: Logging should be configured with LeveledLogger instead.LoggerPrintfer// MaxNetworkRetries sets maximum number of times that the library will// retry requests that appear to have failed due to an intermittent// problem.//// Defaults to 0.MaxNetworkRetriesint// URL is the base URL to use for API paths.//// If left empty, it'll be set to the default for the SupportedBackend.URLstring}BackendConfig is used to configure a new Stripe backend.
typeBackendImplementation¶
type BackendImplementation struct {TypeSupportedBackendURLstringHTTPClient *http.ClientLeveledLoggerLeveledLoggerInterfaceMaxNetworkRetriesint// contains filtered or unexported fields}BackendImplementation is the internal implementation for making HTTP callsto Stripe.
The public use of this struct is deprecated. It will be unexported in afuture version.
func (*BackendImplementation)Call¶
func (s *BackendImplementation) Call(method, path, keystring, paramsParamsContainer, v interface{})error
Call is the Backend.Call implementation for invoking Stripe APIs.
func (*BackendImplementation)CallMultipart¶
func (s *BackendImplementation) CallMultipart(method, path, key, boundarystring, body *bytes.Buffer, params *Params, v interface{})error
CallMultipart is the Backend.CallMultipart implementation for invoking Stripe APIs.
func (*BackendImplementation)CallRaw¶
func (s *BackendImplementation) CallRaw(method, path, keystring, form *form.Values, params *Params, v interface{})error
CallRaw is the implementation for invoking Stripe APIs internally without a backend.
func (*BackendImplementation)Do¶
Do is used by Call to execute an API request and parse the response. It usesthe backend's HTTP client to execute the request and unmarshals the responseinto v. It also handles unmarshaling errors returned by the API.
func (*BackendImplementation)NewRequest¶
func (s *BackendImplementation) NewRequest(method, path, key, contentTypestring, params *Params) (*http.Request,error)
NewRequest is used by Call to generate an http.Request. It handles encodingparameters 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(maxNetworkRetriesint)
SetMaxNetworkRetries sets max number of retries on failed requests
This function is deprecated. Please use GetBackendWithConfig instead.
func (*BackendImplementation)SetNetworkRetriesSleep¶
func (s *BackendImplementation) SetNetworkRetriesSleep(sleepbool)
SetNetworkRetriesSleep allows the normal sleep between network retries to beenabled or disabled.
This function is available for internal testing only and should never beused in production.
func (*BackendImplementation)UnmarshalJSONVerbose¶
func (s *BackendImplementation) UnmarshalJSONVerbose(statusCodeint, body []byte, v interface{})error
UnmarshalJSONVerbose unmarshals JSON, but in case of a failure logs andproduces a more descriptive error.
typeBackends¶
type Backends struct {API, Connect, UploadsBackend// contains filtered or unexported fields}Backends are the currently supported endpoints.
funcNewBackends¶
NewBackends creates a new set of backends with the given HTTP client. Youshould only need to use this for testing purposes or on App Engine.
typeBalance¶
type Balance struct {Available []*Amount `json:"available"`ConnectReserved []*Amount `json:"connect_reserved"`Livemodebool `json:"livemode"`Pending []*Amount `json:"pending"`}Balance is the resource representing your Stripe balance.For more details seehttps://stripe.com/docs/api/#balance.
typeBalanceParams¶
type BalanceParams struct {Params `form:"*"`}BalanceParams is the set of parameters that can be used when retrieving a balance.For more details seehttps://stripe.com/docs/api#balance.
typeBalanceSourceType¶
type BalanceSourceTypestring
BalanceSourceType is the list of allowed values for the balance amount's source_type field keys.
const (BalanceSourceTypeAlipayAccountBalanceSourceType = "alipay_account"BalanceSourceTypeBankAccountBalanceSourceType = "bank_account"BalanceSourceTypeBitcoinReceiverBalanceSourceType = "bitcoin_receiver"BalanceSourceTypeCardBalanceSourceType = "card"BalanceSourceTypeFPXBalanceSourceType = "fpx")
List of values that BalanceSourceType can take.
typeBalanceTransaction¶
type BalanceTransaction struct {Amountint64 `json:"amount"`AvailableOnint64 `json:"available_on"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Descriptionstring `json:"description"`ExchangeRatefloat64 `json:"exchange_rate"`IDstring `json:"id"`Feeint64 `json:"fee"`FeeDetails []*BalanceTransactionFee `json:"fee_details"`Netint64 `json:"net"`Recipientstring `json:"recipient"`ReportingCategoryBalanceTransactionReportingCategory `json:"reporting_category"`Source *BalanceTransactionSource `json:"source"`StatusBalanceTransactionStatus `json:"status"`TypeBalanceTransactionType `json:"type"`}BalanceTransaction is the resource representing the balance transaction.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typeBalanceTransactionFee¶
type BalanceTransactionFee struct {Amountint64 `json:"amount"`Applicationstring `json:"application"`CurrencyCurrency `json:"currency"`Descriptionstring `json:"description"`Typestring `json:"type"`}BalanceTransactionFee is a structure that breaks down the fees in a transaction.
typeBalanceTransactionList¶
type BalanceTransactionList struct {ListMetaData []*BalanceTransaction `json:"data"`}BalanceTransactionList is a list of transactions as returned from a list endpoint.
typeBalanceTransactionListParams¶
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 seehttps://stripe.com/docs/api/#balance_history.
typeBalanceTransactionParams¶
type BalanceTransactionParams struct {Params `form:"*"`}BalanceTransactionParams is the set of parameters that can be used when retrieving a transaction.For more details seehttps://stripe.com/docs/api#retrieve_balance_transaction.
typeBalanceTransactionReportingCategory¶
type BalanceTransactionReportingCategorystring
BalanceTransactionReportingCategory represents reporting categories for balance transactions.
const (BalanceTransactionReportingCategoryAdvanceBalanceTransactionReportingCategory = "advance"BalanceTransactionReportingCategoryAdvanceFundingBalanceTransactionReportingCategory = "advance_funding"BalanceTransactionReportingCategoryChargeBalanceTransactionReportingCategory = "charge"BalanceTransactionReportingCategoryChargeFailureBalanceTransactionReportingCategory = "charge_failure"BalanceTransactionReportingCategoryConnectCollectionTransferBalanceTransactionReportingCategory = "connect_collection_transfer"BalanceTransactionReportingCategoryConnectReservedFundsBalanceTransactionReportingCategory = "connect_reserved_funds"BalanceTransactionReportingCategoryDisputeBalanceTransactionReportingCategory = "dispute"BalanceTransactionReportingCategoryDisputeReversalBalanceTransactionReportingCategory = "dispute_reversal"BalanceTransactionReportingCategoryFeeBalanceTransactionReportingCategory = "fee"BalanceTransactionReportingCategoryIssuingAuthorizationHoldBalanceTransactionReportingCategory = "issuing_authorization_hold"BalanceTransactionReportingCategoryIssuingAuthorizationReleaseBalanceTransactionReportingCategory = "issuing_authorization_release"BalanceTransactionReportingCategoryIssuingTransactionBalanceTransactionReportingCategory = "issuing_transaction"BalanceTransactionReportingCategoryOtherAdjustmentBalanceTransactionReportingCategory = "other_adjustment"BalanceTransactionReportingCategoryPartialCaptureReversalBalanceTransactionReportingCategory = "partial_capture_reversal"BalanceTransactionReportingCategoryPayoutBalanceTransactionReportingCategory = "payout"BalanceTransactionReportingCategoryPayoutReversalBalanceTransactionReportingCategory = "payout_reversal"BalanceTransactionReportingCategoryPlatformEarningBalanceTransactionReportingCategory = "platform_earning"BalanceTransactionReportingCategoryPlatformEarningRefundBalanceTransactionReportingCategory = "platform_earning_refund"BalanceTransactionReportingCategoryRefundBalanceTransactionReportingCategory = "refund"BalanceTransactionReportingCategoryRefundFailureBalanceTransactionReportingCategory = "refund_failure"BalanceTransactionReportingCategoryRiskReservedFundsBalanceTransactionReportingCategory = "risk_reserved_funds"BalanceTransactionReportingCategoryTaxBalanceTransactionReportingCategory = "tax"BalanceTransactionReportingCategoryTopupBalanceTransactionReportingCategory = "topup"BalanceTransactionReportingCategoryTopupReversalBalanceTransactionReportingCategory = "topup_reversal"BalanceTransactionReportingCategoryTransferBalanceTransactionReportingCategory = "transfer"BalanceTransactionReportingCategoryTransferReversalBalanceTransactionReportingCategory = "transfer_reversal")
List of values that BalanceTransactionReportingCategory can take.
typeBalanceTransactionSource¶
type BalanceTransactionSource struct {ApplicationFee *ApplicationFee `json:"-"`Charge *Charge `json:"-"`Dispute *Dispute `json:"-"`IDstring `json:"id"`IssuingAuthorization *IssuingAuthorization `json:"-"`IssuingTransaction *IssuingAuthorization `json:"-"`Payout *Payout `json:"-"`RecipientTransfer *RecipientTransfer `json:"-"`Refund *Refund `json:"-"`Reversal *Reversal `json:"-"`Transfer *Transfer `json:"-"`TypeBalanceTransactionSourceType `json:"object"`}BalanceTransactionSource describes the source of a balance Transaction.The Type should indicate which object is fleshed out.For more details seehttps://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 specifictype of transaction source it refers to is specified in the JSON
typeBalanceTransactionSourceType¶
type BalanceTransactionSourceTypestring
BalanceTransactionSourceType consts represent valid balance transaction sources.
const (BalanceTransactionSourceTypeApplicationFeeBalanceTransactionSourceType = "application_fee"BalanceTransactionSourceTypeChargeBalanceTransactionSourceType = "charge"BalanceTransactionSourceTypeDisputeBalanceTransactionSourceType = "dispute"BalanceTransactionSourceTypeIssuingAuthorizationBalanceTransactionSourceType = "issuing.authorization"BalanceTransactionSourceTypeIssuingTransactionBalanceTransactionSourceType = "issuing.transaction"BalanceTransactionSourceTypePayoutBalanceTransactionSourceType = "payout"BalanceTransactionSourceTypeRecipientTransferBalanceTransactionSourceType = "recipient_transfer"BalanceTransactionSourceTypeRefundBalanceTransactionSourceType = "refund"BalanceTransactionSourceTypeReversalBalanceTransactionSourceType = "reversal"BalanceTransactionSourceTypeTransferBalanceTransactionSourceType = "transfer")
List of values that BalanceTransactionSourceType can take.
typeBalanceTransactionStatus¶
type BalanceTransactionStatusstring
BalanceTransactionStatus is the list of allowed values for the balance transaction's status.
const (BalanceTransactionStatusAvailableBalanceTransactionStatus = "available"BalanceTransactionStatusPendingBalanceTransactionStatus = "pending")
List of values that BalanceTransactionStatus can take.
typeBalanceTransactionType¶
type BalanceTransactionTypestring
BalanceTransactionType is the list of allowed values for the balance transaction's type.
const (BalanceTransactionTypeAdjustmentBalanceTransactionType = "adjustment"BalanceTransactionTypeApplicationFeeBalanceTransactionType = "application_fee"BalanceTransactionTypeApplicationFeeRefundBalanceTransactionType = "application_fee_refund"BalanceTransactionTypeChargeBalanceTransactionType = "charge"BalanceTransactionTypeIssuingAuthorizationHoldBalanceTransactionType = "issuing_authorization_hold"BalanceTransactionTypeIssuingAuthorizationReleaseBalanceTransactionType = "issuing_authorization_release"BalanceTransactionTypeIssuingAuthorizationTransactionBalanceTransactionType = "issuing_transaction"BalanceTransactionTypePaymentBalanceTransactionType = "payment"BalanceTransactionTypePaymentFailureRefundBalanceTransactionType = "payment_failure_refund"BalanceTransactionTypePaymentRefundBalanceTransactionType = "payment_refund"BalanceTransactionTypePayoutBalanceTransactionType = "payout"BalanceTransactionTypePayoutCancelBalanceTransactionType = "payout_cancel"BalanceTransactionTypePayoutFailureBalanceTransactionType = "payout_failure"BalanceTransactionTypeRecipientTransferBalanceTransactionType = "recipient_transfer"BalanceTransactionTypeRecipientTransferCancelBalanceTransactionType = "recipient_transfer_cancel"BalanceTransactionTypeRecipientTransferFailureBalanceTransactionType = "recipient_transfer_failure"BalanceTransactionTypeRefundBalanceTransactionType = "refund"BalanceTransactionTypeStripeFeeBalanceTransactionType = "stripe_fee"BalanceTransactionTypeTransferBalanceTransactionType = "transfer"BalanceTransactionTypeTransferRefundBalanceTransactionType = "transfer_refund")
List of values that BalanceTransactionType can take.
typeBankAccount¶
type BankAccount struct {Account *Account `json:"account"`AccountHolderNamestring `json:"account_holder_name"`AccountHolderTypeBankAccountAccountHolderType `json:"account_holder_type"`BankNamestring `json:"bank_name"`Countrystring `json:"country"`CurrencyCurrency `json:"currency"`Customer *Customer `json:"customer"`DefaultForCurrencybool `json:"default_for_currency"`Deletedbool `json:"deleted"`Fingerprintstring `json:"fingerprint"`IDstring `json:"id"`Last4string `json:"last4"`Metadata map[string]string `json:"metadata"`RoutingNumberstring `json:"routing_number"`StatusBankAccountStatus `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 resultingproperty may be an id or the full struct if it was expanded.
typeBankAccountAccountHolderType¶
type BankAccountAccountHolderTypestring
BankAccountAccountHolderType is the list of allowed values for the bank account holder type.
const (BankAccountAccountHolderTypeCompanyBankAccountAccountHolderType = "company"BankAccountAccountHolderTypeIndividualBankAccountAccountHolderType = "individual")
List of values that BankAccountAccountHolderType can take.
typeBankAccountList¶
type BankAccountList struct {ListMetaData []*BankAccount `json:"data"`}BankAccountList is a list object for bank accounts.
typeBankAccountListParams¶
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.
typeBankAccountParams¶
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 customersID *string `form:"*"`}BankAccountParams is the set of parameters that can be used when updating abank account.
Note that while form annotations are used for updates, bank accounts havesome unusual logic on creates that necessitates manual handling of allparameters. See AppendToAsSourceOrExternalAccount.
func (*BankAccountParams)AppendToAsSourceOrExternalAccount¶
func (a *BankAccountParams) AppendToAsSourceOrExternalAccount(body *form.Values)
AppendToAsSourceOrExternalAccount appends the given BankAccountParams aseither a source or external account.
It may look like an AppendTo from the form package, but it's not, and isonly used in the special case where we use `bankaccount.New`. It's neededbecause we have some weird encoding logic here that can't be handled by theform package (and it's special enough that it wouldn't be desirable to haveit do so).
This is not a pattern that we want to push forward, and this largely existsbecause the bank accounts endpoint is a little unusual. There is one otherresource like it, which is cards.
typeBankAccountStatus¶
type BankAccountStatusstring
BankAccountStatus is the list of allowed values for the bank account's status.
const (BankAccountStatusErroredBankAccountStatus = "errored"BankAccountStatusNewBankAccountStatus = "new"BankAccountStatusValidatedBankAccountStatus = "validated"BankAccountStatusVerificationFailedBankAccountStatus = "verification_failed"BankAccountStatusVerifiedBankAccountStatus = "verified")
List of values that BankAccountStatus can take.
typeBillingDetails¶
type BillingDetails struct {Address *Address `json:"address"`Emailstring `json:"email"`Namestring `json:"name"`Phonestring `json:"phone"`}BillingDetails represents the billing details associated with a PaymentMethod.
typeBillingDetailsParams¶
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 detailswhen creating or updating a PaymentMethod
typeBitcoinReceiver¶
type BitcoinReceiver struct {Activebool `json:"active"`Amountint64 `json:"amount"`AmountReceivedint64 `json:"amount_received"`BitcoinAmountint64 `json:"bitcoin_amount"`BitcoinAmountReceivedint64 `json:"bitcoin_amount_received"`BitcoinURIstring `json:"bitcoin_uri"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Customerstring `json:"customer"`Descriptionstring `json:"description"`Emailstring `json:"email"`Filledbool `json:"filled"`IDstring `json:"id"`InboundAddressstring `json:"inbound_address"`Metadata map[string]string `json:"metadata"`Paymentstring `json:"payment"`RefundAddressstring `json:"refund_address"`RejectTransactionsbool `json:"reject_transactions"`Transactions *BitcoinTransactionList `json:"transactions"`}BitcoinReceiver is the resource representing a Stripe bitcoin receiver.For more details seehttps://stripe.com/docs/api/#bitcoin_receivers
func (*BitcoinReceiver)UnmarshalJSON¶
func (r *BitcoinReceiver) UnmarshalJSON(data []byte)error
UnmarshalJSON handles deserialization of a BitcoinReceiver.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeBitcoinReceiverList¶
type BitcoinReceiverList struct {ListMetaData []*BitcoinReceiver `json:"data"`}BitcoinReceiverList is a list of bitcoin receivers as retrieved from a list endpoint.
typeBitcoinReceiverListParams¶
type BitcoinReceiverListParams struct {ListParams `form:"*"`Active *bool `form:"active"`Filled *bool `form:"filled"`UncapturedFunds *bool `form:"uncaptured_funds"`}BitcoinReceiverListParams is the set of parameters that can be used when listing BitcoinReceivers.For more details seehttps://stripe.com/docs/api/#list_bitcoin_receivers.
typeBitcoinTransaction¶
type BitcoinTransaction struct {Amountint64 `json:"amount"`BitcoinAmountint64 `json:"bitcoin_amount"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Customerstring `json:"customer"`IDstring `json:"id"`Receiverstring `json:"receiver"`}BitcoinTransaction is the resource representing a Stripe bitcoin transaction.For more details seehttps://stripe.com/docs/api/#bitcoin_receivers
func (*BitcoinTransaction)UnmarshalJSON¶
func (bt *BitcoinTransaction) UnmarshalJSON(data []byte)error
UnmarshalJSON handles deserialization of a BitcoinTransaction.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeBitcoinTransactionList¶
type BitcoinTransactionList struct {ListMetaData []*BitcoinTransaction `json:"data"`}BitcoinTransactionList is a list object for BitcoinTransactions.It is a child object of BitcoinReceiversFor more details seehttps://stripe.com/docs/api/#retrieve_bitcoin_receiver
typeBitcoinTransactionListParams¶
type BitcoinTransactionListParams struct {ListParams `form:"*"`Customer *string `form:"customer"`Receiver *string `form:"-"`// Sent in with the URL}BitcoinTransactionListParams is the set of parameters that can be used when listing BitcoinTransactions.
typeCapability¶
type Capability struct {Account *Account `json:"account"`IDstring `json:"id"`Objectstring `json:"object"`Requestedbool `json:"requested"`RequestedAtint64 `json:"requested_at"`Requirements *CapabilityRequirements `json:"requirements"`StatusCapabilityStatus `json:"status"`}Capability is the resource representing a Stripe capability.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typeCapabilityDisabledReason¶
type CapabilityDisabledReasonstring
CapabilityDisabledReason describes why a capability is disabled.
const (CapabilityDisabledReasonPendingOnboardingCapabilityDisabledReason = "pending.onboarding"CapabilityDisabledReasonPendingReviewCapabilityDisabledReason = "pending.review"CapabilityDisabledReasonRejectedFraudCapabilityDisabledReason = "rejected_fraud"CapabilityDisabledReasonRejectedListedCapabilityDisabledReason = "rejected.listed"CapabilityDisabledReasonRejectedOtherCapabilityDisabledReason = "rejected.other"CapabilityDisabledReasonRequirementsFieldsNeededCapabilityDisabledReason = "requirement.fields_needed")
List of values that CapabilityDisabledReason can take.
typeCapabilityList¶
type CapabilityList struct {ListMetaData []*Capability `json:"data"`}CapabilityList is a list of capabilities as retrieved from a list endpoint.
typeCapabilityListParams¶
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 seehttps://stripe.com/docs/api/capabilities/list
typeCapabilityParams¶
type CapabilityParams struct {Params `form:"*"`Account *string `form:"-"`// Included in URLRequested *bool `form:"requested"`}CapabilityParams is the set of parameters that can be used when updating a capability.For more details seehttps://stripe.com/docs/api/capabilities/update
typeCapabilityRequirements¶
type CapabilityRequirements struct {CurrentDeadlineint64 `json:"current_deadline"`CurrentlyDue []string `json:"currently_due"`DisabledReasonCapabilityDisabledReason `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.
typeCapabilityStatus¶
type CapabilityStatusstring
CapabilityStatus describes the different statuses for a capability's status.
const (CapabilityStatusActiveCapabilityStatus = "active"CapabilityStatusInactiveCapabilityStatus = "inactive"CapabilityStatusPendingCapabilityStatus = "pending"CapabilityStatusUnrequestedCapabilityStatus = "unrequested")
List of values that CapabilityStatus can take.
typeCaptureParams¶
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.
typeCard¶
type Card struct {AddressCitystring `json:"address_city"`AddressCountrystring `json:"address_country"`AddressLine1string `json:"address_line1"`AddressLine1CheckCardVerification `json:"address_line1_check"`AddressLine2string `json:"address_line2"`AddressStatestring `json:"address_state"`AddressZipstring `json:"address_zip"`AddressZipCheckCardVerification `json:"address_zip_check"`AvailablePayoutMethods []CardAvailablePayoutMethod `json:"available_payout_methods"`BrandCardBrand `json:"brand"`CVCCheckCardVerification `json:"cvc_check"`Countrystring `json:"country"`CurrencyCurrency `json:"currency"`Customer *Customer `json:"customer"`DefaultForCurrencybool `json:"default_for_currency"`Deletedbool `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.Descriptionstring `json:"description"`DynamicLast4string `json:"dynamic_last4"`ExpMonthuint8 `json:"exp_month"`ExpYearuint16 `json:"exp_year"`Fingerprintstring `json:"fingerprint"`FundingCardFunding `json:"funding"`IDstring `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.IINstring `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.Issuerstring `json:"issuer"`Last4string `json:"last4"`Metadata map[string]string `json:"metadata"`Namestring `json:"name"`Recipient *Recipient `json:"recipient"`ThreeDSecure *ThreeDSecure `json:"three_d_secure"`TokenizationMethodCardTokenizationMethod `json:"tokenization_method"`}Card is the resource representing a Stripe credit/debit card.For more details seehttps://stripe.com/docs/api#cards.
func (*Card)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Card.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeCardAvailablePayoutMethod¶
type CardAvailablePayoutMethodstring
CardAvailablePayoutMethod is a set of available payout methods for the card.
const (CardAvailablePayoutMethodInstantCardAvailablePayoutMethod = "Instant"CardAvailablePayoutMethodStandardCardAvailablePayoutMethod = "Standard")
List of values that CardAvailablePayoutMethod can take.
typeCardBrand¶
type CardBrandstring
CardBrand is the list of allowed values for the card's brand.
const (CardBrandAmexCardBrand = "American Express"CardBrandDiscoverCardBrand = "Discover"CardBrandDinersClubCardBrand = "Diners Club"CardBrandJCBCardBrand = "JCB"CardBrandMasterCardCardBrand = "MasterCard"CardBrandUnknownCardBrand = "Unknown"CardBrandUnionPayCardBrand = "UnionPay"CardBrandVisaCardBrand = "Visa")
List of values that CardBrand can take.
typeCardError¶
type CardError struct {// DeclineCode is a code indicating a card issuer's reason for declining a// card (if they provided one).DeclineCodeDeclineCode `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 somereason.
typeCardFunding¶
type CardFundingstring
CardFunding is the list of allowed values for the card's funding.
const (CardFundingCreditCardFunding = "credit"CardFundingDebitCardFunding = "debit"CardFundingPrepaidCardFunding = "prepaid"CardFundingUnknownCardFunding = "unknown")
List of values that CardFunding can take.
typeCardListParams¶
type CardListParams struct {ListParams `form:"*"`Account *string `form:"-"`Customer *string `form:"-"`Recipient *string `form:"-"`}CardListParams is the set of parameters that can be used when listing cards.For more details seehttps://stripe.com/docs/api#list_cards.
typeCardParams¶
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"`Recipient *string `form:"-"`Token *string `form:"-"`// ID is used when tokenizing a card for shared customersIDstring `form:"*"`}CardParams is the set of parameters that can be used when creating or updating a card.For more details seehttps://stripe.com/docs/api#create_card andhttps://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 handlingof all parameters. See AppendToAsCardSourceOrExternalAccount.
func (*CardParams)AppendToAsCardSourceOrExternalAccount¶
func (c *CardParams) AppendToAsCardSourceOrExternalAccount(body *form.Values, keyParts []string)
AppendToAsCardSourceOrExternalAccount appends the given CardParams as either acard or external account.
It may look like an AppendTo from the form package, but it's not, and isonly used in the special case where we use `card.New`. It's needed becausewe have some weird encoding logic here that can't be handled by the formpackage (and it's special enough that it wouldn't be desirable to have it doso).
This is not a pattern that we want to push forward, and this largely existsbecause the cards endpoint is a little unusual. There is one other resourcelike it, which is bank account.
typeCardTokenizationMethod¶
type CardTokenizationMethodstring
CardTokenizationMethod is the list of allowed values for the card's tokenization method.
const (TokenizationMethodAndroidPayCardTokenizationMethod = "android_pay"TokenizationMethodApplePayCardTokenizationMethod = "apple_pay")
List of values that CardTokenizationMethod can take.
typeCardVerification¶
type CardVerificationstring
CardVerification is the list of allowed verification responses.
const (CardVerificationFailCardVerification = "fail"CardVerificationPassCardVerification = "pass"CardVerificationUnavailableCardVerification = "unavailable"CardVerificationUncheckedCardVerification = "unchecked")
List of values that CardVerification can take.
typeCharge¶
type Charge struct {Amountint64 `json:"amount"`AmountRefundedint64 `json:"amount_refunded"`Application *Application `json:"application"`ApplicationFee *ApplicationFee `json:"application_fee"`ApplicationFeeAmountint64 `json:"application_fee_amount"`AuthorizationCodestring `json:"authorization_code"`BalanceTransaction *BalanceTransaction `json:"balance_transaction"`BillingDetails *BillingDetails `json:"billing_details"`CalculatedStatementDescriptorstring `json:"calculated_statement_descriptor"`Capturedbool `json:"captured"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Customer *Customer `json:"customer"`Descriptionstring `json:"description"`Destination *Account `json:"destination"`Dispute *Dispute `json:"dispute"`Disputedbool `json:"disputed"`FailureCodestring `json:"failure_code"`FailureMessagestring `json:"failure_message"`FraudDetails *FraudDetails `json:"fraud_details"`IDstring `json:"id"`Invoice *Invoice `json:"invoice"`Level3ChargeLevel3 `json:"level3"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`OnBehalfOf *Account `json:"on_behalf_of"`Outcome *ChargeOutcome `json:"outcome"`Paidbool `json:"paid"`PaymentIntentstring `json:"payment_intent"`PaymentMethodstring `json:"payment_method"`PaymentMethodDetails *ChargePaymentMethodDetails `json:"payment_method_details"`ReceiptEmailstring `json:"receipt_email"`ReceiptNumberstring `json:"receipt_number"`ReceiptURLstring `json:"receipt_url"`Refundedbool `json:"refunded"`Refunds *RefundList `json:"refunds"`Review *Review `json:"review"`Shipping *ShippingDetails `json:"shipping"`Source *PaymentSource `json:"source"`SourceTransfer *Transfer `json:"source_transfer"`StatementDescriptorstring `json:"statement_descriptor"`StatementDescriptorSuffixstring `json:"statement_descriptor_suffix"`Statusstring `json:"status"`Transfer *Transfer `json:"transfer"`TransferData *ChargeTransferData `json:"transfer_data"`TransferGroupstring `json:"transfer_group"`}Charge is the resource representing a Stripe charge.For more details seehttps://stripe.com/docs/api#charges.
Example (Get)¶
package mainimport ("log"stripe "github.com/stripe/stripe-go""github.com/stripe/stripe-go/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)}Example (New)¶
package mainimport ("log"stripe "github.com/stripe/stripe-go""github.com/stripe/stripe-go/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)}func (*Charge)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a charge.This custom unmarshaling is needed because the resultingproperty may be an ID or the full struct if it was expanded.
typeChargeFraudStripeReport¶
type ChargeFraudStripeReportstring
ChargeFraudStripeReport is the list of allowed values for reporting fraud.
const (ChargeFraudStripeReportFraudulentChargeFraudStripeReport = "fraudulent")List of values that ChargeFraudStripeReport can take.
typeChargeFraudUserReport¶
type ChargeFraudUserReportstring
ChargeFraudUserReport is the list of allowed values for reporting fraud.
const (ChargeFraudUserReportFraudulentChargeFraudUserReport = "fraudulent"ChargeFraudUserReportSafeChargeFraudUserReport = "safe")
List of values that ChargeFraudUserReport can take.
typeChargeLevel3¶
type ChargeLevel3 struct {CustomerReferencestring `json:"customer_reference"`LineItems []*ChargeLevel3LineItem `json:"line_items"`MerchantReferencestring `json:"merchant_reference"`ShippingAddressZipstring `json:"shipping_address_zip"`ShippingFromZipstring `json:"shipping_from_zip"`ShippingAmountint64 `json:"shipping_amount"`}ChargeLevel3 represents the Level III data.This is in private beta and would be empty for most integrations
typeChargeLevel3LineItem¶
type ChargeLevel3LineItem struct {DiscountAmountint64 `json:"discount_amount"`ProductCodestring `json:"product_code"`ProductDescriptionstring `json:"product_description"`Quantityint64 `json:"quantity"`TaxAmountint64 `json:"tax_amount"`UnitCostint64 `json:"unit_cost"`}ChargeLevel3LineItem represents a line item on level III data.This is in private beta and would be empty for most integrations
typeChargeLevel3LineItemsParams¶
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.
typeChargeLevel3Params¶
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.
typeChargeList¶
ChargeList is a list of charges as retrieved from a list endpoint.
typeChargeListParams¶
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.
typeChargeOutcome¶
type ChargeOutcome struct {NetworkStatusstring `json:"network_status"`Reasonstring `json:"reason"`RiskLevelstring `json:"risk_level"`RiskScoreint64 `json:"risk_score"`Rule *ChargeOutcomeRule `json:"rule"`SellerMessagestring `json:"seller_message"`Typestring `json:"type"`}ChargeOutcome is the charge's outcome that details whether a paymentwas accepted and why.
typeChargeOutcomeRule¶
type ChargeOutcomeRule struct {Actionstring `json:"action"`IDstring `json:"id"`Predicatestring `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 resultingproperty may be an id or the full struct if it was expanded.
typeChargeParams¶
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.
typeChargePaymentMethodDetails¶
type ChargePaymentMethodDetails struct {AchCreditTransfer *ChargePaymentMethodDetailsAchCreditTransfer `json:"ach_credit_transfer"`AchDebit *ChargePaymentMethodDetailsAchDebit `json:"ach_debit"`Alipay *ChargePaymentMethodDetailsAlipay `json:"alipay"`Bancontact *ChargePaymentMethodDetailsBancontact `json:"bancontact"`AUBECSDebit *ChargePaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"`Bitcoin *ChargePaymentMethodDetailsBitcoin `json:"bitcoin"`Card *ChargePaymentMethodDetailsCard `json:"card"`CardPresent *ChargePaymentMethodDetailsCardPresent `json:"card_present"`Eps *ChargePaymentMethodDetailsEps `json:"eps"`FPX *ChargePaymentMethodDetailsFPX `json:"fpx"`Giropay *ChargePaymentMethodDetailsGiropay `json:"giropay"`Ideal *ChargePaymentMethodDetailsIdeal `json:"ideal"`Klarna *ChargePaymentMethodDetailsKlarna `json:"klarna"`Multibanco *ChargePaymentMethodDetailsMultibanco `json:"multibanco"`P24 *ChargePaymentMethodDetailsP24 `json:"p24"`SepaDebit *ChargePaymentMethodDetailsSepaDebit `json:"sepa_debit"`Sofort *ChargePaymentMethodDetailsSofort `json:"sofort"`StripeAccount *ChargePaymentMethodDetailsStripeAccount `json:"stripe_account"`TypeChargePaymentMethodDetailsType `json:"type"`Wechat *ChargePaymentMethodDetailsWechat `json:"wechat"`}ChargePaymentMethodDetails represents the details about the PaymentMethod associated with thecharge.
typeChargePaymentMethodDetailsAUBECSDebit¶
type ChargePaymentMethodDetailsAUBECSDebit struct {BSBNumberstring `json:"bsb_number"`Fingerprintstring `json:"fingerprint"`Last4string `json:"last4"`Mandatestring `json:"mandate"`}ChargePaymentMethodDetailsAUBECSDebit represents details about the AU BECS DD PaymentMethod.
typeChargePaymentMethodDetailsAchCreditTransfer¶
type ChargePaymentMethodDetailsAchCreditTransfer struct {AccountNumberstring `json:"account_number"`BankNamestring `json:"bank_name"`RoutingNumberstring `json:"routing_number"`SwiftCodestring `json:"swift_code"`}ChargePaymentMethodDetailsAchCreditTransfer represents details about the ACH Credit TransferPaymentMethod.
typeChargePaymentMethodDetailsAchDebit¶
type ChargePaymentMethodDetailsAchDebit struct {AccountHolderTypeBankAccountAccountHolderType `json:"account_holder_type"`BankNamestring `json:"bank_name"`Countrystring `json:"country"`Fingerprintstring `json:"fingerprint"`Last4string `json:"last4"`RoutingNumberstring `json:"routing_number"`}ChargePaymentMethodDetailsAchDebit represents details about the ACH Debit PaymentMethod.
typeChargePaymentMethodDetailsAcssDebit¶
type ChargePaymentMethodDetailsAcssDebit struct {Countrystring `json:"country"`Fingerprintstring `json:"fingerprint"`Last4string `json:"last4"`RoutingNumberstring `json:"routing_number"`}ChargePaymentMethodDetailsAcssDebit represents details about the ACSS Debit PaymentMethod.
typeChargePaymentMethodDetailsAlipay¶
type ChargePaymentMethodDetailsAlipay struct {}ChargePaymentMethodDetailsAlipay represents details about the Alipay PaymentMethod.
typeChargePaymentMethodDetailsBancontact¶
type ChargePaymentMethodDetailsBancontact struct {BankCodestring `json:"bank_code"`BankNamestring `json:"bank_name"`Bicstring `json:"bic"`IbanLast4string `json:"iban_last4"`PreferredLanguagestring `json:"preferred_language"`VerifiedNamestring `json:"verified_name"`}ChargePaymentMethodDetailsBancontact represents details about the Bancontact PaymentMethod.
typeChargePaymentMethodDetailsBitcoin¶
type ChargePaymentMethodDetailsBitcoin struct {Addressstring `json:"address"`Amountint64 `json:"amount"`AmountChargedint64 `json:"amount_charged"`AmountReceivedint64 `json:"amount_received"`AmountReturnedint64 `json:"amount_returned"`RefundAddressstring `json:"refund_address"`}ChargePaymentMethodDetailsBitcoin represents details about the Bitcoin PaymentMethod.
typeChargePaymentMethodDetailsCard¶
type ChargePaymentMethodDetailsCard struct {BrandPaymentMethodCardBrand `json:"brand"`Checks *ChargePaymentMethodDetailsCardChecks `json:"checks"`Countrystring `json:"country"`ExpMonthuint64 `json:"exp_month"`ExpYearuint64 `json:"exp_year"`Fingerprintstring `json:"fingerprint"`FundingCardFunding `json:"funding"`Installments *ChargePaymentMethodDetailsCardInstallments `json:"installments"`Last4string `json:"last4"`NetworkPaymentMethodCardNetwork `json:"network"`MOTObool `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.Descriptionstring `json:"description"`IINstring `json:"iin"`Issuerstring `json:"issuer"`}ChargePaymentMethodDetailsCard represents details about the Card PaymentMethod.
typeChargePaymentMethodDetailsCardChecks¶
type ChargePaymentMethodDetailsCardChecks struct {AddressLine1CheckCardVerification `json:"address_line1_check"`AddressPostalCodeCheckCardVerification `json:"address_postal_code_check"`CVCCheckCardVerification `json:"cvc_check"`}ChargePaymentMethodDetailsCardChecks represents the checks associated with the charge's CardPaymentMethod.
typeChargePaymentMethodDetailsCardInstallments¶
type ChargePaymentMethodDetailsCardInstallments struct {Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"`}ChargePaymentMethodDetailsCardInstallments represents details about the installment plan chosenfor this charge.
typeChargePaymentMethodDetailsCardPresent¶
type ChargePaymentMethodDetailsCardPresent struct {BrandPaymentMethodCardBrand `json:"brand"`Countrystring `json:"country"`EmvAuthDatastring `json:"emv_auth_data"`ExpMonthuint64 `json:"exp_month"`ExpYearuint64 `json:"exp_year"`Fingerprintstring `json:"fingerprint"`FundingCardFunding `json:"funding"`GeneratedCardstring `json:"generated_card"`Last4string `json:"last4"`NetworkPaymentMethodCardNetwork `json:"network"`ReadMethodstring `json:"read_method"`Receipt *ChargePaymentMethodDetailsCardPresentReceipt `json:"receipt"`}ChargePaymentMethodDetailsCardPresent represents details about the Card Present PaymentMethod.
typeChargePaymentMethodDetailsCardPresentReceipt¶
type ChargePaymentMethodDetailsCardPresentReceipt struct {ApplicationCryptogramstring `json:"application_cryptogram"`ApplicationPreferredNamestring `json:"application_preferred_name"`AuthorizationCodestring `json:"authorization_code"`AuthorizationResponseCodestring `json:"authorization_response_code"`CardholderVerificationMethodstring `json:"cardholder_verification_method"`DedicatedFileNamestring `json:"dedicated_file_name"`TerminalVerificationResultsstring `json:"terminal_verification_results"`TransactionStatusInformationstring `json:"transaction_status_information"`}ChargePaymentMethodDetailsCardPresentReceipt represents details about the receipt on aCard Present PaymentMethod.
typeChargePaymentMethodDetailsCardThreeDSecure¶
type ChargePaymentMethodDetailsCardThreeDSecure struct {Authenticatedbool `json:"authenticated"`Succeededbool `json:"succeeded"`Versionstring `json:"version"`}ChargePaymentMethodDetailsCardThreeDSecure represents details about 3DS associated with thecharge's PaymentMethod.
typeChargePaymentMethodDetailsCardWallet¶
type ChargePaymentMethodDetailsCardWallet struct {AmexExpressCheckout *ChargePaymentMethodDetailsCardWalletAmexExpressCheckout `json:"amex_express_checkout"`ApplePay *ChargePaymentMethodDetailsCardWalletApplePay `json:"apple_pay"`DynamicLast4string `json:"dynamic_last4"`GooglePay *ChargePaymentMethodDetailsCardWalletGooglePay `json:"google_pay"`Masterpass *ChargePaymentMethodDetailsCardWalletMasterpass `json:"masterpass"`SamsungPay *ChargePaymentMethodDetailsCardWalletSamsungPay `json:"samsung_pay"`TypePaymentMethodCardWalletType `json:"type"`VisaCheckout *ChargePaymentMethodDetailsCardWalletVisaCheckout `json:"visa_checkout"`}ChargePaymentMethodDetailsCardWallet represents the details of the card wallet if this CardPaymentMethod is part of a card wallet.
typeChargePaymentMethodDetailsCardWalletAmexExpressCheckout¶
type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout struct {}ChargePaymentMethodDetailsCardWalletAmexExpressCheckout represents the details of the AmexExpress Checkout wallet.
typeChargePaymentMethodDetailsCardWalletApplePay¶
type ChargePaymentMethodDetailsCardWalletApplePay struct {}ChargePaymentMethodDetailsCardWalletApplePay represents the details of the Apple Pay wallet.
typeChargePaymentMethodDetailsCardWalletGooglePay¶
type ChargePaymentMethodDetailsCardWalletGooglePay struct {}ChargePaymentMethodDetailsCardWalletGooglePay represents the details of the Google Pay wallet.
typeChargePaymentMethodDetailsCardWalletMasterpass¶
type ChargePaymentMethodDetailsCardWalletMasterpass struct {BillingAddress *Address `json:"billing_address"`Emailstring `json:"email"`Namestring `json:"name"`ShippingAddress *Address `json:"shipping_address"`}ChargePaymentMethodDetailsCardWalletMasterpass represents the details of the Masterpass wallet.
typeChargePaymentMethodDetailsCardWalletSamsungPay¶
type ChargePaymentMethodDetailsCardWalletSamsungPay struct {}ChargePaymentMethodDetailsCardWalletSamsungPay represents the details of the Samsung Pay wallet.
typeChargePaymentMethodDetailsCardWalletVisaCheckout¶
type ChargePaymentMethodDetailsCardWalletVisaCheckout struct {BillingAddress *Address `json:"billing_address"`Emailstring `json:"email"`Namestring `json:"name"`ShippingAddress *Address `json:"shipping_address"`}ChargePaymentMethodDetailsCardWalletVisaCheckout represents the details of the Visa Checkoutwallet.
typeChargePaymentMethodDetailsEps¶
type ChargePaymentMethodDetailsEps struct {VerifiedNamestring `json:"verified_name"`}ChargePaymentMethodDetailsEps represents details about the EPS PaymentMethod.
typeChargePaymentMethodDetailsFPX¶
type ChargePaymentMethodDetailsFPX struct {AccountHolderTypePaymentMethodFPXAccountHolderType `json:"account_holder_type"`Bankstring `json:"bank"`TransactionIDstring `json:"transaction_id"`}ChargePaymentMethodDetailsFPX represents details about the FPX PaymentMethod.
typeChargePaymentMethodDetailsGiropay¶
type ChargePaymentMethodDetailsGiropay struct {BankCodestring `json:"bank_code"`BankNamestring `json:"bank_name"`Bicstring `json:"bic"`VerifiedNamestring `json:"verified_name"`}ChargePaymentMethodDetailsGiropay represents details about the Giropay PaymentMethod.
typeChargePaymentMethodDetailsIdeal¶
type ChargePaymentMethodDetailsIdeal struct {Bankstring `json:"bank"`Bicstring `json:"bic"`IbanLast4string `json:"iban_last4"`VerifiedNamestring `json:"verified_name"`}ChargePaymentMethodDetailsIdeal represents details about the Ideal PaymentMethod.
typeChargePaymentMethodDetailsKlarna¶
type ChargePaymentMethodDetailsKlarna struct {}ChargePaymentMethodDetailsKlarna represents details for the KlarnaPaymentMethod.
typeChargePaymentMethodDetailsMultibanco¶
type ChargePaymentMethodDetailsMultibanco struct {Entitystring `json:"entity"`Referencestring `json:"reference"`}ChargePaymentMethodDetailsMultibanco represents details about the Multibanco PaymentMethod.
typeChargePaymentMethodDetailsP24¶
type ChargePaymentMethodDetailsP24 struct {Referencestring `json:"reference"`VerifiedNamestring `json:"verified_name"`}ChargePaymentMethodDetailsP24 represents details about the P24 PaymentMethod.
typeChargePaymentMethodDetailsSepaDebit¶
type ChargePaymentMethodDetailsSepaDebit struct {BankCodestring `json:"bank_code"`BranchCodestring `json:"branch_code"`Countrystring `json:"country"`Fingerprintstring `json:"fingerprint"`Last4string `json:"last4"`}ChargePaymentMethodDetailsSepaDebit represents details about the Sepa Debit PaymentMethod.
typeChargePaymentMethodDetailsSofort¶
type ChargePaymentMethodDetailsSofort struct {BankCodestring `json:"bank_code"`BankNamestring `json:"bank_name"`Bicstring `json:"bic"`Countrystring `json:"country"`IbanLast4string `json:"iban_last4"`VerifiedNamestring `json:"verified_name"`}ChargePaymentMethodDetailsSofort represents details about the Sofort PaymentMethod.
typeChargePaymentMethodDetailsStripeAccount¶
type ChargePaymentMethodDetailsStripeAccount struct {}ChargePaymentMethodDetailsStripeAccount represents details about the StripeAccount PaymentMethod.
typeChargePaymentMethodDetailsType¶
type ChargePaymentMethodDetailsTypestring
ChargePaymentMethodDetailsType is the type of the PaymentMethod associated with the Charge'spayment method details.
const (ChargePaymentMethodDetailsTypeAchCreditTransferChargePaymentMethodDetailsType = "ach_credit_transfer"ChargePaymentMethodDetailsTypeAchDebitChargePaymentMethodDetailsType = "ach_debit"ChargePaymentMethodDetailsTypeAcssDebitChargePaymentMethodDetailsType = "acss_debit"ChargePaymentMethodDetailsTypeAlipayChargePaymentMethodDetailsType = "alipay"ChargePaymentMethodDetailsTypeAUBECSDebitChargePaymentMethodDetailsType = "au_becs_debit"ChargePaymentMethodDetailsTypeBancontactChargePaymentMethodDetailsType = "bancontact"ChargePaymentMethodDetailsTypeBitcoinChargePaymentMethodDetailsType = "bitcoin"// This is unsupported today and is here for legacy charges.ChargePaymentMethodDetailsTypeCardChargePaymentMethodDetailsType = "card"ChargePaymentMethodDetailsTypeCardPresentChargePaymentMethodDetailsType = "card_present"ChargePaymentMethodDetailsTypeEpsChargePaymentMethodDetailsType = "eps"ChargePaymentMethodDetailsTypeFPXChargePaymentMethodDetailsType = "fpx"ChargePaymentMethodDetailsTypeGiropayChargePaymentMethodDetailsType = "giropay"ChargePaymentMethodDetailsTypeIdealChargePaymentMethodDetailsType = "ideal"ChargePaymentMethodDetailsTypeKlarnaChargePaymentMethodDetailsType = "klarna"ChargePaymentMethodDetailsTypeMultibancoChargePaymentMethodDetailsType = "multibanco"ChargePaymentMethodDetailsTypeP24ChargePaymentMethodDetailsType = "p24"ChargePaymentMethodDetailsTypeSepaDebitChargePaymentMethodDetailsType = "sepa_debit"ChargePaymentMethodDetailsTypeSofortChargePaymentMethodDetailsType = "sofort"ChargePaymentMethodDetailsTypeStripeAccountChargePaymentMethodDetailsType = "stripe_account"ChargePaymentMethodDetailsTypeWechatChargePaymentMethodDetailsType = "wechat")
List of values that ChargePaymentMethodDetailsType can take.
typeChargePaymentMethodDetailsWechat¶
type ChargePaymentMethodDetailsWechat struct {}ChargePaymentMethodDetailsWechat represents details about the Wechat PaymentMethod.
typeChargeTransferData¶
type ChargeTransferData struct {Amountint64 `form:"amount"`Destination *Account `json:"destination"`}ChargeTransferData represents the information for the transfer_data associated with a charge.
typeChargeTransferDataParams¶
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.
typeCheckoutSession¶
type CheckoutSession struct {CancelURLstring `json:"cancel_url"`ClientReferenceIDstring `json:"client_reference_id"`Customer *Customer `json:"customer"`CustomerEmailstring `json:"customer_email"`Deletedbool `json:"deleted"`DisplayItems []*CheckoutSessionDisplayItem `json:"display_items"`IDstring `json:"id"`Livemodebool `json:"livemode"`Localestring `json:"locale"`Metadata map[string]string `json:"metadata"`ModeCheckoutSessionMode `json:"mode"`Objectstring `json:"object"`PaymentIntent *PaymentIntent `json:"payment_intent"`PaymentMethodTypes []string `json:"payment_method_types"`SetupIntent *SetupIntent `json:"setup_intent"`Shipping *ShippingDetails `json:"shipping"`ShippingAddressCollection *CheckoutSessionShippingAddressCollection `json:"shipping_address_collection"`Subscription *Subscription `json:"subscription"`SubmitTypeCheckoutSessionSubmitType `json:"submit_type"`SuccessURLstring `json:"success_url"`}CheckoutSession is the resource representing a Stripe checkout session.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typeCheckoutSessionDisplayItem¶
type CheckoutSessionDisplayItem struct {Amountint64 `json:"amount"`CurrencyCurrency `json:"currency"`Custom *CheckoutSessionDisplayItemCustom `json:"custom"`Quantityint64 `json:"quantity"`Plan *Plan `json:"plan"`SKU *SKU `json:"sku"`TypeCheckoutSessionDisplayItemType `json:"type"`}CheckoutSessionDisplayItem represents one of the items in a checkout session.
typeCheckoutSessionDisplayItemCustom¶
type CheckoutSessionDisplayItemCustom struct {Descriptionstring `json:"description"`Images []string `json:"images"`Namestring `json:"name"`}CheckoutSessionDisplayItemCustom represents an item of type custom in a checkout session
typeCheckoutSessionDisplayItemType¶
type CheckoutSessionDisplayItemTypestring
CheckoutSessionDisplayItemType is the list of allowed values for the display item type.
const (CheckoutSessionDisplayItemTypeCustomCheckoutSessionDisplayItemType = "custom"CheckoutSessionDisplayItemTypePlanCheckoutSessionDisplayItemType = "plan"CheckoutSessionDisplayItemTypeSKUCheckoutSessionDisplayItemType = "sku")
List of values that CheckoutSessionDisplayItemType can take.
typeCheckoutSessionLineItemParams¶
type CheckoutSessionLineItemParams struct {Amount *int64 `form:"amount"`Currency *string `form:"currency"`Description *string `form:"description"`Images []*string `form:"images"`Name *string `form:"name"`Quantity *int64 `form:"quantity"`TaxRates []*string `form:"tax_rates"`}CheckoutSessionLineItemParams is the set of parameters allowed for a line itemon a checkout session.
typeCheckoutSessionList¶
type CheckoutSessionList struct {ListMetaData []*CheckoutSession `json:"data"`}CheckoutSessionList is a list of sessions as retrieved from a list endpoint.
typeCheckoutSessionListParams¶
type CheckoutSessionListParams struct {ListParams `form:"*"`PaymentIntent *string `form:"payment_intent"`Subscription *string `form:"subscription"`}CheckoutSessionListParams is the set of parameters that can beused when listing sessions.For more details see:https://stripe.com/docs/api/checkout/sessions/list
typeCheckoutSessionMode¶
type CheckoutSessionModestring
CheckoutSessionMode is the list of allowed values for the mode on a Session.
const (CheckoutSessionModePaymentCheckoutSessionMode = "payment"CheckoutSessionModeSetupCheckoutSessionMode = "setup"CheckoutSessionModeSubscriptionCheckoutSessionMode = "subscription")
List of values that CheckoutSessionMode can take.
typeCheckoutSessionParams¶
type CheckoutSessionParams struct {Params `form:"*"`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"`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"`SubscriptionData *CheckoutSessionSubscriptionDataParams `form:"subscription_data"`SubmitType *string `form:"submit_type"`SuccessURL *string `form:"success_url"`}CheckoutSessionParams is the set of parameters that can be used when creatinga checkout session.For more details seehttps://stripe.com/docs/api/checkout/sessions/create
typeCheckoutSessionPaymentIntentDataParams¶
type CheckoutSessionPaymentIntentDataParams struct {Params `form:"*"`ApplicationFeeAmount *int64 `form:"application_fee_amount"`CaptureMethod *string `form:"capture_method"`Description *string `form:"description"`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"`}CheckoutSessionPaymentIntentDataParams is the set of parameters allowed for thepayment intent creation on a checkout session.
typeCheckoutSessionPaymentIntentDataTransferDataParams¶
type CheckoutSessionPaymentIntentDataTransferDataParams struct {Amount *int64 `form:"amount"`Destination *string `form:"destination"`}CheckoutSessionPaymentIntentDataTransferDataParams is the set of parameters allowed for thetransfer_data hash.
typeCheckoutSessionSetupIntentDataParams¶
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 intentcreation on a checkout session.
typeCheckoutSessionShippingAddressCollection¶
type CheckoutSessionShippingAddressCollection struct {AllowedCountries []string `json:"allowed_countries"`}CheckoutSessionShippingAddressCollection is the set of parameters allowed for theshipping address collection.
typeCheckoutSessionShippingAddressCollectionParams¶
type CheckoutSessionShippingAddressCollectionParams struct {AllowedCountries []*string `form:"allowed_countries"`}CheckoutSessionShippingAddressCollectionParams is the set of parameters allowed for theshipping address collection.
typeCheckoutSessionSubmitType¶
type CheckoutSessionSubmitTypestring
CheckoutSessionSubmitType is the list of allowed values for the `submit_type`of a Session.
const (CheckoutSessionSubmitTypeAutoCheckoutSessionSubmitType = "auto"CheckoutSessionSubmitTypeBookCheckoutSessionSubmitType = "book"CheckoutSessionSubmitTypeDonateCheckoutSessionSubmitType = "donate"CheckoutSessionSubmitTypePayCheckoutSessionSubmitType = "pay")
List of values that CheckoutSessionSubmitType can take.
typeCheckoutSessionSubscriptionDataItemsParams¶
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 acheckout session associated with a subscription.
typeCheckoutSessionSubscriptionDataParams¶
type CheckoutSessionSubscriptionDataParams struct {Params `form:"*"`ApplicationFeePercent *float64 `form:"application_fee_percent"`DefaultTaxRates []*string `form:"default_tax_rates"`Items []*CheckoutSessionSubscriptionDataItemsParams `form:"items"`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 subscriptioncreation on a checkout session.
typeCodeVerificationFlow¶
type CodeVerificationFlow struct {AttemptsRemainingint64 `json:"attempts_remaining"`StatusSourceCodeVerificationFlowStatus `json:"status"`}CodeVerificationFlow informs of the state of a verification authentication flow.
typeCountrySpec¶
type CountrySpec struct {DefaultCurrencyCurrency `json:"default_currency"`IDstring `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 seehttps://stripe.com/docs/api/#country_specs.
typeCountrySpecList¶
type CountrySpecList struct {ListMetaData []*CountrySpec `json:"data"`}CountrySpecList is a list of country specs as retrieved from a list endpoint.
typeCountrySpecListParams¶
type CountrySpecListParams struct {ListParams `form:"*"`}CountrySpecListParams are the parameters allowed during CountrySpec listing.
typeCountrySpecParams¶
type CountrySpecParams struct {Params `form:"*"`}CountrySpecParams are the parameters allowed during CountrySpec retrieval.
typeCoupon¶
type Coupon struct {AmountOffint64 `json:"amount_off"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Deletedbool `json:"deleted"`DurationCouponDuration `json:"duration"`DurationInMonthsint64 `json:"duration_in_months"`IDstring `json:"id"`Livemodebool `json:"livemode"`MaxRedemptionsint64 `json:"max_redemptions"`Metadata map[string]string `json:"metadata"`Namestring `json:"name"`PercentOfffloat64 `json:"percent_off"`RedeemByint64 `json:"redeem_by"`TimesRedeemedint64 `json:"times_redeemed"`Validbool `json:"valid"`}Coupon is the resource representing a Stripe coupon.For more details seehttps://stripe.com/docs/api#coupons.
func (*Coupon)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Coupon.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeCouponDuration¶
type CouponDurationstring
CouponDuration is the list of allowed values for the coupon's duration.
const (CouponDurationForeverCouponDuration = "forever"CouponDurationOnceCouponDuration = "once"CouponDurationRepeatingCouponDuration = "repeating")
List of values that CouponDuration can take.
typeCouponList¶
CouponList is a list of coupons as retrieved from a list endpoint.
typeCouponListParams¶
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 seehttps://stripe.com/docs/api#list_coupons.
typeCouponParams¶
type CouponParams struct {Params `form:"*"`AmountOff *int64 `form:"amount_off"`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 seehttps://stripe.com/docs/api#create_coupon.
typeCreditNote¶
type CreditNote struct {Amountint64 `json:"amount"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Customer *Customer `json:"customer"`CustomerBalanceTransaction *CustomerBalanceTransaction `json:"customer_balance_transaction"`DiscountAmountint64 `json:"discount_amount"`Invoice *Invoice `json:"invoice"`IDstring `json:"id"`Lines *CreditNoteLineItemList `json:"lines"`Livemodebool `json:"livemode"`Memostring `json:"memo"`Metadata map[string]string `json:"metadata"`Numberstring `json:"number"`Objectstring `json:"object"`OutOfBandAmountint64 `json:"out_of_band_amount"`PDFstring `json:"pdf"`ReasonCreditNoteReason `json:"reason"`Refund *Refund `json:"refund"`StatusCreditNoteStatus `json:"status"`Subtotalint64 `json:"subtotal"`TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"`Totalint64 `json:"total"`TypeCreditNoteType `json:"type"`VoidedAtint64 `json:"voided_at"`}CreditNote is the resource representing a Stripe credit note.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typeCreditNoteLineItem¶
type CreditNoteLineItem struct {Amountint64 `json:"amount"`Descriptionstring `json:"description"`DiscountAmountint64 `json:"discount_amount"`IDstring `json:"id"`InvoiceLineItemstring `json:"invoice_line_item"`Livemodebool `json:"livemode"`Objectstring `json:"object"`Quantityint64 `json:"quantity"`TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"`TaxRates []*TaxRate `json:"tax_rates"`TypeCreditNoteLineItemType `json:"type"`UnitAmountint64 `json:"unit_amount"`UnitAmountDecimalfloat64 `json:"unit_amount_decimal,string"`}CreditNoteLineItem is the resource representing a Stripe credit note line item.For more details seehttps://stripe.com/docs/api/credit_notes/line_item
typeCreditNoteLineItemList¶
type CreditNoteLineItemList struct {ListMetaData []*CreditNoteLineItem `json:"data"`}CreditNoteLineItemList is a list of credit note line items as retrieved from a list endpoint.
typeCreditNoteLineItemListParams¶
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.
typeCreditNoteLineItemListPreviewParams¶
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
typeCreditNoteLineItemType¶
type CreditNoteLineItemTypestring
CreditNoteLineItemType is the list of allowed values for the credit note line item's type.
const (CreditNoteLineItemTypeCustomLineItemCreditNoteLineItemType = "custom_line_item"CreditNoteLineItemTypeInvoiceLineItemCreditNoteLineItemType = "invoice_line_item")
List of values that CreditNoteType can take.
typeCreditNoteLineParams¶
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 creatingor previewing a credit note.
typeCreditNoteList¶
type CreditNoteList struct {ListMetaData []*CreditNote `json:"data"`}CreditNoteList is a list of credit notes as retrieved from a list endpoint.
typeCreditNoteListParams¶
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 seehttps://stripe.com/docs/api/credit_notes/list.
typeCreditNoteParams¶
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 seehttps://stripe.com/docs/api/credit_notes/create,https://stripe.com/docs/api/credit_notes/update.
typeCreditNotePreviewParams¶
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 seehttps://stripe.com/docs/api/credit_notes/preview.
typeCreditNoteReason¶
type CreditNoteReasonstring
CreditNoteReason is the reason why a given credit note was created.
const (CreditNoteReasonDuplicateCreditNoteReason = "duplicate"CreditNoteReasonFraudulentCreditNoteReason = "fraudulent"CreditNoteReasonOrderChangeCreditNoteReason = "order_change"CreditNoteReasonProductUnsatisfactoryCreditNoteReason = "product_unsatisfactory")
List of values that CreditNoteReason can take.
typeCreditNoteStatus¶
type CreditNoteStatusstring
CreditNoteStatus is the list of allowed values for the credit note's status.
const (CreditNoteStatusIssuedCreditNoteStatus = "issued"CreditNoteStatusVoidCreditNoteStatus = "void")
List of values that CreditNoteStatus can take.
typeCreditNoteTaxAmount¶
type CreditNoteTaxAmount struct {Amountint64 `json:"amount"`Inclusivebool `json:"inclusive"`TaxRate *TaxRate `json:"tax_rate"`}CreditNoteTaxAmount represent the tax amount applied to a credit note.
typeCreditNoteType¶
type CreditNoteTypestring
CreditNoteType is the list of allowed values for the credit note's type.
const (CreditNoteTypePostPaymentCreditNoteType = "post_payment"CreditNoteTypePrePaymentCreditNoteType = "pre_payment")
List of values that CreditNoteType can take.
typeCreditNoteVoidParams¶
type CreditNoteVoidParams struct {Params `form:"*"`}CreditNoteVoidParams is the set of parameters that can be used when voiding invoices.
typeCurrency¶
type Currencystring
Currency is the list of supported currencies.For more details seehttps://support.stripe.com/questions/which-currencies-does-stripe-support.
const (CurrencyAEDCurrency = "aed"// United Arab Emirates DirhamCurrencyAFNCurrency = "afn"// Afghan AfghaniCurrencyALLCurrency = "all"// Albanian LekCurrencyAMDCurrency = "amd"// Armenian DramCurrencyANGCurrency = "ang"// Netherlands Antillean GuldenCurrencyAOACurrency = "aoa"// Angolan KwanzaCurrencyARSCurrency = "ars"// Argentine PesoCurrencyAUDCurrency = "aud"// Australian DollarCurrencyAWGCurrency = "awg"// Aruban FlorinCurrencyAZNCurrency = "azn"// Azerbaijani ManatCurrencyBAMCurrency = "bam"// Bosnia & Herzegovina Convertible MarkCurrencyBBDCurrency = "bbd"// Barbadian DollarCurrencyBDTCurrency = "bdt"// Bangladeshi TakaCurrencyBGNCurrency = "bgn"// Bulgarian LevCurrencyBIFCurrency = "bif"// Burundian FrancCurrencyBMDCurrency = "bmd"// Bermudian DollarCurrencyBNDCurrency = "bnd"// Brunei DollarCurrencyBOBCurrency = "bob"// Bolivian BolivianoCurrencyBRLCurrency = "brl"// Brazilian RealCurrencyBSDCurrency = "bsd"// Bahamian DollarCurrencyBWPCurrency = "bwp"// Botswana PulaCurrencyBZDCurrency = "bzd"// Belize DollarCurrencyCADCurrency = "cad"// Canadian DollarCurrencyCDFCurrency = "cdf"// Congolese FrancCurrencyCHFCurrency = "chf"// Swiss FrancCurrencyCLPCurrency = "clp"// Chilean PesoCurrencyCNYCurrency = "cny"// Chinese Renminbi YuanCurrencyCOPCurrency = "cop"// Colombian PesoCurrencyCRCCurrency = "crc"// Costa Rican ColónCurrencyCVECurrency = "cve"// Cape Verdean EscudoCurrencyCZKCurrency = "czk"// Czech KorunaCurrencyDJFCurrency = "djf"// Djiboutian FrancCurrencyDKKCurrency = "dkk"// Danish KroneCurrencyDOPCurrency = "dop"// Dominican PesoCurrencyDZDCurrency = "dzd"// Algerian DinarCurrencyEEKCurrency = "eek"// Estonian KroonCurrencyEGPCurrency = "egp"// Egyptian PoundCurrencyETBCurrency = "etb"// Ethiopian BirrCurrencyEURCurrency = "eur"// EuroCurrencyFJDCurrency = "fjd"// Fijian DollarCurrencyFKPCurrency = "fkp"// Falkland Islands PoundCurrencyGBPCurrency = "gbp"// British PoundCurrencyGELCurrency = "gel"// Georgian LariCurrencyGIPCurrency = "gip"// Gibraltar PoundCurrencyGMDCurrency = "gmd"// Gambian DalasiCurrencyGNFCurrency = "gnf"// Guinean FrancCurrencyGTQCurrency = "gtq"// Guatemalan QuetzalCurrencyGYDCurrency = "gyd"// Guyanese DollarCurrencyHKDCurrency = "hkd"// Hong Kong DollarCurrencyHNLCurrency = "hnl"// Honduran LempiraCurrencyHRKCurrency = "hrk"// Croatian KunaCurrencyHTGCurrency = "htg"// Haitian GourdeCurrencyHUFCurrency = "huf"// Hungarian ForintCurrencyIDRCurrency = "idr"// Indonesian RupiahCurrencyILSCurrency = "ils"// Israeli New SheqelCurrencyINRCurrency = "inr"// Indian RupeeCurrencyISKCurrency = "isk"// Icelandic KrónaCurrencyJMDCurrency = "jmd"// Jamaican DollarCurrencyJPYCurrency = "jpy"// Japanese YenCurrencyKESCurrency = "kes"// Kenyan ShillingCurrencyKGSCurrency = "kgs"// Kyrgyzstani SomCurrencyKHRCurrency = "khr"// Cambodian RielCurrencyKMFCurrency = "kmf"// Comorian FrancCurrencyKRWCurrency = "krw"// South Korean WonCurrencyKYDCurrency = "kyd"// Cayman Islands DollarCurrencyKZTCurrency = "kzt"// Kazakhstani TengeCurrencyLAKCurrency = "lak"// Lao KipCurrencyLBPCurrency = "lbp"// Lebanese PoundCurrencyLKRCurrency = "lkr"// Sri Lankan RupeeCurrencyLRDCurrency = "lrd"// Liberian DollarCurrencyLSLCurrency = "lsl"// Lesotho LotiCurrencyLTLCurrency = "ltl"// Lithuanian LitasCurrencyLVLCurrency = "lvl"// Latvian LatsCurrencyMADCurrency = "mad"// Moroccan DirhamCurrencyMDLCurrency = "mdl"// Moldovan LeuCurrencyMGACurrency = "mga"// Malagasy AriaryCurrencyMKDCurrency = "mkd"// Macedonian DenarCurrencyMNTCurrency = "mnt"// Mongolian TögrögCurrencyMOPCurrency = "mop"// Macanese PatacaCurrencyMROCurrency = "mro"// Mauritanian OuguiyaCurrencyMURCurrency = "mur"// Mauritian RupeeCurrencyMVRCurrency = "mvr"// Maldivian RufiyaaCurrencyMWKCurrency = "mwk"// Malawian KwachaCurrencyMXNCurrency = "mxn"// Mexican PesoCurrencyMYRCurrency = "myr"// Malaysian RinggitCurrencyMZNCurrency = "mzn"// Mozambican MeticalCurrencyNADCurrency = "nad"// Namibian DollarCurrencyNGNCurrency = "ngn"// Nigerian NairaCurrencyNIOCurrency = "nio"// Nicaraguan CórdobaCurrencyNOKCurrency = "nok"// Norwegian KroneCurrencyNPRCurrency = "npr"// Nepalese RupeeCurrencyNZDCurrency = "nzd"// New Zealand DollarCurrencyPABCurrency = "pab"// Panamanian BalboaCurrencyPENCurrency = "pen"// Peruvian Nuevo SolCurrencyPGKCurrency = "pgk"// Papua New Guinean KinaCurrencyPHPCurrency = "php"// Philippine PesoCurrencyPKRCurrency = "pkr"// Pakistani RupeeCurrencyPLNCurrency = "pln"// Polish ZłotyCurrencyPYGCurrency = "pyg"// Paraguayan GuaraníCurrencyQARCurrency = "qar"// Qatari RiyalCurrencyRONCurrency = "ron"// Romanian LeuCurrencyRSDCurrency = "rsd"// Serbian DinarCurrencyRUBCurrency = "rub"// Russian RubleCurrencyRWFCurrency = "rwf"// Rwandan FrancCurrencySARCurrency = "sar"// Saudi RiyalCurrencySBDCurrency = "sbd"// Solomon Islands DollarCurrencySCRCurrency = "scr"// Seychellois RupeeCurrencySEKCurrency = "sek"// Swedish KronaCurrencySGDCurrency = "sgd"// Singapore DollarCurrencySHPCurrency = "shp"// Saint Helenian PoundCurrencySLLCurrency = "sll"// Sierra Leonean LeoneCurrencySOSCurrency = "sos"// Somali ShillingCurrencySRDCurrency = "srd"// Surinamese DollarCurrencySTDCurrency = "std"// São Tomé and Príncipe DobraCurrencySVCCurrency = "svc"// Salvadoran ColónCurrencySZLCurrency = "szl"// Swazi LilangeniCurrencyTHBCurrency = "thb"// Thai BahtCurrencyTJSCurrency = "tjs"// Tajikistani SomoniCurrencyTOPCurrency = "top"// Tongan PaʻangaCurrencyTRYCurrency = "try"// Turkish LiraCurrencyTTDCurrency = "ttd"// Trinidad and Tobago DollarCurrencyTWDCurrency = "twd"// New Taiwan DollarCurrencyTZSCurrency = "tzs"// Tanzanian ShillingCurrencyUAHCurrency = "uah"// Ukrainian HryvniaCurrencyUGXCurrency = "ugx"// Ugandan ShillingCurrencyUSDCurrency = "usd"// United States DollarCurrencyUYUCurrency = "uyu"// Uruguayan PesoCurrencyUZSCurrency = "uzs"// Uzbekistani SomCurrencyVEFCurrency = "vef"// Venezuelan BolívarCurrencyVNDCurrency = "vnd"// Vietnamese ĐồngCurrencyVUVCurrency = "vuv"// Vanuatu VatuCurrencyWSTCurrency = "wst"// Samoan TalaCurrencyXAFCurrency = "xaf"// Central African Cfa FrancCurrencyXCDCurrency = "xcd"// East Caribbean DollarCurrencyXOFCurrency = "xof"// West African Cfa FrancCurrencyXPFCurrency = "xpf"// Cfp FrancCurrencyYERCurrency = "yer"// Yemeni RialCurrencyZARCurrency = "zar"// South African RandCurrencyZMWCurrency = "zmw"// Zambian Kwacha)
List of values that Currency can take.
typeCustomer¶
type Customer struct {AddressAddress `json:"address"`Balanceint64 `json:"balance"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`DefaultSource *PaymentSource `json:"default_source"`Deletedbool `json:"deleted"`Delinquentbool `json:"delinquent"`Descriptionstring `json:"description"`Discount *Discount `json:"discount"`Emailstring `json:"email"`IDstring `json:"id"`InvoicePrefixstring `json:"invoice_prefix"`InvoiceSettings *CustomerInvoiceSettings `json:"invoice_settings"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Namestring `json:"name"`NextInvoiceSequenceint64 `json:"next_invoice_sequence"`Phonestring `json:"phone"`PreferredLocales []string `json:"preferred_locales"`Shipping *CustomerShippingDetails `json:"shipping"`Sources *SourceList `json:"sources"`Subscriptions *SubscriptionList `json:"subscriptions"`TaxExemptCustomerTaxExempt `json:"tax_exempt"`TaxIDs *TaxIDList `json:"tax_ids"`}Customer is the resource representing a Stripe customer.For more details seehttps://stripe.com/docs/api#customers.
Example (Delete)¶
package mainimport ("log"stripe "github.com/stripe/stripe-go""github.com/stripe/stripe-go/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")}}func (*Customer)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Customer.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeCustomerBalanceTransaction¶
type CustomerBalanceTransaction struct {Amountint64 `json:"amount"`Createdint64 `json:"created"`CreditNote *CreditNote `json:"credit_note"`CurrencyCurrency `json:"currency"`Customer *Customer `json:"customer"`Descriptionstring `json:"description"`EndingBalanceint64 `json:"ending_balance"`IDstring `json:"id"`Invoice *Invoice `json:"invoice"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`TypeCustomerBalanceTransactionType `json:"type"`}CustomerBalanceTransaction is the resource representing a customer balance transaction.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typeCustomerBalanceTransactionList¶
type CustomerBalanceTransactionList struct {ListMetaData []*CustomerBalanceTransaction `json:"data"`}CustomerBalanceTransactionList is a list of customer balance transactions as retrieved from alist endpoint.
typeCustomerBalanceTransactionListParams¶
type CustomerBalanceTransactionListParams struct {ListParams `form:"*"`Customer *string `form:"-"`}CustomerBalanceTransactionListParams is the set of parameters that can be used when listingcustomer balance transactions.For more detail seehttps://stripe.com/docs/api/customers/customer_balance_transactions
typeCustomerBalanceTransactionParams¶
type CustomerBalanceTransactionParams struct {Params `form:"*"`Amount *int64 `form:"amount"`Customer *string `form:"-"`Currency *string `form:"currency"`Description *string `form:"description"`}CustomerBalanceTransactionParams is the set of parameters that can be used when creating orupdating a customer balance transactions.For more details seehttps://stripe.com/docs/api/customers/create_customer_balance_transaction
typeCustomerBalanceTransactionType¶
type CustomerBalanceTransactionTypestring
CustomerBalanceTransactionType is the list of allowed values for the customer's balancetransaction type.
const (CustomerBalanceTransactionTypeAdjustmentCustomerBalanceTransactionType = "adjustment"CustomerBalanceTransactionTypeAppliedToInvoiceCustomerBalanceTransactionType = "applied_to_invoice"CustomerBalanceTransactionTypeCreditNoteCustomerBalanceTransactionType = "credit_note"CustomerBalanceTransactionTypeInitialCustomerBalanceTransactionType = "initial"CustomerBalanceTransactionTypeInvoiceTooLargeCustomerBalanceTransactionType = "invoice_too_large"CustomerBalanceTransactionTypeInvoiceTooSmallCustomerBalanceTransactionType = "invoice_too_small"CustomerBalanceTransactionTypeUnspentReceiverCreditCustomerBalanceTransactionType = "unspent_receiver_credit")
List of values that CustomerBalanceTransactionDuration can take.
typeCustomerInvoiceCustomField¶
CustomerInvoiceCustomField represents a custom field associated with the customer's invoices.
typeCustomerInvoiceCustomFieldParams¶
type CustomerInvoiceCustomFieldParams struct {Name *string `form:"name"`Value *string `form:"value"`}CustomerInvoiceCustomFieldParams represents the parameters associated with one custom field onthe customer's invoices.
typeCustomerInvoiceSettings¶
type CustomerInvoiceSettings struct {CustomFields []*CustomerInvoiceCustomField `json:"custom_fields"`DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`Footerstring `json:"footer"`}CustomerInvoiceSettings is the structure containing the default settings for invoices associatedwith this customer.
typeCustomerInvoiceSettingsParams¶
type CustomerInvoiceSettingsParams struct {CustomFields []*CustomerInvoiceCustomFieldParams `form:"custom_fields"`DefaultPaymentMethod *string `form:"default_payment_method"`Footer *string `form:"footer"`}CustomerInvoiceSettingsParams is the structure containing the default settings for invoicesassociated with this customer.
typeCustomerList¶
CustomerList is a list of customers as retrieved from a list endpoint.
typeCustomerListParams¶
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 seehttps://stripe.com/docs/api#list_customers.
typeCustomerParams¶
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"`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?// The parameters below are considered deprecated. Consider creating a Subscription separately instead.Plan *string `form:"plan"`Quantity *int64 `form:"quantity"`TaxPercent *float64 `form:"tax_percent"`TrialEnd *int64 `form:"trial_end"`}CustomerParams is the set of parameters that can be used when creating or updating a customer.For more details seehttps://stripe.com/docs/api#create_customer andhttps://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.
typeCustomerShippingDetails¶
type CustomerShippingDetails struct {AddressAddress `json:"address"`Namestring `json:"name"`Phonestring `json:"phone"`}CustomerShippingDetails is the structure containing shipping information.
typeCustomerShippingDetailsParams¶
type CustomerShippingDetailsParams struct {Address *AddressParams `form:"address"`Name *string `form:"name"`Phone *string `form:"phone"`}CustomerShippingDetailsParams is the structure containing shipping information.
typeCustomerSourceParams¶
type CustomerSourceParams struct {Params `form:"*"`Customer *string `form:"-"`// Goes in the URLSource *SourceParams `form:"*"`// SourceParams has custom encoding so brought to top level with "*"}CustomerSourceParams are used to manipulate a given StripeCustomer object's payment sources.For more details seehttps://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.
typeCustomerTaxExempt¶
type CustomerTaxExemptstring
CustomerTaxExempt is the type of tax exemption associated with a customer.
const (CustomerTaxExemptExemptCustomerTaxExempt = "exempt"CustomerTaxExemptNoneCustomerTaxExempt = "none"CustomerTaxExemptReverseCustomerTaxExempt = "reverse")
List of values that CustomerTaxExempt can take.
typeCustomerTaxIDDataParams¶
CustomerTaxIDDataParams lets you pass the tax id details associated with a Customer.
typeDeauthorize¶
type Deauthorize struct {StripeUserIDstring `json:"stripe_user_id"`}Deauthorize is the value of the return from deauthorizing.https://stripe.com/docs/connect/oauth-reference#post-deauthorize
typeDeauthorizeParams¶
type DeauthorizeParams struct {Params `form:"*"`ClientID *string `form:"client_id"`StripeUserID *string `form:"stripe_user_id"`}DeauthorizeParams for deauthorizing an account.
typeDeclineCode¶
type DeclineCodestring
DeclineCode is the list of reasons provided by card issuers for decline of payment.
const (DeclineCodeAuthenticationRequiredDeclineCode = "authentication_required"DeclineCodeApproveWithIDDeclineCode = "approve_with_id"DeclineCodeCallIssuerDeclineCode = "call_issuer"DeclineCodeCardNotSupportedDeclineCode = "card_not_supported"DeclineCodeCardVelocityExceededDeclineCode = "card_velocity_exceeded"DeclineCodeCurrencyNotSupportedDeclineCode = "currency_not_supported"DeclineCodeDoNotHonorDeclineCode = "do_not_honor"DeclineCodeDoNotTryAgainDeclineCode = "do_not_try_again"DeclineCodeDuplicateTransactionDeclineCode = "duplicate_transaction"DeclineCodeExpiredCardDeclineCode = "expired_card"DeclineCodeFraudulentDeclineCode = "fraudulent"DeclineCodeGenericDeclineDeclineCode = "generic_decline"DeclineCodeIncorrectNumberDeclineCode = "incorrect_number"DeclineCodeIncorrectCVCDeclineCode = "incorrect_cvc"DeclineCodeIncorrectPINDeclineCode = "incorrect_pin"DeclineCodeIncorrectZipDeclineCode = "incorrect_zip"DeclineCodeInsufficientFundsDeclineCode = "insufficient_funds"DeclineCodeInvalidAccountDeclineCode = "invalid_account"DeclineCodeInvalidAmountDeclineCode = "invalid_amount"DeclineCodeInvalidCVCDeclineCode = "invalid_cvc"DeclineCodeInvalidExpiryYearDeclineCode = "invalid_expiry_year"DeclineCodeInvalidNumberDeclineCode = "invalid_number"DeclineCodeInvalidPINDeclineCode = "invalid_pin"DeclineCodeIssuerNotAvailableDeclineCode = "issuer_not_available"DeclineCodeLostCardDeclineCode = "lost_card"DeclineCodeMerchantBlacklistDeclineCode = "merchant_blacklist"DeclineCodeNewAccountInformationAvailableDeclineCode = "new_account_information_available"DeclineCodeNoActionTakenDeclineCode = "no_action_taken"DeclineCodeNotPermittedDeclineCode = "not_permitted"DeclineCodePickupCardDeclineCode = "pickup_card"DeclineCodePINTryExceededDeclineCode = "pin_try_exceeded"DeclineCodeProcessingErrorDeclineCode = "processing_error"DeclineCodeReenterTransactionDeclineCode = "reenter_transaction"DeclineCodeRestrictedCardDeclineCode = "restricted_card"DeclineCodeRevocationOfAllAuthorizationsDeclineCode = "revocation_of_all_authorizations"DeclineCodeRevocationOfAuthorizationDeclineCode = "revocation_of_authorization"DeclineCodeSecurityViolationDeclineCode = "security_violation"DeclineCodeServiceNotAllowedDeclineCode = "service_not_allowed"DeclineCodeStolenCardDeclineCode = "stolen_card"DeclineCodeStopPaymentOrderDeclineCode = "stop_payment_order"DeclineCodeTestModeDeclineDeclineCode = "testmode_decline"DeclineCodeTransactionNotAllowedDeclineCode = "transaction_not_allowed"DeclineCodeTryAgainLaterDeclineCode = "try_again_later"DeclineCodeWithdrawalCountLimitExceededDeclineCode = "withdrawal_count_limit_exceeded")
List of DeclineCode values.
typeDeliveryEstimate¶
type DeliveryEstimate struct {// If Type == ExactDatestring `json:"date"`// If Type == RangeEarlieststring `json:"earliest"`Lateststring `json:"latest"`TypeOrderDeliveryEstimateType `json:"type"`}DeliveryEstimate represent the properties available for a shipping method'sestimated delivery.
typeDestinationParams¶
DestinationParams describes the parameters available for the destination hash when creating a charge.
typeDiscount¶
type Discount struct {Coupon *Coupon `json:"coupon"`Customerstring `json:"customer"`Deletedbool `json:"deleted"`Endint64 `json:"end"`Startint64 `json:"start"`Subscriptionstring `json:"subscription"`}Discount is the resource representing a Stripe discount.For more details seehttps://stripe.com/docs/api#discounts.
typeDiscountParams¶
type DiscountParams struct {Params `form:"*"`}DiscountParams is the set of parameters that can be used when deleting a discount.
typeDispute¶
type Dispute struct {Amountint64 `json:"amount"`BalanceTransactions []*BalanceTransaction `json:"balance_transactions"`Charge *Charge `json:"charge"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Evidence *DisputeEvidence `json:"evidence"`EvidenceDetails *EvidenceDetails `json:"evidence_details"`IDstring `json:"id"`IsChargeRefundablebool `json:"is_charge_refundable"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`PaymentIntent *PaymentIntent `json:"payment_intent"`ReasonDisputeReason `json:"reason"`StatusDisputeStatus `json:"status"`}Dispute is the resource representing a Stripe dispute.For more details seehttps://stripe.com/docs/api#disputes.
func (*Dispute)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Dispute.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeDisputeEvidence¶
type DisputeEvidence struct {AccessActivityLogstring `json:"access_activity_log"`BillingAddressstring `json:"billing_address"`CancellationPolicy *File `json:"cancellation_policy"`CancellationPolicyDisclosurestring `json:"cancellation_policy_disclosure"`CancellationRebuttalstring `json:"cancellation_rebuttal"`CustomerCommunication *File `json:"customer_communication"`CustomerEmailAddressstring `json:"customer_email_address"`CustomerNamestring `json:"customer_name"`CustomerPurchaseIPstring `json:"customer_purchase_ip"`CustomerSignature *File `json:"customer_signature"`DuplicateChargeDocumentation *File `json:"duplicate_charge_documentation"`DuplicateChargeExplanationstring `json:"duplicate_charge_explanation"`DuplicateChargeIDstring `json:"duplicate_charge_id"`ProductDescriptionstring `json:"product_description"`Receipt *File `json:"receipt"`RefundPolicy *File `json:"refund_policy"`RefundPolicyDisclosurestring `json:"refund_policy_disclosure"`RefundRefusalExplanationstring `json:"refund_refusal_explanation"`ServiceDatestring `json:"service_date"`ServiceDocumentation *File `json:"service_documentation"`ShippingAddressstring `json:"shipping_address"`ShippingCarrierstring `json:"shipping_carrier"`ShippingDatestring `json:"shipping_date"`ShippingDocumentation *File `json:"shipping_documentation"`ShippingTrackingNumberstring `json:"shipping_tracking_number"`UncategorizedFile *File `json:"uncategorized_file"`UncategorizedTextstring `json:"uncategorized_text"`}DisputeEvidence is the structure that contains various details aboutthe 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.
typeDisputeEvidenceParams¶
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 submittingevidence for disputes.
typeDisputeList¶
DisputeList is a list of disputes as retrieved from a list endpoint.
typeDisputeListParams¶
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 seehttps://stripe.com/docs/api#list_disputes.
typeDisputeParams¶
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 seehttps://stripe.com/docs/api#update_dispute.
typeDisputeReason¶
type DisputeReasonstring
DisputeReason is the list of allowed values for a discount's reason.
const (DisputeReasonCreditNotProcessedDisputeReason = "credit_not_processed"DisputeReasonDuplicateDisputeReason = "duplicate"DisputeReasonFraudulentDisputeReason = "fraudulent"DisputeReasonGeneralDisputeReason = "general"DisputeReasonProductNotReceivedDisputeReason = "product_not_received"DisputeReasonProductUnacceptableDisputeReason = "product_unacceptable"DisputeReasonSubscriptionCanceledDisputeReason = "subscription_canceled"DisputeReasonUnrecognizedDisputeReason = "unrecognized")
List of values that DisputeReason can take.
typeDisputeStatus¶
type DisputeStatusstring
DisputeStatus is the list of allowed values for a discount's status.
const (DisputeStatusChargeRefundedDisputeStatus = "charge_refunded"DisputeStatusLostDisputeStatus = "lost"DisputeStatusNeedsResponseDisputeStatus = "needs_response"DisputeStatusUnderReviewDisputeStatus = "under_review"DisputeStatusWarningClosedDisputeStatus = "warning_closed"DisputeStatusWarningNeedsResponseDisputeStatus = "warning_needs_response"DisputeStatusWarningUnderReviewDisputeStatus = "warning_under_review"DisputeStatusWonDisputeStatus = "won")
List of values that DisputeStatus can take.
typeEphemeralKey¶
type EphemeralKey struct {AssociatedObjects []struct {IDstring `json:"id"`Typestring `json:"type"`} `json:"associated_objects"`Createdint64 `json:"created"`Expiresint64 `json:"expires"`IDstring `json:"id"`Livemodebool `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 SDKsto 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 theraw JSON on the object so it may be passed back to the frontend.
typeEphemeralKeyParams¶
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 creatingan ephemeral key.
typeError¶
type Error struct {ChargeIDstring `json:"charge,omitempty"`CodeErrorCode `json:"code,omitempty"`DeclineCodeDeclineCode `json:"decline_code,omitempty"`DocURLstring `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.Errerror `json:"-"`HTTPStatusCodeint `json:"status,omitempty"`Msgstring `json:"message"`Paramstring `json:"param,omitempty"`PaymentIntent *PaymentIntent `json:"payment_intent,omitempty"`PaymentMethod *PaymentMethod `json:"payment_method,omitempty"`RequestIDstring `json:"request_id,omitempty"`SetupIntent *SetupIntent `json:"setup_intent,omitempty"`Source *PaymentSource `json:"source,omitempty"`TypeErrorType `json:"type"`// OAuth specific Error properties. Named OAuthError because of name conflict.OAuthErrorstring `json:"error,omitempty"`OAuthErrorDescriptionstring `json:"error_description,omitempty"`}Error is the response returned when a call is unsuccessful.For more details seehttps://stripe.com/docs/api#errors.
typeErrorCode¶
type ErrorCodestring
ErrorCode is the list of allowed values for the error's code.
const (ErrorCodeAccountAlreadyExistsErrorCode = "account_already_exists"ErrorCodeAccountCountryInvalidAddressErrorCode = "account_country_invalid_address"ErrorCodeAccountInvalidErrorCode = "account_invalid"ErrorCodeAccountNumberInvalidErrorCode = "account_number_invalid"ErrorCodeAlipayUpgradeRequiredErrorCode = "alipay_upgrade_required"ErrorCodeAmountTooLargeErrorCode = "amount_too_large"ErrorCodeAmountTooSmallErrorCode = "amount_too_small"ErrorCodeAPIKeyExpiredErrorCode = "api_key_expired"ErrorCodeAuthenticationRequiredErrorCode = "authentication_required"ErrorCodeBalanceInsufficientErrorCode = "balance_insufficient"ErrorCodeBankAccountExistsErrorCode = "bank_account_exists"ErrorCodeBankAccountUnusableErrorCode = "bank_account_unusable"ErrorCodeBankAccountUnverifiedErrorCode = "bank_account_unverified"ErrorCodeBitcoinUpgradeRequiredErrorCode = "bitcoin_upgrade_required"ErrorCodeCardDeclinedErrorCode = "card_declined"ErrorCodeChargeAlreadyCapturedErrorCode = "charge_already_captured"ErrorCodeChargeAlreadyRefundedErrorCode = "charge_already_refunded"ErrorCodeChargeDisputedErrorCode = "charge_disputed"ErrorCodeChargeExceedsSourceLimitErrorCode = "charge_exceeds_source_limit"ErrorCodeChargeExpiredForCaptureErrorCode = "charge_expired_for_capture"ErrorCodeCountryUnsupportedErrorCode = "country_unsupported"ErrorCodeCouponExpiredErrorCode = "coupon_expired"ErrorCodeCustomerMaxSubscriptionsErrorCode = "customer_max_subscriptions"ErrorCodeEmailInvalidErrorCode = "email_invalid"ErrorCodeExpiredCardErrorCode = "expired_card"ErrorCodeIdempotencyKeyInUseErrorCode = "idempotency_key_in_use"ErrorCodeIncorrectAddressErrorCode = "incorrect_address"ErrorCodeIncorrectCVCErrorCode = "incorrect_cvc"ErrorCodeIncorrectNumberErrorCode = "incorrect_number"ErrorCodeIncorrectZipErrorCode = "incorrect_zip"ErrorCodeInstantPayoutsUnsupportedErrorCode = "instant_payouts_unsupported"ErrorCodeInvalidCardTypeErrorCode = "invalid_card_type"ErrorCodeInvalidChargeAmountErrorCode = "invalid_charge_amount"ErrorCodeInvalidCVCErrorCode = "invalid_cvc"ErrorCodeInvalidExpiryMonthErrorCode = "invalid_expiry_month"ErrorCodeInvalidExpiryYearErrorCode = "invalid_expiry_year"ErrorCodeInvalidNumberErrorCode = "invalid_number"ErrorCodeInvalidSourceUsageErrorCode = "invalid_source_usage"ErrorCodeInvoiceNoCustomerLineItemsErrorCode = "invoice_no_customer_line_items"ErrorCodeInvoiceNoSubscriptionLineItemsErrorCode = "invoice_no_subscription_line_items"ErrorCodeInvoiceNotEditableErrorCode = "invoice_not_editable"ErrorCodeInvoiceUpcomingNoneErrorCode = "invoice_upcoming_none"ErrorCodeLivemodeMismatchErrorCode = "livemode_mismatch"ErrorCodeLockTimeoutErrorCode = "lock_timeout"ErrorCodeMissingErrorCode = "missing"ErrorCodeNotAllowedOnStandardAccountErrorCode = "not_allowed_on_standard_account"ErrorCodeOrderCreationFailedErrorCode = "order_creation_failed"ErrorCodeOrderRequiredSettingsErrorCode = "order_required_settings"ErrorCodeOrderStatusInvalidErrorCode = "order_status_invalid"ErrorCodeOrderUpstreamTimeoutErrorCode = "order_upstream_timeout"ErrorCodeOutOfInventoryErrorCode = "out_of_inventory"ErrorCodeParameterInvalidEmptyErrorCode = "parameter_invalid_empty"ErrorCodeParameterInvalidIntegerErrorCode = "parameter_invalid_integer"ErrorCodeParameterInvalidStringBlankErrorCode = "parameter_invalid_string_blank"ErrorCodeParameterInvalidStringEmptyErrorCode = "parameter_invalid_string_empty"ErrorCodeParameterMissingErrorCode = "parameter_missing"ErrorCodeParameterUnknownErrorCode = "parameter_unknown"ErrorCodeParametersExclusiveErrorCode = "parameters_exclusive"ErrorCodePaymentIntentAuthenticationFailureErrorCode = "payment_intent_authentication_failure"ErrorCodePaymentIntentIncompatiblePaymentMethodErrorCode = "payment_intent_incompatible_payment_method"ErrorCodePaymentIntentInvalidParameterErrorCode = "payment_intent_invalid_parameter"ErrorCodePaymentIntentPaymentAttemptFailedErrorCode = "payment_intent_payment_attempt_failed"ErrorCodePaymentIntentUnexpectedStateErrorCode = "payment_intent_unexpected_state"ErrorCodePaymentMethodUnactivatedErrorCode = "payment_method_unactivated"ErrorCodePaymentMethodUnexpectedStateErrorCode = "payment_method_unexpected_state"ErrorCodePayoutsNotAllowedErrorCode = "payouts_not_allowed"ErrorCodePlatformAPIKeyExpiredErrorCode = "platform_api_key_expired"ErrorCodePostalCodeInvalidErrorCode = "postal_code_invalid"ErrorCodeProcessingErrorErrorCode = "processing_error"ErrorCodeProductInactiveErrorCode = "product_inactive"ErrorCodeRateLimitErrorCode = "rate_limit"ErrorCodeResourceAlreadyExistsErrorCode = "resource_already_exists"ErrorCodeResourceMissingErrorCode = "resource_missing"ErrorCodeRoutingNumberInvalidErrorCode = "routing_number_invalid"ErrorCodeSecretKeyRequiredErrorCode = "secret_key_required"ErrorCodeSepaUnsupportedAccountErrorCode = "sepa_unsupported_account"ErrorCodeSetupAttemptFailedErrorCode = "setup_attempt_failed"ErrorCodeSetupIntentAuthenticationFailureErrorCode = "setup_intent_authentication_failure"ErrorCodeSetupIntentUnexpectedStateErrorCode = "setup_intent_unexpected_state"ErrorCodeShippingCalculationFailedErrorCode = "shipping_calculation_failed"ErrorCodeSkuInactiveErrorCode = "sku_inactive"ErrorCodeStateUnsupportedErrorCode = "state_unsupported"ErrorCodeTaxIDInvalidErrorCode = "tax_id_invalid"ErrorCodeTaxesCalculationFailedErrorCode = "taxes_calculation_failed"ErrorCodeTestmodeChargesOnlyErrorCode = "testmode_charges_only"ErrorCodeTLSVersionUnsupportedErrorCode = "tls_version_unsupported"ErrorCodeTokenAlreadyUsedErrorCode = "token_already_used"ErrorCodeTokenInUseErrorCode = "token_in_use"ErrorCodeTransfersNotAllowedErrorCode = "transfers_not_allowed"ErrorCodeUpstreamOrderCreationFailedErrorCode = "upstream_order_creation_failed"ErrorCodeURLInvalidErrorCode = "url_invalid"// The following error code can be returned though is undocumentedErrorCodeInvalidSwipeDataErrorCode = "invalid_swipe_data")
List of values that ErrorCode can take.
typeErrorType¶
type ErrorTypestring
ErrorType is the list of allowed values for the error's type.
const (ErrorTypeAPIErrorType = "api_error"ErrorTypeAPIConnectionErrorType = "api_connection_error"ErrorTypeAuthenticationErrorType = "authentication_error"ErrorTypeCardErrorType = "card_error"ErrorTypeInvalidRequestErrorType = "invalid_request_error"ErrorTypePermissionErrorType = "more_permissions_required"ErrorTypeRateLimitErrorType = "rate_limit_error")
List of values that ErrorType can take.
typeEvent¶
type Event struct {Accountstring `json:"account"`Createdint64 `json:"created"`Data *EventData `json:"data"`IDstring `json:"id"`Livemodebool `json:"livemode"`PendingWebhooksint64 `json:"pending_webhooks"`Request *EventRequest `json:"request"`Typestring `json:"type"`}Event is the resource representing a Stripe event.For more details seehttps://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.
typeEventData¶
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"`Rawjson.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.
typeEventListParams¶
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 seehttps://stripe.com/docs/api#list_events.
typeEventParams¶
type EventParams struct {Params `form:"*"`}EventParams is the set of parameters that can be used when retrieving events.For more details seehttps://stripe.com/docs/api#retrieve_events.
typeEventRequest¶
type EventRequest struct {// ID is the request ID of the request that created an event, if the event// was created by a request.IDstring `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.IdempotencyKeystring `json:"idempotency_key"`}EventRequest contains information on a request that created an event.
typeEvidenceDetails¶
type EvidenceDetails struct {DueByint64 `json:"due_by"`HasEvidencebool `json:"has_evidence"`PastDuebool `json:"past_due"`SubmissionCountint64 `json:"submission_count"`}EvidenceDetails is the structure representing more details aboutthe dispute.
typeExchangeRate¶
ExchangeRate is the resource representing the currency exchange rates ata given time.
typeExchangeRateList¶
type ExchangeRateList struct {ListMetaData []*ExchangeRate `json:"data"`}ExchangeRateList is a list of exchange rates as retrieved from a list endpoint.
typeExchangeRateListParams¶
type ExchangeRateListParams struct {ListParams `form:"*"`}ExchangeRateListParams are the parameters allowed during ExchangeRate listing.
typeExchangeRateParams¶
type ExchangeRateParams struct {Params `form:"*"`}ExchangeRateParams is the set of parameters that can be used when retrievingexchange rates.
typeExternalAccount¶
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 *CardIDstring `json:"id"`TypeExternalAccountType `json:"object"`}ExternalAccount is an external account (a bank account or card) that'sattached to an account. It contains fields that will be conditionallypopulated depending on its type.
func (*ExternalAccount)UnmarshalJSON¶
func (ea *ExternalAccount) UnmarshalJSON(data []byte)error
UnmarshalJSON implements Unmarshaler.UnmarshalJSON.
typeExternalAccountList¶
type ExternalAccountList struct {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 bankaccounts or cards.
typeExternalAccountType¶
type ExternalAccountTypestring
ExternalAccountType is the type of an external account.
const (ExternalAccountTypeBankAccountExternalAccountType = "bank_account"ExternalAccountTypeCardExternalAccountType = "card")
List of values that ExternalAccountType can take.
typeExtraValues¶
ExtraValues are extra parameters that are attached to an API request.They're implemented as a custom type so that they can have their ownAppendTo implementation.
typeFeeRefund¶
type FeeRefund struct {Amountint64 `json:"amount"`BalanceTransaction *BalanceTransaction `json:"balance_transaction"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Fee *ApplicationFee `json:"fee"`IDstring `json:"id"`Metadata map[string]string `json:"metadata"`}FeeRefund is the resource representing a Stripe application fee refund.For more details seehttps://stripe.com/docs/api#fee_refunds.
func (*FeeRefund)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a FeeRefund.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeFeeRefundList¶
FeeRefundList is a list object for application fee refunds.
typeFeeRefundListParams¶
type FeeRefundListParams struct {ListParams `form:"*"`ApplicationFee *string `form:"-"`// Included in the URL}FeeRefundListParams is the set of parameters that can be used when listing application fee refunds.For more details seehttps://stripe.com/docs/api#list_fee_refunds.
typeFeeRefundParams¶
type FeeRefundParams struct {Params `form:"*"`Amount *int64 `form:"amount"`ApplicationFee *string `form:"-"`// Included in the URL}FeeRefundParams is the set of parameters that can be used when refunding an application fee.For more details seehttps://stripe.com/docs/api#fee_refund.
typeFile¶
type File struct {Createdint64 `json:"created"`IDstring `json:"id"`Filenamestring `json:"filename"`Links *FileLinkList `json:"links"`PurposeFilePurpose `json:"purpose"`Sizeint64 `json:"size"`Typestring `json:"type"`URLstring `json:"url"`}File is the resource representing a Stripe file.For more details seehttps://stripe.com/docs/api#file_object.
func (*File)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a File.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeFileFileLinkDataParams¶
type FileFileLinkDataParams struct {Params `form:"*"`Create *bool `form:"create"`ExpiresAt *int64 `form:"expires_at"`}FileFileLinkDataParams is the set of parameters allowed for thefile_link_data hash.
typeFileLink¶
type FileLink struct {Createdint64 `json:"created"`Expiredbool `json:"expired"`ExpiresAtint64 `json:"expires_at"`File *File `json:"file"`IDstring `json:"id"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`URLstring `json:"url"`}FileLink is the resource representing a Stripe file link.For more details seehttps://stripe.com/docs/api#file_links.
func (*FileLink)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a file link.This custom unmarshaling is needed because the resultingproperty may be an ID or the full struct if it was expanded.
typeFileLinkList¶
FileLinkList is a list of file links as retrieved from a list endpoint.
typeFileLinkListParams¶
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.
typeFileLinkParams¶
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.
typeFileListParams¶
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 listingfiles. For more details seehttps://stripe.com/docs/api#list_files.
typeFileParams¶
type FileParams struct {Params `form:"*"`// FileReader is a reader with the contents of the file that should be uploaded.FileReaderio.Reader// Filename is just the name of the file without path information.Filename *stringPurpose *stringFileLinkData *FileFileLinkDataParams}FileParams is the set of parameters that can be used when creating a file.For more details seehttps://stripe.com/docs/api#create_file.
typeFilePurpose¶
type FilePurposestring
FilePurpose is the purpose of a particular file.
const (FilePurposeAdditionalVerificationFilePurpose = "additional_verification"FilePurposeBusinessIconFilePurpose = "business_icon"FilePurposeBusinessLogoFilePurpose = "business_logo"FilePurposeCustomerSignatureFilePurpose = "customer_signature"FilePurposeDisputeEvidenceFilePurpose = "dispute_evidence"FilePurposeFinanceReportRunFilePurpose = "finance_report_run"FilePurposeFoundersStockDocumentFilePurpose = "founders_stock_document"FilePurposeIdentityDocumentFilePurpose = "identity_document"FilePurposePCIDocumentFilePurpose = "pci_document"FilePurposeSigmaScheduledQueryFilePurpose = "sigma_scheduled_query"FilePurposeTaxDocumentUserUploadFilePurpose = "tax_document_user_upload")
List of values that FilePurpose can take.
typeFilters¶
type Filters struct {// contains filtered or unexported fields}Filters is a structure that contains a collection of filters for list-related APIs.
typeFraudDetails¶
type FraudDetails struct {UserReportChargeFraudUserReport `json:"user_report"`StripeReportChargeFraudStripeReport `json:"stripe_report"`}FraudDetails is the structure detailing fraud status.
typeFraudDetailsParams¶
type FraudDetailsParams struct {UserReport *string `form:"user_report"`}FraudDetailsParams provides information on the fraud details for a charge.
typeIdentityVerificationStatus¶
type IdentityVerificationStatusstring
IdentityVerificationStatus describes the different statuses for identity verification.
const (IdentityVerificationStatusPendingIdentityVerificationStatus = "pending"IdentityVerificationStatusUnverifiedIdentityVerificationStatus = "unverified"IdentityVerificationStatusVerifiedIdentityVerificationStatus = "verified")
List of values that IdentityVerificationStatus can take.
typeInvalidRequestError¶
type InvalidRequestError struct {// contains filtered or unexported fields}InvalidRequestError is an error that occurs when a request contains invalidparameters.
func (*InvalidRequestError)Error¶
func (e *InvalidRequestError) Error()string
Error serializes the error object to JSON and returns it as a string.
typeInventory¶
type Inventory struct {Quantityint64 `json:"quantity"`TypeSKUInventoryType `json:"type"`ValueSKUInventoryValue `json:"value"`}Inventory represents the inventory options of a SKU.
typeInventoryParams¶
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.
typeInvoice¶
type Invoice struct {AccountCountrystring `json:"account_country"`AccountNamestring `json:"account_name"`AmountDueint64 `json:"amount_due"`AmountPaidint64 `json:"amount_paid"`AmountRemainingint64 `json:"amount_remaining"`ApplicationFeeAmountint64 `json:"application_fee_amount"`AttemptCountint64 `json:"attempt_count"`Attemptedbool `json:"attempted"`AutoAdvancebool `json:"auto_advance"`BillingReasonInvoiceBillingReason `json:"billing_reason"`Charge *Charge `json:"charge"`CollectionMethod *InvoiceCollectionMethod `json:"collection_method"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`CustomFields []*InvoiceCustomField `json:"custom_fields"`Customer *Customer `json:"customer"`CustomerAddress *Address `json:"customer_address"`CustomerEmailstring `json:"customer_email"`CustomerName *string `json:"customer_name"`CustomerPhone *string `json:"customer_phone"`CustomerShipping *CustomerShippingDetails `json:"customer_shipping"`CustomerTaxExemptCustomerTaxExempt `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"`Descriptionstring `json:"description"`Discount *Discount `json:"discount"`DueDateint64 `json:"due_date"`EndingBalanceint64 `json:"ending_balance"`Footerstring `json:"footer"`HostedInvoiceURLstring `json:"hosted_invoice_url"`IDstring `json:"id"`InvoicePDFstring `json:"invoice_pdf"`Lines *InvoiceLineList `json:"lines"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`NextPaymentAttemptint64 `json:"next_payment_attempt"`Numberstring `json:"number"`Paidbool `json:"paid"`PaymentIntent *PaymentIntent `json:"payment_intent"`PeriodEndint64 `json:"period_end"`PeriodStartint64 `json:"period_start"`PostPaymentCreditNotesAmountint64 `json:"post_payment_credit_notes_amount"`PrePaymentCreditNotesAmountint64 `json:"pre_payment_credit_notes_amount"`ReceiptNumberstring `json:"receipt_number"`StartingBalanceint64 `json:"starting_balance"`StatementDescriptorstring `json:"statement_descriptor"`StatusInvoiceStatus `json:"status"`StatusTransitionsInvoiceStatusTransitions `json:"status_transitions"`Subscription *Subscription `json:"subscription"`SubscriptionProrationDateint64 `json:"subscription_proration_date"`Subtotalint64 `json:"subtotal"`Taxint64 `json:"tax"`ThreasholdReason *InvoiceThresholdReason `json:"threshold_reason"`Totalint64 `json:"total"`TotalTaxAmounts []*InvoiceTaxAmount `json:"total_tax_amounts"`TransferData *InvoiceTransferData `json:"transfer_data"`WebhooksDeliveredAtint64 `json:"webhooks_delivered_at"`// This field is deprecated and we recommend that you use TaxRates instead.TaxPercentfloat64 `json:"tax_percent"`}Invoice is the resource representing a Stripe invoice.For more details seehttps://stripe.com/docs/api#invoice_object.
Example (Update)¶
package mainimport ("log"stripe "github.com/stripe/stripe-go""github.com/stripe/stripe-go/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)}func (*Invoice)UnmarshalJSON¶
UnmarshalJSON handles deserialization of an Invoice.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeInvoiceBillingReason¶
type InvoiceBillingReasonstring
InvoiceBillingReason is the reason why a given invoice was created
const (InvoiceBillingReasonManualInvoiceBillingReason = "manual"InvoiceBillingReasonSubscriptionInvoiceBillingReason = "subscription"InvoiceBillingReasonSubscriptionCreateInvoiceBillingReason = "subscription_create"InvoiceBillingReasonSubscriptionCycleInvoiceBillingReason = "subscription_cycle"InvoiceBillingReasonSubscriptionThresholdInvoiceBillingReason = "subscription_threshold"InvoiceBillingReasonSubscriptionUpdateInvoiceBillingReason = "subscription_update"InvoiceBillingReasonUpcomingInvoiceBillingReason = "upcoming")
List of values that InvoiceBillingReason can take.
typeInvoiceCollectionMethod¶
type InvoiceCollectionMethodstring
InvoiceCollectionMethod is the type of collection method for this invoice.
const (InvoiceCollectionMethodChargeAutomaticallyInvoiceCollectionMethod = "charge_automatically"InvoiceCollectionMethodSendInvoiceInvoiceCollectionMethod = "send_invoice")
List of values that InvoiceCollectionMethod can take.
typeInvoiceCustomField¶
InvoiceCustomField is a structure representing a custom field on an invoice.
typeInvoiceCustomFieldParams¶
InvoiceCustomFieldParams represents the parameters associated with one custom field on an invoice.
typeInvoiceCustomerTaxID¶
InvoiceCustomerTaxID is a structure representing a customer tax id on an invoice.
typeInvoiceFinalizeParams¶
InvoiceFinalizeParams is the set of parameters that can be used when finalizing invoices.
typeInvoiceItem¶
type InvoiceItem struct {Amountint64 `json:"amount"`CurrencyCurrency `json:"currency"`Customer *Customer `json:"customer"`Dateint64 `json:"date"`Deletedbool `json:"deleted"`Descriptionstring `json:"description"`Discountablebool `json:"discountable"`IDstring `json:"id"`Invoice *Invoice `json:"invoice"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Period *Period `json:"period"`Plan *Plan `json:"plan"`Prorationbool `json:"proration"`Quantityint64 `json:"quantity"`Subscription *Subscription `json:"subscription"`TaxRates []*TaxRate `json:"tax_rates"`UnitAmountint64 `json:"unit_amount"`UnitAmountDecimalfloat64 `json:"unit_amount_decimal,string"`}InvoiceItem is the resource represneting a Stripe invoice item.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typeInvoiceItemList¶
type InvoiceItemList struct {ListMetaData []*InvoiceItem `json:"data"`}InvoiceItemList is a list of invoice items as retrieved from a list endpoint.
typeInvoiceItemListParams¶
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 seehttps://stripe.com/docs/api#list_invoiceitems.
typeInvoiceItemParams¶
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"`Invoice *string `form:"invoice"`Period *InvoiceItemPeriodParams `form:"period"`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 seehttps://stripe.com/docs/api#create_invoiceitem andhttps://stripe.com/docs/api#update_invoiceitem.
typeInvoiceItemPeriodParams¶
InvoiceItemPeriodParams represents the period associated with that invoice item.
typeInvoiceLine¶
type InvoiceLine struct {Amountint64 `json:"amount"`CurrencyCurrency `json:"currency"`Descriptionstring `json:"description"`Discountablebool `json:"discountable"`IDstring `json:"id"`InvoiceItemstring `json:"invoice_item"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Period *Period `json:"period"`Plan *Plan `json:"plan"`Prorationbool `json:"proration"`Quantityint64 `json:"quantity"`Subscriptionstring `json:"subscription"`SubscriptionItemstring `json:"subscription_item"`TaxAmounts []*InvoiceTaxAmount `json:"tax_amounts"`TaxRates []*TaxRate `json:"tax_rates"`TypeInvoiceLineType `json:"type"`UnifiedProrationbool `json:"unified_proration"`}InvoiceLine is the resource representing a Stripe invoice line item.For more details seehttps://stripe.com/docs/api#invoice_line_item_object.
typeInvoiceLineList¶
type InvoiceLineList struct {ListMetaData []*InvoiceLine `json:"data"`}InvoiceLineList is a list object for invoice line items.
typeInvoiceLineListParams¶
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 URLSubscription *string `form:"subscription"`}InvoiceLineListParams is the set of parameters that can be used when listing invoice line items.For more details seehttps://stripe.com/docs/api#invoice_lines.
typeInvoiceLineType¶
type InvoiceLineTypestring
InvoiceLineType is the list of allowed values for the invoice line's type.
const (InvoiceLineTypeInvoiceItemInvoiceLineType = "invoiceitem"InvoiceLineTypeSubscriptionInvoiceLineType = "subscription")
List of values that InvoiceLineType can take.
typeInvoiceList¶
InvoiceList is a list of invoices as retrieved from a list endpoint.
typeInvoiceListParams¶
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 seehttps://stripe.com/docs/api#list_customer_invoices.
typeInvoiceMarkUncollectibleParams¶
type InvoiceMarkUncollectibleParams struct {Params `form:"*"`}InvoiceMarkUncollectibleParams is the set of parameters that can be used when markinginvoices as uncollectible.
typeInvoiceParams¶
type InvoiceParams struct {Params `form:"*"`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"`DueDate *int64 `form:"due_date"`Footer *string `form:"footer"`Paid *bool `form:"paid"`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 AppendToSubscriptionBillingCycleAnchorUnchanged *bool `form:"-"`// See custom AppendToSubscriptionCancelAt *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"`SubscriptionProrate *bool `form:"subscription_prorate"`SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"`SubscriptionProrationDate *int64 `form:"subscription_proration_date"`SubscriptionQuantity *int64 `form:"subscription_quantity"`SubscriptionTrialEnd *int64 `form:"subscription_trial_end"`SubscriptionTrialFromPlan *bool `form:"subscription_trial_from_plan"`// This parameter is deprecated and we recommend that you use DefaultTaxRates instead.TaxPercent *float64 `form:"tax_percent"`// This parameter is deprecated and we recommend that you use SubscriptionDefaultTaxRates instead.SubscriptionTaxPercent *float64 `form:"subscription_tax_percent"`}InvoiceParams is the set of parameters that can be used when creating or updating an invoice.For more details seehttps://stripe.com/docs/api#create_invoice,https://stripe.com/docs/api#update_invoice.
typeInvoicePayParams¶
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 whenpaying invoices. For more details, see:https://stripe.com/docs/api#pay_invoice.
typeInvoiceSendParams¶
type InvoiceSendParams struct {Params `form:"*"`}InvoiceSendParams is the set of parameters that can be used when sending invoices.
typeInvoiceStatus¶
type InvoiceStatusstring
InvoiceStatus is the reason why a given invoice was created
const (InvoiceStatusDraftInvoiceStatus = "draft"InvoiceStatusOpenInvoiceStatus = "open"InvoiceStatusPaidInvoiceStatus = "paid"InvoiceStatusUncollectibleInvoiceStatus = "uncollectible"InvoiceStatusVoidInvoiceStatus = "void")
List of values that InvoiceStatus can take.
typeInvoiceStatusTransitions¶
type InvoiceStatusTransitions struct {FinalizedAtint64 `json:"finalized_at"`MarkedUncollectibleAtint64 `json:"marked_uncollectible_at"`PaidAtint64 `json:"paid_at"`VoidedAtint64 `json:"voided_at"`}InvoiceStatusTransitions are the timestamps at which the invoice status was updated.
typeInvoiceTaxAmount¶
type InvoiceTaxAmount struct {Amountint64 `json:"amount"`Inclusivebool `json:"inclusive"`TaxRate *TaxRate `json:"tax_rate"`}InvoiceTaxAmount is a structure representing one of the tax amounts on an invoice.
typeInvoiceThresholdReason¶
type InvoiceThresholdReason struct {AmountGTEint64 `json:"amount_gte"`ItemReasons []*InvoiceThresholdReasonItemReason `json:"item_reasons"`}InvoiceThresholdReason is a structure representing a reason for a billing threshold.
typeInvoiceThresholdReasonItemReason¶
type InvoiceThresholdReasonItemReason struct {LineItemIDs []string `json:"line_item_ids"`UsageGTEint64 `json:"usage_gte"`}InvoiceThresholdReasonItemReason is a structure representing the line items thattriggered an invoice.
typeInvoiceTransferData¶
type InvoiceTransferData struct {Destination *Account `json:"destination"`}InvoiceTransferData represents the information for the transfer_data associated with an invoice.
typeInvoiceTransferDataParams¶
type InvoiceTransferDataParams struct {Destination *string `form:"destination"`}InvoiceTransferDataParams is the set of parameters allowed for the transfer_data hash.
typeInvoiceUpcomingInvoiceItemParams¶
type InvoiceUpcomingInvoiceItemParams struct {Amount *int64 `form:"amount"`Currency *string `form:"currency"`Description *string `form:"description"`Discountable *bool `form:"discountable"`InvoiceItem *string `form:"invoiceitem"`Period *InvoiceUpcomingInvoiceItemPeriodParams `form:"period"`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 modifyinginvoice items on an upcoming invoice.For more details seehttps://stripe.com/docs/api#upcoming_invoice-invoice_items.
typeInvoiceUpcomingInvoiceItemPeriodParams¶
type InvoiceUpcomingInvoiceItemPeriodParams struct {End *int64 `form:"end"`Start *int64 `form:"start"`}InvoiceUpcomingInvoiceItemPeriodParams represents the period associated with that invoice item
typeInvoiceVoidParams¶
type InvoiceVoidParams struct {Params `form:"*"`}InvoiceVoidParams is the set of parameters that can be used when voiding invoices.
typeIssuingAuthorization¶
type IssuingAuthorization struct {Amountint64 `json:"amount"`Approvedbool `json:"approved"`AuthorizationMethodIssuingAuthorizationAuthorizationMethod `json:"authorization_method"`BalanceTransactions []*BalanceTransaction `json:"balance_transactions"`Card *IssuingCard `json:"card"`Cardholder *IssuingCardholder `json:"cardholder"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`IDstring `json:"id"`Livemodebool `json:"livemode"`MerchantAmountint64 `json:"merchant_amount"`MerchantCurrencyCurrency `json:"merchant_currency"`MerchantData *IssuingMerchantData `json:"merchant_data"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`PendingRequest *IssuingAuthorizationPendingRequest `json:"pending_request"`RequestHistory []*IssuingAuthorizationRequestHistory `json:"request_history"`StatusIssuingAuthorizationStatus `json:"status"`Transactions []*IssuingTransaction `json:"transactions"`VerificationData *IssuingAuthorizationVerificationData `json:"verification_data"`WalletIssuingAuthorizationWalletType `json:"wallet"`// This property is deprecated and we recommend that you use Wallet instead.// TODO: remove in the next major versionWalletProviderIssuingAuthorizationWalletProviderType `json:"wallet_provider"`// The following properties are considered deprecated// TODO: remove in the next major versionAuthorizedAmountint64 `json:"authorized_amount"`AuthorizedCurrencyCurrency `json:"authorized_currency"`HeldAmountint64 `json:"held_amount"`HeldCurrencyCurrency `json:"held_currency"`IsHeldAmountControllablebool `json:"is_held_amount_controllable"`PendingAuthorizedAmountint64 `json:"pending_authorized_amount"`PendingHeldAmountint64 `json:"pending_held_amount"`}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 resultingproperty may be an id or the full struct if it was expanded.
typeIssuingAuthorizationAuthorizationControls¶
type IssuingAuthorizationAuthorizationControls struct {AllowedCategories []string `json:"allowed_categories"`BlockedCategories []string `json:"blocked_categories"`CurrencyCurrency `json:"currency"`MaxAmountint64 `json:"max_amount"`MaxApprovalsint64 `json:"max_approvals"`}IssuingAuthorizationAuthorizationControls is the resource representing authorization controls on an issuing authorization.This is deprecated and will be removed in the next major version
typeIssuingAuthorizationAuthorizationMethod¶
type IssuingAuthorizationAuthorizationMethodstring
IssuingAuthorizationAuthorizationMethod is the list of possible values for the authorization methodon an issuing authorization.
const (IssuingAuthorizationAuthorizationMethodChipIssuingAuthorizationAuthorizationMethod = "chip"IssuingAuthorizationAuthorizationMethodContactlessIssuingAuthorizationAuthorizationMethod = "contactless"IssuingAuthorizationAuthorizationMethodKeyedInIssuingAuthorizationAuthorizationMethod = "keyed_in"IssuingAuthorizationAuthorizationMethodOnlineIssuingAuthorizationAuthorizationMethod = "online"IssuingAuthorizationAuthorizationMethodSwipeIssuingAuthorizationAuthorizationMethod = "swipe")
List of values that IssuingAuthorizationAuthorizationMethod can take.
typeIssuingAuthorizationControlsSpendingLimits¶
type IssuingAuthorizationControlsSpendingLimits struct {Amountint64 `json:"amount"`Categories []string `json:"categories"`IntervalIssuingSpendingLimitInterval `json:"interval"`}IssuingAuthorizationControlsSpendingLimits is the resource representing spending limitsassociated with a card or cardholder.
typeIssuingAuthorizationControlsSpendingLimitsParams¶
type IssuingAuthorizationControlsSpendingLimitsParams struct {Amount *int64 `form:"amount"`Categories []*string `form:"categories"`Interval *string `form:"interval"`}IssuingAuthorizationControlsSpendingLimitsParams is the set of parameters that can be used forthe spending limits associated with a given issuing card or cardholder.This is deprecated and will be removed in the next major version.
typeIssuingAuthorizationList¶
type IssuingAuthorizationList struct {ListMetaData []*IssuingAuthorization `json:"data"`}IssuingAuthorizationList is a list of issuing authorizations as retrieved from a list endpoint.
typeIssuingAuthorizationListParams¶
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.
typeIssuingAuthorizationParams¶
type IssuingAuthorizationParams struct {Params `form:"*"`Amount *int64 `form:"amount"`// The following parameter is deprecated, use Amount instead.// TODO: remove in a future major versionHeldAmount *int64 `form:"held_amount"`}IssuingAuthorizationParams is the set of parameters that can be used when updating an issuing authorization.
typeIssuingAuthorizationPendingRequest¶
type IssuingAuthorizationPendingRequest struct {Amountint64 `json:"amount"`CurrencyCurrency `json:"currency"`IsAmountControllablebool `json:"is_amount_controllable"`MerchantAmountint64 `json:"merchant_amount"`MerchantCurrencyCurrency `json:"merchant_currency"`}IssuingAuthorizationPendingRequest is the resource representing details about the pending authorization request.
typeIssuingAuthorizationRequestHistory¶
type IssuingAuthorizationRequestHistory struct {Amountint64 `json:"amount"`Approvedbool `json:"approved"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`MerchantAmountint64 `json:"merchant_amount"`MerchantCurrencyCurrency `json:"merchant_currency"`ReasonIssuingAuthorizationRequestHistoryReason `json:"reason"`// The following properties are deprecated// TODO: remove in the next major versionAuthorizedAmountint64 `json:"authorized_amount"`AuthorizedCurrencyCurrency `json:"authorized_currency"`HeldAmountint64 `json:"held_amount"`HeldCurrencyCurrency `json:"held_currency"`ViolatedAuthorizationControls []*IssuingAuthorizationRequestHistoryViolatedAuthorizationControl `json:"violated_authorization_controls"`}IssuingAuthorizationRequestHistory is the resource representing a request history on an issuing authorization.
typeIssuingAuthorizationRequestHistoryReason¶
type IssuingAuthorizationRequestHistoryReasonstring
IssuingAuthorizationRequestHistoryReason is the list of possible values for the request historyreason on an issuing authorization.
const (IssuingAuthorizationRequestHistoryReasonAccountComplianceDisabledIssuingAuthorizationRequestHistoryReason = "account_compliance_disabled"IssuingAuthorizationRequestHistoryReasonAccountInactiveIssuingAuthorizationRequestHistoryReason = "account_inactive"IssuingAuthorizationRequestHistoryReasonCardActiveIssuingAuthorizationRequestHistoryReason = "card_active"IssuingAuthorizationRequestHistoryReasonCardInactiveIssuingAuthorizationRequestHistoryReason = "card_inactive"IssuingAuthorizationRequestHistoryReasonCardholderInactiveIssuingAuthorizationRequestHistoryReason = "cardholder_inactive"IssuingAuthorizationRequestHistoryReasonCardholderVerificationRequiredIssuingAuthorizationRequestHistoryReason = "cardholder_verification_required"IssuingAuthorizationRequestHistoryReasonInsufficientFundsIssuingAuthorizationRequestHistoryReason = "insufficient_funds"IssuingAuthorizationRequestHistoryReasonNotAllowedIssuingAuthorizationRequestHistoryReason = "not_allowed"IssuingAuthorizationRequestHistoryReasonSpendingControlsIssuingAuthorizationRequestHistoryReason = "spending_controls"IssuingAuthorizationRequestHistoryReasonSuspectedFraudIssuingAuthorizationRequestHistoryReason = "suspected_fraud"IssuingAuthorizationRequestHistoryReasonVerificationFailedIssuingAuthorizationRequestHistoryReason = "verification_failed"IssuingAuthorizationRequestHistoryReasonWebhookApprovedIssuingAuthorizationRequestHistoryReason = "webhook_approved"IssuingAuthorizationRequestHistoryReasonWebhookDeclinedIssuingAuthorizationRequestHistoryReason = "webhook_declined"IssuingAuthorizationRequestHistoryReasonWebhookTimeoutIssuingAuthorizationRequestHistoryReason = "webhook_timeout"// The following value is deprecated. Use IssuingAuthorizationRequestHistoryReasonSpendingControls instead.IssuingAuthorizationRequestHistoryReasonAuthorizationControlsIssuingAuthorizationRequestHistoryReason = "authorization_controls"// The following values are deprecated. Use IssuingAuthorizationRequestHistoryReasonVerificationFailed insteadIssuingAuthorizationRequestHistoryReasonAuthenticationFailedIssuingAuthorizationRequestHistoryReason = "authentication_failed"IssuingAuthorizationRequestHistoryReasonIncorrectCVCIssuingAuthorizationRequestHistoryReason = "incorrect_cvc"IssuingAuthorizationRequestHistoryReasonIncorrectExpiryIssuingAuthorizationRequestHistoryReason = "incorrect_expiry")
List of values that IssuingAuthorizationRequestHistoryReason can take.
typeIssuingAuthorizationRequestHistoryViolatedAuthorizationControl¶
type IssuingAuthorizationRequestHistoryViolatedAuthorizationControl struct {EntityIssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity `json:"entity"`NameIssuingAuthorizationRequestHistoryViolatedAuthorizationControlName `json:"name"`}IssuingAuthorizationRequestHistoryViolatedAuthorizationControl is the resource representing anauthorizaton control that caused the authorization to fail.This is deprecated and will be removed in the next major version
typeIssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity¶
type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntitystring
IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity is the list of possible valuesfor the entity that owns the authorization control.
const (IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntityAccountIssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity = "account"IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntityCardIssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity = "card"IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntityCardholderIssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity = "cardholder")
List of values that IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity can take.
typeIssuingAuthorizationRequestHistoryViolatedAuthorizationControlName¶
type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNamestring
IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName is the list of possible valuesfor the name associated with the authorization control.
const (IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNameAllowedCategoriesIssuingAuthorizationRequestHistoryViolatedAuthorizationControlName = "allowed_categories"IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNameBlockedCategoriesIssuingAuthorizationRequestHistoryViolatedAuthorizationControlName = "blocked_categories"IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNameMaxAmountIssuingAuthorizationRequestHistoryViolatedAuthorizationControlName = "max_amount"IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNameMaxApprovalsIssuingAuthorizationRequestHistoryViolatedAuthorizationControlName = "max_approvals"IssuingAuthorizationRequestHistoryViolatedAuthorizationControlNameSpendingLimitsIssuingAuthorizationRequestHistoryViolatedAuthorizationControlName = "spending_limits")
List of values that IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName can take.
typeIssuingAuthorizationStatus¶
type IssuingAuthorizationStatusstring
IssuingAuthorizationStatus is the possible values for status for an issuing authorization.
const (IssuingAuthorizationStatusClosedIssuingAuthorizationStatus = "closed"IssuingAuthorizationStatusPendingIssuingAuthorizationStatus = "pending"IssuingAuthorizationStatusReversedIssuingAuthorizationStatus = "reversed")
List of values that IssuingAuthorizationStatus can take.
typeIssuingAuthorizationVerificationData¶
type IssuingAuthorizationVerificationData struct {AddressLine1CheckIssuingAuthorizationVerificationDataCheck `json:"address_line1_check"`AddressPostalCodeCheckIssuingAuthorizationVerificationDataCheck `json:"address_postal_code_check"`CVCCheckIssuingAuthorizationVerificationDataCheck `json:"cvc_check"`ExpiryCheckIssuingAuthorizationVerificationDataCheck `json:"expiry_check"`ThreeDSecure *IssuingAuthorizationVerificationDataThreeDSecure `json:"three_d_secure"`// The property is considered deprecated. Use AddressPostalCodeCheck instead.// TODO remove in the next major versionAddressZipCheckIssuingAuthorizationVerificationDataCheck `json:"address_zip_check"`// The property is considered deprecated. Use ThreeDSecure instead.// TODO remove in the next major versionAuthenticationIssuingAuthorizationVerificationDataAuthentication `json:"authentication"`}IssuingAuthorizationVerificationData is the resource representing verification data on an issuing authorization.
typeIssuingAuthorizationVerificationDataAuthentication¶
type IssuingAuthorizationVerificationDataAuthenticationstring
IssuingAuthorizationVerificationDataAuthentication is the list of possible values for the resultof an authentication on an issuing authorization.
const (IssuingAuthorizationVerificationDataAuthenticationExemptIssuingAuthorizationVerificationDataAuthentication = "exempt"IssuingAuthorizationVerificationDataAuthenticationFailureIssuingAuthorizationVerificationDataAuthentication = "failure"IssuingAuthorizationVerificationDataAuthenticationNoneIssuingAuthorizationVerificationDataAuthentication = "none"IssuingAuthorizationVerificationDataAuthenticationSuccessIssuingAuthorizationVerificationDataAuthentication = "success")
List of values that IssuingAuthorizationVerificationDataCheck can take.
typeIssuingAuthorizationVerificationDataCheck¶
type IssuingAuthorizationVerificationDataCheckstring
IssuingAuthorizationVerificationDataCheck is the list of possible values for result of a checkfor verification data on an issuing authorization.
const (IssuingAuthorizationVerificationDataCheckMatchIssuingAuthorizationVerificationDataCheck = "match"IssuingAuthorizationVerificationDataCheckMismatchIssuingAuthorizationVerificationDataCheck = "mismatch"IssuingAuthorizationVerificationDataCheckNotProvidedIssuingAuthorizationVerificationDataCheck = "not_provided")
List of values that IssuingAuthorizationVerificationDataCheck can take.
typeIssuingAuthorizationVerificationDataThreeDSecure¶
type IssuingAuthorizationVerificationDataThreeDSecure struct {ResultIssuingAuthorizationVerificationDataThreeDSecureResult `json:"result"`}IssuingAuthorizationVerificationDataThreeDSecure is the resource representing 3DS results.
typeIssuingAuthorizationVerificationDataThreeDSecureResult¶
type IssuingAuthorizationVerificationDataThreeDSecureResultstring
IssuingAuthorizationVerificationDataThreeDSecureResult is the list of possible values for result of 3DS.
const (IssuingAuthorizationVerificationDataThreeDSecureResultAttemptAcknowledgedIssuingAuthorizationVerificationDataThreeDSecureResult = "attempt_acknowledged"IssuingAuthorizationVerificationDataThreeDSecureResultAuthenticatedIssuingAuthorizationVerificationDataThreeDSecureResult = "authenticated"IssuingAuthorizationVerificationDataThreeDSecureResultFailedIssuingAuthorizationVerificationDataThreeDSecureResult = "failed")
List of values that IssuingAuthorizationVerificationDataThreeDSecureResult can take.
typeIssuingAuthorizationWalletProviderType¶
type IssuingAuthorizationWalletProviderTypestring
IssuingAuthorizationWalletProviderType is the list of possible values for the authorization's wallet provider.TODO remove in the next major version
const (IssuingAuthorizationWalletProviderTypeApplePayIssuingAuthorizationWalletProviderType = "apple_pay"IssuingAuthorizationWalletProviderTypeGooglePayIssuingAuthorizationWalletProviderType = "google_pay"IssuingAuthorizationWalletProviderTypeSamsungPayIssuingAuthorizationWalletProviderType = "samsung_pay")
List of values that IssuingAuthorizationWalletProviderType can take.
typeIssuingAuthorizationWalletType¶
type IssuingAuthorizationWalletTypestring
IssuingAuthorizationWalletType is the list of possible values for the authorization's wallet provider.
const (IssuingAuthorizationWalletTypeApplePayIssuingAuthorizationWalletType = "apple_pay"IssuingAuthorizationWalletTypeGooglePayIssuingAuthorizationWalletType = "google_pay"IssuingAuthorizationWalletTypeSamsungPayIssuingAuthorizationWalletType = "samsung_pay")
List of values that IssuingAuthorizationWalletType can take.
typeIssuingBilling¶
type IssuingBilling struct {Address *Address `json:"address"`// This property is deprecatedNamestring `json:"name"`}IssuingBilling is the resource representing the billing hash with the Issuing APIs.
typeIssuingBillingParams¶
type IssuingBillingParams struct {Address *AddressParams `form:"address"`// This parameter is deprecatedName *string `form:"name"`}IssuingBillingParams is the set of parameters that can be used for billing with the Issuing APIs.
typeIssuingCard¶
type IssuingCard struct {Billing *IssuingBilling `json:"billing"`Brandstring `json:"brand"`CancellationReasonIssuingCardCancellationReason `json:"cancellation_reason"`Cardholder *IssuingCardholder `json:"cardholder"`Createdint64 `json:"created"`ExpMonthint64 `json:"exp_month"`ExpYearint64 `json:"exp_year"`Last4string `json:"last4"`IDstring `json:"id"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`PIN *IssuingCardPIN `json:"pin"`ReplacedBy *IssuingCard `json:"replaced_by"`ReplacementFor *IssuingCard `json:"replacement_for"`ReplacementReasonIssuingCardReplacementReason `json:"replacement_reason"`Shipping *IssuingCardShipping `json:"shipping"`SpendingControls *IssuingCardSpendingControls `json:"spending_controls"`StatusIssuingCardStatus `json:"status"`TypeIssuingCardType `json:"type"`// The following property is deprecated, use SpendingControls instead.AuthorizationControls *IssuingCardAuthorizationControls `json:"authorization_controls"`// The following property is deprecated, use Cardholder.Name instead.Namestring `json:"name"`}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 resultingproperty may be an id or the full struct if it was expanded.
typeIssuingCardAuthorizationControls¶
type IssuingCardAuthorizationControls struct {AllowedCategories []string `json:"allowed_categories"`BlockedCategories []string `json:"blocked_categories"`MaxApprovalsint64 `json:"max_approvals"`SpendingLimits []*IssuingAuthorizationControlsSpendingLimits `json:"spending_limits"`SpendingLimitsCurrencyCurrency `json:"spending_limits_currency"`// The properties below are deprecated and can only be used for an issuing card.// TODO remove in the next major versionCurrencyCurrency `json:"currency"`MaxAmountint64 `json:"max_amount"`}IssuingCardAuthorizationControls is the resource representing authorization controls on an issuing card.TODO: Add the Cardholder version to "un-share" between Card and Cardholder in the next major version.
typeIssuingCardCancellationReason¶
type IssuingCardCancellationReasonstring
IssuingCardCancellationReason is the list of possible values for the cancellation reasonon an issuing card.
const (IssuingCardCancellationReasonLostIssuingCardCancellationReason = "lost"IssuingCardCancellationReasonStolenIssuingCardCancellationReason = "stolen")
List of values that IssuingCardReplacementReason can take.
typeIssuingCardDetails¶
type IssuingCardDetails struct {Card *IssuingCard `json:"card"`CVCstring `json:"cvc"`ExpMonth *string `form:"exp_month"`ExpYear *string `form:"exp_year"`Numberstring `json:"number"`Objectstring `json:"object"`}IssuingCardDetails is the resource representing issuing card details.
typeIssuingCardList¶
type IssuingCardList struct {ListMetaData []*IssuingCard `json:"data"`}IssuingCardList is a list of issuing cards as retrieved from a list endpoint.
typeIssuingCardListParams¶
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"`// The following parameters are deprecatedName *string `form:"name"`Source *string `form:"source"`}IssuingCardListParams is the set of parameters that can be used when listing issuing cards.
typeIssuingCardPIN¶
type IssuingCardPIN struct {StatusIssuingCardPINStatus `json:"status"`}IssuingCardPIN contains data about the Card's PIN.
typeIssuingCardPINStatus¶
type IssuingCardPINStatusstring
IssuingCardPINStatus is the list of possible values for the status field of a Card PIN.
const (IssuingCardPINStatusActiveIssuingCardPINStatus = "active"IssuingCardPINStatusBlockedIssuingCardPINStatus = "blocked")
List of values that IssuingCardPINStatus can take.
typeIssuingCardParams¶
type IssuingCardParams struct {Params `form:"*"`Billing *IssuingBillingParams `form:"billing"`CancellationReason *string `form:"cancellation_reason"`Cardholder *string `form:"cardholder"`Currency *string `form:"currency"`ReplacementFor *string `form:"replacement_for"`ReplacementReason *string `form:"replacement_reason"`SpendingControls *IssuingCardSpendingControlsParams `form:"spending_controls"`Status *string `form:"status"`Shipping *IssuingCardShippingParams `form:"shipping"`Type *string `form:"type"`// The following parameter is deprecated, use SpendingControls instead.AuthorizationControls *AuthorizationControlsParams `form:"authorization_controls"`// The following parameter is deprecatedName *string `form:"name"`}IssuingCardParams is the set of parameters that can be used when creating or updating an issuing card.
typeIssuingCardReplacementReason¶
type IssuingCardReplacementReasonstring
IssuingCardReplacementReason is the list of possible values for the replacement reason on anissuing card.
const (IssuingCardReplacementReasonDamagedIssuingCardReplacementReason = "damaged"IssuingCardReplacementReasonExpiredIssuingCardReplacementReason = "expired"IssuingCardReplacementReasonLostIssuingCardReplacementReason = "lost"IssuingCardReplacementReasonStolenIssuingCardReplacementReason = "stolen"// The following values are deprecated and will be removed in the next major version.IssuingCardReplacementReasonDamageIssuingCardReplacementReason = "damage"IssuingCardReplacementReasonExpirationIssuingCardReplacementReason = "expiration"IssuingCardReplacementReasonLossIssuingCardReplacementReason = "loss"IssuingCardReplacementReasonTheftIssuingCardReplacementReason = "theft")
List of values that IssuingCardReplacementReason can take.
typeIssuingCardShipping¶
type IssuingCardShipping struct {Address *Address `json:"address"`Carrierstring `json:"carrier"`ETAint64 `json:"eta"`Namestring `json:"name"`Phonestring `json:"phone"`ServiceIssuingCardShippingService `json:"service"`StatusIssuingCardShippingStatus `json:"status"`TrackingNumberstring `json:"tracking_number"`TrackingURLstring `json:"tracking_url"`TypeIssuingCardShippingType `json:"type"`// The property is deprecated. Use AddressPostalCodeCheck instead.// TODO remove in the next major versionSpeedIssuingCardShippingSpeed `json:"speed"`}IssuingCardShipping is the resource representing shipping on an issuing card.
typeIssuingCardShippingParams¶
type IssuingCardShippingParams struct {Address *AddressParams `form:"address"`Namestring `form:"name"`Service *string `form:"service"`Type *string `form:"type"`// This parameter is deprecated. Use Service instead.// TODO remove in the next major versionSpeed *string `form:"speed"`}IssuingCardShippingParams is the set of parameters that can be used for the shipping parameter.
typeIssuingCardShippingService¶
type IssuingCardShippingServicestring
IssuingCardShippingService is the shipment service for a card.
const (IssuingCardShippingServiceExpressIssuingCardShippingService = "express"IssuingCardShippingServicePriorityIssuingCardShippingService = "priority"IssuingCardShippingServiceStandardIssuingCardShippingService = "standard"// The following value is deprecated, use IssuingCardShippingServicePriority insteadIssuingCardShippingServiceOvernightIssuingCardShippingService = "overnight")
List of values that IssuingCardShippingService can take.
typeIssuingCardShippingSpeed¶
type IssuingCardShippingSpeedstring
IssuingCardShippingSpeed is the shipment speed for a card.This is deprecated, use IssuingCardShippingService instead
const (IssuingCardShippingSpeedExpressIssuingCardShippingSpeed = "express"IssuingCardShippingSpeedOvernightIssuingCardShippingSpeed = "overnight"IssuingCardShippingSpeedStandardIssuingCardShippingSpeed = "standard")
List of values that IssuingCardShippingSpeed can take
typeIssuingCardShippingStatus¶
type IssuingCardShippingStatusstring
IssuingCardShippingStatus is the list of possible values for the shipping statuson an issuing card.
const (IssuingCardShippingTypeDeliveredIssuingCardShippingStatus = "delivered"IssuingCardShippingTypeFailureIssuingCardShippingStatus = "failure"IssuingCardShippingTypePendingIssuingCardShippingStatus = "pending"IssuingCardShippingTypeReturnedIssuingCardShippingStatus = "returned"IssuingCardShippingTypeShippedIssuingCardShippingStatus = "shipped")
List of values that IssuingCardShippingStatus can take.
typeIssuingCardShippingType¶
type IssuingCardShippingTypestring
IssuingCardShippingType is the list of possible values for the shipping typeon an issuing card.
const (IssuingCardShippingTypeBulkIssuingCardShippingType = "bulk"IssuingCardShippingTypeIndividualIssuingCardShippingType = "individual")
List of values that IssuingCardShippingType can take.
typeIssuingCardSpendingControls¶
type IssuingCardSpendingControls struct {AllowedCategories []string `json:"allowed_categories"`BlockedCategories []string `json:"blocked_categories"`MaxApprovalsint64 `json:"max_approvals"`SpendingLimits []*IssuingCardSpendingControlsSpendingLimit `json:"spending_limits"`SpendingLimitsCurrencyCurrency `json:"spending_limits_currency"`}IssuingCardSpendingControls is the resource representing spending controlsfor an issuing card.
typeIssuingCardSpendingControlsParams¶
type IssuingCardSpendingControlsParams struct {AllowedCategories []*string `form:"allowed_categories"`BlockedCategories []*string `form:"blocked_categories"`MaxApprovals *int64 `form:"max_approvals"`SpendingLimits []*IssuingCardSpendingControlsSpendingLimitParams `form:"spending_limits"`SpendingLimitsCurrency *string `form:"spending_limits_currency"`}IssuingCardSpendingControlsParams is the set of parameters that can be used to configurethe spending controls for an issuing card
typeIssuingCardSpendingControlsSpendingLimit¶
type IssuingCardSpendingControlsSpendingLimit struct {Amountint64 `json:"amount"`Categories []string `json:"categories"`IntervalIssuingCardSpendingControlsSpendingLimitInterval `json:"interval"`}IssuingCardSpendingControlsSpendingLimit is the resource representing a spending limitfor an issuing card.
typeIssuingCardSpendingControlsSpendingLimitInterval¶
type IssuingCardSpendingControlsSpendingLimitIntervalstring
IssuingCardSpendingControlsSpendingLimitInterval is the list of possible values for the intervalfor a spending limit on an issuing card.
const (IssuingCardSpendingControlsSpendingLimitIntervalAllTimeIssuingCardSpendingControlsSpendingLimitInterval = "all_time"IssuingCardSpendingControlsSpendingLimitIntervalDailyIssuingCardSpendingControlsSpendingLimitInterval = "daily"IssuingCardSpendingControlsSpendingLimitIntervalMonthlyIssuingCardSpendingControlsSpendingLimitInterval = "monthly"IssuingCardSpendingControlsSpendingLimitIntervalPerAuthorizationIssuingCardSpendingControlsSpendingLimitInterval = "per_authorization"IssuingCardSpendingControlsSpendingLimitIntervalWeeklyIssuingCardSpendingControlsSpendingLimitInterval = "weekly"IssuingCardSpendingControlsSpendingLimitIntervalYearlyIssuingCardSpendingControlsSpendingLimitInterval = "yearly")
List of values that IssuingCardShippingStatus can take.
typeIssuingCardSpendingControlsSpendingLimitParams¶
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 torepresent a given spending limit for an issuing card.
typeIssuingCardStatus¶
type IssuingCardStatusstring
IssuingCardStatus is the list of possible values for status on an issuing card.
const (IssuingCardStatusActiveIssuingCardStatus = "active"IssuingCardStatusCanceledIssuingCardStatus = "canceled"IssuingCardStatusInactiveIssuingCardStatus = "inactive"IssuingCardStatusPendingIssuingCardStatus = "pending")
List of values that IssuingCardStatus can take.
typeIssuingCardType¶
type IssuingCardTypestring
IssuingCardType is the type of an issuing card.
const (IssuingCardTypePhysicalIssuingCardType = "physical"IssuingCardTypeVirtualIssuingCardType = "virtual")
List of values that IssuingCardType can take.
typeIssuingCardholder¶
type IssuingCardholder struct {Billing *IssuingBilling `json:"billing"`Company *IssuingCardholderCompany `json:"company"`Createdint64 `json:"created"`Emailstring `json:"email"`IDstring `json:"id"`Individual *IssuingCardholderIndividual `json:"individual"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Namestring `json:"name"`Objectstring `json:"object"`PhoneNumberstring `json:"phone_number"`Requirements *IssuingCardholderRequirements `json:"requirements"`SpendingControls *IssuingCardholderSpendingControls `json:"spending_controls"`StatusIssuingCardholderStatus `json:"status"`TypeIssuingCardholderType `json:"type"`// The following property is deprecated, use SpendingControls insteadAuthorizationControls *IssuingCardAuthorizationControls `json:"authorization_controls"`}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 resultingproperty may be an id or the full struct if it was expanded.
typeIssuingCardholderCompany¶
type IssuingCardholderCompany struct {TaxIDProvidedbool `json:"tax_id_provided"`}IssuingCardholderCompany represents additional information about abusiness_entity cardholder.
typeIssuingCardholderCompanyParams¶
type IssuingCardholderCompanyParams struct {TaxID *string `form:"tax_id"`}IssuingCardholderCompanyParams represents additional information about a`business_entity` cardholder.
typeIssuingCardholderIndividual¶
type IssuingCardholderIndividual struct {DOB *IssuingCardholderIndividualDOB `json:"dob"`FirstNamestring `json:"first_name"`LastNamestring `json:"last_name"`Verification *IssuingCardholderIndividualVerification `json:"verification"`}IssuingCardholderIndividual represents additional information about anindividual cardholder.
typeIssuingCardholderIndividualDOB¶
type IssuingCardholderIndividualDOB struct {Dayint64 `json:"day"`Monthint64 `json:"month"`Yearint64 `json:"year"`}IssuingCardholderIndividualDOB represents the date of birth of the issuing card hoderindividual.
typeIssuingCardholderIndividualDOBParams¶
type IssuingCardholderIndividualDOBParams struct {Day *int64 `form:"day"`Month *int64 `form:"month"`Year *int64 `form:"year"`}IssuingCardholderIndividualDOBParams represents the date of birth of thecardholder individual.
typeIssuingCardholderIndividualParams¶
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.
typeIssuingCardholderIndividualVerification¶
type IssuingCardholderIndividualVerification struct {Document *IssuingCardholderIndividualVerificationDocument `json:"document"`}IssuingCardholderIndividualVerification represents the Government-issued IDdocument for this cardholder
typeIssuingCardholderIndividualVerificationDocument¶
type IssuingCardholderIndividualVerificationDocument struct {Back *File `json:"back"`Front *File `json:"front"`}IssuingCardholderIndividualVerificationDocument represents an identifyingdocument, either a passport or local ID card.
typeIssuingCardholderIndividualVerificationDocumentParams¶
type IssuingCardholderIndividualVerificationDocumentParams struct {Back *string `form:"back"`Front *string `form:"front"`}IssuingCardholderIndividualVerificationDocumentParams represents anidentifying document, either a passport or local ID card.
typeIssuingCardholderIndividualVerificationParams¶
type IssuingCardholderIndividualVerificationParams struct {Document *IssuingCardholderIndividualVerificationDocumentParams `form:"document"`}IssuingCardholderIndividualVerificationParams represents government-issued IDdocument for this cardholder.
typeIssuingCardholderList¶
type IssuingCardholderList struct {ListMetaData []*IssuingCardholder `json:"data"`}IssuingCardholderList is a list of issuing cardholders as retrieved from a list endpoint.
typeIssuingCardholderListParams¶
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"`// The property is considered deprecated.// TODO remove in the next major versionIsDefault *bool `form:"is_default"`}IssuingCardholderListParams is the set of parameters that can be used when listing issuing cardholders.
typeIssuingCardholderParams¶
type IssuingCardholderParams struct {Params `form:"*"`Billing *IssuingBillingParams `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"`// The following parameters are deprecatedIsDefault *bool `form:"is_default"`AuthorizationControls *AuthorizationControlsParams `form:"authorization_controls"`}IssuingCardholderParams is the set of parameters that can be used when creating or updating an issuing cardholder.
typeIssuingCardholderRequirements¶
type IssuingCardholderRequirements struct {DisabledReasonIssuingCardholderRequirementsDisabledReason `json:"disabled_reason"`PastDue []string `json:"past_due"`}IssuingCardholderRequirements contains the verification requirements for the cardholder.
typeIssuingCardholderRequirementsDisabledReason¶
type IssuingCardholderRequirementsDisabledReasonstring
IssuingCardholderRequirementsDisabledReason is the possible values for the disabled reason on anissuing cardholder.
const (IssuingCardholderRequirementsDisabledReasonListedIssuingCardholderRequirementsDisabledReason = "listed"IssuingCardholderRequirementsDisabledReasonRejectedListedIssuingCardholderRequirementsDisabledReason = "rejected.listed"IssuingCardholderRequirementsDisabledReasonUnderReviewIssuingCardholderRequirementsDisabledReason = "under_review")
List of values that IssuingCardholderRequirementsDisabledReason can take.
typeIssuingCardholderSpendingControls¶
type IssuingCardholderSpendingControls struct {AllowedCategories []string `json:"allowed_categories"`BlockedCategories []string `json:"blocked_categories"`SpendingLimits []*IssuingCardholderSpendingControlsSpendingLimit `json:"spending_limits"`SpendingLimitsCurrencyCurrency `json:"spending_limits_currency"`}IssuingCardholderSpendingControls is the resource representing spending controlsfor an issuing cardholder.
typeIssuingCardholderSpendingControlsParams¶
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 configurethe spending controls for an issuing cardholder
typeIssuingCardholderSpendingControlsSpendingLimit¶
type IssuingCardholderSpendingControlsSpendingLimit struct {Amountint64 `json:"amount"`Categories []string `json:"categories"`IntervalIssuingCardholderSpendingControlsSpendingLimitInterval `json:"interval"`}IssuingCardholderSpendingControlsSpendingLimit is the resource representing a spending limitfor an issuing cardholder.
typeIssuingCardholderSpendingControlsSpendingLimitInterval¶
type IssuingCardholderSpendingControlsSpendingLimitIntervalstring
IssuingCardholderSpendingControlsSpendingLimitInterval is the list of possible values for the intervalfor a spending limit on an issuing cardholder.
const (IssuingCardholderSpendingControlsSpendingLimitIntervalAllTimeIssuingCardholderSpendingControlsSpendingLimitInterval = "all_time"IssuingCardholderSpendingControlsSpendingLimitIntervalDailyIssuingCardholderSpendingControlsSpendingLimitInterval = "daily"IssuingCardholderSpendingControlsSpendingLimitIntervalMonthlyIssuingCardholderSpendingControlsSpendingLimitInterval = "monthly"IssuingCardholderSpendingControlsSpendingLimitIntervalPerAuthorizationIssuingCardholderSpendingControlsSpendingLimitInterval = "per_authorization"IssuingCardholderSpendingControlsSpendingLimitIntervalWeeklyIssuingCardholderSpendingControlsSpendingLimitInterval = "weekly"IssuingCardholderSpendingControlsSpendingLimitIntervalYearlyIssuingCardholderSpendingControlsSpendingLimitInterval = "yearly")
List of values that IssuingCardShippingStatus can take.
typeIssuingCardholderSpendingControlsSpendingLimitParams¶
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 torepresent a given spending limit for an issuing cardholder.
typeIssuingCardholderStatus¶
type IssuingCardholderStatusstring
IssuingCardholderStatus is the possible values for status on an issuing cardholder.
const (IssuingCardholderStatusActiveIssuingCardholderStatus = "active"IssuingCardholderStatusInactiveIssuingCardholderStatus = "inactive"// This value is deprecatedIssuingCardholderStatusPendingIssuingCardholderStatus = "pending")
List of values that IssuingCardholderStatus can take.
typeIssuingCardholderType¶
type IssuingCardholderTypestring
IssuingCardholderType is the type of an issuing cardholder.
const (IssuingCardholderTypeCompanyIssuingCardholderType = "company"IssuingCardholderTypeIndividualIssuingCardholderType = "individual"// This value is deprecated. Use IssuingCardholderTypeCompany insteadIssuingCardholderTypeBusinessEntityIssuingCardholderType = "business_entity")
List of values that IssuingCardholderType can take.
typeIssuingDispute¶
type IssuingDispute struct {Amountint64 `json:"amount"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Evidence *IssuingDisputeEvidence `json:"evidence"`IDstring `json:"id"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`ReasonIssuingDisputeReason `json:"reason"`StatusIssuingDisputeStatus `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 resultingproperty may be an id or the full struct if it was expanded.
typeIssuingDisputeEvidence¶
type IssuingDisputeEvidence struct {Fraudulent *IssuingDisputeEvidenceFraudulent `json:"fraudulent"`Other *IssuingDisputeEvidenceOther `json:"other"`}IssuingDisputeEvidence is the resource representing evidence on an issuing dispute.
typeIssuingDisputeEvidenceFraudulent¶
type IssuingDisputeEvidenceFraudulent struct {DisputeExplanationstring `json:"dispute_explanation"`UncategorizedFile *File `json:"uncategorized_file"`}IssuingDisputeEvidenceFraudulent is the resource representing the evidence hash on an issuing disputewith the reason set as fraudulent.
typeIssuingDisputeEvidenceFraudulentParams¶
type IssuingDisputeEvidenceFraudulentParams struct {DisputeExplanation *string `form:"dispute_explanation"`UncategorizedFile *string `form:"uncategorized_file"`}IssuingDisputeEvidenceFraudulentParams is the subset of parameters that can be sent as evidence for an issuing disputewith the reason set as fraudulent.
typeIssuingDisputeEvidenceOther¶
type IssuingDisputeEvidenceOther struct {DisputeExplanationstring `json:"dispute_explanation"`UncategorizedFile *File `json:"uncategorized_file"`}IssuingDisputeEvidenceOther is the resource representing the evidence hash on an issuing disputewith the reason set as other.
typeIssuingDisputeEvidenceOtherParams¶
type IssuingDisputeEvidenceOtherParams struct {DisputeExplanation *string `form:"dispute_explanation"`UncategorizedFile *string `form:"uncategorized_file"`}IssuingDisputeEvidenceOtherParams is the subset of parameters that can be sent as evidence for an issuing disputewith the reason set as other.
typeIssuingDisputeEvidenceParams¶
type IssuingDisputeEvidenceParams struct {Fraudulent *IssuingDisputeEvidenceFraudulentParams `form:"fraudulent"`Other *IssuingDisputeEvidenceOtherParams `form:"other"`}IssuingDisputeEvidenceParams is the set of parameters that can be sent as evidence for an issuing dispute.
typeIssuingDisputeList¶
type IssuingDisputeList struct {ListMetaData []*IssuingDispute `json:"data"`}IssuingDisputeList is a list of issuing disputes as retrieved from a list endpoint.
typeIssuingDisputeListParams¶
type IssuingDisputeListParams struct {ListParams `form:"*"`Created *int64 `form:"created"`CreatedRange *RangeQueryParams `form:"created"`DisputedTransaction *string `form:"disputed_transaction"`Transaction *string `form:"transaction"`}IssuingDisputeListParams is the set of parameters that can be used when listing issuing dispute.
typeIssuingDisputeParams¶
type IssuingDisputeParams struct {Params `form:"*"`Amount *int64 `form:"amount"`Evidence *IssuingDisputeEvidenceParams `form:"evidence"`Reason *string `form:"reason"`DisputedTransaction *string `form:"disputed_transaction"`}IssuingDisputeParams is the set of parameters that can be used when creating or updating an issuing dispute.
typeIssuingDisputeReason¶
type IssuingDisputeReasonstring
IssuingDisputeReason is the list of possible values for status on an issuing dispute.
const (IssuingDisputeReasonDuplicateIssuingDisputeReason = "duplicate"IssuingDisputeReasonFraudulentIssuingDisputeReason = "fraudulent"IssuingDisputeReasonOtherIssuingDisputeReason = "other"IssuingDisputeReasonProductNotReceivedIssuingDisputeReason = "product_not_received")
List of values that IssuingDisputeReason can take.
typeIssuingDisputeStatus¶
type IssuingDisputeStatusstring
IssuingDisputeStatus is the list of possible values for status on an issuing dispute.
const (IssuingDisputeStatusLostIssuingDisputeStatus = "lost"IssuingDisputeStatusUnderReviewIssuingDisputeStatus = "under_review"IssuingDisputeStatusUnsubmittedIssuingDisputeStatus = "unsubmitted"IssuingDisputeStatusWonIssuingDisputeStatus = "won")
List of values that IssuingDisputeStatus can take.
typeIssuingMerchantData¶
type IssuingMerchantData struct {Categorystring `json:"category"`Citystring `json:"city"`Countrystring `json:"country"`Namestring `json:"name"`NetworkIDstring `json:"network_id"`PostalCodestring `json:"postal_code"`Statestring `json:"state"`URLstring `json:"url"`}IssuingMerchantData is the resource representing merchant data on Issuing APIs.
typeIssuingSpendingLimitInterval¶
type IssuingSpendingLimitIntervalstring
IssuingSpendingLimitInterval is the list of possible values for the interval of a givenspending limit on an issuing card or cardholder.This is deprecated, use IssuingCardSpendingControlsSpendingLimitInterval instead
const (IssuingSpendingLimitIntervalAllTimeIssuingSpendingLimitInterval = "all_time"IssuingSpendingLimitIntervalDailyIssuingSpendingLimitInterval = "daily"IssuingSpendingLimitIntervalMonthlyIssuingSpendingLimitInterval = "monthly"IssuingSpendingLimitIntervalPerAuthorizationIssuingSpendingLimitInterval = "per_authorization"IssuingSpendingLimitIntervalWeeklyIssuingSpendingLimitInterval = "weekly"IssuingSpendingLimitIntervalYearlyIssuingSpendingLimitInterval = "yearly")
List of values that IssuingCardShippingStatus can take.
typeIssuingTransaction¶
type IssuingTransaction struct {Amountint64 `json:"amount"`Authorization *IssuingAuthorization `json:"authorization"`BalanceTransaction *BalanceTransaction `json:"balance_transaction"`Card *IssuingCard `json:"card"`Cardholder *IssuingCardholder `json:"cardholder"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Dispute *IssuingDispute `json:"dispute"`IDstring `json:"id"`Livemodebool `json:"livemode"`MerchantData *IssuingMerchantData `json:"merchant_data"`MerchantAmountint64 `json:"merchant_amount"`MerchantCurrencyCurrency `json:"merchant_currency"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`TypeIssuingTransactionType `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 resultingproperty may be an id or the full struct if it was expanded.
typeIssuingTransactionList¶
type IssuingTransactionList struct {ListMetaData []*IssuingTransaction `json:"data"`}IssuingTransactionList is a list of issuing transactions as retrieved from a list endpoint.
typeIssuingTransactionListParams¶
type IssuingTransactionListParams struct {ListParams `form:"*"`Card *string `form:"card"`Cardholder *string `form:"cardholder"`Created *int64 `form:"created"`CreatedRange *RangeQueryParams `form:"created"`Dispute *string `form:"dispute"`}IssuingTransactionListParams is the set of parameters that can be used when listing issuing transactions.
typeIssuingTransactionParams¶
type IssuingTransactionParams struct {Params `form:"*"`}IssuingTransactionParams is the set of parameters that can be used when creating or updating an issuing transaction.
typeIssuingTransactionType¶
type IssuingTransactionTypestring
IssuingTransactionType is the type of an issuing transaction.
const (IssuingTransactionTypeCaptureIssuingTransactionType = "capture"IssuingTransactionTypeCashWithdrawalIssuingTransactionType = "cash_withdrawal"IssuingTransactionTypeRefundIssuingTransactionType = "refund"IssuingTransactionTypeRefundReversalIssuingTransactionType = "refund_reversal")
List of values that IssuingTransactionType can take.
typeIter¶
type Iter struct {// contains filtered or unexported fields}Iter provides a convenient interfacefor iterating over the elementsreturned from paginated list API calls.Successive calls to the Next methodwill step through each item in the list,fetching pages of items as needed.Iterators are not thread-safe, so they should not be consumedacross multiple goroutines.
funcGetIter¶
func GetIter(containerListParamsContainer, queryQuery) *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 itemvisited by a call to Next.
typeLevel¶
type Leveluint32
Level represents a logging level.
const (// LevelError sets a logger to show error messages only.LevelErrorLevel = 1// LevelWarn sets a logger to show warning messages or anything more// severe.LevelWarnLevel = 2// LevelInfo sets a logger to show informational messages or anything more// severe.LevelInfoLevel = 3// LevelDebug sets a logger to show informational messages or anything more// severe.LevelDebugLevel = 4)
typeLeveledLogger¶
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.LevelLevel// 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(formatstring, v ...interface{})
Debugf logs a debug message using Printf conventions.
func (*LeveledLogger)Errorf¶
func (l *LeveledLogger) Errorf(formatstring, v ...interface{})
Errorf logs a warning message using Printf conventions.
func (*LeveledLogger)Infof¶
func (l *LeveledLogger) Infof(formatstring, v ...interface{})
Infof logs an informational message using Printf conventions.
func (*LeveledLogger)Warnf¶
func (l *LeveledLogger) Warnf(formatstring, v ...interface{})
Warnf logs a warning message using Printf conventions.
typeLeveledLoggerInterface¶
type LeveledLoggerInterface interface {// Debugf logs a debug message using Printf conventions.Debugf(formatstring, v ...interface{})// Errorf logs a warning message using Printf conventions.Errorf(formatstring, v ...interface{})// Infof logs an informational message using Printf conventions.Infof(formatstring, v ...interface{})// Warnf logs a warning message using Printf conventions.Warnf(formatstring, v ...interface{})}LeveledLoggerInterface provides a basic leveled logging interface forprinting debug, informational, warning, and error messages.
It's implemented by LeveledLogger and also provides out-of-the-boxcompatibility with a Logrus Logger, but may require a thin shim for use withother logging libraries that you use less standard conventions like Zap.
var DefaultLeveledLoggerLeveledLoggerInterfaceDefaultLeveledLogger is the default logger that the library will use to logerrors, warnings, and informational messages.
LeveledLoggerInterface is implemented by LeveledLogger, and one can beinitialized at the desired level of logging. LeveledLoggerInterface alsoprovides out-of-the-box compatibility with a Logrus Logger, but may requirea thin shim for use with other logging libraries that use less standardconventions like Zap.
This Logger will be inherited by any backends created by default, but willbe overridden if a backend is created with GetBackendWithConfig with acustom LeveledLogger set.
typeListMeta¶
type ListMeta struct {HasMorebool `json:"has_more"`TotalCountuint32 `json:"total_count"`URLstring `json:"url"`}ListMeta is the structure that contains the common propertiesof List iterators. The Count property is only populated if thetotal_count include option is passed in (see tests for example).
typeListParams¶
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.Contextcontext.Context `form:"-"`EndingBefore *string `form:"ending_before"`Expand []*string `form:"expand"`FiltersFilters `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.Singlebool `form:"-"`// Not an API parameterStartingAfter *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 propertiesof any *ListParams structure.
func (*ListParams)AddExpand¶
func (p *ListParams) AddExpand(fstring)
AddExpand appends a new field to expand.
func (*ListParams)GetListParams¶
func (p *ListParams) GetListParams() *ListParams
GetListParams returns a ListParams struct (itself). It exists because anystructs that embed ListParams will inherit it, and thus implement theListParamsContainer interface.
func (*ListParams)GetParams¶
func (p *ListParams) GetParams() *Params
GetParams returns ListParams as a Params struct. It exists because anystructs that embed Params will inherit it, and thus implement theParamsContainer interface.
func (*ListParams)SetStripeAccount¶
func (p *ListParams) SetStripeAccount(valstring)
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 thathave valid targets in the new type. This is useful because fields inParams can be injected directly into an http.Request while generallyListParams is only used to build a set of parameters.
typeListParamsContainer¶
type ListParamsContainer interface {GetListParams() *ListParams}ListParamsContainer is a general interface for which all list parameterstructs should comply. They achieve this by embedding a ListParams structand inheriting its implementation of this interface.
typeLoginLink¶
LoginLink is the resource representing a login link for Express accounts.For more details seehttps://stripe.com/docs/api#login_link_object
typeLoginLinkParams¶
type LoginLinkParams struct {Params `form:"*"`Account *string `form:"-"`// Included in URLRedirectURL *string `form:"redirect_url"`}LoginLinkParams is the set of parameters that can be used when creating a login_link.For more details seehttps://stripe.com/docs/api#create_login_link.
typeMandate¶
type Mandate struct {CustomerAcceptance *MandateCustomerAcceptance `json:"customer_acceptance"`IDstring `json:"id"`Livemodebool `json:"livemode"`MultiUse *MandateMultiUse `json:"multi_use"`Objectstring `json:"object"`PaymentMethod *PaymentMethod `json:"payment_method"`PaymentMethodDetails *MandatePaymentMethodDetails `json:"payment_method_details"`SingleUse *MandateSingleUse `json:"single_use"`StatusMandateStatus `json:"status"`TypeMandateType `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 resultingproperty may be an id or the full struct if it was expanded.
typeMandateCustomerAcceptance¶
type MandateCustomerAcceptance struct {AcceptedAtint64 `json:"accepted_at"`Offline *MandateCustomerAcceptanceOffline `json:"offline"`Online *MandateCustomerAcceptanceOnline `json:"online"`TypeMandateCustomerAcceptanceType `json:"type"`}MandateCustomerAcceptance represents details about the customer acceptance for a mandate.
typeMandateCustomerAcceptanceOffline¶
type MandateCustomerAcceptanceOffline struct {}MandateCustomerAcceptanceOffline represents details about the customer acceptance of an offlinemandate.
typeMandateCustomerAcceptanceOnline¶
type MandateCustomerAcceptanceOnline struct {IPAddressstring `json:"ip_address"`UserAgentstring `json:"user_agent"`}MandateCustomerAcceptanceOnline represents details about the customer acceptance of an onlinemandate.
typeMandateCustomerAcceptanceType¶
type MandateCustomerAcceptanceTypestring
MandateCustomerAcceptanceType is the list of allowed values for the type of customer acceptancefor a given mandate..
const (MandateCustomerAcceptanceTypeOfflineMandateCustomerAcceptanceType = "offline"MandateCustomerAcceptanceTypeOnlineMandateCustomerAcceptanceType = "online")
List of values that MandateStatus can take.
typeMandateMultiUse¶
type MandateMultiUse struct {}MandateMultiUse represents details about a multi-use mandate.
typeMandateParams¶
type MandateParams struct {Params `form:"*"`}MandateParams is the set of parameters that can be used when retrieving a mandate.
typeMandatePaymentMethodDetails¶
type MandatePaymentMethodDetails struct {AUBECSDebit *MandatePaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"`Card *MandatePaymentMethodDetailsCard `json:"card"`SepaDebit *MandatePaymentMethodDetailsSepaDebit `json:"sepa_debit"`TypePaymentMethodType `json:"type"`}MandatePaymentMethodDetails represents details about the payment method associated with thismandate.
typeMandatePaymentMethodDetailsAUBECSDebit¶
type MandatePaymentMethodDetailsAUBECSDebit struct {URLstring `json:"url"`}MandatePaymentMethodDetailsAUBECSDebit represents details about the Australia BECS debit accountassociated with this mandate.
typeMandatePaymentMethodDetailsCard¶
type MandatePaymentMethodDetailsCard struct {}MandatePaymentMethodDetailsCard represents details about the card associated with this mandate.
typeMandatePaymentMethodDetailsSepaDebit¶
type MandatePaymentMethodDetailsSepaDebit struct {Referencestring `json:"reference"`URLstring `json:"url"`}MandatePaymentMethodDetailsSepaDebit represents details about the SEPA debit bank accountassociated with this mandate.
typeMandateSingleUse¶
MandateSingleUse represents details about a single-use mandate.
typeMandateStatus¶
type MandateStatusstring
MandateStatus is the list of allowed values for the mandate status.
const (MandateStatusActiveMandateStatus = "active"MandateStatusInactiveMandateStatus = "inactive"MandateStatusPendingMandateStatus = "pending")
List of values that MandateStatus can take.
typeMandateType¶
type MandateTypestring
MandateType is the list of allowed values for the mandate type.
const (MandateTypeMultiUseMandateType = "multi_use"MandateTypeSingleUseMandateType = "single_use")
List of values that MandateType can take.
typeOAuthScopeType¶
type OAuthScopeTypestring
OAuthScopeType is the type of OAuth scope.
const (OAuthScopeTypeReadOnlyOAuthScopeType = "read_only"OAuthScopeTypeReadWriteOAuthScopeType = "read_write")
List of possible values for OAuth scopes.
typeOAuthStripeUserBusinessType¶
type OAuthStripeUserBusinessTypestring
OAuthStripeUserBusinessType is the business type for the Stripe oauth user.
const (OAuthStripeUserBusinessTypeCorporationOAuthStripeUserBusinessType = "corporation"OAuthStripeUserBusinessTypeLLCOAuthStripeUserBusinessType = "llc"OAuthStripeUserBusinessTypeNonProfitOAuthStripeUserBusinessType = "non_profit"OAuthStripeUserBusinessTypePartnershipOAuthStripeUserBusinessType = "partnership"OAuthStripeUserBusinessTypeSolePropOAuthStripeUserBusinessType = "sole_prop")
List of supported values for business type.
typeOAuthStripeUserGender¶
type OAuthStripeUserGenderstring
OAuthStripeUserGender of the person who will be filling out a Stripeapplication. (International regulations require either male or female.)
const (OAuthStripeUserGenderFemaleOAuthStripeUserGender = "female"OAuthStripeUserGenderMaleOAuthStripeUserGender = "male")
The gender of the person who will be filling out a Stripe application.(International regulations require either male or female.)
typeOAuthStripeUserParams¶
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.
typeOAuthToken¶
type OAuthToken struct {Livemodebool `json:"livemode"`ScopeOAuthScopeType `json:"scope"`StripeUserIDstring `json:"stripe_user_id"`TokenTypeOAuthTokenType `json:"token_type"`// Deprecated, please use StripeUserIDAccessTokenstring `json:"access_token"`RefreshTokenstring `json:"refresh_token"`StripePublishableKeystring `json:"stripe_publishable_key"`}OAuthToken is the value of the OAuthToken from OAuth flow.https://stripe.com/docs/connect/oauth-reference#post-token
typeOAuthTokenParams¶
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 requestOAuthTokens.
typeOAuthTokenType¶
type OAuthTokenTypestring
OAuthTokenType is the type of token. This will always be "bearer."
const (OAuthTokenTypeBearerOAuthTokenType = "bearer")List of possible OAuthTokenType values.
typeOrder¶
type Order struct {Amountint64 `json:"amount"`AmountReturnedint64 `json:"amount_returned"`Applicationstring `json:"application"`ApplicationFeeint64 `json:"application_fee"`Charge *Charge `json:"charge"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`CustomerCustomer `json:"customer"`Emailstring `json:"email"`IDstring `json:"id"`Items []*OrderItem `json:"items"`Livemodebool `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"`Statusstring `json:"status"`StatusTransitionsStatusTransitions `json:"status_transitions"`Updatedint64 `json:"updated"`UpstreamIDstring `json:"upstream_id"`}Order is the resource representing a Stripe charge.For more details seehttps://stripe.com/docs/api#orders.
func (*Order)UnmarshalJSON¶
UnmarshalJSON handles deserialization of an Order.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeOrderDeliveryEstimateType¶
type OrderDeliveryEstimateTypestring
OrderDeliveryEstimateType represents the type of delivery estimate for shipping methods
const (OrderDeliveryEstimateTypeExactOrderDeliveryEstimateType = "exact"OrderDeliveryEstimateTypeRangeOrderDeliveryEstimateType = "range")
List of values that OrderDeliveryEstimateType can take.
typeOrderItem¶
type OrderItem struct {Amountint64 `json:"amount"`CurrencyCurrency `json:"currency"`Descriptionstring `json:"description"`Parent *OrderItemParent `json:"parent"`Quantityint64 `json:"quantity"`TypeOrderItemType `json:"type"`}OrderItem is the resource representing an order item.
typeOrderItemParams¶
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.
typeOrderItemParent¶
type OrderItemParent struct {IDstring `json:"id"`SKU *SKU `json:"-"`TypeOrderItemParentType `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 resultingproperty may be an id or a full SKU struct if it was expanded.
typeOrderItemParentType¶
type OrderItemParentTypestring
OrderItemParentType represents the type of order item parent
const (OrderItemParentTypeCouponOrderItemParentType = "coupon"OrderItemParentTypeDiscountOrderItemParentType = "discount"OrderItemParentTypeSKUOrderItemParentType = "sku"OrderItemParentTypeShippingOrderItemParentType = "shipping"OrderItemParentTypeTaxOrderItemParentType = "tax")
List of values that OrderItemParentType can take.
typeOrderItemType¶
type OrderItemTypestring
OrderItemType represents the type of order item
const (OrderItemTypeCouponOrderItemType = "coupon"OrderItemTypeDiscountOrderItemType = "discount"OrderItemTypeSKUOrderItemType = "sku"OrderItemTypeShippingOrderItemType = "shipping"OrderItemTypeTaxOrderItemType = "tax")
List of values that OrderItemType can take.
typeOrderListParams¶
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.
typeOrderParams¶
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.
typeOrderPayParams¶
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.
typeOrderReturn¶
type OrderReturn struct {Amountint64 `json:"amount"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`IDstring `json:"id"`Items []*OrderItem `json:"items"`Livemodebool `json:"livemode"`Order *Order `json:"order"`Refund *Refund `json:"refund"`}OrderReturn is the resource representing an order return.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typeOrderReturnList¶
type OrderReturnList struct {ListMetaData []*OrderReturn `json:"data"`}OrderReturnList is a list of order returns as retrieved from a list endpoint.
typeOrderReturnListParams¶
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.
typeOrderReturnParams¶
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.
typeOrderStatus¶
type OrderStatusstring
OrderStatus represents the statuses of an order object.
const (OrderStatusCanceledOrderStatus = "canceled"OrderStatusCreatedOrderStatus = "created"OrderStatusFulfilledOrderStatus = "fulfilled"OrderStatusPaidOrderStatus = "paid"OrderStatusReturnedOrderStatus = "returned")
List of values that OrderStatus can take.
typeOrderUpdateParams¶
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.
typeOrderUpdateShippingParams¶
type OrderUpdateShippingParams struct {Carrier *string `form:"carrier"`TrackingNumber *string `form:"tracking_number"`}OrderUpdateShippingParams is the set of parameters that can be used for the shippinghash on order update.
typePackageDimensions¶
type PackageDimensions struct {Heightfloat64 `json:"height"`Lengthfloat64 `json:"length"`Weightfloat64 `json:"weight"`Widthfloat64 `json:"width"`}PackageDimensions represents the dimension of a product or a SKU from theperspective of shipping.
typePackageDimensionsParams¶
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 aproduct or a SKU from the perspective of shipping .
typeParams¶
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.Contextcontext.Context `form:"-"`Expand []*string `form:"expand"`Extra *ExtraValues `form:"*"`// Headers may be used to provide extra header lines on the HTTP request.Headershttp.Header `form:"-"`IdempotencyKey *string `form:"-"`// Passed as headerMetadata 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 propertiesof 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 structsthat embed Params will inherit it, and thus implement the ParamsContainerinterface.
func (*Params)SetIdempotencyKey¶
SetIdempotencyKey sets a value for the Idempotency-Key header.
func (*Params)SetStripeAccount¶
SetStripeAccount sets a value for the Stripe-Account header.
typeParamsContainer¶
type ParamsContainer interface {GetParams() *Params}ParamsContainer is a general interface for which all parameter structsshould comply. They achieve this by embedding a Params struct and inheritingits implementation of this interface.
typePaymentIntent¶
type PaymentIntent struct {Amountint64 `json:"amount"`AmountCapturableint64 `json:"amount_capturable"`AmountReceivedint64 `json:"amount_received"`Application *Application `json:"application"`ApplicationFeeAmountint64 `json:"application_fee_amount"`CanceledAtint64 `json:"canceled_at"`CancellationReasonPaymentIntentCancellationReason `json:"cancellation_reason"`CaptureMethodPaymentIntentCaptureMethod `json:"capture_method"`Charges *ChargeList `json:"charges"`ClientSecretstring `json:"client_secret"`ConfirmationMethodPaymentIntentConfirmationMethod `json:"confirmation_method"`Createdint64 `json:"created"`Currencystring `json:"currency"`Customer *Customer `json:"customer"`Descriptionstring `json:"description"`Invoice *Invoice `json:"invoice"`LastPaymentError *Error `json:"last_payment_error"`Livemodebool `json:"livemode"`IDstring `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"`ReceiptEmailstring `json:"receipt_email"`Review *Review `json:"review"`SetupFutureUsagePaymentIntentSetupFutureUsage `json:"setup_future_usage"`ShippingShippingDetails `json:"shipping"`Source *PaymentSource `json:"source"`StatementDescriptorstring `json:"statement_descriptor"`StatementDescriptorSuffixstring `json:"statement_descriptor_suffix"`StatusPaymentIntentStatus `json:"status"`TransferData *PaymentIntentTransferData `json:"transfer_data"`TransferGroupstring `json:"transfer_group"`}PaymentIntent is the resource representing a Stripe payout.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typePaymentIntentCancelParams¶
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.
typePaymentIntentCancellationReason¶
type PaymentIntentCancellationReasonstring
PaymentIntentCancellationReason is the list of allowed values for the cancelation reason.
const (PaymentIntentCancellationReasonAbandonedPaymentIntentCancellationReason = "abandoned"PaymentIntentCancellationReasonAutomaticPaymentIntentCancellationReason = "automatic"PaymentIntentCancellationReasonDuplicatePaymentIntentCancellationReason = "duplicate"PaymentIntentCancellationReasonFailedInvoicePaymentIntentCancellationReason = "failed_invoice"PaymentIntentCancellationReasonFraudulentPaymentIntentCancellationReason = "fraudulent"PaymentIntentCancellationReasonRequestedByCustomerPaymentIntentCancellationReason = "requested_by_customer"PaymentIntentCancellationReasonVoidInvoicePaymentIntentCancellationReason = "void_invoice")
List of values that PaymentIntentCancellationReason can take.
typePaymentIntentCaptureMethod¶
type PaymentIntentCaptureMethodstring
PaymentIntentCaptureMethod is the list of allowed values for the capture method.
const (PaymentIntentCaptureMethodAutomaticPaymentIntentCaptureMethod = "automatic"PaymentIntentCaptureMethodManualPaymentIntentCaptureMethod = "manual")
List of values that PaymentIntentCaptureMethod can take.
typePaymentIntentCaptureParams¶
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.
typePaymentIntentConfirmParams¶
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"`PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`PaymentMethodTypes []*string `form:"payment_method_types"`ReceiptEmail *string `form:"receipt_email"`ReturnURL *string `form:"return_url"`SavePaymentMethod *bool `form:"save_payment_method"`SetupFutureUsage *string `form:"setup_future_usage"`Shipping *ShippingDetailsParams `form:"shipping"`Source *string `form:"source"`UseStripeSDK *bool `form:"use_stripe_sdk"`}PaymentIntentConfirmParams is the set of parameters that can be used when confirming a payment intent.
typePaymentIntentConfirmationMethod¶
type PaymentIntentConfirmationMethodstring
PaymentIntentConfirmationMethod is the list of allowed values for the confirmation method.
const (PaymentIntentConfirmationMethodAutomaticPaymentIntentConfirmationMethod = "automatic"PaymentIntentConfirmationMethodManualPaymentIntentConfirmationMethod = "manual")
List of values that PaymentIntentConfirmationMethod can take.
typePaymentIntentList¶
type PaymentIntentList struct {ListMetaData []*PaymentIntent `json:"data"`}PaymentIntentList is a list of payment intents as retrieved from a list endpoint.
typePaymentIntentListParams¶
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 seehttps://stripe.com/docs/api#list_payouts.
typePaymentIntentMandateDataCustomerAcceptanceOfflineParams¶
type PaymentIntentMandateDataCustomerAcceptanceOfflineParams struct {}PaymentIntentMandateDataCustomerAcceptanceOfflineParams is the set of parameters for the customeracceptance of an offline mandate.
typePaymentIntentMandateDataCustomerAcceptanceOnlineParams¶
type PaymentIntentMandateDataCustomerAcceptanceOnlineParams struct {IPAddress *string `form:"ip_address"`UserAgent *string `form:"user_agent"`}PaymentIntentMandateDataCustomerAcceptanceOnlineParams is the set of parameters for the customeracceptance of an online mandate.
typePaymentIntentMandateDataCustomerAcceptanceParams¶
type PaymentIntentMandateDataCustomerAcceptanceParams struct {AcceptedAtint64 `form:"accepted_at"`Offline *PaymentIntentMandateDataCustomerAcceptanceOfflineParams `form:"offline"`Online *PaymentIntentMandateDataCustomerAcceptanceOnlineParams `form:"online"`TypeMandateCustomerAcceptanceType `form:"type"`}PaymentIntentMandateDataCustomerAcceptanceParams is the set of parameters for the customeracceptance of a mandate.
typePaymentIntentMandateDataParams¶
type PaymentIntentMandateDataParams struct {CustomerAcceptance *PaymentIntentMandateDataCustomerAcceptanceParams `form:"customer_acceptance"`}PaymentIntentMandateDataParams is the set of parameters controlling the creation of the mandateassociated with this PaymentIntent.
typePaymentIntentNextAction¶
type PaymentIntentNextAction struct {RedirectToURL *PaymentIntentNextActionRedirectToURL `json:"redirect_to_url"`TypePaymentIntentNextActionType `json:"type"`}PaymentIntentNextAction represents the type of action to take on a payment intent.
typePaymentIntentNextActionRedirectToURL¶
type PaymentIntentNextActionRedirectToURL struct {ReturnURLstring `json:"return_url"`URLstring `json:"url"`}PaymentIntentNextActionRedirectToURL represents the resource for the next action of type"redirect_to_url".
typePaymentIntentNextActionType¶
type PaymentIntentNextActionTypestring
PaymentIntentNextActionType is the list of allowed values for the next action's type.
const (PaymentIntentNextActionTypeRedirectToURLPaymentIntentNextActionType = "redirect_to_url")List of values that PaymentIntentNextActionType can take.
typePaymentIntentOffSession¶
type PaymentIntentOffSessionstring
PaymentIntentOffSession is the list of allowed values for types of off-session.
const (PaymentIntentOffSessionOneOffPaymentIntentOffSession = "one_off"PaymentIntentOffSessionRecurringPaymentIntentOffSession = "recurring")
List of values that PaymentIntentOffSession can take.
typePaymentIntentParams¶
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"`PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`PaymentMethodTypes []*string `form:"payment_method_types"`ReceiptEmail *string `form:"receipt_email"`ReturnURL *string `form:"return_url"`SavePaymentMethod *bool `form:"save_payment_method"`SetupFutureUsage *string `form:"setup_future_usage"`Shipping *ShippingDetailsParams `form:"shipping"`Source *string `form:"source"`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.
typePaymentIntentPaymentMethodOptions¶
type PaymentIntentPaymentMethodOptions struct {Card *PaymentIntentPaymentMethodOptionsCard `json:"card"`}PaymentIntentPaymentMethodOptions is the set of payment method-specific options associated withthat payment intent.
typePaymentIntentPaymentMethodOptionsCard¶
type PaymentIntentPaymentMethodOptionsCard struct {Installments *PaymentIntentPaymentMethodOptionsCardInstallments `json:"installments"`RequestThreeDSecurePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`}PaymentIntentPaymentMethodOptionsCard is the set of card-specific options associated with thatpayment intent.
typePaymentIntentPaymentMethodOptionsCardInstallments¶
type PaymentIntentPaymentMethodOptionsCardInstallments struct {AvailablePlans []*PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"available_plans"`Enabledbool `json:"enabled"`Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"`}PaymentIntentPaymentMethodOptionsCardInstallments describe the installment options available fora card associated with that payment intent.
typePaymentIntentPaymentMethodOptionsCardInstallmentsParams¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsParams struct {Enabled *bool `form:"enabled"`Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"`}PaymentIntentPaymentMethodOptionsCardInstallmentsParams controls whether to enable installmentplans for this payment intent.
typePaymentIntentPaymentMethodOptionsCardInstallmentsPlan¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlan struct {Countint64 `json:"count"`IntervalPaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval `json:"interval"`TypePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType `json:"type"`}PaymentIntentPaymentMethodOptionsCardInstallmentsPlan describe a specific card installment plan.
typePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanIntervalstring
PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval is the interval of a card installment plan.
const (PaymentIntentPaymentMethodOptionsCardInstallmentsPlanIntervalMonthPaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval = "month")List of values that PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval can take.
typePaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams struct {Count *int64 `form:"count"`Interval *string `form:"interval"`Type *string `form:"type"`}PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams represents details about theinstallment plan chosen for this payment intent.
typePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType¶
type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanTypestring
PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType is the type of a card installment plan.
const (PaymentIntentPaymentMethodOptionsCardInstallmentsPlanTypeFixedCountPaymentIntentPaymentMethodOptionsCardInstallmentsPlanType = "fixed_count")List of values that PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType can take.
typePaymentIntentPaymentMethodOptionsCardParams¶
type PaymentIntentPaymentMethodOptionsCardParams struct {Installments *PaymentIntentPaymentMethodOptionsCardInstallmentsParams `form:"installments"`MOTO *bool `form:"moto"`RequestThreeDSecure *string `form:"request_three_d_secure"`}PaymentIntentPaymentMethodOptionsCardParams represents the card-specific options applied to aPaymentIntent.
typePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure¶
type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecurestring
PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure is the list of allowed valuescontrolling when to request 3D Secure on a PaymentIntent.
const (PaymentIntentPaymentMethodOptionsCardRequestThreeDSecureAnyPaymentIntentPaymentMethodOptionsCardRequestThreeDSecure = "any"PaymentIntentPaymentMethodOptionsCardRequestThreeDSecureAutomaticPaymentIntentPaymentMethodOptionsCardRequestThreeDSecure = "automatic")
List of values that PaymentIntentNextActionType can take.
typePaymentIntentPaymentMethodOptionsParams¶
type PaymentIntentPaymentMethodOptionsParams struct {Card *PaymentIntentPaymentMethodOptionsCardParams `form:"card"`}PaymentIntentPaymentMethodOptionsParams represents the type-specific payment method optionsapplied to a PaymentIntent.
typePaymentIntentSetupFutureUsage¶
type PaymentIntentSetupFutureUsagestring
PaymentIntentSetupFutureUsage is the list of allowed values for SetupFutureUsage.
const (PaymentIntentSetupFutureUsageOffSessionPaymentIntentSetupFutureUsage = "off_session"PaymentIntentSetupFutureUsageOnSessionPaymentIntentSetupFutureUsage = "on_session")
List of values that PaymentIntentSetupFutureUsage can take.
typePaymentIntentStatus¶
type PaymentIntentStatusstring
PaymentIntentStatus is the list of allowed values for the payment intent's status.
const (PaymentIntentStatusCanceledPaymentIntentStatus = "canceled"PaymentIntentStatusProcessingPaymentIntentStatus = "processing"PaymentIntentStatusRequiresActionPaymentIntentStatus = "requires_action"PaymentIntentStatusRequiresCapturePaymentIntentStatus = "requires_capture"PaymentIntentStatusRequiresConfirmationPaymentIntentStatus = "requires_confirmation"PaymentIntentStatusRequiresPaymentMethodPaymentIntentStatus = "requires_payment_method"PaymentIntentStatusSucceededPaymentIntentStatus = "succeeded")
List of values that PaymentIntentStatus can take.
typePaymentIntentTransferData¶
type PaymentIntentTransferData struct {Amountint64 `json:"amount"`Destination *Account `json:"destination"`}PaymentIntentTransferData represents the information for the transfer associated with a payment intent.
typePaymentIntentTransferDataParams¶
type PaymentIntentTransferDataParams struct {Amount *int64 `form:"amount"`Destination *string `form:"destination"`}PaymentIntentTransferDataParams is the set of parameters allowed for the transfer hash.
typePaymentMethod¶
type PaymentMethod struct {AUBECSDebit *PaymentMethodAUBECSDebit `json:"au_becs_debit"`BillingDetails *BillingDetails `json:"billing_details"`Card *PaymentMethodCard `json:"card"`CardPresent *PaymentMethodCardPresent `json:"card_present"`Createdint64 `json:"created"`Customer *Customer `json:"customer"`FPX *PaymentMethodFPX `json:"fpx"`IDstring `json:"id"`Ideal *PaymentMethodIdeal `json:"ideal"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`SepaDebit *PaymentMethodSepaDebit `json:"sepa_debit"`TypePaymentMethodType `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 resultingproperty may be an id or the full struct if it was expanded.
typePaymentMethodAUBECSDebit¶
type PaymentMethodAUBECSDebit struct {BSBNumberstring `json:"bsb_number"`Fingerprintstring `json:"fingerprint"`Last4string `json:"last4"`}PaymentMethodAUBECSDebit represents AUBECSDebit-specific properties (Australia Only).
typePaymentMethodAUBECSDebitParams¶
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 aPaymentMethod of type AUBECSDebit.
typePaymentMethodAttachParams¶
PaymentMethodAttachParams is the set of parameters that can be used when attaching aPaymentMethod to a Customer.
typePaymentMethodCard¶
type PaymentMethodCard struct {BrandPaymentMethodCardBrand `json:"brand"`Checks *PaymentMethodCardChecks `json:"checks"`Countrystring `json:"country"`ExpMonthuint64 `json:"exp_month"`ExpYearuint64 `json:"exp_year"`Fingerprintstring `json:"fingerprint"`FundingCardFunding `json:"funding"`Last4string `json:"last4"`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.Descriptionstring `json:"description"`IINstring `json:"iin"`Issuerstring `json:"issuer"`}PaymentMethodCard represents the card-specific properties.
typePaymentMethodCardBrand¶
type PaymentMethodCardBrandstring
PaymentMethodCardBrand is the list of allowed values for the brand property on aCard PaymentMethod.
const (PaymentMethodCardBrandAmexPaymentMethodCardBrand = "amex"PaymentMethodCardBrandDinersPaymentMethodCardBrand = "diners"PaymentMethodCardBrandDiscoverPaymentMethodCardBrand = "discover"PaymentMethodCardBrandJCBPaymentMethodCardBrand = "jcb"PaymentMethodCardBrandMastercardPaymentMethodCardBrand = "mastercard"PaymentMethodCardBrandUnionpayPaymentMethodCardBrand = "unionpay"PaymentMethodCardBrandUnknownPaymentMethodCardBrand = "unknown"PaymentMethodCardBrandVisaPaymentMethodCardBrand = "visa")
List of values that PaymentMethodCardBrand can take.
typePaymentMethodCardChecks¶
type PaymentMethodCardChecks struct {AddressLine1CheckCardVerification `json:"address_line1_check"`AddressPostalCodeCheckCardVerification `json:"address_postal_code_check"`CVCCheckCardVerification `json:"cvc_check"`}PaymentMethodCardChecks represents the checks associated with a Card PaymentMethod.
typePaymentMethodCardNetwork¶
type PaymentMethodCardNetworkstring
PaymentMethodCardNetwork is the list of allowed values to represent the networkused for a card-like transaction.
const (PaymentMethodCardNetworkAmexPaymentMethodCardNetwork = "amex"PaymentMethodCardNetworkDinersPaymentMethodCardNetwork = "diners"PaymentMethodCardNetworkDiscoverPaymentMethodCardNetwork = "discover"PaymentMethodCardNetworkInteracPaymentMethodCardNetwork = "interac"PaymentMethodCardNetworkJCBPaymentMethodCardNetwork = "jcb"PaymentMethodCardNetworkMastercardPaymentMethodCardNetwork = "mastercard"PaymentMethodCardNetworkUnionpayPaymentMethodCardNetwork = "unionpay"PaymentMethodCardNetworkUnknownPaymentMethodCardNetwork = "unknown"PaymentMethodCardNetworkVisaPaymentMethodCardNetwork = "visa")
List of values that PaymentMethodCardNetwork can take.
typePaymentMethodCardParams¶
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 aPaymentMethod of type card.
typePaymentMethodCardPresent¶
type PaymentMethodCardPresent struct {}PaymentMethodCardPresent represents the card-present-specific properties.
typePaymentMethodCardThreeDSecureUsage¶
type PaymentMethodCardThreeDSecureUsage struct {Supportedbool `json:"supported"`}PaymentMethodCardThreeDSecureUsage represents the 3DS usage for that Card PaymentMethod.
typePaymentMethodCardWallet¶
type PaymentMethodCardWallet struct {DynamicLast4string `json:"dynamic_last4"`TypePaymentMethodCardWalletType `json:"type"`}PaymentMethodCardWallet represents the details of the card wallet if this Card PaymentMethodis part of a card wallet.
typePaymentMethodCardWalletType¶
type PaymentMethodCardWalletTypestring
PaymentMethodCardWalletType is the list of allowed values for the type a wallet can take ona Card PaymentMethod.
const (PaymentMethodCardWalletTypeAmexExpressCheckoutPaymentMethodCardWalletType = "amex_express_checkout"PaymentMethodCardWalletTypeApplePayPaymentMethodCardWalletType = "apple_pay"PaymentMethodCardWalletTypeGooglePayPaymentMethodCardWalletType = "google_pay"PaymentMethodCardWalletTypeMasterpassPaymentMethodCardWalletType = "masterpass"PaymentMethodCardWalletTypeSamsungPayPaymentMethodCardWalletType = "samsung_pay"PaymentMethodCardWalletTypeVisaCheckoutPaymentMethodCardWalletType = "visa_checkout")
List of values that PaymentMethodCardWalletType can take.
typePaymentMethodDetachParams¶
type PaymentMethodDetachParams struct {Params `form:"*"`}PaymentMethodDetachParams is the set of parameters that can be used when detaching aPaymentMethod.
typePaymentMethodFPX¶
type PaymentMethodFPX struct {AccountHolderTypePaymentMethodFPXAccountHolderType `json:"account_holder_type"`Bankstring `json:"bank"`TransactionIDstring `json:"transaction_id"`}PaymentMethodFPX represents FPX-specific properties (Malaysia Only).
typePaymentMethodFPXAccountHolderType¶
type PaymentMethodFPXAccountHolderTypestring
PaymentMethodFPXAccountHolderType is a list of string values that FPX AccountHolderType accepts.
const (PaymentMethodFPXAccountHolderTypeIndividualPaymentMethodFPXAccountHolderType = "individual"PaymentMethodFPXAccountHolderTypeCompanyPaymentMethodFPXAccountHolderType = "company")
List of values that PaymentMethodFPXAccountHolderType can take
typePaymentMethodFPXParams¶
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 aPaymentMethod of type fpx.
typePaymentMethodIdeal¶
PaymentMethodIdeal represents the iDEAL-specific properties.
typePaymentMethodIdealParams¶
type PaymentMethodIdealParams struct {Bank *string `form:"bank"`}PaymentMethodIdealParams is the set of parameters allowed for the `ideal` hash when creating aPaymentMethod of type ideal.
typePaymentMethodList¶
type PaymentMethodList struct {ListMetaData []*PaymentMethod `json:"data"`}PaymentMethodList is a list of PaymentMethods as retrieved from a list endpoint.
typePaymentMethodListParams¶
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.
typePaymentMethodParams¶
type PaymentMethodParams struct {Params `form:"*"`AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"`BillingDetails *BillingDetailsParams `form:"billing_details"`Card *PaymentMethodCardParams `form:"card"`FPX *PaymentMethodFPXParams `form:"fpx"`SepaDebit *PaymentMethodSepaDebitParams `form:"sepa_debit"`Type *string `form:"type"`// The following parameters are used when cloning a PaymentMethod to the connected accountCustomer *string `form:"customer"`PaymentMethod *string `form:"payment_method"`}PaymentMethodParams is the set of parameters that can be used when creating or updating aPaymentMethod.
typePaymentMethodSepaDebit¶
type PaymentMethodSepaDebit struct {BankCodestring `json:"bank_code"`BranchCodestring `json:"branch_code"`Countrystring `json:"country"`Fingerprintstring `json:"fingerprint"`Last4string `json:"last4"`}PaymentMethodSepaDebit represents the SEPA-debit-specific properties.
typePaymentMethodSepaDebitParams¶
type PaymentMethodSepaDebitParams struct {Iban *string `form:"iban"`}PaymentMethodSepaDebitParams is the set of parameters allowed for the `sepa_debit` hash whencreating a PaymentMethod of type sepa_debit.
typePaymentMethodType¶
type PaymentMethodTypestring
PaymentMethodType is the list of allowed values for the payment method type.
const (PaymentMethodTypeAUBECSDebitPaymentMethodType = "au_becs_debit"PaymentMethodTypeCardPaymentMethodType = "card"PaymentMethodTypeCardPresentPaymentMethodType = "card_present"PaymentMethodTypeFPXPaymentMethodType = "fpx"PaymentMethodTypeIdealPaymentMethodType = "ideal"PaymentMethodTypeSepaDebitPaymentMethodType = "sepa_debit")
List of values that PaymentMethodType can take.
typePaymentSource¶
type PaymentSource struct {BankAccount *BankAccount `json:"-"`BitcoinReceiver *BitcoinReceiver `json:"-"`Card *Card `json:"-"`Deletedbool `json:"deleted"`IDstring `json:"id"`SourceObject *Source `json:"-"`TypePaymentSourceType `json:"object"`}PaymentSource describes the payment source used to make a Charge.The Type should indicate which object is fleshed out (eg. BitcoinReceiver or Card)For more details seehttps://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 typeof 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 specifictype of payment instrument it refers to is specified in the JSON
typePaymentSourceType¶
type PaymentSourceTypestring
PaymentSourceType consts represent valid payment sources.
const (PaymentSourceTypeAccountPaymentSourceType = "account"PaymentSourceTypeBankAccountPaymentSourceType = "bank_account"PaymentSourceTypeBitcoinReceiverPaymentSourceType = "bitcoin_receiver"PaymentSourceTypeCardPaymentSourceType = "card"PaymentSourceTypeObjectPaymentSourceType = "source")
List of values that PaymentSourceType can take.
typePayout¶
type Payout struct {Amountint64 `json:"amount"`ArrivalDateint64 `json:"arrival_date"`Automaticbool `json:"automatic"`BalanceTransaction *BalanceTransaction `json:"balance_transaction"`BankAccount *BankAccount `json:"bank_account"`Card *Card `json:"card"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Description *string `json:"description"`Destination *PayoutDestination `json:"destination"`FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"`FailureCodePayoutFailureCode `json:"failure_code"`FailureMessagestring `json:"failure_message"`IDstring `json:"id"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`MethodPayoutMethodType `json:"method"`SourceTypePayoutSourceType `json:"source_type"`StatementDescriptorstring `json:"statement_descriptor"`StatusPayoutStatus `json:"status"`TypePayoutType `json:"type"`}Payout is the resource representing a Stripe payout.For more details seehttps://stripe.com/docs/api#payouts.
func (*Payout)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Payout.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typePayoutDestination¶
type PayoutDestination struct {BankAccount *BankAccount `json:"-"`Card *Card `json:"-"`IDstring `json:"id"`TypePayoutDestinationType `json:"object"`}PayoutDestination describes the destination of a Payout.The Type should indicate which object is fleshed outFor more details seehttps://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 specifictype of destination it refers to is specified in the JSON
typePayoutDestinationType¶
type PayoutDestinationTypestring
PayoutDestinationType consts represent valid payout destinations.
const (PayoutDestinationTypeBankAccountPayoutDestinationType = "bank_account"PayoutDestinationTypeCardPayoutDestinationType = "card")
List of values that PayoutDestinationType can take.
typePayoutFailureCode¶
type PayoutFailureCodestring
PayoutFailureCode is the list of allowed values for the payout's failure code.
const (PayoutFailureCodeAccountClosedPayoutFailureCode = "account_closed"PayoutFailureCodeAccountFrozenPayoutFailureCode = "account_frozen"PayoutFailureCodeBankAccountRestrictedPayoutFailureCode = "bank_account_restricted"PayoutFailureCodeBankOwnershipChangedPayoutFailureCode = "bank_ownership_changed"PayoutFailureCodeCouldNotProcessPayoutFailureCode = "could_not_process"PayoutFailureCodeDebitNotAuthorizedPayoutFailureCode = "debit_not_authorized"PayoutFailureCodeInsufficientFundsPayoutFailureCode = "insufficient_funds"PayoutFailureCodeInvalidAccountNumberPayoutFailureCode = "invalid_account_number"PayoutFailureCodeInvalidCurrencyPayoutFailureCode = "invalid_currency"PayoutFailureCodeNoAccountPayoutFailureCode = "no_account")
List of values that PayoutFailureCode can take.
typePayoutInterval¶
type PayoutIntervalstring
PayoutInterval describes the payout interval.
const (PayoutIntervalDailyPayoutInterval = "daily"PayoutIntervalManualPayoutInterval = "manual"PayoutIntervalMonthlyPayoutInterval = "monthly"PayoutIntervalWeeklyPayoutInterval = "weekly")
List of values that PayoutInterval can take.
typePayoutList¶
PayoutList is a list of payouts as retrieved from a list endpoint.
typePayoutListParams¶
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 seehttps://stripe.com/docs/api#list_payouts.
typePayoutMethodType¶
type PayoutMethodTypestring
PayoutMethodType represents the type of payout
const (PayoutMethodInstantPayoutMethodType = "instant"PayoutMethodStandardPayoutMethodType = "standard")
List of values that PayoutMethodType can take.
typePayoutParams¶
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 seehttps://stripe.com/docs/api#create_payout andhttps://stripe.com/docs/api#update_payout.
typePayoutScheduleParams¶
type PayoutScheduleParams struct {DelayDays *int64 `form:"delay_days"`DelayDaysMinimum *bool `form:"-"`// See custom AppendToInterval *string `form:"interval"`MonthlyAnchor *int64 `form:"monthly_anchor"`WeeklyAnchor *string `form:"weekly_anchor"`}PayoutScheduleParams are the parameters allowed for payout schedules.
typePayoutSourceType¶
type PayoutSourceTypestring
PayoutSourceType is the list of allowed values for the payout's source_type field.
const (PayoutSourceTypeAlipayAccountPayoutSourceType = "alipay_account"PayoutSourceTypeBankAccountPayoutSourceType = "bank_account"PayoutSourceTypeBitcoinReceiverPayoutSourceType = "bitcoin_receiver"PayoutSourceTypeCardPayoutSourceType = "card"PayoutSourceTypeFPXPayoutSourceType = "fpx")
List of values that PayoutSourceType can take.
typePayoutStatus¶
type PayoutStatusstring
PayoutStatus is the list of allowed values for the payout's status.
const (PayoutStatusCanceledPayoutStatus = "canceled"PayoutStatusFailedPayoutStatus = "failed"PayoutStatusInTransitPayoutStatus = "in_transit"PayoutStatusPaidPayoutStatus = "paid"PayoutStatusPendingPayoutStatus = "pending")
List of values that PayoutStatus can take.
typePayoutType¶
type PayoutTypestring
PayoutType is the list of allowed values for the payout's type.
const (PayoutTypeBankPayoutType = "bank_account"PayoutTypeCardPayoutType = "card")
List of values that PayoutType can take.
typePermissionError¶
type PermissionError struct {// contains filtered or unexported fields}PermissionError results when you attempt to make an API requestfor 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.
typePerson¶
type Person struct {Accountstring `json:"account"`Address *AccountAddress `json:"address"`AddressKana *AccountAddress `json:"address_kana"`AddressKanji *AccountAddress `json:"address_kanji"`Deletedbool `json:"deleted"`DOB *DOB `json:"dob"`Emailstring `json:"email"`FirstNamestring `json:"first_name"`FirstNameKanastring `json:"first_name_kana"`FirstNameKanjistring `json:"first_name_kanji"`Genderstring `json:"gender"`IDstring `json:"id"`IDNumberProvidedbool `json:"id_number_provided"`LastNamestring `json:"last_name"`LastNameKanastring `json:"last_name_kana"`LastNameKanjistring `json:"last_name_kanji"`MaidenNamestring `json:"maiden_name"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`Phonestring `json:"phone"`Relationship *Relationship `json:"relationship"`Requirements *Requirements `json:"requirements"`SSNLast4Providedbool `json:"ssn_last_4_provided"`Verification *PersonVerification `json:"verification"`}Person is the resource representing a Stripe person.For more details seehttps://stripe.com/docs/api#persons.
func (*Person)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Person.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typePersonList¶
PersonList is a list of persons as retrieved from a list endpoint.
typePersonListParams¶
type PersonListParams struct {ListParams `form:"*"`Account *string `form:"-"`// Included in URLRelationship *RelationshipListParams `form:"relationship"`}PersonListParams is the set of parameters that can be used when listing persons.For more detail seehttps://stripe.com/docs/api#list_persons.
typePersonParams¶
type PersonParams struct {Params `form:"*"`Account *string `form:"-"`// Included in URLAddress *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"`PersonToken *string `form:"person_token"`Phone *string `form:"phone"`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 seehttps://stripe.com/docs/api#create_person.
typePersonVerification¶
type PersonVerification struct {AdditionalDocument *PersonVerificationDocument `json:"additional_document"`Detailsstring `json:"details"`DetailsCodePersonVerificationDetailsCode `json:"details_code"`Document *PersonVerificationDocument `json:"document"`StatusIdentityVerificationStatus `json:"status"`}PersonVerification is the structure for a person's verification details.
typePersonVerificationDetailsCode¶
type PersonVerificationDetailsCodestring
PersonVerificationDetailsCode is a machine-readable code specifying the verification state of aperson.
const (PersonVerificationDetailsCodeFailedKeyedIdentityPersonVerificationDetailsCode = "failed_keyed_identity"PersonVerificationDetailsCodeFailedOtherPersonVerificationDetailsCode = "failed_other"PersonVerificationDetailsCodeScanNameMismatchPersonVerificationDetailsCode = "scan_name_mismatch")
List of values that IdentityVerificationDetailsCode can take.
typePersonVerificationDocument¶
type PersonVerificationDocument struct {Back *File `json:"back"`Detailsstring `json:"details"`DetailsCodeVerificationDocumentDetailsCode `json:"details_code"`Front *File `json:"front"`}PersonVerificationDocument represents the documents associated with a Person.
typePersonVerificationDocumentParams¶
type PersonVerificationDocumentParams struct {Back *string `form:"back"`Front *string `form:"front"`}PersonVerificationDocumentParams represents the parameters available for the document verifyinga person's identity.
typePersonVerificationParams¶
type PersonVerificationParams struct {AdditionalDocument *PersonVerificationDocumentParams `form:"additional_document"`Document *PersonVerificationDocumentParams `form:"document"`}PersonVerificationParams is used to represent parameters associated with a person's verificationdetails.
typePlan¶
type Plan struct {Activebool `json:"active"`AggregateUsagestring `json:"aggregate_usage"`Amountint64 `json:"amount"`AmountDecimalfloat64 `json:"amount_decimal,string"`BillingSchemePlanBillingScheme `json:"billing_scheme"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Deletedbool `json:"deleted"`IDstring `json:"id"`IntervalPlanInterval `json:"interval"`IntervalCountint64 `json:"interval_count"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Nicknamestring `json:"nickname"`Product *Product `json:"product"`Tiers []*PlanTier `json:"tiers"`TiersModestring `json:"tiers_mode"`TransformUsage *PlanTransformUsage `json:"transform_usage"`TrialPeriodDaysint64 `json:"trial_period_days"`UsageTypePlanUsageType `json:"usage_type"`}Plan is the resource representing a Stripe plan.For more details seehttps://stripe.com/docs/api#plans.
Example (List)¶
package mainimport ("log"stripe "github.com/stripe/stripe-go""github.com/stripe/stripe-go/plan")func main() {stripe.Key = "sk_key"params := &stripe.PlanListParams{}params.Filters.AddFilter("limit", "", "3")params.Single = trueit := plan.List(params)for it.Next() {log.Printf("%v ", it.Plan().Nickname)}if err := it.Err(); err != nil {log.Fatal(err)}}func (*Plan)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Plan.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typePlanAggregateUsage¶
type PlanAggregateUsagestring
PlanAggregateUsage is the list of allowed values for a plan's aggregate usage.
const (PlanAggregateUsageLastDuringPeriodPlanAggregateUsage = "last_during_period"PlanAggregateUsageLastEverPlanAggregateUsage = "last_ever"PlanAggregateUsageMaxPlanAggregateUsage = "max"PlanAggregateUsageSumPlanAggregateUsage = "sum")
List of values that PlanAggregateUsage can take.
typePlanBillingScheme¶
type PlanBillingSchemestring
PlanBillingScheme is the list of allowed values for a plan's billing scheme.
const (PlanBillingSchemePerUnitPlanBillingScheme = "per_unit"PlanBillingSchemeTieredPlanBillingScheme = "tiered")
List of values that PlanBillingScheme can take.
typePlanInterval¶added inv1.0.1
type PlanIntervalstring
PlanInterval is the list of allowed values for a plan's interval.
const (PlanIntervalDayPlanInterval = "day"PlanIntervalWeekPlanInterval = "week"PlanIntervalMonthPlanInterval = "month"PlanIntervalYearPlanInterval = "year")
List of values that PlanInterval can take.
typePlanListParams¶
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 seehttps://stripe.com/docs/api#list_plans.
typePlanParams¶
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 seehttps://stripe.com/docs/api#create_plan andhttps://stripe.com/docs/api#update_plan.
typePlanProductParams¶
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 planThis can only be used on plan creation and won't work on plan update.For more details seehttps://stripe.com/docs/api#create_plan-product andhttps://stripe.com/docs/api#update_plan-product
typePlanTier¶
type PlanTier struct {FlatAmountint64 `json:"flat_amount"`FlatAmountDecimalfloat64 `json:"flat_amount_decimal,string"`UnitAmountint64 `json:"unit_amount"`UnitAmountDecimalfloat64 `json:"unit_amount_decimal,string"`UpToint64 `json:"up_to"`}PlanTier configures tiered pricing
typePlanTierParams¶
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 AppendToUpToInf *bool `form:"-"`// handled in custom AppendTo}PlanTierParams configures tiered pricing
typePlanTiersMode¶
type PlanTiersModestring
PlanTiersMode is the list of allowed values for a plan's tiers mode.
const (PlanTiersModeGraduatedPlanTiersMode = "graduated"PlanTiersModeVolumePlanTiersMode = "volume")
List of values that PlanTiersMode can take.
typePlanTransformUsage¶
type PlanTransformUsage struct {DivideByint64 `json:"divide_by"`RoundPlanTransformUsageRound `json:"round"`}PlanTransformUsage represents the bucket billing configuration.
typePlanTransformUsageParams¶
type PlanTransformUsageParams struct {DivideBy *int64 `form:"divide_by"`Round *string `form:"round"`}PlanTransformUsageParams represents the bucket billing configuration.
typePlanTransformUsageRound¶
type PlanTransformUsageRoundstring
PlanTransformUsageRound is the list of allowed values for a plan's transform usage round logic.
const (PlanTransformUsageRoundDownPlanTransformUsageRound = "down"PlanTransformUsageRoundUpPlanTransformUsageRound = "up")
List of values that PlanTransformUsageRound can take.
typePlanUsageType¶
type PlanUsageTypestring
PlanUsageType is the list of allowed values for a plan's usage type.
const (PlanUsageTypeLicensedPlanUsageType = "licensed"PlanUsageTypeMeteredPlanUsageType = "metered")
List of values that PlanUsageType can take.
typePrintfer¶
type Printfer interface {Printf(formatstring, v ...interface{})}Printfer is an interface to be implemented by Logger.
var LoggerPrintferLogger controls how stripe performs logging at a package level. It is usefulto customise if you need it prefixed for your application to meet otherrequirements.
This Logger will be inherited by any backends created by default, but willbe overridden if a backend is created with GetBackendWithConfig with acustom Logger set.
Deprecated: Logging should be configured with DefaultLeveledLogger instead.
typeProduct¶
type Product struct {Activebool `json:"active"`Attributes []string `json:"attributes"`Captionstring `json:"caption"`Createdint64 `json:"created"`DeactivateOn []string `json:"deactivate_on"`Descriptionstring `json:"description"`IDstring `json:"id"`Images []string `json:"images"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Namestring `json:"name"`PackageDimensions *PackageDimensions `json:"package_dimensions"`Shippablebool `json:"shippable"`StatementDescriptorstring `json:"statement_descriptor"`TypeProductType `json:"type"`UnitLabelstring `json:"unit_label"`URLstring `json:"url"`Updatedint64 `json:"updated"`}Product is the resource representing a Stripe product.For more details seehttps://stripe.com/docs/api#products.
func (*Product)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Product.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeProductList¶
ProductList is a list of products as retrieved from a list endpoint.
typeProductListParams¶
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"`URL *string `form:"url"`Type *string `form:"type"`}ProductListParams is the set of parameters that can be used when listing products.
typeProductParams¶
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.
typeProductType¶
type ProductTypestring
ProductType is the type of a product.
const (ProductTypeGoodProductType = "good"ProductTypeServiceProductType = "service")
List of values that ProductType can take.
typeRadarEarlyFraudWarning¶
type RadarEarlyFraudWarning struct {Actionablebool `json:"actionable"`Charge *Charge `json:"charge"`Createdint64 `json:"created"`FraudTypeRadarEarlyFraudWarningFraudType `json:"fraud_type"`IDstring `json:"id"`Livemodebool `json:"livemode"`}RadarEarlyFraudWarning is the resource representing an early fraud warning. Formore details seehttps://stripe.com/docs/api/early_fraud_warnings/object.
typeRadarEarlyFraudWarningFraudType¶
type RadarEarlyFraudWarningFraudTypestring
RadarEarlyFraudWarningFraudType are strings that map to the type of fraud labelled by the issuer.
const (RadarEarlyFraudWarningFraudTypeCardNeverReceivedRadarEarlyFraudWarningFraudType = "card_never_received"RadarEarlyFraudWarningFraudTypeFraudulentCardApplicationRadarEarlyFraudWarningFraudType = "fraudulent_card_application"RadarEarlyFraudWarningFraudTypeMadeWithCounterfeitCardRadarEarlyFraudWarningFraudType = "made_with_counterfeit_card"RadarEarlyFraudWarningFraudTypeMadeWithLostCardRadarEarlyFraudWarningFraudType = "made_with_lost_card"RadarEarlyFraudWarningFraudTypeMadeWithStolenCardRadarEarlyFraudWarningFraudType = "made_with_stolen_card"RadarEarlyFraudWarningFraudTypeMiscRadarEarlyFraudWarningFraudType = "misc"RadarEarlyFraudWarningFraudTypeUnauthorizedUseOfCardRadarEarlyFraudWarningFraudType = "unauthorized_use_of_card")
List of values that RadarEarlyFraudWarningFraudType can take.
typeRadarEarlyFraudWarningList¶
type RadarEarlyFraudWarningList struct {ListMetaValues []*RadarEarlyFraudWarning `json:"data"`}RadarEarlyFraudWarningList is a list of early fraud warnings as retrieved from alist endpoint.
typeRadarEarlyFraudWarningListParams¶
type RadarEarlyFraudWarningListParams struct {ListParams `form:"*"`Charge *string `form:"charge"`}RadarEarlyFraudWarningListParams is the set of parameters that can be used whenlisting early fraud warnings. For more details seehttps://stripe.com/docs/api/early_fraud_warnings/list.
typeRadarEarlyFraudWarningParams¶
type RadarEarlyFraudWarningParams struct {Params `form:"*"`}RadarEarlyFraudWarningParams is the set of parameters that can be used whenretrieving early fraud warnings. For more details seehttps://stripe.com/docs/api/early_fraud_warnings/retrieve.
typeRadarValueList¶
type RadarValueList struct {Aliasstring `json:"alias"`Createdint64 `json:"created"`CreatedBystring `json:"created_by"`Deletedbool `json:"deleted"`IDstring `json:"id"`ItemTypeRadarValueListItemType `json:"item_type"`ListItems *RadarValueListItemList `json:"list_items"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Namestring `json:"name"`Objectstring `json:"object"`Updatedint64 `json:"updated"`UpdatedBystring `json:"updated_by"`}RadarValueList is the resource representing a value list.
typeRadarValueListItem¶
type RadarValueListItem struct {Createdint64 `json:"created"`CreatedBystring `json:"created_by"`Deletedbool `json:"deleted"`IDstring `json:"id"`Livemodebool `json:"livemode"`Namestring `json:"name"`Objectstring `json:"object"`Valuestring `json:"value"`RadarValueListstring `json:"value_list"`}RadarValueListItem is the resource representing a value list item.
typeRadarValueListItemList¶
type RadarValueListItemList struct {ListMetaData []*RadarValueListItem `json:"data"`}RadarValueListItemList is a list of value list items as retrieved from a list endpoint.
typeRadarValueListItemListParams¶
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.
typeRadarValueListItemParams¶
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.
typeRadarValueListItemType¶
type RadarValueListItemTypestring
RadarValueListItemType is the possible values for a type of value list items.
const (RadarValueListItemTypeCardBinRadarValueListItemType = "card_bin"RadarValueListItemTypeCardFingerprintRadarValueListItemType = "card_fingerprint"RadarValueListItemTypeCountryRadarValueListItemType = "country"RadarValueListItemTypeEmailRadarValueListItemType = "email"RadarValueListItemTypeIPAddressRadarValueListItemType = "ip_address"RadarValueListItemTypeStringRadarValueListItemType = "string"RadarValueListItemTypeCaseSensitiveStringRadarValueListItemType = "case_sensitive_string")
List of values that RadarValueListItemType can take.
typeRadarValueListList¶
type RadarValueListList struct {ListMetaData []*RadarValueList `json:"data"`}RadarValueListList is a list of value lists as retrieved from a list endpoint.
typeRadarValueListListParams¶
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.
typeRadarValueListParams¶
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.
typeRangeQueryParams¶
type RangeQueryParams struct {// GreaterThan specifies that values should be a greater than this// timestamp.GreaterThanint64 `form:"gt"`// GreaterThanOrEqual specifies that values should be greater than or equal// to this timestamp.GreaterThanOrEqualint64 `form:"gte"`// LesserThan specifies that values should be lesser than this timetamp.LesserThanint64 `form:"lt"`// LesserThanOrEqual specifies that values should be lesser than or// equalthis timetamp.LesserThanOrEqualint64 `form:"lte"`}RangeQueryParams are a set of generic request parameters that are used onlist endpoints to filter their results by some timestamp.
typeRateLimitError¶
type RateLimitError struct {// contains filtered or unexported fields}RateLimitError occurs when the Stripe API is hit to with too many requeststoo 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.
typeReceiverFlow¶
type ReceiverFlow struct {Addressstring `json:"address"`AmountChargedint64 `json:"amount_charged"`AmountReceivedint64 `json:"amount_received"`AmountReturnedint64 `json:"amount_returned"`RefundAttributesMethodSourceRefundAttributesMethod `json:"refund_attributes_method"`RefundAttributesStatusSourceRefundAttributesStatus `json:"refund_attributes_status"`}ReceiverFlow informs of the state of a receiver authentication flow.
typeRecipient¶
type Recipient struct {ActiveAccount *BankAccount `json:"active_account"`Cards *CardList `json:"cards"`Createdint64 `json:"created"`DefaultCard *Card `json:"default_card"`Deletedbool `json:"deleted"`Descriptionstring `json:"description"`Emailstring `json:"email"`IDstring `json:"id"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`MigratedTo *Account `json:"migrated_to"`Namestring `json:"name"`TypeRecipientType `json:"type"`}Recipient is the resource representing a Stripe recipient.For more details seehttps://stripe.com/docs/api#recipients.
func (*Recipient)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Recipient.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeRecipientList¶
RecipientList is a list of recipients as retrieved from a list endpoint.
typeRecipientListParams¶
type RecipientListParams struct {ListParams `form:"*"`Verified *bool `form:"verified"`}RecipientListParams is the set of parameters that can be used when listing recipients.For more details seehttps://stripe.com/docs/api#list_recipients.
typeRecipientParams¶
type RecipientParams struct {Params `form:"*"`BankAccount *BankAccountParams `form:"-"`// Kind of an abberation because a bank account's token will be replace the rest of its data. Keep this in a custom AppendTo for now.Card *CardParams `form:"card"`DefaultCard *string `form:"default_card"`Description *string `form:"description"`Email *string `form:"email"`Name *string `form:"name"`TaxID *string `form:"tax_id"`Token *string `form:"card"`Type *string `form:"-"`// Doesn't seem to be used anywhere}RecipientParams is the set of parameters that can be used when creating or updating recipients.For more details seehttps://stripe.com/docs/api#create_recipient andhttps://stripe.com/docs/api#update_recipient.
typeRecipientTransfer¶
type RecipientTransfer struct {Amountint64 `json:"amount"`AmountReversedint64 `json:"amount_reversed"`BalanceTransaction *BalanceTransaction `json:"balance_transaction"`BankAccount *BankAccount `json:"bank_account"`Card *Card `json:"card"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Dateint64 `json:"date"`Descriptionstring `json:"description"`Destinationstring `json:"destination"`FailureCodeRecipientTransferFailureCode `json:"failure_code"`FailureMessagestring `json:"failure_message"`IDstring `json:"id"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`MethodRecipientTransferMethodType `json:"method"`Recipient *Recipient `json:"recipient"`Reversals *ReversalList `json:"reversals"`Reversedbool `json:"reversed"`SourceTransaction *BalanceTransactionSource `json:"source_transaction"`SourceTypeRecipientTransferSourceType `json:"source_type"`StatementDescriptorstring `json:"statement_descriptor"`StatusRecipientTransferStatus `json:"status"`TypeRecipientTransferType `json:"type"`}RecipientTransfer is the resource representing a Stripe recipient_transfer.For more details seehttps://stripe.com/docs/api#recipient_transfers.
func (*RecipientTransfer)UnmarshalJSON¶
func (t *RecipientTransfer) UnmarshalJSON(data []byte)error
UnmarshalJSON handles deserialization of a RecipientTransfer.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeRecipientTransferDestination¶
type RecipientTransferDestination struct {BankAccount *BankAccount `json:"-"`Card *Card `json:"-"`IDstring `json:"id"`TypeRecipientTransferDestinationType `json:"object"`}RecipientTransferDestination describes the destination of a RecipientTransfer.The Type should indicate which object is fleshed outFor more details seehttps://stripe.com/docs/api/go#recipient_transfer_object
func (*RecipientTransferDestination)UnmarshalJSON¶
func (d *RecipientTransferDestination) UnmarshalJSON(data []byte)error
UnmarshalJSON handles deserialization of a RecipientTransferDestination.This custom unmarshaling is needed because the specifictype of destination it refers to is specified in the JSON
typeRecipientTransferDestinationType¶
type RecipientTransferDestinationTypestring
RecipientTransferDestinationType consts represent valid recipient_transfer destinations.
const (RecipientTransferDestinationBankAccountRecipientTransferDestinationType = "bank_account"RecipientTransferDestinationCardRecipientTransferDestinationType = "card")
List of values that RecipientTransferDestinationType can take.
typeRecipientTransferFailureCode¶
type RecipientTransferFailureCodestring
RecipientTransferFailureCode is the list of allowed values for the recipient_transfer's failure code.
const (RecipientTransferFailureCodeAccountClosedRecipientTransferFailureCode = "account_closed"RecipientTransferFailureCodeAccountFrozenRecipientTransferFailureCode = "account_frozen"RecipientTransferFailureCodeBankAccountRestrictedRecipientTransferFailureCode = "bank_account_restricted"RecipientTransferFailureCodeBankOwnershipChangedRecipientTransferFailureCode = "bank_ownership_changed"RecipientTransferFailureCodeDebitNotAuthorizedRecipientTransferFailureCode = "debit_not_authorized"RecipientTransferFailureCodeCouldNotProcessRecipientTransferFailureCode = "could_not_process"RecipientTransferFailureCodeInsufficientFundsRecipientTransferFailureCode = "insufficient_funds"RecipientTransferFailureCodeInvalidAccountNumberRecipientTransferFailureCode = "invalid_account_number"RecipientTransferFailureCodeInvalidCurrencyRecipientTransferFailureCode = "invalid_currency"RecipientTransferFailureCodeNoAccountRecipientTransferFailureCode = "no_account")
List of values that RecipientTransferFailureCode can take.
typeRecipientTransferMethodType¶
type RecipientTransferMethodTypestring
RecipientTransferMethodType represents the type of recipient_transfer
const (RecipientTransferMethodInstantRecipientTransferMethodType = "instant"RecipientTransferMethodStandardRecipientTransferMethodType = "standard")
List of values that RecipientTransferMethodType can take.
typeRecipientTransferSourceType¶
type RecipientTransferSourceTypestring
RecipientTransferSourceType is the list of allowed values for the recipient_transfer's source_type field.
const (RecipientTransferSourceTypeAlipayAccountRecipientTransferSourceType = "alipay_account"RecipientTransferSourceTypeBankAccountRecipientTransferSourceType = "bank_account"RecipientTransferSourceTypeBitcoinReceiverRecipientTransferSourceType = "bitcoin_receiver"RecipientTransferSourceTypeCardRecipientTransferSourceType = "card")
List of values that RecipientTransferSourceType can take.
typeRecipientTransferStatus¶
type RecipientTransferStatusstring
RecipientTransferStatus is the list of allowed values for the recipient_transfer's status.
const (RecipientTransferStatusFailedRecipientTransferStatus = "failed"RecipientTransferStatusInTransitRecipientTransferStatus = "in_transit"RecipientTransferStatusPaidRecipientTransferStatus = "paid"RecipientTransferStatusPendingRecipientTransferStatus = "pending")
List of values that RecipientTransferStatus can take.
typeRecipientTransferType¶
type RecipientTransferTypestring
RecipientTransferType is the list of allowed values for the recipient_transfer's type.
const (RecipientTransferTypeBankAccountRecipientTransferType = "bank_account"RecipientTransferTypeCardRecipientTransferType = "card")
List of values that RecipientTransferType can take.
typeRecipientType¶
type RecipientTypestring
RecipientType is the list of allowed values for the recipient's type.
const (RecipientTypeIndividualRecipientType = "individual"RecipientTypeCorporationRecipientType = "corporation")
List of values that RecipientType can take.
typeRedirectFlow¶
type RedirectFlow struct {FailureReasonSourceRedirectFlowFailureReason `json:"failure_reason"`ReturnURLstring `json:"return_url"`StatusSourceRedirectFlowStatus `json:"status"`URLstring `json:"url"`}RedirectFlow informs of the state of a redirect authentication flow.
typeRedirectParams¶
type RedirectParams struct {ReturnURL *string `form:"return_url"`}RedirectParams is the set of parameters allowed for the redirect hash onsource creation or update.
typeRefund¶
type Refund struct {Amountint64 `json:"amount"`BalanceTransaction *BalanceTransaction `json:"balance_transaction"`Charge *Charge `json:"charge"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`FailureReasonRefundFailureReason `json:"failure_reason"`FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"`IDstring `json:"id"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`PaymentIntent *PaymentIntent `json:"payment_intent"`ReasonRefundReason `json:"reason"`ReceiptNumberstring `json:"receipt_number"`SourceTransferReversal *Reversal `json:"source_transfer_reversal"`StatusRefundStatus `json:"status"`TransferReversal *Reversal `json:"transfer_reversal"`}Refund is the resource representing a Stripe refund.For more details seehttps://stripe.com/docs/api#refunds.
func (*Refund)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Refund.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeRefundFailureReason¶
type RefundFailureReasonstring
RefundFailureReason is, if set, the reason the refund failed.
const (RefundFailureReasonExpiredOrCanceledCardRefundFailureReason = "expired_or_canceled_card"RefundFailureReasonLostOrStolenCardRefundFailureReason = "lost_or_stolen_card"RefundFailureReasonUnknownRefundFailureReason = "unknown")
List of values that RefundFailureReason can take.
typeRefundList¶
RefundList is a list object for refunds.
typeRefundListParams¶
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 seehttps://stripe.com/docs/api#list_refunds.
typeRefundParams¶
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 seehttps://stripe.com/docs/api#refund.
typeRefundReason¶
type RefundReasonstring
RefundReason is, if set, the reason the refund is being made
const (RefundReasonDuplicateRefundReason = "duplicate"RefundReasonExpiredUncapturedChargeRefundReason = "expired_uncaptured_charge"RefundReasonFraudulentRefundReason = "fraudulent"RefundReasonRequestedByCustomerRefundReason = "requested_by_customer")
List of values that RefundReason can take.
typeRefundStatus¶
type RefundStatusstring
RefundStatus is the status of the refund.
const (RefundStatusCanceledRefundStatus = "canceled"RefundStatusFailedRefundStatus = "failed"RefundStatusPendingRefundStatus = "pending"RefundStatusSucceededRefundStatus = "succeeded")
List of values that RefundStatus can take.
typeRelationship¶
type Relationship struct {Directorbool `json:"director"`Executivebool `json:"executive"`Ownerbool `json:"owner"`PercentOwnershipfloat64 `json:"percent_ownership"`Representativebool `json:"representative"`Titlestring `json:"title"`}Relationship represents how the Person relates to the business.
typeRelationshipListParams¶
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
typeRelationshipParams¶
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.
typeReportRun¶
type ReportRun struct {Createdint64 `json:"created"`Errorstring `json:"error"`IDstring `json:"id"`Livemodebool `json:"livemode"`Objectstring `json:"object"`Parameters *ReportRunParameters `json:"parameters"`ReportTypestring `json:"report_type"`Result *File `json:"result"`StatusReportRunStatus `json:"status"`SucceededAtint64 `json:"succeeded_at"`}ReportRun is the resource representing a report run.
typeReportRunList¶
ReportRunList is a list of report runs as retrieved from a list endpoint.
typeReportRunListParams¶
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.
typeReportRunParameters¶
type ReportRunParameters struct {Columns []string `json:"columns"`ConnectedAccountstring `json:"connected_account"`CurrencyCurrency `json:"currency"`IntervalEndint64 `json:"interval_end"`IntervalStartint64 `json:"interval_start"`Payoutstring `json:"payout"`ReportingCategorystring `json:"reporting_category"`Timezonestring `json:"timezone"`}ReportRunParameters describes the parameters hash on a report run.
typeReportRunParametersParams¶
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.
typeReportRunParams¶
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.
typeReportRunStatus¶
type ReportRunStatusstring
ReportRunStatus is the possible values for status on a report run.
const (ReportRunStatusFailedReportRunStatus = "failed"ReportRunStatusPendingReportRunStatus = "pending"ReportRunStatusSucceededReportRunStatus = "succeeded")
List of values that ReportRunStatus can take.
typeReportType¶
type ReportType struct {DefaultColumns []string `json:"default_columns"`Createdint64 `json:"created"`DataAvailableEndint64 `json:"data_available_end"`DataAvailableStartint64 `json:"data_available_start"`IDstring `json:"id"`Namestring `json:"name"`Objectstring `json:"object"`Updatedint64 `json:"updated"`Versionint64 `json:"version"`}ReportType is the resource representing a report type.
typeReportTypeList¶
type ReportTypeList struct {ListMetaData []*ReportType `json:"data"`}ReportTypeList is a list of report types as retrieved from a list endpoint.
typeReportTypeListParams¶
type ReportTypeListParams struct {ListParams `form:"*"`}ReportTypeListParams is the set of parameters that can be used when listing report types.
typeReportTypeParams¶
type ReportTypeParams struct {Params `form:"*"`}ReportTypeParams is the set of parameters that can be used when retrieving a report type.
typeRequirements¶
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.
typeReversal¶
type Reversal struct {Amountint64 `json:"amount"`BalanceTransaction *BalanceTransaction `json:"balance_transaction"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Descriptionstring `json:"description"`DestinationPaymentRefund *Refund `json:"destination_payment_refund"`IDstring `json:"id"`Metadata map[string]string `json:"metadata"`SourceRefund *Refund `json:"source_refund"`Transferstring `json:"transfer"`}Reversal represents a transfer reversal.
func (*Reversal)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Reversal.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeReversalList¶
ReversalList is a list of object for reversals.
typeReversalListParams¶
type ReversalListParams struct {ListParams `form:"*"`Transfer *string `form:"-"`// Included in URL}ReversalListParams is the set of parameters that can be used when listing reversals.
typeReversalParams¶
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.
typeReview¶
type Review struct {BillingZipstring `json:"billing_zip"`Charge *Charge `json:"charge"`ClosedReasonReviewClosedReason `json:"closed_reason"`Createdint64 `json:"created"`IDstring `json:"id"`IPAddressstring `json:"ip_address"`IPAddressLocation *ReviewIPAddressLocation `json:"ip_address_location"`Livemodebool `json:"livemode"`Objectstring `json:"object"`Openbool `json:"open"`OpenedReasonReviewOpenedReason `json:"opened_reason"`PaymentIntent *PaymentIntent `json:"payment_intent"`ReasonReviewReasonType `json:"reason"`Session *ReviewSession `json:"session"`}Review is the resource representing a Radar review.For more details seehttps://stripe.com/docs/api#reviews.
func (*Review)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Review.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeReviewApproveParams¶
type ReviewApproveParams struct {Params `form:"*"`}ReviewApproveParams is the set of parameters that can be used when approving a review.
typeReviewClosedReason¶
type ReviewClosedReasonstring
ReviewClosedReason describes the reason why the review is closed.
const (ReviewClosedReasonApprovedReviewClosedReason = "approved"ReviewClosedReasonDisputedReviewClosedReason = "disputed"ReviewClosedReasonRefundedReviewClosedReason = "refunded"ReviewClosedReasonRefundedAsFraudReviewClosedReason = "refunded_as_fraud")
List of values that ReviewClosedReason can take.
typeReviewIPAddressLocation¶
type ReviewIPAddressLocation struct {Citystring `json:"city"`Countrystring `json:"country"`Latitudefloat64 `json:"latitude"`Longitudefloat64 `json:"longitude"`Regionstring `json:"region"`}ReviewIPAddressLocation represents information about the IP associated with a review.
typeReviewList¶
ReviewList is a list of reviews as retrieved from a list endpoint.
typeReviewListParams¶
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.
typeReviewOpenedReason¶
type ReviewOpenedReasonstring
ReviewOpenedReason describes the reason why the review is opened.
const (ReviewOpenedReasonManualReviewOpenedReason = "manual"ReviewOpenedReasonRuleReviewOpenedReason = "rule")
List of values that ReviewOpenedReason can take.
typeReviewParams¶
type ReviewParams struct {Params `form:"*"`}ReviewParams is the set of parameters that can be used when approving a review.
typeReviewReasonType¶
type ReviewReasonTypestring
ReviewReasonType describes the reason why the review is open or closed.
const (ReviewReasonApprovedReviewReasonType = "approved"ReviewReasonDisputedReviewReasonType = "disputed"ReviewReasonManualReviewReasonType = "manual"ReviewReasonRefundedReviewReasonType = "refunded"ReviewReasonRefundedAsFraudReviewReasonType = "refunded_as_fraud"ReviewReasonRuleReviewReasonType = "rule")
List of values that ReviewReasonType can take.
typeReviewSession¶
type ReviewSession struct {Browserstring `json:"browser"`Devicestring `json:"device"`Platformstring `json:"platform"`Versionstring `json:"version"`}ReviewSession represents information about the browser session associated with a review.
typeSKU¶
type SKU struct {Activebool `json:"active"`Attributes map[string]string `json:"attributes"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Descriptionstring `json:"description"`IDstring `json:"id"`Imagestring `json:"image"`Inventory *Inventory `json:"inventory"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`PackageDimensions *PackageDimensions `json:"package_dimensions"`Priceint64 `json:"price"`Product *Product `json:"product"`Updatedint64 `json:"updated"`}SKU is the resource representing a SKU.For more details seehttps://stripe.com/docs/api#skus.
func (*SKU)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a SKU.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeSKUInventoryType¶
type SKUInventoryTypestring
SKUInventoryType describe's the possible value for inventory type
const (SKUInventoryTypeBucketSKUInventoryType = "bucket"SKUInventoryTypeFiniteSKUInventoryType = "finite"SKUInventoryTypeInfiniteSKUInventoryType = "infinite")
List of values that SKUInventoryType can take.
typeSKUInventoryValue¶
type SKUInventoryValuestring
SKUInventoryValue describe's the possible value for inventory value
const (SKUInventoryValueInStockSKUInventoryValue = "in_stock"SKUInventoryValueLimitedSKUInventoryValue = "limited"SKUInventoryValueOutOfStockSKUInventoryValue = "out_of_stock")
List of values that SKUInventoryValue can take.
typeSKUListParams¶
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.
typeSKUParams¶
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.
typeSetupIntent¶
type SetupIntent struct {Application *Application `json:"application"`CancellationReasonSetupIntentCancellationReason `json:"cancellation_reason"`ClientSecretstring `json:"client_secret"`Createdint64 `json:"created"`Customer *Customer `json:"customer"`Descriptionstring `json:"description"`IDstring `json:"id"`LastSetupError *Error `json:"last_setup_error"`Livemodebool `json:"livemode"`Mandate *Mandate `json:"mandate"`Metadata map[string]string `json:"metadata"`NextAction *SetupIntentNextAction `json:"next_action"`Objectstring `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"`StatusSetupIntentStatus `json:"status"`UsageSetupIntentUsage `json:"usage"`}SetupIntent is the resource representing a Stripe payout.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typeSetupIntentCancelParams¶
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.
typeSetupIntentCancellationReason¶
type SetupIntentCancellationReasonstring
SetupIntentCancellationReason is the list of allowed values for the cancelation reason.
const (SetupIntentCancellationReasonAbandonedSetupIntentCancellationReason = "abandoned"SetupIntentCancellationReasonFailedInvoiceSetupIntentCancellationReason = "failed_invoice"SetupIntentCancellationReasonFraudulentSetupIntentCancellationReason = "fraudulent"SetupIntentCancellationReasonRequestedByCustomerSetupIntentCancellationReason = "requested_by_customer")
List of values that SetupIntentCancellationReason can take.
typeSetupIntentConfirmParams¶
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.
typeSetupIntentList¶
type SetupIntentList struct {ListMetaData []*SetupIntent `json:"data"`}SetupIntentList is a list of setup intents as retrieved from a list endpoint.
typeSetupIntentListParams¶
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 seehttps://stripe.com/docs/api#list_payouts.
typeSetupIntentMandateDataCustomerAcceptanceOfflineParams¶
type SetupIntentMandateDataCustomerAcceptanceOfflineParams struct {}SetupIntentMandateDataCustomerAcceptanceOfflineParams is the set of parameters for the customeracceptance of an offline mandate.
typeSetupIntentMandateDataCustomerAcceptanceOnlineParams¶
type SetupIntentMandateDataCustomerAcceptanceOnlineParams struct {IPAddress *string `form:"ip_address"`UserAgent *string `form:"user_agent"`}SetupIntentMandateDataCustomerAcceptanceOnlineParams is the set of parameters for the customeracceptance of an online mandate.
typeSetupIntentMandateDataCustomerAcceptanceParams¶
type SetupIntentMandateDataCustomerAcceptanceParams struct {AcceptedAtint64 `form:"accepted_at"`Offline *SetupIntentMandateDataCustomerAcceptanceOfflineParams `form:"offline"`Online *SetupIntentMandateDataCustomerAcceptanceOnlineParams `form:"online"`TypeMandateCustomerAcceptanceType `form:"type"`}SetupIntentMandateDataCustomerAcceptanceParams is the set of parameters for the customeracceptance of a mandate.
typeSetupIntentMandateDataParams¶
type SetupIntentMandateDataParams struct {CustomerAcceptance *SetupIntentMandateDataCustomerAcceptanceParams `form:"customer_acceptance"`}SetupIntentMandateDataParams is the set of parameters controlling the creation of the mandateassociated with this SetupIntent.
typeSetupIntentNextAction¶
type SetupIntentNextAction struct {RedirectToURL *SetupIntentNextActionRedirectToURL `json:"redirect_to_url"`TypeSetupIntentNextActionType `json:"type"`}SetupIntentNextAction represents the type of action to take on a setup intent.
typeSetupIntentNextActionRedirectToURL¶
type SetupIntentNextActionRedirectToURL struct {ReturnURLstring `json:"return_url"`URLstring `json:"url"`}SetupIntentNextActionRedirectToURL represents the resource for the next action of type"redirect_to_url".
typeSetupIntentNextActionType¶
type SetupIntentNextActionTypestring
SetupIntentNextActionType is the list of allowed values for the next action's type.
const (SetupIntentNextActionTypeRedirectToURLSetupIntentNextActionType = "redirect_to_url")List of values that SetupIntentNextActionType can take.
typeSetupIntentParams¶
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.
typeSetupIntentPaymentMethodOptions¶
type SetupIntentPaymentMethodOptions struct {Card *SetupIntentPaymentMethodOptionsCard `json:"card"`}SetupIntentPaymentMethodOptions represents the type-specific payment method options applied to aSetupIntent.
typeSetupIntentPaymentMethodOptionsCard¶
type SetupIntentPaymentMethodOptionsCard struct {RequestThreeDSecureSetupIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`}SetupIntentPaymentMethodOptionsCard represents the card-specific options applied to aSetupIntent.
typeSetupIntentPaymentMethodOptionsCardParams¶
type SetupIntentPaymentMethodOptionsCardParams struct {MOTO *bool `form:"moto"`RequestThreeDSecure *string `form:"request_three_d_secure"`}SetupIntentPaymentMethodOptionsCardParams represents the card-specific options applied to aSetupIntent.
typeSetupIntentPaymentMethodOptionsCardRequestThreeDSecure¶
type SetupIntentPaymentMethodOptionsCardRequestThreeDSecurestring
SetupIntentPaymentMethodOptionsCardRequestThreeDSecure is the list of allowed values controllingwhen to request 3D Secure on a SetupIntent.
const (SetupIntentPaymentMethodOptionsCardRequestThreeDSecureAnySetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "any"SetupIntentPaymentMethodOptionsCardRequestThreeDSecureAutomaticSetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "automatic")
List of values that SetupIntentNextActionType can take.
typeSetupIntentPaymentMethodOptionsParams¶
type SetupIntentPaymentMethodOptionsParams struct {Card *SetupIntentPaymentMethodOptionsCardParams `form:"card"`}SetupIntentPaymentMethodOptionsParams represents the type-specific payment method optionsapplied to a SetupIntent.
typeSetupIntentSingleUseParams¶
type SetupIntentSingleUseParams struct {Amount *int64 `form:"amount"`Currency *string `form:"currency"`}SetupIntentSingleUseParams represents the single-use mandate-specific parameters.
typeSetupIntentStatus¶
type SetupIntentStatusstring
SetupIntentStatus is the list of allowed values for the setup intent's status.
const (SetupIntentStatusCanceledSetupIntentStatus = "canceled"SetupIntentStatusProcessingSetupIntentStatus = "processing"SetupIntentStatusRequiresActionSetupIntentStatus = "requires_action"SetupIntentStatusRequiresConfirmationSetupIntentStatus = "requires_confirmation"SetupIntentStatusRequiresPaymentMethodSetupIntentStatus = "requires_payment_method"SetupIntentStatusSucceededSetupIntentStatus = "succeeded")
List of values that SetupIntentStatus can take.
typeSetupIntentUsage¶
type SetupIntentUsagestring
SetupIntentUsage is the list of allowed values for the setup intent's usage.
const (SetupIntentUsageOffSessionSetupIntentUsage = "off_session"SetupIntentUsageOnSessionSetupIntentUsage = "on_session")
List of values that SetupIntentUsage can take.
typeShipping¶
type Shipping struct {Address *Address `json:"address"`Carrierstring `json:"carrier"`Namestring `json:"name"`Phonestring `json:"phone"`TrackingNumberstring `json:"tracking_number"`}Shipping describes the shipping hash on an order.
typeShippingDetails¶
type ShippingDetails struct {Address *Address `json:"address"`Carrierstring `json:"carrier"`Namestring `json:"name"`Phonestring `json:"phone"`TrackingNumberstring `json:"tracking_number"`}ShippingDetails is the structure containing shipping information.
typeShippingDetailsParams¶
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
typeShippingMethod¶
type ShippingMethod struct {Amountint64 `json:"amount"`IDstring `json:"id"`CurrencyCurrency `json:"currency"`DeliveryEstimate *DeliveryEstimate `json:"delivery_estimate"`Descriptionstring `json:"description"`}ShippingMethod describes a shipping method as available on an order.
typeShippingParams¶
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 hashon order creation.
typeSigmaScheduledQueryRun¶
type SigmaScheduledQueryRun struct {Createdint64 `json:"created"`DataLoadTimeint64 `json:"data_load_time"`Errorstring `json:"error"`File *File `json:"file"`IDstring `json:"id"`Livemodebool `json:"livemode"`Objectstring `json:"object"`ResultAvailableUntilint64 `json:"result_available_until"`SQLstring `json:"sql"`StatusSigmaScheduledQueryRunStatus `json:"status"`Querystring `json:"query"`}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 resultingproperty may be an id or the full struct if it was expanded.
typeSigmaScheduledQueryRunList¶
type SigmaScheduledQueryRunList struct {ListMetaData []*SigmaScheduledQueryRun `json:"data"`}SigmaScheduledQueryRunList is a list of scheduled query runs as retrieved from a list endpoint.
typeSigmaScheduledQueryRunListParams¶
type SigmaScheduledQueryRunListParams struct {ListParams `form:"*"`}SigmaScheduledQueryRunListParams is the set of parameters that can be used when listing scheduled query runs.
typeSigmaScheduledQueryRunParams¶
type SigmaScheduledQueryRunParams struct {Params `form:"*"`}SigmaScheduledQueryRunParams is the set of parameters that can be used when updating a scheduled query run.
typeSigmaScheduledQueryRunStatus¶
type SigmaScheduledQueryRunStatusstring
SigmaScheduledQueryRunStatus is the possible values for status for a scheduled query run.
const (SigmaScheduledQueryRunStatusCanceledSigmaScheduledQueryRunStatus = "canceled"SigmaScheduledQueryRunStatusCompletedSigmaScheduledQueryRunStatus = "completed"SigmaScheduledQueryRunStatusFailedSigmaScheduledQueryRunStatus = "failed"SigmaScheduledQueryRunStatusTimedOutSigmaScheduledQueryRunStatus = "timed_out")
List of values that SigmaScheduledQueryRunStatus can take.
typeSource¶
type Source struct {Amountint64 `json:"amount"`ClientSecretstring `json:"client_secret"`CodeVerification *CodeVerificationFlow `json:"code_verification,omitempty"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Customerstring `json:"customer"`FlowSourceFlow `json:"flow"`IDstring `json:"id"`Livemodebool `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"`StatementDescriptorstring `json:"statement_descriptor"`SourceOrder *SourceSourceOrder `json:"source_order"`StatusSourceStatus `json:"status"`Typestring `json:"type"`TypeData map[string]interface{}UsageSourceUsage `json:"usage"`}Source is the resource representing a Source.For more details seehttps://stripe.com/docs/api#sources.
func (*Source)UnmarshalJSON¶
UnmarshalJSON handles deserialization of an Source. This custom unmarshalingis needed to extract the type specific data (accessible under `TypeData`)but stored in JSON under a hash named after the `type` of the source.
typeSourceCodeVerificationFlowStatus¶
type SourceCodeVerificationFlowStatusstring
SourceCodeVerificationFlowStatus represents the possible statuses of a code verification flow.
const (SourceCodeVerificationFlowStatusFailedSourceCodeVerificationFlowStatus = "failed"SourceCodeVerificationFlowStatusPendingSourceCodeVerificationFlowStatus = "pending"SourceCodeVerificationFlowStatusSucceededSourceCodeVerificationFlowStatus = "succeeded")
List of values that SourceCodeVerificationFlowStatus can take.
typeSourceFlow¶
type SourceFlowstring
SourceFlow represents the possible flows of a source object.
const (SourceFlowCodeVerificationSourceFlow = "code_verification"SourceFlowNoneSourceFlow = "none"SourceFlowReceiverSourceFlow = "receiver"SourceFlowRedirectSourceFlow = "redirect")
List of values that SourceFlow can take.
typeSourceList¶
type SourceList struct {ListMetaData []*PaymentSource `json:"data"`}SourceList is a list object for cards.
typeSourceListParams¶
type SourceListParams struct {ListParams `form:"*"`Customer *string `form:"-"`// Handled in URL}SourceListParams are used to enumerate the payment sources that are attachedto a Customer.
typeSourceMandate¶
type SourceMandate struct {Acceptance *SourceMandateAcceptance `json:"acceptance"`NotificationMethodSourceMandateNotificationMethod `json:"notification_method"`Referencestring `json:"reference"`URLstring `json:"url"`}SourceMandate describes a source mandate.
typeSourceMandateAcceptance¶
type SourceMandateAcceptance struct {Dateint64 `json:"date"`IPstring `json:"ip"`StatusSourceMandateAcceptanceStatus `json:"status"`UserAgentstring `json:"user_agent"`}SourceMandateAcceptance describes a source mandate acceptance state.
typeSourceMandateAcceptanceOfflineParams¶
type SourceMandateAcceptanceOfflineParams struct {ContactEmail *string `form:"contact_email"`}SourceMandateAcceptanceOfflineParams describes the set of parameters for offline accepted mandate
typeSourceMandateAcceptanceOnlineParams¶
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
typeSourceMandateAcceptanceParams¶
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.
typeSourceMandateAcceptanceStatus¶
type SourceMandateAcceptanceStatusstring
SourceMandateAcceptanceStatus represents the possible failure reasons of a redirect flow.
const (SourceMandateAcceptanceStatusAcceptedSourceMandateAcceptanceStatus = "accepted"SourceMandateAcceptanceStatusRefusedSourceMandateAcceptanceStatus = "refused")
List of values that SourceMandateAcceptanceStatus can take.
typeSourceMandateNotificationMethod¶
type SourceMandateNotificationMethodstring
SourceMandateNotificationMethod represents the possible methods of notification for a mandate.
const (SourceMandateNotificationMethodEmailSourceMandateNotificationMethod = "email"SourceMandateNotificationMethodManualSourceMandateNotificationMethod = "manual"SourceMandateNotificationMethodNoneSourceMandateNotificationMethod = "none")
List of values that SourceMandateNotificationMethod can take.
typeSourceMandateParams¶
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 onsource creation or update.
typeSourceObjectDetachParams¶
SourceObjectDetachParams is the set of parameters that can be used when detachinga source from a customer.
typeSourceObjectParams¶
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.
typeSourceOrderItemsParams¶
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 asource order for a source.
typeSourceOrderParams¶
type SourceOrderParams struct {Items []*SourceOrderItemsParams `form:"items"`Shipping *ShippingDetailsParams `form:"shipping"`}SourceOrderParams is the set of parameters allowed for the source order of asource.
typeSourceOwner¶
type SourceOwner struct {Address *Address `json:"address,omitempty"`Emailstring `json:"email"`Namestring `json:"name"`Phonestring `json:"phone"`VerifiedAddress *Address `json:"verified_address,omitempty"`VerifiedEmailstring `json:"verified_email"`VerifiedNamestring `json:"verified_name"`VerifiedPhonestring `json:"verified_phone"`}SourceOwner describes the owner hash on a source.
typeSourceOwnerParams¶
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 onsource creation or update.
typeSourceParams¶
type SourceParams struct {Card *CardParams `form:"-"`Token *string `form:"source"`}SourceParams is a union struct used to describe anarbitrary payment source.
funcSourceParamsFor¶
func SourceParamsFor(obj interface{}) (*SourceParams,error)SourceParamsFor creates SourceParams objects around supportedpayment sources, returning errors if not.
Currently supported source types are Card (CardParams) andTokens/IDs (string), where Tokens could be single use cardtokens or bitcoin receiver ids
typeSourceReceiverParams¶
type SourceReceiverParams struct {RefundAttributesMethod *string `form:"refund_attributes_method"`}SourceReceiverParams is the set of parameters allowed for the `receiver` hash onsource creation or update.
typeSourceRedirectFlowFailureReason¶
type SourceRedirectFlowFailureReasonstring
SourceRedirectFlowFailureReason represents the possible failure reasons of a redirect flow.
const (SourceRedirectFlowFailureReasonDeclinedSourceRedirectFlowFailureReason = "declined"SourceRedirectFlowFailureReasonProcessingErrorSourceRedirectFlowFailureReason = "processing_error"SourceRedirectFlowFailureReasonUserAbortSourceRedirectFlowFailureReason = "user_abort")
List of values that SourceRedirectFlowFailureReason can take.
typeSourceRedirectFlowStatus¶
type SourceRedirectFlowStatusstring
SourceRedirectFlowStatus represents the possible statuses of a redirect flow.
const (SourceRedirectFlowStatusFailedSourceRedirectFlowStatus = "failed"SourceRedirectFlowStatusNotRequiredSourceRedirectFlowStatus = "not_required"SourceRedirectFlowStatusPendingSourceRedirectFlowStatus = "pending"SourceRedirectFlowStatusSucceededSourceRedirectFlowStatus = "succeeded")
List of values that SourceRedirectFlowStatus can take.
typeSourceRefundAttributesMethod¶
type SourceRefundAttributesMethodstring
SourceRefundAttributesMethod are the possible method to retrieve a receiver's refund attributes.
const (SourceRefundAttributesMethodEmailSourceRefundAttributesMethod = "email"SourceRefundAttributesMethodManualSourceRefundAttributesMethod = "manual")
List of values that SourceRefundAttributesMethod can take.
typeSourceRefundAttributesStatus¶
type SourceRefundAttributesStatusstring
SourceRefundAttributesStatus are the possible status of a receiver's refund attributes.
const (SourceRefundAttributesStatusAvailableSourceRefundAttributesStatus = "available"SourceRefundAttributesStatusMissingSourceRefundAttributesStatus = "missing"SourceRefundAttributesStatusRequestedSourceRefundAttributesStatus = "requested")
List of values that SourceRefundAttributesStatus can take.
typeSourceSourceOrder¶
type SourceSourceOrder struct {Amountint64 `json:"amount"`CurrencyCurrency `json:"currency"`Emailstring `json:"email"`Items *[]SourceSourceOrderItems `json:"items"`Shipping *ShippingDetails `json:"shipping"`}SourceSourceOrder describes a source order for a source.
typeSourceSourceOrderItemType¶
type SourceSourceOrderItemTypestring
SourceSourceOrderItemType describes the type of source order items on sourceorders for sources.
const (SourceSourceOrderItemTypeDiscountSourceSourceOrderItemType = "discount"SourceSourceOrderItemTypeSKUSourceSourceOrderItemType = "sku"SourceSourceOrderItemTypeShippingSourceSourceOrderItemType = "shipping"SourceSourceOrderItemTypeTaxSourceSourceOrderItemType = "tax")
The list of possible values for source order item types.
typeSourceSourceOrderItems¶
type SourceSourceOrderItems struct {Amountint64 `json:"amount"`CurrencyCurrency `json:"currency"`Descriptionstring `json:"description"`Quantityint64 `json:"quantity"`TypeSourceSourceOrderItemType `json:"type"`}SourceSourceOrderItems describes the items on source orders for sources.
typeSourceStatus¶
type SourceStatusstring
SourceStatus represents the possible statuses of a source object.
const (SourceStatusCanceledSourceStatus = "canceled"SourceStatusChargeableSourceStatus = "chargeable"SourceStatusConsumedSourceStatus = "consumed"SourceStatusFailedSourceStatus = "failed"SourceStatusPendingSourceStatus = "pending")
List of values that SourceStatus can take.
typeSourceTransaction¶
type SourceTransaction struct {Amountint64 `json:"amount"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`CustomerDatastring `json:"customer_data"`IDstring `json:"id"`Livemodebool `json:"livemode"`Sourcestring `json:"source"`Typestring `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 customunmarshaling is needed to extract the type specific data (accessible under`TypeData`) but stored in JSON under a hash named after the `type` of thesource transaction.
typeSourceTransactionList¶
type SourceTransactionList struct {ListMetaData []*SourceTransaction `json:"data"`}SourceTransactionList is a list object for SourceTransactions.
typeSourceTransactionListParams¶
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.
typeSourceUsage¶
type SourceUsagestring
SourceUsage represents the possible usages of a source object.
const (SourceUsageReusableSourceUsage = "reusable"SourceUsageSingleUseSourceUsage = "single_use")
List of values that SourceUsage can take.
typeSourceVerifyParams¶
type SourceVerifyParams struct {Params `form:"*"`Amounts [2]int64 `form:"amounts"`// Amounts is used when verifying bank accountsCustomer *string `form:"-"`// Goes in the URLValues []*string `form:"values"`// Values is used when verifying sources}SourceVerifyParams are used to verify a customer sourceFor more details seehttps://stripe.com/docs/guides/ach-beta
typeStatusTransitions¶
type StatusTransitions struct {Canceledint64 `json:"canceled"`Fulfilledint64 `json:"fulfilled"`Paidint64 `json:"paid"`Returnedint64 `json:"returned"`}StatusTransitions are the timestamps at which the order status was updated.
typeStatusTransitionsFilterParams¶
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.
typeSubscription¶
type Subscription struct {ApplicationFeePercentfloat64 `json:"application_fee_percent"`BillingCycleAnchorint64 `json:"billing_cycle_anchor"`BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"`CancelAtint64 `json:"cancel_at"`CancelAtPeriodEndbool `json:"cancel_at_period_end"`CanceledAtint64 `json:"canceled_at"`CollectionMethodSubscriptionCollectionMethod `json:"collection_method"`Createdint64 `json:"created"`CurrentPeriodEndint64 `json:"current_period_end"`CurrentPeriodStartint64 `json:"current_period_start"`Customer *Customer `json:"customer"`DaysUntilDueint64 `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"`EndedAtint64 `json:"ended_at"`IDstring `json:"id"`Items *SubscriptionItemList `json:"items"`LatestInvoice *Invoice `json:"latest_invoice"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`NextPendingInvoiceItemInvoiceint64 `json:"next_pending_invoice_item_invoice"`Objectstring `json:"object"`OnBehalfOf *Account `json:"on_behalf_of"`PauseCollectionSubscriptionPauseCollection `json:"pause_collection"`PendingInvoiceItemIntervalSubscriptionPendingInvoiceItemInterval `json:"pending_invoice_item_interval"`PendingSetupIntent *SetupIntent `json:"pending_setup_intent"`PendingUpdate *SubscriptionPendingUpdate `json:"pending_update"`Plan *Plan `json:"plan"`Quantityint64 `json:"quantity"`Schedule *SubscriptionSchedule `json:"schedule"`StartDateint64 `json:"start_date"`StatusSubscriptionStatus `json:"status"`TransferData *SubscriptionTransferData `json:"transfer_data"`TrialEndint64 `json:"trial_end"`TrialStartint64 `json:"trial_start"`// This field is deprecated and we recommend that you use TaxRates instead.TaxPercentfloat64 `json:"tax_percent"`}Subscription is the resource representing a Stripe subscription.For more details seehttps://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 resultingproperty may be an id or the full struct if it was expanded.
typeSubscriptionBillingThresholds¶
type SubscriptionBillingThresholds struct {AmountGTEint64 `json:"amount_gte"`ResetBillingCycleAnchorbool `json:"reset_billing_cycle_anchor"`}SubscriptionBillingThresholds is a structure representing the billing thresholds for a subscription.
typeSubscriptionBillingThresholdsParams¶
type SubscriptionBillingThresholdsParams struct {AmountGTE *int64 `form:"amount_gte"`ResetBillingCycleAnchor *bool `form:"reset_billing_cycle_anchor"`}SubscriptionBillingThresholdsParams is a structure representing the parameters allowed to controlbilling thresholds for a subscription.
typeSubscriptionCancelParams¶
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 seehttps://stripe.com/docs/api#cancel_subscription
typeSubscriptionCollectionMethod¶
type SubscriptionCollectionMethodstring
SubscriptionCollectionMethod is the type of collection method for this subscription's invoices.
const (SubscriptionCollectionMethodChargeAutomaticallySubscriptionCollectionMethod = "charge_automatically"SubscriptionCollectionMethodSendInvoiceSubscriptionCollectionMethod = "send_invoice")
List of values that SubscriptionCollectionMethod can take.
typeSubscriptionItem¶
type SubscriptionItem struct {BillingThresholdsSubscriptionItemBillingThresholds `json:"billing_thresholds"`Createdint64 `json:"created"`Deletedbool `json:"deleted"`IDstring `json:"id"`Metadata map[string]string `json:"metadata"`Plan *Plan `json:"plan"`Quantityint64 `json:"quantity"`Subscriptionstring `json:"subscription"`TaxRates []*TaxRate `json:"tax_rates"`}SubscriptionItem is the resource representing a Stripe subscription item.For more details seehttps://stripe.com/docs/api#subscription_items.
typeSubscriptionItemBillingThresholds¶
type SubscriptionItemBillingThresholds struct {UsageGTEint64 `form:"usage_gte"`}SubscriptionItemBillingThresholds is a structure representing the billing thresholds for asubscription item.
typeSubscriptionItemBillingThresholdsParams¶
type SubscriptionItemBillingThresholdsParams struct {UsageGTE *int64 `form:"usage_gte"`}SubscriptionItemBillingThresholdsParams is a structure representing the parameters allowed tocontrol billing thresholds for a subscription item.
typeSubscriptionItemList¶
type SubscriptionItemList struct {ListMetaData []*SubscriptionItem `json:"data"`}SubscriptionItemList is a list of invoice items as retrieved from a list endpoint.
typeSubscriptionItemListParams¶
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 seehttps://stripe.com/docs/api#list_invoiceitems.
typeSubscriptionItemParams¶
type SubscriptionItemParams struct {Params `form:"*"`ID *string `form:"-"`// Handled in URLBillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"`ClearUsage *bool `form:"clear_usage"`PaymentBehavior *string `form:"payment_behavior"`Plan *string `form:"plan"`Prorate *bool `form:"prorate"`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 updatesOffSession *bool `form:"off_session"`}SubscriptionItemParams is the set of parameters that can be used when creating or updating a subscription item.For more details seehttps://stripe.com/docs/api#create_subscription_item andhttps://stripe.com/docs/api#update_subscription_item.
typeSubscriptionItemsParams¶
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"`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 subscriptionFor more details seehttps://stripe.com/docs/api#create_subscription andhttps://stripe.com/docs/api#update_subscription.
typeSubscriptionList¶
type SubscriptionList struct {ListMetaData []*Subscription `json:"data"`}SubscriptionList is a list object for subscriptions.
typeSubscriptionListParams¶
type SubscriptionListParams struct {ListParams `form:"*"`CollectionMethod *string `form:"collection_method"`Createdint64 `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"`Customerstring `form:"customer"`Planstring `form:"plan"`Statusstring `form:"status"`}SubscriptionListParams is the set of parameters that can be used when listing active subscriptions.For more details seehttps://stripe.com/docs/api#list_subscriptions.
typeSubscriptionParams¶
type SubscriptionParams struct {Params `form:"*"`ApplicationFeePercent *float64 `form:"application_fee_percent"`BackdateStartDate *int64 `form:"backdate_start_date"`BillingCycleAnchor *int64 `form:"billing_cycle_anchor"`BillingCycleAnchorNow *bool `form:"-"`// See custom AppendToBillingCycleAnchorUnchanged *bool `form:"-"`// See custom AppendToBillingThresholds *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"`Prorate *bool `form:"prorate"`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 AppendToTrialFromPlan *bool `form:"trial_from_plan"`TrialPeriodDays *int64 `form:"trial_period_days"`// This parameter is deprecated and we recommend that you use TaxRates instead.TaxPercent *float64 `form:"tax_percent"`}SubscriptionParams is the set of parameters that can be used when creating or updating a subscription.For more details seehttps://stripe.com/docs/api#create_subscription andhttps://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).
typeSubscriptionPauseCollection¶
type SubscriptionPauseCollection struct {BehaviorSubscriptionPauseCollectionBehavior `json:"behavior"`ResumesAtint64 `json:"resumes_at"`}SubscriptionPauseCollection if specified, payment collection for this subscription will be paused.
typeSubscriptionPauseCollectionBehavior¶
type SubscriptionPauseCollectionBehaviorstring
SubscriptionPauseCollectionBehavior is the payment collection behavior a paused subscription.
const (SubscriptionPauseCollectionBehaviorKeepAsDraftSubscriptionPauseCollectionBehavior = "keep_as_draft"SubscriptionPauseCollectionBehaviorMarkUncollectibleSubscriptionPauseCollectionBehavior = "mark_uncollectible"SubscriptionPauseCollectionBehaviorVoidSubscriptionPauseCollectionBehavior = "void")
List of values that SubscriptionPauseCollectionBehavior can take.
typeSubscriptionPauseCollectionParams¶
type SubscriptionPauseCollectionParams struct {Behavior *string `form:"behavior"`ResumesAt *int64 `form:"resumes_at"`}SubscriptionPauseCollectionParams is the set of parameters allowed for the pause_collection hash.
typeSubscriptionPaymentBehavior¶
type SubscriptionPaymentBehaviorstring
SubscriptionPaymentBehavior lets you control the behavior of subscription creation in case ofa failed payment.
const (SubscriptionPaymentBehaviorAllowIncompleteSubscriptionPaymentBehavior = "allow_incomplete"SubscriptionPaymentBehaviorErrorIfIncompleteSubscriptionPaymentBehavior = "error_if_incomplete"SubscriptionPaymentBehaviorPendingIfIncompleteSubscriptionPaymentBehavior = "pending_if_incomplete")
List of values that SubscriptionPaymentBehavior can take.
typeSubscriptionPendingInvoiceItemInterval¶
type SubscriptionPendingInvoiceItemInterval struct {IntervalSubscriptionPendingInvoiceItemIntervalInterval `json:"interval"`IntervalCountint64 `json:"interval_count"`}SubscriptionPendingInvoiceItemInterval represents the interval at which to invoice pending invoiceitems.
typeSubscriptionPendingInvoiceItemIntervalInterval¶
type SubscriptionPendingInvoiceItemIntervalIntervalstring
SubscriptionPendingInvoiceItemIntervalInterval controls the interval at which pending invoiceitems should be invoiced.
const (SubscriptionPendingInvoiceItemIntervalIntervalDaySubscriptionPendingInvoiceItemIntervalInterval = "day"SubscriptionPendingInvoiceItemIntervalIntervalMonthSubscriptionPendingInvoiceItemIntervalInterval = "month"SubscriptionPendingInvoiceItemIntervalIntervalWeekSubscriptionPendingInvoiceItemIntervalInterval = "week"SubscriptionPendingInvoiceItemIntervalIntervalYearSubscriptionPendingInvoiceItemIntervalInterval = "year")
List of values that SubscriptionPendingInvoiceItemIntervalInterval can take.
typeSubscriptionPendingInvoiceItemIntervalParams¶
type SubscriptionPendingInvoiceItemIntervalParams struct {Interval *string `form:"interval"`IntervalCount *int64 `form:"interval_count"`}SubscriptionPendingInvoiceItemIntervalParams is the set of parameters allowed for the transfer_data hash.
typeSubscriptionPendingUpdate¶
type SubscriptionPendingUpdate struct {BillingCycleAnchorint64 `json:"billing_cycle_anchor"`ExpiresAtint64 `json:"expires_at"`SubscriptionItems []*SubscriptionItem `json:"subscription_items"`TrialEndint64 `json:"trial_end"`TrialFromPlanbool `json:"trial_from_plan"`}SubscriptionPendingUpdate represents deferred changes that will be applied when latest invoice is paid.
typeSubscriptionProrationBehavior¶
type SubscriptionProrationBehaviorstring
SubscriptionProrationBehavior determines how to handle prorations when billing cycles change.
const (SubscriptionProrationBehaviorAlwaysInvoiceSubscriptionProrationBehavior = "always_invoice"SubscriptionProrationBehaviorCreateProrationsSubscriptionProrationBehavior = "create_prorations"SubscriptionProrationBehaviorNoneSubscriptionProrationBehavior = "none")
List of values that SubscriptionProrationBehavior can take.
typeSubscriptionSchedule¶
type SubscriptionSchedule struct {CanceledAtint64 `json:"canceled_at"`CompletedAtint64 `json:"completed_at"`Createdint64 `json:"created"`CurrentPhase *SubscriptionScheduleCurrentPhase `json:"current_phase"`Customer *Customer `json:"customer"`DefaultSettings *SubscriptionScheduleDefaultSettings `json:"default_settings"`EndBehaviorSubscriptionScheduleEndBehavior `json:"end_behavior"`IDstring `json:"id"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`Phases []*SubscriptionSchedulePhase `json:"phases"`ReleasedSubscription *Subscription `json:"released_subscription"`RenewalInterval *SubscriptionScheduleRenewalInterval `json:"renewal_interval"`StatusSubscriptionScheduleStatus `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 resultingproperty may be an id or the full struct if it was expanded.
typeSubscriptionScheduleCancelParams¶
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 asubscription schedule.
typeSubscriptionScheduleCurrentPhase¶
type SubscriptionScheduleCurrentPhase struct {EndDateint64 `json:"end_date"`StartDateint64 `json:"start_date"`}SubscriptionScheduleCurrentPhase is a structure the current phase's period.
typeSubscriptionScheduleDefaultSettings¶
type SubscriptionScheduleDefaultSettings struct {BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"`CollectionMethodSubscriptionCollectionMethod `json:"collection_method"`DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`InvoiceSettings *SubscriptionScheduleInvoiceSettings `json:"invoice_settings"`}SubscriptionScheduleDefaultSettings is a structure representing thesubscription schedule’s default settings.
typeSubscriptionScheduleDefaultSettingsParams¶
type SubscriptionScheduleDefaultSettingsParams struct {Params `form:"*"`BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"`CollectionMethod *string `form:"collection_method"`DefaultPaymentMethod *string `form:"default_payment_method"`InvoiceSettings *SubscriptionScheduleInvoiceSettingsParams `form:"invoice_settings"`}SubscriptionScheduleDefaultSettingsParams is the set of parametersrepresenting the subscription schedule’s default settings.
typeSubscriptionScheduleEndBehavior¶
type SubscriptionScheduleEndBehaviorstring
SubscriptionScheduleEndBehavior describe what happens to a schedule when it ends.
const (SubscriptionScheduleEndBehaviorCancelSubscriptionScheduleEndBehavior = "cancel"SubscriptionScheduleEndBehaviorReleaseSubscriptionScheduleEndBehavior = "release")
List of values that SubscriptionScheduleEndBehavior can take.
typeSubscriptionScheduleInvoiceSettings¶
type SubscriptionScheduleInvoiceSettings struct {DaysUntilDueint64 `json:"days_until_due"`}SubscriptionScheduleInvoiceSettings is a structure representing the settings applied to invoicesassociated with a subscription schedule.
typeSubscriptionScheduleInvoiceSettingsParams¶
type SubscriptionScheduleInvoiceSettingsParams struct {DaysUntilDue *int64 `form:"days_until_due"`}SubscriptionScheduleInvoiceSettingsParams is a structure representing the parameters allowed tocontrol invoice settings on invoices associated with a subscription schedule.
typeSubscriptionScheduleList¶
type SubscriptionScheduleList struct {ListMetaData []*SubscriptionSchedule `json:"data"`}SubscriptionScheduleList is a list object for subscription schedules.
typeSubscriptionScheduleListParams¶
type SubscriptionScheduleListParams struct {ListParams `form:"*"`CanceledAtint64 `form:"canceled_at"`CanceledAtRange *RangeQueryParams `form:"canceled_at"`CompletedAtint64 `form:"completed_at"`CompletedAtRange *RangeQueryParams `form:"completed_at"`Createdint64 `form:"created"`CreatedRange *RangeQueryParams `form:"created"`Customerstring `form:"customer"`ReleasedAtint64 `form:"released_at"`ReleasedAtRange *RangeQueryParams `form:"released_at"`Scheduled *bool `form:"scheduled"`}SubscriptionScheduleListParams is the set of parameters that can be used when listingsubscription schedules.
typeSubscriptionScheduleParams¶
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// TODO remove in the next major version// This propery is considered deprecated. Use ProrationBehavior insteadProrate *bool `form:"prorate"`}SubscriptionScheduleParams is the set of parameters that can be used when creating or updating asubscription 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).
typeSubscriptionSchedulePhase¶
type SubscriptionSchedulePhase struct {ApplicationFeePercentfloat64 `json:"application_fee_percent"`BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"`CollectionMethodSubscriptionCollectionMethod `json:"collection_method"`Coupon *Coupon `json:"coupon"`DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`DefaultTaxRates []*TaxRate `json:"default_tax_rates"`EndDateint64 `json:"end_date"`InvoiceSettings *SubscriptionScheduleInvoiceSettings `json:"invoice_settings"`Plans []*SubscriptionSchedulePhaseItem `json:"plans"`StartDateint64 `json:"start_date"`TrialEndint64 `json:"trial_end"`// This field is deprecated and we recommend that you use TaxRates instead.TaxPercentfloat64 `json:"tax_percent"`}SubscriptionSchedulePhase is a structure a phase of a subscription schedule.
typeSubscriptionSchedulePhaseItem¶
type SubscriptionSchedulePhaseItem struct {BillingThresholds *SubscriptionItemBillingThresholds `json:"billing_thresholds"`Plan *Plan `json:"plan"`Quantityint64 `json:"quantity"`TaxRates []*TaxRate `json:"tax_rates"`}SubscriptionSchedulePhaseItem represents plan details for a given phase
typeSubscriptionSchedulePhaseItemParams¶
type SubscriptionSchedulePhaseItemParams struct {BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"`Plan *string `form:"plan"`Quantity *int64 `form:"quantity"`TaxRates []*string `form:"tax_rates"`}SubscriptionSchedulePhaseItemParams is a structure representing the parameters allowed to controla specic plan on a phase on a subscription schedule.
typeSubscriptionSchedulePhaseParams¶
type SubscriptionSchedulePhaseParams struct {ApplicationFeePercent *int64 `form:"application_fee_percent"`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"`Plans []*SubscriptionSchedulePhaseItemParams `form:"plans"`ProrationBehavior *string `form:"proration_behavior"`StartDate *int64 `form:"start_date"`Trial *bool `form:"trial"`TrialEnd *int64 `form:"trial_end"`// This parameter is deprecated and we recommend that you use TaxRates instead.TaxPercent *float64 `form:"tax_percent"`}SubscriptionSchedulePhaseParams is a structure representing the parameters allowed to controla phase on a subscription schedule.
typeSubscriptionScheduleReleaseParams¶
type SubscriptionScheduleReleaseParams struct {Params `form:"*"`PreserveCancelDate *bool `form:"preserve_cancel_date"`}SubscriptionScheduleReleaseParams is the set of parameters that can be used when releasing asubscription schedule.
typeSubscriptionScheduleRenewalInterval¶
type SubscriptionScheduleRenewalInterval struct {IntervalPlanInterval `form:"interval"`Lengthint64 `form:"length"`}SubscriptionScheduleRenewalInterval represents the interval and duration of a schedule.
typeSubscriptionScheduleStatus¶
type SubscriptionScheduleStatusstring
SubscriptionScheduleStatus is the list of allowed values for the schedule's status.
const (SubscriptionScheduleStatusActiveSubscriptionScheduleStatus = "active"SubscriptionScheduleStatusCanceledSubscriptionScheduleStatus = "canceled"SubscriptionScheduleStatusCompletedSubscriptionScheduleStatus = "completed"SubscriptionScheduleStatusPastDueSubscriptionScheduleStatus = "not_started"SubscriptionScheduleStatusTrialingSubscriptionScheduleStatus = "released")
List of values that SubscriptionScheduleStatus can take.
typeSubscriptionStatus¶
type SubscriptionStatusstring
SubscriptionStatus is the list of allowed values for the subscription's status.
const (SubscriptionStatusActiveSubscriptionStatus = "active"SubscriptionStatusAllSubscriptionStatus = "all"SubscriptionStatusCanceledSubscriptionStatus = "canceled"SubscriptionStatusIncompleteSubscriptionStatus = "incomplete"SubscriptionStatusIncompleteExpiredSubscriptionStatus = "incomplete_expired"SubscriptionStatusPastDueSubscriptionStatus = "past_due"SubscriptionStatusTrialingSubscriptionStatus = "trialing"SubscriptionStatusUnpaidSubscriptionStatus = "unpaid")
List of values that SubscriptionStatus can take.
typeSubscriptionTransferData¶
type SubscriptionTransferData struct {Destination *Account `json:"destination"`}SubscriptionTransferData represents the information for the transfer_data associated with a subscription.
typeSubscriptionTransferDataParams¶
type SubscriptionTransferDataParams struct {Destination *string `form:"destination"`}SubscriptionTransferDataParams is the set of parameters allowed for the transfer_data hash.
typeSupportedBackend¶
type SupportedBackendstring
SupportedBackend is an enumeration of supported Stripe endpoints.Currently supported values are "api" and "uploads".
typeTaxID¶
type TaxID struct {Countrystring `json:"country"`Createdint64 `json:"created"`Customer *Customer `json:"customer"`Deletedbool `json:"deleted"`IDstring `json:"id"`Livemodebool `json:"livemode"`Objectstring `json:"object"`TypeTaxIDType `json:"type"`Valuestring `json:"value"`Verification *TaxIDVerification `json:"verification"`}TaxID is the resource representing a customer's tax id.For more details seehttps://stripe.com/docs/api/customers/tax_id_object
func (*TaxID)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a TaxID.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeTaxIDListParams¶
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 seehttps://stripe.com/docs/api/customers/tax_ids
typeTaxIDParams¶
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 seehttps://stripe.com/docs/api/customers/create_tax_id
typeTaxIDType¶
type TaxIDTypestring
TaxIDType is the list of allowed values for the tax id's type..
const (TaxIDTypeAUABNTaxIDType = "au_abn"TaxIDTypeCABNTaxIDType = "ca_bn"TaxIDTypeCAQSTTaxIDType = "ca_qst"TaxIDTypeCHVATTaxIDType = "ch_vat"TaxIDTypeESCIFTaxIDType = "es_cif"TaxIDTypeEUVATTaxIDType = "eu_vat"TaxIDTypeHKBRTaxIDType = "hk_br"TaxIDTypeINGSTTaxIDType = "in_gst"TaxIDTypeJPCNTaxIDType = "jp_cn"TaxIDTypeKRBRNTaxIDType = "kr_brn"TaxIDTypeLIUIDTaxIDType = "li_uid"TaxIDTypeMXRFCTaxIDType = "mx_rfc"TaxIDTypeMYITNTaxIDType = "my_itn"TaxIDTypeMYSSTTaxIDType = "my_sst"TaxIDTypeNOVATTaxIDType = "no_vat"TaxIDTypeNZGSTTaxIDType = "nz_gst"TaxIDTypeRUINNTaxIDType = "ru_inn"TaxIDTypeSGUENTaxIDType = "sg_uen"TaxIDTypeSGGSTTaxIDType = "sg_gst"TaxIDTypeTHVATTaxIDType = "th_vat"TaxIDTypeTWVATTaxIDType = "tw_vat"TaxIDTypeUSEINTaxIDType = "us_ein"TaxIDTypeZAVATTaxIDType = "za_vat"TaxIDTypeUnknownTaxIDType = "unknown")
List of values that TaxIDType can take.
typeTaxIDVerification¶
type TaxIDVerification struct {StatusTaxIDVerificationStatus `json:"status"`VerifiedAddressstring `json:"verified_address"`VerifiedNamestring `json:"verified_name"`}TaxIDVerification represents the verification details of a customer's tax id.
typeTaxIDVerificationStatus¶
type TaxIDVerificationStatusstring
TaxIDVerificationStatus is the list of allowed values for the tax id's verification status..
const (TaxIDVerificationStatusPendingTaxIDVerificationStatus = "pending"TaxIDVerificationStatusUnavailableTaxIDVerificationStatus = "unavailable"TaxIDVerificationStatusUnverifiedTaxIDVerificationStatus = "unverified"TaxIDVerificationStatusVerifiedTaxIDVerificationStatus = "verified")
List of values that TaxIDDuration can take.
typeTaxRate¶
type TaxRate struct {Activebool `json:"active"`Createdint64 `json:"created"`Descriptionstring `json:"description"`DisplayNamestring `json:"display_name"`IDstring `json:"id"`Inclusivebool `json:"inclusive"`Jurisdictionstring `json:"jurisdiction"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`Percentagefloat64 `json:"percentage"`}TaxRate is the resource representing a Stripe tax rate.For more details seehttps://stripe.com/docs/api/tax_rates/object.
func (*TaxRate)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a TaxRate.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeTaxRateList¶
TaxRateList is a list of tax rates as retrieved from a list endpoint.
typeTaxRateListParams¶
type TaxRateListParams struct {ListParams `form:"*"`Active *bool `form:"active"`Created *int64 `form:"created"`CreatedRange *RangeQueryParams `form:"created"`Inclusive *bool `form:"inclusive"`Percentage *float64 `form:"percentage"`PercentageRange *TaxRatePercentageRangeQueryParams `form:"percentage"`}TaxRateListParams is the set of parameters that can be used when listing tax rates.For more detail seehttps://stripe.com/docs/api/tax_rates/list.
typeTaxRateParams¶
type TaxRateParams struct {Params `form:"*"`Active *bool `form:"active"`Description *string `form:"description"`DisplayName *string `form:"display_name"`Inclusive *bool `form:"inclusive"`Jurisdiction *string `form:"jurisdiction"`Percentage *float64 `form:"percentage"`}TaxRateParams is the set of parameters that can be used when creating a tax rate.For more details seehttps://stripe.com/docs/api/tax_rates/create.
typeTaxRatePercentageRangeQueryParams¶
type TaxRatePercentageRangeQueryParams struct {GreaterThanfloat64 `form:"gt"`GreaterThanOrEqualfloat64 `form:"gte"`LesserThanfloat64 `form:"lt"`LesserThanOrEqualfloat64 `form:"lte"`}TaxRatePercentageRangeQueryParams are used to filter tax rates by specific percentage values.
typeTerminalConnectionToken¶
type TerminalConnectionToken struct {Locationstring `json:"location"`Objectstring `json:"object"`Secretstring `json:"secret"`}TerminalConnectionToken is the resource representing a Stripe terminal connection token.
typeTerminalConnectionTokenParams¶
TerminalConnectionTokenParams is the set of parameters that can be used when creating a terminal connection token.
typeTerminalLocation¶
type TerminalLocation struct {Address *AccountAddressParams `json:"address"`Deletedbool `json:"deleted"`DisplayNamestring `json:"display_name"`IDstring `json:"id"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`}TerminalLocation is the resource representing a Stripe terminal location.
typeTerminalLocationList¶
type TerminalLocationList struct {ListMetaData []*TerminalLocation `json:"data"`}TerminalLocationList is a list of terminal readers as retrieved from a list endpoint.
typeTerminalLocationListParams¶
type TerminalLocationListParams struct {ListParams `form:"*"`}TerminalLocationListParams is the set of parameters that can be used when listing temrinal locations.
typeTerminalLocationParams¶
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.
typeTerminalReader¶
type TerminalReader struct {Deletedbool `json:"deleted"`DeviceSwVersionstring `json:"device_sw_version"`DeviceTypestring `json:"device_type"`IDstring `json:"id"`IPAddressstring `json:"ip_address"`Labelstring `json:"label"`Livemodebool `json:"livemode"`Locationstring `json:"location"`Metadata map[string]string `json:"metadata"`Objectstring `json:"object"`SerialNumberstring `json:"serial_number"`Statusstring `json:"status"`}TerminalReader is the resource representing a Stripe terminal reader.
typeTerminalReaderGetParams¶
type TerminalReaderGetParams struct {Params `form:"*"`}TerminalReaderGetParams is the set of parameters that can be used to get a terminal reader.
typeTerminalReaderList¶
type TerminalReaderList struct {ListMetaData []*TerminalReader `json:"data"`Location *string `json:"location"`Status *string `json:"status"`}TerminalReaderList is a list of terminal readers as retrieved from a list endpoint.
typeTerminalReaderListParams¶
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.
typeTerminalReaderParams¶
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.
typeThreeDSecure¶
type ThreeDSecure struct {Amountint64 `json:"amount"`Authenticatedbool `json:"authenticated"`Card *Card `json:"card"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`IDstring `json:"id"`Livemodebool `json:"livemode"`RedirectURLstring `json:"redirect_url"`StatusThreeDSecureStatus `json:"status"`Supportedstring `json:"supported"`}ThreeDSecure is the resource representing a Stripe 3DS objectFor more details seehttps://stripe.com/docs/api#three_d_secure.
typeThreeDSecureParams¶
type ThreeDSecureParams struct {Params `form:"*"`Amount *int64 `form:"amount"`Card *string `form:"card"`Currency *string `form:"currency"`Customer *string `form:"customer"`ReturnURL *string `form:"return_url"`}ThreeDSecureParams is the set of parameters that can be used when creating a 3DS object.
typeThreeDSecureStatus¶
type ThreeDSecureStatusstring
ThreeDSecureStatus represents the possible statuses of a ThreeDSecure object.
typeToken¶
type Token struct {BankAccount *BankAccount `json:"bank_account"`Card *Card `json:"card"`ClientIPstring `json:"client_ip"`Createdint64 `json:"created"`// Email is an undocumented field but included for all tokens created// with Stripe Checkout.Emailstring `json:"email"`IDstring `json:"id"`Livemodebool `json:"livemode"`TypeTokenType `json:"type"`Usedbool `json:"used"`}Token is the resource representing a Stripe token.For more details seehttps://stripe.com/docs/api#tokens.
typeTokenParams¶
type TokenParams struct {Params `form:"*"`BankAccount *BankAccountParams `form:"bank_account"`Card *CardParams `form:"card"`Customer *string `form:"customer"`// 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 seehttps://stripe.com/docs/api#create_card_token andhttps://stripe.com/docs/api#create_bank_account_token.
typeTopup¶
type Topup struct {Amountint64 `json:"amount"`ArrivalDateint64 `json:"arrival_date"`BalanceTransaction *BalanceTransaction `json:"balance_transaction"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Descriptionstring `json:"description"`ExpectedAvailabilityDateint64 `json:"expected_availability_date"`FailureCodestring `json:"failure_code"`FailureMessagestring `json:"failure_message"`IDstring `json:"id"`Livemodebool `json:"livemode"`Source *PaymentSource `json:"source"`StatementDescriptorstring `json:"statement_descriptor"`Statusstring `json:"status"`TransferGroupstring `json:"transfer_group"`}Topup is the resource representing a Stripe top-up.For more details seehttps://stripe.com/docs/api#topups.
typeTopupListParams¶
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 seehttps://stripe.com/docs/api#list_topups.
typeTopupParams¶
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 seehttps://stripe.com/docs/api#create_topup andhttps://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.
typeTransfer¶
type Transfer struct {Amountint64 `json:"amount"`AmountReversedint64 `json:"amount_reversed"`BalanceTransaction *BalanceTransaction `json:"balance_transaction"`Createdint64 `json:"created"`CurrencyCurrency `json:"currency"`Descriptionstring `json:"description"`Destination *TransferDestination `json:"destination"`DestinationPayment *Charge `json:"destination_payment"`IDstring `json:"id"`Livemodebool `json:"livemode"`Metadata map[string]string `json:"metadata"`Reversals *ReversalList `json:"reversals"`Reversedbool `json:"reversed"`SourceTransaction *BalanceTransactionSource `json:"source_transaction"`SourceTypeTransferSourceType `json:"source_type"`TransferGroupstring `json:"transfer_group"`}Transfer is the resource representing a Stripe transfer.For more details seehttps://stripe.com/docs/api#transfers.
func (*Transfer)UnmarshalJSON¶
UnmarshalJSON handles deserialization of a Transfer.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeTransferDestination¶
TransferDestination describes the destination of a Transfer.The Type should indicate which object is fleshed outFor more details seehttps://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 specifictype of destination it refers to is specified in the JSON
typeTransferList¶
TransferList is a list of transfers as retrieved from a list endpoint.
typeTransferListParams¶
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 seehttps://stripe.com/docs/api#list_transfers.
typeTransferParams¶
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 seehttps://stripe.com/docs/api#create_transfer andhttps://stripe.com/docs/api#update_transfer.
typeTransferSourceType¶
type TransferSourceTypestring
TransferSourceType is the list of allowed values for the transfer's source_type field.
const (TransferSourceTypeAlipayAccountTransferSourceType = "alipay_account"TransferSourceTypeBankAccountTransferSourceType = "bank_account"TransferSourceTypeBitcoinReceiverTransferSourceType = "bitcoin_receiver"TransferSourceTypeCardTransferSourceType = "card"TransferSourceTypeFPXTransferSourceType = "fpx")
List of values that TransferSourceType can take.
typeUsageRecord¶
type UsageRecord struct {IDstring `json:"id"`Livemodebool `json:"livemode"`Quantityint64 `json:"quantity"`SubscriptionItemstring `json:"subscription_item"`Timestampint64 `json:"timestamp"`}UsageRecord represents a usage record.Seehttps://stripe.com/docs/api#usage_records
typeUsageRecordParams¶
type UsageRecordParams struct {Params `form:"*"`Action *string `form:"action"`Quantity *int64 `form:"quantity"`SubscriptionItem *string `form:"-"`// passed in the URLTimestamp *int64 `form:"timestamp"`}UsageRecordParams create a usage record for a specified subscription itemand date, and fills it with a quantity.
typeUsageRecordSummary¶
type UsageRecordSummary struct {IDstring `json:"id"`Invoicestring `json:"invoice"`Livemodebool `json:"livemode"`Objectstring `json:"object"`Period *Period `json:"period"`SubscriptionItemstring `json:"subscription_item"`TotalUsageint64 `json:"total_usage"`}UsageRecordSummary represents a usage record summary.Seehttps://stripe.com/docs/api#usage_records
typeUsageRecordSummaryList¶
type UsageRecordSummaryList struct {ListMetaData []*UsageRecordSummary `json:"data"`}UsageRecordSummaryList is a list of usage record summaries as retrieved from a list endpoint.
typeUsageRecordSummaryListParams¶
type UsageRecordSummaryListParams struct {ListParams `form:"*"`SubscriptionItem *string `form:"-"`// Sent in with the URL}UsageRecordSummaryListParams is the set of parameters that can be used when listing charges.
typeVerificationDocumentDetailsCode¶
type VerificationDocumentDetailsCodestring
VerificationDocumentDetailsCode is a machine-readable code specifying the verification state ofa document associated with a person.
const (VerificationDocumentDetailsCodeDocumentCorruptVerificationDocumentDetailsCode = "document_corrupt"VerificationDocumentDetailsCodeDocumentFailedCopyVerificationDocumentDetailsCode = "document_failed_copy"VerificationDocumentDetailsCodeDocumentFailedGreyscaleVerificationDocumentDetailsCode = "document_failed_greyscale"VerificationDocumentDetailsCodeDocumentFailedOtherVerificationDocumentDetailsCode = "document_failed_other"VerificationDocumentDetailsCodeDocumentFailedTestModeVerificationDocumentDetailsCode = "document_failed_test_mode"VerificationDocumentDetailsCodeDocumentFraudulentVerificationDocumentDetailsCode = "document_fraudulent"VerificationDocumentDetailsCodeDocumentIDTypeNotSupportedVerificationDocumentDetailsCode = "document_id_type_not_supported"VerificationDocumentDetailsCodeDocumentIDCountryNotSupportedVerificationDocumentDetailsCode = "document_id_country_not_supported"VerificationDocumentDetailsCodeDocumentManipulatedVerificationDocumentDetailsCode = "document_manipulated"VerificationDocumentDetailsCodeDocumentMissingBackVerificationDocumentDetailsCode = "document_missing_back"VerificationDocumentDetailsCodeDocumentMissingFrontVerificationDocumentDetailsCode = "document_missing_front"VerificationDocumentDetailsCodeDocumentNotReadableVerificationDocumentDetailsCode = "document_not_readable"VerificationDocumentDetailsCodeDocumentNotUploadedVerificationDocumentDetailsCode = "document_not_uploaded"VerificationDocumentDetailsCodeDocumentTooLargeVerificationDocumentDetailsCode = "document_too_large")
List of values that IdentityVerificationDetailsCode can take.
typeVerificationFieldsList¶
type VerificationFieldsList struct {AdditionalFields []string `json:"additional"`Minimum []string `json:"minimum"`}VerificationFieldsList lists the fields needed for an account verification.For more details seehttps://stripe.com/docs/api#country_spec_object-verification_fields.
typeWebhookEndpoint¶
type WebhookEndpoint struct {APIVersionstring `json:"api_version"`Applicationstring `json:"application"`Connectbool `json:"connect"`Createdint64 `json:"created"`Deletedbool `json:"deleted"`Descriptionstring `json:"description"`EnabledEvents []string `json:"enabled_events"`IDstring `json:"id"`Livemodebool `json:"livemode"`Objectstring `json:"object"`Secretstring `json:"secret"`Statusstring `json:"status"`URLstring `json:"url"`}WebhookEndpoint is the resource representing a Stripe webhook endpoint.For more details seehttps://stripe.com/docs/api#webhook_endpoints.
func (*WebhookEndpoint)UnmarshalJSON¶
func (c *WebhookEndpoint) UnmarshalJSON(data []byte)error
UnmarshalJSON handles deserialization of a WebhookEndpoint.This custom unmarshaling is needed because the resultingproperty may be an id or the full struct if it was expanded.
typeWebhookEndpointList¶
type WebhookEndpointList struct {ListMetaData []*WebhookEndpoint `json:"data"`}WebhookEndpointList is a list of webhook endpoints as retrieved from a list endpoint.
typeWebhookEndpointListParams¶
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 seehttps://stripe.com/docs/api#list_webhook_endpoints.
typeWebhookEndpointParams¶
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.goAPIVersion *string `form:"api_version"`}WebhookEndpointParams is the set of parameters that can be used when creating a webhook endpoint.For more details seehttps://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
- bitcoinreceiver.go
- bitcointransaction.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
- exchangerate.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
- 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
- product.go
- radar_earlyfraudwarning.go
- radar_valuelist.go
- radar_valuelistitem.go
- recipient.go
- recipienttransfer.go
- refund.go
- reporting_reportrun.go
- reporting_reporttype.go
- reversal.go
- review.go
- setupintent.go
- sigma_scheduledqueryrun.go
- sku.go
- source.go
- sourcetransaction.go
- stripe.go
- sub.go
- subitem.go
- subschedule.go
- taxid.go
- taxrate.go
- terminal_connectiontoken.go
- terminal_location.go
- terminal_reader.go
- threedsecure.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 |
Package bitcoinreceiver provides the /bitcoin/receivers APIs. | Package bitcoinreceiver provides the /bitcoin/receivers APIs. |
Package bitcointransaction provides the /bitcoin/transactions APIs. | Package bitcointransaction provides the /bitcoin/transactions APIs. |
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 exchangerate provides the /exchange_rates APIs | Package exchangerate provides the /exchange_rates 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 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 |
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 recipient provides the /recipients APIs | Package recipient provides the /recipients APIs |
Package recipienttransfer provides the /recipient_transfers APIs | Package recipienttransfer provides the /recipient_transfers APIs |
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_clientscommand 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_mockcommand 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 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 threedsecure provides the /3d_secure APIs This package is deprecated and should not be used anymore. | Package threedsecure provides the /3d_secure APIs This package is deprecated and should not be used anymore. |
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 |