Stripe Setup
Stripe is the recommended payment gateway for accepting credit and debit cards.
Why Stripe?
Section titled “Why Stripe?”- Accept Visa, Mastercard, American Express
- International payments
- Automatic currency conversion
- Secure, PCI-compliant
- Fast payouts to your bank
Prerequisites
Section titled “Prerequisites”- Stripe account (stripe.com)
- Completed Stripe business verification
- Bank account connected for payouts
Setup Steps
Section titled “Setup Steps”1. Get Your API Keys
Section titled “1. Get Your API Keys”- Log in to Stripe Dashboard
- Go to Developers > API Keys
- Copy:
- Publishable Key (starts with
pk_) - Secret Key (starts with
sk_)
- Publishable Key (starts with
2. Configure Webhooks
Section titled “2. Configure Webhooks”Webhooks notify Pintas when payments complete.
- In Stripe Dashboard, go to Developers > Webhooks
- Click Add endpoint
- Enter URL:
(Replace with your domain if using custom domain)https://pintas.turbospark.my/api/stripe-webhook
- Select events:
checkout.session.completedpayment_intent.payment_failed
- Click Add endpoint
- Copy the Signing secret (starts with
whsec_)
3. Add Keys to Pintas
Section titled “3. Add Keys to Pintas”- Go to Settings > Payments
- Enable Stripe
- Enter:
- Publishable Key
- Secret Key
- Webhook Secret
- Save
4. Test the Integration
Section titled “4. Test the Integration”- Create a test order
- Select card payment
- Use Stripe test card:
4242 4242 4242 4242 - Any future expiry, any CVC
- Complete payment
- Verify order shows as Paid
Stripe Test Cards
Section titled “Stripe Test Cards”| Card Number | Result |
|---|---|
4242 4242 4242 4242 | Successful payment |
4000 0000 0000 0002 | Declined |
4000 0000 0000 9995 | Insufficient funds |
Troubleshooting
Section titled “Troubleshooting”Payments Not Updating
Section titled “Payments Not Updating”| Issue | Solution |
|---|---|
| Webhook not configured | Add webhook endpoint in Stripe |
| Wrong webhook URL | Verify URL matches your domain |
| Secret mismatch | Re-copy webhook secret |
| Webhook failing | Check Stripe webhook logs |
Viewing Webhook Logs
Section titled “Viewing Webhook Logs”- Stripe Dashboard > Developers > Webhooks
- Click your endpoint
- View recent deliveries
- Check for errors
Payment Failed
Section titled “Payment Failed”- Check Stripe Dashboard for error message
- Common issues:
- Card declined
- Insufficient funds
- 3D Secure failed
- Currency not supported
Stripe charges per successful transaction:
- Malaysia: 2.9% + RM1.00
- International: 3.9% + RM1.00
Fees deducted automatically from payments.
Payouts
Section titled “Payouts”Stripe sends funds to your bank:
- Malaysia: 7 business days
- Can be configured in Stripe Dashboard
Going Live
Section titled “Going Live”When ready for real payments:
- Complete Stripe business verification
- Switch to live API keys
- Update webhook with live endpoint
- Test with real small payment
- You’re live!