@tagadapay/node-sdk
v1.2.1
Published
Official Tagada Node.js SDK — PSP/gateway-agnostic payment orchestration
Downloads
729
Readme
@tagadapay/node-sdk
Server-side Node.js SDK for TagadaPay — the PSP-agnostic payment orchestration platform.
Use this SDK to programmatically create stores, deploy checkout pages, set up funnels, process payments, and manage your entire checkout infrastructure from code.
Install
npm install @tagadapay/node-sdkRequires Node.js 18+.
Quick Start
import Tagada from '@tagadapay/node-sdk';
const tagada = new Tagada('your-api-key');
// List stores
const stores = await tagada.stores.list();
// Process a payment
const { payment } = await tagada.payments.process({
amount: 4999,
currency: 'USD',
storeId: 'store_xxx',
paymentInstrumentId: 'pi_xxx',
});What Can You Do With It?
| Resource | What it does |
| --- | --- |
| tagada.stores | Create and manage stores |
| tagada.products | Create, update, and manage products with variants and pricing |
| tagada.payments | Process, refund, and void payments |
| tagada.paymentFlows | Configure PSP routing (cascade, weighted, failover) |
| tagada.funnels | Create multi-step funnels (checkout → upsell → thank you) |
| tagada.plugins | Deploy SPAs to edge CDN (deployDirectory()), A/B split testing, custom domains |
| tagada.subscriptions | Create and manage recurring billing |
| tagada.customers | Look up and manage customers |
| tagada.orders | Query orders |
| tagada.webhooks | Register webhook endpoints |
| tagada.events | Query event log, statistics, and audit trail |
| tagada.emailTemplates | Create and manage transactional email templates |
| tagada.promotions | Create and manage discounts |
| tagada.promotionCodes | Generate and manage discount codes |
| tagada.offers | Configure upsells, downsells, and order bumps |
| tagada.checkoutOffers | Manage checkout-time offers |
| tagada.blockRules | Create fraud/block rules |
| tagada.paymentInstruments | Manage vaulted payment methods |
| tagada.domains | Add, verify, configure, and remove custom domains |
| tagada.checkout | Server-side checkout operations |
| tagada.processors | List, create, and manage payment processors (incl. Stripe Connect OAuth) |
Configuration
const tagada = new Tagada({
apiKey: 'your-api-key',
baseUrl: 'https://app.tagadapay.com/api/public/v1',
timeout: 30_000,
maxRetries: 2,
});Error Handling
import Tagada, {
TagadaNotFoundError,
TagadaValidationError,
TagadaAuthenticationError,
TagadaRateLimitError,
} from '@tagadapay/node-sdk';
try {
await tagada.payments.retrieve('pay_nonexistent');
} catch (err) {
if (err instanceof TagadaNotFoundError) {
// 404
} else if (err instanceof TagadaValidationError) {
console.log(err.errors); // field-level errors
} else if (err instanceof TagadaRateLimitError) {
console.log(`Retry after ${err.retryAfter}s`);
}
}Full Guide
See the Node SDK guide for a complete walkthrough with examples.
License
MIT
