Article

How to Connect a Custom Domain, Stripe Payments and Courier Shipping to Your Online Store (Step-by-Step)

New here? Read the Shop-E-Business User Manual Step-by-step tutorial with screenshots: open your store, add products, manage orders. Open guide →

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?

RequirementDetails
Shop-E-Business subscription$10/year (৳499 in Bangladesh), 0% transaction fees
Custom domain entitlementTier-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 ownRegistered at any registrar. Shop-E-Business does not sell domains; it only lets you connect yours.
Cloudflare accountFree plan is enough. Required because the payment Worker only runs on Cloudflare-proxied records.
Stripe accountStart with test keys (sk_test_…).
EasyPost accountStart with the test API key.
TimeAbout 15 minutes for the domain plus DNS propagation (usually minutes), then the Stripe + EasyPost steps below.

How does the whole flow work?

  1. Buyer checks out on your custom domain using the normal checkout or Order Now button.
  2. 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.
  3. 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.
  4. Stripe confirms payment by calling /stripe-webhook; the Worker verifies the Stripe signature before doing anything.
  5. 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.
  6. 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

  1. Log in to your seller dashboard, expand Advance in the sidebar and click Custom Domain.
  2. On Tier-2, the domain form is already shown — go to Step 2.
  3. 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.
  4. 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.

TypeHost / NameValue / Points toTTL
TXT_sb-challengeYour verification tokenAuto / 3600
A@Server IP shown in your Custom Domain tabAuto / 3600
CNAMEwwwshopebusiness.comAuto / 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

  1. In Your domain, type the root domain, for example myshop.com (https:// and www. are removed automatically).
  2. Click Verify & Save Domain. Shop-E-Business looks up the _sb-challenge TXT record and compares it with your token.
  3. 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.
  4. Visit https://yourdomain.com. Your old yourshop.shopebusiness.com link 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.

  1. Create a free account at dash.cloudflare.com/sign-up.
  2. Click Add a domain, enter your root domain and choose the Free plan.
  3. Review the imported DNS records and add the three Shop-E-Business records if any are missing.
  4. At your registrar, replace the nameservers with the two Cloudflare shows you.
  5. Wait until Cloudflare marks the domain Active.

Step 6: Switch to Proxied and SSL Full (Strict)

  1. 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.
  2. 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.

FieldRequired?Example / note
Sender nameRequiredAlso used as the customs signer for international parcels
StreetRequiredShip-from street address
CityRequired—
ZIP / postal codeRequired—
CountryRequired2-letter code, e.g. US
Parcel length, width, heightRequiredDefault parcel size in inches
Parcel weightRequiredDefault weight in ounces
Company, Street 2 / Apt / Suite, State / region, PhoneOptionalSent 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

  1. In card 3 · Cloudflare Worker script, click Copy script. The script contains no secrets and no seller-specific values.
  2. In Cloudflare open Workers & Pages → Create Worker, paste the script and deploy.
  3. Add two Worker routes on your zone: yourdomain.com/apiEndpoint and yourdomain.com/stripe-webhook.

Step 9: Get your Stripe key and register the webhook

  1. In Stripe go to Developers → API keys and copy the Secret key (sk_test_… for testing).
  2. Go to Developers → Webhooks and add the endpoint https://yourdomain.com/stripe-webhook.
  3. Select the five events below.
  4. Open the new endpoint and copy its Signing secret (whsec_…).
Stripe eventWhat the Worker does
checkout.session.completedRuns the paid flow: books the EasyPost shipment and reports payment + delivery status
checkout.session.async_payment_succeededRuns the paid flow for delayed payment methods
checkout.session.async_payment_failedReports payment status Failed
checkout.session.expiredReports Expired / Not shipped
charge.refundedReports 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

  1. In card 2 · Activate, check that the Order endpoint shows https://yourdomain.com/apiEndpoint.
  2. Click Activate. The badge turns Active and new orders are sent to your Worker; checkout switches from cash on delivery to online payment.
  3. Copy SHOPEBUSINESS_JWT_SECRET from 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:

NameTypeValue
STRIPE_SECRET_KEYSecretStripe secret key from Step 9
STRIPE_WEBHOOK_SECRETSecretWebhook signing secret (whsec_…) from Step 9
COURIER_API_KEYSecretEasyPost API key from Step 10
SHOPEBUSINESS_JWT_SECRETSecretJWT secret from the Activate card
STRIPE_CHECKOUT_URLTexthttps://api.stripe.com/v1/checkout/sessions
EASYPOST_SHIPMENT_URLTexthttps://api.easypost.com/v2/shipments

Save the values (and deploy, if Cloudflare asks) so the Worker uses them.

Step 13: Place a test order

  1. Open a product on https://yourdomain.com and order it.
  2. On Stripe Checkout, pay with the test card 4242 4242 4242 4242 (any future expiry and any CVC).
  3. You land on yourdomain.com/order-success.
  4. 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: /apiEndpoint and /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_SECRET and COURIER_API_KEY with the live / production keys, then deploy.

Why is this setup cheaper and safer than a plugin?

TopicShop-E-Business + your WorkerTypical hosted platform / plugin
Platform transaction fee0% — payments go straight to your Stripe accountOften an extra fee with third-party gateways, or a paid app
Where API keys liveEncrypted secrets in your own Cloudflare WorkerPlatform, app vendor or your WordPress database
Message signingJWT-signed dispatch both ways, Stripe signature verified on every webhookVaries by app
Shipment creationAutomatic after payment, cheapest rate firstManual or a separate shipping app
Failure handlingAny failure returns an error so Stripe retries for up to ~3 days; never buys a second labelVaries 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

SymptomLikely cause and fix
Activate button is disabledThe checklist shows what's missing: a verified custom domain or required courier fields. Fix them and reload.
Checkout doesn't reach StripeRecords must be Proxied (orange cloud) or Worker routes never run. Check both routes use your exact domain.
Stripe shows failed webhook deliveriesUsually 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_REDIRECTSCloudflare SSL is on Flexible. Set SSL/TLS → Full (Strict).
JWT secret leakedRegenerate 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 Trial

Detailed 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.