Payment Pages

Create Page

POST https://api.lahza.io/page

Create a payment page on your integration

Headers

NameTypeDescription

authorization*

String

Set value to Bearer SECRET_KEY

content-type*

String

Set value to application/json

Request Body

NameTypeDescription

name*

String

Name of page

redirect_url

String

If you would like Lahza to redirect someplace upon successful payment, specify the URL here.

metadata

object

Extra data to configure the payment page including, logo image

slug

String

URL slug you would like to be associated with this page. Page will be accessible at https://pay.lahza.iom/[slug]

amount

String

Amount should be in agora if currency is ILS, qirsh, if currency is JOD, and cents, if currency is USD

description

String

A description for this page

custom_fields

array

If you would like to accept custom fields, specify them here.

{
  "status": true,
  "message": "Page created",
  "data": {
    "name": "Testing page",
    "description": "This is the description",
    "domain": "live",
    "slug": "jwirRT64W",
    "currency": "ILS",
    "active": true,
    "id": 18,
    "createdAt": "2023-02-30T01:49:57.514Z",
    "updatedAt": "2023-02-30T01:49:57.514Z"
  }
}

List Pages

GET https://api.lahza.io/page

List payment pages available on your integration.

Query Parameters

NameTypeDescription

perPage

integer

Specify how many records you want to retrieve per page. If not specify we use a default value of 50.

page

integer

Specify exactly what page you want to retrieve. If not specify we use a default value of 1.

to

datetime

A timestamp at which to stop listing page e.g. 2023-09-24T00:00:05.000Z, 2023-09-21

from

datetime

A timestamp from which to start listing page e.g. 2023-09-24T00:00:05.000Z, 2023-09-21

Headers

NameTypeDescription

authorization*

String

Set value to Bearer SECRET_KEY

{
  "status": true,
  "message": "Pages retrieved",
  "data": [
    {
      "domain": "test",
      "name": "Donation Page",
      "description": null,
      "amount": null,
      "currency": "NGN",
      "slug": "kdjrWH46J",
      "custom_fields": null,
      "redirect_url": null,
      "active": true,
      "id": 2223,
      "createdAt": "2016-10-01T10:59:11.000Z",
      "updatedAt": "2016-10-01T10:59:11.000Z"
    },
    {
      "domain": "test",
      "name": "Name of the page",
      "description": "description",
      "amount": 10000,
      "currency": "ILS",
      "slug": "special-slug",
      "custom_fields": [
        {
          "display_name": "Speciality",
          "variable_name": "speciality"
        },
        {
          "display_name": "Age",
          "variable_name": "age"
        }
      ],
      "redirect_url": "http://example.com",
      "active": true,
      "id": 1807,
      "createdAt": "2023-11-09T19:18:37.000Z",
      "updatedAt": "2023-11-14T17:51:49.000Z"
    }
  ],
  "meta": {
    "total": 2,
    "skipped": 0,
    "perPage": "3",
    "page": 1,
    "pageCount": 1
  }
}

Fetch Page

GET https://api.lahza.io/page/:id_or_slug

Get details of a payment page on your integration.

Path Parameters

NameTypeDescription

id_or_slug*

String

The page ID or slug you want to fetch

Headers

NameTypeDescription

authorization*

String

Set value to Bearer SECRET_KEY

{
  "status": true,
  "message": "Page retrieved",
  "data": {
    "domain": "test",
    "name": "Test page",
    "description": "description of the page.",
    "amount": 10000,
    "currency": "ILS",
    "slug": "ji84Ju234J",
    "active": true,
    "id": 112,
    "createdAt": "2023-10-30T00:49:57.000Z",
    "updatedAt": "2023-10-30T00:49:57.000Z"
  }
}

Update Page

PUT https://api.lahza.io/page/:id_or_slug

Update a payment page details on your integration

Headers

NameTypeDescription

authorization*

String

Set value to Bearer SECRET_KEY

id_or_slug

String

Page ID or slug

content-type*

String

Set value to application/json

Request Body

NameTypeDescription

name*

String

Name of page

amount

integer

Amount should be in aghora if currency is ILS, qirsh, if currency is JOD, and cents, if currency is USD

description

String

A description for this page

active

boolean

Set to false to deactivate page url

{
  "status": true,
  "message": "Page updated",
  "data": {
    "domain": "test",
    "name": "Buttercup Brunch",
    "description": "Gather your friends for the ritual that is brunch",
    "amount": null,
    "currency": "NGN",
    "slug": "5nApBwZkvY",
    "active": true,
    "id": 18,
    "integration": 100032,
    "createdAt": "2016-03-30T00:49:57.000Z",
    "updatedAt": "2016-03-30T04:44:35.000Z"
  }
}

Check Slug Availability

GET https://api.lahza.io/page/check_slug_availability/:slug

Check the availability of a slug for a payment page.

Path Parameters

NameTypeDescription

slug

String

URL slug to be confirmed

Headers

NameTypeDescription

authorization*

String

Set value to Bearer SECRET_KEY

{
  "status": true,
  "message": "Page retrieved",
  "data": {
    "integration": 100032,
    "domain": "test",
    "name": "Offering collections",
    "description": "Give unto the Lord, and it shall be multiplied ten-fold to you.",
    "amount": null,
    "currency": "NGN",
    "slug": "5nApBwZkvY",
    "active": true,
    "id": 18,
    "createdAt": "2016-03-30T00:49:57.000Z",
    "updatedAt": "2016-03-30T00:49:57.000Z",
    "products": [
      {
        "product_id": 523,
        "name": "Product Four",
        "description": "Product Four Description",
        "product_code": "PROD_l9p81u9pkjqjunb",
        "page": 18,
        "price": 500000,
        "currency": "NGN",
        "quantity": 0,
        "type": "good",
        "features": null,
        "is_shippable": 0,
        "domain": "test",
        "integration": 343288,
        "active": 1,
        "in_stock": 1
      },
      {
        "product_id": 522,
        "name": "Product Five",
        "description": "Product Five Description",
        "product_code": "PROD_8ne9cxutagmtsyz",
        "page": 18,
        "price": 500000,
        "currency": "NGN",
        "quantity": 0,
        "type": "good",
        "features": null,
        "is_shippable": 0,
        "domain": "test",
        "integration": 343288,
        "active": 1,
        "in_stock": 0
      }
    ]
  }
}

Last updated