Custom 3DS
If you are using Splitit as a white-label solution for creating and completing installment plans, you may need to have Splitit handle 3DS. Specifically, you will receive a 641 error when completing an installment plan with the Create API. To process 3DS at this point, you will need to call a function from the Flex Fields library.
- To enable the callback mode from Splitit, make sure that you have a PaymentWizardData object with
Is3dSecureInPopup: true
in your Create call.)
- 1.Begin by importing the Flex Fields library into your code (substitute "production" for "sandbox" if relevant):
<script src="https://flexfields.sandbox.splitit.com/v2.0/splitit.flex-fields.sdk.js"></script>
Upon receiving the 641 error, call
completeCheckout()
from the Flex Fields library, passing in the PublicToken
you received from the Initiate call that initialized the plan:Splitit.FlexFields.completeCheckout({
publicToken: publicToken,
skipCallingCreate: true,
}).onSuccess(function (data) {
console.log(data);
alert('Payment was successful! Check the console for the result.');
}).onError(function (err) {
console.log(err);
alert('Error. Check console for details.');
});
2. Note that you can add a custom logo to your 3DS form by adding the line
custom3dsLogoUrl: "{CUSTOM URL}"
to your JavaScript (i.e., under skipCallingCreate: true
, in the code above).Last modified 7mo ago