Welcome to Xendit’s latest documentation. For legacy content, access the previous documentation here or the previous API reference here.

Refund webhook notification

Prev Next
Post
/your_refund_webhook_url

Webhook notification that will be sent to your defined webhook url for updates to refund status.

Header parameters
x-callback-token
string

Your Xendit unique webhook token to verify the origin of the webhook. It is highly recommended for your integration to verify this value.

Body parameters

Refund status callback

{
  "refundSucceeded": {
    "value": {
      "event": "refund.succeeded",
      "business_id": "6094fa76c2fd53701b8e079c",
      "created": "2021-12-02T14:52:21.566Z",
      "data": {
        "event": "refund.succeeded",
        "business_id": "5f27a14a9bf05c73dd040bc8",
        "created": "2020-08-29T09:12:33.001Z",
        "data": {
          "id": "rfd-6f4a377d-a201-437f-9119-f8b00cbbe857",
          "payment_id": "ddpy-3cd658ae-25b9-4659-aa36-596ae41a809f",
          "invoice_id": null,
          "amount": 10000,
          "payment_method_type": "DIRECT_DEBIT",
          "channel_code": "BPI",
          "currency": "PHP",
          "status": "SUCCEEDED",
          "reason": "CANCELLATION",
          "reference_id": "b2756a1e-e6cd-4352-9a68-0483aa2b6a2",
          "failure_code": null,
          "refund_fee_amount": null,
          "created": "2020-08-30T09:12:33.001Z",
          "updated": "2020-08-30T09:12:33.001Z",
          "metadata": null
        }
      }
    }
  },
  "refundFailed": {
    "value": {
      "event": "refund.failed",
      "business_id": "6094fa76c2fd53701b8e079c",
      "created": "2021-12-02T14:52:21.566Z",
      "data": {
        "event": "refund.failed",
        "business_id": "5f27a14a9bf05c73dd040bc8",
        "created": "2020-08-29T09:12:33.001Z",
        "data": {
          "id": "rfd-fca8d8bc-497c-42a5-b16f-97825323502a",
          "payment_id": "ddpy-3cd658ae-25b9-4659-aa36-596ae41a809f",
          "invoice_id": null,
          "amount": 10000,
          "payment_method_type": "DIRECT_DEBIT",
          "channel_code": "BPI",
          "currency": "PHP",
          "status": "FAILED",
          "reason": "CANCELLATION",
          "reference_id": "b2756a1e-e6cd-4352-9a68-0483aa2b6a2",
          "failure_code": "DUPLICATE_ERROR",
          "refund_fee_amount": null,
          "created": "2020-08-30T09:12:33.001Z",
          "updated": "2020-08-30T09:12:33.001Z",
          "metadata": null
        }
      }
    }
  }
}
Expand All
object

Refund status callback for refund

event
string

Webhook event names for payment capture status updates.

Valid values[ "refund.succeeded", "refund.failed" ]
business_id
string

Xendit-generated identifier for the business that owns the transaction

Example5f27a14a9bf05c73dd040bc8
created
string (date-time)

Timestamp of webhook delivery attempt in ISO 8601 date-time format.

Example2021-12-31T23:59:59Z
data
object (Payments_API_RefundSchema)

Refund object

id
string

Xendit unique Refund ID generated as reference after creation of refund.

Examplerfd-69e77490-d2cc-4bf3-8319-e064e121db93
payment_request_id
string

Xendit unique Payment Request ID generated as reference after creation of payment request.

Examplepr-1102feb0-bb79-47ae-9d1e-e69394d3949c
payment_id
string

To be deprecated. Xendit unique Payment ID generated as reference for a payment.

Examplepy-1402feb0-bb79-47ae-9d1e-e69394d3949c
invoice_id
string

To be deprecated. Xendit unique Invoice ID generated as reference after creation of an invoice or payment link.

Example65fc7522ff846905c2fc1c8d
payment_method_type
string

To be deprecated. Type of the payment method used in the original payment.'

Valid values[ "CARD", "EWALLET", "DIRECT_DEBIT" ]
reference_id
string

A Reference ID from merchants to identify their request.

Min length1
Max length255
channel_code
string

Channel code used to select the payment method provider. Use routing payment channels mapping for full list of channel codes.

currency
string

ISO 4217 three-letter currency code for the payment.

Valid values[ "IDR", "PHP", "VND", "THB", "SGD", "MYR", "USD" ]
ExampleIDR
amount
number

The intended payment amount to be refunded to the end user.

Minimum0.0
Example10000
status
string

Status of the refund.

Valid values[ "SUCCEEDED", "FAILED", "PENDING", "CANCELLED" ]
reason
string

Status of the refund.

Valid values[ "FRAUDULENT", "DUPLICATE", "REQUESTED_BY_CUSTOMER", "CANCELLATION", "OTHERS" ]
failure_code
string

Reasons of the refund failure.

Valid values[ "ACCOUNT_ACCESS_BLOCKED", "ACCOUNT_NOT_FOUND", "DUPLICATE_ERROR", "INSUFFICIENT_BALANCE", "REFUND_FAILED" ]
refund_fee_amount
number

Fee for processing the refund

metadata
object (Payments_API_MerchantMetadata)

Key-value entries for your custom data. You can specify up to 50 keys, with key names up to 40 characters and values up to 500 characters. This is for your convenience. Xendit will not use this data for any processing.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
created
string (date-time)

ISO 8601 date-time format.

Example2021-12-31T23:59:59Z
updated
string (date-time)

ISO 8601 date-time format.

Example2021-12-31T23:59:59Z
Responses
200

OK