Content
Try for free

Payments SDK: Sell Subscriptions on Your Own Site

Payments SDK

The web2wave Payments SDK puts a subscription checkout into any page you own: your site, your landing page, your web app. It is styled like your brand, runs on Primer's secure card fields, and connects to any payment provider behind it, with smart routing and fallbacks between them.

Everything that happens after the payment is already built: renewals, retries, upsells, LTV predictions, ad attribution, a customer portal and email sequences. You add one script, and your site takes subscriptions with the whole web2wave platform behind it.

1 day
from one script tag to a live checkout
18+
payment providers through Primer and direct integrations
0
card data on your servers or ours
1 key
access levels like “premium” instead of price ids

Your checkout, your design

Choose your plan
Powered by Primer
Monthly
$9.99 / month
$9.99
Yearly −50%
$59.99 / year
$59.99
Subscribe with Apple Pay
or pay by card
1234 1234 1234 1234
MM / YY
CVC
Subscribe · $59.99
Purchase sent to
Meta CAPI
Predicted LTV
$84.20
Access
premium
Illustrative checkout

Colors, fonts, corners, field sizes and the style of the Apple Pay and Google Pay buttons are set in one place, and the form is plain HTML your CSS can reach. Customers pay by card, Apple Pay, Google Pay or PayPal, in their local currency.

Payment methods
In the customer's local currency.
Apple PayGoogle PayPayPalVisa · Mastercard · Amex
Ad platforms
Purchases from the browser and the server, deduplicated.
MetaTikTokSnapchatAppLovin Axon
Apps and CRM
Sell on the web, unlock in the app, and sync every customer.
RevenueCatAdaptyHubSpotBrazeKlaviyo

Every payment provider, one checkout

Connect one provider or ten. Each payment goes where it is most likely to be approved, and if one provider says no, the next one gets a chance. Your code does not change.

Providers
Through Primer or web2wave direct integrations.
StripeAdyenPayPalAirwallexFinbyUnlimitColibrixShift418+ more
Customer pays
$59.99
Yearly
Visa · Germany · EUR
→
Routing rules
EU cardsAdyen
US cardsStripe
FallbackAirwallex
→
Providers
1 · Adyen
Soft decline
2 · Airwallex
Approved ✓
Cascaded in the same checkout: the customer saw one payment.
Illustrative routing
Payment orchestration
Route every payment by country, currency, card brand or amount to the provider that approves it best. Change the rules any time without touching your code.
Fallbacks
If a provider is down or times out, the payment goes to the next one automatically. An outage does not stop your sales.
Cascade payments
A soft-declined card is retried on another provider within the same checkout. The customer never notices, you keep the sale.
Network tokens
Cards are kept as Visa and Mastercard network tokens that stay valid when a card is reissued: more renewals go through, less involuntary churn.
Subscription migration
Bring existing subscribers over from Stripe or another billing without asking them to re-enter cards. Renewal dates stay the same.
No payment team? We build the stack for you
Tell us your markets, volumes and products. We choose the providers that will approve you and your customers, handle applications, KYC and underwriting with each of them, and configure routing and fallbacks tuned on your real traffic. The consultation is free.

Live in a day

No billing code, no payment provider integration, no analytics setup. Three steps and your site takes subscriptions.

How it works
STEP 01
Add one script
One tag with your publishable key, working only on the sites you allow
→
STEP 02
Show plans and checkout
Prices in the visitor's currency, card form and wallets wherever your design needs them
→
STEP 03
Get paid, give access
Your page gets the subscription and access levels; your server gets them by webhook
checkout.js
W2WPay.init({ key: 'w2w_pk_…', user: { id: userId } });

const prices = await W2WPay.getPrices([12, 13]);    // in the visitor's currency
const checkout = await W2WPay.checkout({ price: prices[0].id });

checkout.mount('wallets', '#wallets');   // Apple Pay / Google Pay
checkout.mount('card', '#card');         // card form in your design
payButton.onclick = () => checkout.submit();

checkout.on('success', ({ subscription }) => unlock(subscription.access_levels));

Attribution and LTV from the first payment

Ad, campaign and UTM tags travel with the customer to the payment and every renewal, and the purchase goes back to your ad platforms from the server. Every cohort gets a revenue forecast as soon as the first payments arrive, so you scale the campaigns that pay back. See LTV Predictions.

{
  "event": "Purchase",
  "value": 59.99, "currency": "USD",
  "utm_campaign": "Broad_US_v3",
  "sent_to": ["Meta CAPI", "TikTok Events"]
}
Spend
$1,200
Revenue
$2,160
ROAS
1.8×
Illustrative event and campaign

The whole platform behind one checkout

Every subscription sold through the SDK appears in web2wave with renewals, LTV forecasts, ad attribution and a customer portal ready from day one.

Billing engine
Subscriptions that run themselves
Renewals and retries
Renewals charged automatically, failed payments retried, status always right.
One-click upsells
A second plan right after the purchase, charged to the saved card.
Trials and intro prices
Free or paid trials, first-period discounts, weekly to yearly, lifetime.
Local currencies
Prices in the visitor's currency, picked automatically.
Access levels
Check “premium” instead of price ids.
Growth analytics
Know what every customer is worth
LTV Predictions
Future revenue of every cohort and campaign within days.
Attribution
Each subscription tied to its ad, campaign and UTM tags.
Pixels with server events
Meta, TikTok, Snapchat and AppLovin Axon, deduplicated.
LTV and renewal analytics
Cohorts, renewals, refunds by plan, country and channel.
Product analytics
Same events to Amplitude, Mixpanel or PostHog.
Retention and support
Keep customers longer
Customer Portal
Plan, card, payments and cancellation, self-serve.
Email Sequences
Welcome, onboarding and win-back emails in every language.
CRM and messaging
HubSpot, Braze, Klaviyo, Mailchimp, CleverTap, SendGrid and more.
Support Desk
Emails and texts in one inbox, with each customer's subscription at hand.

Connects to everything you run

Mobile apps
Sell on the web, unlock in the app: RevenueCat, Adapty, Qonversion, Superwall, Apphud and deep-link sign-in.
Webhooks and API
Subscriptions, payments and events reach your server the moment they happen.
Your own database
A real-time copy of users and subscriptions in your PostgreSQL or MySQL.
A/B tests
Test whole paywalls, prices and plans with the embedded paywall.
MCP for AI agents
Let your AI assistant read revenue, subscriptions and users of your project. See web2wave MCP.

Who it is for

What you get
Web apps and SaaSSubscriptions in your product without building billing
Mobile appsSell on the web to skip app store fees, give access in the app
Landing and quiz buildersWebflow, Framer, Typeform or your own code: the checkout after any funnel
Agencies and growth teamsOne billing, analytics and attribution setup for every client project

FAQ

Do I need my own Primer or payment provider account?

No. Request activation and our team sets up Primer and the payment provider for your project. If you already have a Primer account, we connect it.

Do I have to use web2wave quizzes or paywalls?

No. The SDK works on any page of yours. If you want a ready paywall with A/B tests, embed one with a single call.

Can the checkout match my design?

Yes. Colors, fonts, corners, field sizes and the Apple Pay and Google Pay button style are set in one place, and the form is plain HTML your CSS can reach.

How do I give access after the payment?

Each price carries access levels such as “premium”. Your page gets them on success, and your server gets them from webhooks or one API call.

Is card data safe?

Card details are typed into Primer's secure fields, so they never touch your servers or ours.

Which payment providers can I use?

Stripe, Adyen, PayPal, Airwallex, Finby, Unlimit, Colibrix, Shift4 and 18+ more, through Primer or our direct integrations. Use one, or several at once with routing and fallbacks. The card form and wallet buttons run on Primer; providers connected directly work through the embedded paywall.

Can I keep my current provider and subscribers?

Yes. Keep your provider contract and connect it, and we migrate your existing subscriptions so customers do not have to enter their cards again.

Which payment methods are supported?

Cards, Apple Pay, Google Pay and PayPal, in the customer's local currency.

Related features

Start selling on your site today
Your checkout, our billing engine, analytics and growth tools.
Get started freeTalk to a payments expert
Share this Article

Build your web funnel with web2wave

Start using web funnels: Launch faster, convert better, and keep more revenue with no app store limitations