Skip to main content
POST
/
v3
/
refund
Initiate Refund
curl --request POST \
  --url https://service-sandbox.tazapay.com/v3/refund \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "payin": "chk_cirsp2sl4ar024j0akj0",
  "amount": 90000,
  "currency": "USD",
  "reason": "Customer Return",
  "webhook_url": "https://mystore.webhook.tazapay.refund/"
}
'
{
  "status": "<string>",
  "message": "<string>",
  "data": {
    "id": "<string>",
    "object": "<string>",
    "payin": "<string>",
    "amount": 0,
    "currency": "<string>",
    "customer_receives": {
      "currency": "<string>",
      "amount": 123
    },
    "payment_attempt": "<string>",
    "reason": "<string>",
    "metadata": {},
    "status": "<string>",
    "status_description": "<string>",
    "webhook_url": "<string>",
    "created_at": "<string>",
    "balance_transaction": "<string>",
    "reference_id": "<string>",
    "holding_currency": "<string>"
  }
}
Not all the payment methods support refunds!Depending on the payment method, Tazapay may not be able to process refunds. For more info, read our FAQ
  • For refunding a payment made by Promptpay, WeChat, Linepay, Shopeepay and Truemoney in Thailand, the customer’s phone number is required. You can choose to pass it to Tazapay in the customer_details field of the checkout API. You can also use the Update Customer endpoint to attach the phone number to an existing customer you want to refund.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
payin
string
required

ID of the payin for which refund is being created

amount
integer<int32>

Amount to be refunded. If omitted, the request will be registered for a refund of the full transaction amount. For decimal handling for various currencies, refer to the guide here

currency
string

Three-letter ISO currency code in lowercase

reason
string

Reason for the refund

payment_attempt
string

ID of the payment Attempt for which the refund is being created

metadata
string<json>

Set of key-value pairs to attach to the refund object

customer_details
object

Customer Details for the refund

Response

200

status
string

Indicates whether the refund creation request was successful.

message
string

Describes the outcome of the refund operation.

data
object

Contains detailed information about the created refund.