refund

package
v79.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Package refund provides the /refunds APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

func Cancel(id string, params *stripe.RefundCancelParams) (*stripe.Refund, error)

Cancels a refund with a status of requires_action.

You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.

func Get

func Get(id string, params *stripe.RefundParams) (*stripe.Refund, error)

Retrieves the details of an existing refund.

func New

func New(params *stripe.RefundParams) (*stripe.Refund, error)

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

Creating a new refund 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.

You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded.

Once entirely refunded, a charge can't be refunded again. This method will raise an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.

func Update

func Update(id string, params *stripe.RefundParams) (*stripe.Refund, error)

Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged.

This request only accepts metadata as an argument.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /refunds APIs.

func (Client) Cancel

func (c Client) Cancel(id string, params *stripe.RefundCancelParams) (*stripe.Refund, error)

Cancels a refund with a status of requires_action.

You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.

func (Client) Get

func (c Client) Get(id string, params *stripe.RefundParams) (*stripe.Refund, error)

Retrieves the details of an existing refund.

func (Client) List

func (c Client) List(listParams *stripe.RefundListParams) *Iter

Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object.

func (Client) New

func (c Client) New(params *stripe.RefundParams) (*stripe.Refund, error)

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

Creating a new refund 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.

You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded.

Once entirely refunded, a charge can't be refunded again. This method will raise an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.

func (Client) Update

func (c Client) Update(id string, params *stripe.RefundParams) (*stripe.Refund, error)

Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged.

This request only accepts metadata as an argument.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for refunds.

func List

func List(params *stripe.RefundListParams) *Iter

Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object.

func (*Iter) Refund

func (i *Iter) Refund() *stripe.Refund

Refund returns the refund which the iterator is currently pointing to.

func (*Iter) RefundList

func (i *Iter) RefundList() *stripe.RefundList

RefundList 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