💴Standard Payment link

Manage standard (non-donation) payment links

Introduction

Standard payment links are shareable links which you can use to receive digital payments from your customers worldwide

You can also create standard payment links using our APIs or our Libraries.

Use this end-point to create a new standard payment link

POST https://api.lazerpay.engineering/api/v1/payment_links/standard

Request Body

NameTypeDescription

cart*

String

"cart": [],

action*

String

"action":

{

"redirect": true, "redirect_url": "https://local.me", "show_confirmation_page": false, "success_message": "thank you budd!"

},

options*

String

ex: "options":

{

"collect_phone": true,

"allow_promo": true,

"collect_address": true

},

description*

String

ex: "Pay for some nice guccie bags"

title*

String

ex: "Payment for Merchandise With Cash"

charge*

String

"charge": { "amount": 84000, "currency": "NGN" }

{
    "data": {
        "charge": {},
        "cart": {
            "id": "fb77e4c7-f99f-4eb1-823a-ac63b6022dd4",
            "createdAt": "2022-09-05T15:45:40.111Z",
            "updatedAt": "2022-09-05T15:45:40.111Z",
            "items": [
                {
                    "id": 4,
                    "quantity": 20,
                    "quantityAdjustable": false,
                    "price": {
                        "currency": "NGN",
                        "amount": "500000",
                        "id": "d2f6f438-e866-4588-970e-d0e093b4c4ac"
                    },
                    "product": {
                        "id": "3a78a41a-305b-4061-aea5-8f0f1994fd00",
                        "name": "fake product shit mehhhn",
                        "description": "fake description",
                        "image": "https://my-fake-cover-image-update.jpeg"
                    }
                }
            ]
        },
        "type": "standard",
        "isActive": true,
        "network": "testnet",
        "slug": "BFxwoXCs",
        "id": "cf5e68a5-8125-42ec-bbf1-660fc52d0de3",
        "title": "Payment for Merchandise With Cash",
        "description": "Pay for some nice guccie bags",
        "businessId": "3dc8842d-fbdc-41a8-ad61-c023afc3a391",
        "options": {
            "collectAddress": true,
            "collectPhone": true,
            "allowPromotion": true
        },
        "action": {
            "successMessage": "thank you budd!",
            "redirectUrl": "https://local.me",
            "redirect": true,
            "showConfirmationPage": false
        },
        "url": "https://lazerpay.finance/pay/BFxwoXCs",
        "createdAt": "2022-09-05T15:45:40.111Z",
        "updatedAt": "2022-09-05T15:45:40.111Z"
    },
    "message": "Payment link created successfully",
    "status": "success",
    "statusCode": 201
}

Example : cURL

curl --location --request POST 'https://api.lazerpay.engineering/api/v1/payment_links' \
--data-raw '{
    "title" : "Payment for Merchandise",
    "description": "School bags",
    "options" :{
        "collect_phone": true,
        "allow_promo": true,
        "collect_address":true
    },
    "action": {
        "redirect": true,
        "redirect_url": "https://local.com",
        "show_confirmation_page": false,
        "success_message": "thank you budd!"
    },
    "cart": [
        {
            "price_id": "4f6a2f7f-3400-4f47-8973-fa8bb2f5d483",
            "quantity": 10,
            "quantity_adjustable": false
        }
    ]
}

Use this end-point to update an existing standard payment link

PUT https://api.lazerpay.engineering/api/v1/payment_links/standard

Request Body

NameTypeDescription

cart*

String

"cart": [],

action*

String

"action":

{

"redirect": true, "redirect_url": "https://local.me", "show_confirmation_page": false, "success_message": "thank you budd!"

},

options*

String

ex: "options":

{

"collect_phone": true,

"allow_promo": true,

"collect_address": true

},

description*

String

ex: "Pay for some nice guccie bags"

title*

String

ex: "Payment for Merchandise With Cash"

charge*

String

"charge": { "amount": 84000, "currency": "NGN" }

{
    "title" : "red silver shit",
    "description": "i said my silvers and shit ohh",
    "options" : {
        "collect_phone":true,
        "allow_promo": true,
        "collect_address":true
    },
    "action": {
        "redirect": true,
        "redirect_url": "https://local.com/confirm",
        "confirmation_page": true,
        "success_message": "thank you budd!"
    },
   "cart":
    [
          {
            "item_id": 154,
            "price_id": "510e0cc5-25af-4b78-9c6c-acdd27f6afcc",
            "quantity": 70,
            "quantity_adjustable": true
        }
    ],
    "business_id": "56b4d15d-955b-4186-b2fa-b967dc003926",
    "network": "{{network}}",
    "id": "eca28731-f634-4bac-8d72-127d6c9a9555"
}

Example : NodeJs - Request

var request = require('request');

var options = {
  'method': 'PUT',
  'url': 'https://api.lazerpay.engineering/api/v1/payment_links',
  'headers': {
  },
  body: '{\n    "title" : "red bag",\n    "description": "Red color bag",\n    "options" : {\n        "collect_phone":true,\n        "allow_promo": true,\n        "collect_address":true\n    },\n    "action": {\n        "redirect": true,\n        "redirect_url": "https://local.com/confirm",\n        "confirmation_page": true,\n        "success_message": "thank you budd!"\n    },\n   "cart":\n    [\n          {\n            "item_id": 154,\n            "price_id": "510e0cc5-25af-4b78-9c6c-acdd27f6afcc",\n            "quantity": 70,\n            "quantity_adjustable": true\n        }\n    ],\n    "business_id": "56b4d15d-955b-4186-b2fa-b967dc003926",\n    "network": "BSC_MAINNET",\n    "id": "eca28731-f634-4bac-8d72-127d6c9a9555"\n}'

};

request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Last updated