Skip to main content
When your customers choose to pay with Fintoc, the process works as follows:
  1. Create a checkout session: Your backend calls the Fintoc API to create a Checkout Session. Include success_url and cancel_url in your request.
  2. Receive the redirect URL: The API returns a session that contains redirect_url. Use this URL to send your customer to the Fintoc payment page.
  3. Complete the payment: Your customer completes the payment in the Fintoc Widget.
  4. Return to your site: Fintoc sends your customer to the provided success_url or cancel_url after the payment flow.

Create a Checkout Session

Use your secret key to create a Checkout Session on your server. Include success_url and cancel_url in the request:
Node
Python

Handle the API response

The API returns the checkout session with its redirect_url. For example:

Handle post-payment events

Fintoc sends a checkout_session.completed event when the payment is complete. Use the webhook guide to receive these events. You can then send an order confirmation email, log the sale, or start a shipping workflow. Listen for these events instead of waiting for a client-side callback. Your customer might close the browser or app before the callback runs. A malicious client could also manipulate the response. We recommend handling the following events:
Learn more about webhooksRead the webhooks guide to create and test your webhook endpoint and follow security best practices.