v1

latestOpenAPI 3.0.02026-07-246335313.6 KB
Refund APIs

Create Refund

Create Refund for the transaction created on PortOne. Merchant can either create the full or partial refund. Few PSPs do not support refunds or partial refunds. Please refer PortOne docs for additional information. The response body contains the amount to refund and the array of all refunds performed.

post/api/refund/{portone_order_ref}

Path parameters

portone_order_refstring required

Headers

X-Portone-Client-Keystring
Authorizationstring

The Authorization header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>

Request body

amountnumber double required

The amount you want to refund (ignored if a refund of type 'full' is requested)

channelstring required

The payment channel key used to make the payment for the transaction

descriptionstring required

The description for the refund

environment'live' | 'sandbox' required

The environment of the transaction is either live OR sandbox

refund_type'full' | 'partial' required

The type of the refund indicates whether a full or partial refund is being requested. If the refund type is 'full', the 'amount' field is ignored

refund_reasonstring required

The reason for the refund

Example request

{
  "amount": 400,
  "channel": "OMISE",
  "description": "Some desc",
  "environment": "sandbox",
  "refund_type": "partial",
  "refund_reason": "some reason"
}

Response

Successful response

amountToRefundnumber double

The amount remaining to refund