class Refund extends Resource implements RefundInterface

Refund objects allow you to 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.

Traits

Retrieve.
Update.
List All.

Properties

string $id A unique identifier for the resource. from Resource
protected mixed $response A response from Stripe. from Resource

Methods

string
getId()

Returns the unique identifier for this resource.

from Resource
mixed
getResponse()

Returns the raw Stripe response.

from Resource
void
setProperties()

Set the response data as properties on the class.

from Resource
retrieve(string $id)

Get a resource by the ID.

from Retrieve
update(string $id, array $data)

Update a resource.

from Update
listAll(array $arguments = [])

List all the resources.

from ListAll
create(ChargeInterface $charge, array $arguments = [], string $key = null)

When you create a new refund, you must specify a charge on which to create it.

void
stripe(string $method, $arguments, string $idempotencyKey = null)

No description

Details

in Resource at line 29
string getId()

Returns the unique identifier for this resource.

Return Value

string

in Resource at line 39
mixed getResponse()

Returns the raw Stripe response.

Return Value

mixed

in Resource at line 47
protected void setProperties()

Set the response data as properties on the class.

Return Value

void

in Retrieve at line 17
Retrieve retrieve(string $id)

Get a resource by the ID.

Parameters

string $id

Return Value

Retrieve

in Update at line 18
Update update(string $id, array $data)

Update a resource.

Parameters

string $id
array $data

Return Value

Update

in ListAll at line 21
ListAll listAll(array $arguments = [])

List all the resources.

This will list all of the resources from which this trait belongs to. It will then return itself, so you can method chain it, or reuse the same instantiation.

Parameters

array $arguments

Return Value

ListAll

at line 43
RefundInterface create(ChargeInterface $charge, array $arguments = [], string $key = null)

When you create a new refund, you must specify a charge 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 throw an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.

Parameters

ChargeInterface $charge
array $arguments
string $key

Return Value

RefundInterface

See also

at line 51
protected void stripe(string $method, $arguments, string $idempotencyKey = null)

Parameters

string $method
$arguments
string $idempotencyKey

Return Value

void