Pay Mirror API
These endpoints live on LicenseChain Pay, not the Core API. Base URL: https://pay.licensechain.app.
Used after the Mirror Payload (strict mode) flow. See also Pay checkout.
POST /api/checkout/mirror/validate
Server-side purchase confirmation. Call after verifying the redirect signature query parameter. Matches Pay validate/route.ts.
Request
POST https://pay.licensechain.app/api/checkout/mirror/validate
Content-Type: application/json
{
"license": "LC-XXXX-XXXX",
"email": "buyer@example.com"
} Send the LCG value from the return URL as license. Use the buyer billing email (lowercased by Pay when matching). Do not send access_token for this endpoint.
Response (verified)
{
"success": true,
"verified": true,
"status": "successful",
"purchase": {
"id": "lic_abc123",
"productId": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "2026-05-11T07:01:00.000Z",
"transactionId": "pi_3RxExample123"
}
} Response (not found)
{
"success": true,
"verified": false,
"status": "not_found"
} Fulfill access only when verified: true. The Mirror SDK exposes this as verifyPurchase().
POST /api/checkout/mirror/subscription/charge
Charge a third-party payment partner subscription renewal from your backend (e.g. WooCommerce Subscriptions scheduled payment). Requires a valid product callback_secret and the subscription id returned on first checkout.
Request
{
"subscription_id": "sub_1AbCdEfGhIjKlMn",
"amount": 49.99,
"currency": "USD",
"callback_secret": "your_product_callback_secret"
} Success response
{
"success": true,
"charged": true,
"invoice_id": "in_1AbCdEfGhIjKlMn",
"message": "Invoice paid"
} 400โ invalid JSON or missing fields.404โ subscription not found or already canceled.503โ third-party payment partner not configured on Pay.
Related guides
- Mirror SDK โ redirect HMAC and payload crypto
- Pay checkout & payment providers
- WooCommerce Checkout plugin
- Pay merchant webhooks