Skip to content

Checking access...

payment-gateway API

Unified off-chain payment microservice for Hello World DAO and FounderyOS. Consolidates three payment rails behind a single REST surface:

  • Stripe — USD fiat (membership, donations, SaaS billing, courses, internal disbursements)
  • Stripe Connect — marketplace buyer → vendor purchases with 30-day fee-split hold
  • ICP / DOM crypto — ICRC-1 transfers to per-payment subaccounts with price oracles

Port: 3200 · Namespace: platform on AX42-U · Epic: PLATFORM-007 (completed 2026-04-19)

For the full reference including all endpoints, schemas, error codes, sequence diagrams, database schema, env vars, and scheduled jobs, see the root API reference at api/payment-gateway.md in the docs repo (also indexed in the API Documentation Index).

Quick Reference

Endpoints

MethodPathPurpose
GET/api/v1/healthLiveness / readiness probe (public)
POST/api/v1/paymentsCreate payment session (fiat or crypto)
GET/api/v1/payments/:idFetch payment status
POST/api/v1/payments/:id/verifyVerify on-chain crypto transfer
POST/api/v1/payments/:id/refundRefund payment (Stripe only — crypto returns 501)
POST/api/v1/payouts/releaseManually release held marketplace fee split
POST/api/v1/vendors/onboardCreate / refresh Stripe Connect Express account
POST/api/v1/webhooks/stripeStripe webhook (public, HMAC-signed)
POST/api/v1/webhooks/stripe-connectStripe Connect webhook (separate secret)

Authentication

All non-webhook endpoints require Authorization: Bearer <TOKEN_PAYMENT_GATEWAY> from the platform/service-tokens k8s Secret. Fails closed when SERVICE_TOKEN is unset. Webhooks verify via Stripe HMAC signatures (STRIPE_WEBHOOK_SECRET and STRIPE_CONNECT_WEBHOOK_SECRET — separate keys).

Provider Routing

CurrencyProviderNotes
usdStripe or Stripe ConnectSelected by payment type
icpIcpProviderNNS XRC oracle
domIcpProviderGovernance canister price oracle

marketplace-purchase and marketplace-vendor-payout types always route to Stripe Connect. All other USD types route to standard Stripe.

Hello World Co-Op DAO