Overview of Apple Pay payment interactions

Use Payment interactions to initiate an Apple Pay transaction from within the conversation.
Note: You need to configure the bot for Apple Business Chat before you can use Payment interactions.

Consider this example:

The figure shows:
  • Left — the message that the bot sends inviting the user to pay. The details of the payment are obtained by running an action that makes an API call to the client's system.
  • Center — the payment screen. If the user changes the payment method or adds their contact details then other actions are run to get updated payment details from the client's system.
  • Right — the postback message that the bot receives from Apple Business Chat, confirming that the payment is made. A successful payment could trigger the next interaction to run, such as a message thanking them for their order. The message could include details of the payment made.

This means that each Payment interaction may need the following additional interactions:

The interactions in this example are summarized below.

Interaction Description
Get Apple Pay data The REST action that gets the initial payment data. This action must run before the Payment interaction.
Note: The payment data is a JSON formatted object. See JSON format for payment data (Apple Pay).
Test Payment The Payment interaction that configures the Apple Pay transaction:
  • Variable that stores the payment data. The data may be updated if the user changes any of the payment details.
  • How changes to the payment method, shipping contact or shipping method are handled.
  • Once the payment succeeds, how the final payment data is passed to the client's system.
  • What interactions run next when the payment succeeds or fails
paymentMethod The REST action that makes an API call to the client's system whenever the user changes the payment method on the payment sheet. This is required.
shippingContact The REST action that makes an API call to the client's system whenever the user changes the shipping contact details on the payment sheet. Not required for payments that don't have shipping contacts, such as charity donations.
shippingUpdate The REST action that makes an API call to the client's system whenever the user changes the shipping method on the payment sheet. Not required for payments that don't have shipping details.
track Once the payment succeeds, the REST action that makes an API call to the client's system with the payment details received from Apple Pay. This is required.
Payment Done The interaction that's triggered if the payment succeeds.
Note: You can include final payment data in messages sent to the user. See Payment variables.
Payment Failed The interaction that's triggered if the payment fails.

For more detailed information, see Creating payment interactions.