🏬More operations with Payment Links

Common APIs to interact with payment links

Once the payment links are created via dashboard, APIs or using one of our SDKs, you can interact with them using below APIs

You can use this API to get all the available payment links

GET https://api.lazerpay.engineering/api/v1/payment_links

{
    "status": "success",
    "statusCode": 200,
    "data": [
        {
            "id": "878d2da5-9b75-4843-a395-1d7ee6fcaae4",
            "createdAt": "2022-07-22T09:55:20.982Z",
            "updatedAt": "2022-07-22T09:57:19.482Z",
            "type": "donation",
            "title": "Yolo! Again Oh",
            "description": "I need me a jeep.",
            "network": "testnet",
            "slug": "UYZFUvsGF5M",
            "isActive": false,
            "webSiteUrl": "https://noel"
        }
    ],
    "count": 1,
    "currentPage": 1,
    "nextPage": null,
    "prevPage": null,
    "lastPage": 1
}

Get by slug

You can use this API to get details about a specific payment links using it's slug

GET https://api.lazerpay.engineering/api/v1/payment_links/pay/:slug

Path Parameters

NameTypeDescription

/pay/:slug*

String

{
    "data": {
        "charge": {
            "amount": "84000",
            "currency": "NGN"
        },
        "cart": {},
        "params": [
            "email",
            "address",
            "phone",
            "promo"
        ],
        "businessName": "Oke & Daughters",
        "title": "Payment for Merchandise With Cash",
        "description": "Pay for some nice guccie bags",
        "id": "ac57979f-7494-467a-95d5-ff01e17b856d",
        "type": "standard",
        "isActive": false,
        "slug": "EhnESXox",
        "url": "https://lazerpay.finance/pay/EhnESXox",
        "network": "testnet",
        "action": {
            "successMessage": "thank you budd!",
            "redirectUrl": "https://local.me",
            "redirect": true,
            "showConfirmationPage": false
        },
        "createdAt": "2022-09-05T15:51:10.018Z"
    },
    "message": "Payment link found",
    "status": "success",
    "statusCode": 200
}

Get by Id

You can use this API to get details about a specific payment links using it's unique ID

GET https://api.lazerpay.engineering/api/v1/payment_links/pay/:linkId

Path Parameters

NameTypeDescription

/pay/:linkId*

String

link ID

{
    "data": {
        "linkType": "standard",
        "isActive": true,
        "network": "testnet",
        "slug": "KiSguJ-8",
        "id": "93c0164c-3a36-42ab-bd82-b5c1e67811a7",
        "title": "Payment for Merchandise",
        "description": "Pay for some nice guccie bags",
        "businessId": "d94a5c08-151c-410f-8c75-c1f637253599",
        "options": {
            "id": "4be5ca58-ca98-4a61-ae57-a5d4e1b152b0",
            "collectPhone": false,
            "allowPromo": false,
            "collectAddress": false,
            "createdAt": "2022-07-17T16:28:01.348Z",
            "updatedAt": "2022-07-17T16:28:01.348Z"
        },
        "action": {
            "successMessage": "thank you budd!",
            "redirectUrl": "https://local.nb",
            "redirect": true,
            "confirmationPage": false
        },
        "charge": {},
        "cart": {
            "id": "92dcb746-b118-48a6-a088-e79872edad9f",
            "createdAt": "2022-07-17T16:28:01.348Z",
            "updatedAt": "2022-07-17T16:28:01.348Z",
            "items": [
                {
                    "id": 1,
                    "quantity": 10,
                    "quantityAdjustable": false,
                    "price": {
                        "currency": "NGN",
                        "amount": "500000.00",
                        "id": "4f6a2f7f-3400-4f47-8973-fa8bb2f5d483"
                    },
                    "product": {
                        "id": "eb12ee7b-8f11-42f0-be2b-1cca619ec785",
                        "name": "Guccie Bag",
                        "description": "Bag of Guccie Stuff",
                        "coverPhoto": "https://res.cloudinary.com/lazer/image/upload/v1654710452/product_img_yfgeb6.png"
                    }
                }
            ]
        },
        "createdAt": "2022-07-17T16:28:01.348Z",
        "updatedAt": "2022-07-17T16:28:01.348Z"
    },
    "message": "Payment link found",
    "status": "success",
    "statusCode": 200
}

You can use this API to activate or deactive an existing payment link.

Please note you won't be able to receive digital payments if a payment link is toggled off or deactivated

PUT https://api.lazerpay.engineering/api/v1/payment_links/:link/status

Path Parameters

NameTypeDescription

/:link/status*

String

Set status of link as path parameter

ex : ac57979f-7494-467a-95d5-ff01e17b856d

{
    "status": "success",
    "statusCode": 200,
    "message": "Payment link status updated successfully"
}

Last updated