Preview. The Payments API (V3) is live at
https://api.tagada.io/v1, but it is not open to self-serve integrations yet: merchant secret keys cannot be created from the dashboard. Every merchant processes on V2 today. Contact api-support@tagadapay.com if you plan a new integration.@tagadapay/core-js/payments-v3 is the browser client of the Payments API. It ships inside @tagadapay/core-js since 3.7.0. It holds a publishable key and one payment’s client_secret, and it:
- mounts secure card fields and Apple Pay or Google Pay buttons,
- turns them into a payment method (
inst_...), - confirms the payment and performs every
next_action(3DS, redirects, wallet steps), - reads the payment and handles the return from a redirect.
Install
1. Create the payment on your server
Create the payment with your secret key and hand itsclient_secret to the page. See Payment lifecycle.
2. Load the client
loadPayments reads the store’s configuration (GET /v1/client-config) before it resolves. Your page’s origin must be in the key’s allowed_origins.
3. Collect a card and confirm
cardFieldsloads the vault’s fields on demand. They never expose the card number to your page.createPaymentMethodrefuses incomplete fields and fields created by another client instance.confirmPaymentdoes not tokenize a card by itself: create the payment method first.- Send
billingDetailswhen you have them: 3DS providers need the cardholder’s name and email.
Wallets
'google_pay' for Google Pay. A shopper who closes the sheet is not an error. The wallet must be enabled in the store’s configuration.
Redirect methods
For a redirect method (PayPal, Klarna, iDEAL…), confirm with the method type instead of aninst_ id:
redirect: 'manual' to confirmPayment if you want the requires_action payment back instead of an automatic navigation.
Other methods
What you get back
The methods return aPublicPayment: id, object, mode, status, amount, currency, purpose, payment_method_type, next_action, last_outcome, saved_payment_method, statement_descriptor, created_at, concluded_at. It never includes the client secret.
Errors
The client retries network errors,
429, 500, 502, 503, 504 and idempotency_key_in_progress up to two times, with the same Idempotency-Key. Every request sends Payments-Version and X-Tagada-SDK.