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

Link Merchant Event

POST
https://api.zid.sa//api/webhook/v1/thirdpartywebhook
This event is used to link a merchant to the OpenAPIs through ZidPay, allowing them to start processing payments on their Zid store.
Authorization: No authentication required for this event (as it’s webhook-based and triggered by the provider).

Request

Body Params application/json
Payload for linking a merchant to ZidPay OpenAPIs.
type
string 
required
Type of the webhook event.
Example:
merchant_linked
thirdPartyId
integer 
required
Unique ID assigned to the payment provider by ZidPay.
Example:
1
merchantId
string 
required
Merchant's ID on the provider's side.
Example:
45cb5978-c6cd-4e34-bd93-de6bee9b3cae
data
object 
required
Contains store ID and the merchant’s API keys.
storeId
string 
required
Zid Store ID.
Example:
123
thirdPartyApiKeys
object 
required
Public and secret API keys for the merchant provided by the payment provider.
Example
{
    "type": "merchant_linked",
    "thirdPartyId": 1, // assigned to payment provider by ZidPay
    "merchantId": "45cb5978-c6cd-4e34-bd93-de6bee9b3cae"
    "data": {
        "storeId": "123",
        "thirdPartyApiKeys": {
            "Publishable_Key": "pk_test_9a6Z61CUnM6nX4bStnNnZLnrKrbj2QK6xxscScDe",
            "Secret_Key": "sk_test_aLdogZnphPpoqcka4Qf5hRPFdffGL4p8dwB1Scsa"
        }
    }
}

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 'Content-Type: application/json' \
--data-raw '{
    "type": "merchant_linked",
    "thirdPartyId": 1, // assigned to payment provider by ZidPay
    "merchantId": "45cb5978-c6cd-4e34-bd93-de6bee9b3cae"
    "data": {
        "storeId": "123",
        "thirdPartyApiKeys": {
            "Publishable_Key": "pk_test_9a6Z61CUnM6nX4bStnNnZLnrKrbj2QK6xxscScDe",
            "Secret_Key": "sk_test_aLdogZnphPpoqcka4Qf5hRPFdffGL4p8dwB1Scsa"
        }
    }
}'

Responses

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