setupintent

package
v79.6.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 3 Imported by: 3

Documentation

Overview

Package setupintent provides the /setup_intents APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

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

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

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

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

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /setup_intents APIs.

func (Client) Cancel

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

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

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

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for setup intents.

func List

func List(params *stripe.SetupIntentListParams) *Iter

Returns a list of SetupIntents.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL