Payment Link API

Collect payments from your customers using payment link.

Summary

The Payment Link API allows merchants to generate payment links for their sub-merchants to easily collect payments. Follow these steps to integrate:

  1. Generate a Bearer Token

  2. Create a Payment Link

  3. Share the Payment Link

  4. Monitor Payment Status

  5. Fetch payment link transactions via paylinkId

Before you begin!

Integration steps

Generate a Bearer Token

Obtain a token by following the authentication guide here. Use this token as your Bearer token in subsequent API calls.

POST - {{env_url}}/merchant/api/v1/paylink/create

This api generates a payment link that can be given to your customers to make payments.

NB: No need for an encryption of the plain json payload.

Headers

Name
Value

Authorization

Bearer {{token}}

x-auth-token

{{MERCHANT PUBLIC KEY}}

Request Body

Name
Type
Description

name*

String

Sub-Merchant Name

subMerchantId*

String

Sub-Merchant Identification

description*

String

Intending product or service.

currency*

String

NGN

amount*

Decimal

Amount to accept for the

product or service.

See an example of the plain json payload to send.

Response

Distribute the generated payment link URL to your sub-merchants for them to receive payments. The link directs customers to a payment page (See sample of the page below).

Paylink page for the customer to fill and click Pay with klasha button to proceed.

Monitor Payment Status

We would send payment status updates to your configured webhook URL. Monitor this to track payment outcomes. See webhook details here.

GET {{env_url}}/nucleus/paymentLinkTransaction/id/{{paylinkId}}

Make a GET request to fetch payment link transactions via paylinkId, including necessary headers like Authorization (Bearer token) and x-auth-token (Merchant public key).

You’d need to pass, as header the x-auth-token. This can be obtained from your merchant dashboard → Settings → Generate API keys → Merchant public key.

Headers

Name
Value

Authorization

Bearer {{token}}

x-auth-token

{{MERCHANT PUBLIC KEY}}

Response Body

Last updated