Documentation

API Integration

Use the Yolfi HTTP API for server-controlled checkout, reusable payment links, and verified payment events.

Choose the payment flow

GoalIntegration
Ask a coding assistant to implement paymentsStart with the AI onboarding prompt.
Charge a dynamic cart or order totalCreate a Checkout Session from your backend.
Sell a fixed-price product, plan, or contributionCreate a reusable Paylink and share its hosted checkout URL.
Operate from a terminal or automation jobUse the CLI reference.

The production API base URL is https://app.yolfi.com/api. Keep authenticated requests on your backend. Obtain an organization API key from your Yolfi settings and store it in a secret manager or ignored environment file. Never ship it in a browser bundle or paste it into chat.

After the owner confirms the product and price, call the existing Paylink endpoint:

curl https://app.yolfi.com/api/private/paylinks/create \
  -X POST \
  -H "Authorization: Bearer $YOLFI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Premium download",
    "type": "ONE_TIME",
    "price": "29.00",
    "currency": "USD",
    "collectEmail": true
  }'

Use the returned data.id in https://pay.yolfi.com/{paylinkId}. Configure your receiving wallets before sharing it with customers. Checkout URL parameters can attach your customer reference and payment metadata.

For recurring links, use type: "RECURRING" and a supported recurringInterval, for example "MONTH". Customers pay renewals from their own wallet. Do not treat a recurring plan as permission to debit a wallet automatically.

Create a dynamic Checkout Session

For carts and server-calculated order totals, use POST /api/checkout-sessions with an organization API key and an Idempotency-Key. Send the final amount as a decimal string. Keep product pricing, discounts, tax, and order fulfillment in your own application.

The Checkout quickstart shows the full request and hosted redirect. The Checkout Sessions API reference defines fields, response data, and idempotency behavior. The current CLI does not have a Checkout Session command; call this endpoint from your backend.

API entry points

OperationEndpointAuthentication
Read current organizationGET /api/private/organization/currentBearer organization API key
Update organization and settlement addressesPUT /api/private/organization/currentBearer organization API key
List PaylinksGET /api/private/paylinksBearer organization API key
Create PaylinkPOST /api/private/paylinks/createBearer organization API key
Get PaylinkGET /api/private/paylinks/{id}Bearer organization API key
Create Checkout SessionPOST /api/checkout-sessionsBearer organization API key and Idempotency-Key
Get Checkout SessionGET /api/checkout-sessions/{id}Bearer organization API key
List or create webhook endpointsGET or POST /api/private/organization/webhook-endpointsBearer organization API key
Read hosted Paylink informationGET /api/public/paylinks/{id}Public
Create an invoice for an existing PaylinkPOST /api/public/paymentsPublic; request contract
Read payment statusGET /api/public/payments/{id}Public

Verify before granting access

Configure a webhook endpoint and keep its returned signing secret separate from your API key. Verify X-Yolfi-Signature against the raw request body. Use confirmed payment events and idempotent fulfillment; browser redirects alone do not prove payment.

Stripe and Lemon Squeezy adapters change the payload format. They still use Yolfi signature verification. New integrations should choose an adapter currently available in the dashboard and follow its documented event mapping.

Checkout API reference

Request fields, immutable totals, responses, and idempotency.

Webhook events

Payment and subscription lifecycle payloads.

Signature verification

Verify raw requests using the endpoint signing secret.

CLI and JavaScript helpers

Terminal commands and the existing package's integration helpers.

AI onboarding

Describe the desired behavior and let a tool-capable assistant implement it.

On this page