Skip to main content

Refund

Initiate refunds via Merchant Portal#

  • Go to payment transactions page in Merchant portal to see transactions.
  • Choose the transaction you wish to initiate refund for, click on 3 dots to see refund option.
  • Click at it and fill required details like amount, note, description and all.
  • Submit the refund request and you can see all refund transactions against that order id.

Initiate Refund via APIs#

Create Refund#

POST /api/refund/createRefund/:orderId

Creates a new refund against given orderId and returns all refund.

Curl Request:

curl --location --request POST 'https://api.portone.cloud/api/refund/createRefund/1v2mgkg8X95vK7dxVtzzvD75W5w' \
--data-raw '{
"amount": 700000,
"channel": "MOMOPAY",
"description": "momo refund",
"refund_type": "partial",
"refund_reason": "customer request"
}'

Response:

{
"amountToRefund": 100000,
"refundDetails": [
{
"refund_date": "2021-07-08T23:58:05.190121+05:30",
"refund_id": "508e2ee9a010166",
"psp_refund_id": "2542509707",
"amount": 200000,
"currency": "usd",
"refund_status": "SUCCESS",
"refund_type": "partial",
"refund_reason": "customer request"
},
{
"refund_date": "2021-07-08T23:59:08.442882+05:30",
"refund_id": "508e30f1d010166",
"psp_refund_id": "2542509711",
"amount": 700000,
"currency": "usd",
"refund_status": "SUCCESS",
"refund_type": "partial",
"refund_reason": "customer request"
}
]
}

Get All Refunds#

GET /api/refund/getDataByTransaction/:orderId

Get all refund transactions against an orderId.

Curl Request:

curl --location --request GET 'https://api.portone.cloud/api/refund/getDataByTransaction/1v2mgkg8X95vK7dxVtzzvD75W5w'

Response:

{
"amountToRefund": 100000,
"refundDetails": [
{
"refund_date": "2021-07-08T23:58:05.190121+05:30",
"refund_id": "508e2ee9a010166",
"psp_refund_id": "2542509707",
"amount": 200000,
"currency": "usd",
"refund_status": "SUCCESS",
"refund_type": "partial",
"refund_reason": "customer request"
},
{
"refund_date": "2021-07-08T23:59:08.442882+05:30",
"refund_id": "508e30f1d010166",
"psp_refund_id": "2542509711",
"amount": 700000,
"currency": "usd",
"refund_status": "SUCCESS",
"refund_type": "partial",
"refund_reason": "customer request"
}
]
}