Skip to content

Technology · Payments

Stripe Integration

Three languages, country-based pricing, promo codes, and a cash referral system, all in one checkout: Stripe is what we reach for when payments can't be an afterthought.

Written by Ing. Hlib Yarovyi, Founder

3

languages with fully localized Stripe checkout, including translated product descriptions and country-based pricing

Astrooly needed users to see their own language across the entire payment flow, not just a translated interface — Stripe's locale parameter handles UI translation, but product names and descriptions need separate translated fields passed through Stripe's custom fields. Server-side IP geolocation determines the pricing tier before the session is even created, with a fallback for when detection fails.

Where Stripe Fits

Most Stripe integrations stop at 'accept a card payment.' The harder version — the one that actually matters for a product selling internationally — is making sure a user in a different country sees their own language and a fair price without the checkout flow breaking underneath them.

On Astrooly, that meant three separate problems had to be solved together: translated product descriptions inside Stripe's hosted checkout page (not just the surrounding UI), server-side country detection that sets the price tier before the session is created, and a promotional discount code system that had to work correctly across every currency configuration at once.

We also built a cash referral system on top of the same Stripe integration — full-funnel attribution from click through to paid conversion, tracked server-side so it survives ad blockers and cross-device usage, with a referrer dashboard showing clicks, signups, and commission earned. That's the layer most Stripe integrations never touch, because it requires the payment logic and the attribution logic to agree on what counts as a conversion.

What We Build With It

01

Multilingual Checkout

Stripe's locale parameter sets checkout UI language; translated product names and descriptions pass through Stripe's custom fields so the entire flow, including the hosted checkout page, matches the user's language.

02

Server-Side Country-Based Pricing

IP geolocation determines the pricing tier before a Stripe session is created, with a defined fallback for when detection is inconclusive — VPNs and corporate proxies don't get to break the checkout.

03

Promo Codes Across Currencies

Discount code logic that works consistently regardless of which currency and pricing tier a given session resolved to.

04

Cash Referral and Commission Tracking

Server-side attribution from link click through to paid conversion, surfaced in a referrer-facing dashboard showing the full funnel and total commission earned.

05

Webhook-Driven Order and Access Logic

Payment confirmation, subscription state, and access provisioning handled through Stripe webhooks rather than polling — so account state stays correct even if a user closes the tab mid-payment.

Common Questions

Can you build a multilingual SaaS with Stripe in each language?
Yes. We set Stripe's locale parameter for the checkout UI and pass translated product names and descriptions through Stripe's custom fields, so users see their own language across the entire payment flow, including the Stripe-hosted checkout page — this is exactly how Astrooly's 3-language checkout works.
How does country-based pricing work technically?
The server reads the request IP and runs a geolocation lookup before the Stripe session is created. The detected country maps to a pricing tier, which determines the currency and amount passed to Stripe. If detection fails, the system falls back to a default price rather than breaking the checkout.
Can Stripe handle a referral system with real cash commissions?
Stripe itself doesn't — that logic sits in a layer we build around it. Each referrer gets a unique server-side tracked link; clicks, signups, and paid conversions are attributed and stored server-side so attribution survives ad blockers, and the referrer sees the full funnel and commission total in their own dashboard.
What's the hardest part of a Stripe integration that most projects get wrong?
Assuming Stripe's locale parameter alone handles internationalization. It only translates the checkout UI chrome — product names, descriptions, and any custom line items still need to be passed in the user's language explicitly, or a 'multilingual' checkout ends up showing English product names inside a translated interface.

Need Payments That Work in Every Market You Sell To?

We build Stripe integrations with real localization, country-based pricing, and attribution logic that holds up under real traffic — not just a checkout button. If you have a product in mind, we can scope it clearly.