Create Payment Link

.You can also initiate payment through this API which allows users to generate a secure, link for payments. This is particularly useful for e-commerce platforms, service providers, and any business that needs to facilitate payments with a full integration of a payment gateway.

Endpoint

{{baseurl}}/payments/create/link

This is a POST request.

You will also need to add the following parameters to each request.

FieldData TypeDescription
amount

number >= 1

amount * 100

Required.This is the amount of money you want to transfer or process. It must be a whole number greater than or equal to 1. The amount is then multiplied by 100.
currencyobject (CurrencyDto)Required. This is the currency of the transfer.
nameStringRequired. Name of the individual initiating the payment.
acceptOtherCurrenciesboolean: Default falseThis determines if the transaction can accept other currencies besides the specified one. Defaults to false.
callbackUrlStringThis is a URL where Payshiga can send a notification after processing the transaction
channelsArray of objectsThis is an array that defines the specific channels you want for the transaction
descriptionStringThis is a description of the transaction.
logoUrlObjectThis is the URL for the logo of the currency.
referenceStringThis is a unique reference number that you can assign for tracking purposes.

You can create payment links in the following curencies using their currency codes:

  • Cameroon
  • Equatorial Guinea
  • Gabon
  • Chad
  • Ivory coast
  • Egypt
  • Ghana
  • Kenya
  • Morocco
  • Nigeria
  • Rwanda
  • Senegal
  • South Africa
  • Tanzania
  • Uganda

The request payload should look like this.

{
  "description": "string",
  "reference": "string",
  "amount": 1,
  "currency": {
    "value": "NGN",
    "type": "FIXED"
  },
  "channels": [
    "BANK_TRANSFER",
    "CARD",
    "SHIGA_QR",
    "BANK"
  ],
  "name": "string",
  "callbackUrl": "string",
  "logoUrl": "string",
  "acceptOtherCurrencies": false
}

If you’ve gotten everything right, you should get this response

{
  "success": true,
  "statusCode": 201,
  "message": "Payment link created successfully",
  "url": "https://payshiga.com"
}