https://sdk.staging.switch.vaultera.co
to ensure compliance. Please refrain from including the script in a bundle or hosting it yourself.
clientSecret
returned by your endpoint is used to complete the payment.
Important: Make sure to never share your API key with your client application as this could potentially compromise your payment flow.
Following this, create a unifiedCheckout and mount it to the placeholder div in your payment form. This embeds an iframe with a dynamic form that displays configured payment method types available from the Payment, allowing your customer to select a payment method. The form automatically collects the associated payment details for the selected payment method type.
confirmPayment()
, passing along the unifiedCheckout and a return_url
to indicate where Switch should redirect the user after they complete the payment. Hyper redirects the customer to an authentication page depending on the payment method. After the customer completes the authentication process, they’re redirected to the return_url
.
return_url
, the payment_intent_client_secret
query parameter is appended by HyperLoader. Use this to retrieve the Payment to determine what to show to your customer.