Implement Application
Once you have created your application via the partner dashboard, now it is the time to build it !


You can use any programming language (that support HTTP calls) of your own choice to build your application.
In order to get your app authenticated in any store, you will need to implement the oAuth2.0 standards, The OAuth 2.0 authorization framework is a protocol that allows a user to grant a third-party website or application access to the user's protected resources, without necessarily revealing their long-term credentials or even their identity.
More specially we implement Authorization Code Flow, Because regular web apps are server-side apps where the source code is not publicly exposed, they can use the Authorization Code Flow (defined in OAuth 2.0 RFC 6749, section 4.1), which exchanges an Authorization Code for a token. Your app must be server-side because during this exchange, you must also pass along your application's Client Secret, which must always be kept secure, and you will have to store it in your client.


You can use Javscript programming to build a comprehensive js application which can be injected or configured based on the events (GLOBAL, PURCHASE, ADD TO CART, REMOVE FROM CART) via the partner dashboard.
The browser knows when to trigger the events configured. The zid system provides customer info, product info, cart info to keep track of the order etc. based on the shared info the javascript application can provide solutions to the merhcant to ehance the experience for the customer.
public function redirect()
$queries = http_build_query([
'client_id' => 'your application clint id here ',
'redirect_uri' => 'http://client.test/oauth/callback',
'response_type' => 'code',
'scope' => ['third_customers_write','third_categories_write'],
return redirect('https://oauth.zid.sa' . '/oauth/authorize?' . $queries);
Copy link