Initiate Payment through Paylink
POST /payments/paylink/InvokePaymentRequired
Description
Initiate a payment using a Paylink for a specific user.
Request Body
- Media Type:
application/json
| Name | Type | Description |
|---|---|---|
| requestId* | string | (Required) Unique identifier for the Paylink request. |
| accountId* | string | (Required) Identifier for the user's account. |
| userId* | string | (Required) Identifier for the user initiating the Paylink payment. |
| customization* | object | (Optional) Customization options for the Paylink. |
| amount* | number | (Required) Amount to be paid using the Paylink. |
Customization Object:
| Name | Type | Description |
|---|---|---|
| logoUrl | string | (Optional) URL of the logo for customization. |
| title | string | (Optional) Title of the payment link. |
| description | string | (Optional) Description of the payment link. |
Example
Request Body
{
"requestId": "paylink_request_123",
"accountId": "user_account_456",
"userId": "user_id_789",
"customization": {
"logoUrl": "https://example.com/logo.png",
"title": "Payment via Paylink",
"description": "Click the link to proceed with the payment"
},
"amount": 100
}
Try it yourself
cURL
curl --location 'http://20.87.230.105/platform/wallets///payments/ussd/invokereference' \
--header 'apiKey: yourApiKey' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer yourAccessToken' \
--data '{
"requestId": "ussd_request_123",
"accountId": "user_account_456",
"userId": "user_id_789",
"amount": 100,
"bankCode": "bank_code_xyz"
}'
Success Response (200)
Returned when the USSD payment request is successfully initiated.
| Field | Type | Description |
|---|---|---|
| status | Boolean | Indicates the success of the USSD payment request. |
| statusCode | Integer | Numeric code representing the status of the response (e.g., 0 for success). |
| message | String | A message indicating the outcome of the operation. |
| data | Object | An empty object, as no additional data is returned in a successful response. |
| errors | Array | An array of objects providing details about any errors encountered during the request. |
Example:
{
"status": true,
"statusCode": 0,
"message": "USSD payment request initiated successfully",
"data": {},
"errors": []
}
Media Type
- application/json: The response is in JSON format.
Method: POST
>http://20.87.230.105/platform/wallets///payments/ussd/invokereference
Headers
| Content-Type | Value |
|---|---|
| apiKey | {{apiKey}} |
Body (raw)
{
"requestId": "ussd_request_123",
"accountId": "user_account_456",
"userId": "user_id_789",
"amount": 100,
"bankCode": "bank_code_xyz"
}
🔑 Authentication bearer
| Param | value | Type |
|---|---|---|
| token | {{accessCode}} | string |
LANGUAGE
CURL REQUEST
curl --request POST \
--url /payments/paylink/InvokePaymentRequired \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!