How to test payments in the Ruba sandbox

Short answer

Test payments in Ruba’s sandbox, a separate environment with its own dashboard, API and checkout. Create a test shop, make an access token inside the sandbox, point your code at the sandbox API, and pay with the test card 4242 4242 4242 4242, a future expiry and any CVC. No real money moves, and nothing touches your live shop.

A separate world on purpose

Ruba’s sandbox accepts the test card 4242 4242 4242 4242, so no real money moves. Aisha in Lahore is building her first paid feature. She is afraid of charging a real card by mistake. Ruba’s sandbox is a separate server, fully apart from your live data. Because it handles money and must account for every movement, it walls off test data so the two never mix.

You can run as many experiments as you like. Treat it as your personal development server.

Set it up in four steps

Getting started
  1. Step 1Open the sandboxsandbox.getruba.com.
  2. Step 2New organizationA test shop.
  3. Step 3Make a tokenInside the sandbox.
  4. Step 4Point your codeAt the sandbox API.
Figure 1From Ruba’s sandbox docs.

Choose New organization to create a test shop. Tokens made in production do not work in the sandbox, so create a new one there.

Dashboardsandbox.getruba.com
Use it forProducts, benefits, settings
TokensCreate them here
TeamAdd yourself for emails
MoneyNone moves

Great for Building and clicking around.

Watch for It is separate from your live dashboard.

Figure 2The three sandbox hosts, from Ruba’s docs.

Point your code at the sandbox

Ruba’s official SDKs have a setting for the sandbox. Here are two of them.

TypeScript
const ruba = new Ruba({
  server: 'sandbox',
  accessToken: process.env['RUBA_ACCESS_TOKEN'] ?? '',
})
Figure 3From Ruba’s sandbox docs. TypeScript.
Python
s = Ruba(
    base_url="https://sandbox-api.getruba.com",
    access_token="<YOUR_BEARER_TOKEN_HERE>",
)
Figure 4From Ruba’s sandbox docs. Python.

Two things that surprise people

First, emails. In the sandbox, customer-facing emails such as order confirmations and renewal reminders go only to people who belong to your sandbox organization. Add yourself under Settings, then Team. A +test alias works only if the address without it belongs to a member.

Second, webhooks. Endpoint URLs must be public https URLs, and localhost is not allowed. Use an https tunnel for local work.

Test checklist0 of 4
Tap each line you already have.
Figure 5Tap each line when it is done.

What to do next

Build, test, then go live. See the early-access deal. Ruba charges 4% + $0.50 per sale with no monthly fee, and every shop is reviewed before live payments. Related: handling webhooks.

The sandbox takes the test card 4242 4242 4242 4242, so nothing real moves. You need no company and no monthly fee to start. Early access gets your first paid feature a rate of 4% + $0.50 per sale, locked once you are approved and for as long as the account is open and in good standing. Ruba promises that a fee it never told you about is refunded, and that you get $100. Terms apply. See the early-access deal.

Questions people ask

What is the Ruba sandbox?

A separate testing environment with its own dashboard, API and checkout, fully apart from your live data. It was walled off on purpose, so test and live money never mix.

Which test card do I use?

Use 4242 4242 4242 4242 with a future expiration date and a random CVC to simulate a successful payment.

Do my live access tokens work in the sandbox?

No. You must create an access token inside the sandbox. A token created in production does not work there.

Why did I not get my test emails?

In the sandbox, customer-facing emails go only to people who belong to your sandbox organization. Add yourself under Settings, then Team. A +test alias works only if the address without it belongs to a member.

How do I test webhooks locally?

Webhook endpoint URLs must be public https URLs, and localhost is not allowed. Use an https tunnel for local development.

Sources

We check these when we update this guide. Rules can change, so check them yourself before you decide.

A note from FaizanHi, I’m Faizan, the founder of Ruba. I built it so people anywhere, from Pakistan, India and Bangladesh to the UK, the EU and the US, can sell software to the world and get paid at home.I wrote these guides to be as fair as I can. But I built Ruba, so I’m about as neutral as a parent at a school play. That’s why every fact has a source you can check.
Early access is live.

Sellers approved now keep 4% + $0.50 per sale locked for as long as they sell, plus +$100 if we ever charge a fee we never told you about. No company and no monthly fee. You are paid to a bank in your own name, in PKR, INR, BDT or 51 other currencies, whenever you ask, from $10. A payout costs $2 up to $200.

Applying is not approval. Terms apply.
All guides

Can’t find your country or currency? Email support@getruba.com.

This guide is general information, not legal, tax or financial advice. Other companies named here set their own rules, which can change. Check their websites before you decide.