Sandbox

A full-featured copy of the production API for integration testing. The same request and response formats, the same endpoints — but without real money, real keys, or real orders.

A separate set of test keys

Configurable response scenarios

Data resets every 24 hours

Sandbox vs Production

Base URL (sandbox)
sandbox.api.giftapi.com
Base URL (production)
api.giftapi.com
Authorization key
sk_test_...
Real supplier orders
Not created
Webhook events
Sent as in production

How to get access

Get a test key

The sk_test_... key is available immediately after registration, with no business verification.

01

Replace the base URL

Send requests to sandbox.api.giftapi.com with the same request body.

02

Switch to production

Replace the key and base URL — your integration code remains unchanged.

03

Test identifiers for validating logic

test_successcompleted
Successful fulfillment on the first attempt
test_out_of_stockfailed
Simulates an out-of-stock product
test_pendingpending
Remains pending for 30 seconds before completing
test_invalid_accountfailed
Simulates an invalid number or account
test_webhook_retrypending
Tests webhook retry delivery

Use these values instead of a real product_id or player_id to test error handling without recreating real-world conditions.

Test order with a controlled outcome

POST sandbox.api.giftapi.com/orders
{
"product_id": "test_out_of_stock",
"quantity": 1
}
RESPONSE
{
"status": "failed",
"error_code": "out_of_stock"
}

How sandbox differs from production

Data resets every 24 hours

Data resets every 24 hours

All test orders and balances are reset once a day.

Test keys do not work in production

Test keys do not work in production

sk_test_... keys are rejected by api.giftapi.com and vice versa.

Stricter rate limit

Stricter rate limit

100 requests per minute instead of the production plan limit.

Catalog — a limited subset

Catalog — a limited subset

Sandbox provides a representative subset rather than all 2,000+ products.

FAQ

Are webhook notifications sent in sandbox?

Yes, to the same URL configured for production, but with "sandbox": true in the event body, so test and live events can share one handler.

Can I test a real product from the catalog?

Yes, regular product_id values from the catalog also work in sandbox and always return a successful result. Use the test identifiers from section 4 only to test errors.

Is business verification required for sandbox?

No, the test key is issued immediately after registration. Verification is only required when switching to a production key.

What happens if I accidentally use a sandbox key in production?

The request is rejected with a 401 error because each environment's keys only work with its own base URL.