Public Developer Apps
Register as an app partner, configure versioned manifests and managed webhooks, and submit developer apps to the devhelp shop app catalogue.
Approved app partners can build, test, and distribute multi-store developer apps in the devhelp shop app catalogue (app.devhelp.pk/apps) or via direct unlisted install links.
Authentication
Multi-store developer apps authenticate to the Admin API using OAuth 2.1
Bearer tokens (PKCE S256, confidential client_secret_basic,
resource-bound to https://api.devhelp.pk) alongside app-managed Standard
Webhooks. For single-store private integrations, use Merchant Secret API Keys
(dh_sk_live_…) as described in Private Apps &
Integrations.
1. Become an app partner
- Apply on devhelp.pk/partners under the Technology & integration partners track.
- Once reviewed and approved by the devhelp team, your organization is enabled as an app partner and assigned a permanent publisher handle (2–24 lowercase letters, digits, or hyphens, starting with a letter, for example
acmeorpk-logistics). - Organization owners and admins can then open Developer Apps at
https://app.devhelp.pk/developer/appsto manage their partner profile (display name, website, support email, and optional security email) and create developer apps.
2. App handles and versioned manifests
Every developer app has a permanent, globally unique handle in the format <publisher>.<slug>:
publisher: Your organization's assigned publisher handle (^[a-z][a-z0-9-]{1,23}$).slug: Your app's lowercase identifier (^[a-z][a-z0-9-]{1,39}$), chosen at creation.
Because first-party devhelp apps use unprefixed slugs (such as resend or pos), the dotted <publisher>.<slug> namespace never collides with built-in apps.
Immutable versions
Developer apps separate the live manifest from work-in-progress edits using immutable app versions:
draft ──► in_review ──► published ──► superseded
▲ │
│ ▼
└── changes_requested- Editing an already-published app automatically creates the next numbered
draftversion (v2,v3, …). Existing merchant installations remain on the published manifest until the new version is approved and published. - You can withdraw an
in_reviewsubmission back todraftbefore a reviewer acts on it. - Draft developer apps are available for install testing inside stores owned by your own partner organization before public release.
- When a newly published version adds or changes requested scopes or webhook topics, existing installations are flagged with an available update and prompt the merchant to review and accept the new permissions before the changes apply.
3. Allowed scopes and merchant justifications
External developer apps may only request scopes from the EXTERNAL_APP_SCOPES allowlist:
| Resource | Allowed scopes |
|---|---|
| Store | store:read |
| Catalog | product:read, product:create, product:update, collection:read |
| Inventory | inventory:read, inventory:update |
| Orders | order:read, order:update |
| Fulfilment | fulfilment:read, fulfilment:create, fulfilment:update |
| Shipping | shipping:read, shipping:update |
| Customers | customer:read |
| Discounts | discount:read, discount:create, discount:update |
| Bookings | booking:read, booking:update |
| Content | content:read, content:update |
| Messages | message:read, message:update |
Sensitive administrative and destructive surfaces — including apiKey, billing, app:manage, team, website:code, store:update, customer:delete, and order:delete — are permanently excluded from external developer apps.
Per-scope justifications and data handling
- Scope justifications (
scopeJustifications): Every scope you request must include a plain-language merchant justification (up to 240 characters) explaining why your app needs that access. Merchants see these explanations on the app detail screen before installing or accepting a version update. - Data handling disclosure (
dataHandling): Declare whether your app stores customer PII (storesCustomerPii), how many days after uninstall merchant data is deleted (retentionDaysAfterUninstall,0–365), any sub-processors (subProcessors), and whether merchant data is never used across merchants (noCrossMerchantUse).
4. Managed webhooks and live testing
When a developer app declares a webhookUrl and subscribes topics, devhelp shop manages the store's webhook subscription automatically across the installation lifecycle:
- Install: Provisions a managed webhook endpoint on the store targeting your
webhookUrlfor the app's subscribed topics. - Version update: Syncs the endpoint's URL and topics when the merchant accepts an updated manifest version.
- Disable / Enable: Pauses delivery when a merchant disables the app and resumes when re-enabled.
- Uninstall: Delivers
app.uninstalledand deletes the managed webhook endpoint. - App suspension: Immediately pauses managed webhooks across all installed stores until the suspension is lifted.
Mandatory app.uninstalled topic
Every developer app that configures a webhook URL must subscribe to app.uninstalled. Use it to revoke stored credentials, stop background sync jobs for that storeId, and schedule customer data deletion within your declared retention window.
Verifying deliveries and handling app.ping
Deliveries follow the Standard Webhooks wire format (webhook-id, webhook-timestamp, webhook-signature). Before submitting for review, run the Test webhook action in Developer Apps to send a signed app.ping reachability check to your draft webhookUrl:
- Your endpoint must respond with a
2xxHTTP status within the 5-second SLA. - The tester reports reachability (
ok), HTTPstatusCode, round-triplatencyMs, and any error returned. - Note that
app.pingis a draft-only reachability ping signed with a one-time ephemeral test secret (it omitsstoreIdand is not part ofWEBHOOK_TOPICS), so return200 OKforapp.pingwithout running live store-event verification against it. - For live store deliveries (including
app.uninstalledand subscribed topics), always verify signatures against the raw request body using@devhelp/shop/webhooks(or any Standard Webhooks library) and the store's managed webhook signing secret:
import {
verifyWebhook,
WebhookVerificationError,
} from "@devhelp/shop/webhooks";
export async function POST(request: Request) {
const rawBody = await request.text();
try {
const event = await verifyWebhook({
body: rawBody,
headers: request.headers,
secret: process.env.DEVHELP_WEBHOOK_SECRET!,
});
if (event.type === "app.uninstalled") {
// Stop syncing for event.storeId and schedule data cleanup
}
return new Response("ok", { status: 200 });
} catch (error) {
if (error instanceof WebhookVerificationError) {
return new Response("Invalid signature", { status: 401 });
}
throw error;
}
}See Webhooks for retry and auto-disable behavior, and Webhook Topics Reference for every subscribable topic.
5. Credentials and zero-downtime secret rotation
Creating a developer app generates a unique clientId (dh_app_…) and a confidential clientSecret (dh_cs_…), and syncs your app as a confidential OAuth 2.1 client. The plaintext clientSecret is displayed once and stored only as a hash with a masked hint (secretHint).
To rotate credentials without downtime:
- Trigger Rotate secret in Developer Apps (
POST /admin/v1/developer/apps/{handle}/credentials/rotate). - Copy the new
clientSecret(shown once) and deploy it to your backend. - The previous secret remains valid at the OAuth token endpoint for a 24-hour overlap window (
previousSecretExpiresAt), after which only the new secret is accepted.
6. OAuth 2.1 runtime authentication
Developer apps access a merchant's store through standard OAuth 2.1 Authorization Code + PKCE (S256) with confidential client credentials.
Prerequisites
- Active store installation: The app must be installed and active on the merchant's store (
apps+store_apps). Published apps can be installed by any merchant; pre-publication draft and in-review apps can be installed inside stores owned by your own partner organization for sandbox testing. - Registered HTTPS redirect URIs: Add your callback URLs (
redirectUris, up to 10 public HTTPS URLs) in Developer Apps. Redirect URI matching is exact.
Step 1: Redirect the merchant to authorize
Send the merchant's browser to the authorization endpoint:
GET https://app.devhelp.pk/api/auth/oauth2/authorize| Parameter | Required | Value |
|---|---|---|
response_type | Yes | code |
client_id | Yes | Your developer app client ID (dh_app_…) |
redirect_uri | Yes | Exact HTTPS match for one of your configured redirectUris |
code_challenge | Yes | Base64url-encoded SHA-256 hash of your PKCE code_verifier |
code_challenge_method | Yes | S256 (PKCE is mandatory) |
resource | Yes | https://api.devhelp.pk |
scope | Yes | offline_access plus space-separated scopes from EXTERNAL_APP_SCOPES (e.g. offline_access order:read fulfilment:create) |
state | Yes | Opaque CSRF token verified when the callback returns |
https://app.devhelp.pk/api/auth/oauth2/authorize
?response_type=code
&client_id=dh_app_0123456789abcdef01234567
&redirect_uri=https%3A%2F%2Fapp.example.com%2Foauth%2Fcallback
&code_challenge=<S256_CHALLENGE>
&code_challenge_method=S256
&resource=https%3A%2F%2Fapi.devhelp.pk
&scope=offline_access%20order%3Aread%20fulfilment%3Acreate
&state=<CSRF_STATE>If the merchant is not signed in, they sign in on app.devhelp.pk, pick a store if they belong to more than one, and review the granular app permissions on /oauth/consent. On approval, devhelp redirects back to redirect_uri with code and state.
Step 2: Exchange the code and refresh tokens
Exchange the authorization code from your server at the token endpoint using HTTP Basic authentication (client_secret_basic with client_id as the username and client_secret as the password):
POST https://app.devhelp.pk/api/auth/oauth2/tokencurl -X POST https://app.devhelp.pk/api/auth/oauth2/token \
-u "${DEVHELP_CLIENT_ID}:${DEVHELP_CLIENT_SECRET}" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=authorization_code" \
--data-urlencode "code=${AUTH_CODE}" \
--data-urlencode "redirect_uri=https://app.example.com/oauth/callback" \
--data-urlencode "code_verifier=${PKCE_VERIFIER}" \
--data-urlencode "resource=https://api.devhelp.pk"Access tokens expire after 1 hour; refresh tokens (issued when offline_access is requested) expire after 30 days. To refresh an expired access token:
curl -X POST https://app.devhelp.pk/api/auth/oauth2/token \
-u "${DEVHELP_CLIENT_ID}:${DEVHELP_CLIENT_SECRET}" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=refresh_token" \
--data-urlencode "refresh_token=${REFRESH_TOKEN}" \
--data-urlencode "resource=https://api.devhelp.pk"During secret rotation, client_secret_basic accepts both your new and previous clientSecret for the full 24-hour overlap window.
Step 3: Call the Admin API
Send the issued JWT as a Bearer token against https://api.devhelp.pk/admin/v1/* endpoints covered by your app's granted scopes:
curl https://api.devhelp.pk/admin/v1/orders \
-H "Authorization: Bearer ${ACCESS_TOKEN}"On every request, the API verifies the JWT signature, issuer, and https://api.devhelp.pk audience, and re-checks live state before executing the handler:
- Live installation & app status: The app must remain installed and
activeon the token'sstore_id(store_apps), and the app must bepublished(or a pre-publication version installed on a store owned by the publisher organization). - Live consent & membership: The OAuth consent record and the authorizing user's organization membership must still exist.
- Triple-intersected scopes: Effective permissions on every request are computed as the intersection of
token ∩ consent ∩ store_apps.granted_scopes(filtered toEXTERNAL_APP_SCOPES). Requesting a route outside the effective scope returns403. - Dashboard session-only endpoints return
403: Administrative surfaces that require a signed-in merchant session — including/admin/v1/apps,/admin/v1/billing,/admin/v1/api-keys,/admin/v1/developer, team and session management, and custom code endpoints — always refuse developer app tokens with403.
Instant revocation
Uninstalling, disabling, or suspending an app — or revoking its OAuth connection or removing the authorizing member from the organization — immediately revokes and blocks active OAuth tokens on the next API request, even before the access token's 1-hour JWT expiry.
7. Automated pre-flight checks
Before submitting a draft version for review, run Pre-flight check in Developer Apps. Results are grouped into two severities:
| Severity | Behavior |
|---|---|
| Blockers | Must be resolved before submission is accepted. Checked automatically again when you click Submit. |
| Recommendations | Non-blocking improvements that strengthen your listing and speed up staff review. |
What pre-flight checks verify
- URLs & anti-SSRF:
appUrl,webhookUrl,iconUrl,redirectUris(up to 10), and listing links (support,privacy,terms,guide) must be valid HTTPS URLs pointing to public hosts (private, loopback, and internal network addresses are rejected). - Scopes: Every requested scope must belong to
EXTERNAL_APP_SCOPESand have a non-emptyscopeJustificationsentry. - Webhooks: If
webhookUrlorsubscribesis configured, both must be set andsubscribesmust includeapp.uninstalled. - Listing & legal links: App name (max 80 chars), summary (max 140 chars), category (
messaging,shipping,marketing,payments,analytics,tools, orsales), pricing model (free,free_trial,paid_external, orcontact_sales), and live support, privacy policy, and terms URLs. - Recommendations: High-resolution app icon (
iconUrl), screenshots (up to 5 with alt text), setup guide link, and completedataHandlingdisclosures.
8. Distribution modes
Choose how merchants discover your published app in Developer Apps:
| Mode | Visibility | Typical use case |
|---|---|---|
public | Listed in the devhelp shop Apps catalogue for all merchants. | General-purpose courier, ERP, accounting, marketing, and store apps. |
unlisted | Hidden from catalogue browsing; installable by merchants who open your direct install link. | Pilot rollouts, agency-specific apps, or invite-only integrations. |
You can switch a developer app between public and unlisted at any time from Developer Apps without re-review.
9. Submission and staff review rubric
When your draft passes pre-flight with zero blockers, submit it with:
- Submission notes (
submissionNotes, up to 2,000 chars): Summary of what changed in this version. - Test instructions (
testInstructions, up to 4,000 chars): Step-by-step walkthrough for verifying the app end to end. - Test credentials (
testCredentials, up to 4,000 chars, optional): Sandbox account credentials for devhelp reviewers. Stored encrypted at rest, accessed only by reviewers under audit, and never displayed back in the Developer Apps workspace.
Review rubric
Every submission is reviewed against four structured categories (pass, fail, or na):
- OAuth & Scopes: Least-privilege scopes from
EXTERNAL_APP_SCOPES, clear merchant-facing justifications, and valid HTTPSredirectUris. - Webhooks & Security: HTTPS-only public endpoints, Standard Webhooks signature verification, mandatory
app.uninstalledhandling,app.pingresponse within 5 seconds, and accurate data-handling declarations. - Functional QA: Install, configuration, core workflow, and clean uninstall verified using your test instructions and credentials.
- Listing & Legal: Accurate app name, summary, description, icon/screenshots, transparent pricing details, and working support, privacy, and terms URLs.
Review outcomes
- Approved & published: The submitted version becomes the live manifest in the app catalogue (or via direct link for
unlistedapps), the previous published version is markedsuperseded, and your partner support address receives a confirmation email. - Changes requested: You receive an email containing the reviewer's notes and any failed rubric items. Update your draft in Developer Apps and resubmit.
- Suspended: If a published app breaks merchant stores, fails security requirements, or violates platform policy, devhelp staff can suspend it. Suspension blocks new installs, immediately pauses managed webhooks across all installed stores, and emails your partner support address with the reason and next steps.
Related documentation
- Building Private Apps & Integrations for single-store Admin API integrations using Secret API Keys.
- Authentication & API Conventions for API key prefixes, rate limits, idempotency, and pagination.
- Webhooks and Webhook Topics Reference for event payloads and signature verification.
@devhelp/shopSDK for TypeScript Admin, Storefront, and Webhook helpers.