The following procedure is a high-level overview of how to accept a payment using the payments APIs and SDKs.
-
Payment credentials to send a
POSTrequest to the/v1/payment-intentsendpoint of the payment intents API to create a payment intent. Include the payment amount in the request. Generate and include an identifier for the payment intent in the request. -
Initiate a payment session and display the hosted checkout
iframeinterface to your customer using hosted checkout integration JavaScript SDK functions. Include the OAuth bearer token that you get with the iframe credentials for your hosted checkout client. -
Monitor the result of the customer payment authorization using functions of the hosted checkout integration JavaScript SDK.
-
Apply the payment identifier you successfully generated as a payment for a Toast orders API check. The payment must be applied to a Toast order within five minutes of the payment card authorization. After five minutes the Toast platform automatically voids the payment.