The Cake Capital Checkout library provides convenient way to collect payments from your customers by providing built in checkout page, with very easy and minimal code implementation.
Install the package with:
npm i cake-capital-checkout
# or
npm install cake-capital-checkout
const cakeCapitalCheckout = require("cake-capital-checkout");
YOUR_DOMAIN = "https://..........";
var sessionUrl = await cakeCapitalCheckout.createSession({
token: YOUR_MERCHANT_TOKEN,
amount: 50.99,
order_id: "dd_98765redfgy7........", // your unique order id
cancel_url: YOUR_DOMAIN + "/cancel",
success_url: YOUR_DOMAIN + "/success",
});
redirect(sessionUrl);
Token can be found in your Cake Capital Portal account.