The cardPaymentId
value is in the Toast orders API
Payment
object. For information about the orders API and the
Payment
object, see the reference
documentation for the orders API.
The cardPaymentId
value is a unique identifier for a
credit card that is used for a CREDIT
type payment. It is
string data. The Toast POS system generates the identifier string.
cardPaymentId
does not contain any information that is related
to or associated with the actual credit card account. It is unique within a
restaurant management group.
For example:
-
A restaurant guest pays for an order at a restaurant location using a credit card.
-
The restaurant guest returns to the restaurant location on a different day. They pay for a different order using the same credit card.
-
The
cardPaymentId
value for both orders contains the same string.
The cardPaymentId
value is in the Payment
object in the response data for a GET
request to
the /orders/{guid}
endpoint of the Toast orders API.
The cardPaymentId
value is null
in the
following cases:
-
The order was not entered using the Toast POS system. Online orders and orders created using the orders API do not produce a
cardPaymentId
value. -
The payment type is not
CREDIT
-
The credit card payment was entered by keying in card numbers.
-
The request was made to the
GET
ordersBulk
endpoint and thecardPaymentId
value is alwaysnull
for this type of request.
The following example shows an orders API Payment
object
that contains a cardPaymentId
value.
Example cardPaymentId
value in a Payment
object
{ "guid": "7de1311e-ca23-4162-b932-f1f37caba431", "entityType": "OrderPayment", "externalId": null, "originalProcessingFee": 1.51, "amount": 55.0, "tipAmount": 10.0, "amountTendered": 0, "cashDrawer": null, "cardType": "VISA", "lastModifiedDevice": { "id": "5e996ce9ad0d9641" }, "refundStatus": "NONE", "houseAccount": null, "type": "CREDIT", "voidInfo": null, "otherPayment": null, "mcaRepaymentAmount": 0.0, "createdDevice": { "id": "5e996ce9ad0d9641" }, "paidDate": "2020-03-04T18:50:13.754+0000", "cardEntryMode": "SWIPED", "cardPaymentId": "QemnXwSXrMoMkgggdOiw0Rm3vYTQn1FpCkQOW7ICNlc=","paymentStatus": "CAPTURED", "paidBusinessDate": 20200304, "last4Digits": "1111", "refund": null }