Accept crypto on Shopify
Your Shopify store can accept USDC, USDT, ETH, SOL, BTC today — full integration via the Shopify Payments Provider app is in Partner review.
Today (embed SDK on the product page)
While our Shopify Payments Provider app awaits Partner approval, you can still accept crypto on every product page with a "Buy with Crypto" button that opens our hosted checkout.
1. Add the script
In Shopify admin → Online Store → Themes → Edit code → theme.liquid,
add before </head>:
<script src="https://sorenpay.com/checkout.js" async></script>2. Create the session endpoint (Shopify App or external)
The endpoint that calls our API needs to live somewhere that can hold your
apk_ key. Three options:
- A. Shopify App proxy — set up an app proxy that forwards
/apps/soren/sessionto your server - B. External serverless function — Vercel/Netlify/Cloudflare Worker
- C. Embed Shopify Functions — use a backend extension with secret env vars
For (B), here's a Vercel function:
export default async function handler(req, res) {
const result = await fetch("https://api.sorenpay.com/api/v1/checkout/sessions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOREN_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
amountUsdCents: req.body.amountUsdCents,
description: req.body.description,
merchantReference: req.body.shopifyOrderId,
successUrl: `https://yourstore.com/${req.body.shopHandle}/orders/${req.body.shopifyOrderId}/thanks`,
acceptedAssets: ["USDC", "USDT"],
acceptedChains: ["ethereum", "polygon", "arbitrum", "base", "solana"],
}),
});
res.json(await result.json());
}3. Add the button to product pages
In Shopify admin → Online Store → Themes → Customize → Product, drop a custom HTML block:
<button
data-soren-checkout
data-amount-cents="{{ product.price | times: 1 }}"
data-description="{{ product.title }}"
data-session-endpoint="https://your-vercel.app/api/create-soren-session"
class="btn btn--primary"
>
Buy with Crypto · {{ product.price | money }}
</button>4. Mark the Shopify order paid after confirmation
In your session endpoint, after the hosted page completes (via outbound
webhook checkout.session.completed), call the Shopify Admin API to
mark the order paid:
// In your webhook handler for checkout.session.completed
await fetch(`https://${shop}/admin/api/2024-10/orders/${orderId}/transactions.json`, {
method: "POST",
headers: { "X-Shopify-Access-Token": shopifyToken, "Content-Type": "application/json" },
body: JSON.stringify({
transaction: { kind: "capture", status: "success", amount: session.amountUsdCents / 100 }
}),
});Tomorrow (native Shopify Payments Provider)
Once Shopify approves our Partner application, Soren Pay shows up as a payment method in Shopify's native checkout flow — same UX as Stripe, PayPal, etc. No theme edits, no scripts, no session endpoint.
Track progress: github.com/Soren-Pay/sorenpay/issues
Related
- Embed SDK reference
- Shopify app status
- WooCommerce plugin — if your store moves