# PaymentIntent

> The `PaymentIntent` object.

Source: https://docs.gastrogate.io/docs/api/types/PaymentIntent

**Kind:** Objects

## Fields

### `id`

[`ID`](https://docs.gastrogate.io/docs/api/types/ID.md)!

### `action`

[`PaymentIntentAction`](https://docs.gastrogate.io/docs/api/types/PaymentIntentAction.md)

For state "RequiresAction" this is the action that the user needs to perform.

### `employee`

[`Employee`](https://docs.gastrogate.io/docs/api/types/Employee.md)

### `finalizeAccessToken`

[`String`](https://docs.gastrogate.io/docs/api/types/String.md)

An access token that can be used to finalize the payment intent without requiring an authenticated user.

### `metadata`

[`JSONObject`](https://docs.gastrogate.io/docs/api/types/JSONObject.md)

Any metadata that was passed in by the client will be returned as is here.

### `orderIntent`

[`OrderIntent`](https://docs.gastrogate.io/docs/api/types/OrderIntent.md)

### `paymentMethod`

[`PaymentMethod`](https://docs.gastrogate.io/docs/api/types/PaymentMethod.md)

### `paymentProvider`

[`PaymentProvider`](https://docs.gastrogate.io/docs/api/types/PaymentProvider.md)

### `posTerminal`

[`PosTerminal`](https://docs.gastrogate.io/docs/api/types/PosTerminal.md)

### `receiptPaymentMethodLabel`

[`String`](https://docs.gastrogate.io/docs/api/types/String.md)

### `state`

[`PaymentIntentState`](https://docs.gastrogate.io/docs/api/types/PaymentIntentState.md)!

The state which this Payment Intent is currently in.

- 'Ready' - This payment intent is ready to be finalized.
- 'RequiresAction' - An action is required to be performed by the user before this payment intent can progress, see the 'action' field for more info.
- 'Done' - This payment intent has successfully been paid.
- 'Failed' - The payment intent has failed and will never be paid.

### `stripePaymentMethod`

[`StripePaymentMethod`](https://docs.gastrogate.io/docs/api/types/StripePaymentMethod.md)

### `tipAmount`

[`Int53`](https://docs.gastrogate.io/docs/api/types/Int53.md)

### `totalAmount`

[`Int53`](https://docs.gastrogate.io/docs/api/types/Int53.md)!

### `vatAmount`

[`Int53`](https://docs.gastrogate.io/docs/api/types/Int53.md)

## How to get it

This type is returned by:

- [`cancelPaymentIntent`](https://docs.gastrogate.io/docs/api/mutations/cancelPaymentIntent.md) (mutation)
- [`createPaymentIntent`](https://docs.gastrogate.io/docs/api/mutations/createPaymentIntent.md) (mutation)
- [`createPaymentIntentRetry`](https://docs.gastrogate.io/docs/api/mutations/createPaymentIntentRetry.md) (mutation)
- [`Restaurant.paymentIntent`](https://docs.gastrogate.io/docs/api/types/Restaurant.md#paymentintent) (field on [`Restaurant`](https://docs.gastrogate.io/docs/api/types/Restaurant.md))
- [`Order.paymentIntents`](https://docs.gastrogate.io/docs/api/types/Order.md#paymentintents) (field on [`Order`](https://docs.gastrogate.io/docs/api/types/Order.md))
- [`OrderIntent.paymentIntents`](https://docs.gastrogate.io/docs/api/types/OrderIntent.md#paymentintents) (field on [`OrderIntent`](https://docs.gastrogate.io/docs/api/types/OrderIntent.md))
