Using payment methods from the SDKs
Four packages can charge a payment. They differ in where they run and how much they do for you.The one call that handles everything
processPayment() charges, detects requireAction, runs the 3DS challenge, follows APM redirects
and polls until the payment reaches a terminal status.
Discovering what you can offer
Always render your payment UI from the store’s configuration, not from a hard-coded list.type — card, wallet, apm — to build your UI sections. See
the config shape.
Cards
1
Tokenize in the browser
Raw card data never reaches your server or ours unvaulted.
2
Pay with the token
processPayment creates the instrument from the token for you:const { paymentInstrument } = await tagada.payment.createInstrument({ tagadaToken })
and pass paymentInstrumentId: paymentInstrument.id instead.tagada.payments.process({ amount, currency, storeId, paymentInstrumentId }) — the Node SDK
charges vaulted instruments directly and takes no checkout session.
Wallets
Alternative payment methods
APMs need an explicitpaymentMethod and a processorId, and they always come back with a
redirect rather than a final status.
Coming back from the redirect
When the shopper returns to yourreturnUrl, resume the payment rather than assuming it worked:
Server-side payment operations
payments.refund() and payments.void() are subject to what the underlying processor supports —
CCAvenue, notably, cannot refund through us at all. Check the
capability matrix before you rely on one.Choosing a package
I'm building a custom storefront
I'm building a custom storefront
headless-sdk. Use processPayment() for cards and wallets, processApm() for redirects, and
getEnabledMethods() to decide what to render.I only need to tokenize
I only need to tokenize
core-js. It is the smallest surface — Tokenizer, the wallet session helpers and 3DS, with no
checkout opinions attached.I'm charging from a backend
I'm charging from a backend
node-sdk. Never put a secret key in a browser — use a restricted publishable key
(tp_pk_*) client-side and keep tp_sk_* on the server.I'm building a plugin on TagadaPay hosting
I'm building a plugin on TagadaPay hosting
plugin-sdk. It has the richest React surface — usePayment, wallet hooks and the full
payment-action handler.Next
Support matrix
What each processor can charge.
Headless SDK
The full checkout flow.
Node SDK
Server-side quick start.
