DigetPay Developer Integration API
  1. Integration Flow
  • Overview & Getting Started
  • Integration Flow
    • 01 - Authentication & Team
    • 02 - End-to-End Integration Flow
    • 03 - Customizing your Marketplace Listing
  • API Reference
    • Auth
      • Refresh access token using a refresh token
      • Logout — revoke the refresh token
      • Get current profile
      • Activate an invited `DEVELOPER` account (set password from invite link)
    • Login
      • Login with email + password (sends OTP via email and SMS)
      • Verify the login OTP and issue access + refresh tokens
      • Resend login OTP via email and SMS
    • Register
      • Self-register a developer company + owner account
      • Verify registration OTP (email + phone)
      • Resend registration OTP
    • Forgot Password
      • Forgot password — send a reset OTP to the email
      • Verify the forgot-password OTP
      • Reset the password using the reset token
    • Team
      • List organization members
      • Invite a `DEVELOPER` into the organization
      • Resend the activation link for a `PENDING` member
      • Remove a member
    • Company
      • Change Requests
        • Submit a company information change request
        • Withdraw a pending change request
        • Upload a document for a company change request
        • Remove a staged document from a change request
        • Get current pending company change request
      • Company profile + verification status + documents
      • Respond to a single information request
      • Update company / verification data (DRAFT or INFO_REQUIRED only)
      • Onboarding readiness for verification submit and marketplace
      • Upload a verification document (pdf/jpeg/png, max 10MB)
      • Signed download URL for an own document
      • Submit company for verification review
      • Verification status only
      • List information requests for the current verification
    • Applications
      • List applications
      • Create application (requires APPROVED verification)
      • Active marketplace categories (for the listing form)
      • Application detail
      • Update application
      • Request production activation (certification must be PASSED)
      • Upload an application logo (icon)
      • Upload an application banner
      • Marketplace orders for the application
      • API request logs (masked metadata only)
      • Orders / transactions for the application
      • Advance a confirmation-required order
      • Submit application for review
    • Listings
      • Marketplace listing for the application
      • Create or partially update the marketplace listing
      • Submit listing for marketplace review
      • Unpublish a live or scheduled marketplace listing
    • Offers
      • List authored marketplace offers (cards)
      • Create a marketplace offer (card)
      • Reorder marketplace offers
      • Update a marketplace offer (card)
      • Delete a marketplace offer (card)
      • Upload a marketplace offer (card) image
      • Upload an offer (card) banner image
    • Panels
      • Upload a panel (section) banner image
      • List marketplace panels (sections)
      • Create a marketplace panel (section)
      • Reorder marketplace panels (sections)
      • Update a marketplace panel (section)
      • Delete a marketplace panel (section)
    • Credentials
      • List credentials (masked)
      • Generate credential for an environment — raw key returned once
      • Rotate API key — new raw key returned once
      • Rotate webhook signing secret — returned once
      • Revoke credential (`isActive=false`)
      • Set optional IP allowlist (IPv4 / CIDR)
    • Webhooks
      • Webhook event catalog
      • List webhook endpoints
      • Add webhook endpoint (**max 5 per environment**)
      • Update webhook endpoint
      • Delete webhook endpoint
      • Send a signed connection test to the endpoint
      • Delivery logs
    • Dashboard
      • Developer portal overview
    • Company
  • Developer Portal
    • Applications
    • Certification
      • Certification progress ("8 of 12 tests completed")
      • Re-evaluate automated certification checks
    • Auth
      • Login
        • Login with email + password (no OTP — non-production only)
  • admin
    • auth
      • Step 1: email + password → email OTP
      • Step 2: verify OTP → admin JWT
      • Resend OTP (re-runs login challenge)
      • Get current admin user profile
      • Update current admin profile (name, phone, avatar)
      • Change password for the current admin user
      • Logout admin user
      • Set password from an invite link token (no auth required)
      • Request password reset via email/SMS OTP (no auth required)
      • Verify password reset OTP and get reset token (no auth required)
      • Reset password using reset token and new password (no auth required)
  • integrity
    • Issue a one-time nonce for Play Integrity attestation
      POST
    • (DEV ONLY) Decode an integrity token and return the verdict
      GET
  • health
    • Liveness probe - basic health check
    • Readiness probe - dependency health check
    • HealthController_getMetrics
  • super-admin-portal
    • impersonate
      • Impersonate a partner or merchant OWNER by targetId + targetType
      • End an active impersonation session
  1. Integration Flow

01 - Authentication & Team

See also: Getting Started for the onboarding checklist and
Integration & API Reference for the full
lifecycle walkthrough.

1. Authentication flow at a glance#


2. Token contract#

PropertyValue
Access tokenJWT, typ=developer-portal-access, validity 43200 s (12 h)
Refresh tokenOpaque string, 30 days, rotated on every /refresh
Auth headerAuthorization: Bearer <accessToken>

3. Registration#

POST /developer-portal/register — public#

Creates the organization (ONBOARDING) + owner + verification (DRAFT)
atomically.
{
  "companyName": "Acme Payment Solutions",
  "legalName": "Acme Payment Solutions LLC",
  "email": "dev@company.com",
  "phone": "+966501234567",
  "fullName": "Sarah Developer",
  "password": "SecurePass123"
}
Response 201
{
  "challengeId": "a1b2c3d4e5f60718293a4b5c",
  "expiresIn": 600,
  "email": "dev@company.com"
}

POST /developer-portal/register/verify-otp — public#

{ "challengeId": "a1b2c3d4e5f60718293a4b5c", "otp": "123456" }
Response 200
{ "ok": true, "verified": true }

POST /developer-portal/register/resend-otp — public#

{ "challengeId": "a1b2c3d4e5f60718293a4b5c" }
Response 200
{ "expiresIn": 600 }
TIP
Registration does not auto-login. After OTP verification, route your user
through the login flow to obtain tokens.
INFO
The registrar (the OWNER) is created ACTIVE immediately — it never passes
through the PENDING state that invited DEVELOPER members do.

4. Login#

POST /developer-portal/auth/login — public#

{ "email": "dev@company.com", "password": "SecurePass123" }
Response 201 — same challenge shape as registration:
{ "challengeId": "a1b2c3d4e5f60718293a4b5c", "expiresIn": 600, "email": "dev@company.com" }

POST /developer-portal/auth/login/verify-otp — public#

{ "challengeId": "a1b2c3d4e5f60718293a4b5c", "otp": "123456" }
Response 201 — save the tokens:
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
  "refreshToken": "4f6b2a1c8e9d0f1a2b3c4d5e6f708192",
  "tokenType": "Bearer",
  "expiresIn": 43200,
  "user": { "id": "10", "email": "dev@company.com", "name": "Sarah Developer" },
  "organization": {
    "id": "42",
    "name": "Acme Payment Solutions",
    "legalName": "Acme Payment Solutions LLC",
    "status": "ONBOARDING"
  }
}

5. Session endpoint — GET /developer-portal/auth/me#

Returns profile + organization + application count. Used to confirm a live
session.
{
  "user": { "id": "10", "email": "dev@company.com", "name": "Sarah Developer", "role": "OWNER" },
  "organization": { "id": "42", "name": "Acme Payment Solutions", "status": "APPROVED" },
  "applicationCount": 3
}
The role tells you what the account can do: an OWNER is a company admin with
full control; a DEVELOPER can build and maintain the integration but cannot
edit company data, manage the marketplace listing, view refunds, open tickets, or
manage team members.

6. Refresh & logout#

POST /developer-portal/auth/refresh#

{ "refreshToken": "4f6b2a1c8e9d0f1a2b3c4d5e6f708192" }
Response 200 — pair rotated, previous refresh token revoked:
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
  "refreshToken": "0a1b2c3d4e5f60718293a4b5c6d7e8f90",
  "tokenType": "Bearer",
  "expiresIn": 43200
}

POST /developer-portal/auth/logout#

{ "refreshToken": "0a1b2c3d4e5f60718293a4b5c6d7e8f90" }
Response 200 — { "ok": true }

7. Password recovery#

MethodEndpointPurpose
POST/developer-portal/auth/forgot-passwordStart reset (OTP challenge)
POST/developer-portal/auth/forgot-password/verifyVerify OTP → resetToken
POST/developer-portal/auth/forgot-password/resetSet the new password

8. Authentication error reference#

StatusCode / scenarioGuidance
400Invalid phone (Saudi +9665…), weak passwordRe-validate inputs client-side
400Invalid or expired activation linkAsk the owner to resend a fresh link
401Wrong password, unknown user → generic login errorDo not reveal which one
401Token typ ≠ developer-portal-accessRefresh or re-login on the portal
404Order/app not found, or login/direct in production404 is the correct behaviour
409Account already exists on registrationRoute to login instead
409Activation: account already activatedUse the forgot-password flow
429OTP rate limit exceededWait and retry with backoff

9. Team management & roles#

Every developer organization starts as a single OWNER account created by
self-registration. The OWNER can invite colleagues as DEVELOPER members who
help with the integration work.
PropertyValue
RolesOWNER (full control), DEVELOPER (integration work)
Team operationsOwner-only
Invite expiry72 hours
Main endpointsGET /team, POST /team/invite, POST /team/:userId/resend-invite, DELETE /team/:userId, POST /auth/activate
INFO
Team endpoints require a valid developer-portal Bearer JWT. The activation
endpoint is public — it needs no token.

9.1 Roles#

RoleCreated byWhat they can do
OWNERSelf-registrationEverything, including team management
DEVELOPEROwner inviteIntegration work
Only an OWNER can manage team members; invites always create a DEVELOPER
account — the team API can never create or reassign an OWNER.
CapabilityOwnerDeveloper
Dashboard, company profile, applications, credentials, webhooks, API logs, orders, certification✔✔
Edit company profile & verification, upload documents✔—
Marketplace storefront listing (offers, panels, images)✔—
Refunds and support tickets✔—
Manage team members (invite, resend, remove)✔—
GET /auth/me returns the member's role, so your app can tailor its UI.
INFO
A DEVELOPER cannot edit the company profile, manage the marketplace listing,
view refunds, open support tickets, or manage team members.

9.2 Team lifecycle#

StatusMeaning
PENDINGInvited; no password set yet. Cannot log in.
ACTIVEPassword set and account active. Can log in.
INACTIVEDeactivated by the owner. Sessions revoked.
The OWNER is ACTIVE from self-registration — it never passes through PENDING.

9.3 Invite → activate → login#

1.
Owner sends POST /developer-portal/team/invite with email and fullName;
the server creates a PENDING member and emails an activation link.
2.
The invitee clicks the link and sets their password via
POST /developer-portal/auth/activate with the token and newPassword;
the account becomes ACTIVE.
3.
The invitee signs in through the normal login flow and receives a JWT with
the DEVELOPER role.

9.4 API reference#

List members — GET /developer-portal/team — Bearer, owner-only#

Returns every member: the OWNER plus all invited DEVELOPER accounts.
Response 200 — TeamMember[]
[
  {
    "id": "10",
    "email": "owner@acme.com",
    "name": "Sarah Developer",
    "role": "OWNER",
    "status": "ACTIVE",
    "invitedByUserId": null,
    "inviteExpiresAt": null,
    "lastLoginAt": "2026-08-20T09:00:00.000Z",
    "createdAt": "2026-07-01T08:00:00.000Z"
  },
  {
    "id": "11",
    "email": "alidev@acme.com",
    "name": "Ali Mohammed",
    "role": "DEVELOPER",
    "status": "PENDING",
    "invitedByUserId": "10",
    "inviteExpiresAt": "2026-08-29T10:00:00.000Z",
    "lastLoginAt": null,
    "createdAt": "2026-08-26T10:00:00.000Z"
  }
]
FieldDescription
roleOWNER or DEVELOPER
statusPENDING | ACTIVE | INACTIVE
invitedByUserIdOwner who sent the invite (null for Owner)
inviteExpiresAtInvitation expiry (null for non-pending)

Invite a DEVELOPER — POST /developer-portal/team/invite — Bearer, owner-only#

Creates a PENDING DEVELOPER member and emails the activation link.
FieldTypeRequiredDescription
emailstringYesInvitee email (case-insensitive); must be unused in the portal
fullNamestringYesInvitee display name
Response 200
{
  "ok": true,
  "developerUserId": "11",
  "role": "DEVELOPER",
  "status": "PENDING",
  "inviteExpiresAt": "2026-08-29T10:00:00.000Z",
  "emailSent": true
}
Re-inviting an existing PENDING member refreshes the invitation (same
response) instead of creating a duplicate.
If email delivery fails, the created member is rolled back and the request
fails.

Resend an invitation — POST /developer-portal/team/:userId/resend-invite — Bearer, owner-only#

Refreshes the invitation expiry and sends a new activation link.
Response 200
{ "ok": true, "inviteExpiresAt": "2026-08-29T11:00:00.000Z", "emailSent": true }

Remove a member — DELETE /developer-portal/team/:userId — Bearer, owner-only#

PENDING accounts are deleted outright; ACTIVE/INACTIVE accounts are
deactivated and their sessions revoked. The OWNER can never be removed.
Response 200 — { "ok": true }

Activate an invited account — POST /developer-portal/auth/activate — public#

Completes the invite: the invitee clicks the activation link, which opens the
activate page; the page reads the token from the URL and calls this endpoint to
set the password and activate the account.
FieldTypeDescription
tokenstringActivation token from the invite email link (challenge ID)
newPasswordstring8–128 chars, at least one letter and one digit (stored with Argon2)
Response 200 — { "ok": true }
The activation link expires after 72 hours; the OWNER must resend after
that.
After activation, future password resets go through forgot-password — the
activation token works only once.

9.5 Team business rules#

RuleBehavior
OwnershipOnly the OWNER can invite, resend, remove, or list members
Role immutabilityInvites always create a DEVELOPER; never an OWNER
Email uniquenessAn invite email must not already belong to any portal user/org
Invite expiry72 hours after sending or resending
Owner protectionThe OWNER account can never be removed
Delivery failureIf the invite email cannot be sent, the member is rolled back
First loginA member must activate (set password) before they can log in

9.6 Team errors#

StatusCode / scenarioClient action
400Not the OWNERUse the OWNER account
400Invalid body, weak password, or mail not configuredCorrect the request
400Invalid or expired activation linkAsk the owner to resend a fresh link
404:userId not found in this organizationVerify the member ID
409EMAIL_IN_USE / ALREADY_A_MEMBER on inviteResolve the conflict
409Activate: account already activatedUse the forgot-password flow instead

9.7 Security considerations#

Removing a member revokes their access immediately.
The activation token is an opaque random string (not a JWT), exposed only
through the invite email link and never returned in an API response.
Team email addresses are company-confidential; treat the GET /team response
accordingly.

10. Summary#

Public endpoints cover register → OTP → login → OTP → tokens, plus
activate for invited DEVELOPER members.
Authenticated calls use Authorization: Bearer with a
developer-portal-access JWT.
Refresh tokens rotate; logout revokes.
Team management and role capabilities live in §9.
CHECK
You can now obtain and manage a developer session and team. Next — the full
integration flow from onboarding to live.
Modified at 2026-08-27 12:18:16
Previous
Overview & Getting Started
Next
02 - End-to-End Integration Flow
Built with