Stablecoin Checkout

Accept USDC/USDT payments on your website or app. Three integration options, all built on the same Session API.

Integration Options

┌─────────────────────────────────────────────────────────┐
│                                                          │
│  Option A: Widget (easiest)                              │
│  ┌──────────────────────────────┐                       │
│  │  Your website                 │                       │
│  │  ┌────────────────────────┐  │                       │
│  │  │  Stableyard Widget     │  │  Uses: sy_pub_*       │
│  │  │  Amount: 25.00 USDC    │  │  Creates session      │
│  │  │  [Pay Now]             │  │  directly from        │
│  │  └────────────────────────┘  │  the browser          │
│  └──────────────────────────────┘                       │
│                                                          │
│  Option B: Checkout Page (redirect, like Stripe)         │
│  ┌──────────┐     ┌─────────────────┐     ┌──────────┐ │
│  │ Your     │ ──► │ pay.stableyard  │ ──► │ Your     │ │
│  │ server   │     │ .fi/ses_xxx     │     │ success  │ │
│  │          │     │ (hosted by us)  │     │ page     │ │
│  └──────────┘     └─────────────────┘     └──────────┘ │
│                                                          │
│  Option C: API Only (full control)                       │
│  ┌──────────┐     ┌─────────────────┐                   │
│  │ Your     │ ──► │ Stableyard API  │                   │
│  │ server   │     │ POST /sessions  │                   │
│  │          │ ◄── │ webhook:        │                   │
│  │          │     │ payment.settled │                   │
│  └──────────┘     └─────────────────┘                   │
│                                                          │
└─────────────────────────────────────────────────────────┘

Quick Example

curl -X POST https://api.stableyard.fi/v2/sessions \
  -H "Authorization: Bearer sy_secret_*" \
  -H "Idempotency-Key: order-123" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 25000000,
    "destination": "shop@stableyard",
    "successUrl": "https://yourstore.com/success",
    "cancelUrl": "https://yourstore.com/cancel"
  }'
The response includes a checkoutUrl — redirect the buyer there.

Redirect Flow (like Stripe)

Customer clicks "Pay"
→ Your server creates session (sy_secret_*)
→ Redirect to checkoutUrl
→ Customer picks wallet, pays
→ Stableyard routes cross-chain
→ Webhook: payment.settled
→ Your server marks order as paid
→ Customer redirected to successUrl

Payment Splits

Split payments across multiple recipients:
{
  "amount": 10000000,
  "destination": "acc_platform",
  "splits": [
    { "destination": "acc_creator", "percentage": 85 },
    { "destination": "acc_platform", "percentage": 15 }
  ]
}

E-Commerce Plugins

Works with WooCommerce, Shopify, and any platform that supports redirect-based checkout:
Customer clicks "Pay with Stableyard" in store
→ Plugin creates session (amount + order ID in metadata + URLs)
→ Redirect to Stableyard checkout page
→ Customer pays → redirect back to store
→ Plugin receives webhook → marks order as paid
Same redirect pattern as Stripe, PayPal, and Razorpay.

Integration Guide: Checkout Page

Step-by-step guide to building the redirect flow