Stripe Configuration Guide

Stripe is a global leading online payment service provider, supporting credit cards, Apple Pay, Google Pay and other payment methods, suitable for cross-border e-commerce scenarios.

Prerequisites

Register Stripe Account

Visit stripe.com to register account and complete enterprise verification.

Get API Keys

Get Publishable key and Secret key in Dashboard -> Developers -> API keys.

Configure Webhook

Add callback endpoint in Developers -> Webhooks, get Webhook signing secret.

Configuration Steps

1

Step 1: Enter Payment Platform Management

In admin panel go to Payment Platform Management, find Stripe configuration item.

2

Step 2: Fill in Key Information

Fill in Publishable key (frontend use), Secret key (backend use), Webhook secret.

3

Step 3: Configure Callback URLs

Success URL: https://yourdomain.com/payment/stripe/success Cancel URL: https://yourdomain.com/payment/stripe/cancel

4

Step 4: Select Payment Methods

Select supported payment methods, such as card (credit card), apple_pay, google_pay, etc.

5

Step 5: Set Currency

Set default currency code, such as USD, EUR, GBP, etc.

6

Step 6: Save and Test

Use test keys and test card numbers to verify configuration is correct.

Test Card Numbers

Use the following test card numbers to test payment process in sandbox environment:

4242 4242 4242 4242Payment success
4000 0000 0000 3220Requires 3D verification
4000 0000 0000 9995Card declined

CVV: any 3 digits, Expiry date: any future date

Notes

  • Test keys start with sk_test_, production keys start with sk_live_
  • Production environment must use HTTPS
  • Webhook endpoint needs to be publicly accessible
  • Recommend configuring both success and cancel callback URLs

FAQ

How to switch to production environment?

Set test_mode to false, use production keys (sk_live_xxx), ensure callback URLs use production domain.

Webhook not received?

Use Stripe CLI for local testing: stripe listen --forward-to http://localhost:8080/api/v1/payments/callback/stripe