Skip to main content
Call POST /api/links to generate a unique payment link. Kibble creates a deposit address on Base, provisions or looks up your wallet, and returns a hosted checkout URL you can share directly, embed as an iframe, or drop in as a JS widget. The checkout page displays your business name, the expected amount, and a QR code pointing to the deposit address.

Request

POST https://pay.kibble.sh/api/links
Content-Type: application/json

Body parameters

business_name
string
required
Your business name as it appears on the checkout page.
email
string
required
Your email address. Kibble uses this to identify your account and provision your managed wallet when wallet_type is "privy".
expected_amount
string
required
The USDC amount you expect to receive. Provide up to two decimal places (e.g. "49.00"). Kibble uses this value to classify the payment as confirmed, partial, or excess.
wallet_type
string
required
How Kibble should resolve your receiving wallet. Use "privy" for a Kibble-managed wallet or "byo" to supply your own address.
wallet_address
string
Required when wallet_type is "byo". Must be a valid EVM address in checksum format (e.g. "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B").
product_description
string
Optional description shown on the checkout page below the amount (e.g. "Monthly subscription").

Example request

curl --request POST \
  --url https://pay.kibble.sh/api/links \
  --header 'Content-Type: application/json' \
  --data '{
    "business_name": "Acme SaaS",
    "email": "you@acme.com",
    "expected_amount": "49.00",
    "wallet_type": "privy",
    "product_description": "Pro plan — monthly"
  }'

Response

A successful request returns 201 Created with the following fields.
slug
string
required
Unique identifier for this payment link. Use it to retrieve status or details via other API endpoints.
The hosted checkout URL. Share this with your payer or embed it in your product.
merchant_portal
string
required
A merchant-facing URL where you can monitor payment status for this link.
wallet_address
string
required
The on-chain deposit address on Base where USDC should be sent.
iframe_snippet
string
required
A ready-to-use <iframe> HTML snippet that embeds the checkout page on your website.
js_widget_snippet
string
required
A <script> tag that loads the Kibble JS widget. Drop it into any page to render the checkout inline.

Example response

201
{
  "slug": "abc12345",
  "payment_link": "https://pay.kibble.sh/pay/abc12345",
  "merchant_portal": "https://pay.kibble.sh/merchant/abc12345",
  "wallet_address": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B",
  "iframe_snippet": "<iframe src=\"https://pay.kibble.sh/pay/abc12345\" width=\"400\" height=\"600\" frameborder=\"0\"></iframe>",
  "js_widget_snippet": "<script src=\"https://pay.kibble.sh/w.js\" data-slug=\"abc12345\"></script>"
}

Errors

StatusBodyCause
400{ "error": { ... } }One or more request fields failed validation. The error object contains field-level details.
500{ "error": "Failed to provision wallet" }Kibble could not create or retrieve your managed wallet.
500{ "error": "Failed to create payment link" }A database error prevented the link from being saved.