createPaymentLink static method

Future createPaymentLink({
  1. required String token,
  2. required String amount,
  3. required String customerEmail,
  4. required String narration,
})

Implementation

static Future<dynamic> createPaymentLink({
  required String token,
  required String amount,
  required String customerEmail,
  required String narration,
}) async {
  try {
    var response = await Fetcher.fetch(
      method: Method.post,
      path: '/root/api/v1/merchant-invoice/process/generate-payment-link',
      publicKey: token,
      payloads: {
        "amountInMinor": amount,
        "customerEmail": customerEmail,
        "details": narration,
      },
    );
    return response;
  } catch (e) {
    throw Exception(e);
  }
}