Send a GET
request to the
/payments
endpoint of the orders API to get a JSON array of
the GUIDs of the payments processed in a business day at your
restaurant. A business day's cutoff is defined by the restaurant's
closeoutHour
, which you can retrieve with the restaurant
API.
Depending on the query parameter that you use, you can retrieve the following types of payments:
-
The
paidBusinessDate
query parameter returns a list of the payments made during the business day. The payment method can be of any type, such as by cash, credit card, or gift card. -
The
refundBusinessDate
query parameter returns a list of the payments that were refunded during the business day. For details on refunded payments, see Refunded payments. -
The
voidBusinessDate
query parameter returns a list of the payments that were voided during the business day. For details on voided payments, see Voided payments.
The following example curl command sends a
GET
request to the /payments
endpoint of the orders API.
Get all payments for a restaurant
curl -X GET \ -H "Authorization: Bearer
eyJzI1NiJ9hbGciOiJSU.eyJhd9yaXR5Ij
oiQ1JVTkNIVElNRSIsInJzR3VpZCI6IjE4YzQ5YWJlLWFlODItNGFlYy04ND
M1LWJhYTRjMjVlYTY2MiIsInNjb3BlIjpbImxWQiOlsidG9hc3QiXSwibmFt
aW5nQXV0aGhYm9yIiwib3JkZXJzIiwidXNlcm1nbXQiXSwiZXhwIjoxNDg0M
zg5ODUwLCJqdGkiOiJlMDYzZjJkMy1jNGYyLTRiZjItODJmNi01MTg1NWMzZ
DAxM2YiLCJjbGllbnRfaWQiOiJjcnVuY2h0aW1lIn0.X1_0y9Hzj5F9gdOw2
o6VSYTyZwooAJiFMDmNakbZrtiUdYwLzuLwLpCMQzX5pKYtOqDUz_cetGJL3
txKL1L-K2j1Enoq8An8hEM6e8J0KdAiwrYFO3W3CmWedaoz95K9ghNZVCs28
Td2Sp3Ix3fObxbrvanocx9_OT8S9uM8hdSXmBI_ykTWvOVgK4hO24V3DJy4b
9bz1FtgOvrClhELxCe8dJy7jiwAR60xczlCF5rna98RMLN6zY4ffjmljKFZ6
QV0KkVppWjEiJn7oFHiIylCX1sSg7sddrGatj0xJzts3GJ8u8_lryUNHaEvJ
dWq4Yzwo007AMgxjH9d241Y-g" \ -H "Toast-Restaurant-External-ID:
76cb1b05-cb1e-4adf-863a-b2a94a5ecdcf" \
https://[toast-api-hostname]
/orders/v2/payments?paidBusinessDate=20200211
Use the
|
|
Specify the business date for order payments in the
|
The following example shows the JSON response data for a GET
request to the /payments
endpoint.