API Reference

Postman Collection

📘

Sadad Postman Collection helps the technical to understand and test the API endpoints

🔗 Collection Link

Merchants can find the Sadad Collection here.

Contains

This collection has some sample calls as the following

  1. Generate the refresh and access Tokens.
  2. Call add Invoice endpoint:
  • Quick invoice without invoice items.
  • Invoice with items.

Steps

  1. Generate a refresh token
  2. Get the access token using the refresh token.
  3. Call Insert invoice API endpoint.

❗️

Access Token Expiry

Ensure to generate a new access token before it expires.

  1. In the response of Insert invoice, you will receive the Sadad invoice ID. Use this id to call the API endpoint GetById
  2. In response of the last call GetById, you will find a key value. Use this KEY value to redirect the customer to pay using below URL

For sandbox: https://sandbox.sadadpay.net/pay/{KEY}

For production: https://sadadpay.net/pay/{KEY}

🚧

In the Sadad profile under API section, merchant can add the Success URL/Fail URL for the application.

  1. After the customer pays, he will be redirected back to the store. You should do another call to the API endpoint GetByIdto verify the invoice status. If the status is set as Paid, the response will show the transaction details.
  2. In case of a failed payment, the response will have the failure reason sent by the bank gateway.