Skip to main content
Save a customer’s payment method once and charge it later for on-demand or variable-amount payments, without creating a recurring subscription. Unlike the subscription flow, the setup flow does not couple enrollment with recurring billing, so you decide when and how much to charge. Set up a payment method and charge it later in four steps:
  1. On your backend, create a Checkout Session with flow: setup.
  2. Redirect your customer to complete the enrollment at the Fintoc-hosted checkout page.
  3. Handle post-session events to save the payment_method and customer.
  4. Create charges against the saved payment method using the Payment Intent API.
The following diagram shows how the setup flow works:

Create a Checkout Session

The Checkout Session with the setup flow represents your intent to save a payment method for future charges, without creating a recurring subscription. Using your Secret Key, create a Checkout Session on your backend with flow set to setup: Server
Node
After creating the Checkout Session, Fintoc responds with the session details and a redirect_url:
Difference from the subscription flowWhen you create a Checkout Session with flow: setup, Fintoc enrolls the customer’s payment method and creates a PaymentMethod, but does not create a subscription or schedule any recurring charges. You control when and how much to charge by creating future payment intents.

Include customer data

When creating a Checkout Session for setup, you must include customer information.

Redirect the customer to complete the enrollment

Next, redirect the customer to the redirect_url from the response. The customer sees the Fintoc-hosted checkout page where they complete the enrollment. After the customer completes the enrollment, Fintoc automatically redirects them to your success_url or cancel_url, depending on the outcome. Client

Handle post-session events

Always use webhooks to determine the final outcome. Customers may close the tab, lose connection, or never reach your success_url.

Checkout Session events

When the enrollment completes, Fintoc sends a checkout_session.finished event with the customer and payment_method information:

Payment Method events

Fintoc also sends a payment_method.activated event. The event’s data field contains a PaymentMethod like this:
Store both the customer ID and the payment_method ID. You need them to create charges later.

Events summary

You should subscribe to all the following post-session events:

Create a charge against the saved payment method

Once you have a saved payment_method, charge it by creating a Payment Intent with the payment_method and customer IDs: Server
Node
Fintoc responds with the created Payment Intent:

Handle payment events

Subscribe to the following events to track the payment outcome:

Test your integration

Using your test mode API Secret Key, create Checkout Sessions that simulate the full setup and payment flow without moving any money.

1) Create a setup Checkout Session using test credentials

Create a Checkout Session with flow: setup using your test mode Secret Key. Complete the enrollment flow on the Fintoc-hosted page using the following credentials: Test credentials:

PAC:

  • Username (RUT): 11.111.111-1
  • Password: jonsnow
Select the account based on the final outcome you want to test:

Card:

2) Verify the saved payment method

After completing the test enrollment, you should receive the checkout_session.finished and payment_method.activated webhook events. Verify that:
  • The payment_method ID is present in the event payload.
  • The customer ID matches the customer you enrolled.

3) Create a test charge against the saved method

Using the customer and payment_method IDs from step 2, create a Payment Intent against the saved method. Verify that:
  • You receive the payment_intent.succeeded event.
  • The amount matches what you sent.
  • The payment method used is the saved PAC or card.
Test mode does not yet support saving a Payment Method in Mexico.