RENDBEN API V1

Payment truth for your application.

Create a hosted USDC payment, attach your own customer reference, verify access and receive signed lifecycle events. Every operation is scoped to your Rendben workspace.

USING CLAUDE CODE OR CHATGPT DESKTOP?

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.

  1. 1
    Create 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
  2. 2
    Store it securely

    Save it as RENDBEN_API_KEY in the application's server environment. Never paste an API key into a chat.

  3. 3
    Copy the docs link to your AI

    The assistant can read the public contract, examples and entitlement rules from this page.

https://rendben.com/docs/api

Copies the public documentation URL, not your API key.

01
QUICK START

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?

TypeScript
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;
Keep API keys on the server.

Never place a Rendben key in browser code, a mobile app bundle or a public repository.

02
AUTHENTICATION

One workspace. Two permission levels.

Send your key on every request using the standard Authorization header.

HTTP header
Authorization: Bearer rdb_live_your_key
READ ONLY

Verify and reconcile

List products, subscriptions and orders. Recommended for entitlement checks.

READ AND WRITE

Create payments

Includes every read operation and can create products and payment intents.

03
SAFE WRITES

Retry 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.

Required header
Idempotency-Key: order_8f2b7f46
04
API REFERENCE

Six focused endpoints.

GET/products

List products

Returns every product in the API key's workspace, including pricing and recurring billing details.

Request
curl https://rendben.com/api/v1/products \
+  -H "Authorization: Bearer $RENDBEN_API_KEY"
POST/products

Create 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.

ParameterTypeDescription
nameRequiredstringCustomer-facing product name.
descriptionRequiredstringShort explanation of what the customer receives.
priceUsdcRequiredstringPrice in USDC. Minimum 1 USDC.
pricingModelRequiredenumone_time or recurring.
billingIntervalobjectRequired for recurring products. Use day, week, month or year. A quarterly plan uses month with count 3.
returnUrlURLOptional page shown after a completed payment.
coverImageUrlURLOptional HTTPS product image.
JSON body
{
  "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
  }
}
POST/payment-intents

Create a payment intent

Creates one resumable checkout for an active one-time product. Your customer reference and metadata are returned in webhook events.

ParameterTypeDescription
productIdRequiredstringActive one-time product ID.
customer.emailRequiredemailReceipt and entitlement identity.
customer.referencestringYour stable customer or account ID. Maximum 255 characters.
metadataobjectYour reconciliation data. Maximum 2 KB.
Request
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" }
  }'
Response
{
  "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"
  }
}
GET/payment-intents/:id

Retrieve a payment intent

Returns the current status, buyer wallet, Solana signature and confirmation timestamps. The API key must belong to the same workspace.

GET/subscriptions

List 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.

ParameterTypeDescription
customer_emailemailOptional exact customer filter. Recommended for entitlement checks.
product_idstringOptional product filter. Recommended for entitlement checks.
statusenumFilter returned records by lifecycle status. Defaults to all.
pageintegerPage number. Defaults to 1.
limitintegerRecords per page, from 1 to 100. Defaults to 50.
Response
{
  "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 the right response for the job.

Use summary.active and summary.mrrUsdc for merchant reporting. Use hasActiveSubscription to gate customer access.

GET/orders

Verify a one-time order

Returns payment intents for a customer. The default status=paid filter includes confirmed payments only.

ParameterTypeDescription
customer_emailRequiredemailThe email collected during checkout.
product_idstringOptional product filter for a top-up or purchase.
statusenumpaid, pending, processing, expired, failed or all. Defaults to paid.
pageintegerPage number. Defaults to 1.
limitintegerRecords per page, from 1 to 100. Defaults to 50.
Response
{
  "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"
    }
  ]
}
05
ENTITLEMENT RULES

Grant access from paid facts.

  1. 1
    Recurring access

    Grant access only when hasActiveSubscription is true for the required product.

  2. 2
    Credits and top-ups

    Query orders with status=paid, then store every consumed order ID so it cannot be credited twice.

  3. 3
    Cancelled subscriptions

    Respect entitled until currentPeriodEnd. The customer keeps what they already paid for.

  4. 4
    Plan changes

    Upgrades become entitled after the atomic prorated payment confirms. Downgrades remain on the current tier through the paid period and change at renewal.

  5. 5
    Failure 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.

06
SIGNED EVENTS

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.

PAYMENTS

Confirmation events

payment.confirmed and payment.finalized.

SUBSCRIPTIONS

Lifecycle events

subscription.activated, renewed, failed, cancelled, change_requested, change_authorized, upgraded, downgraded, changed and change_failed.

Node.js signature verification
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.

07
PAGINATION

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.

08
ERRORS

One predictable error shape.

JSON
{ "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.

400Missing or invalid input
401Missing, invalid or revoked key
413Request body is too large
415Write request is not JSON
429Rate limit exceeded
409Idempotency conflict or request in progress
500Rendben could not complete the request
READY TO CONNECT?

Create a scoped key for your backend.

Start with read-only permission. Use read and write when your application creates products or payment intents.

Open API keys