CLP. When a customer already saved a card with Fintoc, they can pay with it in Checkout without typing the card details again. Your customer confirms the payment and authenticates it with 3-D Secure (3DS), and Fintoc charges the card.
You can offer a saved card in two ways:
- Your customer chooses the card: create a Checkout Session with the
customerandcardinpayment_method_types. Checkout lists the customerโs saved cards. - You preselect the card: create a Checkout Session with the
customerand the saved cardโsidinpayment_method. Checkout opens directly on the confirmation of that card.
Before you begin
- Your organization is based in Chile.
- Your customer has a
Customerwith a savedcardpayment method. To save one, create a Checkout Session withflowset tosetup, as described in Set up a payment method for future charges. - In
testmode, saved card payments are available to every organization in Chile. Inlivemode, Fintoc must enable card payments and saved card payments for your organization. Contact Fintoc to request access.
credit or debit). If you restrict card kinds with payment_method_options.card.kinds, Checkout hides saved cards of any kind you excluded.
Option 1: Let your customer choose a saved card
Create a Checkout Session withflow set to payment, the customer ID, and card in payment_method_types.
Server
Node
CheckoutSession, including its redirect_url:
redirect_url. Checkout shows one button per saved card, labeled with the card brand and its last four digits (for example, Visa โขโขโขโข 1234), above the option to enter a new card. Fintoc creates the payment only when your customer picks a card. Your customer can still enter a different card instead.
You can add other types to payment_method_types, such as bank_transfer. Checkout then shows the saved cards together with the other payment methods.
Option 2: Preselect a saved card
If your customer already picked the card on your website, send itsid in payment_method. Send payment_method_types set to exactly ["card"], and the customer that owns the card.
Server
Node
CheckoutSession, including its redirect_url:
Redirect your customer to the
redirect_url. Checkout skips the list of payment methods and shows the confirmation of the preselected card.
If the request fails, Fintoc returns one of these errors:
Your customer confirms and authenticates the payment
After your customer picks a card, or opens a session with a preselected card, Checkout shows the card and the amount:- Installments. If the card is a credit card issued in Chile, your customer can choose the number of installments. Checkout offers only the options the card supports among 1 to 12, 24, 36, and 48 installments. Debit and prepaid cards pay in a single installment.
- Confirmation. Your customer confirms the payment.
- 3DS authentication. Every saved card payment goes through 3DS. The card issuer either approves it without asking your customer for anything (frictionless) or asks your customer to complete a challenge, such as a code sent by the bank.
success_url.
Handle the payment result
Always use webhooks to determine the final outcome. Your customer may close the tab, lose connection, or never reach yoursuccess_url.
Exception: you cannot retry a saved card payment inside the same Checkout Session. The session also cannot switch to another payment method, such as a bank transfer. If the payment fails, create a new Checkout Session for the next attempt.
Your customer starts a one-click payment in Checkout. To charge a saved card without your customer present, use an invoice or a Payment Intent. This applies to subscriptions and usage-based bills; see Set up a payment method for future charges.
Test your integration
Use your test mode API Secret Key to try the full flow without moving any money:- Save a test card for a
Customerwith asetupCheckout Session, using the test cards in Set up a payment method for future charges. - Create a
paymentCheckout Session for the sameCustomer, withoutpayment_method, and check that Checkout lists the saved card. - Create another session with the saved card in
payment_method, and check that Checkout opens on the card confirmation. - Complete the payment and check that you receive
checkout_session.finishedandpayment_intent.succeeded.