New to our DevPortal 🤔
STEP 1: (Embark towards glory 🚀) Routing to your install URL
Purpose:
Endpoint:
https://stg.retm.sa/integrations/authorized?client_id={application_client_id}
https://retm.sa/integrations/authorized?client_id={application_client_id}
Request Parameters:
INFO
https://retm.sa/integrations/authorized?client_id={application_client_id}&token=12345&status=1
Additional Information:
STEP 2: (Your cooking is almost done 🍽️) Granting access
Purpose:
Actions:
Success Endpoint:
https://{your-success-end-point}
Request Body:
{
"code": "string", // Authorization code related to the merchant
"business_id": "string", // Merchant's business ID
"data": { // Optional parameters sent in STEP 1
// ...
}
}
Response Body (OPTIONAL):
{
"token": "string", // it is used by RETM to push requests to your webhooks as Bearer token in Authorization header.
"url": "string" // a URL for settings of Retm App in your platform if exists, we will attach the token in this url as token query parameter if you want to further authorize the merchant
}
Additional Information:
STEP 3: (Your app is ready 🥳), Making the Request for Access Token
Purpose:
Endpoint:
https://stg.retm.sa/api/oAuth/token
https://{business_id}.retm.sa/api/oAuth/token
Method:
POST
Request Body:
{
"code": "YOUR_AUTHORIZATION_CODE",
"grant_type": "authorization_code",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}
Response:
{
"access_token": "YOUR_ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "YOUR_REFRESH_TOKEN"
}
Additional Notes:
business_id
as a subdomain for future API requests.Modified at 2025-05-11 13:47:58