Payment Link

STAGING_URL: https://switchapi3.azurewebsites.net
LIVE_URL: https://switchapi.azurewebsites.net

GET https://switchapi3.azurewebsites.net/pay/:slug

This endpoint generates a payment link for a user.

Path Parameters

NameTypeDescription

slug

string

The user's switch_id.

Query Parameters

NameTypeDescription

amount_kobo

string

The amount in kobo

Headers

NameTypeDescription

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

NameTypeDescription

SWI-CID

string

Client ID

SWI-CS

string

Payload checksum

Authorization

string

Format is Bearer token

Request Body

NameTypeDescription

amount_kobo

string

Amount to be paid in kobo.

recipient

string

Email address of the recipient.

{
  "message": "Payment request sent successfully"
}

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

NameTypeDescription

SWI-CID

string

Client ID

SWI-CS

string

Payload checksum

Request Body

NameTypeDescription

token

string

Payment link token

name

string

Name of the payer

email

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