Skip to main content
Redirect your customers to Fintoc to complete a payment, then return them to your website. The payment flow follows these steps:
  1. Create a Checkout Session: Your backend calls the Fintoc API to create a Checkout Session. Include success_url and cancel_url in the request.
  2. Receive the redirect URL: The API returns a Checkout Session that contains redirect_url.
  3. Redirect your customer: Send your customer to redirect_url to complete the payment in the Fintoc Widget.
  4. Return your customer: Fintoc redirects your customer to success_url or cancel_url after the payment flow.

Create a Checkout Session

Create a Checkout Session from your server with your secret key. Include success_url and cancel_url in the request:
Node
Python

Handle the API response

After you create the Checkout Session, the API returns the session with redirect_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.