Give your coding assistant the right context.
Create a scoped API key, save it in your application environment, then give your assistant this documentation link to start the integration.
- 1Create an API key
Use a read-only key for verification. Choose read and write when the application creates products or payment intents.
Open API keys - 2Store it securely
Save it as
RENDBEN_API_KEYin the application's server environment. Never paste an API key into a chat. - 3Copy the docs link to your AI
The assistant can read the public contract, examples and entitlement rules from this page.
https://rendben.com/docs/apiCopies the public documentation URL, not your API key.
Verify access in one request.
Create a read-only key in your dashboard, keep it in your backend environment and send it as a Bearer token. This example answers the question your product actually needs: should this customer have access?
const response = await fetch(
"https://rendben.com/api/v1/subscriptions?" +
new URLSearchParams({
customer_email: "buyer@example.com",
product_id: "prod_example",
}),
{
headers: {
Authorization: `Bearer ${process.env.RENDBEN_API_KEY}`,
},
},
);
if (!response.ok) throw new Error("Rendben verification failed");
const result = await response.json();
const hasAccess = result.hasActiveSubscription;Never place a Rendben key in browser code, a mobile app bundle or a public repository.
One workspace. Two permission levels.
Send your key on every request using the standard Authorization header.
Authorization: Bearer rdb_live_your_keyRetry without creating duplicates.
Every public POST request requires an Idempotency-Key header containing 8 to 128 safe characters. Repeating the same key and body returns the original response for 24 hours. Reusing a key with different JSON returns HTTP 409.
Idempotency-Key: order_8f2b7f46Six focused endpoints.
/productsList products
Returns every product in the API key's workspace, including pricing and recurring billing details.
curl https://rendben.com/api/v1/products \
+ -H "Authorization: Bearer $RENDBEN_API_KEY"/productsCreate a product
Creates a one-time or recurring USDC product. This endpoint requires a read and write key.
Send a unique Idempotency-Key for each intended product creation.
| Parameter | Type | Description |
|---|---|---|
nameRequired | string | Customer-facing product name. |
descriptionRequired | string | Short explanation of what the customer receives. |
priceUsdcRequired | string | Price in USDC. Minimum 1 USDC. |
pricingModelRequired | enum | one_time or recurring. |
billingInterval | object | Required for recurring products. Use day, week, month or year. A quarterly plan uses month with count 3. |
returnUrl | URL | Optional page shown after a completed payment. |
coverImageUrl | URL | Optional HTTPS product image. |
{
"name": "Ciocu Pro",
"description": "Voice, sync and monthly allowance",
"returnUrl": "https://ciocu.app/billing/complete",
"coverImageUrl": "https://cdn.example.com/ciocu-pro.webp",
"priceUsdc": "20",
"pricingModel": "recurring",
"billingInterval": {
"unit": "month",
"count": 1
}
}/payment-intentsCreate a payment intent
Creates one resumable checkout for an active one-time product. Your customer reference and metadata are returned in webhook events.
| Parameter | Type | Description |
|---|---|---|
productIdRequired | string | Active one-time product ID. |
customer.emailRequired | Receipt and entitlement identity. | |
customer.reference | string | Your stable customer or account ID. Maximum 255 characters. |
metadata | object | Your reconciliation data. Maximum 2 KB. |
curl https://rendben.com/api/v1/payment-intents \
-X POST \
-H "Authorization: Bearer $RENDBEN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order_8f2b7f46" \
-d '{
"productId": "prod_example",
"customer": { "email": "buyer@example.com", "reference": "customer_48391" },
"metadata": { "orderId": "order_8f2b7f46" }
}'{
"paymentIntent": {
"id": "pi_example",
"status": "pending",
"productId": "prod_example",
"customerReference": "customer_48391",
"amountUsdc": "5",
"merchantAmountUsdc": "4.795",
"feeAmountUsdc": "0.205",
"checkoutUrl": "https://yourstore.rendben.com/checkout/prod_example?payment=pi_example"
}
}/payment-intents/:idRetrieve a payment intent
Returns the current status, buyer wallet, Solana signature and confirmation timestamps. The API key must belong to the same workspace.
/subscriptionsList and verify subscriptions
Omit the email to list the workspace's subscriptions and read total, lifecycle and MRR summary figures. Add an exact customer email and product ID for entitlement checks.
| Parameter | Type | Description |
|---|---|---|
customer_email | Optional exact customer filter. Recommended for entitlement checks. | |
product_id | string | Optional product filter. Recommended for entitlement checks. |
status | enum | Filter returned records by lifecycle status. Defaults to all. |
page | integer | Page number. Defaults to 1. |
limit | integer | Records per page, from 1 to 100. Defaults to 50. |
{
"customerEmail": "buyer@example.com",
"productId": "prod_example",
"status": "all",
"hasActiveSubscription": true,
"summary": {
"total": 12,
"active": 8,
"pastDue": 1,
"cancelPending": 1,
"cancelled": 2,
"entitled": 9,
"mrrUsdc": "160"
},
"hasMore": false,
"page": 1,
"pageSize": 50,
"subscriptions": [
{
"id": "sub_example",
"productId": "prod_example",
"productName": "Ciocu Pro",
"status": "active",
"entitled": true,
"amountUsdc": "20",
"periodHours": 720,
"currentPeriodEnd": "2026-08-31T12:00:00.000Z",
"nextChargeAt": "2026-08-31T12:00:00.000Z"
}
]
}Use summary.active and summary.mrrUsdc for merchant reporting. Use hasActiveSubscription to gate customer access.
/ordersVerify a one-time order
Returns payment intents for a customer. The default status=paid filter includes confirmed payments only.
| Parameter | Type | Description |
|---|---|---|
customer_emailRequired | The email collected during checkout. | |
product_id | string | Optional product filter for a top-up or purchase. |
status | enum | paid, pending, processing, expired, failed or all. Defaults to paid. |
page | integer | Page number. Defaults to 1. |
limit | integer | Records per page, from 1 to 100. Defaults to 50. |
{
"customerEmail": "buyer@example.com",
"productId": "prod_topup",
"status": "paid",
"hasPaidOrder": true,
"hasMore": false,
"orders": [
{
"id": "pi_example",
"productId": "prod_topup",
"productName": "Five voice credits",
"status": "paid",
"amountUsdc": "5",
"merchantAmountUsdc": "4.795",
"feeAmountUsdc": "0.205",
"transactionSignature": "solana_signature",
"confirmedAt": "2026-08-10T10:00:02.000Z"
}
]
}Grant access from paid facts.
- 1Recurring access
Grant access only when
hasActiveSubscriptionis true for the required product. - 2Credits and top-ups
Query orders with
status=paid, then store every consumed order ID so it cannot be credited twice. - 3Cancelled subscriptions
Respect
entitleduntilcurrentPeriodEnd. The customer keeps what they already paid for. - 4Plan changes
Upgrades become entitled after the atomic prorated payment confirms. Downgrades remain on the current tier through the paid period and change at renewal.
- 5Failure behavior
Do not grant new access when the API cannot be reached. Keep your last verified state for a short, deliberate grace period if your product requires continuity.
React when the ledger changes.
Add an HTTPS endpoint in Dashboard → Webhooks. Rendben signs the exact JSON body with the secret shown once at creation. Verify Rendben-Signature before parsing the event, reject timestamps older than five minutes, and deduplicate with the top-level event id.
import { createHmac, timingSafeEqual } from "node:crypto";
const [timestampPart, signaturePart] = signatureHeader.split(",");
const timestamp = timestampPart.replace("t=", "");
const received = signaturePart.replace("v1=", "");
const expected = createHmac("sha256", process.env.RENDBEN_WEBHOOK_SECRET)
.update(timestamp + "." + rawRequestBody)
.digest("hex");
const valid = received.length === expected.length &&
timingSafeEqual(Buffer.from(received), Buffer.from(expected));Return any 2xx response within 8 seconds. Failed deliveries retry with increasing delays for up to 48 hours. The dashboard preserves every attempt and lets an owner or admin replay a delivery manually.
Read complete histories safely.
Subscription and order responses include page, pageSize and hasMore. Increase page until hasMore is false. Customer responses are always private and are never cached.
One predictable error shape.
{ "error": "customer_email is required." }API limits are shared across all V1 endpoints for the same credential. A limited response includes RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset and Retry-After headers.
Create a scoped key for your backend.
Start with read-only permission. Use read and write when your application creates products or payment intents.
