1) Register your app
Create a client app in DirhamClub and get your clientId and clientSecret. Configure allowed origins.
Everything technical for integrating DirhamClub into your web app: widget sessions, server-to-server wallet APIs, account linking flow, and full API docs.
Create a client app in DirhamClub and get your clientId and clientSecret. Configure allowed origins.
After widget auth, store returned dirhamUserId in your user model.
Generate widget session from backend, embed /widget/wallet, and use server APIs for debit/credit/check.
DirhamClub hosts wallet UI pages. Your app embeds them with short-lived session tokens.
<iframe
src="https://dirhamclub.example.com/widget/wallet?session=SESSION_TOKEN"
allow="payment *;"
></iframe>GET /api/server/wallet
GET /api/server/wallet/check-balance
POST /api/server/wallet/debitPOST /api/server/wallet/credit
Never expose clientSecret in frontend code.
Use widget sessions with short expiry and renew from backend as needed.
Verify event.origin before processing widget messages.