Managing an Apple Pay payment integration

Registering an Apple Pay integration

Register your Apple Pay payment integration with the Toast platform so that the Toast platform payment processing functionality and Apple are prepared to authorize and complete your guest payments.

To register an Apple Pay payment integration

  1. Create a resource for your Apple Pay integration in the Toast platform. You use the /applepay/registration endpoint of the Toast credit cards API to create an Apple Pay integration resource. For more information, see Creating a registered Apple Pay integration resource.

  2. Download the Apple Pay static domain verification file for the Toast platform and host it on the domain you use to accept restaurant guest payments. For more information, see Hosting the static domain verification file.

Important

If your integration handles payments for more than 99 web domains (associated with the ordering and payment interface that restaurant guests use), you must register separate Apple Pay integrations for each group of up to 99 web domains. For more information, see Using multiple Apple Pay domains.

Creating a registered Apple Pay integration resource

You use the /applepay/registration endpoint of the Toast credit cards API to create an Apple Pay integration resource for your integration. The following example shows the message body for a PUT request to register an Apple Pay payment integration.

Request to register an Apple Pay payment integration

{
  "id": "4f3d3ab6-feec-430c-9669-8844b9c818f6",
  "domains": ["nicerestaurant.com"],
  "userEmail": "marie.stdenis@nicerestaurant.com",
  "integrationName": "Nice Restaurant"
}

Response to register an Apple Pay payment integration

{
   "integrationIdentifier": "4d0412db-d761-47f2-a7e2-cbf2155ccf90_nice_restaurant"
}

Using multiple Apple Pay domains

If your Apple Pay integration accepts guest Apple Pay payments on more than one restaurant ordering web domain, you can use the same registered integration for up to 99 domains.

For example, if your integration accepts guest payments at two separate websites for two restaurant locations in the same restaurant management group, you can use the same registered Apple Pay integration for both restaurant websites. You must host the static domain verification file on each domain site.

If your integration processes payments at more than 99 web domains, you must create separate Apple Pay integrations for them. The number of domains associated with an Apple Pay integration must be 99 or fewer.

Unregistering an Apple Pay domain

To unregister a domain, send a PUT request to the /applepay/unregisterIntegration endpoint of the credit cards API. If you deactivate or no longer want to take Apple Pay payments for a domain, you can unregister that domain. If you unregister all your domains, your integration is deleted from the Toast platform.

Request to unregister a domain

curl -X PUT \
-H "Authorization: Bearer [authentication token]"  \1
-H "Toast-Restaurant-External-ID: 4622e7a9-b4be-3fef-9220-b3dad273e0b4"2
-H 'Content-Type: application/json' \
-d '[Your message body]'3

1

Include an authentication token. For more information, see Authentication and restaurant access.

2

Specify the GUID of a restaurant whose domain you want to unregister.

3

Include information about the domains you want to unregister. See the example request message body below.


The example below shows the message body for a PUT request to unregister a domain.

Request message body

{
  "domains": ["domain2.com"],1
  "integrationIdentifier": "f3d3ab6-feec-430c-9669-8844b9c818f6_nice_restaurant" ,2
  "reason": "Closed store location" 3
}

1

Name of the domain you want to unregister.

2

The unique identifier of your Apple Pay payment integration. The Toast platform generates this identifier and registers it with Apple.

3

Custom reason for unregistering the domain. This is optional.


The example below shows the response body for a PUT request to unregister a domain.

Response message body

{
"domains": "domain2.com",
"message": "Removed domains=domain2.com from integration details."
}

The example below shows the message body for a PUT request to unregister all domains.

Request message body

{
"domains": ["domain1.com", "domain3.com", "domain4.com"],
"integrationIdentifier": "f3d3ab6-feec-430c-9669-8844b9c818f6_nice_restaurant",
"reason": "Closed store locations"
}

The example below shows the response body for a PUT request to unregister all domains.

Response message body

{
"domains": null,
"message": "Registration was successfully deleted."
}

Getting information about an Apple Pay integration

To retrieve information about your Apple Pay integration, send a GET request to the /applepay/integration/{integrationIdentifier} endpoint. This endpoint retrieves the following information: integrationIdentifier, integrationName, and registered domains.

The example below shows the response body for a GET request to retrieve integration details.

Response message body

{
   "integrationIdentifier": "f3d3ab6-feec-430c-9669-8844b9c818f6_nice_restaurant",
   "integrationName": "Nice Restaurant",
   "domains": "domain1.com, domain2.com, domain3.com, domain4.com"
}