Documentation ¶
Index ¶
- func AttachMethod(customerID, methodID string) (*stripe.PaymentMethod, error)
- func CancelIntent(intentID string) error
- func CancelPayout(payoutID string) (*stripe.Payout, error)
- func CaptureIntent(intentID string) error
- func ConfirmIntent(intentID string, source *stripe.Source) error
- func CreateIntent(id, cartID, currency string, total int64, card Card) (*stripe.PaymentIntent, error)
- func CreateMethod(card Card) (string, error)
- func CreatePayout(amount int) (*stripe.Payout, error)
- func CreateRefund(intentID string) (*stripe.Refund, error)
- func DetachMethod(methodID string) (*stripe.PaymentMethod, error)
- func GetBalance() (*stripe.Balance, error)
- func GetEvent(eventID string) (*stripe.Event, error)
- func GetPayout(payoutID string) (*stripe.Payout, error)
- func GetRefund(refundID string) (*stripe.Refund, error)
- func GetTxBalance(txID string) (*stripe.BalanceTransaction, error)
- func ListEvents() []*stripe.Event
- func ListIntents() []*stripe.PaymentIntent
- func ListMethods(customerID string) []*stripe.PaymentMethod
- func ListPayouts() []*stripe.Payout
- func ListRefunds() []*stripe.Refund
- func ListTxs() []*stripe.BalanceTransaction
- func RetrieveIntent(intentID string) (*stripe.PaymentIntent, error)
- func RetrieveMethod(methodID string) (*stripe.PaymentMethod, error)
- func UpdateIntent(intentID string, total int64) (*stripe.PaymentIntent, error)
- func UpdateMethod(methodID string) (*stripe.PaymentMethod, error)
- func UpdatePayout(payoutID string) (*stripe.Payout, error)
- func UpdateRefund(refundID string) (*stripe.Refund, error)
- type Card
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachMethod ¶
func AttachMethod(customerID, methodID string) (*stripe.PaymentMethod, error)
AttachMethod attaches a PaymentMethod object to a Customer.
func CancelPayout ¶
CancelPayout cancels a payout. Funds will be refunded to the available balance.
func CaptureIntent ¶
CaptureIntent captures the funds of an existing uncaptured PaymentIntent
when its status is requires_capture.
func ConfirmIntent ¶
ConfirmIntent confirms that your customer intends to pay with current or provided payment method.
func CreateIntent ¶
func CreateIntent(id, cartID, currency string, total int64, card Card) (*stripe.PaymentIntent, error)
CreateIntent creates a payment intent object.
func CreateMethod ¶
CreateMethod creates a new payment method.
func CreatePayout ¶
CreatePayout sends funds to the bank account.
func CreateRefund ¶
CreateRefund will refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.
func DetachMethod ¶
func DetachMethod(methodID string) (*stripe.PaymentMethod, error)
DetachMethod detaches a PaymentMethod object from a Customer.
func GetBalance ¶
GetBalance retrieves the current account balance, based on the authentication that was used to make the request.
func GetTxBalance ¶
func GetTxBalance(txID string) (*stripe.BalanceTransaction, error)
GetTxBalance retrieves the balance transaction with the given ID.
func ListEvents ¶
ListEvents returns a list of events going back up to 30 days.
func ListIntents ¶
func ListIntents() []*stripe.PaymentIntent
ListIntents returns a list of PaymentIntents.
func ListMethods ¶
func ListMethods(customerID string) []*stripe.PaymentMethod
ListMethods returns a list of PaymentMethods for a given Customer.
func ListPayouts ¶
ListPayouts returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you.
func ListRefunds ¶
ListRefunds returns a list of all refunds you’ve previously created.
func ListTxs ¶
func ListTxs() []*stripe.BalanceTransaction
ListTxs returns a list of transactions that have contributed to the Stripe account balance.
func RetrieveIntent ¶
RetrieveIntent lists the details of a PaymentIntent that has previously been created.
func RetrieveMethod ¶
func RetrieveMethod(methodID string) (*stripe.PaymentMethod, error)
RetrieveMethod retrieves a PaymentMethod object.
func UpdateIntent ¶
UpdateIntent sets new properties on a PaymentIntent object without confirming.
func UpdateMethod ¶
func UpdateMethod(methodID string) (*stripe.PaymentMethod, error)
UpdateMethod updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
func UpdatePayout ¶
UpdatePayout updates the specified payout by setting the values of the parameters passed.
Types ¶
type Card ¶
type Card struct { Number string `json:"number"` ExpMonth string `json:"exp_month"` ExpYear string `json:"exp_year" validate:"len=4"` CVC string `json:"cvc" validate:"len=3"` }
Card symbolizes a user card.
type Handler ¶
type Handler struct{}
Handler manages stripe endpoints.
func (*Handler) GetBalance ¶
func (h *Handler) GetBalance() http.HandlerFunc
GetBalance responds with the account balance.
func (*Handler) GetEvent ¶
func (h *Handler) GetEvent() http.HandlerFunc
GetEvent looks for the details of the events.
func (*Handler) GetTxBalance ¶
func (h *Handler) GetTxBalance() http.HandlerFunc
GetTxBalance responds with the transaction balance.
func (*Handler) ListEvents ¶
func (h *Handler) ListEvents() http.HandlerFunc
ListEvents retrieves a list of all the stripe events within the last 30 days.
func (*Handler) ListTxs ¶
func (h *Handler) ListTxs() http.HandlerFunc
ListTxs responds with a list of stripe transactions.