Testing in Sandbox

The sandbox environment (https://api.sandbox.paysquad.co) is a full replica of production with no real funds. Use it to build and verify your integration before going live.

Sandbox credentials are separate from production. Request them at [email protected].

Test cards

The Paysquad hosted flow uses Stripe for card entry. Any card from Stripe's test card list works in sandbox.

The most useful ones:

Card numberBehaviour
4242 4242 4242 4242Succeeds. Use this for the happy path.
4000 0000 0000 0002Card declined. Tests a failed contribution attempt.
4000 0025 0000 3155Requires 3D Secure authentication.
4000 0000 0000 9995Insufficient funds decline.

Use any future expiry date, any 3-digit CVC, and any billing postcode.

Triggering each webhook event

EventHow to trigger
paysquad.succeededComplete the hosted flow with enough contributions to meet the Paysquad total.
paysquad.cancelledStart the hosted flow as the Squad Leader, then cancel from within the flow.
paysquad.failed (Expired)Create a Paysquad with a short enforcedExpiry and wait for it to pass without meeting the total.
paysquad.failed (Abandoned)Create a Paysquad with a short enforcedExpiry and make no contributions.

Testing the full flow end-to-end

  1. Call POST /api/merchant/paysquad on the sandbox API with a small total (for example, 200 = $2.00 NZD).
  2. Redirect to the contributionLink in the response.
  3. Sign in or create a sandbox Paysquad account.
  4. Enter 4242 4242 4242 4242 as the Squad Leader's contribution.
  5. If the Squad Leader's contribution meets the total, the Paysquad completes immediately and paysquad.succeeded fires.
  6. To test multi-contributor flows, contribute a partial amount as the Squad Leader, copy the link, and open it in a second browser session to contribute the remainder.

Differences from production

  • No real funds are moved. Stripe test mode is active throughout.
  • Webhook signing keys differ from production. Make sure you use the sandbox signing key when validating sandbox webhooks.
  • Transaction emails are limited in Sandbox. Paysquad only sends them to verified users who have access to that merchant in the Sandbox Merchant Portal, plus Paysquad internal QA domains. Add any test recipients as authorised merchant users before running email-based tests.
  • Settlement does not occur in sandbox.