Add crypto payments to your Shopify store in under 5 minutes.
Create a GroundedPay account at /signup.html and note your Merchant ID.
Add the embed script to your Shopify theme. Go to your Shopify admin → Online Store → Themes → Edit Code → theme.liquid. Paste this snippet just before the closing </body> tag:
<script src="https://groundedpay.com/embed.js"
data-merchant-id="YOUR_MERCHANT_ID"></script>
That's it! A "Pay with Crypto" button will appear on your cart and checkout pages. When customers click it, a modal opens with the GroundedPay checkout for USDC, USDT, ETH, or BTC.
Customize the button by adding data attributes to the script tag:
| Attribute | Default | Description |
|---|---|---|
data-merchant-id |
Required | Your GroundedPay merchant ID |
data-gateway-url |
https://groundedpay.com |
Gateway URL (only change for self-hosted) |
data-button-text |
Pay with Crypto |
Button label text |
data-button-color |
#6366f1 |
Button background color |
data-button-text-color |
#ffffff |
Button text color |
data-button-position |
after-checkout |
after-checkout, before-checkout, or custom:#selector |
<script src="https://groundedpay.com/embed.js"
data-merchant-id="YOUR_MERCHANT_ID"
data-button-text="Checkout with Crypto"
data-button-color="#22c55e"
data-button-text-color="#ffffff"
data-button-position="after-checkout"></script>
1. The embed script adds a "Pay with Crypto" button to your Shopify cart/checkout page.
2. When a customer clicks the button, the script reads the cart total and creates a payment via the GroundedPay API.
3. A modal overlay opens showing the GroundedPay checkout with a QR code and payment address.
4. Once the blockchain confirms payment, the modal closes and the customer sees a success message.
For custom integrations beyond Shopify, use the API directly:
POST /api/checkout/create
Content-Type: application/json
{
"amount_usd": 49.99,
"coin": "usdc",
"merchant_id": "YOUR_MERCHANT_ID",
"shopify_order_id": "optional-order-id",
"shopify_order_number": "#1001"
}
GET /api/checkout/:paymentId
The checkout iframe sends postMessage events to the parent window:
| Event Type | Data |
|---|---|
groundedpay:payment_confirmed |
{ payment_id, redirect_url } |
groundedpay:close |
{} — user closed the modal |
Use your dashboard at /dashboard.html to monitor incoming payments in real time. Payments auto-refresh every 30 seconds.