Appearance
Payment Gateways
Payment gateways are how your customers pay for orders. Shop Craft supports four payment methods out of the box: Razorpay, Stripe, PayPal, and Cash on Delivery. You can enable one or more gateways depending on your needs.
Go to Admin > Settings and select the Payment tab.
Important
At least one payment gateway must be enabled for customers to place orders. If no gateway is enabled, the checkout process will not work.
Razorpay
Razorpay is a popular payment gateway in India that supports UPI, cards, wallets, and net banking.
Setup Steps
- Sign up at razorpay.com and complete your business verification
- Go to your Razorpay Dashboard > Settings > API Keys
- Generate a new API key pair
- In Shop Craft, go to Admin > Settings > Payment
- Find the Razorpay section and enter:
| Field | Where to Find It |
|---|---|
| Key ID | Razorpay Dashboard > Settings > API Keys (starts with rzp_live_ or rzp_test_) |
| Key Secret | Shown once when you generate the API key — save it securely |
- Toggle the gateway to Enabled
- Click Save
Webhook Configuration
Webhooks are essential for Razorpay to notify your store about successful payments. Without webhooks, online payments may not be properly recorded.
- Go to your Razorpay Dashboard > Settings > Webhooks
- Click Add New Webhook
- Enter the webhook URL:
https://yourdomain.com/webhooks/razorpay- Select the events to listen for (at minimum:
payment.captured,payment.failed) - Set a webhook secret (optional but recommended)
- Click Create Webhook
WARNING
The webhook URL must use HTTPS and must be publicly accessible. If you are testing locally, webhooks will not work — use Razorpay's test mode for development.
Test Mode vs. Live Mode
- Test mode keys start with
rzp_test_— use these for testing without real money - Live mode keys start with
rzp_live_— use these when your store is ready for real customers
Make sure you switch to live keys before launching your store.
Stripe
Stripe is a widely used global payment gateway that supports credit cards, debit cards, and various local payment methods.
Setup Steps
- Sign up at stripe.com and complete your account setup
- Go to your Stripe Dashboard > Developers > API keys
- In Shop Craft, go to Admin > Settings > Payment
- Find the Stripe section and enter:
| Field | Where to Find It |
|---|---|
| Publishable Key | Stripe Dashboard > Developers > API keys (starts with pk_live_ or pk_test_) |
| Secret Key | Stripe Dashboard > Developers > API keys (starts with sk_live_ or sk_test_) |
| Webhook Signing Secret | Created when you set up your webhook endpoint (starts with whsec_) |
- Toggle the gateway to Enabled
- Click Save
Webhook Configuration
- Go to your Stripe Dashboard > Developers > Webhooks
- Click Add endpoint
- Enter the webhook URL:
https://yourdomain.com/webhooks/stripe- Select events to listen for:
checkout.session.completedpayment_intent.succeededpayment_intent.payment_failed
- Click Add endpoint
- After creating the endpoint, click on it and find the Signing secret — copy this value
- Enter the signing secret in Shop Craft's Stripe settings as the Webhook Signing Secret
Critical Step
The Webhook Signing Secret is essential for security. It verifies that webhook notifications are genuinely from Stripe and not from a malicious third party. Never skip this step.
Test Mode vs. Live Mode
- Test mode keys start with
pk_test_andsk_test_ - Live mode keys start with
pk_live_andsk_live_
Stripe has a built-in test mode toggle in the dashboard — use it to switch between test and live environments.
PayPal
PayPal lets customers pay using their PayPal account or credit/debit cards.
Setup Steps
- Sign up for a PayPal Business account at paypal.com
- Go to the PayPal Developer Dashboard
- Create a new app in My Apps & Credentials
- In Shop Craft, go to Admin > Settings > Payment
- Find the PayPal section and enter:
| Field | Where to Find It |
|---|---|
| Client ID | PayPal Developer Dashboard > Your App > Client ID |
| Client Secret | PayPal Developer Dashboard > Your App > Secret (click "Show") |
- Toggle the gateway to Enabled
- Click Save
Webhook Configuration
- Go to the PayPal Developer Dashboard > My Apps & Credentials
- Select your app
- Scroll down to Webhooks and click Add Webhook
- Enter the webhook URL:
https://yourdomain.com/webhooks/paypal- Select the event types to subscribe to (payment-related events)
- Click Save
Sandbox vs. Live Mode
PayPal has separate sandbox and live environments:
- Sandbox — Use sandbox credentials from the Developer Dashboard for testing
- Live — Use live credentials from your actual PayPal business account for real transactions
Cash on Delivery (COD)
Cash on Delivery allows customers to pay when they receive their order. No API keys or configuration are needed.
Setup
- Go to Admin > Settings > Payment
- Find the Cash on Delivery section
- Toggle it to Enabled
- Click Save
That is it! COD is the simplest payment method to set up.
TIP
COD orders are automatically set to Confirmed status when placed, since no online payment verification is needed. The customer pays the delivery person when the package arrives.
When to Use COD
COD is popular in markets where:
- Customers prefer to see the product before paying
- Credit/debit card usage is less common
- Building trust with new customers
WARNING
COD carries a higher risk of order cancellations and returns compared to online payments. Consider whether COD is appropriate for your business before enabling it.
Webhook Summary
Here is a quick reference for all webhook URLs:
| Gateway | Webhook URL |
|---|---|
| Razorpay | https://yourdomain.com/webhooks/razorpay |
| Stripe | https://yourdomain.com/webhooks/stripe |
| PayPal | https://yourdomain.com/webhooks/paypal |
Replace yourdomain.com with your actual domain name.
DANGER
Webhooks are critical for online payment processing. Without properly configured webhooks:
- Payments may not be recorded in your store
- Orders may remain stuck in "Pending" status
- Customers may not receive order confirmation emails
Always verify your webhooks are working after setup. Most payment gateways have a "Test webhook" feature in their dashboards.
Troubleshooting
Payments are not being recorded
- Verify your API keys are correct and not expired
- Check that webhook URLs are configured in your payment gateway dashboard
- Ensure your website uses HTTPS (webhooks require SSL)
- Check
storage/logs/laravel.logfor error messages
"No payment methods available" at checkout
- Make sure at least one payment gateway is enabled in Settings
- Verify the gateway credentials are filled in correctly
Test payments work but live payments fail
- Make sure you have switched from test/sandbox keys to live keys
- Verify your payment gateway account is fully activated and verified
Next Steps
- Shipping — Set up shipping rates and zones
- Email / SMTP — Configure email notifications