Cards Tokenization & Direct Charge API
Safepay's card tokenization worked, but using it took nine steps across six token types, far too raw to hand a merchant. I designed one merchant endpoint that hides all of that behind a single call, so returning customers at Yango and Temu pay card-on-file. It unlocked $251K+ in new monthly volume.

Simpaisa processed every card payment as a one-time transaction. A returning customer re-entered their full card and cleared a 3DS challenge on every single purchase, treated like a brand-new customer on their hundredth ride or tenth order. For merchants like Yango and Temu, whose whole model is repeat purchase, that friction cost conversion on every transaction, and we had no card-on-file option to stop it. The only path to one ran through Safepay, and their tokenization was rough to work with. They'd built their own ecosystem, and the calls you had to make were far too cumbersome to hand to a merchant.
I wanted it to feel like Stripe: one clean call, with the complexity hidden. I researched what merchants actually wanted and what would make their integration easier, then took ownership of both halves. On the Safepay side, I mapped their four flows end to end: raw card capture, token-initiated charges with and without 3DS, and zero-amount tokenization, including the secure-gateway hop for raw card numbers, the Atoms SDK handshake, and the wallet lookup that returns the reusable token. On the merchant side, I collapsed all of it into a single POST. Four parameters (payment_type, source.type, amount, and 3ds.enabled) route five capabilities, and merchants only ever hold opaque references, never a raw card or a Safepay primitive.
Every checkout was treated like the first one.
The friction wasn't really the checkout. It was that every checkout behaved like a first checkout. A returning customer re-entered their card and cleared 3DS again for the hundredth ride or the tenth order, exactly as they had the very first time. For Yango and Temu, whose economics depend on repeat purchase, that cost landed on every transaction. What they needed was card-on-file: save the card once, then charge it with a single call.
Hide all of it behind one call.
Safepay's tokenization is capable but raw. Four flows keyed on different entry modes, a frontend SDK doing device fingerprinting and the 3DS challenge, a separate hop through Simpaisa's secure gateway for raw card numbers, and a set of tokens (customer, tracker, request, card, payment-method) threaded through nine steps. No merchant should have to learn all of that just to save a card.
So the merchant API exposes none of it. One POST /cards/payments routes all five capabilities from four parameters. The riskiest one, charging an already-saved card without a fresh 3DS challenge, sits behind a per-merchant flag that needs a risk review before it can be switched on. Sequential transaction IDs became opaque UUID tracker_ids. A missed webhook can't lose a token, because the Inquiry API returns it as a second channel. And the same customer never spawns a duplicate record.
One request shape · four parameters · five capabilities
tokenizationsource.typecardamount> 03ds.enabledtrueresolves toCharge now, save the cardtokenizationsource.typecardamount0.003ds.enabledtrueresolves toZero-auth, card on filedirectchargesource.typec_tokenamount> 03ds.enabledtrueresolves to3DS repeat chargedirectchargesource.typec_tokenamount> 03ds.enabledfalseresolves toSynchronous · no redirectPOST /cards/tokensFour parameters disambiguate every flow. The merchant sends one request shape and Simpaisa routes it. C4, the frictionless one-call charge, ships behind a per-merchant risk flag before it switches on.
Two flagship merchants, live on card-on-file.
Yango and Temu both onboarded onto the new flows, which unlocked $251K+ in monthly payment volume at a 71% first-attempt success rate, with PCI DSS certification carried through to completion. Returning customers now check out in one call, with no re-entry, no redirect, and no challenge. And Simpaisa finally has the card-on-file primitive it needs to build subscriptions and one-tap repeat checkout on top of.
What the merchant never sees
Operator integrationSafepay × CyberSource · I mapped it
Merchant APISimpaisa Cards · what they call