Onerway
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

apiKey
API key assigned for Embedded Finance API access.
Example:
Content-Type
Request content type.
Example:
rechargeId
Recharge ID for which a refund is requested.
Example:
reasonForReturn
Reason for the refund request.
Example:
Allowed values
AccountCannotBeIdentified
The account cannot be identified.
Other
Another reason.

Request example

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

respCode
Response code returned by Onerway. 20000 indicates that the request succeeded.
Example:
respMsg
Human-readable response message.
Example:
data
Response data; null in the success example.

Response example

{
  "respCode": "20000",
  "respMsg": "Success",
  "data": null
}
No error responses are documented for this endpoint.