- Partners actively integrating against
thanxsandbox.comhosts - Anyone troubleshooting unexpected sandbox responses before escalating to Dev Support
1. Sandbox purchase processing has a noticeable delay
Sandbox purchase processing runs on a lower-priority worker pool, so a successfulbilled basket or a sandbox POST /purchases request will not show up immediately.
| Environment | Typical latency |
|---|---|
| Production | Near real-time |
| Sandbox | 15 minutes, commonly up to 30+ minutes |
2. Array query parameters require bracket notation
When a Thanx endpoint accepts an array filter (e.g., filtering rewards by state), the query parameter name must include[] — dropping the brackets causes the server to interpret the value as a single string instead of an array element.
Wrong:
The Get Rewards endpoint documents this directly. The same convention applies to any array-valued filter across the Consumer, Partner, and Loyalty APIs.
3. Granting rewards in sandbox — POST /rewards/grant
You don’t need to trigger campaigns or wait for earn conditions to test rewards in sandbox. Use POST /rewards/grant to issue any configured campaign’s reward directly to a user.
Availability: Sandbox only. The endpoint is disabled in production.
Required parameters:
campaign_id— the hashid form of the program’sexternal_uid, not the numeric program IDuser_id— the user to grant the reward to
campaign_id: Ask Dev Support for the hashids of the campaigns set up on your sandbox merchant, or look them up in the merchant’s admin. Using the numeric program ID will not resolve — the endpoint only accepts the hashid-encoded external UID.
4. Simulating a purchase in sandbox — POST /purchases
To test points accrual, tier progression, or campaign triggers that depend on a completed purchase, use POST /purchases. This is the only way to create a sandbox purchase without going through a live POS or payment processor.
Availability: Sandbox only.
Behavior:
- Processed asynchronously — the endpoint returns no JSON body
- The purchase takes the usual 15–30+ minutes to land (see §1)
- Poll
GET /purchasesto confirm ingestion — see guidance below
- Wait at least 60 seconds before the first poll
- Use exponential backoff — start at 60s, double up to a 5-minute cap
- Stop polling as soon as the purchase appears, or after ~45 minutes total
- This is a sandbox-only pattern for verifying test setup. Production integrations should not poll — sandbox latency is a sandbox artifact and does not reflect production behavior.
Loyalty API integrations use
POST /baskets with state billed instead of POST /purchases. POST /purchases is specifically for Consumer API sandbox testing.5. Test cards trigger fraud detection on protected rewards
Commonly-used shared test card numbers (e.g., the standard Visa/MC test PANs) are flagged as high-risk by Thanx’s fraud engine. When this causes problems:- Fraud-protected reward types include intro, birthday, winback, and signup rewards
- Using a shared test card on a user registered to one of these rewards will silently fail to earn/activate
- You’ll see no error — just no reward
- For fraud-protected reward flows, register a unique card number per test user (only the first 6 and last 4 digits need to be valid; the middle digits can be random but consistent)
- For non-protected reward types (points products, free-item rewards), shared test cards are fine