- Create a Checkout Session: Your backend calls the Fintoc API to create a Checkout Session. Include
success_urlandcancel_urlin the request. - Receive the redirect URL: The API returns a Checkout Session that contains
redirect_url. - Redirect your customer: Send your customer to
redirect_urlto complete the payment in the Fintoc Widget. - Return your customer: Fintoc redirects your customer to
success_urlorcancel_urlafter the payment flow.
Create a Checkout Session
Create a Checkout Session from your server with your secret key. Includesuccess_url and cancel_url in the request:
Node
Python
Handle the API response
After you create the Checkout Session, the API returns the session withredirect_url. For example:
Handle post-payment events
Fintoc sends a webhook event when the Checkout Session reaches a final state. Follow the webhook guide to receive these events. You can then confirm the order, record the sale, or start a shipping workflow. Listen for webhook events instead of relying on a client callback. Your customer could close the browser or quit the app before the callback runs. A malicious client could also manipulate the callback. We recommend handling the following events:Learn more about webhooksLearn how to create, test, and secure your webhook endpoint in the webhooks guide.