API reference

Base URL: https://<deployment>.convex.site/v1 (or your custom api.rollopayments.com/v1 proxy). Authenticate with a bearer API key on every request.

Sandbox vs live

Test and live keys expose the same endpoints and payloads. The key selects the data plane: rk_test_ only reads and writes sandbox data; rk_live_ only touches live. Sandbox customers, payments, and subscriptions never appear when you use a live key (and the reverse).

Authentication

Authorization: Bearer rk_test_...
Authorization: Bearer rk_live_...

Resource identifiers

PrefixResource
rk_test_ / rk_live_API keys
cs_Checkout sessions
plink_Payment links
pay_Payments
prod_Products
price_Prices
sub_Subscriptions
cus_Customers
po_Payouts
disc_Discount codes
we_Webhook endpoints
evt_Events
acct_Accounts

Endpoints

  • POST /checkout_sessions — create a hosted checkout (payment or subscription)
  • GET /checkout_sessions/:id — retrieve a session
  • POST /payment_links — create a payment link
  • DELETE /payment_links/:id — deactivate a payment link
  • POST /discount_codes — create a discount code
  • DELETE /discount_codes/:id — delete a discount code
  • GET /payouts — list payouts (scoped to key mode)
  • GET /payout_methods — list connected payout destinations
  • GET /payments/:id — retrieve a payment
  • GET /customers — list customers (scoped to key mode)
  • GET /customers/:id — retrieve a customer
  • POST /products — create a product and price
  • GET /subscriptions/:id — retrieve a subscription

Errors

{
  "error": {
    "type": "invalid_request",
    "message": "Amount must be greater than zero",
    "code": "amount_invalid"
  }
}