Documentation

Quick start

Accept your first USDC payment in under 10 minutes. You will create a checkout link, register a webhook, and receive a payment.settled notification without blockchain expertise or unsolicited gas-fee opinions.

Need machine-readable request/response bodies for your AI or codebase? Download this page as plain Markdown.

Online course checkout

You sell a $25 USDC course. You create a checkout link, email it to a test customer, they pay from MetaMask with test USDC, and your server receives a payment.settled webhook so you unlock the course automatically. The customer closes the tab early? Webhook still got you. That's the whole friendship.

Step 1

Create an API key

Sign up at videpay.io, open Settings → API Keys, and create a Sandbox key. Store it as VIDEPAY_API_KEY in your environment.

ℹ

Sandbox keys only work against https://sandbox.api.videpay.io. No real funds move there. See Integration setup for MetaMask and test USDC.

Step 2

Create a checkout link

terminal
01curl -X POST "https://sandbox.api.videpay.io/checkout-links" \02  -H "x-api-key: $VIDEPAY_API_KEY" \03  -H "Content-Type: application/json" \04  -d '{05    "title": "Summer Collection Checkout",06    "description": "Pay for your order in USDC.",07    "reference": "order-2026-1042",08    "asset": "USDC",09    "chain": "base",10    "mode": "one_time",11    "amount": "49.99",12    "feeBearer": "customer",13    "collectCustomerName": true,14    "collectCustomerEmail": true,15    "requireCustomerEmail": true,16    "collectCustomerPhoneNumber": true,17    "settledRedirectUrl": "https://yourapp.com/checkout/success",18    "cancelRedirectUrl": "https://yourapp.com/checkout/cancel",19    "metadata": { "orderId": "ord_1042" },20    "items": [21      {22        "name": "Videpay Pro: 1 month",23        "quantity": 1,24        "unitAmount": "29.99"25      },26      {27        "name": "Priority support add-on",28        "quantity": 1,29        "unitAmount": "20.00"30      }31    ]32  }'
POST/checkout-links

Create a one-time checkout link with line items, customer collection, fee bearer, and redirects.

Headers

headers
01x-api-key: sk_AbCdEfGhIj_XyZ1234567890abcdefghijklmnopqrstuvwxyz01234502Content-Type: application/json

Request body

request.json
01{02  "title": "Summer Collection Checkout",03  "description": "Pay for your order in USDC. Funds settle instantly on-chain.",04  "reference": "order-2026-1042",05  "customPath": "summer-drop",06  "asset": "USDC",07  "chain": "base",08  "mode": "one_time",09  "amount": "49.99",10  "feeBearer": "customer",11  "customerId": null,12  "collectCustomerName": true,13  "requireCustomerName": false,14  "collectCustomerEmail": true,15  "requireCustomerEmail": true,16  "collectCustomerPhoneNumber": true,17  "requireCustomerPhoneNumber": false,18  "settledRedirectUrl": "https://yourapp.com/checkout/success?ref=order-2026-1042",19  "cancelRedirectUrl": "https://yourapp.com/checkout/cancel?ref=order-2026-1042",20  "expiresAt": "2026-08-07T23:59:59.000Z",21  "metadata": {22    "orderId": "ord_1042",23    "campaign": "summer-2026"24  },25  "items": [26    {27      "name": "Videpay Pro: 1 month",28      "description": "Full platform access",29      "quantity": 1,30      "unitAmount": "29.99"31    },32    {33      "name": "Priority support add-on",34      "description": "24h response SLA",35      "quantity": 1,36      "unitAmount": "20.00"37    }38  ]39}
Step 3

Register a webhook

terminal
01curl -X POST "https://sandbox.api.videpay.io/webhooks/endpoints" \02  -H "x-api-key: $VIDEPAY_API_KEY" \03  -H "Content-Type: application/json" \04  -d '{05    "name": "Primary webhook",06    "url": "https://yourapp.com/webhooks/videpay"07  }'
POST/webhooks/endpoints

Register your server URL to receive payment events. Save credential.signingSecret: shown once.

Headers

headers
01x-api-key: sk_AbCdEfGhIj_XyZ1234567890abcdefghijklmnopqrstuvwxyz01234502Content-Type: application/json

Request body

request.json
01{02  "name": "Primary webhook",03  "url": "https://yourapp.com/webhooks/videpay"04}

Videpay signs each delivery with X-Protocol-Signature using HMAC-SHA256 over the JSON payload. For instant UI updates on checkout pages or dashboards, see Realtime events — the same payloads, over WebSocket.

Webhooks you'll receive

Webhookcheckout.created

Sent when you create a new checkout link.

Delivery headers

webhook-headers
01Content-Type: application/json02User-Agent: Protocol-Webhooks/1.003X-Protocol-Event: checkout.created04X-Protocol-Delivery: wev_1a2b3c4d-5e6f-7890-abcd-ef123456789005X-Protocol-Business-Id: a1b2c3d4-e5f6-7890-abcd-ef123456789006X-Protocol-Attempt: 107X-Protocol-Signature: sha256=abc123def456...
Webhookdeposit.created

Sent when a deposit session is created and a unique payment address is assigned.

Delivery headers

webhook-headers
01Content-Type: application/json02User-Agent: Protocol-Webhooks/1.003X-Protocol-Event: deposit.created04X-Protocol-Delivery: wev_1a2b3c4d-5e6f-7890-abcd-ef123456789005X-Protocol-Business-Id: a1b2c3d4-e5f6-7890-abcd-ef123456789006X-Protocol-Attempt: 107X-Protocol-Signature: sha256=abc123def456...
Webhookpayment.settled

Sent when funds are confirmed on-chain and credited to your merchant balance.

Delivery headers

webhook-headers
01Content-Type: application/json02User-Agent: Protocol-Webhooks/1.003X-Protocol-Event: payment.settled04X-Protocol-Delivery: wev_1a2b3c4d-5e6f-7890-abcd-ef123456789005X-Protocol-Business-Id: a1b2c3d4-e5f6-7890-abcd-ef123456789006X-Protocol-Attempt: 107X-Protocol-Signature: sha256=abc123def456...
Step 4

Go live

Create a Live API key and switch your base URL to https://api.videpay.io. Register live webhook endpoints and configure your settlement wallet in the dashboard before accepting real USDC.

Quick reference

MethodEndpointDescription
POST/checkout-linksCreate checkout link
GET/checkout-links/public/:codeLoad hosted checkout
POST/checkout-links/public/:code/deposit-sessionsStart deposit flow
GET/checkout-links/public/:code/statusPoll checkout status
POST/checkout-links/public/:code/realtime-tokenRealtime token (checkout UI)
POST/webhooks/endpointsRegister webhooks