Guara · Guides

Card program go-live checklist: from sandbox to live

What to settle before your first live card: scoped keys, retry-safe requests, signed webhooks, a fast authorization endpoint, card details, funding.

· 7 min read

The sandbox makes the first card easy: test keys right after sign-up, test money, a simulator for purchases and declines. Moving to live is, on paper, a different key and a different base URL. In practice, everything that is harmless with test money — a retried request, a webhook handled twice, a key that can do more than it should, an authorization endpoint that is a little slow — starts to cost real money the day you switch.

This is the checklist we would walk through before issuing the first live card to a real user. It is written for teams putting cards inside their own product: wallets, marketplaces, SaaS tools, AI agent platforms.

1. Keys: one per job, the smallest scopes that work

Test keys start with gp_test_ and work only against https://api-sandbox.guarapay.io/api/v1/partner. Live keys start with gp_live_ and work only against https://api.guarapay.io/api/v1/partner. A test key can never move real money, and a live key never works in the sandbox. Keep the key and the base URL in one config entry per environment, so they cannot be mixed up by a half-finished deploy.

Then split live keys by job. Each key has its own scopes, and a request outside them gets 403:

  • The service that issues and funds cards needs cards:issue and cards:write.
  • A support tool that shows a user their card and history needs cards:read and transactions:read.
  • A finance or reconciliation job needs only transactions:read.
  • Whatever sets up webhook endpoints needs webhooks:manage — usually a one-off script, not a running service.
  • An AI agent connected over MCP gets only the scopes its task needs; over MCP the number of cards one key can issue per day is capped as well.

Treat a 403 in your logs as a bug to fix, not a request to retry.

Keys are shown once, when you create them in the console, so put them straight into your secret store. Up to two keys can be active at the same time, which gives you rotation without downtime: create the new key, deploy it, call GET /v1/partner/me to confirm the environment and the scopes, then revoke the old key. A revoked key stops working on the next request.

Finally, remember that the rate limit is per partner and shared by all its keys. Over the limit the API answers 429 with Retry-After. A heavy batch job can slow down your issuing service if both run at the same time — honour Retry-After everywhere and schedule bulk work away from your peaks.

2. Make every money call safe to retry

Issuing a card and funding a card require an Idempotency-Key header; without one the API answers 422 idempotency_key_required. The rules are simple and worth knowing by heart:

  • A retry with the same key and the same body returns the first answer with Idempotent-Replayed: true. A card is never issued twice.
  • The same key with a different body gets 422 idempotency_key_reused.
  • A retry while the first request is still running gets 409 idempotency_in_progress.
  • Only successful answers are kept, so a failed request can be retried with the same key.

The mistake to avoid is generating a fresh key on every attempt — that turns a network timeout into a duplicate card. Derive the key from your own operation (the sign-up, the top-up order) or create it once and store it before the first call.

Also decide up front what each conflict means for your users. insufficient_balance means your partner balance needs a top-up — alert on it, do not show it to the end user as a card error. issuing_paused, card_blocked, card_cancelled and card_pending each deserve their own message or retry path rather than one generic failure.

3. Expect cards to start as pending

A newly issued card can come back as pending. Store it anyway, tied to your external_user_id, and wait for the card.issued webhook or read the card again before you fund it or show it to the user. Building your interface around this state from the start is much easier than adding a "your card is being prepared" screen after launch.

4. Webhooks: verified, idempotent, watched

You can register up to five HTTPS endpoints. The signing secret is shown only once, when the endpoint is created, and the live endpoint has its own secret — do not reuse the sandbox one in your config.

  • Verify X-GuaraPay-Signature on every delivery: HMAC-SHA256 of <t>.<raw body> with the signing secret, constant-time comparison, old timestamps rejected.
  • Answer 2xx once you have stored the event. Anything else is retried after 30 s, 2 min, 10 min, 30 min, 2 h and 6 h with the same event id, so handle a repeated id as a no-op.
  • After the live endpoint is created, send a webhook.test event and look at the endpoint's delivery log. Statuses there — queued, delivered, retrying, failed — are the first place to check when "a webhook did not arrive".

A delivery that keeps failing is marked failed after about nine hours. Pair webhooks with a periodic read of GET /v1/partner/transactions so a long outage on your side never leaves a gap in your records. Our guide on reconciling card spend with your ledger covers that job in detail.

5. The authorization endpoint, if you run one

You do not have to run one: without it, the card's limits, its status and your balance still decide every purchase. If you do, Guara sends your endpoint a signed card.authorization.request before each purchase — with the card id, your external_user_id, the amount in cents, the currency and the merchant — and your endpoint answers APPROVE or DECLINE.

The two facts that shape the design are the 1.2-second window and fail-closed behaviour: no answer in time, an error, or anything other than APPROVE declines the purchase. So:

  • Keep the decision path short. Read balances and per-user rules from a fast local store; do not call slow third-party services while a purchase is waiting.
  • Verify the signature first, exactly as for webhooks.
  • Watch your declines. Because the system is fail-closed, an outage of your endpoint does not let money out — it declines every purchase. A sudden rise in transaction.declined events is the alarm to wire up.
  • If your rules use merchant.mcc or merchant.country, note that both are null in the sandbox. Make sure your code handles a missing value deliberately instead of crashing, and check the real values on your first live purchases.

6. Card details and 3-D Secure

The API never returns the full card number or CVV. When a user wants to see their card, call POST /v1/partner/cards/{id}/details-frame and open the returned URL with its token in an iframe. The token opens the frame once and lives ten minutes, so request a new one every time the user taps "show card" — never cache it. Because card numbers never reach your servers, you do not need PCI DSS certification to show them.

When a store asks for a one-time 3-D Secure code, it reaches you as a signed threeds.code webhook with the card, the merchant and the amount. Route it to the right user or agent — a push notification, an in-app message — and keep GET /v1/partner/cards/{id}/3ds-codes as a fallback for a user who missed it.

7. Rehearse the unhappy paths in the sandbox

A simulated purchase in the sandbox goes through the same checks as live and asks your authorization endpoint, and events reach your webhooks. Use that to run the flows you hope never to see:

  • One POST /v1/sandbox/simulate/decline for each reason: insufficient_funds, do_not_honor, expired_card, suspected_fraud, merchant_blocked. Check what your user sees for each.
  • A refund of a posted purchase, then a second refund of the same purchase — the second should be refused, and your code should say so clearly.
  • A 3-D Secure code with POST /v1/sandbox/simulate/3ds, followed all the way to the user's screen.
  • Your webhook server switched off for a few minutes, to watch the delivery go to retrying and land once you are back.
  • Your authorization endpoint made deliberately slower than 1.2 seconds, to confirm the purchase is declined and your monitoring notices.
  • A key rotation done end to end, with GET /v1/partner/me before and after.

8. Switching to live

  • Approval. Anyone can sign up, but in live the console starts in limited mode until your business is approved in its Compliance section; in limited mode the amount you can deposit is capped. Start this early — it is the one step that does not depend on your code.
  • Funding. Top up the balance in USDT over TRC-20 or ERC-20 to the deposit address shown in the console. Money arrives after the network confirms the transfer; check it with GET /v1/partner/balance. Remember that each card issue takes the issue fee from this balance.
  • First card. Issue the first live card to an internal user, transfer a small amount, make one real purchase and follow it through: the authorization request, the transaction.posted webhook, your ledger and the transactions list. Then refund or cancel and check that the money comes back where you expect.
  • Then your users. Open issuing to a small group first and watch declines, webhook delivery and balance alerts for a few days before you open it to everyone.

Pricing depends on your volume. If you want to go through this list with the team, request access — what the cards are for and roughly how many per month — and you will hear back within one business day.

Access

Tell us what you're building.

Three steps from here to live cards.

  1. We reply within a business dayPricing for your volume, by email or in your messenger.
  2. You connect the APIKeys, webhooks and MCP for your agents.
  3. You go liveSwitch to live keys and issue cards to your users.
Prefer email? support@guarapay.io
What will the cards be for?
Cards per month