Quickstart SDKs

Use our Node.js library or standard cURL requests to create secure authorization tokens instantly.

1. Install the SDK

npm install @secure-transaction/node

2. Initialize Client

const SecureTx = require('@secure-transaction/node');
const client = new SecureTx('sk_live_9038209841');

const charge = await client.charges.create({
  amount: 4900, // $49.00
  currency: 'usd',
  source: 'tok_visa',
  description: 'Enterprise Plan Monthly'
});

HTTP cURL Example

curl -X POST https://api.secure-transaction.co/v1/charges \
  -u sk_live_9038209841: \
  -d amount=4900 \
  -d currency=usd \
  -d source=tok_visa \
  -d description="Enterprise Plan Monthly"

# Response:
{
  "id": "ch_3Mv8X2L2eZvKYlo21",
  "object": "charge",
  "amount": 4900,
  "currency": "usd",
  "paid": true,
  "status": "succeeded",
  "risk_analysis": {
    "risk_level": "normal",
    "score": 0.01
  }
}