POST
Apply for refund
Use this endpoint to request a refund for a transaction in a deposit notification webhook. Transactions with successful deposit matching do not support refunds. The refund result webhook notifies you of the refund result.
Request
apiKeyAPI key assigned for Embedded Finance API access.
Example:
replace_with_api_keyContent-TypeRequest content type.
Example:
application/jsonrechargeIdRecharge ID for which a refund is requested.
Example:
12345678reasonForReturnReason for the refund request.
Example:
AccountCannotBeIdentifiedAllowed values
AccountCannotBeIdentified- The account cannot be identified.
Other- Another reason.
curl -X POST 'https://sandbox-baas.onerway.com/embedded-finance/api/v2/refund/apply' \
-H 'apiKey: replace_with_api_key' \
-H 'Content-Type: application/json' \
--data-raw '{
"rechargeId": 12345678,
"reasonForReturn": "AccountCannotBeIdentified"
}'Response
respCodeResponse code returned by Onerway.
20000 indicates that the request succeeded.Example:
20000respMsgHuman-readable response message.
Example:
SuccessdataResponse data; null in the success example.
{
"respCode": "20000",
"respMsg": "Success",
"data": null
}No error responses are documented for this endpoint.