checkout.

Integration

Integrate with your coding agent

Install the server SDK into an existing app, with a focused integration skill and machine-readable reference.

Install from source

The SDK is packaged with TypeScript declarations and no runtime dependencies. It is not published to the npm registry. Clone the repository, pack sdk/, and install that tarball in your server application.

sh
git clone https://github.com/Allen-Saji/whitechain-checkout.git
cd whitechain-checkout
npm pack ./sdk

# From your application directory, install the generated file:
npm install /absolute/path/to/whitechain-checkout/whitechain-checkout-server-0.1.0.tgz

Create a checkout from your server

Set CHECKOUT_API to https://checkout.allensaji.dev and CHECKOUT_API_KEY to the key saved during registration. Use your own stored order reference and server-side price.

TypeScript
import { checkoutClient } from '@whitechain-checkout/server';

const checkout = checkoutClient({
  baseUrl: process.env.CHECKOUT_API!,
  apiKey: process.env.CHECKOUT_API_KEY!,
});

const order = await checkout.create({
  orderId: 'workshop-001',
  title: 'Studio workshop',
  amount: '100000', // 0.10 USDT
});
// Send order.checkoutUrl to your customer.

Give your agent the integration skill

Give your coding agent the integration skill and review its changes. The guide covers server-side credentials, prices from your product database, signature checks and fulfillment tests.

Read the integration skill ↗

A concrete task to give your agent

text
Use https://checkout.allensaji.dev/skill.md to integrate Checkout into this app. Use our existing authentication and product database. Add server-side checkout creation, a signed webhook receiver, durable event deduplication and fulfillment acknowledgement. Use local tests first. Do not expose credentials or submit a public-chain transaction without approval.

Machine-readable references

/openapi.json
Integration endpoint contract and authentication.
/llms.txt
Short resource index.
/llms-full.txt
Plain-text reference generated from these developer guides.
/skill.md
Focused integration instructions.

Recover an order safely

POST /v1/merchant/orders/:id/retry-payment requeues the original failed payment only when no transaction was signed or broadcast and its authorization remains valid. Resolve the reported balance or budget issue first. Expired orders need a new checkout. The merchant workspace offers this action only for eligible jobs.