Skip to main content

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
NameTypeDescription
object*object(Required) An object representing the card payment details.
Request Body
  • Media Type: application/json
NameTypeDescription
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.
narrationstring(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

FieldTypeDescription
statusbooleanOverall success or failure indicator (true for success, false for failure).
statusCodeintegerNumeric code representing the status of the response (0 for success).
messagestringBrief message providing additional context about the response.
dataobjectEmpty or contains relevant data depending on the operation.
errorsarrayArray 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-TypeValue
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

ParamvalueType
token{{accessCode}}string

LANGUAGE

AUTHORIZATION

Bearer

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!