Create a Buy Now Pay Later payment
Using your Secret Key, create aCheckout Session on your server with an amount, currency(only CLP for Installments Payments), success_url, cancel_url and payment_methods: ["instalments_payment"]:
Installments Payment Only Available via the Redirect Page FlowTo accept installments payments you must use the integration via a Redirect Page where you will redirect users to a Fintoc-hosted payment page.After completing the payment, they’ll be automatically redirected back to your site on the
success_url or cancel_url, based on the outcome of the payment.Response when creating a Checkout Session for a Installments Payment
After making the request, Fintoc will respond with the Checkout Session with the statuscreated including the redirect_urlyou will use to redirect your user to complete the payment:
Handle post-payments events
Once a Checkout Session finishes, you handle the payment result in your frontend and complete the payment in your backend. For your frontend you will use thesuccess_url and cancel_url , and for your backend you will use the events sent by webhooks.
Fintoc sends a checkout_session.finished event when the payment completes. Follow the webhook guide to receive these events and run actions, such as sending an order confirmation email to your customer, logging the sale in a database, or starting a shipping workflow.
You should handle the following events:
Test your integration
To simulate a successful or failed Buy Now Pay Later Payment, you can use one of the following RUT numbers during the payment process:
In test mode, the payment process does not include the PAC subscription step. So when accessing the
redirect_url, the steps will be:
- Input RUT number
- View and select an installment plan offer: In test mode, only one installment option will be available — a single payment of 103,103 CLP — regardless of the amount specified when creating the Checkout Session.
- Confirm mobile number via SMS code. In test mode you can input any mobile number to proceed, since you can use the following codes:
- Any code except 123456 to proceed to the next step.
- 123456 to simulate a failure at this step.
- Sign the credit contract: you will receive a code at the
customer_emailyou set when creating the Checkout Session. Use this code to proceed to a successful payment. - Payment successful: you will be redirected to the
success_urland receive thecheckout_session.finishedevent.
Checkout UX Guideline
To ensure a good experience and understanding for your users, add the Buy Now Pay Later button on your checkout using the images bellow depending on your configuration:Make sure the Buy Now, Pay Later option is hidden for amounts below the minimum.Since the minimum amount for installment payments is CLP 20,000, you should ensure that the Buy Now, Pay Later button is not displayed at checkout for orders below this threshold. This helps avoid a poor user experience and potential drop in conversion rates.