Address grants#
pickAddress() shares one address for one order. With address grants the user lets a specific business (bound to your app) see a saved address for future orders, and can revoke it any time from Settings › Privacy › «Shared addresses».
const r = await app.requestAddressGrant({ providerExternalId: "store-1", addressId, purpose: "توصيل الطلبات" });
// { granted: true, addressId } — scope addresses.grant.business (asked every time)
Server side:
const addresses = await platform.grantedAddresses(businessId, sub); // only active grants for your app
A revocation arrives as platform.consent.revoked.v1 with { kind: "address_grant", businessId, sub }: delete your copy within 24 hours.
Business data#
| Method | Scope (server, needs approval) | Returns |
|---|---|---|
platform.invoiceTemplate(businessId) | business.invoice_template.read | the business's default invoice design, so your invoices match its chat invoices |
platform.customerStanding(businessId, sub) | business.customers.read | { tier: newcomer…vip, deals, spentMinor, currency } for tier discounts |
The business must have an active binding with your app. Transactions you publish with ownerBusinessId link the buyer to that business's customer list automatically.