PaymentAuthorization

A request to authorize a credit card payment.

amount
required
number <double>

The check price that should be charged to the credit card, not including the tip. For example, the value 10.00 represents ten USD and zero cents. The amount must not be negative. The total of the amount value and the tipAmount value must be greater than zero.

cardNumberOrigin
required
string

The way that the credit card was provided for the payment request. The value is END_USER if the cardholder entered the card number (PAN) as part of a web order. The value is PARTNER_VAULT if the PAN was retrieved from a vault controlled by the integration partner.

This value is used with willSaveCard to report information about stored credit card numbers to credit card provider networks. If your organization is using stored credit card information for a credit card authorization, this value must be PARTNER_VAULT. The default value is END_USER.

Enum: "END_USER" "PARTNER_VAULT"
encryptedCardData
required
object

A base64-encoded version of the encrypted card data payload. For information about encrypting and encoding credit card information, see the Toast API Developer's Guide.

keyId
required
string

The identifier of the encryption key and algorithm used to encrypt the credit card data. Toast integration support provides this identifier along with the encryption key itself. If you received an encryption key before June 2018, you may omit this field. For all API users, supplying a keyId value prevents downtime during key rotations.

required
object (PaymentRequestMetadata)

Metadata about the request being made.

tipAmount
required
number <double>

The tip that should be charged to the credit card. For example, the value 1.00 represents one USD and zero cents. The tip amount must not be negative. The total of the amount value and the tipAmount value must be greater than zero.

willSaveCard
required
boolean

Indicates whether your organization will save the restaurant guests' credit card information for future use.

Toast reports information about stored credit card information to some credit card providers. This "card on file" or "stored credentials" reporting is required by some credit card provider networks. These networks may impose fees for non-compliance with "card on file" reporting requirements.

Note that integration partners are responsible for any and all fees incurred, and must comply with all applicable law and rules relevant to, "card on file" consent, storage, use and reporting requirements in accordance with card brand regulations and the integration partner agreement.

{
  • "cardNumberOrigin": "END_USER",
  • "willSaveCard": true,
  • "encryptedCardData": { },
  • "amount": 0,
  • "keyId": "string",
  • "tipAmount": 0,
  • "requestMetadata": {
    }
}