Setting Up a Custom Checkout Component
You can enable this by calling addCheckout():
window.addEventListener('load', function () {
neodeos.init('sandbox', '<public key>')
.addCheckout('iframeContainer', '<amount>', '<3-letters currency code>', '<Checkout Provider Type>', '<Checkout Provider Id>', 'options', 'checkoutOptions' );
});
The options object supports the following optional properties:
taxAmount: the total applicable tax for the ordershippingAmount: the cost associated with shipping the orderdiscountAmount: any discount applied to the transactionorderItems: an array of individual products in the order, each containing:name: the product's display namequantity: the number of units being purchasedsku: the product's stock keeping unit identifierunitPrice: the price per single unit of the producttotalAmount: calculated total for this product line (unit price × quantity)
customer: object containing the customer's personal details:firstName: customer's given namelastName: customer's surnameemail: customer's email addressphoneNumber: customer's contact number
billingAddress: object representing the billing details:firstNamelastNameemailphoneNumberstreetAddressstreetAddress2citycountryregionpostalCodestate
checkoutOptions: an object used to pass metadata and configuration parameters relevant to the checkout flow