> ## Documentation Index
> Fetch the complete documentation index at: https://docs.niobi.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Payment Link v3

> The new version of the Create Payment Link API allows you to pass customer details -such as name, email, or phone number - so that the generated payment link is prefilled with this information.

<Note>
  Please make sure to generate a new `signature` whenever you are creating a new balance request.
</Note>

<Card title="Currency Country ID (Optional)">
  `currency_country_id` identifies the country of the payer (customer), based on the selected currency. It is used to support multi-country currency scenarios and ensures payments are routed correctly depending on the payer’s location.
  For backward compatibility, this field is optional; if omitted the system will infer the country from `currency` and `country_id` where possible.
</Card>

>

### List of Supported Countries

| Country Id | Country       | Country Code | Currency | Payment Method type                         | Required Fields       |
| ---------- | ------------- | ------------ | -------- | ------------------------------------------- | --------------------- |
| 1          | Kenya         | 254          | KES      | till number, pay bill, pesalink, send money | country\_id, currency |
| 2          | Benin         | 229          | XOF      | mtn                                         | country\_id, currency |
| 3          | Cote D'Ivoire | 225          | XOF      | mtn, Orange                                 | country\_id, currency |
| 4          | Cameroon      | 237          | XAF      | mtn, Orange                                 | country\_id, currency |
| 9          | Senegal       | 221          | XOF      | Orange, Free                                | country\_id, currency |
| 10         | Tanzania      | 255          | TZS      | Airtel, Halotel, Tigo                       | country\_id, currency |
| 11         | Uganda        | 256          | UGX      | mtn, Airtel                                 | country\_id, currency |
| 12         | Zambia        | 260          | ZMW      | Zamtel, mtn                                 | country\_id, currency |
| 13         | Sierra Leone  | 232          | SLE      | Orange                                      | country\_id, currency |
| 16         | Ghana         | 233          | GHS      | mtn, AT, Vodafone                           | country\_id, currency |
| 17         | Nigeria       | 234          | NGN      | bank                                        | country\_id, currency |

<Note>
  For Senegal Orange deposits, the end user receives an SMS with a shortcode after the deposit is initiated. They dial the shortcode, triggering a USSD prompt where they input their PIN to approve the transaction.
</Note>


## OpenAPI

````yaml post /api/v3/payment-link-api/create
openapi: 3.0.0
info:
  title: Niobi Application API
  description: Niobi List API
  version: 1.0.0
servers:
  - url: https://sandbox.users.niobi.co
    description: Live API Server
security: []
tags:
  - name: Niobi
    description: API Endpoints of Niobi
paths:
  /api/v3/payment-link-api/create:
    post:
      tags:
        - payment-link
      summary: Create Payment Link v3
      description: >-
        The new version of the Create Payment Link API allows you to pass
        customer details -such as name, email, or phone number - so that the
        generated payment link is prefilled with this information.
      operationId: 8c0c62aaa073c36980bba5b57d1518c1
      requestBody:
        description: Payload for creating a payment link for API
        required: true
        content:
          application/json:
            schema:
              required:
                - client_id
                - salt
                - sender
                - params
                - params.business_name
                - params.country_id
                - params.currency
                - params.amount
              properties:
                client_id:
                  description: >-
                    The Client id is your public key which is generated when you
                    are creating a new API integration from our app.
                  type: string
                  example: K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr
                salt:
                  description: >-
                    Salt is used for security purposes. This is a random string
                    and can be unique value for each request or always the same.
                  type: string
                  example: justrandomstring
                sender:
                  type: string
                  description: >-
                    The Sender is the title of the API Integration which was
                    created through our app. you can just copy this title and
                    use it whenever making a new signature
                  example: John.co
                timestamp:
                  type: integer
                  description: this is the current timestamp when the request is being made
                  example: 1709363033
                signature:
                  type: string
                  example: >-
                    2193d01d50d4bd5da234ac0e0add5d4ccb40907a1b1ab27a12d2c1d88a5d5807
                params:
                  properties:
                    business_name:
                      type: string
                      example: my business
                    item_name:
                      type: string
                      example: item name
                    callback_url:
                      type: string
                      format: uri
                      example: https://webhook.site/unique-id
                    redirection_url:
                      type: string
                      format: uri
                      example: https://webhook.site/unique-id
                    currency:
                      type: string
                      example: KES
                    amount:
                      type: string
                      example: '5000'
                    logo:
                      type: string
                      format: logo
                      example: >-
                        This is brand logo. Use the base64 format to upload a
                        file of maximum 2MB size.
                    country_id:
                      type: string
                      example: >-
                        This is integer value. You can get country id from
                        supported country table attached here.
                    currency_country_id:
                      type: string
                      example: >-
                        This is integer value which represent country user is
                        making deposit from and corresponds to the selected
                        currency. You can get country id from supported country
                        table attached here.
                    first_name:
                      type: string
                      example: KES
                    last_name:
                      type: string
                      example: KES
                    email:
                      type: string
                      example: KES
                    phone:
                      type: number
                      example: KES
                  type: object
              type: object
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Payment link created successfully.
                  data:
                    type: object
                type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Payment link was not created.
                type: object
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Entity integration record not found.
                type: object
      security:
        - apiKeyAuth: []
components: {}

````