stripe-go: github.com/stripe/stripe-go Index | Examples | Files | Directories

package stripe

import "github.com/stripe/stripe-go"

Package stripe provides the binding for Stripe REST APIs.

Index

Examples

Package Files

account.go address.go applepaydomain.go application.go balance.go bankaccount.go bitcoinreceiver.go bitcointransaction.go card.go charge.go countryspec.go coupon.go currency.go customer.go discount.go dispute.go ephemeralkey.go error.go event.go exchangerate.go fee.go feerefund.go filelink.go fileupload.go invoice.go invoiceitem.go issuerfraudrecord.go issuing_authorization.go issuing_card.go issuing_cardholder.go issuing_dispute.go issuing_transaction.go iter.go loginlink.go order.go orderreturn.go params.go paymentintent.go paymentsource.go payout.go plan.go product.go recipient.go recipienttransfer.go refund.go reporting_reportrun.go reporting_reporttype.go reversal.go review.go sigma_scheduledqueryrun.go sku.go source.go sourcetransaction.go stripe.go sub.go subitem.go threedsecure.go token.go topup.go transfer.go usagerecord.go usagerecordsummary.go

Constants

const (
    EndingBefore  = "ending_before"
    StartingAfter = "starting_after"
)

Contains constants for the names of parameters used for pagination in list APIs.

const (
    // APIBackend is a constant representing the API service backend.
    APIBackend SupportedBackend = "api"

    // APIURL is the URL of the API service backend.
    APIURL string = "https://api.stripe.com/v1"

    // UnknownPlatform is the string returned as the system name if we couldn't get
    // one from `uname`.
    UnknownPlatform string = "unknown platform"

    // UploadsBackend is a constant representing the uploads service backend.
    UploadsBackend SupportedBackend = "uploads"

    // UploadsURL is the URL of the uploads service backend.
    UploadsURL string = "https://uploads.stripe.com/v1"
)
const (
    UsageRecordActionIncrement string = "increment"
    UsageRecordActionSet       string = "set"
)

Possible values for the action parameter on usage record creation.

Variables

var Key string

Key is the Stripe API key used globally in the binding.

var LogLevel = 2

LogLevel is the logging level for this library. 0: no logging 1: errors only 2: errors + informational (default) 3: errors + informational + debug

func Bool Uses

func Bool(v bool) *bool

Bool returns a pointer to the bool value passed in.

func BoolValue Uses

func BoolValue(v *bool) bool

BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.

func Float64 Uses

func Float64(v float64) *float64

Float64 returns a pointer to the float64 value passed in.

func Float64Value Uses

func Float64Value(v *float64) float64

Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.

func FormatURLPath Uses

func FormatURLPath(format string, params ...string) string

FormatURLPath takes a format string (of the kind used in the fmt package) representing a URL path with a number of parameters that belong in the path and returns a formatted string.

This is mostly a pass through to Sprintf. It exists to make it it impossible to accidentally provide a parameter type that would be formatted improperly; for example, a string pointer instead of a string.

It also URL-escapes every given parameter. This usually isn't necessary for a standard Stripe ID, but is needed in places where user-provided IDs are allowed, like in coupons or plans. We apply it broadly for extra safety.

func Int64 Uses

func Int64(v int64) *int64

Int64 returns a pointer to the int64 value passed in.

func Int64Value Uses

func Int64Value(v *int64) int64

Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.

func NewIdempotencyKey Uses

func NewIdempotencyKey() string

NewIdempotencyKey generates a new idempotency key that can be used on a request.

func ParseID Uses

func ParseID(data []byte) (string, bool)

ParseID attempts to parse a string scalar from a given JSON value which is still encoded as []byte. If the value was a string, it returns the string along with true as the second return value. If not, false is returned as the second return value.

The purpose of this function is to detect whether a given value in a response from the Stripe API is a string ID or an expanded object.

func SetAppInfo Uses

func SetAppInfo(info *AppInfo)

SetAppInfo sets app information. See AppInfo.

func SetBackend Uses

func SetBackend(backend SupportedBackend, b Backend)

SetBackend sets the backend used in the binding.

func SetHTTPClient Uses

func SetHTTPClient(client *http.Client)

SetHTTPClient overrides the default HTTP client. This is useful if you're running in a Google AppEngine environment where the http.DefaultClient is not available.

func String Uses

func String(v string) *string

String returns a pointer to the string value passed in.

func StringValue Uses

func StringValue(v *string) string

StringValue returns the value of the string pointer passed in or "" if the pointer is nil.

type APIConnectionError Uses

type APIConnectionError struct {
    // contains filtered or unexported fields
}

APIConnectionError is a failure to connect to the Stripe API.

func (*APIConnectionError) Error Uses

func (e *APIConnectionError) Error() string

Error serializes the error object to JSON and returns it as a string.

type APIError Uses

type APIError struct {
    // contains filtered or unexported fields
}

APIError is a catch all for any errors not covered by other types (and should be extremely uncommon).

func (*APIError) Error Uses

func (e *APIError) Error() string

Error serializes the error object to JSON and returns it as a string.

type Account Uses

type Account struct {
              string                  `json:"business_logo"`
    BusinessName          string                  `json:"business_name"`
    BusinessPrimaryColor  string                  `json:"business_primary_color"`
    BusinessURL           string                  `json:"business_url"`
    ChargesEnabled        bool                    `json:"charges_enabled"`
    Country               string                  `json:"country"`
    Created               int64                   `json:"created"`
    DeclineChargeOn       *AccountDeclineSettings `json:"decline_charge_on"`
    DebitNegativeBalances bool                    `json:"debit_negative_balances"`
    DefaultCurrency       Currency                `json:"default_currency"`
    Deleted               bool                    `json:"deleted"`
    DetailsSubmitted      bool                    `json:"details_submitted"`
    Email                 string                  `json:"email"`
    ExternalAccounts      *ExternalAccountList    `json:"external_accounts"`
    ID                    string                  `json:"id"`

    Keys *struct {
        Publishable string `json:"publishable"`
        Secret      string `json:"secret"`
    }   `json:"keys"`

    LegalEntity               *LegalEntity      `json:"legal_entity"`
    Metadata                  map[string]string `json:"metadata"`
    DisplayName               string            `json:"display_name"`
    PayoutSchedule            *PayoutSchedule   `json:"payout_schedule"`
    PayoutStatementDescriptor string            `json:"payout_statement_descriptor"`
    PayoutsEnabled            bool              `json:"payouts_enabled"`
    ProductDescription        string            `json:"product_description"`
    StatementDescriptor       string            `json:"statement_descriptor"`
    SupportAddress            *Address          `json:"support_address"`
    SupportEmail              string            `json:"support_email"`
    SupportPhone              string            `json:"support_phone"`
    SupportURL                string            `json:"support_url"`
    Timezone                  string            `json:"timezone"`

    TOSAcceptance *struct {
        Date      int64  `json:"date"`
        IP        string `json:"ip"`
        UserAgent string `json:"user_agent"`
    }   `json:"tos_acceptance"`

    Type AccountType `json:"type"`

    Verification *struct {
        DisabledReason IdentityVerificationDisabledReason `json:"disabled_reason"`
        DueBy          int64                              `json:"due_by"`
        FieldsNeeded   []string                           `json:"fields_needed"`
    }   `json:"verification"`
}

Account is the resource representing your Stripe account. For more details see https://stripe.com/docs/api/#account.

func (*Account) UnmarshalJSON Uses

func (a *Account) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an account. This custom unmarshaling is needed because the resulting property may be an ID or the full struct if it was expanded.

type AccountAddress Uses

type AccountAddress struct {
    City       string `json:"city"`
    Country    string `json:"country"`
    Line1      string `json:"line1"`
    Line2      string `json:"line2"`
    PostalCode string `json:"postal_code"`
    State      string `json:"state"`

    // Town/cho-me. Note that this is only used for Kana/Kanji representations
    // of an address.
    Town string `json:"town"`
}

AccountAddress is the structure for an account address.

type AccountAddressParams Uses

type AccountAddressParams struct {
    City       *string `form:"city"`
    Country    *string `form:"country"`
    Line1      *string `form:"line1"`
    Line2      *string `form:"line2"`
    PostalCode *string `form:"postal_code"`
    State      *string `form:"state"`

    // Town/cho-me. Note that this is only used for Kana/Kanji representations
    // of an address.
    Town *string `form:"town"`
}

AccountAddressParams represents an address during account creation/updates.

type AccountDeclineSettings Uses

type AccountDeclineSettings struct {
    AVSFailure bool `json:"avs_failure"`
    CVCFailure bool `json:"cvc_failure"`
}

AccountDeclineSettings is the structure for an account's decline settings.

type AccountDeclineSettingsParams Uses

type AccountDeclineSettingsParams struct {
    AVSFailure *bool `form:"avs_failure"`
    CVCFailure *bool `form:"cvc_failure"`
}

AccountDeclineSettingsParams represents the parameters allowed for configuring declines on connected accounts.

type AccountExternalAccountParams Uses

type AccountExternalAccountParams struct {
    Params            `form:"*"`
    AccountNumber     *string `form:"account_number"`
    AccountHolderName *string `form:"account_holder_name"`
    AccountHolderType *string `form:"account_holder_type"`
    Country           *string `form:"country"`
    Currency          *string `form:"currency"`
    RoutingNumber     *string `form:"routing_number"`
    Token             *string `form:"token"`
}

AccountExternalAccountParams are the parameters allowed to reference an external account when creating an account. It should either have Token set or everything else.

func (*AccountExternalAccountParams) AppendTo Uses

func (p *AccountExternalAccountParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for AccountExternalAccountParams so that we can send the special required `object` field up along with the other specified parameters or the token value.

type AccountList Uses

type AccountList struct {
    ListMeta
    Data []*Account `json:"data"`
}

AccountList is a list of accounts as returned from a list endpoint.

type AccountListParams Uses

type AccountListParams struct {
    ListParams `form:"*"`
}

AccountListParams are the parameters allowed during account listing.

type AccountParams Uses

type AccountParams struct {
    Params                    `form:"*"`
    AccountToken              *string                       `form:"account_token"`
    BusinessName              *string                       `form:"business_name"`
    BusinessPrimaryColor      *string                       `form:"business_primary_color"`
    BusinessURL               *string                       `form:"business_url"`
    Country                   *string                       `form:"country"`
    DeclineChargeOn           *AccountDeclineSettingsParams `form:"decline_charge_on"`
    DebitNegativeBalances     *bool                         `form:"debit_negative_balances"`
    DefaultCurrency           *string                       `form:"default_currency"`
    Email                     *string                       `form:"email"`
    ExternalAccount           *AccountExternalAccountParams `form:"external_account"`
    FromRecipient             *string                       `form:"from_recipient"`
    LegalEntity               *LegalEntityParams            `form:"legal_entity"`
    PayoutSchedule            *PayoutScheduleParams         `form:"payout_schedule"`
    PayoutStatementDescriptor *string                       `form:"payout_statement_descriptor"`
    ProductDescription        *string                       `form:"product_description"`
    StatementDescriptor       *string                       `form:"statement_descriptor"`
    SupportEmail              *string                       `form:"support_email"`
    SupportPhone              *string                       `form:"support_phone"`
    SupportURL                *string                       `form:"support_url"`
    TOSAcceptance             *TOSAcceptanceParams          `form:"tos_acceptance"`
    Type                      *string                       `form:"type"`
}

AccountParams are the parameters allowed during account creation/updates.

type AccountRejectParams Uses

type AccountRejectParams struct {
    Params `form:"*"`
    Reason *string `form:"reason"`
}

AccountRejectParams is the structure for the Reject function.

type AccountRejectReason Uses

type AccountRejectReason string

AccountRejectReason describes the valid reason to reject an account

const (
    AccountRejectReasonFraud          AccountRejectReason = "fraud"
    AccountRejectReasonOther          AccountRejectReason = "other"
    AccountRejectReasonTermsOfService AccountRejectReason = "terms_of_service"
)

List of values that AccountRejectReason can take.

type AccountType Uses

type AccountType string

AccountType is the type of an account.

const (
    AccountTypeCustom   AccountType = "custom"
    AccountTypeExpress  AccountType = "express"
    AccountTypeStandard AccountType = "standard"
)

List of values that AccountType can take.

type AdditionalOwner Uses

type AdditionalOwner struct {
    Address                  *AccountAddress      `json:"address"`
    DOB                      DOB                  `json:"dob"`
    FirstName                string               `json:"first_name"`
    LastName                 string               `json:"last_name"`
    MaidenName               string               `json:"maiden_name"`
    PersonalIDNumberProvided bool                 `json:"personal_id_number_provided"`
    Verification             IdentityVerification `json:"verification"`
}

AdditionalOwner is the structure for an account owner.

type AdditionalOwnerParams Uses

type AdditionalOwnerParams struct {
    Address          *AccountAddressParams       `form:"address"`
    DOB              *DOBParams                  `form:"dob"`
    FirstName        *string                     `form:"first_name"`
    LastName         *string                     `form:"last_name"`
    MaidenName       *string                     `form:"maiden_name"`
    PersonalIDNumber *string                     `form:"personal_id_number"`
    Verification     *IdentityVerificationParams `form:"verification"`
}

AdditionalOwnerParams represents an additional owner during account creation/updates.

type Address Uses

type Address struct {
    City       string `json:"city"`
    Country    string `json:"country"`
    Line1      string `json:"line1"`
    Line2      string `json:"line2"`
    PostalCode string `json:"postal_code"`
    State      string `json:"state"`
}

Address describes common properties for an Address hash.

type AddressParams Uses

type AddressParams struct {
    City       *string `form:"city"`
    Country    *string `form:"country"`
    Line1      *string `form:"line1"`
    Line2      *string `form:"line2"`
    PostalCode *string `form:"postal_code"`
    State      *string `form:"state"`
}

AddressParams describes the common parameters for an Address.

type Amount Uses

type Amount struct {
    Value    int64    `json:"amount"`
    Currency Currency `json:"currency"`
}

Amount is a structure wrapping an amount value and its currency.

type AppInfo Uses

type AppInfo struct {
    Name      string `json:"name"`
    PartnerID string `json:"partner_id"`
    URL       string `json:"url"`
    Version   string `json:"version"`
}

AppInfo contains information about the "app" which this integration belongs to. This should be reserved for plugins that wish to identify themselves with Stripe.

type ApplePayDomain Uses

type ApplePayDomain struct {
    Created    int64  `json:"created"`
    Deleted    bool   `json:"deleted"`
    DomainName string `json:"domain_name"`
    ID         string `json:"id"`
    Livemode   bool   `json:"livemode"`
}

ApplePayDomain is the resource representing a Stripe ApplePayDomain object

type ApplePayDomainList Uses

type ApplePayDomainList struct {
    ListMeta
    Data []*ApplePayDomain `json:"data"`
}

ApplePayDomainList is a list of ApplePayDomains as returned from a list endpoint.

type ApplePayDomainListParams Uses

type ApplePayDomainListParams struct {
    ListParams `form:"*"`
}

ApplePayDomainListParams are the parameters allowed during ApplePayDomain listing.

type ApplePayDomainParams Uses

type ApplePayDomainParams struct {
    Params     `form:"*"`
    DomainName *string `form:"domain_name"`
}

ApplePayDomainParams is the set of parameters that can be used when creating an ApplePayDomain object.

type Application Uses

type Application struct {
    ID   string `json:"id"`
    Name string `json:"name"`
}

Application describes the properties for an Application.

func (*Application) UnmarshalJSON Uses

func (a *Application) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an Application. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type ApplicationFee Uses

type ApplicationFee struct {
    Account                *Account            `json:"account"`
    Amount                 int64               `json:"amount"`
    AmountRefunded         int64               `json:"amount_refunded"`
    Application            string              `json:"application"`
    BalanceTransaction     *BalanceTransaction `json:"balance_transaction"`
    Charge                 *Charge             `json:"charge"`
    Created                int64               `json:"created"`
    Currency               Currency            `json:"currency"`
    ID                     string              `json:"id"`
    Livemode               bool                `json:"livemode"`
    OriginatingTransaction *Charge             `json:"originating_transaction"`
    Refunded               bool                `json:"refunded"`
    Refunds                *FeeRefundList      `json:"refunds"`
}

ApplicationFee is the resource representing a Stripe application fee. For more details see https://stripe.com/docs/api#application_fees.

func (*ApplicationFee) UnmarshalJSON Uses

func (f *ApplicationFee) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an ApplicationFee. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type ApplicationFeeList Uses

type ApplicationFeeList struct {
    ListMeta
    Data []*ApplicationFee `json:"data"`
}

ApplicationFeeList is a list of application fees as retrieved from a list endpoint.

type ApplicationFeeListParams Uses

type ApplicationFeeListParams struct {
    ListParams   `form:"*"`
    Charge       *string           `form:"charge"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
}

ApplicationFeeListParams is the set of parameters that can be used when listing application fees. For more details see https://stripe.com/docs/api#list_application_fees.

type ApplicationFeeParams Uses

type ApplicationFeeParams struct {
    Params `form:"*"`
}

ApplicationFeeParams is the set of parameters that can be used when refunding an application fee. For more details see https://stripe.com/docs/api#refund_application_fee.

type AuthenticationError Uses

type AuthenticationError struct {
    // contains filtered or unexported fields
}

AuthenticationError is a failure to properly authenticate during a request.

func (*AuthenticationError) Error Uses

func (e *AuthenticationError) Error() string

Error serializes the error object to JSON and returns it as a string.

type AuthorizationControlsParams Uses

type AuthorizationControlsParams struct {
    AllowedCategories []*string `form:"allowed_categories"`
    BlockedCategories []*string `form:"blocked_categories"`
    MaxAmount         *int64    `form:"max_amount"`
    MaxApprovals      *int64    `form:"max_approvals"`
}

AuthorizationControlsParams is the set of parameters that can be used for the shipping parameter.

type Backend Uses

type Backend interface {
    Call(method, path, key string, params ParamsContainer, v interface{}) error
    CallRaw(method, path, key string, body *form.Values, params *Params, v interface{}) error
    CallMultipart(method, path, key, boundary string, body *bytes.Buffer, params *Params, v interface{}) error
    SetMaxNetworkRetries(maxNetworkRetries int)
}

Backend is an interface for making calls against a Stripe service. This interface exists to enable mocking for during testing if needed.

func GetBackend Uses

func GetBackend(backendType SupportedBackend) Backend

GetBackend returns one of the library's supported backends based off of the given argument.

It returns an existing default backend if one's already been created.

func GetBackendWithConfig Uses

func GetBackendWithConfig(backendType SupportedBackend, config *BackendConfig) Backend

GetBackendWithConfig is the same as GetBackend except that it can be given a configuration struct that will configure certain aspects of the backend that's return.

type BackendConfig Uses

type BackendConfig struct {
    // 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

    // 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.
    LogLevel int

    // Logger is where this backend will write its logs.
    //
    // If left unset, it'll be set to Logger.
    Logger Printfer

    // 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.
    MaxNetworkRetries int

    // URL is the base URL to use for API paths.
    //
    // If left empty, it'll be set to the default for the SupportedBackend.
    URL string
}

BackendConfig is used to configure a new Stripe backend.

type BackendImplementation Uses

type BackendImplementation struct {
    Type              SupportedBackend
    URL               string
    HTTPClient        *http.Client
    MaxNetworkRetries int
    LogLevel          int
    Logger            Printfer
    // contains filtered or unexported fields
}

BackendImplementation is the internal implementation for making HTTP calls to Stripe.

The public use of this struct is deprecated. It will be unexported in a future version.

func (*BackendImplementation) Call Uses

func (s *BackendImplementation) Call(method, path, key string, params ParamsContainer, v interface{}) error

Call is the Backend.Call implementation for invoking Stripe APIs.

func (*BackendImplementation) CallMultipart Uses

func (s *BackendImplementation) CallMultipart(method, path, key, boundary string, body *bytes.Buffer, params *Params, v interface{}) error

CallMultipart is the Backend.CallMultipart implementation for invoking Stripe APIs.

func (*BackendImplementation) CallRaw Uses

func (s *BackendImplementation) CallRaw(method, path, key string, form *form.Values, params *Params, v interface{}) error

CallRaw is the implementation for invoking Stripe APIs internally without a backend.

func (*BackendImplementation) Do Uses

func (s *BackendImplementation) Do(req *http.Request, body *bytes.Buffer, v interface{}) error

Do is used by Call to execute an API request and parse the response. It uses the backend's HTTP client to execute the request and unmarshals the response into v. It also handles unmarshaling errors returned by the API.

func (*BackendImplementation) NewRequest Uses

func (s *BackendImplementation) NewRequest(method, path, key, contentType string, params *Params) (*http.Request, error)

NewRequest is used by Call to generate an http.Request. It handles encoding parameters and attaching the appropriate headers.

func (*BackendImplementation) ResponseToError Uses

func (s *BackendImplementation) ResponseToError(res *http.Response, resBody []byte) error

ResponseToError converts a stripe response to an Error.

func (*BackendImplementation) SetMaxNetworkRetries Uses

func (s *BackendImplementation) SetMaxNetworkRetries(maxNetworkRetries int)

SetMaxNetworkRetries sets max number of retries on failed requests

This function is deprecated. Please use GetBackendWithConfig instead.

func (*BackendImplementation) SetNetworkRetriesSleep Uses

func (s *BackendImplementation) SetNetworkRetriesSleep(sleep bool)

SetNetworkRetriesSleep allows the normal sleep between network retries to be enabled or disabled.

This function is available for internal testing only and should never be used in production.

type Backends Uses

type Backends struct {
    API, Uploads Backend
    // contains filtered or unexported fields
}

Backends are the currently supported endpoints.

func NewBackends Uses

func NewBackends(httpClient *http.Client) *Backends

NewBackends creates a new set of backends with the given HTTP client. You should only need to use this for testing purposes or on App Engine.

type Balance Uses

type Balance struct {
    Available []*Amount `json:"available"`
    Livemode  bool      `json:"livemode"`
    Pending   []*Amount `json:"pending"`
}

Balance is the resource representing your Stripe balance. For more details see https://stripe.com/docs/api/#balance.

type BalanceParams Uses

type BalanceParams struct {
    Params `form:"*"`
}

BalanceParams is the set of parameters that can be used when retrieving a balance. For more details see https://stripe.com/docs/api#balance.

type BalanceTransaction Uses

type BalanceTransaction struct {
    Amount       int64                     `json:"amount"`
    AvailableOn  int64                     `json:"available_on"`
    Created      int64                     `json:"created"`
    Currency     Currency                  `json:"currency"`
    Description  string                    `json:"description"`
    ExchangeRate float64                   `json:"exchange_rate"`
    ID           string                    `json:"id"`
    Fee          int64                     `json:"fee"`
    FeeDetails   []*BalanceTransactionFee  `json:"fee_details"`
    Net          int64                     `json:"net"`
    Recipient    string                    `json:"recipient"`
    Source       *BalanceTransactionSource `json:"source"`
    Status       BalanceTransactionStatus  `json:"status"`
    Type         BalanceTransactionType    `json:"type"`
}

BalanceTransaction is the resource representing the balance transaction. For more details see https://stripe.com/docs/api/#balance.

func (*BalanceTransaction) UnmarshalJSON Uses

func (t *BalanceTransaction) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Transaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type BalanceTransactionFee Uses

type BalanceTransactionFee struct {
    Amount      int64    `json:"amount"`
    Application string   `json:"application"`
    Currency    Currency `json:"currency"`
    Description string   `json:"description"`
    Type        string   `json:"type"`
}

BalanceTransactionFee is a structure that breaks down the fees in a transaction.

type BalanceTransactionList Uses

type BalanceTransactionList struct {
    ListMeta
    Data []*BalanceTransaction `json:"data"`
}

BalanceTransactionList is a list of transactions as returned from a list endpoint.

type BalanceTransactionListParams Uses

type BalanceTransactionListParams struct {
    ListParams       `form:"*"`
    AvailableOn      *int64            `form:"available_on"`
    AvailableOnRange *RangeQueryParams `form:"available_on"`
    Created          *int64            `form:"created"`
    CreatedRange     *RangeQueryParams `form:"created"`
    Currency         *string           `form:"currency"`
    Payout           *string           `form:"payout"`
    Source           *string           `form:"source"`
    Type             *string           `form:"type"`
}

BalanceTransactionListParams is the set of parameters that can be used when listing balance transactions. For more details see https://stripe.com/docs/api/#balance_history.

type BalanceTransactionParams Uses

type BalanceTransactionParams struct {
    Params `form:"*"`
}

BalanceTransactionParams is the set of parameters that can be used when retrieving a transaction. For more details see https://stripe.com/docs/api#retrieve_balance_transaction.

type BalanceTransactionSource Uses

type BalanceTransactionSource struct {
    ApplicationFee       *ApplicationFee              `json:"-"`
    Charge               *Charge                      `json:"-"`
    Dispute              *Dispute                     `json:"-"`
    ID                   string                       `json:"id"`
    IssuingAuthorization *IssuingAuthorization        `json:"-"`
    IssuingTransaction   *IssuingAuthorization        `json:"-"`
    Payout               *Payout                      `json:"-"`
    RecipientTransfer    *RecipientTransfer           `json:"-"`
    Refund               *Refund                      `json:"-"`
    Reversal             *Reversal                    `json:"-"`
    Transfer             *Transfer                    `json:"-"`
    Type                 BalanceTransactionSourceType `json:"object"`
}

BalanceTransactionSource describes the source of a balance Transaction. The Type should indicate which object is fleshed out. For more details see https://stripe.com/docs/api#retrieve_balance_transaction

func (*BalanceTransactionSource) MarshalJSON Uses

func (s *BalanceTransactionSource) MarshalJSON() ([]byte, error)

MarshalJSON handles serialization of a BalanceTransactionSource.

func (*BalanceTransactionSource) UnmarshalJSON Uses

func (s *BalanceTransactionSource) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a BalanceTransactionSource. This custom unmarshaling is needed because the specific type of transaction source it refers to is specified in the JSON

type BalanceTransactionSourceType Uses

type BalanceTransactionSourceType string

BalanceTransactionSourceType consts represent valid balance transaction sources.

const (
    BalanceTransactionSourceTypeApplicationFee       BalanceTransactionSourceType = "application_fee"
    BalanceTransactionSourceTypeCharge               BalanceTransactionSourceType = "charge"
    BalanceTransactionSourceTypeDispute              BalanceTransactionSourceType = "dispute"
    BalanceTransactionSourceTypeIssuingAuthorization BalanceTransactionSourceType = "issuing.authorization"
    BalanceTransactionSourceTypeIssuingTransaction   BalanceTransactionSourceType = "issuing.transaction"
    BalanceTransactionSourceTypePayout               BalanceTransactionSourceType = "payout"
    BalanceTransactionSourceTypeRecipientTransfer    BalanceTransactionSourceType = "recipient_transfer"
    BalanceTransactionSourceTypeRefund               BalanceTransactionSourceType = "refund"
    BalanceTransactionSourceTypeReversal             BalanceTransactionSourceType = "reversal"
    BalanceTransactionSourceTypeTransfer             BalanceTransactionSourceType = "transfer"
)

List of values that BalanceTransactionSourceType can take.

type BalanceTransactionStatus Uses

type BalanceTransactionStatus string

BalanceTransactionStatus is the list of allowed values for the balance transaction's status.

const (
    BalanceTransactionStatusAvailable BalanceTransactionStatus = "available"
    BalanceTransactionStatusPending   BalanceTransactionStatus = "pending"
)

List of values that BalanceTransactionStatus can take.

type BalanceTransactionType Uses

type BalanceTransactionType string

BalanceTransactionType is the list of allowed values for the balance transaction's type.

const (
    BalanceTransactionTypeAdjustment                      BalanceTransactionType = "adjustment"
    BalanceTransactionTypeApplicationFee                  BalanceTransactionType = "application_fee"
    BalanceTransactionTypeApplicationFeeRefund            BalanceTransactionType = "application_fee_refund"
    BalanceTransactionTypeCharge                          BalanceTransactionType = "charge"
    BalanceTransactionTypeIssuingAuthorizationHold        BalanceTransactionType = "issuing_authorization_hold"
    BalanceTransactionTypeIssuingAuthorizationRelease     BalanceTransactionType = "issuing_authorization_release"
    BalanceTransactionTypeIssuingAuthorizationTransaction BalanceTransactionType = "issuing_transaction"
    BalanceTransactionTypePayment                         BalanceTransactionType = "payment"
    BalanceTransactionTypePaymentFailureRefund            BalanceTransactionType = "payment_failure_refund"
    BalanceTransactionTypePaymentRefund                   BalanceTransactionType = "payment_refund"
    BalanceTransactionTypePayout                          BalanceTransactionType = "payout"
    BalanceTransactionTypePayoutCancel                    BalanceTransactionType = "payout_cancel"
    BalanceTransactionTypePayoutFailure                   BalanceTransactionType = "payout_failure"
    BalanceTransactionTypeRecipientTransfer               BalanceTransactionType = "recipient_transfer"
    BalanceTransactionTypeRecipientTransferCancel         BalanceTransactionType = "recipient_transfer_cancel"
    BalanceTransactionTypeRecipientTransferFailure        BalanceTransactionType = "recipient_transfer_failure"
    BalanceTransactionTypeRefund                          BalanceTransactionType = "refund"
    BalanceTransactionTypeStripeFee                       BalanceTransactionType = "stripe_fee"
    BalanceTransactionTypeTransfer                        BalanceTransactionType = "transfer"
    BalanceTransactionTypeTransferRefund                  BalanceTransactionType = "transfer_refund"
)

List of values that BalanceTransactionType can take.

type BankAccount Uses

type BankAccount struct {
    AccountHolderName  string                       `json:"account_holder_name"`
    AccountHolderType  BankAccountAccountHolderType `json:"account_holder_type"`
    BankName           string                       `json:"bank_name"`
    Country            string                       `json:"country"`
    Currency           Currency                     `json:"currency"`
    Customer           *Customer                    `json:"customer"`
    DefaultForCurrency bool                         `json:"default_for_currency"`
    Deleted            bool                         `json:"deleted"`
    Fingerprint        string                       `json:"fingerprint"`
    ID                 string                       `json:"id"`
    Last4              string                       `json:"last4"`
    Metadata           map[string]string            `json:"metadata"`
    RoutingNumber      string                       `json:"routing_number"`
    Status             BankAccountStatus            `json:"status"`
}

BankAccount represents a Stripe bank account.

func (*BankAccount) UnmarshalJSON Uses

func (b *BankAccount) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a BankAccount. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type BankAccountAccountHolderType Uses

type BankAccountAccountHolderType string

BankAccountAccountHolderType is the list of allowed values for the bank account holder type.

const (
    BankAccountAccountHolderTypeCompany    BankAccountAccountHolderType = "company"
    BankAccountAccountHolderTypeIndividual BankAccountAccountHolderType = "individual"
)

List of values that BankAccountAccountHolderType can take.

type BankAccountList Uses

type BankAccountList struct {
    ListMeta
    Data []*BankAccount `json:"data"`
}

BankAccountList is a list object for bank accounts.

type BankAccountListParams Uses

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.

func (*BankAccountListParams) AppendTo Uses

func (p *BankAccountListParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for BankAccountListParams so that we can send the special required `object` field up along with the other specified parameters.

type BankAccountParams Uses

type BankAccountParams struct {
    Params `form:"*"`

    // Account is the identifier of the parent account under which bank
    // accounts are nested.
    Account *string `form:"-"`

    AccountHolderName  *string `form:"account_holder_name"`
    AccountHolderType  *string `form:"account_holder_type"`
    AccountNumber      *string `form:"account_number"`
    Country            *string `form:"country"`
    Currency           *string `form:"currency"`
    Customer           *string `form:"-"`
    DefaultForCurrency *bool   `form:"default_for_currency"`
    RoutingNumber      *string `form:"routing_number"`

    // Token is a token referencing an external account like one returned from
    // Stripe.js.
    Token *string `form:"-"`

    // ID is used when tokenizing a bank account for shared customers
    ID  *string `form:"*"`
}

BankAccountParams is the set of parameters that can be used when updating a bank account.

Note that while form annotations are used for updates, bank accounts have some unusual logic on creates that necessitates manual handling of all parameters. See AppendToAsSourceOrExternalAccount.

func (*BankAccountParams) AppendToAsSourceOrExternalAccount Uses

func (a *BankAccountParams) AppendToAsSourceOrExternalAccount(body *form.Values)

AppendToAsSourceOrExternalAccount appends the given BankAccountParams as either a source or external account.

It may look like an AppendTo from the form package, but it's not, and is only used in the special case where we use `bankaccount.New`. It's needed because we have some weird encoding logic here that can't be handled by the form package (and it's special enough that it wouldn't be desirable to have it do so).

This is not a pattern that we want to push forward, and this largely exists because the bank accounts endpoint is a little unusual. There is one other resource like it, which is cards.

type BankAccountStatus Uses

type BankAccountStatus string

BankAccountStatus is the list of allowed values for the bank account's status.

const (
    BankAccountStatusErrored            BankAccountStatus = "errored"
    BankAccountStatusNew                BankAccountStatus = "new"
    BankAccountStatusValidated          BankAccountStatus = "validated"
    BankAccountStatusVerificationFailed BankAccountStatus = "verification_failed"
    BankAccountStatusVerified           BankAccountStatus = "verified"
)

List of values that BankAccountStatus can take.

type BitcoinReceiver Uses

type BitcoinReceiver struct {
    Active                bool                    `json:"active"`
    Amount                int64                   `json:"amount"`
    AmountReceived        int64                   `json:"amount_received"`
    BitcoinAmount         int64                   `json:"bitcoin_amount"`
    BitcoinAmountReceived int64                   `json:"bitcoin_amount_received"`
    BitcoinURI            string                  `json:"bitcoin_uri"`
    Created               int64                   `json:"created"`
    Currency              Currency                `json:"currency"`
    Customer              string                  `json:"customer"`
    Description           string                  `json:"description"`
    Email                 string                  `json:"email"`
    Filled                bool                    `json:"filled"`
    ID                    string                  `json:"id"`
    InboundAddress        string                  `json:"inbound_address"`
    Metadata              map[string]string       `json:"metadata"`
    Payment               string                  `json:"payment"`
    RefundAddress         string                  `json:"refund_address"`
    RejectTransactions    bool                    `json:"reject_transactions"`
    Transactions          *BitcoinTransactionList `json:"transactions"`
}

BitcoinReceiver is the resource representing a Stripe bitcoin receiver. For more details see https://stripe.com/docs/api/#bitcoin_receivers

func (*BitcoinReceiver) UnmarshalJSON Uses

func (r *BitcoinReceiver) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a BitcoinReceiver. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type BitcoinReceiverList Uses

type BitcoinReceiverList struct {
    ListMeta
    Data []*BitcoinReceiver `json:"data"`
}

BitcoinReceiverList is a list of bitcoin receivers as retrieved from a list endpoint.

type BitcoinReceiverListParams Uses

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 see https://stripe.com/docs/api/#list_bitcoin_receivers.

type BitcoinTransaction Uses

type BitcoinTransaction struct {
    Amount        int64    `json:"amount"`
    BitcoinAmount int64    `json:"bitcoin_amount"`
    Created       int64    `json:"created"`
    Currency      Currency `json:"currency"`
    Customer      string   `json:"customer"`
    ID            string   `json:"id"`
    Receiver      string   `json:"receiver"`
}

BitcoinTransaction is the resource representing a Stripe bitcoin transaction. For more details see https://stripe.com/docs/api/#bitcoin_receivers

func (*BitcoinTransaction) UnmarshalJSON Uses

func (bt *BitcoinTransaction) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a BitcoinTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type BitcoinTransactionList Uses

type BitcoinTransactionList struct {
    ListMeta
    Data []*BitcoinTransaction `json:"data"`
}

BitcoinTransactionList is a list object for BitcoinTransactions. It is a child object of BitcoinRecievers For more details see https://stripe.com/docs/api/#retrieve_bitcoin_receiver

type BitcoinTransactionListParams Uses

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.

type CaptureParams Uses

type CaptureParams struct {
    Params              `form:"*"`
    Amount              *int64   `form:"amount"`
    ApplicationFee      *int64   `form:"application_fee"`
    ExchangeRate        *float64 `form:"exchange_rate"`
    ReceiptEmail        *string  `form:"receipt_email"`
    StatementDescriptor *string  `form:"statement_descriptor"`
}

CaptureParams is the set of parameters that can be used when capturing a charge.

type Card Uses

type Card struct {
    AddressCity            string                      `json:"address_city"`
    AddressCountry         string                      `json:"address_country"`
    AddressLine1           string                      `json:"address_line1"`
    AddressLine1Check      CardVerification            `json:"address_line1_check"`
    AddressLine2           string                      `json:"address_line2"`
    AddressState           string                      `json:"address_state"`
    AddressZip             string                      `json:"address_zip"`
    AddressZipCheck        CardVerification            `json:"address_zip_check"`
    AvailablePayoutMethods []CardAvailablePayoutMethod `json:"available_payout_methods"`
    Brand                  CardBrand                   `json:"brand"`
    CVCCheck               CardVerification            `json:"cvc_check"`
    Country                string                      `json:"country"`
    Currency               Currency                    `json:"currency"`
    Customer               *Customer                   `json:"customer"`
    DefaultForCurrency     bool                        `json:"default_for_currency"`
    Deleted                bool                        `json:"deleted"`

    // Description is a succinct summary of the card's information.
    //
    // Please note that this field is for internal use only and is not returned
    // as part of standard API requests.
    Description string `json:"description"`

    DynamicLast4 string      `json:"dynamic_last4"`
    ExpMonth     uint8       `json:"exp_month"`
    ExpYear      uint16      `json:"exp_year"`
    Fingerprint  string      `json:"fingerprint"`
    Funding      CardFunding `json:"funding"`
    ID           string      `json:"id"`

    // IIN is the card's "Issuer Identification Number".
    //
    // Please note that this field is for internal use only and is not returned
    // as part of standard API requests.
    IIN string `json:"iin"`

    // Issuer is a bank or financial institution that provides the card.
    //
    // Please note that this field is for internal use only and is not returned
    // as part of standard API requests.
    Issuer string `json:"issuer"`

    Last4              string                 `json:"last4"`
    Metadata           map[string]string      `json:"metadata"`
    Name               string                 `json:"name"`
    Recipient          *Recipient             `json:"recipient"`
    ThreeDSecure       *ThreeDSecure          `json:"three_d_secure"`
    TokenizationMethod CardTokenizationMethod `json:"tokenization_method"`
}

Card is the resource representing a Stripe credit/debit card. For more details see https://stripe.com/docs/api#cards.

func (*Card) UnmarshalJSON Uses

func (c *Card) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Card. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type CardAvailablePayoutMethod Uses

type CardAvailablePayoutMethod string

CardAvailablePayoutMethod is a set of available payout methods for the card.

const (
    CardAvailablePayoutMethodInstant  CardAvailablePayoutMethod = "Instant"
    CardAvailablePayoutMethodStandard CardAvailablePayoutMethod = "Standard"
)

List of values that CardAvailablePayoutMethod can take.

type CardBrand Uses

type CardBrand string

CardBrand is the list of allowed values for the card's brand.

const (
    CardBrandAmex       CardBrand = "American Express"
    CardBrandDiscover   CardBrand = "Discover"
    CardBrandDinersClub CardBrand = "Diners Club"
    CardBrandJCB        CardBrand = "JCB"
    CardBrandMasterCard CardBrand = "MasterCard"
    CardBrandUnknown    CardBrand = "Unknown"
    CardBrandUnionPay   CardBrand = "UnionPay"
    CardBrandVisa       CardBrand = "Visa"
)

List of values that CardBrand can take.

type CardError Uses

type CardError struct {
    DeclineCode string `json:"decline_code,omitempty"`
    // contains filtered or unexported fields
}

CardError are the most common type of error you should expect to handle. They result when the user enters a card that can't be charged for some reason.

func (*CardError) Error Uses

func (e *CardError) Error() string

Error serializes the error object to JSON and returns it as a string.

type CardFunding Uses

type CardFunding string

CardFunding is the list of allowed values for the card's funding.

const (
    CardFundingCredit  CardFunding = "credit"
    CardFundingDebit   CardFunding = "debit"
    CardFundingPrepaid CardFunding = "prepaid"
    CardFundingUnknown CardFunding = "unknown"
)

List of values that CardFunding can take.

type CardList Uses

type CardList struct {
    ListMeta
    Data []*Card `json:"data"`
}

CardList is a list object for cards.

type CardListParams Uses

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 see https://stripe.com/docs/api#list_cards.

func (*CardListParams) AppendTo Uses

func (p *CardListParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for CardListParams so that we can send the special required `object` field up along with the other specified parameters.

type CardParams Uses

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 customers
    ID  string `form:"*"`
}

CardParams is the set of parameters that can be used when creating or updating a card. For more details see https://stripe.com/docs/api#create_card and https://stripe.com/docs/api#update_card.

Note that while form annotations are used for tokenization and updates, cards have some unusual logic on creates that necessitates manual handling of all parameters. See AppendToAsCardSourceOrExternalAccount.

func (*CardParams) AppendToAsCardSourceOrExternalAccount Uses

func (c *CardParams) AppendToAsCardSourceOrExternalAccount(body *form.Values, keyParts []string)

AppendToAsCardSourceOrExternalAccount appends the given CardParams as either a card or external account.

It may look like an AppendTo from the form package, but it's not, and is only used in the special case where we use `card.New`. It's needed because we have some weird encoding logic here that can't be handled by the form package (and it's special enough that it wouldn't be desirable to have it do so).

This is not a pattern that we want to push forward, and this largely exists because the cards endpoint is a little unusual. There is one other resource like it, which is bank account.

type CardTokenizationMethod Uses

type CardTokenizationMethod string

CardTokenizationMethod is the list of allowed values for the card's tokenization method.

const (
    TokenizationMethodAndroidPay CardTokenizationMethod = "android_pay"
    TokenizationMethodApplePay   CardTokenizationMethod = "apple_pay"
)

List of values that CardTokenizationMethod can take.

type CardVerification Uses

type CardVerification string

CardVerification is the list of allowed verification responses.

const (
    CardVerificationFail      CardVerification = "fail"
    CardVerificationPass      CardVerification = "pass"
    CardVerificationUnchecked CardVerification = "unchecked"
)

List of values that CardVerification can take.

type Charge Uses

type Charge struct {
    Amount              int64               `json:"amount"`
    AmountRefunded      int64               `json:"amount_refunded"`
    Application         *Application        `json:"application"`
    ApplicationFee      *ApplicationFee     `json:"application_fee"`
    AuthorizationCode   string              `json:"authorization_code"`
    BalanceTransaction  *BalanceTransaction `json:"balance_transaction"`
    Captured            bool                `json:"captured"`
    Created             int64               `json:"created"`
    Currency            Currency            `json:"currency"`
    Customer            *Customer           `json:"customer"`
    Description         string              `json:"description"`
    Destination         *Account            `json:"destination"`
    Dispute             *Dispute            `json:"dispute"`
    FailureCode         string              `json:"failure_code"`
    FailureMessage      string              `json:"failure_message"`
    FraudDetails        *FraudDetails       `json:"fraud_details"`
    ID                  string              `json:"id"`
    Invoice             *Invoice            `json:"invoice"`
    Level3              ChargeLevel3        `json:"level3"`
    Livemode            bool                `json:"livemode"`
    Metadata            map[string]string   `json:"metadata"`
    Outcome             *ChargeOutcome      `json:"outcome"`
    Paid                bool                `json:"paid"`
    ReceiptEmail        string              `json:"receipt_email"`
    ReceiptNumber       string              `json:"receipt_number"`
    Refunded            bool                `json:"refunded"`
    Refunds             *RefundList         `json:"refunds"`
    Review              *Review             `json:"review"`
    Shipping            *ShippingDetails    `json:"shipping"`
    Source              *PaymentSource      `json:"source"`
    SourceTransfer      *Transfer           `json:"source_transfer"`
    StatementDescriptor string              `json:"statement_descriptor"`
    Status              string              `json:"status"`
    Transfer            *Transfer           `json:"transfer"`
    TransferGroup       string              `json:"transfer_group"`
}

Charge is the resource representing a Stripe charge. For more details see https://stripe.com/docs/api#charges.

Code:

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)

Code:

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 Uses

func (c *Charge) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a charge. This custom unmarshaling is needed because the resulting property may be an ID or the full struct if it was expanded.

type ChargeFraudStripeReport Uses

type ChargeFraudStripeReport string

ChargeFraudStripeReport is the list of allowed values for reporting fraud.

const (
    ChargeFraudStripeReportFraudulent ChargeFraudStripeReport = "fraudulent"
)

List of values that ChargeFraudStripeReport can take.

type ChargeFraudUserReport Uses

type ChargeFraudUserReport string

ChargeFraudUserReport is the list of allowed values for reporting fraud.

const (
    ChargeFraudUserReportFraudulent ChargeFraudUserReport = "fraudulent"
    ChargeFraudUserReportSafe       ChargeFraudUserReport = "safe"
)

List of values that ChargeFraudUserReport can take.

type ChargeLevel3 Uses

type ChargeLevel3 struct {
    CustomerReference  string                  `json:"customer_reference"`
    LineItems          []*ChargeLevel3LineItem `json:"line_items"`
    MerchantReference  string                  `json:"merchant_reference"`
    ShippingAddressZip string                  `json:"shipping_address_zip"`
    ShippingFromZip    string                  `json:"shipping_from_zip"`
    ShippingAmount     int64                   `json:"shipping_amount"`
}

ChargeLevel3 represents the Level III data. This is in private beta and would be empty for most integrations

type ChargeLevel3LineItem Uses

type ChargeLevel3LineItem struct {
    DiscountAmount     int64  `json:"discount_amount"`
    ProductCode        string `json:"product_code"`
    ProductDescription string `json:"product_description"`
    Quantity           int64  `json:"quantity"`
    TaxAmount          int64  `json:"tax_amount"`
    UnitCost           int64  `json:"unit_cost"`
}

ChargeLevel3LineItem represents a line item on level III data. This is in private beta and would be empty for most integrations

type ChargeLevel3LineItemsParams Uses

type ChargeLevel3LineItemsParams struct {
    DiscountAmount     *int64  `form:"discount_amount"`
    ProductCode        *string `form:"product_code"`
    ProductDescription *string `form:"product_description"`
    Quantity           *int64  `form:"quantity"`
    TaxAmount          *int64  `form:"tax_amount"`
    UnitCost           *int64  `form:"unit_cost"`
}

ChargeLevel3LineItemsParams is the set of parameters that represent a line item on level III data.

type ChargeLevel3Params Uses

type ChargeLevel3Params struct {
    CustomerReference  *string                        `form:"customer_reference"`
    LineItems          []*ChargeLevel3LineItemsParams `form:"line_items"`
    MerchantReference  *string                        `form:"merchant_reference"`
    ShippingAddressZip *string                        `form:"shipping_address_zip"`
    ShippingFromZip    *string                        `form:"shipping_from_zip"`
    ShippingAmount     *int64                         `form:"shipping_amount"`
}

ChargeLevel3Params is the set of parameters that can be used for the Level III data.

type ChargeList Uses

type ChargeList struct {
    ListMeta
    Data []*Charge `json:"data"`
}

ChargeList is a list of charges as retrieved from a list endpoint.

type ChargeListParams Uses

type ChargeListParams struct {
    ListParams    `form:"*"`
    Created       *int64            `form:"created"`
    CreatedRange  *RangeQueryParams `form:"created"`
    Customer      *string           `form:"customer"`
    TransferGroup *string           `form:"transfer_group"`
}

ChargeListParams is the set of parameters that can be used when listing charges.

type ChargeOutcome Uses

type ChargeOutcome struct {
    NetworkStatus string             `json:"network_status"`
    Reason        string             `json:"reason"`
    RiskLevel     string             `json:"risk_level"`
    RiskScore     int64              `json:"risk_score"`
    Rule          *ChargeOutcomeRule `json:"rule"`
    SellerMessage string             `json:"seller_message"`
    Type          string             `json:"type"`
}

ChargeOutcome is the charge's outcome that details whether a payment was accepted and why.

type ChargeOutcomeRule Uses

type ChargeOutcomeRule struct {
    Action    string `json:"action"`
    ID        string `json:"id"`
    Predicate string `json:"predicate"`
}

ChargeOutcomeRule tells you the Radar rule that blocked the charge, if any.

func (*ChargeOutcomeRule) UnmarshalJSON Uses

func (c *ChargeOutcomeRule) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a ChargeOutcomeRule. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type ChargeParams Uses

type ChargeParams struct {
    Params              `form:"*"`
    Amount              *int64                 `form:"amount"`
    ApplicationFee      *int64                 `form:"application_fee"`
    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"`
    TransferGroup       *string                `form:"transfer_group"`
}

ChargeParams is the set of parameters that can be used when creating or updating a charge.

func (*ChargeParams) SetSource Uses

func (p *ChargeParams) SetSource(sp interface{}) error

SetSource adds valid sources to a ChargeParams object, returning an error for unsupported sources.

type CodeVerificationFlow Uses

type CodeVerificationFlow struct {
    AttemptsRemaining int64                            `json:"attempts_remaining"`
    Status            SourceCodeVerificationFlowStatus `json:"status"`
}

CodeVerificationFlow informs of the state of a verification authentication flow.

type Country Uses

type Country string

Country is the list of supported countries

type CountrySpec Uses

type CountrySpec struct {
    DefaultCurrency                Currency                                    `json:"default_currency"`
    ID                             string                                      `json:"id"`
    SupportedBankAccountCurrencies map[Currency][]Country                      `json:"supported_bank_account_currencies"`
    SupportedPaymentCurrencies     []Currency                                  `json:"supported_payment_currencies"`
    SupportedPaymentMethods        []string                                    `json:"supported_payment_methods"`
    VerificationFields             map[LegalEntityType]*VerificationFieldsList `json:"verification_fields"`
}

CountrySpec is the resource representing the rules required for a Stripe account. For more details see https://stripe.com/docs/api/#country_specs.

type CountrySpecList Uses

type CountrySpecList struct {
    ListMeta
    Data []*CountrySpec `json:"data"`
}

CountrySpecList is a list of country specs as retrieved from a list endpoint.

type CountrySpecListParams Uses

type CountrySpecListParams struct {
    ListParams `form:"*"`
}

CountrySpecListParams are the parameters allowed during CountrySpec listing.

type CountrySpecParams Uses

type CountrySpecParams struct {
    Params `form:"*"`
}

CountrySpecParams are the parameters allowed during CountrySpec retrieval.

type Coupon Uses

type Coupon struct {
    AmountOff        int64             `json:"amount_off"`
    Created          int64             `json:"created"`
    Currency         Currency          `json:"currency"`
    Deleted          bool              `json:"deleted"`
    Duration         CouponDuration    `json:"duration"`
    DurationInMonths int64             `json:"duration_in_months"`
    ID               string            `json:"id"`
    Livemode         bool              `json:"livemode"`
    MaxRedemptions   int64             `json:"max_redemptions"`
    Metadata         map[string]string `json:"metadata"`
    Name             string            `json:"name"`
    PercentOff       float64           `json:"percent_off"`
    RedeemBy         int64             `json:"redeem_by"`
    TimesRedeemed    int64             `json:"times_redeemed"`
    Valid            bool              `json:"valid"`
}

Coupon is the resource representing a Stripe coupon. For more details see https://stripe.com/docs/api#coupons.

func (*Coupon) UnmarshalJSON Uses

func (c *Coupon) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Coupon. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type CouponDuration Uses

type CouponDuration string

CouponDuration is the list of allowed values for the coupon's duration.

const (
    CouponDurationForever   CouponDuration = "forever"
    CouponDurationOnce      CouponDuration = "once"
    CouponDurationRepeating CouponDuration = "repeating"
)

List of values that CouponDuration can take.

type CouponList Uses

type CouponList struct {
    ListMeta
    Data []*Coupon `json:"data"`
}

CouponList is a list of coupons as retrieved from a list endpoint.

type CouponListParams Uses

type CouponListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
}

CouponListParams is the set of parameters that can be used when listing coupons. For more detail see https://stripe.com/docs/api#list_coupons.

type CouponParams Uses

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 see https://stripe.com/docs/api#create_coupon.

type Currency Uses

type Currency string

Currency is the list of supported currencies. For more details see https://support.stripe.com/questions/which-currencies-does-stripe-support.

const (
    CurrencyAED Currency = "aed" // United Arab Emirates Dirham
    CurrencyAFN Currency = "afn" // Afghan Afghani
    CurrencyALL Currency = "all" // Albanian Lek
    CurrencyAMD Currency = "amd" // Armenian Dram
    CurrencyANG Currency = "ang" // Netherlands Antillean Gulden
    CurrencyAOA Currency = "aoa" // Angolan Kwanza
    CurrencyARS Currency = "ars" // Argentine Peso
    CurrencyAUD Currency = "aud" // Australian Dollar
    CurrencyAWG Currency = "awg" // Aruban Florin
    CurrencyAZN Currency = "azn" // Azerbaijani Manat
    CurrencyBAM Currency = "bam" // Bosnia & Herzegovina Convertible Mark
    CurrencyBBD Currency = "bbd" // Barbadian Dollar
    CurrencyBDT Currency = "bdt" // Bangladeshi Taka
    CurrencyBGN Currency = "bgn" // Bulgarian Lev
    CurrencyBIF Currency = "bif" // Burundian Franc
    CurrencyBMD Currency = "bmd" // Bermudian Dollar
    CurrencyBND Currency = "bnd" // Brunei Dollar
    CurrencyBOB Currency = "bob" // Bolivian Boliviano
    CurrencyBRL Currency = "brl" // Brazilian Real
    CurrencyBSD Currency = "bsd" // Bahamian Dollar
    CurrencyBWP Currency = "bwp" // Botswana Pula
    CurrencyBZD Currency = "bzd" // Belize Dollar
    CurrencyCAD Currency = "cad" // Canadian Dollar
    CurrencyCDF Currency = "cdf" // Congolese Franc
    CurrencyCHF Currency = "chf" // Swiss Franc
    CurrencyCLP Currency = "clp" // Chilean Peso
    CurrencyCNY Currency = "cny" // Chinese Renminbi Yuan
    CurrencyCOP Currency = "cop" // Colombian Peso
    CurrencyCRC Currency = "crc" // Costa Rican Colón
    CurrencyCVE Currency = "cve" // Cape Verdean Escudo
    CurrencyCZK Currency = "czk" // Czech Koruna
    CurrencyDJF Currency = "djf" // Djiboutian Franc
    CurrencyDKK Currency = "dkk" // Danish Krone
    CurrencyDOP Currency = "dop" // Dominican Peso
    CurrencyDZD Currency = "dzd" // Algerian Dinar
    CurrencyEEK Currency = "eek" // Estonian Kroon
    CurrencyEGP Currency = "egp" // Egyptian Pound
    CurrencyETB Currency = "etb" // Ethiopian Birr
    CurrencyEUR Currency = "eur" // Euro
    CurrencyFJD Currency = "fjd" // Fijian Dollar
    CurrencyFKP Currency = "fkp" // Falkland Islands Pound
    CurrencyGBP Currency = "gbp" // British Pound
    CurrencyGEL Currency = "gel" // Georgian Lari
    CurrencyGIP Currency = "gip" // Gibraltar Pound
    CurrencyGMD Currency = "gmd" // Gambian Dalasi
    CurrencyGNF Currency = "gnf" // Guinean Franc
    CurrencyGTQ Currency = "gtq" // Guatemalan Quetzal
    CurrencyGYD Currency = "gyd" // Guyanese Dollar
    CurrencyHKD Currency = "hkd" // Hong Kong Dollar
    CurrencyHNL Currency = "hnl" // Honduran Lempira
    CurrencyHRK Currency = "hrk" // Croatian Kuna
    CurrencyHTG Currency = "htg" // Haitian Gourde
    CurrencyHUF Currency = "huf" // Hungarian Forint
    CurrencyIDR Currency = "idr" // Indonesian Rupiah
    CurrencyILS Currency = "ils" // Israeli New Sheqel
    CurrencyINR Currency = "inr" // Indian Rupee
    CurrencyISK Currency = "isk" // Icelandic Króna
    CurrencyJMD Currency = "jmd" // Jamaican Dollar
    CurrencyJPY Currency = "jpy" // Japanese Yen
    CurrencyKES Currency = "kes" // Kenyan Shilling
    CurrencyKGS Currency = "kgs" // Kyrgyzstani Som
    CurrencyKHR Currency = "khr" // Cambodian Riel
    CurrencyKMF Currency = "kmf" // Comorian Franc
    CurrencyKRW Currency = "krw" // South Korean Won
    CurrencyKYD Currency = "kyd" // Cayman Islands Dollar
    CurrencyKZT Currency = "kzt" // Kazakhstani Tenge
    CurrencyLAK Currency = "lak" // Lao Kip
    CurrencyLBP Currency = "lbp" // Lebanese Pound
    CurrencyLKR Currency = "lkr" // Sri Lankan Rupee
    CurrencyLRD Currency = "lrd" // Liberian Dollar
    CurrencyLSL Currency = "lsl" // Lesotho Loti
    CurrencyLTL Currency = "ltl" // Lithuanian Litas
    CurrencyLVL Currency = "lvl" // Latvian Lats
    CurrencyMAD Currency = "mad" // Moroccan Dirham
    CurrencyMDL Currency = "mdl" // Moldovan Leu
    CurrencyMGA Currency = "mga" // Malagasy Ariary
    CurrencyMKD Currency = "mkd" // Macedonian Denar
    CurrencyMNT Currency = "mnt" // Mongolian Tögrög
    CurrencyMOP Currency = "mop" // Macanese Pataca
    CurrencyMRO Currency = "mro" // Mauritanian Ouguiya
    CurrencyMUR Currency = "mur" // Mauritian Rupee
    CurrencyMVR Currency = "mvr" // Maldivian Rufiyaa
    CurrencyMWK Currency = "mwk" // Malawian Kwacha
    CurrencyMXN Currency = "mxn" // Mexican Peso
    CurrencyMYR Currency = "myr" // Malaysian Ringgit
    CurrencyMZN Currency = "mzn" // Mozambican Metical
    CurrencyNAD Currency = "nad" // Namibian Dollar
    CurrencyNGN Currency = "ngn" // Nigerian Naira
    CurrencyNIO Currency = "nio" // Nicaraguan Córdoba
    CurrencyNOK Currency = "nok" // Norwegian Krone
    CurrencyNPR Currency = "npr" // Nepalese Rupee
    CurrencyNZD Currency = "nzd" // New Zealand Dollar
    CurrencyPAB Currency = "pab" // Panamanian Balboa
    CurrencyPEN Currency = "pen" // Peruvian Nuevo Sol
    CurrencyPGK Currency = "pgk" // Papua New Guinean Kina
    CurrencyPHP Currency = "php" // Philippine Peso
    CurrencyPKR Currency = "pkr" // Pakistani Rupee
    CurrencyPLN Currency = "pln" // Polish Złoty
    CurrencyPYG Currency = "pyg" // Paraguayan Guaraní
    CurrencyQAR Currency = "qar" // Qatari Riyal
    CurrencyRON Currency = "ron" // Romanian Leu
    CurrencyRSD Currency = "rsd" // Serbian Dinar
    CurrencyRUB Currency = "rub" // Russian Ruble
    CurrencyRWF Currency = "rwf" // Rwandan Franc
    CurrencySAR Currency = "sar" // Saudi Riyal
    CurrencySBD Currency = "sbd" // Solomon Islands Dollar
    CurrencySCR Currency = "scr" // Seychellois Rupee
    CurrencySEK Currency = "sek" // Swedish Krona
    CurrencySGD Currency = "sgd" // Singapore Dollar
    CurrencySHP Currency = "shp" // Saint Helenian Pound
    CurrencySLL Currency = "sll" // Sierra Leonean Leone
    CurrencySOS Currency = "sos" // Somali Shilling
    CurrencySRD Currency = "srd" // Surinamese Dollar
    CurrencySTD Currency = "std" // São Tomé and Príncipe Dobra
    CurrencySVC Currency = "svc" // Salvadoran Colón
    CurrencySZL Currency = "szl" // Swazi Lilangeni
    CurrencyTHB Currency = "thb" // Thai Baht
    CurrencyTJS Currency = "tjs" // Tajikistani Somoni
    CurrencyTOP Currency = "top" // Tongan Paʻanga
    CurrencyTRY Currency = "try" // Turkish Lira
    CurrencyTTD Currency = "ttd" // Trinidad and Tobago Dollar
    CurrencyTWD Currency = "twd" // New Taiwan Dollar
    CurrencyTZS Currency = "tzs" // Tanzanian Shilling
    CurrencyUAH Currency = "uah" // Ukrainian Hryvnia
    CurrencyUGX Currency = "ugx" // Ugandan Shilling
    CurrencyUSD Currency = "usd" // United States Dollar
    CurrencyUYU Currency = "uyu" // Uruguayan Peso
    CurrencyUZS Currency = "uzs" // Uzbekistani Som
    CurrencyVEF Currency = "vef" // Venezuelan Bolívar
    CurrencyVND Currency = "vnd" // Vietnamese Đồng
    CurrencyVUV Currency = "vuv" // Vanuatu Vatu
    CurrencyWST Currency = "wst" // Samoan Tala
    CurrencyXAF Currency = "xaf" // Central African Cfa Franc
    CurrencyXCD Currency = "xcd" // East Caribbean Dollar
    CurrencyXOF Currency = "xof" // West African Cfa Franc
    CurrencyXPF Currency = "xpf" // Cfp Franc
    CurrencyYER Currency = "yer" // Yemeni Rial
    CurrencyZAR Currency = "zar" // South African Rand
    CurrencyZMW Currency = "zmw" // Zambian Kwacha
)

List of values that Currency can take.

type Customer Uses

type Customer struct {
    AccountBalance      int64                        `json:"account_balance"`
    Created             int64                        `json:"created"`
    Currency            Currency                     `json:"currency"`
    DefaultSource       *PaymentSource               `json:"default_source"`
    Deleted             bool                         `json:"deleted"`
    Delinquent          bool                         `json:"delinquent"`
    Description         string                       `json:"description"`
    Discount            *Discount                    `json:"discount"`
    Email               string                       `json:"email"`
    ID                  string                       `json:"id"`
    InvoicePrefix       string                       `json:"invoice_prefix"`
    Livemode            bool                         `json:"livemode"`
    Metadata            map[string]string            `json:"metadata"`
    Shipping            *CustomerShippingDetails     `json:"shipping"`
    Sources             *SourceList                  `json:"sources"`
    Subscriptions       *SubscriptionList            `json:"subscriptions"`
    TaxInfo             *CustomerTaxInfo             `json:"tax_info"`
    TaxInfoVerification *CustomerTaxInfoVerification `json:"tax_info_verification"`
}

Customer is the resource representing a Stripe customer. For more details see https://stripe.com/docs/api#customers.

Code:

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 Uses

func (c *Customer) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Customer. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type CustomerList Uses

type CustomerList struct {
    ListMeta
    Data []*Customer `json:"data"`
}

CustomerList is a list of customers as retrieved from a list endpoint.

type CustomerListParams Uses

type CustomerListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
}

CustomerListParams is the set of parameters that can be used when listing customers. For more details see https://stripe.com/docs/api#list_customers.

type CustomerParams Uses

type CustomerParams struct {
    Params         `form:"*"`
    AccountBalance *int64                         `form:"account_balance"`
    Coupon         *string                        `form:"coupon"`
    DefaultSource  *string                        `form:"default_source"`
    Description    *string                        `form:"description"`
    Email          *string                        `form:"email"`
    InvoicePrefix  *string                        `form:"invoice_prefix"`
    Plan           *string                        `form:"plan"`
    Quantity       *int64                         `form:"quantity"`
    Shipping       *CustomerShippingDetailsParams `form:"shipping"`
    Source         *SourceParams                  `form:"*"` // SourceParams has custom encoding so brought to top level with "*"
    TaxInfo        *CustomerTaxInfoParams         `form:"tax_info"`
    TaxPercent     *float64                       `form:"tax_percent"`
    Token          *string                        `form:"-"` // This doesn't seem to be used?
    TrialEnd       *int64                         `form:"trial_end"`
}

CustomerParams is the set of parameters that can be used when creating or updating a customer. For more details see https://stripe.com/docs/api#create_customer and https://stripe.com/docs/api#update_customer.

func (*CustomerParams) SetSource Uses

func (cp *CustomerParams) SetSource(sp interface{}) error

SetSource adds valid sources to a CustomerParams object, returning an error for unsupported sources.

type CustomerShippingDetails Uses

type CustomerShippingDetails struct {
    Address Address `json:"address"`
    Name    string  `json:"name"`
    Phone   string  `json:"phone"`
}

CustomerShippingDetails is the structure containing shipping information.

type CustomerShippingDetailsParams Uses

type CustomerShippingDetailsParams struct {
    Address *AddressParams `form:"address"`
    Name    *string        `form:"name"`
    Phone   *string        `form:"phone"`
}

CustomerShippingDetailsParams is the structure containing shipping information.

type CustomerSourceParams Uses

type CustomerSourceParams struct {
    Params   `form:"*"`
    Customer *string       `form:"-"` // Goes in the URL
    Source   *SourceParams `form:"*"` // SourceParams has custom encoding so brought to top level with "*"
}

CustomerSourceParams are used to manipulate a given Stripe Customer object's payment sources. For more details see https://stripe.com/docs/api#sources

func (*CustomerSourceParams) SetSource Uses

func (cp *CustomerSourceParams) SetSource(sp interface{}) error

SetSource adds valid sources to a CustomerSourceParams object, returning an error for unsupported sources.

type CustomerTaxInfo Uses

type CustomerTaxInfo struct {
    TaxID string              `json:"tax_id"`
    Type  CustomerTaxInfoType `json:"type"`
}

CustomerTaxInfo is the structure containing tax information for the customer.

type CustomerTaxInfoParams Uses

type CustomerTaxInfoParams struct {
    TaxID *string `form:"tax_id"`
    Type  *string `form:"type"`
}

CustomerTaxInfoParams is the structure containing tax information for the customer.

type CustomerTaxInfoType Uses

type CustomerTaxInfoType string

CustomerTaxInfoType is the type of tax info associated with a customer.

const (
    CustomerTaxInfoTypeVAT CustomerTaxInfoType = "vat"
)

List of values that CustomerTaxInfoType can take.

type CustomerTaxInfoVerification Uses

type CustomerTaxInfoVerification struct {
    Status       CustomerTaxInfoVerificationStatus `json:"status"`
    VerifiedName string                            `json:"verified_name"`
}

CustomerTaxInfoVerification is the structure containing tax verification for the customer.

type CustomerTaxInfoVerificationStatus Uses

type CustomerTaxInfoVerificationStatus string

CustomerTaxInfoVerificationStatus is the type of tax info associated with a customer.

const (
    CustomerTaxInfoVerificationStatusPending    CustomerTaxInfoVerificationStatus = "pending"
    CustomerTaxInfoVerificationStatusUnverified CustomerTaxInfoVerificationStatus = "unverified"
    CustomerTaxInfoVerificationStatusVerified   CustomerTaxInfoVerificationStatus = "verified"
)

List of values that CustomerTaxInfoType can take.

type DOB Uses

type DOB struct {
    Day   int64 `json:"day"`
    Month int64 `json:"month"`
    Year  int64 `json:"year"`
}

DOB is a structure for an account owner's date of birth.

type DOBParams Uses

type DOBParams struct {
    Day   *int64 `form:"day"`
    Month *int64 `form:"month"`
    Year  *int64 `form:"year"`
}

DOBParams represents a DOB during account creation/updates.

type DeliveryEstimate Uses

type DeliveryEstimate struct {
    // If Type == Exact
    Date string `json:"date"`
    // If Type == Range
    Earliest string                    `json:"earliest"`
    Latest   string                    `json:"latest"`
    Type     OrderDeliveryEstimateType `json:"type"`
}

DeliveryEstimate represent the properties available for a shipping method's estimated delivery.

type DestinationParams Uses

type DestinationParams struct {
    Account *string `form:"account"`
    Amount  *int64  `form:"amount"`
}

DestinationParams describes the parameters available for the destination hash when creating a charge.

type Discount Uses

type Discount struct {
    Coupon       *Coupon `json:"coupon"`
    Customer     string  `json:"customer"`
    Deleted      bool    `json:"deleted"`
    End          int64   `json:"end"`
    Start        int64   `json:"start"`
    Subscription string  `json:"subscription"`
}

Discount is the resource representing a Stripe discount. For more details see https://stripe.com/docs/api#discounts.

type DiscountParams Uses

type DiscountParams struct {
    Params `form:"*"`
}

DiscountParams is the set of parameters that can be used when deleting a discount.

type Dispute Uses

type Dispute struct {
    Amount              int64                 `json:"amount"`
    BalanceTransactions []*BalanceTransaction `json:"balance_transactions"`
    Charge              *Charge               `json:"charge"`
    Created             int64                 `json:"created"`
    Currency            Currency              `json:"currency"`
    Evidence            *DisputeEvidence      `json:"evidence"`
    EvidenceDetails     *EvidenceDetails      `json:"evidence_details"`
    ID                  string                `json:"id"`
    IsChargeRefundable  bool                  `json:"is_charge_refundable"`
    Livemode            bool                  `json:"livemode"`
    Metadata            map[string]string     `json:"metadata"`
    Reason              DisputeReason         `json:"reason"`
    Status              DisputeStatus         `json:"status"`
}

Dispute is the resource representing a Stripe dispute. For more details see https://stripe.com/docs/api#disputes.

func (*Dispute) UnmarshalJSON Uses

func (d *Dispute) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Dispute. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type DisputeEvidence Uses

type DisputeEvidence struct {
    AccessActivityLog            string      `json:"access_activity_log"`
    BillingAddress               string      `json:"billing_address"`
    CancellationPolicy           *FileUpload `json:"cancellation_policy"`
    CancellationPolicyDisclosure string      `json:"cancellation_policy_disclosure"`
    CancellationRebuttal         string      `json:"cancellation_rebuttal"`
    CustomerCommunication        *FileUpload `json:"customer_communication"`
    CustomerEmailAddress         string      `json:"customer_email_address"`
    CustomerName                 string      `json:"customer_name"`
    CustomerPurchaseIP           string      `json:"customer_purchase_ip"`
    CustomerSignature            *FileUpload `json:"customer_signature"`
    DuplicateChargeDocumentation *FileUpload `json:"duplicate_charge_documentation"`
    DuplicateChargeExplanation   string      `json:"duplicate_charge_explanation"`
    DuplicateChargeID            string      `json:"duplicate_charge_id"`
    ProductDescription           string      `json:"product_description"`
    Receipt                      *FileUpload `json:"receipt"`
    RefundPolicy                 *FileUpload `json:"refund_policy"`
    RefundPolicyDisclosure       string      `json:"refund_policy_disclosure"`
    RefundRefusalExplanation     string      `json:"refund_refusal_explanation"`
    ServiceDate                  string      `json:"service_date"`
    ServiceDocumentation         *FileUpload `json:"service_documentation"`
    ShippingAddress              string      `json:"shipping_address"`
    ShippingCarrier              string      `json:"shipping_carrier"`
    ShippingDate                 string      `json:"shipping_date"`
    ShippingDocumentation        *FileUpload `json:"shipping_documentation"`
    ShippingTrackingNumber       string      `json:"shipping_tracking_number"`
    UncategorizedFile            *FileUpload `json:"uncategorized_file"`
    UncategorizedText            string      `json:"uncategorized_text"`
}

DisputeEvidence is the structure that contains various details about the evidence submitted for the dispute. Almost all fields are strings since there structures (i.e. address) do not typically get parsed by anyone and are thus presented as-received.

type DisputeEvidenceParams Uses

type DisputeEvidenceParams struct {
    AccessActivityLog            *string `form:"access_activity_log"`
    BillingAddress               *string `form:"billing_address"`
    CancellationPolicy           *string `form:"cancellation_policy"`
    CancellationPolicyDisclosure *string `form:"cancellation_policy_disclosure"`
    CancellationRebuttal         *string `form:"cancellation_rebuttal"`
    CustomerCommunication        *string `form:"customer_communication"`
    CustomerEmailAddress         *string `form:"customer_email_address"`
    CustomerName                 *string `form:"customer_name"`
    CustomerPurchaseIP           *string `form:"customer_purchase_ip"`
    CustomerSignature            *string `form:"customer_signature"`
    DuplicateChargeDocumentation *string `form:"duplicate_charge_documentation"`
    DuplicateChargeExplanation   *string `form:"duplicate_charge_explanation"`
    DuplicateChargeID            *string `form:"duplicate_charge_id"`
    ProductDescription           *string `form:"product_description"`
    Receipt                      *string `form:"receipt"`
    RefundPolicy                 *string `form:"refund_policy"`
    RefundPolicyDisclosure       *string `form:"refund_policy_disclosure"`
    RefundRefusalExplanation     *string `form:"refund_refusal_explanation"`
    ServiceDate                  *string `form:"service_date"`
    ServiceDocumentation         *string `form:"service_documentation"`
    ShippingAddress              *string `form:"shipping_address"`
    ShippingCarrier              *string `form:"shipping_carrier"`
    ShippingDate                 *string `form:"shipping_date"`
    ShippingDocumentation        *string `form:"shipping_documentation"`
    ShippingTrackingNumber       *string `form:"shipping_tracking_number"`
    UncategorizedFile            *string `form:"uncategorized_file"`
    UncategorizedText            *string `form:"uncategorized_text"`
}

DisputeEvidenceParams is the set of parameters that can be used when submitting evidence for disputes.

type DisputeList Uses

type DisputeList struct {
    ListMeta
    Data []*Dispute `json:"data"`
}

DisputeList is a list of disputes as retrieved from a list endpoint.

type DisputeListParams Uses

type DisputeListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
}

DisputeListParams is the set of parameters that can be used when listing disputes. For more details see https://stripe.com/docs/api#list_disputes.

type DisputeParams Uses

type DisputeParams struct {
    Params   `form:"*"`
    Evidence *DisputeEvidenceParams `form:"evidence"`
    Submit   *bool                  `form:"submit"`
}

DisputeParams is the set of parameters that can be used when updating a dispute. For more details see https://stripe.com/docs/api#update_dispute.

type DisputeReason Uses

type DisputeReason string

DisputeReason is the list of allowed values for a discount's reason.

const (
    DisputeReasonCreditNotProcessed   DisputeReason = "credit_not_processed"
    DisputeReasonDuplicate            DisputeReason = "duplicate"
    DisputeReasonFraudulent           DisputeReason = "fraudulent"
    DisputeReasonGeneral              DisputeReason = "general"
    DisputeReasonProductNotReceived   DisputeReason = "product_not_received"
    DisputeReasonProductUnacceptable  DisputeReason = "product_unacceptable"
    DisputeReasonSubscriptionCanceled DisputeReason = "subscription_canceled"
    DisputeReasonUnrecognized         DisputeReason = "unrecognized"
)

List of values that DisputeReason can take.

type DisputeStatus Uses

type DisputeStatus string

DisputeStatus is the list of allowed values for a discount's status.

const (
    DisputeStatusChargeRefunded       DisputeStatus = "charge_refunded"
    DisputeStatusLost                 DisputeStatus = "lost"
    DisputeStatusNeedsResponse        DisputeStatus = "needs_response"
    DisputeStatusUnderReview          DisputeStatus = "under_review"
    DisputeStatusWarningClosed        DisputeStatus = "warning_closed"
    DisputeStatusWarningNeedsResponse DisputeStatus = "warning_needs_response"
    DisputeStatusWarningUnderReview   DisputeStatus = "warning_under_review"
    DisputeStatusWon                  DisputeStatus = "won"
)

List of values that DisputeStatus can take.

type EphemeralKey Uses

type EphemeralKey struct {
    AssociatedObjects []struct {
        ID   string `json:"id"`
        Type string `json:"type"`
    }   `json:"associated_objects"`

    Created  int64  `json:"created"`
    Expires  int64  `json:"expires"`
    ID       string `json:"id"`
    Livemode bool   `json:"livemode"`

    // RawJSON is provided so that it may be passed back to the frontend
    // unchanged.  Ephemeral keys are issued on behalf of another client which
    // may be running a different version of the bindings and thus expect a
    // different JSON structure.  This ensures that if the structure differs
    // from the version of these bindings, we can still pass back a compatible
    // key.
    RawJSON []byte `json:"-"`
}

EphemeralKey is the resource representing a Stripe ephemeral key. For more details see https://stripe.com/docs/api#ephemeral_keys.

func (*EphemeralKey) UnmarshalJSON Uses

func (e *EphemeralKey) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an EphemeralKey. This custom unmarshaling is needed because we need to store the raw JSON on the object so it may be passed back to the frontend.

type EphemeralKeyParams Uses

type EphemeralKeyParams struct {
    Params        `form:"*"`
    Customer      *string `form:"customer"`
    StripeVersion *string `form:"-"` // This goes in the `Stripe-Version` header
}

EphemeralKeyParams is the set of parameters that can be used when creating an ephemeral key. For more details see https://stripe.com/docs/api#ephemeral_keys.

type Error Uses

type Error struct {
    ChargeID string    `json:"charge,omitempty"`
    Code     ErrorCode `json:"code,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 ChargeError that indicates
    // exactly what went wrong during a charge.
    Err error `json:"-"`

    HTTPStatusCode int       `json:"status,omitempty"`
    Msg            string    `json:"message"`
    Param          string    `json:"param,omitempty"`
    RequestID      string    `json:"request_id,omitempty"`
    Type           ErrorType `json:"type"`
}

Error is the response returned when a call is unsuccessful. For more details see https://stripe.com/docs/api#errors.

func (*Error) Error Uses

func (e *Error) Error() string

Error serializes the error object to JSON and returns it as a string.

type ErrorCode Uses

type ErrorCode string

ErrorCode is the list of allowed values for the error's code.

const (
    ErrorCodeCardDeclined       ErrorCode = "card_declined"
    ErrorCodeExpiredCard        ErrorCode = "expired_card"
    ErrorCodeIncorrectCVC       ErrorCode = "incorrect_cvc"
    ErrorCodeIncorrectZip       ErrorCode = "incorrect_zip"
    ErrorCodeIncorrectNumber    ErrorCode = "incorrect_number"
    ErrorCodeInvalidCVC         ErrorCode = "invalid_cvc"
    ErrorCodeInvalidExpiryMonth ErrorCode = "invalid_expiry_month"
    ErrorCodeInvalidExpiryYear  ErrorCode = "invalid_expiry_year"
    ErrorCodeInvalidNumber      ErrorCode = "invalid_number"
    ErrorCodeInvalidSwipeData   ErrorCode = "invalid_swipe_data"
    ErrorCodeMissing            ErrorCode = "missing"
    ErrorCodeProcessingError    ErrorCode = "processing_error"
    ErrorCodeRateLimit          ErrorCode = "rate_limit"
    ErrorCodeResourceMissing    ErrorCode = "resource_missing"
)

List of values that ErrorCode can take.

type ErrorType Uses

type ErrorType string

ErrorType is the list of allowed values for the error's type.

const (
    ErrorTypeAPI            ErrorType = "api_error"
    ErrorTypeAPIConnection  ErrorType = "api_connection_error"
    ErrorTypeAuthentication ErrorType = "authentication_error"
    ErrorTypeCard           ErrorType = "card_error"
    ErrorTypeInvalidRequest ErrorType = "invalid_request_error"
    ErrorTypePermission     ErrorType = "more_permissions_required"
    ErrorTypeRateLimit      ErrorType = "rate_limit_error"
)

List of values that ErrorType can take.

type Event Uses

type Event struct {
    Account         string        `json:"account"`
    Created         int64         `json:"created"`
    Data            *EventData    `json:"data"`
    ID              string        `json:"id"`
    Livemode        bool          `json:"livemode"`
    PendingWebhooks int64         `json:"pending_webhooks"`
    Request         *EventRequest `json:"request"`
    Type            string        `json:"type"`
}

Event is the resource representing a Stripe event. For more details see https://stripe.com/docs/api#events.

func (*Event) GetObjectValue Uses

func (e *Event) GetObjectValue(keys ...string) string

GetObjectValue returns the value from the e.Data.Object bag based on the keys hierarchy.

func (*Event) GetPreviousValue Uses

func (e *Event) GetPreviousValue(keys ...string) string

GetPreviousValue returns the value from the e.Data.Prev bag based on the keys hierarchy.

type EventData Uses

type EventData struct {
    Object             map[string]interface{}
    PreviousAttributes map[string]interface{} `json:"previous_attributes"`
    Raw                json.RawMessage        `json:"object"`
}

EventData is the unmarshalled object as a map.

func (*EventData) UnmarshalJSON Uses

func (e *EventData) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of the EventData. This custom unmarshaling exists so that we can keep both the map and raw data.

type EventList Uses

type EventList struct {
    ListMeta
    Data []*Event `json:"data"`
}

EventList is a list of events as retrieved from a list endpoint.

type EventListParams Uses

type EventListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
    Type         *string           `form:"type"`
    Types        []*string         `form:"types"`
}

EventListParams is the set of parameters that can be used when listing events. For more details see https://stripe.com/docs/api#list_events.

type EventParams Uses

type EventParams struct {
    Params `form:"*"`
}

EventParams is the set of parameters that can be used when retrieving events. For more details see https://stripe.com/docs/api#retrieve_events.

type EventRequest Uses

type EventRequest struct {
    // ID is the request ID of the request that created an event, if the event
    // was created by a request.
    ID  string `json:"id"`

    // IdempotencyKey is the idempotency key of the request that created an
    // event, if the event was created by a request and if an idempotency key
    // was specified for that request.
    IdempotencyKey string `json:"idempotency_key"`
}

EventRequest contains information on a request that created an event.

type EvidenceDetails Uses

type EvidenceDetails struct {
    DueBy           int64 `json:"due_by"`
    HasEvidence     bool  `json:"has_evidence"`
    PastDue         bool  `json:"past_due"`
    SubmissionCount int64 `json:"submission_count"`
}

EvidenceDetails is the structure representing more details about the dispute.

type ExchangeRate Uses

type ExchangeRate struct {
    ID    string               `json:"id"`
    Rates map[Currency]float64 `json:"rates"`
}

ExchangeRate is the resource representing the currency exchange rates at a given time.

type ExchangeRateList Uses

type ExchangeRateList struct {
    ListMeta
    Data []*ExchangeRate `json:"data"`
}

ExchangeRateList is a list of exchange rates as retrieved from a list endpoint.

type ExchangeRateListParams Uses

type ExchangeRateListParams struct {
    ListParams `form:"*"`
}

ExchangeRateListParams are the parameters allowed during ExchangeRate listing.

type ExchangeRateParams Uses

type ExchangeRateParams struct {
    Params `form:"*"`
}

ExchangeRateParams is the set of parameters that can be used when retrieving exchange rates.

type ExternalAccount Uses

type ExternalAccount struct {
    // BankAccount is a bank account attached to an account. Populated only if
    // the external account is a bank account.
    BankAccount *BankAccount

    // Card is a card attached to an account. Populated only if the external
    // account is a card.
    Card *Card

    ID   string              `json:"id"`
    Type ExternalAccountType `json:"object"`
}

ExternalAccount is an external account (a bank account or card) that's attached to an account. It contains fields that will be conditionally populated depending on its type.

func (*ExternalAccount) UnmarshalJSON Uses

func (ea *ExternalAccount) UnmarshalJSON(data []byte) error

UnmarshalJSON implements Unmarshaler.UnmarshalJSON.

type ExternalAccountList Uses

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 bank accounts or cards.

type ExternalAccountType Uses

type ExternalAccountType string

ExternalAccountType is the type of an external account.

const (
    ExternalAccountTypeBankAccount ExternalAccountType = "bank_account"
    ExternalAccountTypeCard        ExternalAccountType = "card"
)

List of values that ExternalAccountType can take.

type ExtraValues Uses

type ExtraValues struct {
    url.Values `form:"-"` // See custom AppendTo implementation
}

ExtraValues are extra parameters that are attached to an API request. They're implemented as a custom type so that they can have their own AppendTo implementation.

func (ExtraValues) AppendTo Uses

func (v ExtraValues) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom form encoding for extra parameter values.

type FeeRefund Uses

type FeeRefund struct {
    Amount             int64               `json:"amount"`
    BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
    Created            int64               `json:"created"`
    Currency           Currency            `json:"currency"`
    Fee                string              `json:"fee"`
    ID                 string              `json:"id"`
    Metadata           map[string]string   `json:"metadata"`
}

FeeRefund is the resource representing a Stripe application fee refund. For more details see https://stripe.com/docs/api#fee_refunds.

func (*FeeRefund) UnmarshalJSON Uses

func (r *FeeRefund) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a FeeRefund. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type FeeRefundList Uses

type FeeRefundList struct {
    ListMeta
    Data []*FeeRefund `json:"data"`
}

FeeRefundList is a list object for application fee refunds.

type FeeRefundListParams Uses

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 see https://stripe.com/docs/api#list_fee_refunds.

type FeeRefundParams Uses

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 see https://stripe.com/docs/api#fee_refund.

type FileLink struct {
    Created   int64             `json:"created"`
    Expired   bool              `json:"expired"`
    ExpiresAt int64             `json:"expires_at"`
    File      *FileUpload       `json:"file"`
    ID        string            `json:"id"`
    Livemode  bool              `json:"livemode"`
    Metadata  map[string]string `json:"metadata"`
    Object    string            `json:"object"`
    URL       string            `json:"url"`
}

FileLink is the resource representing a Stripe file link. For more details see https://stripe.com/docs/api#file_links.

func (*FileLink) UnmarshalJSON Uses

func (c *FileLink) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a file link. This custom unmarshaling is needed because the resulting property may be an ID or the full struct if it was expanded.

type FileLinkList struct {
    ListMeta
    Data []*FileLink `json:"data"`
}

FileLinkList is a list of file links as retrieved from a list endpoint.

type FileLinkListParams Uses

type FileLinkListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
    Expired      *bool             `form:"expired"`
    File         *string           `form:"file"`
}

FileLinkListParams is the set of parameters that can be used when listing file links.

type FileLinkParams Uses

type FileLinkParams struct {
    Params    `form:"*"`
    ExpiresAt *int64  `form:"expires_at"`
    File      *string `form:"file"`
}

FileLinkParams is the set of parameters that can be used when creating or updating a file link.

type FileUpload Uses

type FileUpload struct {
    Created  int64             `json:"created"`
    ID       string            `json:"id"`
    Filename string            `json:"filename"`
    Links    *FileLinkList     `json:"links"`
    Purpose  FileUploadPurpose `json:"purpose"`
    Size     int64             `json:"size"`
    Type     string            `json:"type"`
    URL      string            `json:"url"`
}

FileUpload is the resource representing a Stripe file upload. For more details see https://stripe.com/docs/api#file_uploads.

func (*FileUpload) UnmarshalJSON Uses

func (f *FileUpload) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a FileUpload. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type FileUploadList Uses

type FileUploadList struct {
    ListMeta
    Data []*FileUpload `json:"data"`
}

FileUploadList is a list of file uploads as retrieved from a list endpoint.

type FileUploadListParams Uses

type FileUploadListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
    Purpose      *string           `form:"purpose"`
}

FileUploadListParams is the set of parameters that can be used when listing file uploads. For more details see https://stripe.com/docs/api#list_file_uploads.

type FileUploadParams Uses

type FileUploadParams struct {
    Params `form:"*"`

    // FileReader is a reader with the contents of the file that should be uploaded.
    FileReader io.Reader

    // Filename is just the name of the file without path information.
    Filename *string

    Purpose *string
}

FileUploadParams is the set of parameters that can be used when creating a file upload. For more details see https://stripe.com/docs/api#create_file_upload.

func (*FileUploadParams) GetBody Uses

func (f *FileUploadParams) GetBody() (*bytes.Buffer, string, error)

GetBody gets an appropriate multipart form payload to use in a request body to create a new file.

type FileUploadPurpose Uses

type FileUploadPurpose string

FileUploadPurpose is the purpose of a particular file upload.

const (
    FileUploadPurposeDisputeEvidence  FileUploadPurpose = "dispute_evidence"
    FileUploadPurposeIdentityDocument FileUploadPurpose = "identity_document"
)

List of values that FileUploadPurpose can take.

type Filters Uses

type Filters struct {
    // contains filtered or unexported fields
}

Filters is a structure that contains a collection of filters for list-related APIs.

func (*Filters) AddFilter Uses

func (f *Filters) AddFilter(key, op, value string)

AddFilter adds a new filter with a given key, op and value.

func (Filters) AppendTo Uses

func (f Filters) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom form encoding for filters.

type FraudDetails Uses

type FraudDetails struct {
    UserReport   ChargeFraudUserReport   `json:"user_report"`
    StripeReport ChargeFraudStripeReport `json:"stripe_report"`
}

FraudDetails is the structure detailing fraud status.

type FraudDetailsParams Uses

type FraudDetailsParams struct {
    UserReport *string `form:"user_report"`
}

FraudDetailsParams provides information on the fraud details for a charge.

type IdentityVerification Uses

type IdentityVerification struct {
    Details      string                          `json:"details"`
    DetailsCode  IdentityVerificationDetailsCode `json:"details_code"`
    Document     *FileUpload                     `json:"document"`
    DocumentBack *FileUpload                     `json:"document_back"`
    Status       IdentityVerificationStatus      `json:"status"`
}

IdentityVerification is the structure for an account's verification.

type IdentityVerificationDetailsCode Uses

type IdentityVerificationDetailsCode string

IdentityVerificationDetailsCode is a machine-readable code specifying the verification state of a legal entity

const (
    IdentityVerificationDetailsCodeFailedKeyedIdentity       IdentityVerificationDetailsCode = "failed_keyed_identity"
    IdentityVerificationDetailsCodeFailedOther               IdentityVerificationDetailsCode = "failed_other"
    IdentityVerificationDetailsCodeScanCorrupt               IdentityVerificationDetailsCode = "scan_corrupt"
    IdentityVerificationDetailsCodeScanFailedGreyscale       IdentityVerificationDetailsCode = "scan_failed_greyscale"
    IdentityVerificationDetailsCodeScanFailedOther           IdentityVerificationDetailsCode = "scan_failed_other"
    IdentityVerificationDetailsCodeScanIDCountryNotSupported IdentityVerificationDetailsCode = "scan_id_country_not_supported"
    IdentityVerificationDetailsCodeScanIDTypeNotSupported    IdentityVerificationDetailsCode = "scan_id_type_not_supported"
    IdentityVerificationDetailsCodeScanNameMismatch          IdentityVerificationDetailsCode = "scan_name_mismatch"
    IdentityVerificationDetailsCodeScanNotReadable           IdentityVerificationDetailsCode = "scan_not_readable"
    IdentityVerificationDetailsCodeScanNotUploaded           IdentityVerificationDetailsCode = "scan_not_uploaded"
)

List of values that IdentityVerificationDetailsCode can take.

type IdentityVerificationDisabledReason Uses

type IdentityVerificationDisabledReason string

IdentityVerificationDisabledReason describes the valid reason to disable account

const (
    IdentityVerificationDisabledReasonFieldsNeeded           IdentityVerificationDisabledReason = "fields_needed"
    IdentityVerificationDisabledReasonListed                 IdentityVerificationDisabledReason = "listed"
    IdentityVerificationDisabledReasonOther                  IdentityVerificationDisabledReason = "other"
    IdentityVerificationDisabledReasonRejectedFraud          IdentityVerificationDisabledReason = "rejected.fraud"
    IdentityVerificationDisabledReasonRejectedListed         IdentityVerificationDisabledReason = "rejected.listed"
    IdentityVerificationDisabledReasonRejectedOther          IdentityVerificationDisabledReason = "rejected.other"
    IdentityVerificationDisabledReasonRejectedTermsOfService IdentityVerificationDisabledReason = "rejected.terms_of_service"
    IdentityVerificationDisabledReasonUnderReview            IdentityVerificationDisabledReason = "under_review"
)

List of values that IdentityVerificationDisabledReason can take.

type IdentityVerificationParams Uses

type IdentityVerificationParams struct {
    Document     *string `form:"document"`
    DocumentBack *string `form:"document_back"`
}

IdentityVerificationParams represents a verification during account creation/updates.

type IdentityVerificationStatus Uses

type IdentityVerificationStatus string

IdentityVerificationStatus describes the different statuses for identity verification.

const (
    IdentityVerificationStatusPending    IdentityVerificationStatus = "pending"
    IdentityVerificationStatusUnverified IdentityVerificationStatus = "unverified"
    IdentityVerificationStatusVerified   IdentityVerificationStatus = "verified"
)

List of values that IdentityVerificationStatus can take.

type InvalidRequestError Uses

type InvalidRequestError struct {
    // contains filtered or unexported fields
}

InvalidRequestError is an error that occurs when a request contains invalid parameters.

func (*InvalidRequestError) Error Uses

func (e *InvalidRequestError) Error() string

Error serializes the error object to JSON and returns it as a string.

type Inventory Uses

type Inventory struct {
    Quantity int64             `json:"quantity"`
    Type     SKUInventoryType  `json:"type"`
    Value    SKUInventoryValue `json:"value"`
}

Inventory represents the inventory options of a SKU.

type InventoryParams Uses

type InventoryParams struct {
    Quantity *int64  `form:"quantity"`
    Type     *string `form:"type"`
    Value    *string `form:"value"`
}

InventoryParams is the set of parameters allowed as inventory on a SKU.

type Invoice Uses

type Invoice struct {
    AmountDue                 int64                `json:"amount_due"`
    AmountPaid                int64                `json:"amount_paid"`
    AmountRemaining           int64                `json:"amount_remaining"`
    ApplicationFee            int64                `json:"application_fee"`
    AttemptCount              int64                `json:"attempt_count"`
    Attempted                 bool                 `json:"attempted"`
    AutoAdvance               bool                 `json:"auto_advance"`
    Billing                   InvoiceBilling       `json:"billing"`
    BillingReason             InvoiceBillingReason `json:"billing_reason"`
    Charge                    *Charge              `json:"charge"`
    Closed                    bool                 `json:"closed"`
    Currency                  Currency             `json:"currency"`
    Customer                  *Customer            `json:"customer"`
    Date                      int64                `json:"date"`
    Description               string               `json:"description"`
    Discount                  *Discount            `json:"discount"`
    DueDate                   int64                `json:"due_date"`
    EndingBalance             int64                `json:"ending_balance"`
    Forgiven                  bool                 `json:"forgiven"`
    HostedInvoiceURL          string               `json:"hosted_invoice_url"`
    ID                        string               `json:"id"`
    InvoicePDF                string               `json:"invoice_pdf"`
    Lines                     *InvoiceLineList     `json:"lines"`
    Livemode                  bool                 `json:"livemode"`
    Metadata                  map[string]string    `json:"metadata"`
    NextPaymentAttempt        int64                `json:"next_payment_attempt"`
    Number                    string               `json:"number"`
    Paid                      bool                 `json:"paid"`
    PeriodEnd                 int64                `json:"period_end"`
    PeriodStart               int64                `json:"period_start"`
    ReceiptNumber             string               `json:"receipt_number"`
    StartingBalance           int64                `json:"starting_balance"`
    StatementDescriptor       string               `json:"statement_descriptor"`
    Subscription              string               `json:"subscription"`
    SubscriptionProrationDate int64                `json:"subscription_proration_date"`
    Subtotal                  int64                `json:"subtotal"`
    Tax                       int64                `json:"tax"`
    TaxPercent                float64              `json:"tax_percent"`
    Total                     int64                `json:"total"`
    WebhooksDeliveredAt       int64                `json:"webhooks_delivered_at"`
}

Invoice is the resource representing a Stripe invoice. For more details see https://stripe.com/docs/api#invoice_object.

Code:

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 Uses

func (i *Invoice) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an Invoice. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type InvoiceBilling Uses

type InvoiceBilling string

InvoiceBilling is the type of billing method for this invoice.

const (
    InvoiceBillingChargeAutomatically InvoiceBilling = "charge_automatically"
    InvoiceBillingSendInvoice         InvoiceBilling = "send_invoice"
)

List of values that InvoiceBilling can take.

type InvoiceBillingReason Uses

type InvoiceBillingReason string

InvoiceBillingReason is the reason why a given invoice was created

const (
    InvoiceBillingReasonManual             InvoiceBillingReason = "manual"
    InvoiceBillingReasonSubscription       InvoiceBillingReason = "subscription"
    InvoiceBillingReasonSubscriptionCycle  InvoiceBillingReason = "subscription_cycle"
    InvoiceBillingReasonSubscriptionUpdate InvoiceBillingReason = "subscription_update"
    InvoiceBillingReasonUpcoming           InvoiceBillingReason = "upcoming"
)

List of values that InvoiceBillingReason can take.

type InvoiceItem Uses

type InvoiceItem struct {
    Amount       int64             `json:"amount"`
    Currency     Currency          `json:"currency"`
    Customer     *Customer         `json:"customer"`
    Date         int64             `json:"date"`
    Deleted      bool              `json:"deleted"`
    Description  string            `json:"description"`
    Discountable bool              `json:"discountable"`
    ID           string            `json:"id"`
    Invoice      *Invoice          `json:"invoice"`
    Livemode     bool              `json:"livemode"`
    Metadata     map[string]string `json:"metadata"`
    Period       *Period           `json:"period"`
    Plan         *Plan             `json:"plan"`
    Proration    bool              `json:"proration"`
    Quantity     int64             `json:"quantity"`
    Subscription *Subscription     `json:"subscription"`
    UnitAmount   int64             `json:"unit_amount"`
}

InvoiceItem is the resource represneting a Stripe invoice item. For more details see https://stripe.com/docs/api#invoiceitems.

func (*InvoiceItem) UnmarshalJSON Uses

func (i *InvoiceItem) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an InvoiceItem. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type InvoiceItemList Uses

type InvoiceItemList struct {
    ListMeta
    Data []*InvoiceItem `json:"data"`
}

InvoiceItemList is a list of invoice items as retrieved from a list endpoint.

type InvoiceItemListParams Uses

type InvoiceItemListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
    Customer     *string           `form:"customer"`
}

InvoiceItemListParams is the set of parameters that can be used when listing invoice items. For more details see https://stripe.com/docs/api#list_invoiceitems.

type InvoiceItemParams Uses

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"`
    Quantity     *int64  `form:"quantity"`
    Subscription *string `form:"subscription"`
    UnitAmount   *int64  `form:"unit_amount"`
}

InvoiceItemParams is the set of parameters that can be used when creating or updating an invoice item. For more details see https://stripe.com/docs/api#create_invoiceitem and https://stripe.com/docs/api#update_invoiceitem.

type InvoiceLine Uses

type InvoiceLine struct {
    Amount           int64             `json:"amount"`
    Currency         Currency          `json:"currency"`
    Description      string            `json:"description"`
    Discountable     bool              `json:"discountable"`
    ID               string            `json:"id"`
    Livemode         bool              `json:"live_mode"`
    Metadata         map[string]string `json:"metadata"`
    Period           *Period           `json:"period"`
    Plan             *Plan             `json:"plan"`
    Proration        bool              `json:"proration"`
    Quantity         int64             `json:"quantity"`
    Subscription     string            `json:"subscription"`
    SubscriptionItem string            `json:"subscription_item"`
    Type             InvoiceLineType   `json:"type"`
}

InvoiceLine is the resource representing a Stripe invoice line item. For more details see https://stripe.com/docs/api#invoice_line_item_object.

type InvoiceLineList Uses

type InvoiceLineList struct {
    ListMeta
    Data []*InvoiceLine `json:"data"`
}

InvoiceLineList is a list object for invoice line items.

type InvoiceLineListParams Uses

type InvoiceLineListParams struct {
    ListParams `form:"*"`

    Customer *string `form:"customer"`

    // ID is the invoice ID to list invoice lines for.
    ID  *string `form:"-"` // Goes in the URL

    Subscription *string `form:"subscription"`
}

InvoiceLineListParams is the set of parameters that can be used when listing invoice line items. For more details see https://stripe.com/docs/api#invoice_lines.

type InvoiceLineType Uses

type InvoiceLineType string

InvoiceLineType is the list of allowed values for the invoice line's type.

const (
    InvoiceLineTypeInvoiceItem  InvoiceLineType = "invoiceitem"
    InvoiceLineTypeSubscription InvoiceLineType = "subscription"
)

List of values that InvoiceLineType can take.

type InvoiceList Uses

type InvoiceList struct {
    ListMeta
    Data []*Invoice `json:"data"`
}

InvoiceList is a list of invoices as retrieved from a list endpoint.

type InvoiceListParams Uses

type InvoiceListParams struct {
    ListParams   `form:"*"`
    Billing      *string           `form:"billing"`
    Customer     *string           `form:"customer"`
    Date         *int64            `form:"date"`
    DateRange    *RangeQueryParams `form:"date"`
    DueDate      *int64            `form:"due_date"`
    Subscription *string           `form:"subscription"`
}

InvoiceListParams is the set of parameters that can be used when listing invoices. For more details see https://stripe.com/docs/api#list_customer_invoices.

type InvoiceParams Uses

type InvoiceParams struct {
    Params              `form:"*"`
    ApplicationFee      *int64   `form:"application_fee"`
    Billing             *string  `form:"billing"`
    Closed              *bool    `form:"closed"`
    Customer            *string  `form:"customer"`
    DaysUntilDue        *int64   `form:"days_until_due"`
    Description         *string  `form:"description"`
    DueDate             *int64   `form:"due_date"`
    Forgiven            *bool    `form:"forgiven"`
    Paid                *bool    `form:"paid"`
    StatementDescriptor *string  `form:"statement_descriptor"`
    Subscription        *string  `form:"subscription"`
    TaxPercent          *float64 `form:"tax_percent"`

    Coupon                         *string                           `form:"coupon"`
    InvoiceItems                   *InvoiceUpcomingInvoiceItemParams `form:"invoice_items"`
    SubscriptionBillingCycleAnchor *int64                            `form:"subscription_billing_cycle_anchor"`
    SubscriptionItems              []*SubscriptionItemsParams        `form:"subscription_items"`
    SubscriptionPlan               *string                           `form:"subscription_plan"`
    SubscriptionProrate            *bool                             `form:"subscription_prorate"`
    SubscriptionProrationDate      *int64                            `form:"subscription_proration_date"`
    SubscriptionQuantity           *int64                            `form:"subscription_quantity"`
    SubscriptionTaxPercent         *float64                          `form:"subscription_tax_percent"`
    SubscriptionTrialEnd           *int64                            `form:"subscription_trial_end"`
    SubscriptionTrialFromPlan      *bool                             `form:"subscription_trial_from_plan"`
}

InvoiceParams is the set of parameters that can be used when creating or updating an invoice. For more details see https://stripe.com/docs/api#create_invoice, https://stripe.com/docs/api#update_invoice.

type InvoicePayParams Uses

type InvoicePayParams struct {
    Params  `form:"*"`
    Forgive *bool   `form:"forgive"`
    Source  *string `form:"source"`
}

InvoicePayParams is the set of parameters that can be used when paying invoices. For more details, see: https://stripe.com/docs/api#pay_invoice.

type InvoiceUpcomingInvoiceItemParams Uses

type InvoiceUpcomingInvoiceItemParams struct {
    Amount       *int64  `form:"amount"`
    Currency     *string `form:"currency"`
    Description  *string `form:"description"`
    Discountable *bool   `form:"discountable"`
    InvoiceItem  *string `form:"invoiceitem"`
}

InvoiceUpcomingInvoiceItemParams is the set of parameters that can be used when adding or modifying invoice items on an upcoming invoice. For more details see https://stripe.com/docs/api#upcoming_invoice-invoice_items.

type IssuerFraudRecord Uses

type IssuerFraudRecord struct {
    Charge          *Charge         `json:"charge"`
    Created         int64           `json:"created"`
    IssuerFraudType IssuerFraudType `json:"fraud_type"`
    ID              string          `json:"id"`
    Livemode        bool            `json:"livemode"`
    PostDate        int64           `json:"post_date"`
}

IssuerFraudRecord is the resource representing an issuer fraud record. For more details see https://stripe.com/docs/api#issuer_fraud_records.

type IssuerFraudRecordList Uses

type IssuerFraudRecordList struct {
    ListMeta
    Values []*IssuerFraudRecord `json:"data"`
}

IssuerFraudRecordList is a list of issuer fraud records as retrieved from a list endpoint.

type IssuerFraudRecordListParams Uses

type IssuerFraudRecordListParams struct {
    ListParams `form:"*"`
    Charge     *string `form:"-"`
}

IssuerFraudRecordListParams is the set of parameters that can be used when listing issuer fraud records. For more details see https://stripe.com/docs#list_issuer_fraud_records.

type IssuerFraudRecordParams Uses

type IssuerFraudRecordParams struct {
    Params `form:"*"`
}

IssuerFraudRecordParams is the set of parameters that can be used when retrieving issuer fraud records. For more details see https://stripe.com/docs#retrieve_issuer_fraud_records.

type IssuerFraudType Uses

type IssuerFraudType string

IssuerFraudType are strings that map to the fraud label category from the issuer.

const (
    IssuerFraudTypeCardNeverReceived         IssuerFraudType = "card_never_received"
    IssuerFraudTypeFraudulentCardApplication IssuerFraudType = "fraudulent_card_application"
    IssuerFraudTypeMadeWithCounterfeitCard   IssuerFraudType = "made_with_counterfeit_card"
    IssuerFraudTypeMadeWithLostCard          IssuerFraudType = "made_with_lost_card"
    IssuerFraudTypeMadeWithStolenCard        IssuerFraudType = "made_with_stolen_card"
    IssuerFraudTypeMisc                      IssuerFraudType = "misc"
    IssuerFraudTypeUnauthorizedUseOfCard     IssuerFraudType = "unauthorized_use_of_card"
)

List of values that IssuerFraudType can take.

type IssuingAuthorization Uses

type IssuingAuthorization struct {
    Approved                 bool                                    `json:"approved"`
    AuthorizationMethod      IssuingAuthorizationAuthorizationMethod `json:"authorization_method"`
    AuthorizedAmount         int64                                   `json:"authorized_amount"`
    AuthorizedCurrency       Currency                                `json:"authorized_currency"`
    BalanceTransactions      []*BalanceTransaction                   `json:"balance_transactions"`
    Card                     *IssuingCard                            `json:"card"`
    Cardholder               *IssuingCardholder                      `json:"cardholder"`
    Created                  int64                                   `json:"created"`
    HeldAmount               int64                                   `json:"held_amount"`
    HeldCurrency             Currency                                `json:"held_currency"`
    ID                       string                                  `json:"id"`
    IsHeldAmountControllable bool                                    `json:"is_held_amount_controllable"`
    Livemode                 bool                                    `json:"livemode"`
    MerchantData             *IssuingMerchantData                    `json:"merchant_data"`
    Metadata                 map[string]string                       `json:"metadata"`
    Object                   string                                  `json:"object"`
    PendingAuthorizedAmount  int64                                   `json:"pending_authorized_amount"`
    PendingHeldAmount        int64                                   `json:"pending_held_amount"`
    RequestHistory           []*IssuingAuthorizationRequestHistory   `json:"request_history"`
    Status                   IssuingAuthorizationStatus              `json:"status"`
    Transactions             []*IssuingTransaction                   `json:"transactions"`
    VerificationData         *IssuingAuthorizationVerificationData   `json:"verification_data"`
}

IssuingAuthorization is the resource representing a Stripe issuing authorization.

func (*IssuingAuthorization) UnmarshalJSON Uses

func (i *IssuingAuthorization) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an IssuingAuthorization. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type IssuingAuthorizationAuthorizationControls Uses

type IssuingAuthorizationAuthorizationControls struct {
    AllowedCategories []string `json:"allowed_categories"`
    BlockedCategories []string `json:"blocked_categories"`
    Currency          Currency `json:"currency"`
    MaxAmount         int64    `json:"max_amount"`
    MaxApprovals      int64    `json:"max_approvals"`
}

IssuingAuthorizationAuthorizationControls is the resource representing authorization controls on an issuing authorization.

type IssuingAuthorizationAuthorizationMethod Uses

type IssuingAuthorizationAuthorizationMethod string

IssuingAuthorizationAuthorizationMethod is the list of possible values for the authorization method on an issuing authorization.

const (
    IssuingAuthorizationAuthorizationMethodChip        IssuingAuthorizationAuthorizationMethod = "chip"
    IssuingAuthorizationAuthorizationMethodContactless IssuingAuthorizationAuthorizationMethod = "contactless"
    IssuingAuthorizationAuthorizationMethodKeyedIn     IssuingAuthorizationAuthorizationMethod = "keyed_in"
    IssuingAuthorizationAuthorizationMethodOnline      IssuingAuthorizationAuthorizationMethod = "online"
    IssuingAuthorizationAuthorizationMethodSwipe       IssuingAuthorizationAuthorizationMethod = "swipe"
)

List of values that IssuingAuthorizationAuthorizationMethod can take.

type IssuingAuthorizationList Uses

type IssuingAuthorizationList struct {
    ListMeta
    Data []*IssuingAuthorization `json:"data"`
}

IssuingAuthorizationList is a list of issuing authorizations as retrieved from a list endpoint.

type IssuingAuthorizationListParams Uses

type IssuingAuthorizationListParams struct {
    ListParams   `form:"*"`
    Card         *string           `form:"card"`
    Cardholder   *string           `form:"cardholder"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
    Status       *string           `form:"status"`
}

IssuingAuthorizationListParams is the set of parameters that can be used when listing issuing authorizations.

type IssuingAuthorizationParams Uses

type IssuingAuthorizationParams struct {
    Params `form:"*"`
}

IssuingAuthorizationParams is the set of parameters that can be used when updating an issuing authorization.

type IssuingAuthorizationRequestHistory Uses

type IssuingAuthorizationRequestHistory struct {
    Approved           bool                                     `json:"approved"`
    AuthorizedAmount   int64                                    `json:"authorized_amount"`
    AuthorizedCurrency Currency                                 `json:"authorized_currency"`
    Created            int64                                    `json:"created"`
    HeldAmount         int64                                    `json:"held_amount"`
    HeldCurrency       Currency                                 `json:"held_currency"`
    Reason             IssuingAuthorizationRequestHistoryReason `json:"reason"`
}

IssuingAuthorizationRequestHistory is the resource representing a request history on an issuing authorization.

type IssuingAuthorizationRequestHistoryReason Uses

type IssuingAuthorizationRequestHistoryReason string

IssuingAuthorizationRequestHistoryReason is the list of possible values for the request history reason on an issuing authorization.

const (
    IssuingAuthorizationRequestHistoryReasonAuthorizationControls IssuingAuthorizationRequestHistoryReason = "authorization_controls"
    IssuingAuthorizationRequestHistoryReasonCardActive            IssuingAuthorizationRequestHistoryReason = "card_active"
    IssuingAuthorizationRequestHistoryReasonCardInactive          IssuingAuthorizationRequestHistoryReason = "card_inactive"
    IssuingAuthorizationRequestHistoryReasonInsufficientFunds     IssuingAuthorizationRequestHistoryReason = "insufficient_funds"
    IssuingAuthorizationRequestHistoryReasonWebhookApproved       IssuingAuthorizationRequestHistoryReason = "webhook_approved"
    IssuingAuthorizationRequestHistoryReasonWebhookDeclined       IssuingAuthorizationRequestHistoryReason = "webhook_declined"
    IssuingAuthorizationRequestHistoryReasonWebhookTimeout        IssuingAuthorizationRequestHistoryReason = "webhook_timeout"
)

List of values that IssuingAuthorizationRequestHistoryReason can take.

type IssuingAuthorizationStatus Uses

type IssuingAuthorizationStatus string

IssuingAuthorizationStatus is the possible values for status for an issuing authorization.

const (
    IssuingAuthorizationStatusClosed   IssuingAuthorizationStatus = "closed"
    IssuingAuthorizationStatusPending  IssuingAuthorizationStatus = "pending"
    IssuingAuthorizationStatusReversed IssuingAuthorizationStatus = "reversed"
)

List of values that IssuingAuthorizationStatus can take.

type IssuingAuthorizationVerificationData Uses

type IssuingAuthorizationVerificationData struct {
    AddressLine1Check IssuingAuthorizationVerificationDataCheck `json:"address_line1_check"`
    AddressZipCheck   IssuingAuthorizationVerificationDataCheck `json:"address_zip_check"`
    CVCCheck          IssuingAuthorizationVerificationDataCheck `json:"cvc_check"`
}

IssuingAuthorizationVerificationData is the resource representing verification data on an issuing authorization.

type IssuingAuthorizationVerificationDataCheck Uses

type IssuingAuthorizationVerificationDataCheck string

IssuingAuthorizationVerificationDataCheck is the list of possible values for result of a check for verification data on an issuing authorization.

const (
    IssuingAuthorizationVerificationDataCheckMatch       IssuingAuthorizationVerificationDataCheck = "match"
    IssuingAuthorizationVerificationDataCheckMismatch    IssuingAuthorizationVerificationDataCheck = "mismatch"
    IssuingAuthorizationVerificationDataCheckNotProvided IssuingAuthorizationVerificationDataCheck = "not_provided"
)

List of values that IssuingAuthorizationVerificationDataCheck can take.

type IssuingBilling Uses

type IssuingBilling struct {
    Address *Address `json:"address"`
    Name    string   `json:"name"`
}

IssuingBilling is the resource representing the billing hash with the Issuing APIs.

type IssuingBillingParams Uses

type IssuingBillingParams struct {
    Address *AddressParams `form:"address"`
    Name    *string        `form:"name"`
}

IssuingBillingParams isis the set of parameters that can be used for billing with the Issuing APIs.

type IssuingCard Uses

type IssuingCard struct {
    AuthorizationControls *IssuingCardAuthorizationControls `json:"authorization_controls"`
    Billing               *IssuingBilling                   `json:"billing"`
    Brand                 string                            `json:"brand"`
    Cardholder            *IssuingCardholder                `json:"cardholder"`
    Created               int64                             `json:"created"`
    ExpMonth              int64                             `json:"exp_month"`
    ExpYear               int64                             `json:"exp_year"`
    Last4                 string                            `json:"last4"`
    ID                    string                            `json:"id"`
    Livemode              bool                              `json:"livemode"`
    Metadata              map[string]string                 `json:"metadata"`
    Name                  string                            `json:"name"`
    Object                string                            `json:"object"`
    Shipping              *IssuingCardShipping              `json:"shipping"`
    Status                IssuingCardStatus                 `json:"status"`
    Type                  IssuingCardType                   `json:"type"`
}

IssuingCard is the resource representing a Stripe issuing card.

func (*IssuingCard) UnmarshalJSON Uses

func (i *IssuingCard) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an IssuingCard. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type IssuingCardAuthorizationControls Uses

type IssuingCardAuthorizationControls struct {
    AllowedCategories []string `json:"allowed_categories"`
    BlockedCategories []string `json:"blocked_categories"`
    Currency          Currency `json:"currency"`
    MaxAmount         int64    `json:"max_amount"`
    MaxApprovals      int64    `json:"max_approvals"`
}

IssuingCardAuthorizationControls is the resource representing authorization controls on an issuing card.

type IssuingCardDetails Uses

type IssuingCardDetails struct {
    Card     *IssuingCard `json:"card"`
    CVC      string       `json:"cvc"`
    ExpMonth *string      `form:"exp_month"`
    ExpYear  *string      `form:"exp_year"`
    Number   string       `json:"type"`
    Object   string       `json:"object"`
}

IssuingCardDetails is the resource representing issuing card details.

type IssuingCardList Uses

type IssuingCardList struct {
    ListMeta
    Data []*IssuingCard `json:"data"`
}

IssuingCardList is a list of issuing cards as retrieved from a list endpoint.

type IssuingCardListParams Uses

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"`
    Source       *string           `form:"source"`
    Status       *string           `form:"status"`
    Type         *string           `form:"type"`
}

IssuingCardListParams is the set of parameters that can be used when listing issuing cards.

type IssuingCardParams Uses

type IssuingCardParams struct {
    Params                `form:"*"`
    AuthorizationControls *AuthorizationControlsParams `form:"authorization_controls"`
    Billing               *IssuingBillingParams        `form:"billing"`
    Cardholder            *string                      `form:"cardholder"`
    Currency              *string                      `form:"currency"`
    Name                  *string                      `form:"name"`
    Status                *string                      `form:"status"`
    Shipping              *IssuingCardShippingParams   `form:"shipping"`
    Type                  *string                      `form:"type"`
}

IssuingCardParams is the set of parameters that can be used when creating or updating an issuing card.

type IssuingCardShipping Uses

type IssuingCardShipping struct {
    Address        *Address                  `json:"address"`
    Carrier        string                    `json:"carrier"`
    ETA            int64                     `json:"eta"`
    Name           string                    `json:"name"`
    Phone          string                    `json:"phone"`
    Status         IssuingCardShippingStatus `json:"status"`
    TrackingNumber string                    `json:"tracking_number"`
    Type           IssuingCardShippingType   `json:"type"`
}

IssuingCardShipping is the resource representing shipping on an issuing card.

type IssuingCardShippingParams Uses

type IssuingCardShippingParams struct {
    Address *AddressParams `form:"address"`
    Name    string         `form:"name"`
    Type    *string        `form:"type"`
}

IssuingCardShippingParams is the set of parameters that can be used for the shipping parameter.

type IssuingCardShippingStatus Uses

type IssuingCardShippingStatus string

IssuingCardShippingStatus is the list of possible values for the shipping status on an issuing card.

const (
    IssuingCardShippingTypeDelivered IssuingCardShippingStatus = "delivered"
    IssuingCardShippingTypeFailure   IssuingCardShippingStatus = "failure"
    IssuingCardShippingTypePending   IssuingCardShippingStatus = "pending"
    IssuingCardShippingTypeReturned  IssuingCardShippingStatus = "returned"
    IssuingCardShippingTypeShipped   IssuingCardShippingStatus = "shipped"
)

List of values that IssuingCardShippingStatus can take.

type IssuingCardShippingType Uses

type IssuingCardShippingType string

IssuingCardShippingType is the list of possible values for the shipping type on an issuing card.

const (
    IssuingCardShippingTypeBulk       IssuingCardShippingType = "bulk"
    IssuingCardShippingTypeIndividual IssuingCardShippingType = "individual"
)

List of values that IssuingCardShippingType can take.

type IssuingCardStatus Uses

type IssuingCardStatus string

IssuingCardStatus is the list of possible values for status on an issuing card.

const (
    IssuingCardStatusActive   IssuingCardStatus = "active"
    IssuingCardStatusCanceled IssuingCardStatus = "canceled"
    IssuingCardStatusInactive IssuingCardStatus = "inactive"
    IssuingCardStatusPending  IssuingCardStatus = "pending"
)

List of values that IssuingCardStatus can take.

type IssuingCardType Uses

type IssuingCardType string

IssuingCardType is the type of an issuing card.

const (
    IssuingCardTypePhysical IssuingCardType = "physical"
    IssuingCardTypeVirtual  IssuingCardType = "virtual"
)

List of values that IssuingCardType can take.

type IssuingCardholder Uses

type IssuingCardholder struct {
    Billing     *IssuingBilling         `json:"billing"`
    Created     int64                   `json:"created"`
    Email       string                  `json:"email"`
    ID          string                  `json:"id"`
    Livemode    bool                    `json:"livemode"`
    Metadata    map[string]string       `json:"metadata"`
    Name        string                  `json:"name"`
    Object      string                  `json:"object"`
    PhoneNumber string                  `json:"phone_number"`
    Status      IssuingCardholderStatus `json:"status"`
    Type        IssuingCardholderType   `json:"type"`
}

IssuingCardholder is the resource representing a Stripe issuing cardholder.

func (*IssuingCardholder) UnmarshalJSON Uses

func (i *IssuingCardholder) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an IssuingCardholder. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type IssuingCardholderList Uses

type IssuingCardholderList struct {
    ListMeta
    Data []*IssuingCardholder `json:"data"`
}

IssuingCardholderList is a list of issuing cardholders as retrieved from a list endpoint.

type IssuingCardholderListParams Uses

type IssuingCardholderListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
    Email        *string           `form:"email"`
    PhoneNumber  *string           `form:"phone_number"`
    Status       *string           `form:"status"`
    Type         *string           `form:"type"`
}

IssuingCardholderListParams is the set of parameters that can be used when listing issuing cardholders.

type IssuingCardholderParams Uses

type IssuingCardholderParams struct {
    Params      `form:"*"`
    Billing     *IssuingBillingParams `form:"billing"`
    Email       *string               `form:"email"`
    Name        *string               `form:"name"`
    PhoneNumber *string               `form:"phone_number"`
    Type        *string               `form:"type"`
}

IssuingCardholderParams is the set of parameters that can be used when creating or updating an issuing cardholder.

type IssuingCardholderStatus Uses

type IssuingCardholderStatus string

IssuingCardholderStatus is the possible values for status on an issuing cardholder.

const (
    IssuingCardholderStatusActive   IssuingCardholderStatus = "active"
    IssuingCardholderStatusInactive IssuingCardholderStatus = "inactive"
)

List of values that IssuingCardholderStatus can take.

type IssuingCardholderType Uses

type IssuingCardholderType string

IssuingCardholderType is the type of an issuing cardholder.

const (
    IssuingCardholderTypeBusinessEntity IssuingCardholderType = "business_entity"
    IssuingCardholderTypeIndividual     IssuingCardholderType = "individual"
)

List of values that IssuingCardholderType can take.

type IssuingDispute Uses

type IssuingDispute struct {
    Amount      int64                   `json:"amount"`
    Created     int64                   `json:"created"`
    Currency    Currency                `json:"currency"`
    Evidence    *IssuingDisputeEvidence `json:"evidence"`
    ID          string                  `json:"id"`
    Livemode    bool                    `json:"livemode"`
    Metadata    map[string]string       `json:"metadata"`
    Object      string                  `json:"object"`
    Reason      IssuingDisputeReason    `json:"reason"`
    Status      IssuingDisputeStatus    `json:"status"`
    Transaction *IssuingTransaction     `json:"transaction"`
}

IssuingDispute is the resource representing an issuing dispute.

func (*IssuingDispute) UnmarshalJSON Uses

func (i *IssuingDispute) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an IssuingDispute. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type IssuingDisputeEvidence Uses

type IssuingDisputeEvidence struct {
    Fraudulent *IssuingDisputeEvidenceFraudulent `json:"fraudulent"`
    Other      *IssuingDisputeEvidenceOther      `json:"other"`
}

IssuingDisputeEvidence is the resource representing evidence on an issuing dispute.

type IssuingDisputeEvidenceFraudulent Uses

type IssuingDisputeEvidenceFraudulent struct {
    DisputeExplanation string      `json:"dispute_explanation"`
    UncategorizedFile  *FileUpload `json:"uncategorized_file"`
}

IssuingDisputeEvidenceFraudulent is the resource representing the evidence hash on an issuing dispute with the reason set as fraudulent.

type IssuingDisputeEvidenceFraudulentParams Uses

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 dispute with the reason set as fraudulent.

type IssuingDisputeEvidenceOther Uses

type IssuingDisputeEvidenceOther struct {
    DisputeExplanation string      `json:"dispute_explanation"`
    UncategorizedFile  *FileUpload `json:"uncategorized_file"`
}

IssuingDisputeEvidenceOther is the resource representing the evidence hash on an issuing dispute with the reason set as other.

type IssuingDisputeEvidenceOtherParams Uses

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 dispute with the reason set as other.

type IssuingDisputeEvidenceParams Uses

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.

type IssuingDisputeList Uses

type IssuingDisputeList struct {
    ListMeta
    Data []*IssuingDispute `json:"data"`
}

IssuingDisputeList is a list of issuing disputes as retrieved from a list endpoint.

type IssuingDisputeListParams Uses

type IssuingDisputeListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
    Transaction  *string           `form:"transaction"`
}

IssuingDisputeListParams is the set of parameters that can be used when listing issuing dispute.

type IssuingDisputeParams Uses

type IssuingDisputeParams struct {
    Params      `form:"*"`
    Amount      *int64                        `form:"amount"`
    Evidence    *IssuingDisputeEvidenceParams `form:"evidence"`
    Reason      *string                       `form:"reason"`
    Transaction *string                       `form:"transaction"`
}

IssuingDisputeParams is the set of parameters that can be used when creating or updating an issuing dispute.

type IssuingDisputeReason Uses

type IssuingDisputeReason string

IssuingDisputeReason is the list of possible values for status on an issuing dispute.

const (
    IssuingDisputeReasonFraudulent IssuingDisputeReason = "fraudulent"
    IssuingDisputeReasonOther      IssuingDisputeReason = "other"
)

List of values that IssuingDisputeReason can take.

type IssuingDisputeStatus Uses

type IssuingDisputeStatus string

IssuingDisputeStatus is the list of possible values for status on an issuing dispute.

const (
    IssuingDisputeStatusLost        IssuingDisputeStatus = "lost"
    IssuingDisputeStatusUnderReview IssuingDisputeStatus = "under_review"
    IssuingDisputeStatusUnsubmitted IssuingDisputeStatus = "unsubmitted"
    IssuingDisputeStatusWon         IssuingDisputeStatus = "won"
)

List of values that IssuingDisputeStatus can take.

type IssuingMerchantData Uses

type IssuingMerchantData struct {
    Category   string `json:"category"`
    City       string `json:"city"`
    Country    string `json:"country"`
    Name       string `json:"name"`
    NetworkID  string `json:"network_id"`
    PostalCode string `json:"postal_code"`
    State      string `json:"state"`
}

IssuingMerchantData is the resource representing merchant data on Issuing APIs.

type IssuingTransaction Uses

type IssuingTransaction struct {
    Authorization      *IssuingAuthorization  `json:"authorization"`
    BalanceTransaction *BalanceTransaction    `json:"balance_transaction"`
    Card               *IssuingCard           `json:"card"`
    Cardholder         *IssuingCardholder     `json:"cardholder"`
    Created            int64                  `json:"created"`
    Currency           Currency               `json:"currency"`
    Dispute            *IssuingDispute        `json:"dispute"`
    ID                 string                 `json:"id"`
    Livemode           bool                   `json:"livemode"`
    MerchantData       *IssuingMerchantData   `json:"merchant_data"`
    Metadata           map[string]string      `json:"metadata"`
    Object             string                 `json:"object"`
    Type               IssuingTransactionType `json:"type"`
}

IssuingTransaction is the resource representing a Stripe issuing transaction.

func (*IssuingTransaction) UnmarshalJSON Uses

func (i *IssuingTransaction) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an IssuingTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type IssuingTransactionList Uses

type IssuingTransactionList struct {
    ListMeta
    Data []*IssuingTransaction `json:"data"`
}

IssuingTransactionList is a list of issuing transactions as retrieved from a list endpoint.

type IssuingTransactionListParams Uses

type IssuingTransactionListParams struct {
    ListParams   `form:"*"`
    Card         *string           `form:"card"`
    Cardholder   *string           `form:"cardholder"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
}

IssuingTransactionListParams is the set of parameters that can be used when listing issuing transactions.

type IssuingTransactionParams Uses

type IssuingTransactionParams struct {
    Params `form:"*"`
}

IssuingTransactionParams is the set of parameters that can be used when creating or updating an issuing transaction.

type IssuingTransactionType Uses

type IssuingTransactionType string

IssuingTransactionType is the type of an issuing transaction.

const (
    IssuingTransactionTypeCapture        IssuingTransactionType = "capture"
    IssuingTransactionTypeCashWithdrawal IssuingTransactionType = "cash_withdrawal"
    IssuingTransactionTypeRefund         IssuingTransactionType = "refund"
    IssuingTransactionTypeRefundReversal IssuingTransactionType = "refund_reversal"
)

List of values that IssuingTransactionType can take.

type Iter Uses

type Iter struct {
    // contains filtered or unexported fields
}

Iter provides a convenient interface for iterating over the elements returned from paginated list API calls. Successive calls to the Next method will step through each item in the list, fetching pages of items as needed. Iterators are not thread-safe, so they should not be consumed across multiple goroutines.

func GetIter Uses

func GetIter(container ListParamsContainer, query Query) *Iter

GetIter returns a new Iter for a given query and its options.

func (*Iter) Current Uses

func (it *Iter) Current() interface{}

Current returns the most recent item visited by a call to Next.

func (*Iter) Err Uses

func (it *Iter) Err() error

Err returns the error, if any, that caused the Iter to stop. It must be inspected after Next returns false.

func (*Iter) Meta Uses

func (it *Iter) Meta() *ListMeta

Meta returns the list metadata.

func (*Iter) Next Uses

func (it *Iter) Next() bool

Next advances the Iter to the next item in the list, which will then be available through the Current method. It returns false when the iterator stops at the end of the list.

type LegalEntity Uses

type LegalEntity struct {
    AdditionalOwners         []*AdditionalOwner    `json:"additional_owners"`
    Address                  *AccountAddress       `json:"address"`
    AddressKana              *AccountAddress       `json:"address_kana"`
    AddressKanji             *AccountAddress       `json:"address_kanji"`
    BusinessName             string                `json:"business_name"`
    BusinessNameKana         string                `json:"business_name_kana"`
    BusinessNameKanji        string                `json:"business_name_kanji"`
    BusinessTaxIDProvided    bool                  `json:"business_tax_id_provided"`
    BusinessVATIDProvided    bool                  `json:"business_vat_id_provided"`
    DOB                      *DOB                  `json:"dob"`
    FirstName                string                `json:"first_name"`
    FirstNameKana            string                `json:"first_name_kana"`
    FirstNameKanji           string                `json:"first_name_kanji"`
    Gender                   string                `json:"gender"`
    LastName                 string                `json:"last_name"`
    LastNameKana             string                `json:"last_name_kana"`
    LastNameKanji            string                `json:"last_name_kanji"`
    MaidenName               string                `json:"maiden_name"`
    PersonalAddress          *AccountAddress       `json:"personal_address"`
    PersonalAddressKana      *AccountAddress       `json:"personal_address_kana"`
    PersonalAddressKanji     *AccountAddress       `json:"personal_address_kanji"`
    PersonalIDNumberProvided bool                  `json:"personal_id_number_provided"`
    PhoneNumber              string                `json:"phone_number"`
    SSNLast4Provided         bool                  `json:"ssn_last_4_provided"`
    Type                     LegalEntityType       `json:"type"`
    Verification             *IdentityVerification `json:"verification"`
}

LegalEntity is the structure for properties related to an account's legal state.

type LegalEntityParams Uses

type LegalEntityParams struct {
    AdditionalOwners []*AdditionalOwnerParams `form:"additional_owners"`

    // AdditionalOwnersEmpty can be set to clear a legal entity's additional
    // owners.
    AdditionalOwnersEmpty bool `form:"additional_owners,empty"`

    Address              *AccountAddressParams       `form:"address"`
    AddressKana          *AccountAddressParams       `form:"address_kana"`
    AddressKanji         *AccountAddressParams       `form:"address_kanji"`
    BusinessName         *string                     `form:"business_name"`
    BusinessNameKana     *string                     `form:"business_name_kana"`
    BusinessNameKanji    *string                     `form:"business_name_kanji"`
    BusinessTaxID        *string                     `form:"business_tax_id"`
    BusinessVATID        *string                     `form:"business_vat_id"`
    DOB                  *DOBParams                  `form:"dob"`
    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"`
    MaidenName           *string                     `form:"maiden_name"`
    PersonalAddress      *AccountAddressParams       `form:"personal_address"`
    PersonalAddressKana  *AccountAddressParams       `form:"personal_address_kana"`
    PersonalAddressKanji *AccountAddressParams       `form:"personal_address_kanji"`
    PersonalIDNumber     *string                     `form:"personal_id_number"`
    PhoneNumber          *string                     `form:"phone_number"`
    SSNLast4             *string                     `form:"ssn_last_4"`
    Type                 *string                     `form:"type"`
    Verification         *IdentityVerificationParams `form:"verification"`
}

LegalEntityParams represents a legal_entity during account creation/updates.

type LegalEntityType Uses

type LegalEntityType string

LegalEntityType describes the types for a legal entity.

const (
    LegalEntityTypeCompany    LegalEntityType = "company"
    LegalEntityTypeIndividual LegalEntityType = "individual"
)

List of values that LegalEntityType can take.

type ListMeta Uses

type ListMeta struct {
    HasMore    bool   `json:"has_more"`
    TotalCount uint32 `json:"total_count"`
    URL        string `json:"url"`
}

ListMeta is the structure that contains the common properties of List iterators. The Count property is only populated if the total_count include option is passed in (see tests for example).

type ListParams Uses

type ListParams struct {
    // Context used for request. It may carry deadlines, cancelation signals,
    // and other request-scoped values across API boundaries and between
    // processes.
    //
    // Note that a cancelled or timed out context does not provide any
    // guarantee whether the operation was or was not completed on Stripe's API
    // servers. For certainty, you must either retry with the same idempotency
    // key or query the state of the API.
    Context context.Context `form:"-"`

    EndingBefore *string   `form:"ending_before"`
    Expand       []*string `form:"expand"`
    Filters      Filters   `form:"*"`
    Limit        *int64    `form:"limit"`

    // Single specifies whether this is a single page iterator. By default,
    // listing through an iterator will automatically grab additional pages as
    // the query progresses. To change this behavior and just load a single
    // page, set this to true.
    Single bool `form:"-"` // Not an API parameter

    StartingAfter *string `form:"starting_after"`

    // StripeAccount may contain the ID of a connected account. By including
    // this field, the request is made as if it originated from the connected
    // account instead of under the account of the owner of the configured
    // Stripe key.
    StripeAccount *string `form:"-"` // Passed as header
}

ListParams is the structure that contains the common properties of any *ListParams structure.

func (*ListParams) AddExpand Uses

func (p *ListParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*ListParams) GetListParams Uses

func (p *ListParams) GetListParams() *ListParams

GetListParams returns a ListParams struct (itself). It exists because any structs that embed ListParams will inherit it, and thus implement the ListParamsContainer interface.

func (*ListParams) GetParams Uses

func (p *ListParams) GetParams() *Params

GetParams returns ListParams as a Params struct. It exists because any structs that embed Params will inherit it, and thus implement the ParamsContainer interface.

func (*ListParams) SetStripeAccount Uses

func (p *ListParams) SetStripeAccount(val string)

SetStripeAccount sets a value for the Stripe-Account header.

func (*ListParams) ToParams Uses

func (p *ListParams) ToParams() *Params

ToParams converts a ListParams to a Params by moving over any fields that have valid targets in the new type. This is useful because fields in Params can be injected directly into an http.Request while generally ListParams is only used to build a set of parameters.

type ListParamsContainer Uses

type ListParamsContainer interface {
    GetListParams() *ListParams
}

ListParamsContainer is a general interface for which all list parameter structs should comply. They achieve this by embedding a ListParams struct and inheriting its implementation of this interface.

type LoginLink struct {
    Created int64  `json:"created"`
    URL     string `json:"url"`
}

LoginLink is the resource representing a login link for Express accounts. For more details see https://stripe.com/docs/api#login_link_object

type LoginLinkParams Uses

type LoginLinkParams struct {
    Params  `form:"*"`
    Account *string `form:"-"` // Included in URL
}

LoginLinkParams is the set of parameters that can be used when creating a login_link. For more details see https://stripe.com/docs/api#create_login_link.

type Order Uses

type Order struct {
    Amount                 int64             `json:"amount"`
    AmountReturned         int64             `json:"amount_returned"`
    Application            string            `json:"application"`
    ApplicationFee         int64             `json:"application_fee"`
    Charge                 *Charge           `json:"charge"`
    Created                int64             `json:"created"`
    Currency               Currency          `json:"currency"`
    Customer               Customer          `json:"customer"`
    Email                  string            `json:"email"`
    ID                     string            `json:"id"`
    Items                  []*OrderItem      `json:"items"`
    Livemode               bool              `json:"livemode"`
    Metadata               map[string]string `json:"metadata"`
    Returns                *OrderReturnList  `json:"returns"`
    SelectedShippingMethod *string           `json:"selected_shipping_method"`
    Shipping               *Shipping         `json:"shipping"`
    ShippingMethods        []*ShippingMethod `json:"shipping_methods"`
    Status                 string            `json:"status"`
    StatusTransitions      StatusTransitions `json:"status_transitions"`
    Updated                int64             `json:"updated"`
}

Order is the resource representing a Stripe charge. For more details see https://stripe.com/docs/api#orders.

func (*Order) UnmarshalJSON Uses

func (o *Order) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an Order. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type OrderDeliveryEstimateType Uses

type OrderDeliveryEstimateType string

OrderDeliveryEstimateType represents the type of delivery estimate for shipping methods

const (
    OrderDeliveryEstimateTypeExact OrderDeliveryEstimateType = "exact"
    OrderDeliveryEstimateTypeRange OrderDeliveryEstimateType = "range"
)

List of values that OrderDeliveryEstimateType can take.

type OrderItem Uses

type OrderItem struct {
    Amount      int64            `json:"amount"`
    Currency    Currency         `json:"currency"`
    Description string           `json:"description"`
    Parent      *OrderItemParent `json:"parent"`
    Quantity    int64            `json:"quantity"`
    Type        OrderItemType    `json:"type"`
}

OrderItem is the resource representing an order item.

type OrderItemParams Uses

type OrderItemParams struct {
    Amount      *int64  `form:"amount"`
    Currency    *string `form:"currency"`
    Description *string `form:"description"`
    Parent      *string `form:"parent"`
    Quantity    *int64  `form:"quantity"`
    Type        *string `form:"type"`
}

OrderItemParams is the set of parameters describing an order item on order creation or update.

type OrderItemParent Uses

type OrderItemParent struct {
    ID   string              `json:"id"`
    SKU  *SKU                `json:"-"`
    Type OrderItemParentType `json:"object"`
}

OrderItemParent describes the parent of an order item.

func (*OrderItemParent) UnmarshalJSON Uses

func (p *OrderItemParent) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an OrderItemParent. This custom unmarshaling is needed because the resulting property may be an id or a full SKU struct if it was expanded.

type OrderItemParentType Uses

type OrderItemParentType string

OrderItemParentType represents the type of order item parent

const (
    OrderItemParentTypeCoupon   OrderItemParentType = "coupon"
    OrderItemParentTypeDiscount OrderItemParentType = "discount"
    OrderItemParentTypeSKU      OrderItemParentType = "sku"
    OrderItemParentTypeShipping OrderItemParentType = "shipping"
    OrderItemParentTypeTax      OrderItemParentType = "tax"
)

List of values that OrderItemParentType can take.

type OrderItemType Uses

type OrderItemType string

OrderItemType represents the type of order item

const (
    OrderItemTypeCoupon   OrderItemType = "coupon"
    OrderItemTypeDiscount OrderItemType = "discount"
    OrderItemTypeSKU      OrderItemType = "sku"
    OrderItemTypeShipping OrderItemType = "shipping"
    OrderItemTypeTax      OrderItemType = "tax"
)

List of values that OrderItemType can take.

type OrderList Uses

type OrderList struct {
    ListMeta
    Data []*Order `json:"data"`
}

OrderList is a list of orders as retrieved from a list endpoint.

type OrderListParams Uses

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"`
}

OrderListParams is the set of parameters that can be used when listing orders.

type OrderParams Uses

type OrderParams struct {
    Params   `form:"*"`
    Coupon   *string            `form:"coupon"`
    Currency *string            `form:"currency"`
    Customer *string            `form:"customer"`
    Email    *string            `form:"email"`
    Items    []*OrderItemParams `form:"items"`
    Shipping *ShippingParams    `form:"shipping"`
}

OrderParams is the set of parameters that can be used when creating an order.

type OrderPayParams Uses

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 Uses

func (op *OrderPayParams) SetSource(sp interface{}) error

SetSource adds valid sources to a OrderParams object, returning an error for unsupported sources.

type OrderReturn Uses

type OrderReturn struct {
    Amount   int64        `json:"amount"`
    Created  int64        `json:"created"`
    Currency Currency     `json:"currency"`
    ID       string       `json:"id"`
    Items    []*OrderItem `json:"items"`
    Livemode bool         `json:"livemode"`
    Order    *Order       `json:"order"`
    Refund   *Refund      `json:"refund"`
}

OrderReturn is the resource representing an order return. For more details see https://stripe.com/docs/api#order_returns.

func (*OrderReturn) UnmarshalJSON Uses

func (r *OrderReturn) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an OrderReturn. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type OrderReturnList Uses

type OrderReturnList struct {
    ListMeta
    Data []*OrderReturn `json:"data"`
}

OrderReturnList is a list of order returns as retrieved from a list endpoint.

type OrderReturnListParams Uses

type OrderReturnListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
    Order        *string           `form:"order"`
}

OrderReturnListParams is the set of parameters that can be used when listing order returns.

type OrderReturnParams Uses

type OrderReturnParams struct {
    Params `form:"*"`
    Items  []*OrderItemParams `form:"items"`
}

OrderReturnParams is the set of parameters that can be used when returning orders.

type OrderStatus Uses

type OrderStatus string

OrderStatus represents the statuses of an order object.

const (
    OrderStatusCanceled  OrderStatus = "canceled"
    OrderStatusCreated   OrderStatus = "created"
    OrderStatusFulfilled OrderStatus = "fulfilled"
    OrderStatusPaid      OrderStatus = "paid"
    OrderStatusReturned  OrderStatus = "returned"
)

List of values that OrderStatus can take.

type OrderUpdateParams Uses

type OrderUpdateParams struct {
    Params                 `form:"*"`
    Coupon                 *string                    `form:"coupon"`
    SelectedShippingMethod *string                    `form:"selected_shipping_method"`
    Shipping               *OrderUpdateShippingParams `form:"shipping"`
    Status                 *string                    `form:"status"`
}

OrderUpdateParams is the set of parameters that can be used when updating an order.

type OrderUpdateShippingParams Uses

type OrderUpdateShippingParams struct {
    Carrier        *string `form:"carrier"`
    TrackingNumber *string `form:"tracking_number"`
}

OrderUpdateShippingParams is the set of parameters that can be used for the shipping hash on order update.

type PIIParams Uses

type PIIParams struct {
    Params           `form:"*"`
    PersonalIDNumber *string `form:"personal_id_number"`
}

PIIParams are parameters for personal identifiable information (PII).

type PackageDimensions Uses

type PackageDimensions struct {
    Height float64 `json:"height"`
    Length float64 `json:"length"`
    Weight float64 `json:"weight"`
    Width  float64 `json:"width"`
}

PackageDimensions represents the dimension of a product or a SKU from the perspective of shipping.

type PackageDimensionsParams Uses

type PackageDimensionsParams struct {
    Height *float64 `form:"height"`
    Length *float64 `form:"length"`
    Weight *float64 `form:"weight"`
    Width  *float64 `form:"width"`
}

PackageDimensionsParams represents the set of parameters for the the dimension of a product or a SKU from the perspective of shipping .

type Params Uses

type Params struct {
    // Context used for request. It may carry deadlines, cancelation signals,
    // and other request-scoped values across API boundaries and between
    // processes.
    //
    // Note that a cancelled or timed out context does not provide any
    // guarantee whether the operation was or was not completed on Stripe's API
    // servers. For certainty, you must either retry with the same idempotency
    // key or query the state of the API.
    Context context.Context `form:"-"`

    Expand []*string    `form:"expand"`
    Extra  *ExtraValues `form:"*"`

    // Headers may be used to provide extra header lines on the HTTP request.
    Headers http.Header `form:"-"`

    IdempotencyKey *string           `form:"-"` // Passed as header
    Metadata       map[string]string `form:"metadata"`

    // StripeAccount may contain the ID of a connected account. By including
    // this field, the request is made as if it originated from the connected
    // account instead of under the account of the owner of the configured
    // Stripe key.
    StripeAccount *string `form:"-"` // Passed as header
}

Params is the structure that contains the common properties of any *Params structure.

func (*Params) AddExpand Uses

func (p *Params) AddExpand(f string)

AddExpand appends a new field to expand.

func (*Params) AddExtra Uses

func (p *Params) AddExtra(key, value string)

AddExtra adds a new arbitrary key-value pair to the request data

func (*Params) AddMetadata Uses

func (p *Params) AddMetadata(key, value string)

AddMetadata adds a new key-value pair to the Metadata.

func (*Params) GetParams Uses

func (p *Params) GetParams() *Params

GetParams returns a Params struct (itself). It exists because any structs that embed Params will inherit it, and thus implement the ParamsContainer interface.

func (*Params) SetIdempotencyKey Uses

func (p *Params) SetIdempotencyKey(val string)

SetIdempotencyKey sets a value for the Idempotency-Key header.

func (*Params) SetStripeAccount Uses

func (p *Params) SetStripeAccount(val string)

SetStripeAccount sets a value for the Stripe-Account header.

type ParamsContainer Uses

type ParamsContainer interface {
    GetParams() *Params
}

ParamsContainer is a general interface for which all parameter structs should comply. They achieve this by embedding a Params struct and inheriting its implementation of this interface.

type PaymentIntent Uses

type PaymentIntent struct {
    AllowedSourceTypes  []string                        `json:"allowed_source_types"`
    Amount              int64                           `json:"amount"`
    AmountCapturable    int64                           `json:"amount_capturable"`
    AmountReceived      int64                           `json:"amount_received"`
    Application         *Application                    `json:"application"`
    ApplicationFee      int64                           `json:"application_fee"`
    CanceledAt          int64                           `json:"canceled_at"`
    CaptureMethod       PaymentIntentCaptureMethod      `json:"capture_method"`
    Charges             *ChargeList                     `json:"charges"`
    ClientSecret        string                          `json:"client_secret"`
    ConfirmationMethod  PaymentIntentConfirmationMethod `json:"confirmation_method"`
    Created             int64                           `json:"created"`
    Currency            string                          `json:"currency"`
    Customer            *Customer                       `json:"customer"`
    Description         string                          `json:"description"`
    Livemode            bool                            `json:"livemode"`
    ID                  string                          `json:"id"`
    Metadata            map[string]string               `json:"metadata"`
    NextSourceAction    *PaymentIntentSourceAction      `json:"next_source_action"`
    OnBehalfOf          *Account                        `json:"on_behalf_of"`
    ReceiptEmail        string                          `json:"receipt_email"`
    ReturnURL           string                          `json:"return_url"`
    Shipping            ShippingDetails                 `json:"shipping"`
    Source              *PaymentSource                  `json:"source"`
    StatementDescriptor string                          `json:"statement_descriptor"`
    Status              PaymentIntentStatus             `json:"status"`
    TransferData        *PaymentIntentTransferData      `json:"transfer_data"`
    TransferGroup       string                          `json:"transfer_group"`
}

PaymentIntent is the resource representing a Stripe payout. For more details see https://stripe.com/docs/api#payment_intents.

func (*PaymentIntent) UnmarshalJSON Uses

func (p *PaymentIntent) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Payment Intent. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type PaymentIntentCaptureMethod Uses

type PaymentIntentCaptureMethod string

PaymentIntentCaptureMethod is the list of allowed values for the capture method.

const (
    PaymentIntentCaptureMethodAutomatic PaymentIntentCaptureMethod = "automatic"
    PaymentIntentCaptureMethodManual    PaymentIntentCaptureMethod = "manual"
)

List of values that PaymentIntentCaptureMethod can take.

type PaymentIntentCaptureParams Uses

type PaymentIntentCaptureParams struct {
    Params               `form:"*"`
    AmountToCapture      *int64                           `form:"amount_to_capture"`
    ApplicationFeeAmount *int64                           `form:"application_fee_amount"`
    TransferData         *PaymentIntentTransferDataParams `form:"transfer_data"`
}

PaymentIntentCaptureParams is the set of parameters that can be used when capturing a payment intent.

type PaymentIntentConfirmationMethod Uses

type PaymentIntentConfirmationMethod string

PaymentIntentConfirmationMethod is the list of allowed values for the confirmation method.

const (
    PaymentIntentConfirmationMethodPublishable PaymentIntentConfirmationMethod = "publishable"
    PaymentIntentConfirmationMethodSecret      PaymentIntentConfirmationMethod = "secret"
)

List of values that PaymentIntentConfirmationMethod can take.

type PaymentIntentList Uses

type PaymentIntentList struct {
    ListMeta
    Data []*PaymentIntent `json:"data"`
}

PaymentIntentList is a list of payment intents as retrieved from a list endpoint.

type PaymentIntentListParams Uses

type PaymentIntentListParams struct {
    ListParams `form:"*"`
}

PaymentIntentListParams is the set of parameters that can be used when listing payment intents. For more details see https://stripe.com/docs/api#list_payouts.

type PaymentIntentNextActionType Uses

type PaymentIntentNextActionType string

PaymentIntentNextActionType is the list of allowed values for the next action's type.

const (
    PaymentIntentNextActionAuthorizeWithURL PaymentIntentNextActionType = "authorize_with_url"
)

List of values that PaymentIntentNextActionType can take.

type PaymentIntentParams Uses

type PaymentIntentParams struct {
    Params               `form:"*"`
    AllowedSourceTypes   []*string              `form:"allowed_source_types"`
    Amount               *int64                 `form:"amount"`
    ApplicationFeeAmount *int64                 `form:"application_fee_amount"`
    AttemptConfirmation  *bool                  `form:"attempt_confirmation"`
    CaptureMethod        *string                `form:"capture_method"`
    Currency             *string                `form:"currency"`
    Customer             *string                `form:"customer"`
    Description          *string                `form:"description"`
    OnBehalfOf           *string                `form:"on_behalf_of"`
    ReceiptEmail         *string                `form:"receipt_email"`
    ReturnURL            *string                `form:"return_url"`
    SaveSourceToCustomer *bool                  `form:"save_source_to_customer"`
    Shipping             *ShippingDetailsParams `form:"shipping"`
    Source               *string                `form:"source"`
    StatementDescriptor  *string                `form:"statement_descriptor"`
    TransferGroup        *string                `form:"transfer_group"`
}

PaymentIntentParams is the set of parameters that can be used when handling a payment intent.

type PaymentIntentSourceAction Uses

type PaymentIntentSourceAction struct {
    Type  PaymentIntentNextActionType     `json:"type"`
    Value *PaymentIntentSourceActionValue `json:"-"`
}

PaymentIntentSourceAction represents the type of action to take on a payment intent.

func (*PaymentIntentSourceAction) UnmarshalJSON Uses

func (s *PaymentIntentSourceAction) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a PaymentIntentSourceAction. This custom unmarshaling is needed because the specific type of for `value` it refers to is specified in the `type` property

type PaymentIntentSourceActionAuthorizeWithURL Uses

type PaymentIntentSourceActionAuthorizeWithURL struct {
    URL string `json:"url"`
}

PaymentIntentSourceActionAuthorizeWithURL represents the resource for the next action of type "authorize with url".

type PaymentIntentSourceActionValue Uses

type PaymentIntentSourceActionValue struct {
    AuthorizeWithURL *PaymentIntentSourceActionAuthorizeWithURL `json:"-"`
}

PaymentIntentSourceActionValue describes the `value` property in `next_source_action` The `type` in the parent should indicate which object is fleshed out.

type PaymentIntentStatus Uses

type PaymentIntentStatus string

PaymentIntentStatus is the list of allowed values for the payment intent's status.

const (
    PaymentIntentStatusCanceled             PaymentIntentStatus = "canceled"
    PaymentIntentStatusProcessing           PaymentIntentStatus = "processing"
    PaymentIntentStatusRequiresCapture      PaymentIntentStatus = "requires_capture"
    PaymentIntentStatusRequiresConfirmation PaymentIntentStatus = "requires_confirmation"
    PaymentIntentStatusRequiresSource       PaymentIntentStatus = "requires_source"
    PaymentIntentStatusRequiresSourceAction PaymentIntentStatus = "requires_source_action"
    PaymentIntentStatusSucceeded            PaymentIntentStatus = "succeeded"
)

List of values that PaymentIntentStatus can take.

type PaymentIntentTransferData Uses

type PaymentIntentTransferData struct {
    Amount int64 `json:"amount"`
}

PaymentIntentTransferData represents the information for the transfer associated with a payment intent.

type PaymentIntentTransferDataParams Uses

type PaymentIntentTransferDataParams struct {
    Amount *int64 `form:"amount"`
}

PaymentIntentTransferDataParams is the set of parameters allowed for the transfer hash.

type PaymentSource Uses

type PaymentSource struct {
    BankAccount     *BankAccount      `json:"-"`
    BitcoinReceiver *BitcoinReceiver  `json:"-"`
    Card            *Card             `json:"-"`
    Deleted         bool              `json:"deleted"`
    ID              string            `json:"id"`
    SourceObject    *Source           `json:"-"`
    Type            PaymentSourceType `json:"object"`
}

PaymentSource describes the payment source used to make a Charge. The Type should indicate which object is fleshed out (eg. BitcoinReceiver or Card) For more details see https://stripe.com/docs/api#retrieve_charge

func (*PaymentSource) MarshalJSON Uses

func (s *PaymentSource) MarshalJSON() ([]byte, error)

MarshalJSON handles serialization of a PaymentSource. This custom marshaling is needed because the specific type of payment instrument it represents is specified by the Type

func (*PaymentSource) UnmarshalJSON Uses

func (s *PaymentSource) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a PaymentSource. This custom unmarshaling is needed because the specific type of payment instrument it refers to is specified in the JSON

type PaymentSourceType Uses

type PaymentSourceType string

PaymentSourceType consts represent valid payment sources.

const (
    PaymentSourceTypeAccount         PaymentSourceType = "account"
    PaymentSourceTypeBankAccount     PaymentSourceType = "bank_account"
    PaymentSourceTypeBitcoinReceiver PaymentSourceType = "bitcoin_receiver"
    PaymentSourceTypeCard            PaymentSourceType = "card"
    PaymentSourceTypeObject          PaymentSourceType = "source"
)

List of values that PaymentSourceType can take.

type Payout Uses

type Payout struct {
    Amount                    int64               `json:"amount"`
    ArrivalDate               int64               `json:"arrival_date"`
    Automatic                 bool                `json:"automatic"`
    BalanceTransaction        *BalanceTransaction `json:"balance_transaction"`
    BankAccount               *BankAccount        `json:"bank_account"`
    Card                      *Card               `json:"card"`
    Created                   int64               `json:"created"`
    Currency                  Currency            `json:"currency"`
    Destination               *PayoutDestination  `json:"destination"`
    FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"`
    FailureCode               PayoutFailureCode   `json:"failure_code"`
    FailureMessage            string              `json:"failure_message"`
    ID                        string              `json:"id"`
    Livemode                  bool                `json:"livemode"`
    Metadata                  map[string]string   `json:"metadata"`
    Method                    PayoutMethodType    `json:"method"`
    SourceType                PayoutSourceType    `json:"source_type"`
    StatementDescriptor       string              `json:"statement_descriptor"`
    Status                    PayoutStatus        `json:"status"`
    Type                      PayoutType          `json:"type"`
}

Payout is the resource representing a Stripe payout. For more details see https://stripe.com/docs/api#payouts.

func (*Payout) UnmarshalJSON Uses

func (p *Payout) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Payout. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type PayoutDestination Uses

type PayoutDestination struct {
    BankAccount *BankAccount          `json:"-"`
    Card        *Card                 `json:"-"`
    ID          string                `json:"id"`
    Type        PayoutDestinationType `json:"object"`
}

PayoutDestination describes the destination of a Payout. The Type should indicate which object is fleshed out For more details see https://stripe.com/docs/api/go#payout_object

func (*PayoutDestination) MarshalJSON Uses

func (d *PayoutDestination) MarshalJSON() ([]byte, error)

MarshalJSON handles serialization of a PayoutDestination. This custom marshaling is needed because we can only send a string ID as a destination, even though it can be expanded to a full object when retrieving

func (*PayoutDestination) UnmarshalJSON Uses

func (d *PayoutDestination) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a PayoutDestination. This custom unmarshaling is needed because the specific type of destination it refers to is specified in the JSON

type PayoutDestinationType Uses

type PayoutDestinationType string

PayoutDestinationType consts represent valid payout destinations.

const (
    PayoutDestinationTypeBankAccount PayoutDestinationType = "bank_account"
    PayoutDestinationTypeCard        PayoutDestinationType = "card"
)

List of values that PayoutDestinationType can take.

type PayoutFailureCode Uses

type PayoutFailureCode string

PayoutFailureCode is the list of allowed values for the payout's failure code.

const (
    PayoutFailureCodeAccountClosed         PayoutFailureCode = "account_closed"
    PayoutFailureCodeAccountFrozen         PayoutFailureCode = "account_frozen"
    PayoutFailureCodeBankAccountRestricted PayoutFailureCode = "bank_account_restricted"
    PayoutFailureCodeBankOwnershipChanged  PayoutFailureCode = "bank_ownership_changed"
    PayoutFailureCodeCouldNotProcess       PayoutFailureCode = "could_not_process"
    PayoutFailureCodeDebitNotAuthorized    PayoutFailureCode = "debit_not_authorized"
    PayoutFailureCodeInsufficientFunds     PayoutFailureCode = "insufficient_funds"
    PayoutFailureCodeInvalidAccountNumber  PayoutFailureCode = "invalid_account_number"
    PayoutFailureCodeInvalidCurrency       PayoutFailureCode = "invalid_currency"
    PayoutFailureCodeNoAccount             PayoutFailureCode = "no_account"
)

List of values that PayoutFailureCode can take.

type PayoutInterval Uses

type PayoutInterval string

PayoutInterval describes the payout interval.

const (
    PayoutIntervalDaily   PayoutInterval = "daily"
    PayoutIntervalManual  PayoutInterval = "manual"
    PayoutIntervalMonthly PayoutInterval = "monthly"
    PayoutIntervalWeekly  PayoutInterval = "weekly"
)

List of values that PayoutInterval can take.

type PayoutList Uses

type PayoutList struct {
    ListMeta
    Data []*Payout `json:"data"`
}

PayoutList is a list of payouts as retrieved from a list endpoint.

type PayoutListParams Uses

type PayoutListParams struct {
    ListParams       `form:"*"`
    ArrivalDate      *int64            `form:"arrival_date"`
    ArrivalDateRange *RangeQueryParams `form:"arrival_date"`
    Created          *int64            `form:"created"`
    CreatedRange     *RangeQueryParams `form:"created"`
    Destination      *string           `form:"destination"`
    Status           *string           `form:"status"`
}

PayoutListParams is the set of parameters that can be used when listing payouts. For more details see https://stripe.com/docs/api#list_payouts.

type PayoutMethodType Uses

type PayoutMethodType string

PayoutMethodType represents the type of payout

const (
    PayoutMethodInstant  PayoutMethodType = "instant"
    PayoutMethodStandard PayoutMethodType = "standard"
)

List of values that PayoutMethodType can take.

type PayoutParams Uses

type PayoutParams struct {
    Params              `form:"*"`
    Amount              *int64  `form:"amount"`
    Currency            *string `form:"currency"`
    Destination         *string `form:"destination"`
    Method              *string `form:"method"`
    SourceType          *string `form:"source_type"`
    StatementDescriptor *string `form:"statement_descriptor"`
}

PayoutParams is the set of parameters that can be used when creating or updating a payout. For more details see https://stripe.com/docs/api#create_payout and https://stripe.com/docs/api#update_payout.

type PayoutSchedule Uses

type PayoutSchedule struct {
    DelayDays     int64          `json:"delay_days"`
    Interval      PayoutInterval `json:"interval"`
    MonthlyAnchor int64          `json:"monthly_anchor"`
    WeeklyAnchor  string         `json:"weekly_anchor"`
}

PayoutSchedule is the structure for an account's payout schedule.

type PayoutScheduleParams Uses

type PayoutScheduleParams struct {
    DelayDays        *int64  `form:"delay_days"`
    DelayDaysMinimum *bool   `form:"-"` // See custom AppendTo
    Interval         *string `form:"interval"`
    MonthlyAnchor    *int64  `form:"monthly_anchor"`
    WeeklyAnchor     *string `form:"weekly_anchor"`
}

PayoutScheduleParams are the parameters allowed for payout schedules.

func (*PayoutScheduleParams) AppendTo Uses

func (p *PayoutScheduleParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for PayoutScheduleParams so that we can send a special value for `delay_days` field if needed.

type PayoutSourceType Uses

type PayoutSourceType string

PayoutSourceType is the list of allowed values for the payout's source_type field.

const (
    PayoutSourceTypeAlipayAccount   PayoutSourceType = "alipay_account"
    PayoutSourceTypeBankAccount     PayoutSourceType = "bank_account"
    PayoutSourceTypeBitcoinReceiver PayoutSourceType = "bitcoin_receiver"
    PayoutSourceTypeCard            PayoutSourceType = "card"
)

List of values that PayoutSourceType can take.

type PayoutStatus Uses

type PayoutStatus string

PayoutStatus is the list of allowed values for the payout's status.

const (
    PayoutStatusCanceled  PayoutStatus = "canceled"
    PayoutStatusFailed    PayoutStatus = "failed"
    PayoutStatusInTransit PayoutStatus = "in_transit"
    PayoutStatusPaid      PayoutStatus = "paid"
    PayoutStatusPending   PayoutStatus = "pending"
)

List of values that PayoutStatus can take.

type PayoutType Uses

type PayoutType string

PayoutType is the list of allowed values for the payout's type.

const (
    PayoutTypeBank PayoutType = "bank_account"
    PayoutTypeCard PayoutType = "card"
)

List of values that PayoutType can take.

type Period Uses

type Period struct {
    End   int64 `json:"end"`
    Start int64 `json:"start"`
}

Period is a structure representing a start and end dates.

type PermissionError Uses

type PermissionError struct {
    // contains filtered or unexported fields
}

PermissionError results when you attempt to make an API request for which your API key doesn't have the right permissions.

func (*PermissionError) Error Uses

func (e *PermissionError) Error() string

Error serializes the error object to JSON and returns it as a string.

type Plan Uses

type Plan struct {
    Active          bool                `json:"active"`
    AggregateUsage  string              `json:"aggregate_usage"`
    Amount          int64               `json:"amount"`
    BillingScheme   PlanBillingScheme   `json:"billing_scheme"`
    Created         int64               `json:"created"`
    Currency        Currency            `json:"currency"`
    Deleted         bool                `json:"deleted"`
    ID              string              `json:"id"`
    Interval        PlanInterval        `json:"interval"`
    IntervalCount   int64               `json:"interval_count"`
    Livemode        bool                `json:"livemode"`
    Metadata        map[string]string   `json:"metadata"`
    Nickname        string              `json:"nickname"`
    Product         *Product            `json:"product"`
    Tiers           []*PlanTier         `json:"tiers"`
    TiersMode       string              `json:"tiers_mode"`
    TransformUsage  *PlanTransformUsage `json:"transform_usage"`
    TrialPeriodDays int64               `json:"trial_period_days"`
    UsageType       PlanUsageType       `json:"usage_type"`
}

Plan is the resource representing a Stripe plan. For more details see https://stripe.com/docs/api#plans.

Code:

stripe.Key = "sk_key"

params := &stripe.PlanListParams{}
params.Filters.AddFilter("limit", "", "3")
params.Single = true

it := plan.List(params)
for it.Next() {
    log.Printf("%v ", it.Plan().Nickname)
}
if err := it.Err(); err != nil {
    log.Fatal(err)
}

type PlanAggregateUsage Uses

type PlanAggregateUsage string

PlanAggregateUsage is the list of allowed values for a plan's aggregate usage.

const (
    PlanAggregateUsageLastDuringPeriod PlanAggregateUsage = "last_during_period"
    PlanAggregateUsageLastEver         PlanAggregateUsage = "last_ever"
    PlanAggregateUsageMax              PlanAggregateUsage = "max"
    PlanAggregateUsageSum              PlanAggregateUsage = "sum"
)

List of values that PlanAggregateUsage can take.

type PlanBillingScheme Uses

type PlanBillingScheme string

PlanBillingScheme is the list of allowed values for a plan's billing scheme.

const (
    PlanBillingSchemePerUnit PlanBillingScheme = "per_unit"
    PlanBillingSchemeTiered  PlanBillingScheme = "tiered"
)

List of values that PlanBillingScheme can take.

type PlanInterval Uses

type PlanInterval string

PlanInterval is the list of allowed values for a plan's interval.

const (
    PlanIntervalDay   PlanInterval = "day"
    PlanIntervalWeek  PlanInterval = "week"
    PlanIntervalMonth PlanInterval = "month"
    PlanIntervalYear  PlanInterval = "year"
)

List of values that PlanInterval can take.

type PlanList Uses

type PlanList struct {
    ListMeta
    Data []*Plan `json:"data"`
}

PlanList is a list of plans as returned from a list endpoint.

type PlanListParams Uses

type PlanListParams struct {
    ListParams   `form:"*"`
    Active       *bool             `form:"active"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
    Product      *string           `form:"product"`
}

PlanListParams is the set of parameters that can be used when listing plans. For more details see https://stripe.com/docs/api#list_plans.

type PlanParams Uses

type PlanParams struct {
    Params          `form:"*"`
    Active          *bool                     `form:"active"`
    AggregateUsage  *string                   `form:"aggregate_usage"`
    Amount          *int64                    `form:"amount"`
    BillingScheme   *string                   `form:"billing_scheme"`
    Currency        *string                   `form:"currency"`
    ID              *string                   `form:"id"`
    Interval        *string                   `form:"interval"`
    IntervalCount   *int64                    `form:"interval_count"`
    Nickname        *string                   `form:"nickname"`
    Product         *PlanProductParams        `form:"product"`
    ProductID       *string                   `form:"product"`
    Tiers           []*PlanTierParams         `form:"tiers"`
    TiersMode       *string                   `form:"tiers_mode"`
    TransformUsage  *PlanTransformUsageParams `form:"transform_usage"`
    TrialPeriodDays *int64                    `form:"trial_period_days"`
    UsageType       *string                   `form:"usage_type"`
}

PlanParams is the set of parameters that can be used when creating or updating a plan. For more details see https://stripe.com/docs/api#create_plan and https://stripe.com/docs/api#update_plan.

type PlanProductParams Uses

type PlanProductParams struct {
    ID                  *string           `form:"id"`
    Name                *string           `form:"name"`
    Metadata            map[string]string `form:"metadata"`
    StatementDescriptor *string           `form:"statement_descriptor"`
}

PlanProductParams is the set of parameters that can be used when creating a product inside a plan This can only be used on plan creation and won't work on plan update. For more details see https://stripe.com/docs/api#create_plan-product and https://stripe.com/docs/api#update_plan-product

type PlanTier Uses

type PlanTier struct {
    UnitAmount int64 `json:"unit_amount"`
    UpTo       int64 `json:"up_to"`
}

PlanTier configures tiered pricing

type PlanTierParams Uses

type PlanTierParams struct {
    Params     `form:"*"`
    UnitAmount *int64 `form:"unit_amount"`
    UpTo       *int64 `form:"-"` // handled in custom AppendTo
    UpToInf    *bool  `form:"-"` // handled in custom AppendTo
}

PlanTierParams configures tiered pricing

func (*PlanTierParams) AppendTo Uses

func (p *PlanTierParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom up_to serialisation logic for tiers configuration

type PlanTiersMode Uses

type PlanTiersMode string

PlanTiersMode is the list of allowed values for a plan's tiers mode.

const (
    PlanTiersModeGraduated PlanTiersMode = "graduated"
    PlanTiersModeVolume    PlanTiersMode = "volume"
)

List of values that PlanTiersMode can take.

type PlanTransformUsage Uses

type PlanTransformUsage struct {
    DivideBy int64                   `json:"divide_by"`
    Round    PlanTransformUsageRound `json:"round"`
}

PlanTransformUsage represents the bucket billing configuration.

type PlanTransformUsageParams Uses

type PlanTransformUsageParams struct {
    DivideBy *int64  `form:"divide_by"`
    Round    *string `form:"round"`
}

PlanTransformUsageParams represents the bucket billing configuration.

type PlanTransformUsageRound Uses

type PlanTransformUsageRound string

PlanTransformUsageRound is the list of allowed values for a plan's transform usage round logic.

const (
    PlanTransformUsageRoundDown PlanTransformUsageRound = "down"
    PlanTransformUsageRoundUp   PlanTransformUsageRound = "up"
)

List of values that PlanTransformUsageRound can take.

type PlanUsageType Uses

type PlanUsageType string

PlanUsageType is the list of allowed values for a plan's usage type.

const (
    PlanUsageTypeLicensed PlanUsageType = "licensed"
    PlanUsageTypeMetered  PlanUsageType = "metered"
)

List of values that PlanUsageType can take.

type Printfer Uses

type Printfer interface {
    Printf(format string, v ...interface{})
}

Printfer is an interface to be implemented by Logger.

var Logger Printfer

Logger controls how stripe performs logging at a package level. It is useful to customise if you need it prefixed for your application to meet other requirements.

This Logger will be inherited by any backends created by default, but will be overridden if a backend is created with GetBackendWithConfig.

type Product Uses

type Product struct {
    Active              bool               `json:"active"`
    Attributes          []string           `json:"attributes"`
    Caption             string             `json:"caption"`
    Created             int64              `json:"created"`
    DeactivateOn        []string           `json:"deactivate_on"`
    Description         string             `json:"description"`
    ID                  string             `json:"id"`
    Images              []string           `json:"images"`
    Livemode            bool               `json:"livemode"`
    Metadata            map[string]string  `json:"metadata"`
    Name                string             `json:"name"`
    PackageDimensions   *PackageDimensions `json:"package_dimensions"`
    Shippable           bool               `json:"shippable"`
    StatementDescriptor string             `json:"statement_descriptor"`
    Type                ProductType        `json:"type"`
    UnitLabel           string             `json:"unit_label"`
    URL                 string             `json:"url"`
    Updated             int64              `json:"updated"`
}

Product is the resource representing a Stripe product. For more details see https://stripe.com/docs/api#products.

func (*Product) UnmarshalJSON Uses

func (p *Product) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Product. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type ProductList Uses

type ProductList struct {
    ListMeta
    Data []*Product `json:"data"`
}

ProductList is a list of products as retrieved from a list endpoint.

type ProductListParams Uses

type ProductListParams struct {
    ListParams `form:"*"`
    Active     *bool     `form:"active"`
    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.

type ProductParams Uses

type ProductParams struct {
    Params              `form:"*"`
    Active              *bool                    `form:"active"`
    Attributes          []*string                `form:"attributes"`
    Caption             *string                  `form:"caption"`
    DeactivateOn        []*string                `form:"deactivate_on"`
    Description         *string                  `form:"description"`
    ID                  *string                  `form:"id"`
    Images              []*string                `form:"images"`
    Name                *string                  `form:"name"`
    PackageDimensions   *PackageDimensionsParams `form:"package_dimensions"`
    Shippable           *bool                    `form:"shippable"`
    StatementDescriptor *string                  `form:"statement_descriptor"`
    Type                *string                  `form:"type"`
    UnitLabel           *string                  `form:"unit_label"`
    URL                 *string                  `form:"url"`
}

ProductParams is the set of parameters that can be used when creating or updating a product.

type ProductType Uses

type ProductType string

ProductType is the type of a product.

const (
    ProductTypeGood    ProductType = "good"
    ProductTypeService ProductType = "service"
)

List of values that ProductType can take.

type Query Uses

type Query func(*Params, *form.Values) ([]interface{}, ListMeta, error)

Query is the function used to get a page listing.

type RangeQueryParams Uses

type RangeQueryParams struct {
    // GreaterThan specifies that values should be a greater than this
    // timestamp.
    GreaterThan int64 `form:"gt"`

    // GreaterThanOrEqual specifies that values should be greater than or equal
    // to this timestamp.
    GreaterThanOrEqual int64 `form:"gte"`

    // LesserThan specifies that values should be lesser than this timetamp.
    LesserThan int64 `form:"lt"`

    // LesserThanOrEqual specifies that values should be lesser than or
    // equalthis timetamp.
    LesserThanOrEqual int64 `form:"lte"`
}

RangeQueryParams are a set of generic request parameters that are used on list endpoints to filter their results by some timestamp.

type RateLimitError Uses

type RateLimitError struct {
    // contains filtered or unexported fields
}

RateLimitError occurs when the Stripe API is hit to with too many requests too quickly and indicates that the current request has been rate limited.

func (*RateLimitError) Error Uses

func (e *RateLimitError) Error() string

Error serializes the error object to JSON and returns it as a string.

type ReceiverFlow Uses

type ReceiverFlow struct {
    Address                string                       `json:"address"`
    AmountCharged          int64                        `json:"amount_charged"`
    AmountReceived         int64                        `json:"amount_received"`
    AmountReturned         int64                        `json:"amount_returned"`
    RefundAttributesMethod SourceRefundAttributesMethod `json:"refund_attributes_method"`
    RefundAttributesStatus SourceRefundAttributesStatus `json:"refund_attributes_status"`
}

ReceiverFlow informs of the state of a receiver authentication flow.

type Recipient Uses

type Recipient struct {
    ActiveAccount *BankAccount      `json:"active_account"`
    Cards         *CardList         `json:"cards"`
    Created       int64             `json:"created"`
    DefaultCard   *Card             `json:"default_card"`
    Deleted       bool              `json:"deleted"`
    Description   string            `json:"description"`
    Email         string            `json:"email"`
    ID            string            `json:"id"`
    Livemode      bool              `json:"livemode"`
    Metadata      map[string]string `json:"metadata"`
    MigratedTo    *Account          `json:"migrated_to"`
    Name          string            `json:"name"`
    Type          RecipientType     `json:"type"`
}

Recipient is the resource representing a Stripe recipient. For more details see https://stripe.com/docs/api#recipients.

func (*Recipient) UnmarshalJSON Uses

func (r *Recipient) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Recipient. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type RecipientList Uses

type RecipientList struct {
    ListMeta
    Data []*Recipient `json:"data"`
}

RecipientList is a list of recipients as retrieved from a list endpoint.

type RecipientListParams Uses

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 see https://stripe.com/docs/api#list_recipients.

type RecipientParams Uses

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 see https://stripe.com/docs/api#create_recipient and https://stripe.com/docs/api#update_recipient.

func (*RecipientParams) AppendTo Uses

func (p *RecipientParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements some custom behavior around a recipient's bank account. This was probably the wrong way to go about this, but grandfather the behavior for the time being.

type RecipientTransfer Uses

type RecipientTransfer struct {
    Amount              int64                        `json:"amount"`
    AmountReversed      int64                        `json:"amount_reversed"`
    BalanceTransaction  *BalanceTransaction          `json:"balance_transaction"`
    BankAccount         *BankAccount                 `json:"bank_account"`
    Card                *Card                        `json:"card"`
    Created             int64                        `json:"created"`
    Currency            Currency                     `json:"currency"`
    Date                int64                        `json:"date"`
    Description         string                       `json:"description"`
    Destination         string                       `json:"destination"`
    FailureCode         RecipientTransferFailureCode `json:"failure_code"`
    FailureMessage      string                       `json:"failure_message"`
    ID                  string                       `json:"id"`
    Livemode            bool                         `json:"livemode"`
    Metadata            map[string]string            `json:"metadata"`
    Method              RecipientTransferMethodType  `json:"method"`
    Recipient           *Recipient                   `json:"recipient"`
    Reversals           *ReversalList                `json:"reversals"`
    Reversed            bool                         `json:"reversed"`
    SourceTransaction   *BalanceTransactionSource    `json:"source_transaction"`
    SourceType          RecipientTransferSourceType  `json:"source_type"`
    StatementDescriptor string                       `json:"statement_descriptor"`
    Status              RecipientTransferStatus      `json:"status"`
    Type                RecipientTransferType        `json:"type"`
}

RecipientTransfer is the resource representing a Stripe recipient_transfer. For more details see https://stripe.com/docs/api#recipient_transfers.

func (*RecipientTransfer) UnmarshalJSON Uses

func (t *RecipientTransfer) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a RecipientTransfer. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type RecipientTransferDestination Uses

type RecipientTransferDestination struct {
    BankAccount *BankAccount                     `json:"-"`
    Card        *Card                            `json:"-"`
    ID          string                           `json:"id"`
    Type        RecipientTransferDestinationType `json:"object"`
}

RecipientTransferDestination describes the destination of a RecipientTransfer. The Type should indicate which object is fleshed out For more details see https://stripe.com/docs/api/go#recipient_transfer_object

func (*RecipientTransferDestination) MarshalJSON Uses

func (d *RecipientTransferDestination) MarshalJSON() ([]byte, error)

MarshalJSON handles serialization of a RecipientTransferDestination. This custom marshaling is needed because we can only send a string ID as a destination, even though it can be expanded to a full object when retrieving

func (*RecipientTransferDestination) UnmarshalJSON Uses

func (d *RecipientTransferDestination) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a RecipientTransferDestination. This custom unmarshaling is needed because the specific type of destination it refers to is specified in the JSON

type RecipientTransferDestinationType Uses

type RecipientTransferDestinationType string

RecipientTransferDestinationType consts represent valid recipient_transfer destinations.

const (
    RecipientTransferDestinationBankAccount RecipientTransferDestinationType = "bank_account"
    RecipientTransferDestinationCard        RecipientTransferDestinationType = "card"
)

List of values that RecipientTransferDestinationType can take.

type RecipientTransferFailureCode Uses

type RecipientTransferFailureCode string

RecipientTransferFailureCode is the list of allowed values for the recipient_transfer's failure code.

const (
    RecipientTransferFailureCodeAccountClosed         RecipientTransferFailureCode = "account_closed"
    RecipientTransferFailureCodeAccountFrozen         RecipientTransferFailureCode = "account_frozen"
    RecipientTransferFailureCodeBankAccountRestricted RecipientTransferFailureCode = "bank_account_restricted"
    RecipientTransferFailureCodeBankOwnershipChanged  RecipientTransferFailureCode = "bank_ownership_changed"
    RecipientTransferFailureCodeDebitNotAuthorized    RecipientTransferFailureCode = "debit_not_authorized"
    RecipientTransferFailureCodeCouldNotProcess       RecipientTransferFailureCode = "could_not_process"
    RecipientTransferFailureCodeInsufficientFunds     RecipientTransferFailureCode = "insufficient_funds"
    RecipientTransferFailureCodeInvalidAccountNumber  RecipientTransferFailureCode = "invalid_account_number"
    RecipientTransferFailureCodeInvalidCurrency       RecipientTransferFailureCode = "invalid_currency"
    RecipientTransferFailureCodeNoAccount             RecipientTransferFailureCode = "no_account"
)

List of values that RecipientTransferFailureCode can take.

type RecipientTransferMethodType Uses

type RecipientTransferMethodType string

RecipientTransferMethodType represents the type of recipient_transfer

const (
    RecipientTransferMethodInstant  RecipientTransferMethodType = "instant"
    RecipientTransferMethodStandard RecipientTransferMethodType = "standard"
)

List of values that RecipientTransferMethodType can take.

type RecipientTransferSourceType Uses

type RecipientTransferSourceType string

RecipientTransferSourceType is the list of allowed values for the recipient_transfer's source_type field.

const (
    RecipientTransferSourceTypeAlipayAccount   RecipientTransferSourceType = "alipay_account"
    RecipientTransferSourceTypeBankAccount     RecipientTransferSourceType = "bank_account"
    RecipientTransferSourceTypeBitcoinReceiver RecipientTransferSourceType = "bitcoin_receiver"
    RecipientTransferSourceTypeCard            RecipientTransferSourceType = "card"
)

List of values that RecipientTransferSourceType can take.

type RecipientTransferStatus Uses

type RecipientTransferStatus string

RecipientTransferStatus is the list of allowed values for the recipient_transfer's status.

const (
    RecipientTransferStatusFailed    RecipientTransferStatus = "failed"
    RecipientTransferStatusInTransit RecipientTransferStatus = "in_transit"
    RecipientTransferStatusPaid      RecipientTransferStatus = "paid"
    RecipientTransferStatusPending   RecipientTransferStatus = "pending"
)

List of values that RecipientTransferStatus can take.

type RecipientTransferType Uses

type RecipientTransferType string

RecipientTransferType is the list of allowed values for the recipient_transfer's type.

const (
    RecipientTransferTypeBankAccount RecipientTransferType = "bank_account"
    RecipientTransferTypeCard        RecipientTransferType = "card"
)

List of values that RecipientTransferType can take.

type RecipientType Uses

type RecipientType string

RecipientType is the list of allowed values for the recipient's type.

const (
    RecipientTypeIndividual  RecipientType = "individual"
    RecipientTypeCorporation RecipientType = "corporation"
)

List of values that RecipientType can take.

type RedirectFlow Uses

type RedirectFlow struct {
    FailureReason SourceRedirectFlowFailureReason `json:"failure_reason"`
    ReturnURL     string                          `json:"return_url"`
    Status        SourceRedirectFlowStatus        `json:"status"`
    URL           string                          `json:"url"`
}

RedirectFlow informs of the state of a redirect authentication flow.

type RedirectParams Uses

type RedirectParams struct {
    ReturnURL *string `form:"return_url"`
}

RedirectParams is the set of parameters allowed for the redirect hash on source creation or update.

type Refund Uses

type Refund struct {
    Amount             int64               `json:"amount"`
    BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
    Charge             *Charge             `json:"charge"`
    Created            int64               `json:"created"`
    Currency           Currency            `json:"currency"`
    ID                 string              `json:"id"`
    Metadata           map[string]string   `json:"metadata"`
    Reason             RefundReason        `json:"reason"`
    ReceiptNumber      string              `json:"receipt_number"`
    Status             RefundStatus        `json:"status"`
}

Refund is the resource representing a Stripe refund. For more details see https://stripe.com/docs/api#refunds.

func (*Refund) UnmarshalJSON Uses

func (r *Refund) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Refund. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type RefundList Uses

type RefundList struct {
    ListMeta
    Data []*Refund `json:"data"`
}

RefundList is a list object for refunds.

type RefundListParams Uses

type RefundListParams struct {
    ListParams `form:"*"`
}

RefundListParams is the set of parameters that can be used when listing refunds. For more details see https://stripe.com/docs/api#list_refunds.

type RefundParams Uses

type RefundParams struct {
    Params               `form:"*"`
    Amount               *int64  `form:"amount"`
    Charge               *string `form:"charge"`
    Reason               *string `form:"reason"`
    RefundApplicationFee *bool   `form:"refund_application_fee"`
    ReverseTransfer      *bool   `form:"reverse_transfer"`
}

RefundParams is the set of parameters that can be used when refunding a charge. For more details see https://stripe.com/docs/api#refund.

type RefundReason Uses

type RefundReason string

RefundReason is, if set, the reason the refund is being made

const (
    RefundReasonDuplicate           RefundReason = "duplicate"
    RefundReasonFraudulent          RefundReason = "fraudulent"
    RefundReasonRequestedByCustomer RefundReason = "requested_by_customer"
)

List of values that RefundReason can take.

type RefundStatus Uses

type RefundStatus string

RefundStatus is the status of the refund.

const (
    RefundStatusCanceled  RefundStatus = "canceled"
    RefundStatusFailed    RefundStatus = "failed"
    RefundStatusPending   RefundStatus = "pending"
    RefundStatusSucceeded RefundStatus = "succeeded"
)

List of values that RefundStatus can take.

type ReportRun Uses

type ReportRun struct {
    Created     int64                `json:"created"`
    Error       string               `json:"error"`
    ID          string               `json:"id"`
    Livemode    bool                 `json:"livemode"`
    Object      string               `json:"object"`
    Parameters  *ReportRunParameters `json:"parameters"`
    ReportType  string               `json:"report_type"`
    Result      *FileUpload          `json:"result"`
    Status      ReportRunStatus      `json:"status"`
    SucceededAt int64                `json:"succeeded_at"`
}

ReportRun is the resource representing a report run.

type ReportRunList Uses

type ReportRunList struct {
    ListMeta
    Data []*ReportRun `json:"data"`
}

ReportRunList is a list of report runs as retrieved from a list endpoint.

type ReportRunListParams Uses

type ReportRunListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
}

ReportRunListParams is the set of parameters that can be used when listing report runs.

type ReportRunParameters Uses

type ReportRunParameters struct {
    ConnectedAccount  string   `json:"connected_account"`
    Currency          Currency `json:"currency"`
    IntervalEnd       int64    `json:"interval_end"`
    IntervalStart     int64    `json:"interval_start"`
    Payout            string   `json:"payout"`
    ReportingCategory string   `json:"reporting_category"`
}

ReportRunParameters describes the parameters hash on a report run.

type ReportRunParametersParams Uses

type ReportRunParametersParams struct {
    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"`
}

ReportRunParametersParams is the set of parameters that can be used when creating a report run.

type ReportRunParams Uses

type ReportRunParams struct {
    Params     `form:"*"`
    Parameters *ReportRunParametersParams `form:"parameters"`
    ReportType *string                    `form:"report_type"`
}

ReportRunParams is the set of parameters that can be used when creating a report run.

type ReportRunStatus Uses

type ReportRunStatus string

ReportRunStatus is the possible values for status on a report run.

const (
    ReportRunStatusFailed    ReportRunStatus = "failed"
    ReportRunStatusPending   ReportRunStatus = "pending"
    ReportRunStatusSucceeded ReportRunStatus = "succeeded"
)

List of values that ReportRunStatus can take.

type ReportType Uses

type ReportType struct {
    Created            int64  `json:"created"`
    DataAvailableEnd   int64  `json:"data_available_end"`
    DataAvailableStart int64  `json:"data_available_start"`
    ID                 string `json:"id"`
    Name               string `json:"name"`
    Object             string `json:"object"`
    Updated            int64  `json:"updated"`
    Version            int64  `json:"version"`
}

ReportType is the resource representing a report type.

type ReportTypeList Uses

type ReportTypeList struct {
    ListMeta
    Data []*ReportType `json:"data"`
}

ReportTypeList is a list of report types as retrieved from a list endpoint.

type ReportTypeListParams Uses

type ReportTypeListParams struct {
    ListParams `form:"*"`
}

ReportTypeListParams is the set of parameters that can be used when listing report types.

type ReportTypeParams Uses

type ReportTypeParams struct {
    Params `form:"*"`
}

ReportTypeParams is the set of parameters that can be used when retrieving a report type.

type Reversal Uses

type Reversal struct {
    Amount             int64               `json:"amount"`
    BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
    Created            int64               `json:"created"`
    Currency           Currency            `json:"currency"`
    ID                 string              `json:"id"`
    Metadata           map[string]string   `json:"metadata"`
    Transfer           string              `json:"transfer"`
}

Reversal represents a transfer reversal.

func (*Reversal) UnmarshalJSON Uses

func (r *Reversal) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Reversal. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type ReversalList Uses

type ReversalList struct {
    ListMeta
    Data []*Reversal `json:"data"`
}

ReversalList is a list of object for reversals.

type ReversalListParams Uses

type ReversalListParams struct {
    ListParams `form:"*"`
    Transfer   *string `form:"-"` // Included in URL
}

ReversalListParams is the set of parameters that can be used when listing reversals.

type ReversalParams Uses

type ReversalParams struct {
    Params               `form:"*"`
    Amount               *int64  `form:"amount"`
    RefundApplicationFee *bool   `form:"refund_application_fee"`
    Transfer             *string `form:"-"` // Included in URL
}

ReversalParams is the set of parameters that can be used when reversing a transfer.

type Review Uses

type Review struct {
    Charge   *Charge          `json:"charge"`
    Created  int64            `json:"created"`
    ID       string           `json:"id"`
    Livemode bool             `json:"livemode"`
    Open     bool             `json:"open"`
    Reason   ReviewReasonType `json:"reason"`
}

Review is the resource representing a Radar review. For more details see https://stripe.com/docs/api#reviews.

func (*Review) UnmarshalJSON Uses

func (r *Review) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Review. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type ReviewReasonType Uses

type ReviewReasonType string

ReviewReasonType describes the reason why the review is open or closed.

const (
    ReviewReasonApproved        ReviewReasonType = "approved"
    ReviewReasonDisputed        ReviewReasonType = "disputed"
    ReviewReasonManual          ReviewReasonType = "manual"
    ReviewReasonRefunded        ReviewReasonType = "refunded"
    ReviewReasonRefundedAsFraud ReviewReasonType = "refunded_as_fraud"
    ReviewReasonRule            ReviewReasonType = "rule"
)

List of values that ReviewReasonType can take.

type SKU Uses

type SKU struct {
    Active            bool               `json:"active"`
    Attributes        map[string]string  `json:"attributes"`
    Created           int64              `json:"created"`
    Currency          Currency           `json:"currency"`
    Description       string             `json:"description"`
    ID                string             `json:"id"`
    Image             string             `json:"image"`
    Inventory         *Inventory         `json:"inventory"`
    Livemode          bool               `json:"livemode"`
    Metadata          map[string]string  `json:"metadata"`
    PackageDimensions *PackageDimensions `json:"package_dimensions"`
    Price             int64              `json:"price"`
    Product           *Product           `json:"product"`
    Updated           int64              `json:"updated"`
}

SKU is the resource representing a SKU. For more details see https://stripe.com/docs/api#skus.

func (*SKU) UnmarshalJSON Uses

func (s *SKU) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a SKU. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type SKUInventoryType Uses

type SKUInventoryType string

SKUInventoryType describe's the possible value for inventory type

const (
    SKUInventoryTypeBucket   SKUInventoryType = "bucket"
    SKUInventoryTypeFinite   SKUInventoryType = "finite"
    SKUInventoryTypeInfinite SKUInventoryType = "infinite"
)

List of values that SKUInventoryType can take.

type SKUInventoryValue Uses

type SKUInventoryValue string

SKUInventoryValue describe's the possible value for inventory value

const (
    SKUInventoryValueInStock    SKUInventoryValue = "in_stock"
    SKUInventoryValueLimited    SKUInventoryValue = "limited"
    SKUInventoryValueOutOfStock SKUInventoryValue = "out_of_stock"
)

List of values that SKUInventoryValue can take.

type SKUList Uses

type SKUList struct {
    ListMeta
    Data []*SKU `json:"data"`
}

SKUList is a list of SKUs as returned from a list endpoint.

type SKUListParams Uses

type SKUListParams struct {
    ListParams `form:"*"`
    Active     *bool             `form:"active"`
    Attributes map[string]string `form:"attributes"`
    IDs        []*string         `form:"ids"`
    InStock    *bool             `form:"in_stock"`
    Product    *string           `form:"product"`
}

SKUListParams is the set of parameters that can be used when listing SKUs.

type SKUParams Uses

type SKUParams struct {
    Params            `form:"*"`
    Active            *bool                    `form:"active"`
    Attributes        map[string]string        `form:"attributes"`
    Currency          *string                  `form:"currency"`
    Description       *string                  `form:"description"`
    ID                *string                  `form:"id"`
    Image             *string                  `form:"image"`
    Inventory         *InventoryParams         `form:"inventory"`
    PackageDimensions *PackageDimensionsParams `form:"package_dimensions"`
    Price             *int64                   `form:"price"`
    Product           *string                  `form:"product"`
}

SKUParams is the set of parameters allowed on SKU creation or update.

type Shipping Uses

type Shipping struct {
    Address        *Address `json:"address"`
    Carrier        string   `json:"carrier"`
    Name           string   `json:"name"`
    Phone          string   `json:"phone"`
    TrackingNumber string   `json:"tracking_number"`
}

Shipping describes the shipping hash on an order.

type ShippingDetails Uses

type ShippingDetails struct {
    Address        *Address `json:"address"`
    Carrier        string   `json:"carrier"`
    Name           string   `json:"name"`
    Phone          string   `json:"phone"`
    TrackingNumber string   `json:"tracking_number"`
}

ShippingDetails is the structure containing shipping information.

type ShippingDetailsParams Uses

type ShippingDetailsParams struct {
    Address        *AddressParams `form:"address"`
    Carrier        *string        `form:"carrier"`
    Name           *string        `form:"name"`
    Phone          *string        `form:"phone"`
    TrackingNumber *string        `form:"tracking_number"`
}

ShippingDetailsParams is the structure containing shipping information as parameters

type ShippingMethod Uses

type ShippingMethod struct {
    Amount           int64             `json:"amount"`
    ID               string            `json:"id"`
    Currency         Currency          `json:"currency"`
    DeliveryEstimate *DeliveryEstimate `json:"delivery_estimate"`
    Description      string            `json:"description"`
}

ShippingMethod describes a shipping method as available on an order.

type ShippingParams Uses

type ShippingParams struct {
    Address *AddressParams `form:"address"`
    Name    *string        `form:"name"`
    Phone   *string        `form:"phone"`
}

ShippingParams is the set of parameters that can be used for the shipping hash on order creation.

type SigmaScheduledQueryRun Uses

type SigmaScheduledQueryRun struct {
    Created              int64                        `json:"created"`
    DataLoadTime         int64                        `json:"data_load_time"`
    Error                string                       `json:"error"`
    File                 *FileUpload                  `json:"file"`
    ID                   string                       `json:"id"`
    Livemode             bool                         `json:"livemode"`
    Object               string                       `json:"object"`
    ResultAvailableUntil int64                        `json:"result_available_until"`
    SQL                  string                       `json:"sql"`
    Status               SigmaScheduledQueryRunStatus `json:"status"`
    Query                string                       `json:"query"`
}

SigmaScheduledQueryRun is the resource representing a scheduled query run.

func (*SigmaScheduledQueryRun) UnmarshalJSON Uses

func (i *SigmaScheduledQueryRun) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an SigmaScheduledQueryRun. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type SigmaScheduledQueryRunList Uses

type SigmaScheduledQueryRunList struct {
    ListMeta
    Data []*SigmaScheduledQueryRun `json:"data"`
}

SigmaScheduledQueryRunList is a list of scheduled query runs as retrieved from a list endpoint.

type SigmaScheduledQueryRunListParams Uses

type SigmaScheduledQueryRunListParams struct {
    ListParams `form:"*"`
}

SigmaScheduledQueryRunListParams is the set of parameters that can be used when listing scheduled query runs.

type SigmaScheduledQueryRunParams Uses

type SigmaScheduledQueryRunParams struct {
    Params `form:"*"`
}

SigmaScheduledQueryRunParams is the set of parameters that can be used when updating a scheduled query run.

type SigmaScheduledQueryRunStatus Uses

type SigmaScheduledQueryRunStatus string

SigmaScheduledQueryRunStatus is the possible values for status for a scheduled query run.

const (
    SigmaScheduledQueryRunStatusCanceled  SigmaScheduledQueryRunStatus = "canceled"
    SigmaScheduledQueryRunStatusCompleted SigmaScheduledQueryRunStatus = "completed"
    SigmaScheduledQueryRunStatusFailed    SigmaScheduledQueryRunStatus = "failed"
    SigmaScheduledQueryRunStatusTimedOut  SigmaScheduledQueryRunStatus = "timed_out"
)

List of values that SigmaScheduledQueryRunStatus can take.

type Source Uses

type Source struct {
    Amount              int64                 `json:"amount"`
    ClientSecret        string                `json:"client_secret"`
    CodeVerification    *CodeVerificationFlow `json:"code_verification,omitempty"`
    Created             int64                 `json:"created"`
    Currency            Currency              `json:"currency"`
    Flow                SourceFlow            `json:"flow"`
    ID                  string                `json:"id"`
    Livemode            bool                  `json:"livemode"`
    Mandate             *SourceMandate        `json:"mandate"`
    Metadata            map[string]string     `json:"metadata"`
    Owner               *SourceOwner          `json:"owner"`
    Receiver            *ReceiverFlow         `json:"receiver,omitempty"`
    Redirect            *RedirectFlow         `json:"redirect,omitempty"`
    StatementDescriptor string                `json:"statement_descriptor"`
    Status              SourceStatus          `json:"status"`
    Type                string                `json:"type"`
    TypeData            map[string]interface{}
    Usage               SourceUsage `json:"usage"`
}

Source is the resource representing a Source. For more details see https://stripe.com/docs/api#sources.

func (*Source) UnmarshalJSON Uses

func (s *Source) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of an Source. This custom unmarshaling is needed to extract the type specific data (accessible under `TypeData`) but stored in JSON under a hash named after the `type` of the source.

type SourceCodeVerificationFlowStatus Uses

type SourceCodeVerificationFlowStatus string

SourceCodeVerificationFlowStatus represents the possible statuses of a code verification flow.

const (
    SourceCodeVerificationFlowStatusFailed    SourceCodeVerificationFlowStatus = "failed"
    SourceCodeVerificationFlowStatusPending   SourceCodeVerificationFlowStatus = "pending"
    SourceCodeVerificationFlowStatusSucceeded SourceCodeVerificationFlowStatus = "succeeded"
)

List of values that SourceCodeVerificationFlowStatus can take.

type SourceFlow Uses

type SourceFlow string

SourceFlow represents the possible flows of a source object.

const (
    SourceFlowCodeVerification SourceFlow = "code_verification"
    SourceFlowNone             SourceFlow = "none"
    SourceFlowReceiver         SourceFlow = "receiver"
    SourceFlowRedirect         SourceFlow = "redirect"
)

List of values that SourceFlow can take.

type SourceList Uses

type SourceList struct {
    ListMeta
    Data []*PaymentSource `json:"data"`
}

SourceList is a list object for cards.

type SourceListParams Uses

type SourceListParams struct {
    ListParams `form:"*"`
    Customer   *string `form:"-"` // Handled in URL
}

SourceListParams are used to enumerate the payment sources that are attached to a Customer.

type SourceMandate Uses

type SourceMandate struct {
    Acceptance         *SourceMandateAcceptance        `json:"acceptance"`
    NotificationMethod SourceMandateNotificationMethod `json:"notification_method"`
    Reference          string                          `json:"reference"`
    URL                string                          `json:"url"`
}

SourceMandate describes a source mandate.

type SourceMandateAcceptance Uses

type SourceMandateAcceptance struct {
    Date      int64                         `json:"date"`
    IP        string                        `json:"ip"`
    Status    SourceMandateAcceptanceStatus `json:"status"`
    UserAgent string                        `json:"user_agent"`
}

SourceMandateAcceptance describes a source mandate acceptance state.

type SourceMandateAcceptanceParams Uses

type SourceMandateAcceptanceParams struct {
    Date      *int64  `form:"date"`
    IP        *string `form:"ip"`
    Status    *string `form:"status"`
    UserAgent *string `form:"user_agent"`
}

SourceMandateAcceptanceParams describes the set of parameters allowed for the `acceptance` hash on source creation or update.

type SourceMandateAcceptanceStatus Uses

type SourceMandateAcceptanceStatus string

SourceMandateAcceptanceStatus represents the possible failure reasons of a redirect flow.

const (
    SourceMandateAcceptanceStatusAccepted SourceMandateAcceptanceStatus = "accepted"
    SourceMandateAcceptanceStatusRefused  SourceMandateAcceptanceStatus = "refused"
)

List of values that SourceMandateAcceptanceStatus can take.

type SourceMandateNotificationMethod Uses

type SourceMandateNotificationMethod string

SourceMandateNotificationMethod represents the possible methods of notification for a mandate.

const (
    SourceMandateNotificationMethodEmail  SourceMandateNotificationMethod = "email"
    SourceMandateNotificationMethodManual SourceMandateNotificationMethod = "manual"
    SourceMandateNotificationMethodNone   SourceMandateNotificationMethod = "none"
)

List of values that SourceMandateNotificationMethod can take.

type SourceMandateParams Uses

type SourceMandateParams struct {
    Acceptance         *SourceMandateAcceptanceParams `form:"acceptance"`
    NotificationMethod *string                        `form:"notification_method"`
}

SourceMandateParams describes the set of parameters allowed for the `mandate` hash on source creation or update.

type SourceObjectDetachParams Uses

type SourceObjectDetachParams struct {
    Params   `form:"*"`
    Customer *string `form:"-"`
}

SourceObjectDetachParams is the set of parameters that can be used when detaching a source from a customer.

type SourceObjectParams Uses

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"`
    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.

func (*SourceObjectParams) AppendTo Uses

func (p *SourceObjectParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for SourceObjectParams so that the special "TypeData" value for is sent as the correct parameter based on the Source type

type SourceOwner Uses

type SourceOwner struct {
    Address         *Address `json:"address,omitempty"`
    Email           string   `json:"email"`
    Name            string   `json:"name"`
    Phone           string   `json:"phone"`
    VerifiedAddress *Address `json:"verified_address,omitempty"`
    VerifiedEmail   string   `json:"verified_email"`
    VerifiedName    string   `json:"verified_name"`
    VerifiedPhone   string   `json:"verified_phone"`
}

SourceOwner describes the owner hash on a source.

type SourceOwnerParams Uses

type SourceOwnerParams struct {
    Address *AddressParams `form:"address"`
    Email   *string        `form:"email"`
    Name    *string        `form:"name"`
    Phone   *string        `form:"phone"`
}

SourceOwnerParams is the set of parameters allowed for the owner hash on source creation or update.

type SourceParams Uses

type SourceParams struct {
    Card  *CardParams `form:"-"`
    Token *string     `form:"source"`
}

SourceParams is a union struct used to describe an arbitrary payment source.

func SourceParamsFor Uses

func SourceParamsFor(obj interface{}) (*SourceParams, error)

SourceParamsFor creates SourceParams objects around supported payment sources, returning errors if not.

Currently supported source types are Card (CardParams) and Tokens/IDs (string), where Tokens could be single use card tokens or bitcoin receiver ids

func (*SourceParams) AppendTo Uses

func (p *SourceParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for SourceParams.

type SourceReceiverParams Uses

type SourceReceiverParams struct {
    RefundAttributesMethod *string `form:"refund_attributes_method"`
}

SourceReceiverParams is the set of parameters allowed for the `receiver` hash on source creation or update.

type SourceRedirectFlowFailureReason Uses

type SourceRedirectFlowFailureReason string

SourceRedirectFlowFailureReason represents the possible failure reasons of a redirect flow.

const (
    SourceRedirectFlowFailureReasonDeclined        SourceRedirectFlowFailureReason = "declined"
    SourceRedirectFlowFailureReasonProcessingError SourceRedirectFlowFailureReason = "processing_error"
    SourceRedirectFlowFailureReasonUserAbort       SourceRedirectFlowFailureReason = "user_abort"
)

List of values that SourceRedirectFlowFailureReason can take.

type SourceRedirectFlowStatus Uses

type SourceRedirectFlowStatus string

SourceRedirectFlowStatus represents the possible statuses of a redirect flow.

const (
    SourceRedirectFlowStatusFailed      SourceRedirectFlowStatus = "failed"
    SourceRedirectFlowStatusNotRequired SourceRedirectFlowStatus = "not_required"
    SourceRedirectFlowStatusPending     SourceRedirectFlowStatus = "pending"
    SourceRedirectFlowStatusSucceeded   SourceRedirectFlowStatus = "succeeded"
)

List of values that SourceRedirectFlowStatus can take.

type SourceRefundAttributesMethod Uses

type SourceRefundAttributesMethod string

SourceRefundAttributesMethod are the possible method to retrieve a receiver's refund attributes.

const (
    SourceRefundAttributesMethodEmail  SourceRefundAttributesMethod = "email"
    SourceRefundAttributesMethodManual SourceRefundAttributesMethod = "manual"
)

List of values that SourceRefundAttributesMethod can take.

type SourceRefundAttributesStatus Uses

type SourceRefundAttributesStatus string

SourceRefundAttributesStatus are the possible status of a receiver's refund attributes.

const (
    SourceRefundAttributesStatusAvailable SourceRefundAttributesStatus = "available"
    SourceRefundAttributesStatusMissing   SourceRefundAttributesStatus = "missing"
    SourceRefundAttributesStatusRequested SourceRefundAttributesStatus = "requested"
)

List of values that SourceRefundAttributesStatus can take.

type SourceStatus Uses

type SourceStatus string

SourceStatus represents the possible statuses of a source object.

const (
    SourceStatusCanceled   SourceStatus = "canceled"
    SourceStatusChargeable SourceStatus = "chargeable"
    SourceStatusConsumed   SourceStatus = "consumed"
    SourceStatusFailed     SourceStatus = "failed"
    SourceStatusPending    SourceStatus = "pending"
)

List of values that SourceStatus can take.

type SourceTransaction Uses

type SourceTransaction struct {
    Amount       int64    `json:"amount"`
    Created      int64    `json:"created"`
    Currency     Currency `json:"currency"`
    CustomerData string   `json:"customer_data"`
    ID           string   `json:"id"`
    Livemode     bool     `json:"livemode"`
    Source       string   `json:"source"`
    Type         string   `json:"type"`
    TypeData     map[string]interface{}
}

SourceTransaction is the resource representing a Stripe source transaction.

func (*SourceTransaction) UnmarshalJSON Uses

func (t *SourceTransaction) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a SourceTransaction. This custom unmarshaling is needed to extract the type specific data (accessible under `TypeData`) but stored in JSON under a hash named after the `type` of the source transaction.

type SourceTransactionList Uses

type SourceTransactionList struct {
    ListMeta
    Data []*SourceTransaction `json:"data"`
}

SourceTransactionList is a list object for SourceTransactions.

type SourceTransactionListParams Uses

type SourceTransactionListParams struct {
    ListParams `form:"*"`
    Source     *string `form:"-"` // Sent in with the URL
}

SourceTransactionListParams is the set of parameters that can be used when listing SourceTransactions.

type SourceUsage Uses

type SourceUsage string

SourceUsage represents the possible usages of a source object.

const (
    SourceUsageReusable  SourceUsage = "reusable"
    SourceUsageSingleUse SourceUsage = "single_use"
)

List of values that SourceUsage can take.

type SourceVerifyParams Uses

type SourceVerifyParams struct {
    Params   `form:"*"`
    Amounts  [2]int64  `form:"amounts"` // Amounts is used when verifying bank accounts
    Customer *string   `form:"-"`       // Goes in the URL
    Values   []*string `form:"values"`  // Values is used when verifying sources
}

SourceVerifyParams are used to verify a customer source For more details see https://stripe.com/docs/guides/ach-beta

type StatusTransitions Uses

type StatusTransitions struct {
    Canceled  int64 `json:"canceled"`
    Fulfilled int64 `json:"fulfiled"`
    Paid      int64 `json:"paid"`
    Returned  int64 `json:"returned"`
}

StatusTransitions are the timestamps at which the order status was updated.

type StatusTransitionsFilterParams Uses

type StatusTransitionsFilterParams struct {
    Canceled       *int64            `form:"canceled"`
    CanceledRange  *RangeQueryParams `form:"canceled"`
    Fulfilled      *int64            `form:"fulfilled"`
    FulfilledRange *RangeQueryParams `form:"fulfilled"`
    Paid           *int64            `form:"paid"`
    PaidRange      *RangeQueryParams `form:"paid"`
    Returned       *int64            `form:"returned"`
    ReturnedRange  *RangeQueryParams `form:"returned"`
}

StatusTransitionsFilterParams are parameters that can used to filter on status_transition when listing orders.

type Subscription Uses

type Subscription struct {
    ApplicationFeePercent float64               `json:"application_fee_percent"`
    Billing               SubscriptionBilling   `json:"billing"`
    BillingCycleAnchor    int64                 `json:"billing_cycle_anchor"`
    CanceledAt            int64                 `json:"canceled_at"`
    Created               int64                 `json:"created"`
    CurrentPeriodEnd      int64                 `json:"current_period_end"`
    CurrentPeriodStart    int64                 `json:"current_period_start"`
    Customer              *Customer             `json:"customer"`
    DaysUntilDue          int64                 `json:"days_until_due"`
    Discount              *Discount             `json:"discount"`
    CancelAtPeriodEnd     bool                  `json:"cancel_at_period_end"`
    EndedAt               int64                 `json:"ended_at"`
    ID                    string                `json:"id"`
    Items                 *SubscriptionItemList `json:"items"`
    Metadata              map[string]string     `json:"metadata"`
    Plan                  *Plan                 `json:"plan"`
    Quantity              int64                 `json:"quantity"`
    Start                 int64                 `json:"start"`
    Status                SubscriptionStatus    `json:"status"`
    TaxPercent            float64               `json:"tax_percent"`
    TrialEnd              int64                 `json:"trial_end"`
    TrialStart            int64                 `json:"trial_start"`
}

Subscription is the resource representing a Stripe subscription. For more details see https://stripe.com/docs/api#subscriptions.

func (*Subscription) UnmarshalJSON Uses

func (s *Subscription) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Subscription. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type SubscriptionBilling Uses

type SubscriptionBilling string

SubscriptionBilling is the type of billing method for this subscription's invoices.

const (
    SubscriptionBillingChargeAutomatically SubscriptionBilling = "charge_automatically"
    SubscriptionBillingSendInvoice         SubscriptionBilling = "send_invoice"
)

List of values that SubscriptionBilling can take.

type SubscriptionCancelParams Uses

type SubscriptionCancelParams struct {
    Params `form:"*"`
}

SubscriptionCancelParams is the set of parameters that can be used when canceling a subscription. For more details see https://stripe.com/docs/api#cancel_subscription

type SubscriptionItem Uses

type SubscriptionItem struct {
    Created      int64             `json:"created"`
    Deleted      bool              `json:"deleted"`
    ID           string            `json:"id"`
    Metadata     map[string]string `json:"metadata"`
    Plan         *Plan             `json:"plan"`
    Quantity     int64             `json:"quantity"`
    Subscription string            `json:"subscription"`
}

SubscriptionItem is the resource representing a Stripe subscription item. For more details see https://stripe.com/docs/api#subscription_items.

type SubscriptionItemList Uses

type SubscriptionItemList struct {
    ListMeta
    Data []*SubscriptionItem `json:"data"`
}

SubscriptionItemList is a list of invoice items as retrieved from a list endpoint.

type SubscriptionItemListParams Uses

type SubscriptionItemListParams struct {
    ListParams   `form:"*"`
    Subscription *string `form:"subscription"`
}

SubscriptionItemListParams is the set of parameters that can be used when listing invoice items. For more details see https://stripe.com/docs/api#list_invoiceitems.

type SubscriptionItemParams Uses

type SubscriptionItemParams struct {
    Params        `form:"*"`
    ID            *string `form:"-"` // Handled in URL
    Plan          *string `form:"plan"`
    Prorate       *bool   `form:"prorate"`
    ProrationDate *int64  `form:"proration_date"`
    Quantity      *int64  `form:"quantity"`
    Subscription  *string `form:"subscription"`
}

SubscriptionItemParams is the set of parameters that can be used when creating or updating a subscription item. For more details see https://stripe.com/docs/api#create_subscription_item and https://stripe.com/docs/api#update_subscription_item.

type SubscriptionItemsParams Uses

type SubscriptionItemsParams struct {
    Params     `form:"*"`
    ClearUsage *bool   `form:"clear_usage"`
    Deleted    *bool   `form:"deleted"`
    ID         *string `form:"id"`
    Plan       *string `form:"plan"`
    Quantity   *int64  `form:"quantity"`
}

SubscriptionItemsParams is the set of parameters that can be used when creating or updating a subscription item on a subscription For more details see https://stripe.com/docs/api#create_subscription and https://stripe.com/docs/api#update_subscription.

type SubscriptionList Uses

type SubscriptionList struct {
    ListMeta
    Data []*Subscription `json:"data"`
}

SubscriptionList is a list object for subscriptions.

type SubscriptionListParams Uses

type SubscriptionListParams struct {
    ListParams   `form:"*"`
    Billing      string            `form:"billing"`
    Created      int64             `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
    Customer     string            `form:"customer"`
    Plan         string            `form:"plan"`
    Status       string            `form:"status"`
}

SubscriptionListParams is the set of parameters that can be used when listing active subscriptions. For more details see https://stripe.com/docs/api#list_subscriptions.

type SubscriptionParams Uses

type SubscriptionParams struct {
    Params                      `form:"*"`
    ApplicationFeePercent       *float64                   `form:"application_fee_percent"`
    Billing                     *string                    `form:"billing"`
    BillingCycleAnchor          *int64                     `form:"billing_cycle_anchor"`
    BillingCycleAnchorNow       *bool                      `form:"-"` // See custom AppendTo
    BillingCycleAnchorUnchanged *bool                      `form:"-"` // See custom AppendTo
    CancelAtPeriodEnd           *bool                      `form:"cancel_at_period_end"`
    Card                        *CardParams                `form:"card"`
    Coupon                      *string                    `form:"coupon"`
    Customer                    *string                    `form:"customer"`
    DaysUntilDue                *int64                     `form:"days_until_due"`
    Items                       []*SubscriptionItemsParams `form:"items"`
    OnBehalfOf                  *string                    `form:"on_behalf_of"`
    Plan                        *string                    `form:"plan"`
    Prorate                     *bool                      `form:"prorate"`
    ProrationDate               *int64                     `form:"proration_date"`
    Quantity                    *int64                     `form:"quantity"`
    TaxPercent                  *float64                   `form:"tax_percent"`
    TrialEnd                    *int64                     `form:"trial_end"`
    TrialEndNow                 *bool                      `form:"-"` // See custom AppendTo
    TrialFromPlan               *bool                      `form:"trial_from_plan"`
    TrialPeriodDays             *int64                     `form:"trial_period_days"`
}

SubscriptionParams is the set of parameters that can be used when creating or updating a subscription. For more details see https://stripe.com/docs/api#create_subscription and https://stripe.com/docs/api#update_subscription.

func (*SubscriptionParams) AppendTo Uses

func (p *SubscriptionParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for SubscriptionParams so that the special "now" value for billing_cycle_anchor and trial_end can be implemented (they're otherwise timestamps rather than strings).

type SubscriptionStatus Uses

type SubscriptionStatus string

SubscriptionStatus is the list of allowed values for the subscription's status.

const (
    SubscriptionStatusActive   SubscriptionStatus = "active"
    SubscriptionStatusAll      SubscriptionStatus = "all"
    SubscriptionStatusCanceled SubscriptionStatus = "canceled"
    SubscriptionStatusPastDue  SubscriptionStatus = "past_due"
    SubscriptionStatusTrialing SubscriptionStatus = "trialing"
    SubscriptionStatusUnpaid   SubscriptionStatus = "unpaid"
)

List of values that SubscriptionStatus can take.

type SupportedBackend Uses

type SupportedBackend string

SupportedBackend is an enumeration of supported Stripe endpoints. Currently supported values are "api" and "uploads".

type TOSAcceptanceParams Uses

type TOSAcceptanceParams struct {
    Date      *int64  `form:"date"`
    IP        *string `form:"ip"`
    UserAgent *string `form:"user_agent"`
}

TOSAcceptanceParams represents tos_acceptance during account creation/updates.

type ThreeDSecure Uses

type ThreeDSecure struct {
    Amount        int64              `json:"amount"`
    Authenticated bool               `json:"authenticated"`
    Card          *Card              `json:"card"`
    Created       int64              `json:"created"`
    Currency      Currency           `json:"currency"`
    ID            string             `json:"id"`
    Livemode      bool               `json:"livemode"`
    RedirectURL   string             `json:"redirect_url"`
    Status        ThreeDSecureStatus `json:"status"`
    Supported     string             `json:"supported"`
}

ThreeDSecure is the resource representing a Stripe 3DS object For more details see https://stripe.com/docs/api#three_d_secure.

type ThreeDSecureParams Uses

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.

type ThreeDSecureStatus Uses

type ThreeDSecureStatus string

ThreeDSecureStatus represents the possible statuses of a ThreeDSecure object.

type Token Uses

type Token struct {
    BankAccount *BankAccount `json:"bank_account"`
    Card        *Card        `json:"card"`
    ClientIP    string       `json:"client_ip"`
    Created     int64        `json:"created"`

    // Email is an undocumented field but included for all tokens created
    // with Stripe Checkout.
    Email string `json:"email"`

    ID       string    `json:"id"`
    Livemode bool      `json:"livemode"`
    Type     TokenType `json:"type"`
    Used     bool      `json:"used"`
}

Token is the resource representing a Stripe token. For more details see https://stripe.com/docs/api#tokens.

type TokenParams Uses

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 see https://stripe.com/docs/api#create_card_token and https://stripe.com/docs/api#create_bank_account_token.

type TokenType Uses

type TokenType string

TokenType is the list of allowed values for a token's type.

const (
    TokenTypeAccount     TokenType = "account"
    TokenTypeCard        TokenType = "card"
    TokenTypeBankAccount TokenType = "bank_account"
    TokenTypePII         TokenType = "pii"
)

List of values that TokenType can take.

type Topup Uses

type Topup struct {
    Amount                   int64               `json:"amount"`
    ArrivalDate              int64               `json:"arrival_date"`
    BalanceTransaction       *BalanceTransaction `json:"balance_transaction"`
    Created                  int64               `json:"created"`
    Currency                 Currency            `json:"currency"`
    Description              string              `json:"description"`
    ExpectedAvailabilityDate int64               `json:"expected_availability_date"`
    FailureCode              string              `json:"failure_code"`
    FailureMessage           string              `json:"failure_message"`
    ID                       string              `json:"id"`
    Livemode                 bool                `json:"livemode"`
    Source                   *PaymentSource      `json:"source"`
    StatementDescriptor      string              `json:"statement_descriptor"`
    Status                   string              `json:"status"`
}

Topup is the resource representing a Stripe top-up. For more details see https://stripe.com/docs/api#topups.

type TopupList Uses

type TopupList struct {
    ListMeta
    Data []*Topup `json:"data"`
}

TopupList is a list of top-ups as retrieved from a list endpoint.

type TopupListParams Uses

type TopupListParams struct {
    ListParams   `form:"*"`
    Created      *int64            `form:"created"`
    CreatedRange *RangeQueryParams `form:"created"`
}

TopupListParams is the set of parameters that can be used when listing top-ups. For more details see https://stripe.com/docs/api#list_topups.

type TopupParams Uses

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"`
}

TopupParams is the set of parameters that can be used when creating or updating a top-up. For more details see https://stripe.com/docs/api#create_topup and https://stripe.com/docs/api#update_topup.

func (*TopupParams) SetSource Uses

func (p *TopupParams) SetSource(sp interface{}) error

SetSource adds valid sources to a TopupParams object, returning an error for unsupported sources.

type Transfer Uses

type Transfer struct {
    Amount             int64                     `json:"amount"`
    AmountReversed     int64                     `json:"amount_reversed"`
    BalanceTransaction *BalanceTransaction       `json:"balance_transaction"`
    Created            int64                     `json:"created"`
    Currency           Currency                  `json:"currency"`
    Destination        *TransferDestination      `json:"destination"`
    DestinationPayment *Charge                   `json:"destination_payment"`
    ID                 string                    `json:"id"`
    Livemode           bool                      `json:"livemode"`
    Metadata           map[string]string         `json:"metadata"`
    Reversals          *ReversalList             `json:"reversals"`
    Reversed           bool                      `json:"reversed"`
    SourceTransaction  *BalanceTransactionSource `json:"source_transaction"`
    SourceType         TransferSourceType        `json:"source_type"`
    TransferGroup      string                    `json:"transfer_group"`
}

Transfer is the resource representing a Stripe transfer. For more details see https://stripe.com/docs/api#transfers.

func (*Transfer) UnmarshalJSON Uses

func (t *Transfer) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a Transfer. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type TransferDestination Uses

type TransferDestination struct {
    Account *Account `json:"-"`
    ID      string   `json:"id"`
}

TransferDestination describes the destination of a Transfer. The Type should indicate which object is fleshed out For more details see https://stripe.com/docs/api/go#transfer_object

func (*TransferDestination) MarshalJSON Uses

func (d *TransferDestination) MarshalJSON() ([]byte, error)

MarshalJSON handles serialization of a TransferDestination. This custom marshaling is needed because we can only send a string ID as a destination, even though it can be expanded to a full object when retrieving

func (*TransferDestination) UnmarshalJSON Uses

func (d *TransferDestination) UnmarshalJSON(data []byte) error

UnmarshalJSON handles deserialization of a TransferDestination. This custom unmarshaling is needed because the specific type of destination it refers to is specified in the JSON

type TransferList Uses

type TransferList struct {
    ListMeta
    Data []*Transfer `json:"data"`
}

TransferList is a list of transfers as retrieved from a list endpoint.

type TransferListParams Uses

type TransferListParams struct {
    ListParams    `form:"*"`
    Created       *int64            `form:"created"`
    CreatedRange  *RangeQueryParams `form:"created"`
    Destination   *string           `form:"destination"`
    TransferGroup *string           `form:"transfer_group"`
}

TransferListParams is the set of parameters that can be used when listing transfers. For more details see https://stripe.com/docs/api#list_transfers.

type TransferParams Uses

type TransferParams struct {
    Params            `form:"*"`
    Amount            *int64  `form:"amount"`
    Currency          *string `form:"currency"`
    Destination       *string `form:"destination"`
    SourceTransaction *string `form:"source_transaction"`
    SourceType        *string `form:"source_type"`
    TransferGroup     *string `form:"transfer_group"`
}

TransferParams is the set of parameters that can be used when creating or updating a transfer. For more details see https://stripe.com/docs/api#create_transfer and https://stripe.com/docs/api#update_transfer.

type TransferSourceType Uses

type TransferSourceType string

TransferSourceType is the list of allowed values for the transfer's source_type field.

const (
    TransferSourceTypeAlipayAccount   TransferSourceType = "alipay_account"
    TransferSourceTypeBankAccount     TransferSourceType = "bank_account"
    TransferSourceTypeBitcoinReceiver TransferSourceType = "bitcoin_receiver"
    TransferSourceTypeCard            TransferSourceType = "card"
)

List of values that TransferSourceType can take.

type UsageRecord Uses

type UsageRecord struct {
    ID               string `json:"id"`
    Livemode         bool   `json:"livemode"`
    Quantity         int64  `json:"quantity"`
    SubscriptionItem string `json:"subscription_item"`
    Timestamp        int64  `json:"timestamp"`
}

UsageRecord represents a usage record. See https://stripe.com/docs/api#usage_records

type UsageRecordParams Uses

type UsageRecordParams struct {
    Params           `form:"*"`
    Action           *string `form:"action"`
    Quantity         *int64  `form:"quantity"`
    SubscriptionItem *string `form:"-"` // passed in the URL
    Timestamp        *int64  `form:"timestamp"`
}

UsageRecordParams create a usage record for a specified subscription item and date, and fills it with a quantity.

type UsageRecordSummary Uses

type UsageRecordSummary struct {
    ID               string  `json:"id"`
    Invoice          string  `json:"invoice"`
    Livemode         bool    `json:"livemode"`
    Object           string  `json:"object"`
    Period           *Period `json:"period"`
    SubscriptionItem string  `json:"subscription_item"`
    TotalUsage       int64   `json:"total_usage"`
}

UsageRecordSummary represents a usage record summary. See https://stripe.com/docs/api#usage_records

type UsageRecordSummaryList Uses

type UsageRecordSummaryList struct {
    ListMeta
    Data []*UsageRecordSummary `json:"data"`
}

UsageRecordSummaryList is a list of usage record summaries as retrieved from a list endpoint.

type UsageRecordSummaryListParams Uses

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.

type VerificationFieldsList Uses

type VerificationFieldsList struct {
    AdditionalFields []string `json:"additional"`
    Minimum          []string `json:"minimum"`
}

VerificationFieldsList lists the fields needed for an account verification. For more details see https://stripe.com/docs/api#country_spec_object-verification_fields.

Directories

PathSynopsis
accountPackage account provides API functions related to accounts.
applepaydomainPackage applepaydomain provides the /apple_pay/domains APIs
balancePackage balance provides the /balance APIs
bankaccountPackage bankaccount provides the /bank_accounts APIs
bitcoinreceiverPackage bitcoinreceiver provides the /bitcoin/receivers APIs.
bitcointransactionPackage bitcointransaction provides the /bitcoin/transactions APIs.
cardPackage card provides the /cards APIs
chargePackage charge provides API functions related to charges.
clientPackage client provides a Stripe client for invoking APIs across all resources
countryspecPackage countryspec provides the /country_specs APIs
couponPackage coupon provides the /coupons APIs
customerPackage customer provides the /customers APIs
discountPackage discount provides the discount-related APIs
dispute
ephemeralkeyPackage ephemeralkey provides the /ephemeral_keys APIs
eventPackage event provides the /events APIs
exchangeratePackage exchangerate provides the /exchange_rates APIs
feePackage fee provides the /application_fees APIs
feerefundPackage feerefund provides the /application_fees/refunds APIs
filelinkPackage filelink provides API functions related to file links.
fileuploadPackage fileupload provides the file upload related APIs
form
invoicePackage invoice provides the /invoices APIs
invoiceitemPackage invoiceitem provides the /invoiceitems APIs
issuerfraudrecord
issuing/authorizationPackage authorization provides API functions related to issuing authorizations.
issuing/cardPackage card provides API functions related to issuing cards.
issuing/cardholderPackage cardholder provides API functions related to issuing cardholders.
issuing/disputePackage dispute provides API functions related to issuing disputes.
issuing/transactionPackage transaction provides API functions related to issuing transactions.
loginlinkPackage loginlink provides the /login_links APIs
order
orderreturn
paymentintentPackage paymentintent provides API functions related to payment intents.
paymentsourcePackage paymentsource provides the /sources APIs
payoutPackage payout provides the /payouts APIs
planPackage plan provides the /plans APIs
product
recipientPackage recipient provides the /recipients APIs
recipienttransferPackage recipienttransfer provides the /recipient_transfers APIs
refundPackage refund provides the /refunds APIs
reporting/reportrunPackage reportrun provides API functions related to report runs.
reporting/reporttypePackage reporttype provides API functions related to report types.
reversalPackage reversal provides the /transfers/reversals APIs
sigma/scheduledqueryrunPackage scheduledqueryrun provides API functions related to scheduled query runs.
sku
source
sourcetransactionPackage sourcetransaction provides the /source/transactions APIs.
subPackage sub provides the /subscriptions APIs
subitemPackage subitem provides the /subscription_items APIs
testing
threedsecurePackage threedsecure provides the /3d_secure APIs This package is deprecated and should not be used anymore.
tokenPackage token provides the /tokens APIs
topup
transferPackage transfer provides the /transfers APIs
usagerecordPackage usagerecord provides the /subscription_items/{SUBSCRIPTION_ITEM_ID}/usage_records APIs
usagerecordsummaryPackage usagerecordsummary provides the /subscription_items/{SUBSCRIPTION_ITEM_ID}/usage_record_summaries APIs
webhook

Package stripe imports 24 packages (graph) and is imported by 2685 packages. Updated 2018-09-11. Refresh now. Tools for package owners.