Skip to main content
Kyren Pay provides a fully functional sandbox environment for testing your integration without processing real payments.

Sandbox Environment

SettingValue
Base URLhttps://test-api.kyren.top
API Key Prefixkyren_test_
Dashboarddashboard.kyren.top (switch to Test Mode)
The sandbox environment mirrors production exactly. All API endpoints, webhooks, and responses behave identically.

Test API Keys

Use your test API key (prefixed with kyren_test_) to interact with the sandbox:
curl https://test-api.kyren.top/v1/products \
  -H "x-api-key: kyren_test_xxxxxxxxxxxxxxxxxxxx"

Test Card Numbers

Use these test card numbers on the checkout page to simulate different payment scenarios:
Card NumberBehavior
4242 4242 4242 4242Payment succeeds
4000 0000 0000 0002Card declined
4000 0000 0000 9995Insufficient funds
For all test cards:
  • Use any future expiration date (e.g., 12/28)
  • Use any 3-digit CVV (e.g., 123)
  • Use any cardholder name
  • Use any billing address

Test WeChat Pay / Alipay

In the sandbox, QR code payments are automatically completed after a short delay. No actual scanning is required.

Testing Webhooks

When testing webhooks locally, you can use a tunneling tool like ngrok to expose your local server:
# Start your local webhook handler
node server.js  # listening on port 3000

# In another terminal, create a tunnel
ngrok http 3000
Then configure the ngrok URL as your webhook endpoint in the Dashboard:
https://abc123.ngrok.io/webhooks/kyren
Remember to update your webhook URL to your production endpoint before going live.

Going Live Checklist

Before switching to production, make sure you have:
1

Replace API keys

Switch from kyren_test_ to kyren_live_ keys
2

Update base URL

Change from test-api.kyren.top to api.kyren.top
3

Update webhook URL

Set your production webhook endpoint in the Dashboard
4

Verify webhook signatures

Ensure your server correctly verifies X-Kyren-Signature headers
5

Handle errors gracefully

Test error scenarios and ensure your app handles them properly