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 bitcoin_receiver.go bitcoin_transaction.go card.go charge.go countryspec.go coupon.go customer.go discounts.go dispute.go error.go event.go fee.go feerefund.go fileupload.go invoice.go invoiceitem.go iter.go order.go order_item.go order_return.go params.go payment_source.go payout.go plan.go product.go recipient.go recipienttransfer.go refund.go reversal.go review.go sku.go source.go stripe.go sub.go subitem.go three_d_secure.go token.go transfer.go

Constants

const (
    // Individual is a constant value representing an individual legal entity
    // type.
    Individual LegalEntityType = "individual"

    // Company is a constant value representing a company legal entity type.
    Company LegalEntityType = "company"

    // IdentityVerificationPending is a constant value indicating that identity
    // verification status is pending.
    IdentityVerificationPending IdentityVerificationStatus = "pending"

    // IdentityVerificationVerified is a constant value indicating that
    // identity verification status is verified.
    IdentityVerificationVerified IdentityVerificationStatus = "verified"

    // IdentityVerificationUnverified is a constant value indicating that
    // identity verification status is unverified.
    IdentityVerificationUnverified IdentityVerificationStatus = "unverified"

    // Manual is a constant value representing a manual payout interval.
    Manual Interval = "manual"

    // Day is a constant value representing a daily payout interval.
    Day Interval = "daily"

    // Week is a constant value representing a weekly payout interval.
    Week Interval = "weekly"

    // Month is a constant value representing a monthly payout interval.
    Month Interval = "monthly"
)
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"

    IncorrectNum  ErrorCode = "incorrect_number"
    InvalidNum    ErrorCode = "invalid_number"
    InvalidExpM   ErrorCode = "invalid_expiry_month"
    InvalidExpY   ErrorCode = "invalid_expiry_year"
    InvalidCvc    ErrorCode = "invalid_cvc"
    ExpiredCard   ErrorCode = "expired_card"
    IncorrectCvc  ErrorCode = "incorrect_cvc"
    IncorrectZip  ErrorCode = "incorrect_zip"
    CardDeclined  ErrorCode = "card_declined"
    Missing       ErrorCode = "missing"
    ProcessingErr ErrorCode = "processing_error"
    RateLimit     ErrorCode = "rate_limit"

    APIErr         ErrorType = ErrorTypeAPI
    CardErr        ErrorType = ErrorTypeCard
    InvalidRequest ErrorType = ErrorTypeInvalidRequest
)
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"

    // 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 TotalBackends = 2

TotalBackends is the total number of Stripe API endpoints supported by the binding.

const UnknownPlatform = "unknown platform"

UnknownPlatform is the string returned as the system name if we couldn't get one from `uname`.

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

var Logger *log.Logger

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

func NewIdempotencyKey Uses

func NewIdempotencyKey() string

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

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.

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 {
    ID                   string               `json:"id"`
    ChargesEnabled       bool                 `json:"charges_enabled"`
    Country              string               `json:"country"`
    DefaultCurrency      string               `json:"default_currency"`
    DetailsSubmitted     bool                 `json:"details_submitted"`
    PayoutsEnabled       bool                 `json:"payouts_enabled"`
    Name                 string               `json:"display_name"`
    Email                string               `json:"email"`
    ExternalAccounts     *ExternalAccountList `json:"external_accounts"`
    Statement            string               `json:"statement_descriptor"`
    PayoutStatement      string               `json:"payout_statement_descriptor"`
    Timezone             string               `json:"timezone"`
    BusinessName         string               `json:"business_name"`
    BusinessPrimaryColor string               `json:"business_primary_color"`
    BusinessUrl          string               `json:"business_url"`
             string               `json:"business_logo"`
    SupportPhone         string               `json:"support_phone"`
    SupportEmail         string               `json:"support_email"`
    SupportUrl           string               `json:"support_url"`
    ProductDesc          string               `json:"product_description"`
    Managed              bool                 `json:"managed"`
    DebitNegativeBal     bool                 `json:"debit_negative_balances"`
    Keys                 *struct {
        Secret  string `json:"secret"`
        Publish string `json:"publishable"`
    }   `json:"keys"`
    Verification *struct {
        Fields         []string `json:"fields_needed"`
        Due            *int64   `json:"due_by"`
        DisabledReason string   `json:"disabled_reason"`
    }   `json:"verification"`
    LegalEntity    *LegalEntity    `json:"legal_entity"`
    PayoutSchedule *PayoutSchedule `json:"payout_schedule"`
    TOSAcceptance  *struct {
        Date      int64  `json:"date"`
        IP        string `json:"ip"`
        UserAgent string `json:"user_agent"`
    }   `json:"tos_acceptance"`
    SupportAddress *Address          `json:"support_address"`
    Deleted        bool              `json:"deleted"`
    Meta           map[string]string `json:"metadata"`
}

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 AccountExternalAccountParams Uses

type AccountExternalAccountParams struct {
    Params
    Account, Country, Currency, Routing, Token string
}

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

type AccountList Uses

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

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

type AccountListParams Uses

type AccountListParams struct {
    ListParams
}

AccountListParams are the parameters allowed during account listing.

type AccountParams Uses

type AccountParams struct {
    Params
    Country, Email, DefaultCurrency, Statement, BusinessName, BusinessUrl,
    BusinessPrimaryColor, SupportPhone, SupportEmail, SupportUrl,
    FromRecipient, PayoutStatement string
    ExternalAccount                               *AccountExternalAccountParams
    LegalEntity                                   *LegalEntity
    PayoutSchedule                                *PayoutScheduleParams
    Managed, DebitNegativeBal, NoDebitNegativeBal bool
    TOSAcceptance                                 *TOSAcceptanceParams
}

AccountParams are the parameters allowed during account creation/updates.

type AccountRejectParams Uses

type AccountRejectParams struct {
    Reason string `json:"reason"`
}

AccountRejectParams is the structure for the Reject function.

type AccountType Uses

type AccountType string

AccountType is the type of an external account.

const (
    // AccountTypeBankAccount is a constant value representing an external
    // account which is a bank account.
    AccountTypeBankAccount AccountType = "bank_account"

    // AccountTypeCard is a constant value representing an external account
    // which is a card.
    AccountTypeCard AccountType = "card"
)

type Address Uses

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

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

Address is the structure for an account address.

func (*Address) AppendDetails Uses

func (a *Address) AppendDetails(values *RequestValues, prefix string)

type AddressParams Uses

type AddressParams struct {
    Line1      string
    Line2      string
    City       string
    State      string
    PostalCode string
    Country    string
}

Standard address parameters.

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"`
    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"`
    Live       bool   `json:"livemode"`
}

ApplePayDomain is the resource representing a Stripe ApplePayDomain object

type ApplePayDomainList Uses

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

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

type ApplePayDomainListParams Uses

type ApplePayDomainListParams struct {
    ListParams
}

ApplePayDomainListParams are the parameters allowed during ApplePayDomain listing.

type ApplePayDomainParams Uses

type ApplePayDomainParams struct {
    Params
    DomainName string `json:"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"`
}

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 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 Backend Uses

type Backend interface {
    Call(method, path, key string, body *RequestValues, params *Params, v interface{}) error
    CallMultipart(method, path, key, boundary string, body io.Reader, params *Params, v interface{}) error
}

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(backend SupportedBackend) Backend

GetBackend returns the currently used backend in the binding.

type BackendConfiguration Uses

type BackendConfiguration struct {
    Type       SupportedBackend
    URL        string
    HTTPClient *http.Client
}

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

func (BackendConfiguration) Call Uses

func (s BackendConfiguration) Call(method, path, key string, form *RequestValues, params *Params, v interface{}) error

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

func (BackendConfiguration) CallMultipart Uses

func (s BackendConfiguration) CallMultipart(method, path, key, boundary string, body io.Reader, params *Params, v interface{}) error

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

func (*BackendConfiguration) Do Uses

func (s *BackendConfiguration) Do(req *http.Request, 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 (*BackendConfiguration) NewRequest Uses

func (s *BackendConfiguration) NewRequest(method, path, key, contentType string, body io.Reader, 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 (*BackendConfiguration) ResponseToError Uses

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

type Backends Uses

type Backends struct {
    API, Uploads Backend
}

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 {
    // Live indicates the live mode.
    Live      bool     `json:"livemode"`
    Available []Amount `json:"available"`
    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
}

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 BankAccount Uses

type BankAccount struct {
    ID                string            `json:"id"`
    Name              string            `json:"bank_name"`
    AccountHolderName string            `json:"account_holder_name"`
    AccountHolderType string            `json:"account_holder_type"`
    Country           string            `json:"country"`
    Currency          Currency          `json:"currency"`
    Default           bool              `json:"default_for_currency"`
    LastFour          string            `json:"last4"`
    Fingerprint       string            `json:"fingerprint"`
    Status            BankAccountStatus `json:"status"`
    Routing           string            `json:"routing_number"`
    Deleted           bool              `json:"deleted"`
    Customer          *Customer         `json:"customer"`
    Meta              map[string]string `json:"metadata"`
}

BankAccount represents a Stripe bank account.

func (*BankAccount) Display Uses

func (b *BankAccount) Display() string

Display implements Displayer.Display.

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 BankAccountList Uses

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

BankAccountList is a list object for bank accounts.

type BankAccountListParams Uses

type BankAccountListParams struct {
    ListParams

    // The identifier of the parent account under which the bank accounts are
    // nested. Either AccountID or Customer should be populated.
    AccountID string

    // The identifier of the parent customer under which the bank accounts are
    // nested. Either AccountID or Customer should be populated.
    Customer string
}

BankAccountListParams is the set of parameters that can be used when listing bank accounts.

type BankAccountParams Uses

type BankAccountParams struct {
    Params

    // The identifier of the parent account under which bank accounts are
    // nested.
    AccountID string

    // A token referencing an external account like one returned from
    // Stripe.js.
    Token string

    // Information on an external account to reference. Only used if `Token`
    // is not provided.
    Account, AccountHolderName, AccountHolderType, Country, Currency, Routing string

    Default  bool
    Customer string
}

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

func (*BankAccountParams) AppendDetails Uses

func (b *BankAccountParams) AppendDetails(values *RequestValues)

AppendDetails adds the bank account's details to the query string values.

type BankAccountStatus Uses

type BankAccountStatus string

BankAccountStatus is the list of allowed values for the bank account's status. Allowed values are "new", "verified", "validated", "errored".

type BitcoinReceiver Uses

type BitcoinReceiver struct {
    ID                    string                  `json:"id"`
    Created               int64                   `json:"created"`
    Currency              Currency                `json:"currency"`
    Amount                uint64                  `json:"amount"`
    AmountReceived        uint64                  `json:"amount_received"`
    BitcoinAmount         uint64                  `json:"bitcoin_amount"`
    BitcoinAmountReceived uint64                  `json:"bitcoin_amount_received"`
    Filled                bool                    `json:"filled"`
    Active                bool                    `json:"active"`
    RejectTransactions    bool                    `json:"reject_transactions"`
    Desc                  string                  `json:"description"`
    InboundAddress        string                  `json:"inbound_address"`
    RefundAddress         string                  `json:"refund_address"`
    BitcoinUri            string                  `json:"bitcoin_uri"`
    Meta                  map[string]string       `json:"metadata"`
    Email                 string                  `json:"email"`
    Payment               string                  `json:"payment"`
    Customer              string                  `json:"customer"`
    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) Display Uses

func (br *BitcoinReceiver) Display() string

Display human readable representation of a BitcoinReceiver.

func (*BitcoinReceiver) UnmarshalJSON Uses

func (br *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
    Values []*BitcoinReceiver `json:"data"`
}

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

type BitcoinReceiverListParams Uses

type BitcoinReceiverListParams struct {
    ListParams
    NotFilled, NotActive, Uncaptured bool
}

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 BitcoinReceiverParams Uses

type BitcoinReceiverParams struct {
    Params
    Amount      uint64
    Currency    Currency
    Desc, Email string
}

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

type BitcoinReceiverUpdateParams Uses

type BitcoinReceiverUpdateParams struct {
    Params
    Desc, Email, RefundAddr string
}

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

type BitcoinTransaction Uses

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

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
    Values []*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
    Receiver, Customer string
}

BitcoinTransactionListParams is the set of parameters that can be used when listing BitcoinTransactions.

type CaptureParams Uses

type CaptureParams struct {
    Params
    Amount, Fee      uint64
    Email, Statement string
}

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

type Card Uses

type Card struct {
    ID                 string             `json:"id"`
    Month              uint8              `json:"exp_month"`
    Year               uint16             `json:"exp_year"`
    Fingerprint        string             `json:"fingerprint"`
    Funding            CardFunding        `json:"funding"`
    LastFour           string             `json:"last4"`
    Brand              CardBrand          `json:"brand"`
    Currency           Currency           `json:"currency"`
    Default            bool               `json:"default_for_currency"`
    City               string             `json:"address_city"`
    Country            string             `json:"address_country"`
    Address1           string             `json:"address_line1"`
    Address1Check      Verification       `json:"address_line1_check"`
    Address2           string             `json:"address_line2"`
    State              string             `json:"address_state"`
    Zip                string             `json:"address_zip"`
    ZipCheck           Verification       `json:"address_zip_check"`
    CardCountry        string             `json:"country"`
    Customer           *Customer          `json:"customer"`
    CVCCheck           Verification       `json:"cvc_check"`
    Meta               map[string]string  `json:"metadata"`
    Name               string             `json:"name"`
    Recipient          *Recipient         `json:"recipient"`
    DynLastFour        string             `json:"dynamic_last4"`
    Deleted            bool               `json:"deleted"`
    ThreeDSecure       *ThreeDSecure      `json:"three_d_secure"`
    TokenizationMethod TokenizationMethod `json:"tokenization_method"`

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

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

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

func (*Card) Display Uses

func (c *Card) Display() string

Display human readable representation of a Card.

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 CardBrand Uses

type CardBrand string

CardBrand is the list of allowed values for the card's brand. Allowed values are "Unknown", "Visa", "American Express", "MasterCard", "Discover" "JCB", "Diners Club".

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. Allowed values are "credit", "debit", "prepaid", "unknown".

type CardList Uses

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

CardList is a list object for cards.

type CardListParams Uses

type CardListParams struct {
    ListParams
    Account, Customer, Recipient string
}

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

type CardParams Uses

type CardParams struct {
    Params
    Token                                         string
    Default                                       bool
    Account, Customer, Recipient                  string
    Name, Number, Month, Year, CVC, Currency      string
    Address1, Address2, City, State, Zip, Country string
}

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.

func (*CardParams) AppendDetails Uses

func (c *CardParams) AppendDetails(values *RequestValues, creating bool)

AppendDetails adds the card's details to the query string values. When creating a new card, the parameters are passed as a dictionary, but on updates they are simply the parameter name.

type Charge Uses

type Charge struct {
    Amount         uint64            `json:"amount"`
    AmountRefunded uint64            `json:"amount_refunded"`
    Application    *Application      `json:"application"`
    Captured       bool              `json:"captured"`
    Created        int64             `json:"created"`
    Currency       Currency          `json:"currency"`
    Customer       *Customer         `json:"customer"`
    Desc           string            `json:"description"`
    Dest           *Account          `json:"destination"`
    Dispute        *Dispute          `json:"dispute"`
    Email          string            `json:"receipt_email"`
    ReceiptNumber  string            `json:"receipt_number"`
    FailCode       string            `json:"failure_code"`
    FailMsg        string            `json:"failure_message"`
    Fee            *Fee              `json:"application_fee"`
    FraudDetails   *FraudDetails     `json:"fraud_details"`
    ID             string            `json:"id"`
    Invoice        *Invoice          `json:"invoice"`
    Live           bool              `json:"livemode"`
    Meta           map[string]string `json:"metadata"`
    Outcome        *ChargeOutcome    `json:"outcome"`
    Paid           bool              `json:"paid"`
    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"`
    Statement      string            `json:"statement_descriptor"`
    Status         string            `json:"status"`
    Transfer       *Transfer         `json:"transfer"`
    TransferGroup  string            `json:"transfer_group"`
    Tx             *Transaction      `json:"balance_transaction"`
}

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.Expand("customer")
params.Expand("application")
params.Expand("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:   1000,
    Currency: currency.USD,
}
params.SetSource(&stripe.CardParams{
    Name:   "Go Stripe",
    Number: "4242424242424242",
    Month:  "10",
    Year:   "20",
})
params.AddMeta("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 ChargeList Uses

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

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

type ChargeListParams Uses

type ChargeListParams struct {
    ListParams
    Created       int64
    Customer      string
    TransferGroup string
}

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

type ChargeOutcome Uses

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

Outcome 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
    Amount                       uint64
    Currency                     Currency
    Customer, Token              string
    Desc, Statement, Email, Dest string
    Destination                  *DestinationParams
    NoCapture                    bool
    Fee                          uint64
    Fraud                        FraudReport
    Source                       *SourceParams
    Shipping                     *ShippingDetails
    TransferGroup                string
}

ChargeParams is the set of parameters that can be used when creating or updating a charge. For more details see https://stripe.com/docs/api#create_charge and https://stripe.com/docs/api#update_charge.

func (*ChargeParams) SetSource Uses

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

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

type Country Uses

type Country string

Country is the list of supported countries

type CountrySpec Uses

type CountrySpec struct {
    ID                             string                                     `json:"id"`
    DefaultCurrency                Currency                                   `json:"default_currency"`
    SupportedBankAccountCurrencies map[Country][]Currency                     `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
    Values []*CountrySpec `json:"data"`
}

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

type CountrySpecListParams Uses

type CountrySpecListParams struct {
    ListParams
}

CountrySpecListParams are the parameters allowed during CountrySpec listing.

type Coupon Uses

type Coupon struct {
    ID             string            `json:"id"`
    Live           bool              `json:"livemode"`
    Created        int64             `json:"created"`
    Duration       CouponDuration    `json:"duration"`
    Amount         uint64            `json:"amount_off"`
    Currency       Currency          `json:"currency"`
    DurationPeriod uint64            `json:"duration_in_months"`
    Redemptions    uint64            `json:"max_redemptions"`
    Meta           map[string]string `json:"metadata"`
    Percent        uint64            `json:"percent_off"`
    RedeemBy       int64             `json:"redeem_by"`
    Redeemed       uint64            `json:"times_redeemed"`
    Valid          bool              `json:"valid"`
    Deleted        bool              `json:"deleted"`
}

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. Allowed values are "forever", "once", "repeating".

type CouponList Uses

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

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

type CouponListParams Uses

type CouponListParams struct {
    ListParams
}

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
    Duration                                     CouponDuration
    ID                                           string
    Currency                                     Currency
    Amount, Percent, DurationPeriod, Redemptions uint64
    RedeemBy                                     int64
}

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.

type Customer Uses

type Customer struct {
    ID            string                   `json:"id"`
    Live          bool                     `json:"livemode"`
    Sources       *SourceList              `json:"sources"`
    Created       int64                    `json:"created"`
    Balance       int64                    `json:"account_balance"`
    Currency      Currency                 `json:"currency"`
    DefaultSource *PaymentSource           `json:"default_source"`
    Delinquent    bool                     `json:"delinquent"`
    Desc          string                   `json:"description"`
    Discount      *Discount                `json:"discount"`
    Email         string                   `json:"email"`
    Meta          map[string]string        `json:"metadata"`
    Subs          *SubList                 `json:"subscriptions"`
    Deleted       bool                     `json:"deleted"`
    Shipping      *CustomerShippingDetails `json:"shipping"`
    BusinessVatID string                   `json:"business_vat_id"`
}

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")

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
    Values []*Customer `json:"data"`
}

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

type CustomerListParams Uses

type CustomerListParams struct {
    ListParams
    Created int64
}

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
    Balance        int64
    BalanceZero    bool
    Token, Coupon  string
    CouponEmpty    bool
    Source         *SourceParams
    Desc, Email    string
    Plan           string
    Quantity       uint64
    TrialEnd       int64
    DefaultSource  string
    Shipping       *CustomerShippingDetails
    BusinessVatID  string
    TaxPercent     float64
    TaxPercentZero bool
}

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 {
    Name    string  `json:"name"`
    Address Address `json:"address"`
    Phone   string  `json:"phone"`
}

CustomerShippingDetails is the structure containing shipping information.

func (*CustomerShippingDetails) AppendDetails Uses

func (s *CustomerShippingDetails) AppendDetails(values *RequestValues)

AppendDetails adds the shipping details to the query string.

type CustomerSourceParams Uses

type CustomerSourceParams struct {
    Params
    Customer string
    Source   *SourceParams
}

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 DOB Uses

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

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

type DeliveryEstimate Uses

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

type DestinationParams Uses

type DestinationParams struct {
    Account string
    Amount  uint64
}

type Discount Uses

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

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

type Displayer Uses

type Displayer interface {
    Display() string
}

Displayer provides a human readable representation of a struct

type Dispute Uses

type Dispute struct {
    ID              string            `json:"id"`
    Live            bool              `json:"livemode"`
    Amount          uint64            `json:"amount"`
    Currency        Currency          `json:"currency"`
    Charge          string            `json:"charge"`
    Created         int64             `json:"created"`
    Refundable      bool              `json:"is_charge_refundable"`
    Reason          DisputeReason     `json:"reason"`
    Status          DisputeStatus     `json:"status"`
    Transactions    []*Transaction    `json:"balance_transactions"`
    Evidence        *DisputeEvidence  `json:"evidence"`
    EvidenceDetails *EvidenceDetails  `json:"evidence_details"`
    Meta            map[string]string `json:"metadata"`
}

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

func (*Dispute) UnmarshalJSON Uses

func (t *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 {
    ProductDesc                  string `json:"product_description"`
    CustomerName                 string `json:"customer_name"`
    CustomerEmail                string `json:"customer_email_address"`
    CustomerIP                   string `json:"customer_purchase_ip"`
    CustomerSig                  *File  `json:"customer_signature"`
    BillingAddress               string `json:"billing_address"`
    Receipt                      *File  `json:"receipt"`
    ShippingAddress              string `json:"shipping_address"`
    ShippingDate                 string `json:"shipping_date"`
    ShippingTracking             string `json:"shipping_tracking_number"`
    ShippingCarrier              string `json:"shipping_carrier"`
    ShippingDoc                  *File  `json:"shipping_documentation"`
    RefundPolicy                 *File  `json:"refund_policy"`
    RefundPolicyDisclosure       string `json:"refund_policy_disclosure"`
    RefundRefusalReason          string `json:"refund_refusal_explanation"`
    CancellationPolicy           *File  `json:"cancellation_policy"`
    CancellationPolicyDisclosure string `json:"cancellation_policy_disclosure"`
    CancellationRebuttal         string `json:"cancellation_rebuttal"`
    ActivityLog                  string `json:"access_activity_log"`
    ServiceDate                  string `json:"service_date"`
    ServiceDoc                   *File  `json:"service_documentation"`
    DuplicateCharge              string `json:"duplicate_charge_id"`
    DuplicateChargeReason        string `json:"duplicate_charge_explanation"`
    DuplicateChargeDoc           *File  `json:"duplicate_charge_documentation"`
    CustomerComm                 *File  `json:"customer_communication"`
    UncategorizedText            string `json:"uncategorized_text"`
    UncategorizedFile            *File  `json:"uncategorized_file"`
}

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 {
    ActivityLog string

    BillingAddress string

    CancellationPolicy           string
    CancellationPolicyDisclsoure string
    CancellationRebuttal         string

    CustomerName  string
    CustomerEmail string
    CustomerIP    string
    CustomerSig   string
    CustomerComm  string

    DuplicateCharge       string
    DuplicateChargeReason string
    DuplicateChargeDoc    string

    ProductDesc string

    Receipt string

    RefundPolicy           string
    RefundPolicyDisclosure string
    RefundRefusalReason    string

    ServiceDate string
    ServiceDoc  string

    ShippingAddress  string
    ShippingDate     string
    ShippingTracking string
    ShippingDoc      string

    UncategorizedText string
    UncategorizedFile string
}

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

func (*DisputeEvidenceParams) AppendDetails Uses

func (e *DisputeEvidenceParams) AppendDetails(values *RequestValues)

AppendDetails adds the dispute evidence details to the query string values.

type DisputeList Uses

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

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

type DisputeListParams Uses

type DisputeListParams struct {
    ListParams
    Created int64
}

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
    Evidence *DisputeEvidenceParams
}

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. Allowed values are "duplicate", "fraudulent", "subscription_canceled", "product_unacceptable", "product_not_received", "unrecognized", "credit_not_processed", "general".

type DisputeStatus Uses

type DisputeStatus string

DisputeStatus is the list of allowed values for a discount's status. Allowed values are "won", "lost", "needs_response", "under_review", "warning_needs_response", "warning_under_review", "charge_refunded", "warning_closed".

type Error Uses

type Error struct {
    Type           ErrorType `json:"type"`
    Msg            string    `json:"message"`
    Code           ErrorCode `json:"code,omitempty"`
    Param          string    `json:"param,omitempty"`
    RequestID      string    `json:"request_id,omitempty"`
    HTTPStatusCode int       `json:"status,omitempty"`
    ChargeID       string    `json:"charge,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:"-"`
}

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.

type ErrorType Uses

type ErrorType string

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

type EstimateType Uses

type EstimateType string
const (
    Exact EstimateType = "exact"
    Range EstimateType = "range"
)

type Event Uses

type Event struct {
    ID       string     `json:"id"`
    Live     bool       `json:"livemode"`
    Created  int64      `json:"created"`
    Data     *EventData `json:"data"`
    Webhooks uint64     `json:"pending_webhooks"`
    Type     string     `json:"type"`
    Req      string     `json:"request"`
    UserID   string     `json:"user_id"`
}

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

func (*Event) GetObjValue Uses

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

GetObjValue returns the value from the e.Data.Obj bag based on the keys hierarchy.

func (*Event) GetPrevValue Uses

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

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

type EventData Uses

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

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
    Values []*Event `json:"data"`
}

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

type EventListParams Uses

type EventListParams struct {
    ListParams
    Created int64
    // Type is one of the values documented at https://stripe.com/docs/api#event_types.
    Type string
}

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 EvidenceDetails Uses

type EvidenceDetails struct {
    Count       int   `json:"submission_count"`
    DueDate     int64 `json:"due_by"`
    HasEvidence bool  `json:"has_evidence"`
    PastDue     bool  `json:"past_due"`
}

EvidenceDetails is the structure representing more details about the dispute.

type ExternalAccount Uses

type ExternalAccount struct {
    Type AccountType `json:"object"`
    ID   string      `json:"id"`

    // A bank account attached to an account. Populated only if the external
    // account is a bank account.
    BankAccount *BankAccount

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

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(b []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.
    Values []*ExternalAccount `json:"data"`
}

ExternalAccountList is a list of external accounts that may be either bank accounts or cards.

type Fee Uses

type Fee struct {
    ID                     string         `json:"id"`
    Live                   bool           `json:"livemode"`
    Account                *Account       `json:"account"`
    Amount                 uint64         `json:"amount"`
    App                    string         `json:"application"`
    Tx                     *Transaction   `json:"balance_transaction"`
    Charge                 *Charge        `json:"charge"`
    OriginatingTransaction *Charge        `json:"originating_transaction"`
    Created                int64          `json:"created"`
    Currency               Currency       `json:"currency"`
    Refunded               bool           `json:"refunded"`
    Refunds                *FeeRefundList `json:"refunds"`
    AmountRefunded         uint64         `json:"amount_refunded"`
}

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

func (*Fee) UnmarshalJSON Uses

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

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

type FeeList Uses

type FeeList struct {
    ListMeta
    Values []*Fee `json:"data"`
}

FeeList is a list of fees as retrieved from a list endpoint.

type FeeListParams Uses

type FeeListParams struct {
    ListParams
    Created int64
    Charge  string
}

FeeListParams 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 FeeParams Uses

type FeeParams struct {
    Params
    Amount uint64
}

FeeParams 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 FeeRefund Uses

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

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

func (*FeeRefund) UnmarshalJSON Uses

func (f *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
    Values []*FeeRefund `json:"data"`
}

FeeRefundList is a list object for fee refunds.

type FeeRefundListParams Uses

type FeeRefundListParams struct {
    ListParams
    Fee string
}

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

type FeeRefundParams Uses

type FeeRefundParams struct {
    Params
    Fee    string
    Amount uint64
    Meta   map[string]string
}

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

type File Uses

type File struct {
    ID      string `json:"id"`
    Created int64  `json:"created"`
    Size    int    `json:"size"`
    Purpose string `json:"purpose"`
    URL     string `json:"url"`
    Mime    string `json:"mime_type"`
}

File represents a link to downloadable content.

func (*File) UnmarshalJSON Uses

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

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

type FileUpload Uses

type FileUpload struct {
    ID      string            `json:"id"`
    Created int64             `json:"created"`
    Size    int64             `json:"size"`
    Purpose FileUploadPurpose `json:"purpose"`
    URL     string            `json:"url"`
    Type    string            `json:"type"`
}

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
    Values []*FileUpload `json:"data"`
}

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

type FileUploadListParams Uses

type FileUploadListParams struct {
    Purpose FileUploadPurpose
    ListParams
}

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
    Purpose FileUploadPurpose

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

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

    // File is a deprecated form of FileReader and Filename that will do the same thing, but
    // allows referencing a file directly. Please prefer the use of FileReader and Filename instead.
    File *os.File
}

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) AppendDetails Uses

func (f *FileUploadParams) AppendDetails(body io.ReadWriter) (string, error)

AppendDetails adds the file upload details to an io.ReadWriter. It returns the boundary string for a multipart/form-data request and an error (if one exists).

type FileUploadPurpose Uses

type FileUploadPurpose string

FileUploadPurpose is the purpose of a particular file upload. Allowed values are "dispute_evidence" and "identity_document".

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(values *RequestValues)

AppendTo adds the list of filters to the query string values.

type FraudDetails Uses

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

FraudDetails is the structure detailing fraud status.

type FraudReport Uses

type FraudReport string

FraudReport is the list of allowed values for reporting fraud. Allowed values are "fraudulent", "safe".

type Gender Uses

type Gender string

Gender is the gender of an account owner. International regulations require either “male” or “female”.

type IdentityDocument Uses

type IdentityDocument struct {
    ID      string `json:"id"`
    Created int64  `json:"created"`
    Size    int64  `json:"size"`
}

IdentityDocument is the structure for an identity document.

func (*IdentityDocument) UnmarshalJSON Uses

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

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

type IdentityVerification Uses

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

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. Allowed values are "failed_keyed_identity", "failed_other", "scan_corrupt", "scan_failed_greyscale", "scan_failed_other", "scan_id_country_not_supported", "scan_id_type_not_supported", "scan_name_mismatch", "scan_not_readable", "scan_not_uploaded".

type IdentityVerificationStatus Uses

type IdentityVerificationStatus string

IdentityVerificationStatus describes the different statuses for identity verification. Allowed values are "pending", "verified", "unverified".

type Interval Uses

type Interval string

Interval describes the payout interval. Allowed values are "manual", "daily", "weekly", "monthly".

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 {
    Type     string `json:"type"`
    Quantity int64  `json:"quantity"`
    Value    string `json:"value"`
}

type Invoice Uses

type Invoice struct {
    ID            string            `json:"id"`
    Live          bool              `json:"livemode"`
    Amount        int64             `json:"amount_due"`
    Attempts      uint64            `json:"attempt_count"`
    Attempted     bool              `json:"attempted"`
    Closed        bool              `json:"closed"`
    Currency      Currency          `json:"currency"`
    Customer      *Customer         `json:"customer"`
    Date          int64             `json:"date"`
    Forgive       bool              `json:"forgiven"`
    Lines         *InvoiceLineList  `json:"lines"`
    Paid          bool              `json:"paid"`
    End           int64             `json:"period_end"`
    Start         int64             `json:"period_start"`
    StartBalance  int64             `json:"starting_balance"`
    Subtotal      int64             `json:"subtotal"`
    Total         int64             `json:"total"`
    Tax           int64             `json:"tax"`
    TaxPercent    float64           `json:"tax_percent"`
    Fee           uint64            `json:"application_fee"`
    Charge        *Charge           `json:"charge"`
    Desc          string            `json:"description"`
    Discount      *Discount         `json:"discount"`
    ReceiptNumber string            `json:"receipt_number"`
    EndBalance    int64             `json:"ending_balance"`
    NextAttempt   int64             `json:"next_payment_attempt"`
    Statement     string            `json:"statement_descriptor"`
    Sub           string            `json:"subscription"`
    Webhook       int64             `json:"webhooks_delivered_at"`
    Meta          map[string]string `json:"metadata"`
    Billing       InvoiceBilling    `json:"billing"`
    DueDate       int64             `json:"due_date"`
    Number        string            `json:"number"`
}

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{
    Desc: "updated description",
}

inv, err := invoice.Update("sub_example_id", params)

if err != nil {
    log.Fatal(err)
}

log.Printf("%v\n", inv.Desc)

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. Currently supported values are "send_invoice" and "charge_automatically".

type InvoiceItem Uses

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

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
    Values []*InvoiceItem `json:"data"`
}

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

type InvoiceItemListParams Uses

type InvoiceItemListParams struct {
    ListParams
    Created  int64
    Customer string
}

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
    Customer           string
    Amount             int64
    Currency           Currency
    Invoice, Desc, Sub string
    Discountable       bool
    NoDiscountable     bool
}

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 {
    ID           string            `json:"id"`
    Live         bool              `json:"live_mode"`
    Amount       int64             `json:"amount"`
    Currency     Currency          `json:"currency"`
    Period       *Period           `json:"period"`
    Proration    bool              `json:"proration"`
    Type         InvoiceLineType   `json:"type"`
    Desc         string            `json:"description"`
    Meta         map[string]string `json:"metadata"`
    Plan         *Plan             `json:"plan"`
    Quantity     int64             `json:"quantity"`
    Sub          string            `json:"subscription"`
    Discountable bool              `json:"discountable"`
}

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
    Values []*InvoiceLine `json:"data"`
}

InvoiceLineList is a list object for invoice line items.

type InvoiceLineListParams Uses

type InvoiceLineListParams struct {
    ListParams
    ID            string
    Customer, Sub string
}

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. Allowed values are "invoiceitem", "subscription".

type InvoiceList Uses

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

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

type InvoiceListParams Uses

type InvoiceListParams struct {
    ListParams
    Date     int64
    Customer string
    Sub      string
    Billing  InvoiceBilling
    DueDate  int64
}

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
    Customer             string
    Desc, Statement, Sub string
    Fee                  uint64
    Closed, Forgive      bool
    NoClosed             bool
    SubPlan              string
    SubNoProrate         bool
    SubProrationDate     int64
    SubQuantity          uint64
    SubTrialEnd          int64
    TaxPercent           float64
    TaxPercentZero       bool
    Billing              InvoiceBilling
    DueDate              int64
    DaysUntilDue         uint64
    Paid                 bool
}

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 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(params *ListParams, qs *RequestValues, 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 {
    Type LegalEntityType `json:"type"`

    AdditionalOwners []Owner `json:"additional_owners"`

    // AdditionalOwnersEmpty can be set to clear a legal entity's additional
    // owners.
    AdditionalOwnersEmpty bool

    BusinessName          string               `json:"business_name"`
    BusinessNameKana      string               `json:"business_name_kana"`
    BusinessNameKanji     string               `json:"business_name_kanji"`
    Address               Address              `json:"address"`
    AddressKana           Address              `json:"address_kana"`
    AddressKanji          Address              `json:"address_kanji"`
    First                 string               `json:"first_name"`
    FirstKana             string               `json:"first_name_kana"`
    FirstKanji            string               `json:"first_name_kanji"`
    Gender                Gender               `json:"gender"`
    Last                  string               `json:"last_name"`
    LastKana              string               `json:"last_name_kana"`
    LastKanji             string               `json:"last_name_kanji"`
    MaidenName            string               `json:"maiden_name"`
    PersonalAddress       Address              `json:"personal_address"`
    PersonalAddressKana   Address              `json:"personal_address_kana"`
    PersonalAddressKanji  Address              `json:"personal_address_kanji"`
    PhoneNumber           string               `json:"phone_number"`
    DOB                   DOB                  `json:"dob"`
    Verification          IdentityVerification `json:"verification"`
    SSN                   string               `json:"ssn_last_4"`
    SSNProvided           bool                 `json:"ssn_last_4_provided"`
    PersonalID            string               `json:"personal_id_number"`
    PersonalIDProvided    bool                 `json:"personal_id_number_provided"`
    BusinessTaxID         string               `json:"business_tax_id"`
    BusinessTaxIDProvided bool                 `json:"business_tax_id_provided"`
    BusinessVatID         string               `json:"business_vat_id"`
}

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

func (*LegalEntity) AppendDetails Uses

func (l *LegalEntity) AppendDetails(values *RequestValues)

AppendDetails adds the legal entity to the query string.

type LegalEntityType Uses

type LegalEntityType string

LegalEntityType describes the types for a legal entity. Allowed values are "individual", "company".

type ListMeta Uses

type ListMeta struct {
    Count uint32 `json:"total_count"`
    More  bool   `json:"has_more"`
    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 {
    Exp        []string
    Start, End string
    Limit      int
    Filters    Filters
    // 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

    // 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
}

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

func (*ListParams) AppendTo Uses

func (p *ListParams) AppendTo(body *RequestValues)

AppendTo adds the common parameters to the query string values.

func (*ListParams) Expand Uses

func (p *ListParams) Expand(f string)

Expand appends a new field to expand.

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 Order Uses

type Order struct {
    ID                     string            `json:"id"`
    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"`
    Items                  []OrderItem       `json:"items"`
    Live                   bool              `json:"livemode"`
    Meta                   map[string]string `json:"metadata"`
    Returns                *OrderReturnList  `json:"returns"`
    SelectedShippingMethod *string           `json:"selected_shipping_method"`
    Shipping               Shipping          `json:"shipping"`
    ShippingMethods        []ShippingMethod  `json:"shipping_methods"`
    StatusTransitions      StatusTransitions `json:"status_transitions"`
    Status                 OrderStatus       `json:"status"`
    Updated                int64             `json:"updated"`
}

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 OrderItem Uses

type OrderItem struct {
    Amount      int64              `json:"amount"`
    Currency    Currency           `json:"currency"`
    Description string             `json:"description"`
    Parent      string             `json:"parent"`
    Quantity    int64              `json:"quantity"`
    Type        orderitem.ItemType `json:"type"`
}

type OrderItemParams Uses

type OrderItemParams struct {
    Amount      int64
    Currency    Currency
    Description string
    Parent      string
    Quantity    *int64
    Type        orderitem.ItemType
}

type OrderList Uses

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

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

type OrderListParams Uses

type OrderListParams struct {
    ListParams
    IDs    []string
    Status OrderStatus
}

OrderListParams is the set of parameters that can be used when listing orders. For more details, see: https://stripe.com/docs/api#list_orders.

type OrderParams Uses

type OrderParams struct {
    Params
    Coupon   string
    Currency Currency
    Customer string
    Email    string
    Items    []*OrderItemParams
    Shipping *ShippingParams
}

type OrderPayParams Uses

type OrderPayParams struct {
    Params
    Source         *SourceParams
    Customer       string
    ApplicationFee int64
    Email          string
}

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

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 {
    ID       string      `json:"id"`
    Amount   int64       `json:"amount"`
    Created  int64       `json:"created"`
    Currency Currency    `json:"currency"`
    Items    []OrderItem `json:"items"`
    Live     bool        `json:"livemode"`
    Order    Order       `json:"order"`
    Refund   *Refund     `json:"refund"`
}

func (*OrderReturn) UnmarshalJSON Uses

func (ret *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
    Values []*OrderReturn `json:"data"`
}

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

type OrderReturnListParams Uses

type OrderReturnListParams struct {
    ListParams
    Order string
}

OrderReturnListParams is the set of parameters that can be used when listing returns. For more details, see: https://stripe.com/docs/api#list_order_returns.

type OrderReturnParams Uses

type OrderReturnParams struct {
    Params
    Items []*OrderItemParams
}

OrderReturnParams is the set of parameters that can be used when returning orders. For more details, see: https://stripe.com/docs/api#return_order.

type OrderStatus Uses

type OrderStatus string

OrderStatus represents the statuses of an order object.

const (
    StatusCreated   OrderStatus = "created"
    StatusPaid      OrderStatus = "paid"
    StatusCanceled  OrderStatus = "canceled"
    StatusFulfilled OrderStatus = "fulfilled"
    StatusReturned  OrderStatus = "returned"
)

type OrderUpdateParams Uses

type OrderUpdateParams struct {
    Params
    Coupon                 string
    SelectedShippingMethod string
    Status                 OrderStatus
}

type Owner Uses

type Owner struct {
    First        string               `json:"first_name"`
    Last         string               `json:"last_name"`
    DOB          DOB                  `json:"dob"`
    Address      Address              `json:"address"`
    Verification IdentityVerification `json:"verification"`
}

Owner is the structure for an account owner.

type PIIParams Uses

type PIIParams struct {
    Params
    PersonalIDNumber string
}

PIIParams are parameters for personal identifiable information (PII).

func (*PIIParams) AppendDetails Uses

func (p *PIIParams) AppendDetails(values *RequestValues)

AppendDetails adds the PII data's details to the query string values.

type PackageDimensions Uses

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

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

type Params Uses

type Params struct {
    Exp            []string
    Meta           map[string]string
    Extra          url.Values
    IdempotencyKey string

    // 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

    // Account is deprecated form of StripeAccount that will do the same thing.
    // Please use StripeAccount instead.
    Account string
}

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

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) AddMeta Uses

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

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

func (*Params) AppendTo Uses

func (p *Params) AppendTo(body *RequestValues)

AppendTo adds the common parameters to the query string values.

func (*Params) Expand Uses

func (p *Params) Expand(f string)

Expand appends a new field to expand.

func (*Params) SetAccount Uses

func (p *Params) SetAccount(val string)

SetAccount sets a value for the Stripe-Account header.

func (*Params) SetStripeAccount Uses

func (p *Params) SetStripeAccount(val string)

SetStripeAccount sets a value for the Stripe-Account header.

type PaymentSource Uses

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

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) Display Uses

func (s *PaymentSource) Display() string

Display human readable representation of source.

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 PaymentSourceType

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 (
    // PaymentSourceBankAccount is a constant representing a payment source
    // which is a bank account.
    PaymentSourceBankAccount PaymentSourceType = "bank_account"

    // PaymentSourceBitcoinReceiver is a constant representing a payment source
    // which is a Bitcoin receiver.
    PaymentSourceBitcoinReceiver PaymentSourceType = "bitcoin_receiver"

    // PaymentSourceObject is a constant representing a payment source which
    // is a top level source object (/v1/sources).
    PaymentSourceObject PaymentSourceType = "source"

    // PaymentSourceCard is a constant representing a payment source which is a
    // card.
    PaymentSourceCard PaymentSourceType = "card"

    // PaymentSourceAccount is a constant representing a payment source which is
    // an account.
    PaymentSourceAccount PaymentSourceType = "account"
)

type Payout Uses

type Payout struct {
    ID                        string            `json:"id"`
    Live                      bool              `json:"livemode"`
    Amount                    int64             `json:"amount"`
    ArrivalDate               int64             `json:"arrival_date"`
    BalanceTransaction        *Transaction      `json:"balance_transaction"`
    Bank                      *BankAccount      `json:"bank_account"`
    Card                      *Card             `json:"card"`
    Created                   int64             `json:"created"`
    Currency                  Currency          `json:"currency"`
    Destination               PayoutDestination `json:"destination"`
    FailureBalanceTransaction *Transaction      `json:"failure_balance_transaction"`
    FailCode                  PayoutFailureCode `json:"failure_code"`
    FailMessage               string            `json:"failure_message"`
    Meta                      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 (t *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 {
    Type        PayoutDestinationType `json:"object"`
    ID          string                `json:"id"`
    BankAccount *BankAccount          `json:"-"`
    Card        *Card                 `json:"-"`
}

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 (
    // PayoutDestinationBankAccount is a constant representing a payout destination
    // which is a bank account.
    PayoutDestinationBankAccount PayoutDestinationType = "bank_account"

    // PayoutDestinationCard is a constant representing a payout destination
    // which is a card.
    PayoutDestinationCard PayoutDestinationType = "card"
)

type PayoutFailureCode Uses

type PayoutFailureCode string

PayoutFailureCode is the list of allowed values for the payout's failure code. Allowed values are "insufficient_funds", "account_closed", "no_account", "invalid_account_number", "debit_not_authorized", "bank_ownership_changed", "account_frozen", "could_not_process", "bank_account_restricted", "invalid_currency".

type PayoutList Uses

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

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

type PayoutListParams Uses

type PayoutListParams struct {
    ListParams
    ArrivalDate int64
    Created     int64
    Destination string
    Status      PayoutStatus
}

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 is a constant representing an instant payout
    PayoutMethodInstant PayoutMethodType = "instant"

    // PayoutMethodStandard is a constant representing a standard payout
    PayoutMethodStandard PayoutMethodType = "standard"
)

type PayoutParams Uses

type PayoutParams struct {
    Params
    Amount              int64
    Currency            Currency
    Destination         string
    Method              PayoutMethodType
    SourceType          PayoutSourceType
    StatementDescriptor string
}

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 {
    Delay       uint64   `json:"delay_days"`
    Interval    Interval `json:"interval"`
    WeekAnchor  string   `json:"weekly_anchor"`
    MonthAnchor uint64   `json:"monthly_anchor"`
}

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

type PayoutScheduleParams Uses

type PayoutScheduleParams struct {
    Delay, MonthAnchor uint64
    WeekAnchor         string
    Interval           Interval
    MinimumDelay       bool
}

PayoutScheduleParams are the parameters allowed for payout schedules.

func (*PayoutScheduleParams) AppendDetails Uses

func (t *PayoutScheduleParams) AppendDetails(values *RequestValues)

AppendDetails adds the payout schedule to the query string.

type PayoutSourceType Uses

type PayoutSourceType string

PayoutSourceType is the list of allowed values for the payout's source_type field. Allowed values are "alipay_account", bank_account", "bitcoin_receiver", "card".

type PayoutStatus Uses

type PayoutStatus string

PayoutStatus is the list of allowed values for the payout's status. Allowed values are "paid", "pending", "in_transit", "failed", "canceled".

type PayoutType Uses

type PayoutType string

PayoutType is the list of allowed values for the payout's type. Allowed values are "bank_account" or "card".

type Period Uses

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

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 {
    ID            string            `json:"id"`
    Live          bool              `json:"livemode"`
    Amount        uint64            `json:"amount"`
    Created       int64             `json:"created"`
    Currency      Currency          `json:"currency"`
    Interval      PlanInterval      `json:"interval"`
    IntervalCount uint64            `json:"interval_count"`
    Name          string            `json:"name"`
    Meta          map[string]string `json:"metadata"`
    TrialPeriod   uint64            `json:"trial_period_days"`
    Statement     string            `json:"statement_descriptor"`
    Deleted       bool              `json:"deleted"`
}

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().Name)
}
if err := it.Err(); err != nil {
    log.Fatal(err)
}

type PlanInterval Uses

type PlanInterval string

PlanInterval is the list of allowed values for a plan's interval. Allowed values are "day", "week", "month", "year".

type PlanList Uses

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

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

type PlanListParams Uses

type PlanListParams struct {
    ListParams
}

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
    ID, Name                   string
    Currency                   Currency
    Amount                     uint64
    Interval                   PlanInterval
    IntervalCount, TrialPeriod uint64
    Statement                  string
}

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 Product Uses

type Product struct {
    ID                string             `json:"id"`
    Created           int64              `json:"created"`
    Updated           int64              `json:"updated"`
    Live              bool               `json:"livemode"`
    Active            bool               `json:"active"`
    Name              string             `json:"name"`
    Caption           string             `json:"caption"`
    Desc              string             `json:"description"`
    Attrs             []string           `json:"attributes"`
    Shippable         bool               `json:"shippable"`
    PackageDimensions *PackageDimensions `json:"package_dimensions"`
    Images            []string           `json:"images"`
    Meta              map[string]string  `json:"metadata"`
    URL               string             `json:"url"`
    DeactivateOn      []string           `json:"deactivate_on"`
    Skus              *SKUList           `json:"skus"`
}

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
    Values []*Product `json:"data"`
}

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

type ProductListParams Uses

type ProductListParams struct {
    ListParams
    Active    *bool
    IDs       []string
    Shippable *bool
    URL       string
}

ProductListParams is the set of parameters that can be used when listing products. For more details, see: https://stripe.com/docs/api#list_products.

type ProductParams Uses

type ProductParams struct {
    Params
    ID                string
    Active            *bool
    Name              string
    Caption           string
    Desc              string
    Attrs             []string
    Images            []string
    URL               string
    Shippable         *bool
    PackageDimensions *PackageDimensions
    DeactivateOn      []string
}

ProductParams is the set of parameters that can be used when creating or updating a product. For more details, see https://stripe.com/docs/api#create_product and https://stripe.com/docs/api#update_product.

type Query Uses

type Query func(*RequestValues) ([]interface{}, ListMeta, error)

Query is the function used to get a page listing.

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 ReasonType Uses

type ReasonType string

Reason describes the reason why the review is open or closed. Allowed values are "rule", "manual", "approved", "refunded", "refunded_as_fraud", "disputed".

const (
    ReasonRule            ReasonType = "rule"
    ReasonManual          ReasonType = "manual"
    ReasonApproved        ReasonType = "approved"
    ReasonRefunded        ReasonType = "refunded"
    ReasonRefundedAsFraud ReasonType = "refunded_as_fraud"
    ReasonDisputed        ReasonType = "disputed"
)

type ReceiverFlow Uses

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

ReceiverFlow informs of the state of a receiver authentication flow.

type Recipient Uses

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

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
    Values []*Recipient `json:"data"`
}

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

type RecipientListParams Uses

type RecipientListParams struct {
    ListParams
    Verified bool
}

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
    Name                      string
    Type                      RecipientType
    TaxID, Token, Email, Desc string
    Bank                      *BankAccountParams
    Card                      *CardParams
    DefaultCard               string
}

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.

type RecipientTransfer Uses

type RecipientTransfer struct {
    ID                 string                       `json:"id"`
    Live               bool                         `json:"livemode"`
    Amount             int64                        `json:"amount"`
    AmountReversed     int64                        `json:"amount_reversed"`
    BalanceTransaction *Transaction                 `json:"balance_transaction"`
    Bank               *BankAccount                 `json:"bank_account"`
    Card               *Card                        `json:"card"`
    Created            int64                        `json:"created"`
    Currency           Currency                     `json:"currency"`
    Date               int64                        `json:"date"`
    Desc               string                       `json:"description"`
    Dest               RecipientTransferDestination `json:"destination"`
    FailCode           RecipientTransferFailCode    `json:"failure_code"`
    FailMsg            string                       `json:"failure_message"`
    Meta               map[string]string            `json:"metadata"`
    Method             RecipientTransferMethodType  `json:"method"`
    Recipient          *Recipient                   `json:"recipient"`
    Reversals          *ReversalList                `json:"reversals"`
    Reversed           bool                         `json:"reversed"`
    SourceTx           *TransactionSource           `json:"source_transaction"`
    SourceType         RecipientTransferSourceType  `json:"source_type"`
    Statement          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 {
    Type        RecipientTransferDestinationType `json:"object"`
    ID          string                           `json:"id"`
    BankAccount *BankAccount                     `json:"-"`
    Card        *Card                            `json:"-"`
}

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 is a constant representing a recipient_transfer destination
    // which is a bank account.
    RecipientTransferDestinationBankAccount RecipientTransferDestinationType = "bank_account"

    // RecipientTransferDestinationCard is a constant representing a recipient_transfer destination
    // which is a card.
    RecipientTransferDestinationCard RecipientTransferDestinationType = "card"
)

type RecipientTransferFailCode Uses

type RecipientTransferFailCode string

RecipientTransferFailCode is the list of allowed values for the recipient_transfer's failure code. Allowed values are "insufficient_funds", "account_closed", "no_account", "invalid_account_number", "debit_not_authorized", "bank_ownership_changed", "account_frozen", "could_not_process", "bank_account_restricted", "invalid_currency".

type RecipientTransferMethodType Uses

type RecipientTransferMethodType string

RecipientTransferMethodType represents the type of recipient_transfer

const (
    // RecipientTransferMethodInstant is a constant representing an instant recipient_transfer
    RecipientTransferMethodInstant RecipientTransferMethodType = "instant"

    // RecipientTransferMethodStandard is a constant representing a standard recipient_transfer
    RecipientTransferMethodStandard RecipientTransferMethodType = "standard"
)

type RecipientTransferSourceType Uses

type RecipientTransferSourceType string

RecipientTransferSourceType is the list of allowed values for the recipient_transfer's source_type field. Allowed values are "alipay_account", bank_account", "bitcoin_receiver", "card".

type RecipientTransferStatus Uses

type RecipientTransferStatus string

RecipientTransferStatus is the list of allowed values for the recipient_transfer's status. Allowed values are "paid", "pending", "in_transit", "failed".

type RecipientTransferType Uses

type RecipientTransferType string

RecipientTransferType is the list of allowed values for the recipient_transfer's type. Allowed values are "bank_account" or "card".

type RecipientType Uses

type RecipientType string

RecipientType is the list of allowed values for the recipient's type. Allowed values are "individual", "corporation".

type RedirectFlow Uses

type RedirectFlow struct {
    URL       string             `json:"url"`
    ReturnURL string             `json:"return_url"`
    Status    RedirectFlowStatus `json:"status"`
}

ReceiverFlow informs of the state of a redirect authentication flow.

type RedirectFlowStatus Uses

type RedirectFlowStatus string

RedirectFlowStatus represents the possible statuses of a redirect flow.

const (
    RedirectFlowStatusPending   RedirectFlowStatus = "pending"
    RedirectFlowStatusSucceeded RedirectFlowStatus = "succeeded"
    RedirectFlowStatusFailed    RedirectFlowStatus = "failed"
)

type RedirectParams Uses

type RedirectParams struct {
    ReturnURL string
}

type Refund Uses

type Refund struct {
    ID            string            `json:"id"`
    Amount        uint64            `json:"amount"`
    Created       int64             `json:"created"`
    Currency      Currency          `json:"currency"`
    Tx            *Transaction      `json:"balance_transaction"`
    Charge        *Charge           `json:"charge"`
    Meta          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 RefundAttributesMethod Uses

type RefundAttributesMethod string

RefundAttributesMethod are the possible method to retrieve a receiver's refund attributes.

const (
    // RefundAttributesEmail the refund attributes are automatically collected over email
    RefundAttributesEmail RefundAttributesMethod = "email"
    // RefundAttributesManual the refund attributes should be collected by the user
    RefundAttributesManual RefundAttributesMethod = "manual"
)

type RefundAttributesStatus Uses

type RefundAttributesStatus string

RefundAttributesStatus are the possible status of a receiver's refund attributes.

const (
    // RefundAttributesAvailable the refund attributes are available
    RefundAttributesAvailable RefundAttributesStatus = "available"
    // RefundAttributesRequested the refund attributes have been requested
    RefundAttributesRequested RefundAttributesStatus = "requested"
    // RefundAttributesMissing the refund attributes are missing
    RefundAttributesMissing RefundAttributesStatus = "missing"
)

type RefundList Uses

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

RefundList is a list object for refunds.

type RefundListParams Uses

type RefundListParams struct {
    ListParams
}

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
    Charge        string
    Amount        uint64
    Fee, Transfer bool
    Reason        RefundReason
}

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--allowed values are "fraudulent", "duplicate", and "requested_by_customer".

type RefundStatus Uses

type RefundStatus string

RefundStatus is the status of the refund. For credit card refunds, this will always be "succeeded". For other types of refunds, it can be "pending", "succeeded", "failed", or "cancelled".

type RequestValues Uses

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

RequestValues is a collection of values that can be submitted along with a request that specifically allows for duplicate keys and encodes its entries in the same order that they were added.

func (*RequestValues) Add Uses

func (f *RequestValues) Add(key, val string)

Add adds a key/value tuple to the form.

func (*RequestValues) Empty Uses

func (f *RequestValues) Empty() bool

Empty returns true if no parameters have been set.

func (*RequestValues) Encode Uses

func (f *RequestValues) Encode() string

Encode encodes the values into “URL encoded” form ("bar=baz&foo=quux").

func (*RequestValues) Get Uses

func (f *RequestValues) Get(key string) []string

Get retrieves the list of values for the given key. If no values exist for the key, nil will be returned.

Note that Get is O(n) and may be quite slow for a very large parameter list.

func (*RequestValues) Set Uses

func (f *RequestValues) Set(key, val string)

Set sets the first instance of a parameter for the given key to the given value. If no parameters exist with the key, a new one is added.

Note that Set is O(n) and may be quite slow for a very large parameter list.

func (*RequestValues) ToValues Uses

func (f *RequestValues) ToValues() url.Values

ToValues converts an instance of RequestValues into an instance of url.Values. This can be useful in cases where it's useful to make an unordered comparison of two sets of request values.

Note that url.Values is incapable of representing certain Rack form types in a cohesive way. For example, an array of maps in Rack is encoded with a string like:

arr[][foo]=foo0&arr[][bar]=bar0&arr[][foo]=foo1&arr[][bar]=bar1

Because url.Values is a map, values will be handled in a way that's grouped by their key instead of in the order they were added. Therefore the above may by encoded to something like (maps are unordered so the actual result is somewhat non-deterministic):

arr[][foo]=foo0&arr[][foo]=foo1&arr[][bar]=bar0&arr[][bar]=bar1

And thus result in an incorrect request to Stripe.

type Reversal Uses

type Reversal struct {
    ID       string            `json:"id"`
    Amount   uint64            `json:"amount"`
    Created  int64             `json:"created"`
    Currency Currency          `json:"currency"`
    Transfer string            `json:"transfer"`
    Meta     map[string]string `json:"metadata"`
    Tx       *Transaction      `json:"balance_transaction"`
}

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
    Values []*Reversal `json:"data"`
}

ReversalList is a list of object for reversals.

type ReversalListParams Uses

type ReversalListParams struct {
    ListParams
    Transfer string
}

ReversalListParams is the set of parameters that can be used when listing reversals.

type ReversalParams Uses

type ReversalParams struct {
    Params
    Transfer string
    Amount   uint64
    Fee      bool
}

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"`
    Live    bool       `json:"livemode"`
    Open    bool       `json:"open"`
    Reason  ReasonType `json:"reason"`
}

func (*Review) UnmarshalJSON Uses

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

type SKU Uses

type SKU struct {
    ID                string             `json:"id"`
    Created           int64              `json:"created"`
    Updated           int64              `json:"updated"`
    Live              bool               `json:"livemode"`
    Active            bool               `json:"active"`
    Desc              string             `json:"description"`
    Attrs             map[string]string  `json:"attributes"`
    Price             int64              `json:"price"`
    Currency          string             `json:"currency"`
    PackageDimensions *PackageDimensions `json:"package_dimensions"`
    Image             string             `json:"image"`
    Inventory         Inventory          `json:"inventory"`
    Product           Product            `json:"product"`
    Meta              map[string]string  `json:"metadata"`
}

func (*SKU) UnmarshalJSON Uses

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

type SKUList Uses

type SKUList struct {
    ListMeta
    Values []*SKU `json:"data"`
}

type SKUListParams Uses

type SKUListParams struct {
    ListParams
    Active     *bool
    Product    string
    Attributes map[string]string
    IDs        []string
    InStock    *bool
}

type SKUParams Uses

type SKUParams struct {
    Params
    ID                string
    Active            *bool
    Desc              string
    Attrs             map[string]string
    Price             int64
    Currency          string
    Image             string
    Inventory         Inventory
    Product           string
    PackageDimensions *PackageDimensions
}

type Shipping Uses

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

type ShippingDetails Uses

type ShippingDetails struct {
    Name     string  `json:"name"`
    Address  Address `json:"address"`
    Phone    string  `json:"phone"`
    Tracking string  `json:"tracking_number"`
    Carrier  string  `json:"carrier"`
}

ShippingDetails is the structure containing shipping information.

func (*ShippingDetails) AppendDetails Uses

func (s *ShippingDetails) AppendDetails(values *RequestValues)

AppendDetails adds the shipping details to the query string.

type ShippingMethod Uses

type ShippingMethod struct {
    ID               string            `json:"id"`
    Amount           int64             `json:"amount"`
    Currency         Currency          `json:"currency"`
    Description      string            `json:"description"`
    DeliveryEstimate *DeliveryEstimate `json:"delivery_estimate"`
}

type ShippingParams Uses

type ShippingParams struct {
    Name    string
    Address *AddressParams
    Phone   string
}

type Source Uses

type Source struct {
    ID           string       `json:"id"`
    Amount       int64        `json:"amount"`
    ClientSecret string       `json:"client_secret"`
    Created      int64        `json:"created"`
    Currency     Currency     `json:"currency"`
    Flow         SourceFlow   `json:"flow"`
    Status       SourceStatus `json:"status"`
    Type         string       `json:"type"`
    Usage        SourceUsage  `json:"usage"`

    Live bool              `json:"livemode"`
    Meta map[string]string `json:"metadata"`

    Owner        SourceOwner       `json:"owner"`
    Redirect     *RedirectFlow     `json:"redirect,omitempty"`
    Receiver     *ReceiverFlow     `json:"receiver,omitempty"`
    Verification *VerificationFlow `json:"verification,omitempty"`

    TypeData map[string]interface{}
}

func (*Source) Display Uses

func (s *Source) Display() string

Display human readable representation of a Source.

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 SourceFlow Uses

type SourceFlow string

SourceFlow represents the possible flows of a source object.

const (
    // FlowRedirect a redirect is required to authenticate the source.
    FlowRedirect SourceFlow = "redirect"
    // FlowReceiver a receiver address should be communicated to the customer
    // to push funds to it.
    FlowReceiver SourceFlow = "receiver"
    // FlowVerification a verification code should be communicated by the
    // customer to authenticate the source.
    FlowVerification SourceFlow = "verification"
    // FlowNone no particular authentication is involved the source should
    // become chargeable directly or asyncrhonously.
    FlowNone SourceFlow = "none"
)

type SourceList Uses

type SourceList struct {
    ListMeta
    Values []*PaymentSource `json:"data"`
}

SourceList is a list object for cards.

type SourceListParams Uses

type SourceListParams struct {
    ListParams
    Customer string
}

SourceListParams are used to enumerate the payment sources that are attached to a Customer.

type SourceObjectParams Uses

type SourceObjectParams struct {
    Params
    Type     string
    Amount   uint64
    Currency Currency
    Flow     SourceFlow
    Owner    *SourceOwnerParams

    Redirect *RedirectParams
    Token    string

    TypeData map[string]string
}

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

type SourceOwnerParams Uses

type SourceOwnerParams struct {
    Address *AddressParams
    Email   string
    Name    string
    Phone   string
}

type SourceParams Uses

type SourceParams struct {
    Token string
    Card  *CardParams
}

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) AppendDetails Uses

func (sp *SourceParams) AppendDetails(values *RequestValues, creating bool)

AppendDetails adds the source's details to the query string values. For cards: when creating a new one, the parameters are passed as a dictionary, but on updates they are simply the parameter name.

type SourceStatus Uses

type SourceStatus string

SourceStatus represents the possible statuses of a source object.

const (
    // SourceStatusPending the source is freshly created and not yet
    // chargeable. The flow should indicate how to authenticate it with your
    // customer.
    SourceStatusPending SourceStatus = "pending"
    // SourceStatusChargeable the source is ready to be charged (once if usage
    // is `single-use`, repeatidly otherwise).
    SourceStatusChargeable SourceStatus = "chargeable"
    // SourceStatusConsumed the source is `single-use` usage and has been
    // charged already.
    SourceStatusConsumed SourceStatus = "consumed"
    // SourceStatusFailed the source is no longer usable.
    SourceStatusFailed SourceStatus = "failed"
    // SourceStatusCanceled we canceled the source along with any side-effect
    // it had (returned funds to customers if any were sent).
    SourceStatusCanceled SourceStatus = "canceled"
)

type SourceUsage Uses

type SourceUsage string

SourceUsage represents the possible usages of a source object.

const (
    // UsageSingleUse the source can only be charged once for the specified
    // amount and currency.
    UsageSingleUse SourceUsage = "single-use"
    // UsageReusable the source can be charged multiple times for arbitrary
    // amounts.
    UsageReusable SourceUsage = "reusable"
)

type SourceVerifyParams Uses

type SourceVerifyParams struct {
    Params
    Customer string
    Amounts  [2]uint8
}

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

StatsuTransitions are the timestamps at which the order status was updated https://stripe.com/docs/api#order_object

type Sub Uses

type Sub struct {
    ID           string            `json:"id"`
    EndCancel    bool              `json:"cancel_at_period_end"`
    Customer     *Customer         `json:"customer"`
    Plan         *Plan             `json:"plan"`
    Quantity     uint64            `json:"quantity"`
    Status       SubStatus         `json:"status"`
    FeePercent   float64           `json:"application_fee_percent"`
    Canceled     int64             `json:"canceled_at"`
    Created      int64             `json:"created"`
    Start        int64             `json:"start"`
    PeriodEnd    int64             `json:"current_period_end"`
    PeriodStart  int64             `json:"current_period_start"`
    Discount     *Discount         `json:"discount"`
    Ended        int64             `json:"ended_at"`
    Meta         map[string]string `json:"metadata"`
    TaxPercent   float64           `json:"tax_percent"`
    TrialEnd     int64             `json:"trial_end"`
    TrialStart   int64             `json:"trial_start"`
    Items        *SubItemList      `json:"items"`
    Billing      SubBilling        `json:"billing"`
    DaysUntilDue uint64            `json:"days_until_due"`
}

Sub is the resource representing a Stripe subscription. For more details see https://stripe.com/docs/api#subscriptions.

func (*Sub) UnmarshalJSON Uses

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

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

type SubBilling Uses

type SubBilling string

SubBilling is the type of billing method for this subscription's invoices. Currently supported values are "send_invoice" and "charge_automatically".

type SubItem Uses

type SubItem struct {
    ID       string `json:"id"`
    Plan     *Plan  `json:"plan"`
    Quantity uint64 `json:"quantity"`
    Created  int64  `json:"created"`
    Deleted  bool   `json:"deleted"`
}

SubItem is the resource represneting a Stripe subscription item. For more details see https://stripe.com/docs/api#subscription_items.

type SubItemList Uses

type SubItemList struct {
    ListMeta
    Values []*SubItem `json:"data"`
}

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

type SubItemListParams Uses

type SubItemListParams struct {
    ListParams
    Sub string
}

SubItemListParams 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 SubItemParams Uses

type SubItemParams struct {
    Params
    Sub                     string
    ID                      string
    Quantity                uint64
    Plan                    string
    ProrationDate           int64
    NoProrate, QuantityZero bool
}

SubItemParams 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 SubItemsParams Uses

type SubItemsParams struct {
    Params
    ID                    string
    Quantity              uint64
    Plan                  string
    Deleted, QuantityZero bool
}

SubItemsParams 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 SubList Uses

type SubList struct {
    ListMeta
    Values []*Sub `json:"data"`
}

SubList is a list object for subscriptions.

type SubListParams Uses

type SubListParams struct {
    ListParams
    Customer string
    Plan     string
    Status   SubStatus
    Billing  SubBilling
}

SubListParams 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 SubParams Uses

type SubParams struct {
    Params
    Customer, Plan                                  string
    Coupon, Token                                   string
    CouponEmpty                                     bool
    TrialEnd, TrialPeriod                           int64
    Card                                            *CardParams
    Quantity                                        uint64
    ProrationDate                                   int64
    FeePercent, TaxPercent                          float64
    TaxPercentZero                                  bool
    NoProrate, EndCancel, QuantityZero, TrialEndNow bool
    BillingCycleAnchor                              int64
    BillingCycleAnchorNow                           bool
    Items                                           []*SubItemsParams
    Billing                                         SubBilling
    DaysUntilDue                                    uint64
}

SubParams 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.

type SubStatus Uses

type SubStatus string

SubStatus is the list of allowed values for the subscription's status. Allowed values are "trialing", "active", "past_due", "canceled", "unpaid", "all".

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  `json:"date"`
    IP        string `json:"ip"`
    UserAgent string `json:"user_agent"`
}

TOSAcceptanceParams is the structure for TOS acceptance.

func (*TOSAcceptanceParams) AppendDetails Uses

func (t *TOSAcceptanceParams) AppendDetails(values *RequestValues)

AppendDetails adds the terms of service acceptance to the query string.

type ThreeDSecure Uses

type ThreeDSecure struct {
    Amount        uint64             `json:"amount"`
    Authenticated bool               `json:"authenticated"`
    Card          *Card              `json:"card"`
    Currency      Currency           `json:"currency"`
    Created       int64              `json:"created"`
    ID            string             `json:"id"`
    Live          bool               `json:"livemode"`
    RedirectURL   string             `json:"redirect_url"`
    Supported     string             `json:"supported"`
    Status        ThreeDSecureStatus `json:"status"`
}

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
    Amount    uint64   `json:"amount"`
    Card      string   `json:"card"`
    Currency  Currency `json:"currency"`
    Customer  string   `json:"customer"`
    ReturnURL string   `json:"return_url"`
}

ThreeDSecureParams is the set of parameters that can be used when creating a 3DS object. For more details see https://stripe.com/docs/api#create_three_d_secure.

type ThreeDSecureStatus Uses

type ThreeDSecureStatus string

type Token Uses

type Token struct {
    ID       string       `json:"id"`
    Live     bool         `json:"livemode"`
    Created  int64        `json:"created"`
    Type     TokenType    `json:"type"`
    Used     bool         `json:"used"`
    Bank     *BankAccount `json:"bank_account"`
    Card     *Card        `json:"card"`
    ClientIP string       `json:"client_ip"`
    // Email is an undocumented field but included for all tokens created
    // with Stripe Checkout.
    Email string `json:"email"`
}

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
    Card     *CardParams
    Bank     *BankAccountParams
    PII      *PIIParams
    Customer string
    // Email is an undocumented parameter used by Stripe Checkout
    // It may be removed from the API without notice.
    Email string
}

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. Allowed values are "card", "bank_account".

type TokenizationMethod Uses

type TokenizationMethod string

TokenizationMethod is the list of allowed values for the card's tokenization method. Allowed values are "apple_pay", "android_pay".

type Transaction Uses

type Transaction struct {
    ID         string            `json:"id"`
    Amount     int64             `json:"amount"`
    Currency   Currency          `json:"currency"`
    Available  int64             `json:"available_on"`
    Created    int64             `json:"created"`
    Fee        int64             `json:"fee"`
    FeeDetails []TxFee           `json:"fee_details"`
    Net        int64             `json:"net"`
    Status     TransactionStatus `json:"status"`
    Type       TransactionType   `json:"type"`
    Desc       string            `json:"description"`
    Src        TransactionSource `json:"source"`
    Recipient  string            `json:"recipient"`
}

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

func (*Transaction) UnmarshalJSON Uses

func (t *Transaction) 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 TransactionList Uses

type TransactionList struct {
    ListMeta
    Values []*Transaction `json:"data"`
}

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

type TransactionSource Uses

type TransactionSource struct {
    Type              TransactionSourceType `json:"object"`
    ID                string                `json:"id"`
    Charge            *Charge               `json:"-"`
    Dispute           *Dispute              `json:"-"`
    Fee               *Fee                  `json:"-"`
    Payout            *Payout               `json:"-"`
    RecipientTransfer *RecipientTransfer    `json:"-"`
    Refund            *Refund               `json:"-"`
    Reversal          *Reversal             `json:"-"`
    Transfer          *Transfer             `json:"-"`
}

TransactionSource 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 (*TransactionSource) MarshalJSON Uses

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

MarshalJSON handles serialization of a TransactionSource.

func (*TransactionSource) UnmarshalJSON Uses

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

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

type TransactionSourceType Uses

type TransactionSourceType string

TransactionSourceType consts represent valid balance transaction sources.

const (
    // TransactionSourceFee is a constant representing a transaction source of application_fee
    TransactionSourceFee TransactionSourceType = "application_fee"

    // TransactionSourceCharge is a constant representing a transaction source of charge
    TransactionSourceCharge TransactionSourceType = "charge"

    // TransactionSourceDispute is a constant representing a transaction source of dispute
    TransactionSourceDispute TransactionSourceType = "dispute"

    // TransactionSourcePayout is a constant representing a transaction source of payout
    TransactionSourcePayout TransactionSourceType = "payout"

    // TransactionSourceRefund is a constant representing a transaction source of refund
    TransactionSourceRefund TransactionSourceType = "refund"

    // TransactionSourceRecipientTransfer is a constant representing a transaction source of recipient_transfer
    TransactionSourceRecipientTransfer TransactionSourceType = "recipient_transfer"

    // TransactionSourceReversal is a constant representing a transaction source of reversal
    TransactionSourceReversal TransactionSourceType = "reversal"

    // TransactionSourceTransfer is a constant representing a transaction source of transfer
    TransactionSourceTransfer TransactionSourceType = "transfer"
)

type TransactionStatus Uses

type TransactionStatus string

TransactionStatus is the list of allowed values for the transaction's status. Allowed values are "available", "pending".

type TransactionType Uses

type TransactionType string

TransactionType is the list of allowed values for the transaction's type. Allowed values are "charge", "refund", "adjustment", "application_fee", "application_fee_refund", "transfer", "transfer_cancel", "transfer_failure".

type Transfer Uses

type Transfer struct {
    ID             string              `json:"id"`
    Live           bool                `json:"livemode"`
    Amount         int64               `json:"amount"`
    AmountReversed int64               `json:"amount_reversed"`
    Currency       Currency            `json:"currency"`
    Created        int64               `json:"created"`
    Dest           TransferDestination `json:"destination"`
    Tx             *Transaction        `json:"balance_transaction"`
    Meta           map[string]string   `json:"metadata"`
    Statement      string              `json:"statement_descriptor"`
    Reversals      *ReversalList       `json:"reversals"`
    Reversed       bool                `json:"reversed"`
    SourceTx       *TransactionSource  `json:"source_transaction"`
    DestPayment    string              `json:"destination_payment"`
    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 {
    ID      string   `json:"id"`
    Account *Account `json:"-"`
}

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
    Values []*Transfer `json:"data"`
}

TransferList is a list of transfers as retrieved from a list endpoint.

type TransferListParams Uses

type TransferListParams struct {
    ListParams
    Amount        int64
    Created       int64
    Currency      Currency
    Dest          string
    TransferGroup string
}

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
    Amount        int64
    Currency      Currency
    Dest          string
    Meta          map[string]string
    SourceTx      string
    SourceType    TransferSourceType
    TransferGroup string
}

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. Allowed values are "alipay_account", bank_account", "bitcoin_receiver", "card".

type TxFee Uses

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

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

type TxListParams Uses

type TxListParams struct {
    ListParams
    Created, Available    int64
    Currency, Src, Payout string
    Type                  TransactionType
}

TxListParams 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 TxParams Uses

type TxParams struct {
    Params
}

TxParams 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 Verification Uses

type Verification string

Verification is the list of allowed verification responses. Allowed values are "pass", "fail", "unchecked", "unavailable".

type VerificationFieldsList Uses

type VerificationFieldsList struct {
    AdditionalFields []string `json:"additional"`
    MinimumFields    []string `json:"minimum"`
}

VerificationFieldsList lists the fields needed for an account verification. For more details see https://stripe.com/docs/api#country_spec_object-verification_fields.

type VerificationFlow Uses

type VerificationFlow struct {
    AttemptsRemaining uint64             `json:"attempts_remaining"`
    Status            RedirectFlowStatus `json:"status"`
}

ReceiverFlow informs of the state of a verification authentication flow.

type VerificationFlowStatus Uses

type VerificationFlowStatus string

VerificationFlowStatus represents the possible statuses of a verification flow.

const (
    VerificationFlowStatusPending   VerificationFlowStatus = "pending"
    VerificationFlowStatusSucceeded VerificationFlowStatus = "succeeded"
    VerificationFlowStatusFailed    VerificationFlowStatus = "failed"
)

Directories

PathSynopsis
accountPackage account provides the /account APIs
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 the /charges APIs
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
currencyPackage currency provides the list of currency codes
customerPackage customer provides the /customers APIs
discountPackage discount provides the discount-related APIs
disputePackage dispute provides the dispute-related APIs
eventPackage event provides the /events APIs
feePackage fee provides the /application_fees APIs
feerefundPackage feerefund provides the /application_fees/refunds APIs
fileuploadPackage fileupload provides the file upload related APIs
invoicePackage invoice provides the /invoices APIs
invoiceitemPackage invoiceitem provides the /invoiceitems APIs
order
orderitem
orderreturn
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
reversalPackage reversal provides the /transfers/reversals APIs
sku
source
subPackage sub provides the /subscriptions APIs
subitemPackage sub provides the /subscriptions APIs
testing
threedsecurePackage threedsecure provides the /3d_secure APIs
tokenPackage token provides the /tokens APIs
transferPackage transfer provides the /transfers APIs
utilsPackage utils provides internal utilities

Package stripe imports 21 packages (graph) and is imported by 710 packages. Updated 2017-05-15. Refresh now. Tools for package owners.