SavaPay Developers

Sandbox

Exercise success and failure paths with pilot test credentials before moving your integration to production.

Test and launchNode.js and ExpressApproved merchant pilot
Browse developer documentationSandbox

Test your integration end to end before processing real payments. The sandbox follows the production flow: create a request, open hosted checkout, approve, and receive the webhook.

Sandbox setup

SavaPay provides test access to approved pilot merchants during onboarding. Your package contains the test API URL, API key, webhook signing secret, and test-customer steps. Keep test configuration separate from production.

Run these checks

  1. Create a payment request and open the checkout link.
  2. Approve the payment as a test customer.
  3. Confirm your server receives payment.succeeded.
  4. Check payment status before completing the test order.
  5. Send the same create request twice with the same idempotency key and confirm the original intent is returned.
  6. Retry with a different amount and confirm your system handles idempotency_conflict.
  7. Reject a webhook with an invalid signature and confirm your server returns 400.
  8. Test a refund and confirm your system receives the update.

What to test

ScenarioExpected outcome
Happy pathIntent created → customer approves → succeeded webhook fires
Customer never approvesIntent moves to expired when the checkout window ends
Merchant cancelsUnpaid intent moves to cancelled
RefundSucceeded payment moves to refunded and the webhook fires
IdempotencySame key and request returns the original intent; a changed request returns idempotency_conflict
Bad signatureYour webhook handler rejects with 400

Simulating a payment

Create an intent with your test key, open the returned checkoutUrl, and approve as the customer:

javascript
const intent = await sp.createPaymentIntent(
  { amount: 1299, currency: 'USD', merchantReference: 'test-1' },
  'test-1'
)
// Open intent.checkoutUrl in a browser, approve as the customer,
// then watch for the payment.succeeded webhook.

Ready for production

Before accepting live payments, confirm:

  • Your merchant account is active.
  • Your production webhook URL is public and uses HTTPS.
  • Your server verifies webhook signatures.
  • Your system stores processed webhook event IDs.
  • Every write request uses an idempotency key.
  • Payment amounts use whole cents, without floating-point math.
  • Your team tested successful payments, failures, cancellations, expiry, and refunds.

Go live

Replace sandbox settings with production settings. Run one small real payment through the complete order flow and confirm your records match SavaPay. For activation, see: Authentication

Before processing real customer payments, review: Production readiness

Maintained byDeveloper Experience

Last reviewed

Was this page helpful?