Pre-payment validation check
// The sample request payload that needs to encrypt
{
"clientId": "merchantid",
"assets": "Selected exchange currency",
"cart": "cart array",
"offerId": "Order_id",
"confirmation": "true",
"nativeAmount": "cart amount in usd"
}
// clientId: The RKFL merchant identifier
// assets: Selected exchange currency (BTC/ETH)
// cart: cart array [{},{}]
// offerId: merchant unique identifie
// confirmation: true/false, true if shopper accept term and condition
// nativeAmount: cart total amount in USD
// The key "data" should generate from the below way.
export const data = async (toEncrypt, publicKey) => {
const buffer = Buffer.from(toEncrypt);
const encrypted = crypto.publicEncrypt(publicKey, buffer);
return encrypted.toString('base64');
};Headers
Name
Type
Description
Request Body
Name
Type
Description
Last updated
Was this helpful?