Introduction
Pdirect is a payment gateway that accepts and disburses money across cards, mobile money, e-wallets, flash vouchers, and bank transfers. The same gateway handles a one-shot card collection and a 100-line recurring B2C payout, behind the same authentication model and the same response envelope.
How the pieces fit
Section titled “How the pieces fit”Three actors:
- Your merchant backend holds a long-lived
merchant_secret. It callsPOST /internal/sessions/createonce per checkout to mint a short-livedsession_token. - Your client — a Flutter mobile app, an Angular web app, or any
HTTP client — presents that session token as
Authorization: Bearer <session_token>on every payment call. - The Pdirect gateway validates the token, enforces body
binding (the amount and currency cannot drift after session-mint),
forwards to the underlying processor, and dispatches a webhook to
your
notify_urlwhen the transaction settles.
The session token is bound to a specific amount, currency, and
customer reference. Once
/payments/submit
succeeds, the session is consumed. The next checkout needs a new
session.
What you get
Section titled “What you get”- One spec, three integrations. The OpenAPI 3.1 spec at /openapi.yaml is the source of truth; the Flutter SDK and the Angular SDK wrap the same surface.
- Idempotent retries. Send
Idempotency-Key: <uuid>on anyPOSTand the gateway will replay the cached response if the same request hits again within 24 h. See Idempotency. - Stable error codes. Every
4xx/5xxresponse uses the same envelope with a four-digiterror_code(e.g.1101,1301,1502). See Errors and the full error catalogue. - Sandbox by default. Test credentials live at
https://app.api.gtwy.pdirect.com. Production base URL ishttps://app.api.gtwy.pdirect.com. See Environments.
Who this is for
Section titled “Who this is for”These docs assume you are a backend or mobile engineer integrating Pdirect into an application. They do not cover merchant onboarding, KYC, or the dashboard — those live elsewhere.
You should be comfortable reading HTTP, JSON, and either Dart (Flutter) or TypeScript (Angular). cURL examples are provided alongside SDK examples for every flow.