Lookup using Public Key

The RKFL provides a separate API to get the latest transaction status. This API accepts "merchant_id" and "transaction_id" as a request payload encrypted by the public RSA key and returns the response in JSON format.

// Object to encrypt
const toEncrypt = {
      merchantId: <merchant_id>, 
      transactionId: <transaction_id>
};

// Generate an encrypted request payload
export const data = async (toEncrypt, publicKey) => {
  const buffer = Buffer.from(toEncrypt);
  const encrypted = crypto.publicEncrypt(publicKey, buffer);
  return encrypted.toString('base64');
};

// merchantId – Unique identifier of the Merchant in the Rocketfuel, will get it from the portal. 
// transactionId – Unique identifier of the Transaction initiated by Shopper using RocketFuel, will get it from the Webhook/callback. 

POST /purchase/invoiceLookup

Headers

Name
Type
Description

Authorization*

String

"Bearer" + merchant access token

Request Body

Name
Type
Description

data*

String

Encrypted request payload

{
    "ok": true,
    "result": [
        {
            "id": <Transaction_id>,
            "status": <Status>,
            "meta": {
                "offerId": <Offer_id>
            },
            "amount": "1.598457239956444619",
            "receivedAmount": "0",
            "currency": "ETH"
        }
    ]
}

The webhook payload contains the following fields:

  1. id – RocketFuel transaction identifier.

  2. status – 10/0/1 etc. For more information on transaction statuses, click here to access the full guide.

  3. meta

    • offerId – Unique identifier assigned to the merchant.

  4. amount – The total price of the complete order.

  5. receivedAmount – The amount actually received by RocketFuel for the order.

  6. currency – The unit of currency used by the shopper to make the payment.

Last updated

Was this helpful?