Documentation ¶
Overview ¶
Package setupintent provides the /setup_intents APIs
Index ¶
- func Cancel(id string, params *stripe.SetupIntentCancelParams) (*stripe.SetupIntent, error)
- func Confirm(id string, params *stripe.SetupIntentConfirmParams) (*stripe.SetupIntent, error)
- func Get(id string, params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
- func New(params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
- func Update(id string, params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
- func VerifyMicrodeposits(id string, params *stripe.SetupIntentVerifyMicrodepositsParams) (*stripe.SetupIntent, error)
- type Client
- func (c Client) Cancel(id string, params *stripe.SetupIntentCancelParams) (*stripe.SetupIntent, error)
- func (c Client) Confirm(id string, params *stripe.SetupIntentConfirmParams) (*stripe.SetupIntent, error)
- func (c Client) Get(id string, params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
- func (c Client) List(listParams *stripe.SetupIntentListParams) *Iter
- func (c Client) New(params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
- func (c Client) Update(id string, params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
- func (c Client) VerifyMicrodeposits(id string, params *stripe.SetupIntentVerifyMicrodepositsParams) (*stripe.SetupIntent, error)
- type Iter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cancel ¶
func Cancel(id string, params *stripe.SetupIntentCancelParams) (*stripe.SetupIntent, error)
You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
func Confirm ¶
func Confirm(id string, params *stripe.SetupIntentConfirmParams) (*stripe.SetupIntent, error)
Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.
If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.
Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status or the canceled status if the confirmation limit is reached.
func Get ¶
func Get(id string, params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
Retrieves the details of a SetupIntent that has previously been created.
Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](https://stripe.com/docs/api#setup_intent_object) object reference for more details.
func New ¶
func New(params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
Creates a SetupIntent object.
After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm) it to collect any required permissions to charge the payment method later.
func Update ¶
func Update(id string, params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
Updates a SetupIntent object.
func VerifyMicrodeposits ¶
func VerifyMicrodeposits(id string, params *stripe.SetupIntentVerifyMicrodepositsParams) (*stripe.SetupIntent, error)
Verifies microdeposits on a SetupIntent object.
Types ¶
type Client ¶
Client is used to invoke /setup_intents APIs.
func (Client) Cancel ¶
func (c Client) Cancel(id string, params *stripe.SetupIntentCancelParams) (*stripe.SetupIntent, error)
You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
func (Client) Confirm ¶
func (c Client) Confirm(id string, params *stripe.SetupIntentConfirmParams) (*stripe.SetupIntent, error)
Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.
If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.
Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status or the canceled status if the confirmation limit is reached.
func (Client) Get ¶
func (c Client) Get(id string, params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
Retrieves the details of a SetupIntent that has previously been created.
Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](https://stripe.com/docs/api#setup_intent_object) object reference for more details.
func (Client) List ¶
func (c Client) List(listParams *stripe.SetupIntentListParams) *Iter
Returns a list of SetupIntents.
func (Client) New ¶
func (c Client) New(params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
Creates a SetupIntent object.
After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm) it to collect any required permissions to charge the payment method later.
func (Client) Update ¶
func (c Client) Update(id string, params *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
Updates a SetupIntent object.
func (Client) VerifyMicrodeposits ¶
func (c Client) VerifyMicrodeposits(id string, params *stripe.SetupIntentVerifyMicrodepositsParams) (*stripe.SetupIntent, error)
Verifies microdeposits on a SetupIntent object.
type Iter ¶
Iter is an iterator for setup intents.
func (*Iter) SetupIntent ¶
func (i *Iter) SetupIntent() *stripe.SetupIntent
SetupIntent returns the setup intent which the iterator is currently pointing to.
func (*Iter) SetupIntentList ¶
func (i *Iter) SetupIntentList() *stripe.SetupIntentList
SetupIntentList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.