Skip to content

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.

Three actors:

  • Your merchant backend holds a long-lived merchant_secret. It calls POST /internal/sessions/create once per checkout to mint a short-lived session_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_url when 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.

  • 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 any POST and the gateway will replay the cached response if the same request hits again within 24 h. See Idempotency.
  • Stable error codes. Every 4xx/5xx response uses the same envelope with a four-digit error_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 is https://app.api.gtwy.pdirect.com. See Environments.

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.