Payment orchestration,one API.
One REST API for payments, subscriptions, installments, wallets, and reconciliation — over Payzone and Stripe. Licensed-only groups are marked Roadmap. Generated OpenAPI contract, JWT auth, HMAC-verified webhooks, and a typed TypeScript SDK.
import { createCorpoPay, PaymentIntents } from '@corpopay/sdk';
const corpoPay = createCorpoPay({
baseUrl: 'https://api.corpopay.site',
apiKey: 'cp_live_…',
});
// Create a payment intent — one typed call
const { data } = await PaymentIntents.createPaymentIntent({
client: corpoPay.client,
body: {
provider: 'STRIPE',
amount: 250000, // 2,500.00 MAD
currency: 'MAD',
reference: 'INV-99281',
description: 'Prepaid wallet top-up',
returnUrl: 'https://app.corpopay.site/checkout/success'
}
});The complete surface, straight from the generated OpenAPI contract. All responses are typed and validated; money is integer centimes.
Authentication
Register a tenant, exchange credentials for a JWT, and mint scoped API keys.
/auth/registerCreate a tenant account/auth/loginExchange email + password for a JWT/auth/meFetch the current user/auth/forgot-passwordRequest a password reset/auth/reset-passwordReset the password/api-keysCreate an API key (server-to-server)Webhooks
Inbound provider events, HMAC-verified synchronously before they are processed.
/webhooks/stripeStripe events/webhooks/vpsVPS / Payzone events/webhooks/napsNAPS eventsPayment intents
The server-to-server primitive for a one-time or pre-authorized charge.
/payment-intentsCreate a direct payment intent/payment-intents/{id}Fetch an intent/payment-intents/{id}/statusPoll the current status/payment-intents/{id}/captureCapture a pre-authorized intent/payment-intents/{id}/cancelCancel an intentPayment links
No-code hosted checkout — share a link, and the customer pays on a hosted page.
/payment-linksCreate a hosted payment link/payment-linksList links/payment-links/{id}Fetch a link/payment-links/{id}/cancelCancel a linkTransactions & refunds
Read every capture, and refund it — with the full ledger unwind posted automatically.
/transactionsList transactions/transactions/{id}Fetch a transaction/transactions/{id}/refundRefund a transactionWallets
Stored-value balances — top up, debit, refund, and adjust with signed MAD.
/walletsCreate a wallet/wallets/{id}Fetch a wallet/wallets/{id}/topupTop up a wallet/wallets/{id}/debitDebit a wallet (pay-as-you-go)/wallets/{id}/refundRefund into a wallet/wallets/{id}/adjustSupport credit / adjustmentSubscriptions
Recurring billing with pause, resume, and a full event history.
/subscriptionsList subscriptions/subscriptions/{id}Fetch a subscription/subscriptions/{id}/pausePause billing/subscriptions/{id}/resumeResume billing/subscriptions/{id}/eventsList billing eventsInstallments
A down payment plus a fixed schedule — funded by the merchant.
/installment-plansCreate a plan/installment-plansList plans/installment-plans/{id}Update a plan/installment-agreementsList agreements/installment-agreements/{id}/cancelCancel an agreementMarketplace splits
RoadmapSplit one payment across beneficiaries and the platform, with escrow release.
/split-partiesCreate a beneficiary/split-rulesCreate a split rule/splitsList splits/splits/{id}/releaseRelease an escrowed splitLedger
The double-entry record — nine accounts, always balanced.
/ledgerRead the tenant ledgerPayouts
RoadmapSnapshot eligible funds into a payout, then settle it — MANUAL or STRIPE_CONNECT.
/payoutsSnapshot eligible funds into a payout/payoutsList payouts/payouts/{id}Fetch a payout/payouts/{id}/processProcess (MANUAL / STRIPE_CONNECT)/payouts/{id}/cancelCancel a payoutFee schedules
RoadmapVersioned, per-tenant fees — FLAT, PERCENTAGE, PER_METHOD, or TIERED.
/fee-schedulesCreate a fee schedule/fee-schedulesList fee schedules/fee-schedules/activeFetch the active scheduleDisputes & reversals
RoadmapWhen a chargeback is lost, the money comes back — from available or reserve.
/disputesList disputes/disputes/{id}Fetch a dispute/disputes/{id}/resolveResolve a disputeSettlement statements
RoadmapOpening → closing balances, itemized by category, finalized into a tenant invoice.
/settlement-statementsCreate a statement/settlement-statements/{id}Fetch a statement/settlement-statements/{id}/finalizeFinalize a statement/settlement-statements/{id}/voidVoid a statementReconciliation reports
Three-way match — provider report vs ledger vs payouts — surfaced as EXACT, AMOUNT_DIFF, or UNMATCHED.
/reconciliation-reportsCreate a report/reconciliation-reports/{id}/runRun a three-way match/reconciliation-reports/{id}/resolveResolve a differenceAdmin
Super-admin surface — tenants, onboarding, risk, provider health, and manual payouts.
/admin/tenantsList tenants/admin/tenants/{id}/statusUpdate tenant status/admin/payments/searchSearch payments/admin/provider-healthProvider health/admin/payouts/{id}/executeManual payout (Morocco)Conventions
Guarantees that hold across the whole surface.
Idempotency keys
Pass an idempotency key to retry safely — exactly-once money movement, even under replays.
HMAC-verified webhooks
Every webhook is signed and verified synchronously before processing, then deduped.
AES-256-GCM at rest
Provider credentials and card profiles are encrypted — never stored in plaintext.
Rate limits
Predictable headers let your application back off gracefully without surprise 429s.