This guide will be removed on April 29, 2022. Please use our new, easier-to-use Toast technical documentation site. All updated content is on the new site.

Adding guest credits

To add customer credit value for a restaurant customer, you send a POST request to the /crm/v1//customers/{customerId}/creditTransactions endpoint of the CRM API. Adding customer credit value creates a customer credit transaction.

To create a customer credit transaction, you must provide a unique identifier (UUID or GUID) for the transaction. The CustomerCreditTransaction object in the message body of the POST request must include a guid value containing a unique UUID or GUID for the new customer record.

The following example shows the JSON message body content for a POST request to the /crm/v1//customers/{customerId}/creditTransactions endpoint.

Message body content to add guest credit value

{
  "guid": "65F15E87-F985-4AE4-B970-04CF5F758C17",1
  "transactionType": "ADD_VALUE",2
  "amount": 10.00,3
  "localCreatedDate": "2018-06-16T15:01:14.000+0000"4
}

1

Generate a unique identifier for the customer credit transaction (UUID or GUID). Include the identifier in the guid value.

2

Include the ADD_VALUE value when you add customer credit value in a transaction.

3

Include the currency amount of the customer credit transaction in the amount value.

4

Include the date and time that you added customer credits in the localCreatedDate value.


The following example shows the JSON response data for a POST request to the /crm/v1//customers/{customerId}/creditTransactions endpoint.

Add guest credit transaction response data

{
  "guid": "65f15e87-f985-4ae4-b970-04cf5f758c17",
  "entityType": "CustomerCreditTransaction",
  "approver": null,
  "note": null,
  "server": null,
  "amount": 10.01,
  "restaurant": {
    "guid": "76cb1b05-cb1e-4adf-863a-b2a94a5ecdcf",
    "entityType": "Restaurant"
  },
  "transactionDate": "2018-06-16T19:01:14.488+0000",
  "transactionType": "ADD_VALUE",
  "familyGuid": null,
  "localCreatedDate": "2018-06-16T15:01:14.000+0000",
  "device": null,
  "expirationDate": "2018-09-15T06:00:00.000+0000",
  "customer": {
    "guid": "f7111e82-5979-4579-a86b-e91d10ee6d3a",
    "entityType": "Customer"
  }
}