PaymentIntentResponse

Response to create a payment intent.

amount
required
integer <int32>

Amount of the payment to be taken in minor units. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.01 US (e.g., a value of 1) or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).

required
object (AmountDetails)

Details about a tip amount.

captureMethod
required
string

Controls when funds are captured from the customer's account.

  • MANUAL - This places a hold on your customer's funds when the payment is authorized.
  • AUTOMATIC - Funds are captured automatically at authorization. Gift card payments must use AUTOMATIC; MANUAL is rejected for gift cards.
Enum: "MANUAL" "AUTOMATIC"
creationDate
required
string

The date and time the payment intent was created in UTC format.

currency
required
string

Three-letter ISO 4217 currency code, in uppercase. Must be a supported currency.

Enum: "USD" "CAD" "EUR" "AUD" "GBP"
customerId
string

The unique identifier of the customer record that identifies the customer in the Toast platform. You can optionally include the customerId to retrieve the customer's payment methods saved to their profile.

email
string

The email address of the customer making the payment.

externalReferenceId
required
string <uuid>

The unique identifier for the payment intent generated by the location or integration partner. The externalReferenceId can be applied as a payment identifier for a Toast platform check.

id
required
string <uuid>

The identifier of the payment intent.

object or null

When present, denotes that there was an error attaching the payment to the requested check. Please check the numericCode and the message for more detail.

object or null

Details about the most recent payment authorization failure on this payment intent.

LatestPaymentCardSummary (object) or ExpandedPayment (object) or (object or null)

The latest payment associated with the payment intent. null when there is no payment to return.

Returned as a LatestPaymentCardSummary by default, giving the card brand, last four digits, and expiry, plus the refunds issued against the payment.

No card summary is available for the CARD_PRESENT, GIFT_CARD_PRESENT, and GIFT_CARD payment method types. Send expand[]=latestPayment to receive an ExpandedPayment with the refunded amount and the refunds instead.

mandateId
string or null <uuid>

The unique identifier of the mandate. The mandateId must be provided to create a merchant-initiated transaction.

offSession
boolean

Determines if the transaction is customer or merchant-initiated. Set to false if the transaction is customer-initiated. Set to true if the transaction is merchant-initiated.

required
object (PaymentMethodConfigurationDetails)

Details about a payment method configuration.

paymentMethodId
string <uuid>

The unique identifier of the payment method.

sessionSecret
required
string

A unique and randomized identifier for the payment intent.

standingInstructionType
string

The instruction type used by the merchant and sent to the payment processor.

Enum: "INSTALLMENT" "RECURRING" "UNSCHEDULED"
status
required
string

Status of the payment intent.

  • REQUIRES_PAYMENT_METHOD - The initial status of the payment intent. A payment method must be attached to the payment intent.
  • PROCESSING - The payment intent is being updated or performing an action.
  • REQUIRES_CAPTURE - The payment intent has been successfully confirmed. The payment method is authorized and can capture the payment amount.
  • SUCCEEDED - The payment intent successfully captured the payment intent.
  • FAILED - The payment intent failed to authorize or capture the payment amount.
  • CANCELLED - The payment was cancelled before authorization or the payment was voided.

For more information, see [Payment intent statuses] (https://doc.toasttab.com/doc/paymentsintegrationapidraftdoc/apiHostedCheckoutPaymentIntentStatuses.html).

Enum: "REQUIRES_PAYMENT_METHOD" "PROCESSING" "REQUIRES_CAPTURE" "SUCCEEDED" "FAILED" "CANCELLED"
usage
string or null

Field used to determine if the logged-in customer will save the payment method for future usage. The value is ON_SESSION for cards saved during checkout.

  • ON_SESSION - Saves the payment method for future usage by the customer.

  • OFF_SESSION - Saves the payment method for future usage initiated by the location.

  • ON_AND_OFF_SESSION - Saves the payment method for future usage initiated by the customer or the location.

Enum: "ON_SESSION" "OFF_SESSION" "ON_AND_OFF_SESSION"
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "externalReferenceId": "b31a2b46-53f5-4ad9-a2e3-1dc38ff564d5",
  • "sessionSecret": "string",
  • "amount": 0,
  • "currency": "USD",
  • "captureMethod": "MANUAL",
  • "status": "REQUIRES_PAYMENT_METHOD",
  • "paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011",
  • "creationDate": "2023-07-07T14:01:27Z",
  • "usage": "ON_SESSION",
  • "customerId": "string",
  • "amountDetails": {
    },
  • "email": "string",
  • "paymentMethodConfigurationDetails": {
    },
  • "latestPayment": {
    },
  • "offSession": true,
  • "standingInstructionType": "INSTALLMENT",
  • "mandateId": "d4dbf0da-b5aa-43ae-b9db-c2aff331d3ad",
  • "lastOrderError": {
    },
  • "lastPaymentError": {
    }
}