osuvox Hosted Checkout

Hosted checkout pages powered by the Payments API. Redirect customers to a branded checkout, then return them to your app after payment.

Overview

osuvox Hosted Checkout gives you a complete payment page without building your own UI. You create a payment with success and cancel URLs, then redirect customers to the returned payment_url.

Need a no-code option? See osuvox Links. For full API control, see osuvox Payments API.

Hosted Checkout vs Full Integration

Hosted Checkout

  • Redirect to payment_url
  • No custom checkout UI required
  • Fastest path to launch
  • Fulfillment via webhooks

Full Integration

  • Render address/QR yourself
  • Full UI control
  • More implementation work
  • Fulfillment via webhooks
  • Branded checkout - Use your logo and colors
  • Redirect flow - Return customers after payment
  • Webhooks - Receive payment confirmations
  • Multi-currency - Accept BTC, LTC, and DOGE

Quick Start

Step 1: Get API Keys

Sign up at osuvox.net and copy your API keys from Dashboard - API Keys.

Step 2: Configure Webhooks

Set your webhook endpoint in Dashboard - Settings and copy your webhook secret.

Step 3: Create a Checkout Payment

curl -X POST https://www.osuvox.net/api/v1/payments \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "0.001",
    "coin": "BTC",
    "external_id": "order_123",
    "success_url": "https://yoursite.com/checkout/success",
    "cancel_url": "https://yoursite.com/checkout/cancel"
  }'

Step 4: Redirect the Customer

Send the customer to the returned payment_url to complete payment.

Authentication

Authenticate requests by including your API key in the Authorization header:

Authorization: Bearer sk_live_your_api_key

Live-only: Use small amounts during setup and build carefully.

Security: Never expose API keys in client-side code. Make all API calls from your server.

Hosted Checkout Notes

  • Redirects are UX only: Fulfill orders from webhooks, not the success_url redirect.
  • OSUVOX_WEBHOOK_URL: If set, use it as the default webhook URL unless explicitly overridden per payment.
  • TXID guarantee: Fulfill using payment.confirmed or payment.completed because they always include txid.
  • Reconciliation: GET /payments is for reconciliation only. Webhooks are the primary signal.
  • Internal monitoring: Monitoring is internal; there is no public monitoring endpoint.

Create Checkout Payment

POST /api/v1/payments

Create a payment with redirect URLs to enable the hosted checkout flow.

Required Parameters

ParameterTypeRequiredDescription
amountstring | numberYesPayment amount in cryptocurrency
coinstringYesBTC, LTC, or DOGE
success_urlstringNoURL to redirect after payment confirmed. HTTPS required.
cancel_urlstringNoURL for cancel link and redirect after expiration. HTTPS required.

Example Request

curl -X POST https://www.osuvox.net/api/v1/payments \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "0.001",
    "coin": "BTC",
    "external_id": "order_12345",
    "description": "Premium Plan - Monthly",
    "success_url": "https://yoursite.com/checkout/success",
    "cancel_url": "https://yoursite.com/checkout/cancel"
  }'

Hosted Checkout

Redirect customers to the payment_url returned by the Payments API. After confirmation, customers return to your site using the success_url or cancel_url.

How It Works

  1. Create a payment with success_url and/or cancel_url
  2. Redirect the customer to payment_url
  3. Customer pays on the hosted checkout page
  4. Customer returns to your site via the configured URL

Redirect URL Parameters

We append the payment ID when redirecting to your success_url or cancel_url:

https://yoursite.com/checkout/success?payment_id=pay_abc123def456

Verify payment status server-side using the Get Payment API.

Branding Your Checkout

Customize the hosted checkout appearance in Dashboard - Settings.

  • Brand Name - Displayed at the top of checkout
  • Logo URL - Your company logo (HTTPS required)
  • Brand Color - Accent color for buttons and highlights

Security Note: Always verify payment status server-side using the payment_id parameter before fulfilling orders.

Get Payment

GET /api/v1/payments/{id}

Retrieve details for a specific payment.

curl https://www.osuvox.net/api/v1/payments/pay_abc123def456 \
  -H "Authorization: Bearer sk_live_xxx"

Webhooks

Webhooks notify your server when payment events occur. Configure your webhook URL in Dashboard - Settings.

{
  "id": "evt_abc123def456789",
  "type": "payment.confirmed",
  "created_at": "2026-01-11T22:15:00Z",
  "data": {
    "payment": {
      "id": "pay_abc123def456",
      "status": "confirmed",
      "coin": "BTC",
      "amount": "0.00100000",
      "amount_received": "0.00100000",
      "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
      "confirmations": 3,
      "confirmations_required": 3,
      "metadata": {
        "customer_id": "cust_abc"
      }
    }
  }
}

Signature Verification

All webhooks include a timestamped HMAC-SHA256 signature in the X-Osuvox-Signature header. Verify using the raw request body before parsing JSON.

Retry signing: Each delivery attempt is signed with a fresh timestamp. Keep your verification tolerance short (recommended: 5 minutes) to reduce replay risk while still allowing retries.

export const POST = async ({ request }) => {
  const payload = await request.text();
  const signature = request.headers.get('x-osuvox-signature');
  const secret = process.env.OSUVOX_WEBHOOK_SECRET;

  if (!verifySignature(payload, signature, secret)) {
    return new Response('Unauthorized', { status: 401 });
  }

  const event = JSON.parse(payload);
  return new Response('OK');
};

Errors

Error Response Format

{
  "error": {
    "code": "invalid_amount",
    "message": "Amount must be a positive number",
    "param": "amount"
  }
}

HTTP Status Codes

CodeDescription
200Success
400Bad Request
401Unauthorized
500Server Error

Rate Limits

Authenticated endpoints are limited to 100 requests per minute per API key.

TypeScript Types

Copy these types into your TypeScript project:

export type OsuvoxCoin = 'BTC' | 'LTC' | 'DOGE';

export type PaymentStatus =
  | 'pending'
  | 'detecting'
  | 'confirming'
  | 'confirmed'
  | 'completed'
  | 'expired'
  | 'failed';

Need Help?

Check the Webhook Logs to debug delivery issues, or contact support@osuvox.net.