class PaymentIntent extends Resource implements PaymentIntentInterface

A PaymentIntent tracks the process of collecting a payment from your customer.

We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.

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(array $allowedSourceTypes, int $amount, array $arguments = [], string $key = null, string $currency = 'usd')

Creates a PaymentIntent object.

confirm(string $id, array $arguments = [])

Confirm that your customer intends to pay with current or provided source.

capture(string $id, array $arguments = [])

Capture the funds of an existing uncaptured PaymentIntent where required_action="requires_capture".

cancel(string $id, array $arguments = [])

A PaymentIntent object can be canceled when it is in one of these statues: requires_source, requires_capture, requires_confirmation, or requires_source_action.

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 36
PaymentIntentInterface create(array $allowedSourceTypes, int $amount, array $arguments = [], string $key = null, string $currency = 'usd')

Creates a PaymentIntent object.

Parameters

array $allowedSourceTypes
int $amount
array $arguments
string $key
string $currency

Return Value

PaymentIntentInterface

See also

at line 58
PaymentIntentInterface confirm(string $id, array $arguments = [])

Confirm that your customer intends to pay with current or provided source.

Upon confirmation, the PaymentIntent will attempt to initiate a payment.

Parameters

string $id
array $arguments

Return Value

PaymentIntentInterface

See also

at line 77
PaymentIntentInterface capture(string $id, array $arguments = [])

Capture the funds of an existing uncaptured PaymentIntent where required_action="requires_capture".

Parameters

string $id
array $arguments

Return Value

PaymentIntentInterface

See also

at line 97
PaymentIntentInterface cancel(string $id, array $arguments = [])

A PaymentIntent object can be canceled when it is in one of these statues: requires_source, requires_capture, requires_confirmation, or requires_source_action.

Parameters

string $id
array $arguments

Return Value

PaymentIntentInterface

See also

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

Parameters

string $method
$arguments
string $idempotencyKey

Return Value

void