Documentation · v2026-04-18

An API, considered.

The Ante REST API lets merchants create group checkout sessions, invite participants, and reconcile settlements. All requests are made over HTTPS to api.ante.dev. What follows is the complete reference — endpoints, objects, and events — written with the same care you would hope for in a payment system.

“Money should move the way trust does — quietly, reliably, and with both parties made whole.”

— From the editor

# All API requests use the same base URL
https://api.ante.dev/v1

Authentication

Ante uses API keys to authenticate requests. You can view and manage your keys in the Dashboard.

Key model

Each merchant account has four keys. Use publishable keys in the browser and secret keys only from your server.

AttributeTypeDescription
pk_test_…Publishable, test modeCreate embed tokens, redirect to hosted flow
sk_test_…Secret, test modeFull API access in test mode
pk_live_…Publishable, live modeSame as test, against real money
sk_live_…Secret, live modeFull API access in live mode

Authentication header

All server-side requests use HTTP Bearer auth.

curl https://api.ante.dev/v1/checkout/sessions \
  -H "Authorization: Bearer sk_live_51ABC...xyz"

Webhook signing secret

A separate whsec_… value is issued per endpoint, used to sign outbound webhook payloads with HMAC-SHA256. Included in the Ante-Signature request header.

Key rotation

curl -X POST https://api.ante.dev/v1/keys/rotate \
  -H "Authorization: Bearer sk_live_..."

Issues a new key pair. The old key stays valid for 24 hours to allow rolling deploys.

Core resources

The CheckoutSession object

The primary resource. Represents a single group purchase in progress.

AttributeTypeDescription
idstringUnique identifier prefixed with cs_
amount_totalintegerTotal purchase amount in the currency's smallest unit
amount_collectedintegerTotal paid across all participants
amount_remainingintegerOutstanding amount still to be funded
platform_feeinteger1% service fee, charged on top of amount_total to payers
statusenumCurrent lifecycle state (see below)
split_configobjectEqual, custom, or by_item split configuration
participantsarrayOne entry per share
expires_attimestampAuto-refund fires at this time if not fully funded
{
  "id": "cs_01HN4XQW8K2P9R5TZBVGMJ7FDC",
  "object": "checkout_session",
  "created": 1713456000,
  "expires_at": 1713628800,
  "status": "pending_participants",
  "currency": "usd",
  "amount_total": 240000,
  "amount_collected": 60000,
  "amount_remaining": 180000,
  "platform_fee": 6000,
  "merchant_id": "merch_01HN4V...",
  "initiator": { "email": "alex@example.com", "name": "Alex Chen" },
  "line_items": [
    { "id": "li_01HN4Y...", "description": "Joshua Tree Airbnb — 3 nights", "quantity": 1, "unit_amount": 240000 }
  ],
  "split_config": { "mode": "equal", "participant_count": 4 },
  "participants": [
    { "id": "pt_01HN4Z...", "email": "alex@example.com", "name": "Alex Chen", "share_amount": 60000, "status": "paid", "claimed_at": 1713456120, "paid_at": 1713456180 }
  ],
  "urls": {
    "hosted_checkout": "https://checkout.ante.dev/cs_01HN4X...",
    "success_url": "https://merchant.com/orders/123/success",
    "cancel_url": "https://merchant.com/orders/123/cancel"
  },
  "invite_code": "JOSHUA-TREE-4X",
  "embed_token": "ct_01HN4X...",
  "metadata": { "order_id": "ord_abc123", "booking_ref": "JT-2026-0418" }
}

Status states

AttributeTypeDescription
openStateCreated but no participants claimed yet
pending_participantsStateAt least one share claimed, not all paid
partially_fundedStateSome participants paid, others outstanding
fully_fundedStateAll shares collected, pending settlement
settledTerminalFunds transferred to merchant
expiredStateDeadline passed before full funding
refundedTerminalAll collected shares returned to participants

Split modes

Three configurations. Use equal for the simplest flow.

{
  "mode": "equal",
  "participant_count": 4
}

API endpoints

Checkout Sessions

POST/v1/checkout/sessionsCreate a session
Request
curl https://api.ante.dev/v1/checkout/sessions \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount_total": 240000,
    "currency": "usd",
    "split_config": { "mode": "equal", "participant_count": 4 },
    "initiator": { "email": "alex@example.com", "name": "Alex Chen" },
    "success_url": "https://merchant.com/orders/123/success",
    "cancel_url": "https://merchant.com/orders/123/cancel"
  }'
Response
{
  "id": "cs_01HN4XQW8K2P9R5TZBVGMJ7FDC",
  "object": "checkout_session",
  "status": "open",
  "amount_total": 240000,
  "amount_collected": 0,
  "currency": "usd",
  "split_config": { "mode": "equal", "participant_count": 4 },
  "urls": {
    "hosted_checkout": "https://checkout.ante.dev/cs_01HN4X..."
  },
  "created": 1713456000,
  "expires_at": 1713628800
}
GET/v1/checkout/sessions/:idRetrieve a session
curl https://api.ante.dev/v1/checkout/sessions/cs_01HN4X... \
  -H "Authorization: Bearer sk_live_..."
GET/v1/checkout/sessionsList sessions
curl "https://api.ante.dev/v1/checkout/sessions?status=fully_funded&limit=20" \
  -H "Authorization: Bearer sk_live_..."
POST/v1/checkout/sessions/:id/expireForce expire

Forces session into expired state and triggers the refund flow.

Participants

POST/v1/checkout/sessions/:id/participantsAdd a participant
curl https://api.ante.dev/v1/checkout/sessions/cs_01HN4X.../participants \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "email": "newfriend@example.com",
    "name": "Taylor Kim",
    "share_amount": 60000
  }'

For equal split mode, omit share_amount — it's recalculated automatically across all participants.

DELETE/v1/checkout/sessions/:id/participants/:participant_idRemove participant

If the participant has already paid, their share is refunded and remaining shares recalculated.

POST/v1/checkout/sessions/:id/participants/:participant_id/remindSend reminder

Rate-limited to 3 per 24 hours per participant.

GET/v1/checkout/sessions/:id/participantsList participants

Settlements

GET/v1/settlementsList settlements
{
  "id": "stl_01HN5...",
  "object": "settlement",
  "session_id": "cs_01HN4X...",
  "gross_amount": 240000,
  "platform_fee": 6000,
  "net_amount": 234000,
  "currency": "usd",
  "status": "paid",
  "destination": { "type": "bank_account", "last4": "4242", "bank_name": "Chase" },
  "arrival_date": 1713715200,
  "created": 1713542400
}
GET/v1/settlements/:idRetrieve a settlement
POST/v1/settlements/:id/refundRefund a settlement
{
  "reason": "merchant_requested",
  "notify_participants": true
}

Webhook endpoints

POST/v1/webhooks/endpointsCreate endpoint
{
  "url": "https://merchant.com/webhooks/ante",
  "events": ["session.fully_funded", "session.settled", "session.expired"],
  "description": "Production order fulfillment"
}
GET/v1/webhooks/endpointsList endpoints
POST/v1/webhooks/endpoints/:idUpdate endpoint
DELETE/v1/webhooks/endpoints/:idDelete endpoint

Webhook events

All events share the same envelope. Your endpoint receives the full resource snapshot in data.object.

{
  "id": "evt_01HN7...",
  "object": "event",
  "type": "session.fully_funded",
  "created": 1713542400,
  "data": {
    "object": { /* full resource snapshot */ }
  },
  "livemode": true,
  "api_version": "2026-04-18"
}

Event types

AttributeTypeDescription
session.createdSessionMerchant creates a new CheckoutSession
session.openedSessionInitiator opens the hosted checkout for the first time
participant.joinedParticipantNew participant added via initiator or invite link
participant.claimedParticipantParticipant clicks their invite link
participant.paidParticipantParticipant successfully pays their share
participant.declinedParticipantParticipant opts out
participant.reminder_sentParticipantReminder email/SMS dispatched
session.partially_fundedSessionFirst payment collected but not all
session.fully_fundedSessionAll participants have paid — ready to fulfill
session.settledSessionFunds transferred to merchant bank account
session.expiredSessionDeadline passed, session closed
session.refundedSessionAll collected shares refunded to participants

Signature verification

Ante-Signature: t=1713542400,v1=a6c9b7d...

Embed SDK

Vanilla JavaScript

<script src="https://js.ante.dev/v1"></script>

<button id="split-button">Split this purchase</button>

<script>
  const ante = Ante('pk_live_...');

  document.getElementById('split-button').addEventListener('click', async () => {
    const res = await fetch('/api/create-split-session', { method: 'POST' });
    const { embed_token } = await res.json();

    ante.open({
      embed_token,
      onSuccess: (session) => {
        window.location.href = '/order-confirmed';
      },
      onClose: () => console.log('Modal closed'),
    });
  });
</script>

React

npm install @ante/react

Hosted checkout

For merchants who can't embed JS, redirect to the hosted urls.hosted_checkout returned by session creation. Pattern identical to Stripe Checkout.

const session = await ante.checkout.sessions.create({ /* ... */ });
res.redirect(303, session.urls.hosted_checkout);

Error handling

HTTP status codes

AttributeTypeDescription
200 / 201Success
400Bad requestInvalid parameters
401Unauthenticated
402Payment failed
403ForbiddenKey lacks permission
404Resource not found
409Conflicte.g. modifying a settled session
429Rate limit exceeded
500 / 503Server error

Error object

{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_missing",
    "message": "Missing required parameter: amount_total.",
    "param": "amount_total",
    "request_id": "req_01HN7..."
  }
}

Error types

AttributeTypeDescription
authentication_errorAuthBad or missing API key
invalid_request_errorClientMalformed parameters
payment_errorPaymentCard declined, insufficient funds
rate_limit_errorClientToo many requests
session_state_errorClientOperation invalid for current status
api_errorServerInternal platform error