Payment Link
STAGING_URL: https://switchapi3.azurewebsites.net
LIVE_URL: https://switchapi.azurewebsites.net
Get Payment-Link Details
GET
https://switchapi3.azurewebsites.net/pay/:slug
This endpoint generates a payment link for a user.
Path Parameters
slug
string
The user's switch_id.
Query Parameters
amount_kobo
string
The amount in kobo
Headers
SWI-CID
string
Client ID
{
"message": "Payment details retrieved successfully",
"data": {
"switch_id": 100111,
"first_name": "Beyonce",
"last_name": "Knowles",
"image_selfie_url": null,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd2l0Y2hfaWQiOjEwMDExMSwiY29udGV4dCI6InBheW1lbnRfbGluayIsImlhdCI6MTU4MjU3NDg3OCwiZXhwIjoxNTgyNTc1MTc4fQ.pd5mWR0fKmuhO9x0Ge7NWz-4dDMscRuwZcdFLzbEifQ",
"amount": "100000"
}
}
Request payment
POST
https://switchapi3.azurewebsites.net/pay/request_payment
This is an endpoint to request payment by sending the link to the recipient's email.
Headers
SWI-CID
string
Client ID
SWI-CS
string
Payload checksum
Authorization
string
Format is Bearer token
Request Body
amount_kobo
string
Amount to be paid in kobo.
recipient
string
Email address of the recipient.
{
"message": "Payment request sent successfully"
}
Pay via Payment Link
POST
https://switchapi3.azurewebsites.net/pay/make_payment
This endpoint initiates payment into a switch user's wallet or account (depending on if the user is verified or not).
Headers
SWI-CID
string
Client ID
SWI-CS
string
Payload checksum
Request Body
token
string
Payment link token
name
string
Name of the payer
string
Email of the payer
amount_kobo
string
Amount to be paid
reference
string
Payment reference
currency
string
Currency code of payment. Defaults to NGN
{
"message":"Wallet funded successfully"
}
Last updated
Was this helpful?