🧘‍♀️Donations Payment link

Manage donations payment links

Introduction

Donation payment links can be created for people to support a cause that they care about

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

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

Request Body

NameTypeDescription

action*

String

"action":

{

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

},

options*

String

"options":

{

"collect_phone": true,

"allow_promo": true,

"collect_address": true

},

description*

String

ex : "Donate here"

is_active*

boolean

true or false

title*

String

ex: "Payment for Merchandise With Cash"

social_links

String

"social_links":

{

"facebook":"fb.me/uche",

"instagram": "noelukwa",

"twitter" :"noelukwa"

},

cover_photo

String | URL

"https://random-cover-photo.jpeg"

website_url

String

"https://uche.com"

{
    "data": {
        "isActive": true,
        "id": "362e16ce-226b-4e58-92f9-3563b0aa04c0",
        "title": "red silver shit with cart",
        "description": "really really good payment stuff",
        "createdAt": "2022-09-05T15:59:00.799Z",
        "updatedAt": "2022-09-05T15:59:00.799Z",
        "type": "donation",
        "network": "testnet",
        "action": {
            "showConfirmationPage": false,
            "redirectUrl": "https://local.com/confirm",
            "redirect": false,
            "successMessage": "thank you budd!"
        },
        "slug": "zPHupwbJpsk3",
        "socialLinks": {
            "facebook": "fb.me/uche",
            "twitter": "noelukwa",
            "instagram": "noelukwa"
        },
        "businessId": "3dc8842d-fbdc-41a8-ad61-c023afc3a391",
        "options": {
            "collectPhone": true
        },
        "url": "https://lazerpay.finance/pay/zPHupwbJpsk3",
        "websiteUrl": "https://uche.com",
        "image": "https://random-cover-photo.jpeg",
        "sessions": []
    },
    "message": "Payment link created successfully",
    "status": "success",
    "statusCode": 201
}

Example : cURL

curl --location --request POST 'https://api.lazerpay.engineering/api/v1/payment_links/donation' \
--form 'title="Save Rhinos"' \
--form 'description="Help Save Rhinos"' \
--form 'action[redirect]="false"' \
--form 'action[redirect_url]="https://rhinos.com"' \
--form 'action[success_message]="true"' \
--form 'action[show_confirmation_page]="true"' \
--form 'options[collect_phone]="true"' \
--form 'social_links[facebook]="fb.me/uchenoel"' \
--form 'social_links[twitter]="noelukwa"' \
--form 'social_links[instagram]="noelukwa"' \
--form 'cover_photo=@"/Users/waywardgod/Downloads/kids.jpeg"' \
--form 'business_id="d94a5c08-151c-410f-8c75-c1f637253599"' \
--form 'website_url="https://noel.com"'

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

Request Body

NameTypeDescription

action*

String

"action":

{

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

},

options*

String

"options":

{

"collect_phone": true,

"allow_promo": true,

"collect_address": true

},

description*

String

ex : "Donate here"

is_active*

boolean

true or false

title*

String

ex: "Payment for Merchandise With Cash"

social_links

String

"social_links":

{

"facebook":"fb.me/uche",

"instagram": "noelukwa",

"twitter" :"noelukwa"

},

cover_photo

String | URL

"https://random-cover-photo.jpeg"

website_url

String

"https://uche.com"

id*

String

"362e16ce-226b-4e58-92f9-XXXX"

{
    "data": {
        "isActive": true,
        "id": "362e16ce-226b-4e58-92f9-3563b0aa04c0",
        "title": "red silver shit with cart",
        "description": "really really good payment stuff",
        "createdAt": "2022-09-05T15:59:00.799Z",
        "updatedAt": "2022-09-05T16:01:43.139Z",
        "type": "donation",
        "network": "testnet",
        "action": {
            "showConfirmationPage": false,
            "redirectUrl": "https://local.com/confirm",
            "redirect": false,
            "successMessage": "thank you budd!"
        },
        "slug": "zPHupwbJpsk3",
        "socialLinks": {
            "facebook": "fb.me/uche",
            "twitter": "noelukwa",
            "instagram": "noelukwa"
        },
        "businessId": "3dc8842d-fbdc-41a8-ad61-c023afc3a391",
        "options": {
            "collectPhone": true
        },
        "url": "https://lazerpay.finance/pay/zPHupwbJpsk3",
        "websiteUrl": "https://uche.com",
        "image": "https://random-cover-photo.jpeg",
        "sessions": []
    },
    "status": "success",
    "statusCode": 200
}

Example : NodeJs - Request

var request = require('request');

var options = {
  'method': 'PUT',
  'url': 'https://api.lazerpay.engineering/api/v1/payment_links/donation',
  'headers': {
  },
  body: '{\n    "is_active": true,\n    "description": "really really good payment stuff",\n    "options": {\n        "collect_phone": true,\n        "allow_promo": true,\n        "collect_address": true\n    },\n    "action": {\n        "redirect": false,\n        "redirect_url": "https://local.com/confirm",\n        "show_confirmation_page": false,\n        "success_message": "thank you budd!"\n    },\n    "social_links":{\n        "facebook":"fb.me/uche",\n        "instagram": "noelukwa",\n        "twitter" :"noelukwa"\n    },\n    "website_url":"https://uche.com",\n    "id": "362e16ce-226b-4e58-92f9-3563b0aa04c0"\n}'

};

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

Last updated