POST
/
api
/
payment-link-api
/
create
curl --request POST \
  --url https://dev.users.niobi.co/api/payment-link-api/create \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "business_name": "ABC Ltd",
  "item_name": "xyz",
  "callback_url": "https://your-domain.com/niobi/result",
  "redirection_url": "https://your-domain.com/niobi/result",
  "logo": "image.png",
  "amount": "integer",
  "country_id": 123,
  "currency": "<string>",
  "correspondent": "<string>"
}'
{
  "success": "true",
  "message": "Verification token was sent to your mobile number. Kindly verify to proceed with payment",
  "data": {
    "MerchantRequestID": "1234-123456789-1",
    "CheckoutRequestID": "ab_XY_*******************",
    "ResponseCode": "0",
    "ResponseDescription": "Success. Request accepted for processing",
    "CustomerMessage": "Success. Request accepted for processing"
  }
}

Authorizations

Authorization
string
header
required

Enter token in format (Bearer <token>)

Body

application/json
Create payment link.
business_name
string
required

This is your business name. Example: ABC Ltd

Example:

"ABC Ltd"

item_name
string

This is the name of the item billed and to be paid. Example: xyz

Example:

"xyz"

callback_url
string

This is the callback url where you wish to receive the response. Example: https://your-domain.com/niobi/result

Example:

"https://your-domain.com/niobi/result"

redirection_url
string

This is the redirection url. Example: https://your-domain.com/niobi/result

Example:

"https://your-domain.com/niobi/result"

This is brand logo. Use the base64 format to upload a file of maximum 2MB size.

Example:

"image.png"

amount
integer

This is the amount of money to be paid by your customer. It should be in unit case i.e. *100 (e.g. Kes 10 should be input as Kes 1000)

Example:

"integer"

country_id
integer

This is integer value. You can get country list from Niobi get-countries API

currency
string

This is the currency in which the payment is to be made. Example: KES

correspondent
string

This is the correspondent to be used for the payment. Example: MTM_MOMO_UGA

Response

201
application/json
Ok.
success
boolean
Example:

"true"

message
string
Example:

"Verification token was sent to your mobile number. Kindly verify to proceed with payment"

data
object