Skip to main content

Initiate Refund Card Payment

POST /payments/card/refund

Description

Initiate a refund for a payment made via a card, specifying the amount to be refunded, transaction ID, and request ID.

Request Body
  • Media Type: application/json
NameTypeDescription
amount*number(Required) Amount to be refunded.
tnxId*string(Required) Transaction ID of the original payment.
requestId*string(Required) Unique identifier for the refund request.

Example

Request Body (JSON)
{
"amount": 50.25,
"tnxId": "transaction_id_123",
"requestId": "refund_request_456"
}

Responses

200 - OK

  • Media Type: application/json

The response indicates that the refund initiation was successful.

{
"status": true,
"statusCode": 0,
"message": "Refund initiated successfully",
"data": {
"refundRequestId": "refund_request_456",
"amountRefunded": 50.25,
"status": "Pending"
},
"errors": []
}

400 - Bad Request

  • Media Type: application/json

The response indicates that the refund initiation failed due to a bad request.

{
"status": false,
"statusCode": 400,
"message": "Bad Request",
"data": null,
"errors": [
{
"message": "Invalid refund request data",
"descriptiveMessage": "The provided refund request data is not valid."
}
]
}

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/refund \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!