TinyShip
TinyShip
 TinyShip
TinyShip
TinyShip Documentation
TinyShip User GuideGetting StartedBasic Configuration
Payment ConfigurationStripe ConfigurationPayPal ConfigurationWeChat Pay ConfigurationAlipay ConfigurationCreem ConfigurationDodo Payments ConfigurationWaffo Pancake ConfigurationDynamic PricingPayment Testing
Credits System ConfigurationAffiliate 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

Waffo Pancake Testing

Test Mode

API keys are bound to Test or Production at creation time — there is no separate TEST_MODE switch:

WAFFO_MERCHANT_ID=MER_xxxxxxxxxx
WAFFO_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
# Optional. Dashboard RSA public key, not a Stripe-style webhook secret
# WAFFO_WEBHOOK_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"

Dynamic pricing: fill in the real PROD_xxx in pricing_plan. Static pricing: set waffoProductId in config/payment.ts.

Test Card Numbers

Card NumberScenario
4576 7500 0000 0110Visa Credit success
2226 9000 0000 0110Mastercard Credit success
4576 7500 0000 0220Visa Credit decline
  • Expiration date: any future date; CVC: any three digits
  • The Test Mode checkout offers Quick Fill → Visa Success
  • See Waffo Configuration

Checkout is two steps: email/country → Continue → card or Quick Fill → Subscribe. After payment, Waffo shows a hosted success page first — click Done to return to /payment-success?provider=waffo.

Local Webhook Testing

Use ngrok or Cloudflare Tunnel and configure:

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

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

Dynamic Pricing

Manage pricing plans in real time from the admin panel, without code changes or redeployment

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 TestingWaffo Pancake TestingTest ModeTest Card NumbersLocal Webhook TestingCommon IssuesWebhook Not Receiving CallbacksSignature Verification Failed