Initialise Payment Link

The Initialise Payment Link API allows you create hosted payment links for collecting customer payments.

Initialise Payment Link

To initialise a payment link, you’ll need to pass information such as customer details, items to be paid for, local currency, expiry date and a description.

For payment links where settlement happens in a foreign currency, Kyshi uses the best available rate at the time of creation to process the transaction.

Payment Link Details

FieldData TypeRequiredDescription
customer.emailstringYesCustomer email address
customer.firstNamestringNoCustomer first name
customer.lastNamestringNoCustomer last name
metadata[].namestringYesItem name
metadata[].amountintegerYesItem amount
metadata[].quantityintegerYesItem quantity
localCurrencystringYesCurrency the customer will be charged in (ISO 4217)
expiresAtstring (ISO date)YesExpiry date/time for the payment link
descriptionstringNoDescription for the payment

Create Payment Link

After collecting the required details, make a POST request to the initialise endpoint.

Note: Before making a request, your API key must be specified in the request header.

-H "x-api-key: your_secret_key"
{{host}}/v1/pay/integration

If the API call is successful, Kyshi returns the following response:

{
  "customer": {
    "email": "[email protected]",
    "firstName": "John",
    "lastName": "Doe"
  },
  "metadata": [
    {
      "name": "Book",
      "amount": 500,
      "quantity": 1
    }
  ],
  "localCurrency": "KES",
  "expiresAt": "2026-02-04T01:35:04Z",
  "description": "Book purchase"
}
{
  "status": true,
  "code": 201,
  "message": "Success",
  "data": {
    "reference": "KYSHI-1770114609126",
    "status": "PENDING",
    "paymentLink": {
      "id": "09930725-2fb3-473a-978d-e395de858c04",
      "code": "1lPxay18RMZWCMo",
      "url": "https://merchant.kyshi.co/payment/1lPxay18RMZWCMo",
      "expiresAt": "2026-02-04T01:35:04.000Z"
    },
    "amount": {
      "value": 74205,
      "currency": "KES"
    }
  }
}

What’s Next