Back to Home

Sandbox / Test Mode

Stripe Checkout Test Page

Test every Stripe payment flow before going live. Use test card 4242 4242 4242 4242 (any future expiry, any CVC). For ACH: account 000123456789 / routing 110000000. For failed payment: 4000 0000 0000 0002.

Important: Stripe checkout only works on the published app, not in the editor preview. Publish the app first, then open this page on the published URL to test.

Payment Formula (all programs):

deposit = final_total × 10%  |  payment_2 = (final_total - deposit) ÷ 2  |  payment_3 = final_total - deposit - payment_2

Example: $6,250 → $625 deposit / $2,812.50 pickup / $2,812.50 drop-off

Behavior-Gating Rule:

If a dog has ANY behavior flag (aggression, bite history, reactivity, resource guarding, other issues), the customer CANNOT pay until DSC reviews and locks pricing. Standard dogs with no flags proceed directly to deposit checkout.

Before testing discounts:

Create test discount codes first at Admin → Discount Codes. Create a fixed-dollar code (e.g. TEST250 = $250 off, applies to B&T) and a percentage code (e.g. TEST10 = 10% off, applies to products) to test all scenarios.

Physical Products (with discount support)

Card / Apple Pay / Google Pay. Enter a discount code to see the adjusted price before paying.

50 Ft Nylon Long Line

$35 — one-time

Slip Leash — 6 ft

$30 — one-time

Civilian Memberships

Recurring subscriptions. Discount codes apply to the first invoice only.

Monthly Membership

$29.99/mo — recurring

Annual Membership

$239.88/yr — recurring

Tactical Subscriptions

Requires login. Discount codes apply to the first invoice only.

Handler Monthly

$19/mo — recurring

Handler Annual

$199/yr — recurring

Agency Annual

$1,199/yr — up to 20 handlers

Behavior Modification Pricing Calculator

Test the pricing order: base price → + behavior surcharge → pre-discount total → - discount → final → 3 staged payments. All calculations use integer cents server-side to prevent rounding errors.

Discount applies to the PRE-DISCOUNT total (base + behavior), not the base alone.

Payment Breakdown

Base Program (4 weeks):$4,500
Pre-Discount Total:$4,500
Final Program Total:$4,500

3 Staged Payments

① Deposit (10%):$450
② Pickup Day:$2,025
③ Drop-off Day:$2,025
Sum check:$4,500 = $4,500 ✓
Total weeks:4 weeks

Board & Train Programs (with discount + ACH)

Staged payments with Card or ACH choice. Discount applied to total first, then all 3 payments recalculated. Enter a discount code on the Payment Plan step to see the adjusted schedule.

Puppy Kindergarten

$2,500 — 3 staged payments (card or ACH)

4-Week On-Leash Obedience

$4,500 — 3 staged payments (card or ACH)

6-Week Advanced Off-Leash Obedience

$6,500 — 3 staged payments (card or ACH)

Test Checklist

1

Physical product purchase

Card / Apple Pay / Google Pay

2

Physical product with discount code

Enter code → see discount → pay adjusted price

3

Invalid / expired discount code

Code rejected, price unchanged

4

Civilian monthly membership

$29.99/mo subscription

5

Civilian annual membership

$239.88/yr subscription

6

Board & Train deposit

10% deposit, card or ACH

7

B&T deposit with fixed-dollar discount

e.g. $250 off → recalculate all 3 payments

8

B&T deposit with percentage discount

e.g. 10% off → recalculate all 3 payments

9

B&T second payment (pickup day)

Auto-emailed by daily reminder workflow

10

B&T final payment (drop-off day)

Auto-emailed by daily reminder workflow

11

Gear / cart checkout

Multiple items in cart

12

Tactical monthly subscription

$19/mo handler plan

13

Tactical annual subscription

$199/yr handler plan

14

Tactical agency subscription

$1,199/yr agency plan

15

Refund

Issue in Stripe dashboard → webhook updates Base44

16

Failed payment

Use card 4000 0000 0000 0002 → no records damaged

17

Canceled subscription

Cancel in Stripe → access revoked in Base44

18

ACH Board & Train payment

Bank transfer — lower fees, 4-day settle

19

Standard 4-week On-Leash — no aggression

$4,500 → $450 / $2,025 / $2,025 — pays deposit immediately

20

Standard dog proceeds directly to checkout

No behavior flags → auto-locked → Stripe deposit checkout immediately

21

4-week On-Leash + 2 behavior weeks

Base $4,500 + $2,000 = $6,500 → $650 / $2,925 / $2,925

22

4-week On-Leash + behavior + $250 discount

$6,500 - $250 = $6,250 → $625 / $2,812.50 / $2,812.50

23

4-week On-Leash + behavior + % discount

Percentage off pre-discount total → all 3 payments recalculated

24

6-week Off-Leash + 2 behavior weeks

Base $6,500 + $2,000 = $8,500 → $850 / $3,825 / $3,825

25

6-week Off-Leash + behavior + discount

Discount applies to pre-discount total → 3 payments recalculated

26

Different admin-selected number of weeks

e.g. 3 or 4 additional weeks — flexible

27

Aggression-flagged enrollment CANNOT pay before pricing locked

Behavior flags → status 'Pricing Review Required' → no checkout until admin locks

28

Direct checkout URL attempt rejected server-side

Opening /board-and-train/pay/:id before lock → 'Enrollment Under Review' screen

29

Attempted frontend manipulation of behavior surcharge

Server rejects client-supplied behavior fields — RLS blocks customer updates

30

Payment 2 calculation after behavior extension

Pickup payment reflects adjusted total

31

Final payment calculation after behavior extension

Drop-off payment reflects adjusted total

32

Refund on discounted behavior-modification enrollment

Webhook restores correct balance

Verify After Each Test

Stripe records the payment (check Stripe dashboard → Payments)
Base44 records the payment (check StripeEvent + entity records)
Discounts are calculated server-side correctly (check metadata in Stripe)
B&T payment stages recalculate correctly after a discount
Original price AND discounted price are both recorded on the enrollment
Base44 B&T balance updates correctly (amount_paid_to_date / remaining_balance)
No duplicate payment record is created (StripeEvent idempotency check)
Customer confirmation email is sent through Resend
DSC receives a payment notification at DSTCD@outlook.com
Payment confirmation identifies any discount used
Failed payments do NOT mark the customer paid
Refunds update Base44 correctly (balance restored, stage reverted)
Subscription cancellation removes/updates access correctly

Wix Payments (Base44 Payments) remains live on all public pages. This test page uses Stripe sandbox only. After all tests pass, the live pages will be switched from Wix to Stripe.