Quickstart

Get up and running with RevKeen in under 5 minutes

This guide will walk you through the essential steps to start accepting payments with RevKeen. By the end, you'll have created a customer, product, and checkout session.

1. Get Your API Key

First, you'll need an API key to authenticate your requests. You can find your API keys in the RevKeen dashboard.

1

Go to Settings

Navigate to Settings → API Keys in your dashboard
2

Copy your key

Copy your rk_live_* or rk_test_* key
3

Store securely

Store your API key in an environment variable — never commit it to version control
Use rk_test_* keys for development and rk_live_* keys for production.

2. Make Your First API Call

Test your API key by listing customers. If you're new, this will return an empty list.

curl -X GET "https://api.revkeen.com/v1/customers" \
  -H "Authorization: Bearer rk_test_your_api_key"

3. Create a Customer

Customers are the core of your billing operations. Create one with at least an email address.

curl -X POST "https://api.revkeen.com/v1/customers" \
  -H "Authorization: Bearer rk_test_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "john@example.com",
    "name": "John Doe",
    "companyName": "Acme Inc"
  }'

4. Create a Product

Define what you're selling. Products can be one-time purchases or recurring subscriptions.

curl -X POST "https://api.revkeen.com/v1/products" \
  -H "Authorization: Bearer rk_test_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "productId": "pro_monthly",
    "name": "Pro Plan",
    "kind": "subscription",
    "pricingModel": "recurring",
    "amountMinor": 2900,
    "currency": "USD",
    "interval": "month",
    "intervalCount": 1
  }'

5. Create a Checkout Session

Checkout Sessions provide a hosted payment page. Redirect your customer to complete payment.

curl -X POST "https://api.revkeen.com/v1/checkout/sessions" \
  -H "Authorization: Bearer rk_test_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "cus_xxxxxxxx",
    "lineItems": [
      {
        "productId": "prod_xxxxxxxx",
        "quantity": 1
      }
    ],
    "successUrl": "https://yourapp.com/success",
    "cancelUrl": "https://yourapp.com/cancel"
  }'

6. Set Up Webhooks

Webhooks notify your application when events occur. Set up an endpoint to handle payment confirmations.

curl -X POST "https://api.revkeen.com/v1/webhooks" \
  -H "Authorization: Bearer rk_test_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/revkeen",
    "events": [
      "checkout.session.completed",
      "invoice.paid",
      "subscription.created"
    ]
  }'

Next Steps