Zid Docs
Merchant APIPayment APIAppsThemes
Merchant APIPayment APIAppsThemes
Help Center
Slack
  1. Webhooks
  • Merchant Activation
  • Submitting
  • Gateway Error Codes
  • Webhooks
    • Link Merchant Event
      POST
    • Payment Paid Event
      POST
    • Refund Event
      POST
  • Payment
    • Embedded Payment
    • Execute Payment Request
      POST
    • Get payment status
      GET
    • Direct Payment
      POST
  • ApplePay
    • ApplePay Checkout
    • On Payment Authorized
    • Register ApplePay Domain
      POST
    • On Providing Merchant Validation
      POST
  • Refund
    • Request Refund
      POST
  1. Webhooks

Refund Event

POST
https://api.zid.sa//api/webhook/v1/thirdpartywebhook
Once a refund request is a success/failure then a webhook should be sent to ZidPay with refund status

Request

Header Params
Authorization
string 
optional
All secured endpoints require an Authorization header using Basic Authentication. The value should be the secret key provided to the payment provider during integration.
Example:
Authorization: Basic secret_key
Body Params application/json
Webhook payload to notify ZidPay of a refund status update.
type
string 
required
Type of the webhook event.
Example:
refund_status_changed
thirdPartyId
integer 
required
Unique ID assigned to the payment provider by ZidPay.
Example:
1
merchantId
string 
required
Merchant's ID on the provider side.
Example:
45cb5978-c6cd-4e34-bd93-de6bee9b3cae
data
object 
required
Refund details reported by the provider.
refundId
string <uuid>
required
Refund ID on the provider side.
Example:
9f4b5fa0-bd22-40e4-b3ad-e6742f37a102
refundReference
string <uuid>
required
Refund reference on the provider side.
Example:
f781d5fa-9e8d-49b5-92a2-37321d5c8c4f
refundStatus
enum<string> 
required
Status of the refund.
Allowed values:
refundedfailed
Example:
refunded
amount
integer 
required
Refunded amount.
Example:
5000
Example
{
    "type": "object",
    "example": {
        "type": "refund_status_changed",
        "thirdPartyId": 1,
        "merchantId": "45cb5978-c6cd-4e34-bd93-de6bee9b3cae",
        "data": {
            "refundId": "9f4b5fa0-bd22-40e4-b3ad-e6742f37a102",
            "refundReference": "f781d5fa-9e8d-49b5-92a2-37321d5c8c4f",
            "refundStatus": "refunded",
            "amount": 5000
        }
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.zid.sa//api/webhook/v1/thirdpartywebhook' \
--header 'Authorization: Authorization: Basic secret_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "object",
    "example": {
        "type": "refund_status_changed",
        "thirdPartyId": 1,
        "merchantId": "45cb5978-c6cd-4e34-bd93-de6bee9b3cae",
        "data": {
            "refundId": "9f4b5fa0-bd22-40e4-b3ad-e6742f37a102",
            "refundReference": "f781d5fa-9e8d-49b5-92a2-37321d5c8c4f",
            "refundStatus": "refunded",
            "amount": 5000
        }
    }
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2025-06-13 05:32:25
Previous
Payment Paid Event
Next
Payment
Built with