Skip to content

About

Technas for JavaScript and TypeScript: payments and user accounts behind one client and one secret (the full package)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Technas for JavaScript and TypeScript

Payments and user accounts behind one client and one secret. Lire en français.

import { createTechnas } from "technas";

const t = createTechnas();                       // reads TECHNAS_SECRET

const payment = await t.pay.payments.create({
  amount: 5000, reference: "order-42",
  customer: { email: "awa@example.com", name: "Awa Mensah" },
  returnUrl: "https://shop.example/thanks",
});
console.log(payment.checkoutUrl);

const user = await t.accounts.users.resolve({ phone: "+22890123456", proof: "verified" });
const check = await t.accounts.tokens.verify(accessToken);

Pick your package

Like a toolkit that ships in several builds, Technas comes in variants. Same code, different cuts:

You want Install
Everything technas (this package): import { createTechnas } from "technas"
Payments only @technas/pay, or import { createPay } from "technas/pay"
User accounts only @technas/accounts, or import { createTechnasAccounts } from "technas/accounts"

The full package depends on the thin ones, never the reverse: a thin package pulls in nothing from another product. The entry points technas/pay and technas/accounts let a bundler keep only the product you import.

Install

npm install github:Technas-Organization/technas-node#v0.1.0

Node 18.17+. Types included.

Your secret comes from the console (Developers › Keys): tps_test_… for the sandbox (no real money, sandbox users), tps_live_… for production. Put it in TECHNAS_SECRET.

What is inside

t.pay.payments create, get, getByReference, cancel, refund, list
t.pay.refunds / t.pay.balance get / get, topUp
t.pay.webhooks verify, handle (signed webhooks)
t.pay.client The whole thin @technas/pay client, for everything else (payout destination, card account, currency rules, ready-made app routes…)
t.accounts.users resolve, get, list, setRoles, disable, enable, revokeSessions
t.accounts.roles / t.accounts.tokens list, declare / verify
t.accounts.config() What your app plugs in to sign users in

Each product keeps its own documentation: payments, accounts. The full API reference lives in the console (Developers › Reference).

Tests

npm install && npm test

MIT licence.

About

Technas for JavaScript and TypeScript: payments and user accounts behind one client and one secret (the full package)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages