Referencia de API
La URL base LicenseChain principal API es https://api.licensechain.app/v1. La autenticación utiliza Authorization: Bearer <user-jwt-or-app-api-key>.
Mapa de guía de flujo de trabajo primero
Products API
Los productos se pueden administrar completamente a través de API (enumerar, crear, leer, PUT/PATCH actualizar, eliminar), incluidos los mismos campos que la interfaz de usuario de productos del vendedor Dashboard. Utilice PATCH para actualizaciones parciales.
Solicitud de creación de producto
{
"name": "Pro Monthly",
"description": "Recurring access to premium feature set",
"price": 49.99,
"currency": "USD",
"active": true,
"successUrl": "https://merchant.example.com/pay/success",
"cancelUrl": "https://merchant.example.com/pay/cancel",
"helpUrl": "https://merchant.example.com/help",
"supportUrl": "https://merchant.example.com/support",
"termsUrl": "https://merchant.example.com/terms",
"privacyUrl": "https://merchant.example.com/privacy",
"refundUrl": "https://merchant.example.com/refund",
"productType": "subscription",
"billingType": "recurring",
"interval": "month",
"stripePriceIdRecurring": "price_1AbCdEfGhIjKlMn",
"stripeTaxEnabled": true,
"stripeIdentityRequired": false,
"cryptoPaymentsEnabled": true,
"hideEmail": false,
"autoRedirect": false
} Respuesta de producto
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"userId": "user_123",
"name": "Pro Monthly",
"description": "Recurring access to premium feature set",
"price": 49.99,
"currency": "USD",
"active": true,
"successUrl": "https://merchant.example.com/pay/success",
"cancelUrl": "https://merchant.example.com/pay/cancel",
"helpUrl": "https://merchant.example.com/help",
"supportUrl": "https://merchant.example.com/support",
"termsUrl": "https://merchant.example.com/terms",
"privacyUrl": "https://merchant.example.com/privacy",
"refundUrl": "https://merchant.example.com/refund",
"productType": "subscription",
"billingType": "recurring",
"interval": "month",
"stripePriceIdRecurring": "price_1AbCdEfGhIjKlMn",
"stripeTaxEnabled": true,
"stripeIdentityRequired": false,
"cryptoPaymentsEnabled": true,
"hideEmail": false,
"autoRedirect": false,
"licenseEmails": [
"licenses-a@merchant.example.com",
"licenses-b@merchant.example.com"
],
"sendLicenseToCustomer": true,
"callbackSecret": "base64url_or_base64_secret_from_product_record",
"createdAt": "2026-05-11T07:00:00.000Z",
"updatedAt": "2026-05-11T07:00:00.000Z"
} API de estado de transacciones
Utilice POST /transaction/status para una transacción y POST /transactions para detalles por lotes.
Solicitud de estado
{
"transaction": "pi_3RxExample123"
} Respuesta de estado
{
"status": 200,
"transactionStatus": "paid",
"transactionStatusReason": "Transaction successfully completed",
"info": "",
"transaction": {
"transactionId": "pi_3RxExample123",
"transactionStatus": "paid",
"statusReason": "Transaction successfully completed",
"licenseId": "lic_abc123",
"productId": "prod_8c9a1d74",
"amount": 49.99,
"currency": "USD",
"email": "buyer@example.com",
"timestamp": "2026-05-11T07:01:00.000Z",
"paymentProvider": "stripe"
}
} Verificación de licencia y JWT
Solicitud de verificación
{
"key": "LC-XXXXXX-XXXXXX-XXXXXX",
"hwuid": "optional-device-id"
} Respuesta de verificación (con token de licencia opcional)
{
"valid": true,
"status": "ACTIVE",
"expiresAt": "2025-12-31T23:59:59Z",
"email": "user@example.com",
"verificationType": "custom",
"license_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImxpY2Vuc2VjaGFpbi0xIn0....signature",
"license_token_expires_at": "2024-01-01T01:00:00.000Z",
"license_jwks_uri": "https://api.licensechain.app/v1/licenses/jwks"
}