Skip to content
TypeScript SDK|v0.1 · ESM + CJS

Ship paymentsin minutes.

One typed client for the entire CorpoPay API. Configure once, call typed methods, and verify webhooks — no hand-rolled HTTP, no manual centime math.

$ npm i @corpopay/sdk
typescript
import { createCorpoPay, PaymentLinks } from "@corpopay/sdk";

const corpoPay = createCorpoPay({
  baseUrl: "https://api.corpopay.site",
  apiKey: "cp_live_…",
});

const { data } = await PaymentLinks.createPaymentLink({
  client: corpoPay.client,
  body: { amount: 9900, currency: "MAD", description: "Workshop", provider: "VPS" },
});

Quickstart

Three steps to your first charge.

From install to a live payment intent in three lines of code.

01

Install

Add the SDK to your Node, serverless, or browser project.

02

Configure

Create a client with your base URL and tenant API key — once.

03

Call

Use a typed method; auth, money and statuses are handled for you.

Built for developers

Everything you would hand-roll, already done — generated from the OpenAPI contract.

Type-safe to the wire

Every request and response is typed from the contract — including CANCELLED vs CANCELED and nullable money.

Configure once

baseUrl + apiKey at init; every call carries auth. Isolated clients for multi-tenant.

Webhook verification

corpoPay.webhooks.verify() checks HMAC-SHA256 signatures in constant time.

Runs anywhere

Node 20+, Deno, Bun, serverless and browsers — ESM and CJS bundles.

Grouped by resource

PaymentLinks, PaymentIntents, Refunds, Payouts, Wallets — one class per domain.

Real enums

Precise status unions and runtime value arrays re-exported from @corpopay/contract.

Read the code, not the docs

Three flows you will ship on day one.

Everything you can call

One client, every resource — generated from the OpenAPI contract and always in sync.

Payment links

Hosted checkout for a quick, shareable sale.

Payment intents

Server-to-server charges across every provider rail.

Subscriptions

Recurring billing with plans and installments.

Refunds

Full or partial reversals with idempotent keys.

Payouts

Move settled funds out to your bank.

Wallets

Stored value and balance movements.

Webhooks

Typed events plus HMAC signature verification.

Runtime support

One package, every target.

Node.js
ESM + CJS
Serverless
Lambda · Vercel · Cloudflare
Deno / Bun
Native fetch
Browser
Fetch-based

Ready to ship?

Install the SDK, or read the source on GitHub.