Create a Card Payment Request
POST /payments/card/request-payment
Description
Initiate a request for payment using a card, specifying details such as the user, amount, transaction category, and additional information.
Query Parameters
| Name | Type | Description |
|---|---|---|
| object* | object | (Required) An object representing the card payment details. |
Request Body
- Media Type:
application/json
| Name | Type | Description |
|---|---|---|
| userId* | string | (Required) Identifier for the user to be charged. |
| amount* | number | (Required) Amount of the payment request. |
| transactionCategory* | string | (Required) Category of the transaction, e.g., "Sales". |
| requestId* | string | (Required) Unique identifier for the payment request. |
| narration | string | (Optional) Additional information or description for the payment request. |
| accountId* | string | (Required) Identifier for the payer's account. |
Example
StartFragment
HTTP Status Code: 200 OK
Successful response with a JSON structure containing status information and optional data or error details.
Response Fields
| Field | Type | Description |
|---|---|---|
| status | boolean | Overall success or failure indicator (true for success, false for failure). |
| statusCode | integer | Numeric code representing the status of the response (0 for success). |
| message | string | Brief message providing additional context about the response. |
| data | object | Empty or contains relevant data depending on the operation. |
| errors | array | Array of error objects, each with a short and descriptive message. |
Example
<ApiResponse>
<status>true</status>
<statusCode>0</statusCode>
<message>string</message>
<data/>
<errors>
<error>
<message>string</message>
<descriptiveMessage>string</descriptiveMessage>
</error>
</errors>
</ApiResponse>
Method: POST
>http://20.87.230.105/platform/wallets/payments/card/request-payment
Headers
| Content-Type | Value |
|---|---|
| apiKey | {{apiKey}} |
Body (raw)
{
"userId": "user123",
"amount": 100,
"transactionCategory": "Sales",
"requestId": "payment_request_123",
"narration": "Payment for product purchase",
"accountId": "payer_account_456"
}
🔑 Authentication bearer
| Param | value | Type |
|---|---|---|
| token | {{accessCode}} | string |
LANGUAGE
CURL REQUEST
curl --request POST \
--url /payments/card/request-payment \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!