How to Connect a Custom Domain, Stripe Payments and Courier Shipping to Your Online Store (Step-by-Step)
Short answer: In your Shop-E-Business dashboard, first open Advance → Custom Domain, add three DNS records (TXT _sb-challenge = your token, A @ = the platform IP, CNAME www = shopebusiness.com) and click Verify & Save Domain. Move the domain's DNS to Cloudflare (free plan), switch the records to Proxied and set SSL to Full (Strict). Then open Advance → Payment & Courier, save your ship-from address and parcel size, paste the generated Cloudflare Worker script, add the routes yourdomain.com/apiEndpoint and yourdomain.com/stripe-webhook, add four secrets and two variables, register the Stripe webhook and click Activate. Buyers then pay on Stripe Checkout and every paid order becomes an EasyPost shipment automatically — with 0% platform transaction fee and your keys kept in your own Worker.
What do you need before you start?
| Requirement | Details |
|---|---|
| Shop-E-Business subscription | $10/year (৳499 in Bangladesh), 0% transaction fees |
| Custom domain entitlement | Tier-2 ($18/year, ৳1,500) or the custom-domain add-on on Tier-1 ($8/year, ৳1,000). Not available during the 3-day trial. |
| A domain you own | Registered at any registrar. Shop-E-Business does not sell domains; it only lets you connect yours. |
| Cloudflare account | Free plan is enough. Required because the payment Worker only runs on Cloudflare-proxied records. |
| Stripe account | Start with test keys (sk_test_…). |
| EasyPost account | Start with the test API key. |
| Time | About 15 minutes for the domain plus DNS propagation (usually minutes), then the Stripe + EasyPost steps below. |
How does the whole flow work?
- Buyer checks out on your custom domain using the normal checkout or Order Now button.
- Shop-E-Business dispatches the order (items, totals, billing details and a unique
CustomOrderId) to your Worker's/apiEndpoint, signed with a short-lived HS256 JWT. - The Worker creates a Stripe Checkout Session and returns
{ redirectUrl }; the buyer is sent to Stripe's hosted page, which collects card, billing address and phone. - Stripe confirms payment by calling
/stripe-webhook; the Worker verifies the Stripe signature before doing anything. - The Worker books the shipment: it reads your current ship-from address and parcel size from Shop-E-Business, creates an EasyPost shipment referenced by the order ID and buys the cheapest rate that succeeds.
- Status flows back: delivery status, tracking URL and payment status appear in Custom Order Management and on the buyer's tracking page.
Part A: How do I connect a custom domain to my online store?
Step 1: Unlock the Custom Domain tab
- Log in to your seller dashboard, expand Advance in the sidebar and click Custom Domain.
- On Tier-2, the domain form is already shown — go to Step 2.
- On Tier-1, click Buy add-on key, complete the purchase, paste the key into Add-on license key and click Verify. The add-on is valid until your current subscription ends.
- On the free trial, subscribe from the Dashboard first, then come back.
Step 2: Copy your TXT verification record
In the card Verify ownership with a TXT record, your token is generated automatically. Copy the Name / Host (_sb-challenge) and the Value (your token).
Step 3: Add the DNS records
Enter only the host label; your DNS provider appends your domain automatically.
| Type | Host / Name | Value / Points to | TTL |
|---|---|---|---|
| TXT | _sb-challenge | Your verification token | Auto / 3600 |
| A | @ | Server IP shown in your Custom Domain tab | Auto / 3600 |
| CNAME | www | shopebusiness.com | Auto / 3600 |
Delete any existing A or CNAME records on @ and www that point somewhere else (for example a parking page). On Cloudflare, keep the A and CNAME records DNS only (gray cloud) while the domain verifies and the certificate is issued.
Step 4: Verify and save
- In Your domain, type the root domain, for example
myshop.com(https://andwww.are removed automatically). - Click Verify & Save Domain. Shop-E-Business looks up the
_sb-challengeTXT record and compares it with your token. - On success you see a green Verified & Active badge. If you see Domain not verified yet, fix the record, wait a few minutes and try again.
- Visit
https://yourdomain.com. Your oldyourshop.shopebusiness.comlink now redirects permanently to the custom domain, so links you already shared keep working.
Step 5: Move DNS to Cloudflare (free plan)
Skip this if your DNS is already on Cloudflare. You keep your registrar; only DNS moves.
- Create a free account at
dash.cloudflare.com/sign-up. - Click Add a domain, enter your root domain and choose the Free plan.
- Review the imported DNS records and add the three Shop-E-Business records if any are missing.
- At your registrar, replace the nameservers with the two Cloudflare shows you.
- Wait until Cloudflare marks the domain Active.
Step 6: Switch to Proxied and SSL Full (Strict)
- After the badge shows Verified & Active, edit the A and CNAME records and click the cloud so it turns orange (Proxied). Leave the TXT record as it is.
- Open SSL/TLS → Overview and choose Full (Strict). Never use Flexible: Shop-E-Business always redirects to HTTPS, so Flexible causes
ERR_TOO_MANY_REDIRECTS.
Proxied records give you Cloudflare caching and DDoS protection, and they are required for the Stripe and courier Worker. Full walkthrough with screenshots: custom domain step-by-step guide.
Part B: How do I set up Stripe payments and EasyPost shipping?
Step 7: Save your courier settings
Open Advance → Payment & Courier and fill card 1 · Courier settings (ship-from & parcel), then click Save courier settings.
| Field | Required? | Example / note |
|---|---|---|
| Sender name | Required | Also used as the customs signer for international parcels |
| Street | Required | Ship-from street address |
| City | Required | — |
| ZIP / postal code | Required | — |
| Country | Required | 2-letter code, e.g. US |
| Parcel length, width, height | Required | Default parcel size in inches |
| Parcel weight | Required | Default weight in ounces |
| Company, Street 2 / Apt / Suite, State / region, Phone | Optional | Sent to EasyPost when filled |
The Courier settings line in the checklist at the top turns green once nothing is missing. The Worker reads these values at shipment time, so later edits need no redeploy.
Step 8: Create the Cloudflare Worker
- In card 3 · Cloudflare Worker script, click Copy script. The script contains no secrets and no seller-specific values.
- In Cloudflare open Workers & Pages → Create Worker, paste the script and deploy.
- Add two Worker routes on your zone:
yourdomain.com/apiEndpointandyourdomain.com/stripe-webhook.
Step 9: Get your Stripe key and register the webhook
- In Stripe go to Developers → API keys and copy the Secret key (
sk_test_…for testing). - Go to Developers → Webhooks and add the endpoint
https://yourdomain.com/stripe-webhook. - Select the five events below.
- Open the new endpoint and copy its Signing secret (
whsec_…).
| Stripe event | What the Worker does |
|---|---|
checkout.session.completed | Runs the paid flow: books the EasyPost shipment and reports payment + delivery status |
checkout.session.async_payment_succeeded | Runs the paid flow for delayed payment methods |
checkout.session.async_payment_failed | Reports payment status Failed |
checkout.session.expired | Reports Expired / Not shipped |
charge.refunded | Reports Refunded (or Partially refunded) and attempts a best-effort EasyPost label refund |
Step 10: Get your EasyPost API key
In EasyPost open Account settings → API Keys and copy the test key for your trial run.
Step 11: Activate and copy the JWT secret
- In card 2 · Activate, check that the Order endpoint shows
https://yourdomain.com/apiEndpoint. - Click Activate. The badge turns Active and new orders are sent to your Worker; checkout switches from cash on delivery to online payment.
- Copy
SHOPEBUSINESS_JWT_SECRETfrom the same card and finish Step 12 right away.
Step 12: Add the Worker secrets and variables
In your Worker open Settings → Variables and Secrets and add:
| Name | Type | Value |
|---|---|---|
STRIPE_SECRET_KEY | Secret | Stripe secret key from Step 9 |
STRIPE_WEBHOOK_SECRET | Secret | Webhook signing secret (whsec_…) from Step 9 |
COURIER_API_KEY | Secret | EasyPost API key from Step 10 |
SHOPEBUSINESS_JWT_SECRET | Secret | JWT secret from the Activate card |
STRIPE_CHECKOUT_URL | Text | https://api.stripe.com/v1/checkout/sessions |
EASYPOST_SHIPMENT_URL | Text | https://api.easypost.com/v2/shipments |
Save the values (and deploy, if Cloudflare asks) so the Worker uses them.
Step 13: Place a test order
- Open a product on
https://yourdomain.comand order it. - On Stripe Checkout, pay with the test card
4242 4242 4242 4242(any future expiry and any CVC). - You land on
yourdomain.com/order-success. - In Advance → Custom Order Management the order shows payment status, delivery status and the EasyPost tracking link. The buyer sees the same on their tracking page.
Go-live checklist
- Custom domain shows Verified & Active; A and CNAME are Proxied; SSL/TLS is Full (Strict).
- Both Worker routes use your exact domain:
/apiEndpointand/stripe-webhook. - A test order went through end to end with card 4242… and shows a tracking link.
- Create a live-mode webhook in Stripe with the same URL and five events, and copy its new signing secret.
- Replace
STRIPE_SECRET_KEY,STRIPE_WEBHOOK_SECRETandCOURIER_API_KEYwith the live / production keys, then deploy.
Why is this setup cheaper and safer than a plugin?
| Topic | Shop-E-Business + your Worker | Typical hosted platform / plugin |
|---|---|---|
| Platform transaction fee | 0% — payments go straight to your Stripe account | Often an extra fee with third-party gateways, or a paid app |
| Where API keys live | Encrypted secrets in your own Cloudflare Worker | Platform, app vendor or your WordPress database |
| Message signing | JWT-signed dispatch both ways, Stripe signature verified on every webhook | Varies by app |
| Shipment creation | Automatic after payment, cheapest rate first | Manual or a separate shipping app |
| Failure handling | Any failure returns an error so Stripe retries for up to ~3 days; never buys a second label | Varies by app |
Under the hood: orders sent to the Worker carry an HS256 JWT issued by shopebusiness for seller-{your shop id} that expires in five minutes, and status updates sent back must be signed by your shop with the same secret. The Worker returns 200 to Stripe only after every step succeeds; a courier failure first records the payment with delivery status Courier error and then returns an error so Stripe retries. Shipments are looked up by order reference before buying, so retries and duplicate events never buy a second label. Every outbound call times out after 15 seconds and error messages are scrubbed of keys and tokens.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| Activate button is disabled | The checklist shows what's missing: a verified custom domain or required courier fields. Fix them and reload. |
| Checkout doesn't reach Stripe | Records must be Proxied (orange cloud) or Worker routes never run. Check both routes use your exact domain. |
| Stripe shows failed webhook deliveries | Usually a wrong STRIPE_WEBHOOK_SECRET (test vs live) or a missing secret. Stripe retries for about three days, so fixed deliveries catch up. |
| Order shows "Courier error" | Payment succeeded but EasyPost couldn't buy a label. Check the ship-from address, parcel size and COURIER_API_KEY; the next Stripe retry books the shipment without buying a second label. |
| "Domain not verified yet" | The TXT host must be just _sb-challenge (some providers add your domain twice if you type the full name) and the value must match the token. |
ERR_TOO_MANY_REDIRECTS | Cloudflare SSL is on Flexible. Set SSL/TLS → Full (Strict). |
| JWT secret leaked | Regenerate it in Advance → Expose API, then update SHOPEBUSINESS_JWT_SECRET in the Worker. |
Card Payments + Automatic Shipping, 0% Platform Fee
Store from $10 / ৳499 per year. Connect your own domain with Tier-2 or the add-on. Your keys stay in your Worker.
Start Your 3-Day Free TrialDetailed in-app guides on the platform: Stripe + courier integration guide, custom domain step by step, Stripe payments + EasyPost shipping and order API and webhooks. Building integrations for clients? Read Shop-E-Business as a developer platform. Related: Shop-E-Business vs Shopify vs WooCommerce vs Wix.
Frequently Asked Questions
What do I need before I can take Stripe payments and ship with EasyPost on Shop-E-Business?
A paid subscription with the custom domain feature (Tier-2 at $18/year or the custom-domain add-on at $8/year; ৳1,500 and ৳1,000 in Bangladesh), a verified custom domain you own whose DNS is on Cloudflare with Proxied records and SSL Full (Strict), complete courier settings, and your own Stripe and EasyPost accounts.
Does Shop-E-Business take a cut of my Stripe payments?
No. Shop-E-Business charges a 0% platform transaction fee. Payments go straight to your own Stripe account and you only pay Stripe's and EasyPost's own fees.
Where are my Stripe and EasyPost API keys stored?
Only in your own Cloudflare Worker as encrypted secrets: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, COURIER_API_KEY and SHOPEBUSINESS_JWT_SECRET. The generated Worker script contains no seller-specific values and Shop-E-Business never stores your payment or courier keys.
Which Stripe webhook events do I need to select?
checkout.session.completed, checkout.session.async_payment_succeeded, checkout.session.async_payment_failed, checkout.session.expired and charge.refunded, all sent to https://yourdomain.com/stripe-webhook.
Why is the Activate button disabled?
Activation needs a verified custom domain (Tier-2 or the custom-domain add-on) and complete courier settings. The checklist above the cards shows exactly what is missing, for example a missing sender name or parcel weight.
What does Courier error mean on an order?
Stripe confirmed the payment but EasyPost could not create or buy the shipment, for example because of an invalid address or API key. The Worker records the payment, reports Courier error and returns an error to Stripe, which retries the webhook for up to about three days, so fixing the problem lets the next retry book the shipment without buying a second label.