Sadad Postman Collection helps the technical to understand and test the API endpoints
![](https://files.readme.io/13878d0-Postman_software.png)
🔗 Collection Link
Merchants can find the Sadad Collection here.
Contains
This collection has some sample calls as the following
- Generate the refresh and access Tokens.
- Call add Invoice endpoint:
- Quick invoice without invoice items.
- Invoice with items.
Steps
- Generate a refresh token
- Get the access token using the refresh token.
- Call Insert invoice API endpoint.
Access Token Expiry
Ensure to generate a new access token before it expires.
- In the response of Insert invoice, you will receive the Sadad invoice ID. Use this id to call the API endpoint GetById
- 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.
- 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.
- In case of a failed payment, the response will have the failure reason sent by the bank gateway.