TinyShip
TinyShip
 TinyShip
TinyShip
TinyShip Documentation
TinyShip User GuideGetting StartedBasic Configuration
Payment ConfigurationStripe ConfigurationPayPal ConfigurationWeChat Pay ConfigurationAlipay ConfigurationCreem ConfigurationDodo Payments ConfigurationPayment Testing
Credits System Configuration
Storage Service ConfigurationDatabase ConfigurationCaptcha Configuration
Development Best PracticesLocal E2E Workflow
User GuidePayment

Payment Testing

How to test payment functionality

This document covers how to test various payment scenarios in development.

Stripe Testing

Test Card Numbers

Card NumberScenario
4242 4242 4242 4242Successful payment
4000 0000 0000 0002Card declined
4000 0000 0000 9995Insufficient funds

Local Webhook Testing

Use Stripe CLI to forward webhooks:

# Install Stripe CLI
brew install stripe/stripe-cli/stripe

# Login
stripe login

# Forward webhook
stripe listen --forward-to localhost:7001/api/payment/stripe/webhook

WeChat Pay Testing

Sandbox Environment

WeChat Pay provides a sandbox environment for testing, needs to be enabled in Merchant Platform.

Testing Notes

  1. Sandbox amounts are 1/100 of real amounts
  2. "Sandbox Test" indicator shows after scanning
  3. Callback must respond with 200 status code

Creem Testing

Test Mode

Use test API Key in test environment:

CREEM_API_KEY="test_xxx"

Dodo Payments Testing

Test Mode

Use test credentials and enable test mode:

DODO_PAYMENTS_API_KEY=TSxxxxxxxxxx
DODO_PAYMENTS_WEBHOOK_KEY=whsec_xxxxxxxxxx
DODO_PAYMENTS_TEST_MODE=true

Test Card Numbers

Card NumberScenario
4242 4242 4242 4242Successful payment
4000 0000 0000 0002Payment failed
  • Expiration date: any future date, for example 06/32
  • CVC: any three digits, for example 123
  • Cardholder name: any English name without numbers

Local Webhook Testing

Dodo Payments requires a publicly reachable Webhook URL during local development. Use ngrok or Cloudflare Tunnel and configure:

https://your-tunnel.example.com/api/payment/webhook/dodo

Common Issues

Webhook Not Receiving Callbacks

  1. Check if callback URL is correct
  2. Ensure server is accessible from public network
  3. Check firewall settings
  4. View webhook logs in payment platform

Signature Verification Failed

  1. Check if key is correct
  2. Ensure request body is not modified
  3. Check if timestamp is expired

Dodo Payments Configuration

Configure Dodo Payments

Credits System Configuration

Configure credit consumption and purchase functionality

On this page

Stripe TestingTest Card NumbersLocal Webhook TestingWeChat Pay TestingSandbox EnvironmentTesting NotesCreem TestingTest ModeDodo Payments TestingTest ModeTest Card NumbersLocal Webhook TestingCommon IssuesWebhook Not Receiving CallbacksSignature Verification Failed