Skip to main content

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.
If you are unsure, start with headless-sdk’s processPayment(). It is the one function that covers cards, wallets and APMs, and it handles the parts people get wrong.

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.
Everything below is the same flow taken apart, for when you need control over a step.

Discovering what you can offer

Always render your payment UI from the store’s configuration, not from a hard-coded list.
Group the result by typecard, 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:
To store the instrument first (e.g. to reuse it), call const { paymentInstrument } = await tagada.payment.createInstrument({ tagadaToken }) and pass paymentInstrumentId: paymentInstrument.id instead.
Server-side, the equivalent is tagada.payments.process({ amount, currency, storeId, paymentInstrumentId }) — the Node SDK charges vaulted instruments directly and takes no checkout session.

Wallets

The wallet sheet must be opened from a real user gesture. Do not await anything between the click and startApplePaySession — resolve your configuration beforehand. Full detail in Apple Pay & Google Pay.

Alternative payment methods

APMs need an explicit paymentMethod 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 your returnUrl, resume the payment rather than assuming it worked:
The redirect return is not proof of payment. Fulfil on the webhook, which is the authoritative result.

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

headless-sdk. Use processPayment() for cards and wallets, processApm() for redirects, and getEnabledMethods() to decide what to render.
core-js. It is the smallest surface — Tokenizer, the wallet session helpers and 3DS, with no checkout opinions attached.
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.
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.