Partial authorization allows your customers to use multiple payment methods to pay the total balance due on a single check. The customer uses one payment method, like a gift card to pay for a portion of the total balance due and then uses another payment method, like a payment card to pay the remaining balance. For example, your customer has a check balance of $50.00. Your customer completes a partial authorization for $25.00 using a gift card and then pays the remaining $25.00 balance with a payment card.
To complete a partial authorization using two different payment methods, you need to create and confirm two payment intents.
The following procedure is a high-level overview of how to create and confirm two payment intents.
-
Use your hosted checkout - payment credentials to send a
POSTrequest to the/v1/payment-intentsendpoint of the payment intents API to create a payment intent. For each payment method you want to allow partial authorization for, set thepaymentMethodOptions.{type}.partialAuthorizationvalue totrue. Thetypevalue is the type of the payment method. -
Send a
POSTrequest to the/v1/payment-methodsendpoint of the payment methods API to create a payment method to attach to the payment intent. This returns aPaymentMethodResponseobject. -
Confirm the payment intent by invoking the
confirmIntentSDK function or send aPOSTrequest to the/v1/payment-intents/{paymentIntentId}/confirmendpoint of the payment intents API. If thepaymentMethodOptions.{type}.partialAuthorizationfor the payment method used was set totrue, the Toast platform captures the partial amount. -
Send a
POSTrequest to the/v1/payment-intentsendpoint of the payment intents API to create another payment intent for the remaining balance. In the request body, include the remaining balance due. -
Send a
POSTrequest to the/v1/payment-methodsendpoint of the payment methods API to create a payment method to attach to the payment intent. This returns aPaymentMethodResponseobject. -
Confirm the payment intent by invoking the
confirmIntentSDK function or send aPOSTrequest to the/v1/payment-intents/{paymentIntentId}/confirmendpoint of the payment intents API.