Search
⌃K
🥈

Verify Payments

Verify transactions after payments using Lazerpay's verify api
Transactions are being verified using the Verify Payments endpoint from your server using your transaction reference or with the address property whose value is the payment address returned from the initialise payment function.

Verify Payment API

To verify transactions using the Lazerpay endpoint, you will make a get request to the verify transaction endpoint from your server using your transaction reference or with the address property.
Here's a code sample for verifying transactions:
get
https://api.lazerpay.engineering/api/v1/transaction/verify/:address_or_reference

Important Note from the verification response

  1. 1.
    The actualAmount key is the amount that you intended to charge the customer in crypto.
  2. 2.
    The amountPaid key is the crypto amount that is being paid to the merchant. It is usually in the coins that we support
  3. 3.
    The amountPaidFiat is the fiat value of the crypto amount being paid to the merchant
  4. 4.
    The fiatAmount is the fiat value of the amount that you intended to charge the customer. This is usually in the merchant's local currency.
The amountReceivedFiat and amountReceived values is the amountPaidFiat plus Lazerpay fees and the AmountPaid plus Lazerpay fees respectively.

From Official JS SDK

With the JS SDK, you have access to the confirmPayment object which is used to verify any payment in the Lazerpay platform.
const LazerPay = require('lazerpay-node-sdk');
const lazerpay = new LazerPay(LAZER_PUBLIC_KEY, LAZER_SECRET_KEY);
const confirm_tx = async () => {
try {
const payload = {
identifier: 'address generated or the reference generated by you from initializing payment',
};
const response = await lazerpay.Payment.confirmPayment(payload);
console.log(response);
} catch (error) {
console.log(error);
}
};
If you offer digital value like airtime, wallet top-up, digital credit, etc, always confirm that you have not already processed the value for that transaction to avoid double fulfillments, especially, if you also use webhooks.