Skip to content

Developers

Allidian API reference

Version 2026-10-01. Base URL https://api.allidian.com/v1. Machine-readable spec: openapi.json (import into Postman or generate a client).

Authentication

Send your secret key from your server: Authorization: Bearer al_sk_test_…. Test keys only see sandbox data; live keys only live data. Never use secret keys in browsers or mobile apps.

Idempotency, errors, limits

Send Idempotency-Key on POSTs (required for refunds, captures and cancels). Errors return { error: { type, code, message, request_id } }. Rate limit: 100 requests / 10 s per key (HTTP 429 with Retry-After).

Webhooks

Verify x-platform-signature: t=<unix>,v1=<hex>: compute HMAC-SHA256 with your endpoint secret over <t>.<raw body>, compare in constant time and reject timestamps older than 5 minutes. Events may arrive more than once or out of order, dedupe on id. Fulfill orders from checkout.session.completed / payment.succeeded, never from browser redirects.

import { createHmac, timingSafeEqual } from "node:crypto";
export function verify(secret: string, header: string, rawBody: string) {
  const [, t, v1] = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header) ?? [];
  if (!t || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}

Event types: payment.succeeded, payment.failed, payment.processing, payment.requires_action, payment.canceled, payment.refunded, payment.disputed, refund.updated, checkout.session.completed, checkout.session.expired, invoice.finalized, invoice.paid, invoice.overdue, invoice.voided, account.capabilities_updated, subscription.created, subscription.updated, subscription.canceled, connected_account.updated, transfer.paid, transfer.reversed

Endpoints

post/v1/checkout/sessions· Create a checkout session
Parameters
  • Idempotency-Key (header)
Body
currency*string
line_itemsobject[]
amountinteger
descriptionstring
mode"payment" | "subscription"
pricestring
tax_amountinteger
shipping_amountinteger
discount_amountinteger
customerstring
customer_emailstring
collect_billing_addressboolean
collect_shipping_addressboolean
success_urlstring
cancel_urlstring
expires_in_minutesinteger
merchant_referencestring
metadataobject
allowed_originsstring[]
templatestring
on_behalf_ofstring
commission_amountinteger
get/v1/checkout/sessions· List checkout sessions
Parameters
  • limit (query)
  • starting_after (query)
  • status (query)
get/v1/checkout/sessions/{id}· Retrieve a checkout session
Parameters
  • id (path, required)
post/v1/checkout/sessions/{id}/expire· Expire an open checkout session
Parameters
  • id (path, required)
  • Idempotency-Key (header)
get/v1/payments· List payments
Parameters
  • limit (query)
  • starting_after (query)
  • status (query)
  • currency (query)
  • payment_method (query)
  • customer (query)
  • on_behalf_of (query)
  • created_gte (query)
  • created_lt (query)
get/v1/payments/{id}· Retrieve a payment
Parameters
  • id (path, required)
post/v1/payments/{id}/refunds· Refund a payment (full or partial)

Always processed through the provider connection that created the payment. Final status arrives via refund.updated / payment.refunded events.

Parameters
  • id (path, required)
  • Idempotency-Key (header, required)
Body
amountinteger
reason"duplicate" | "fraudulent" | "requested_by_customer"
refund_application_feeboolean
metadataobject
get/v1/payments/{id}/refunds· List refunds for a payment
Parameters
  • id (path, required)
post/v1/payments/{id}/capture· Capture an authorized payment
Parameters
  • id (path, required)
  • Idempotency-Key (header, required)
Body
amountinteger
post/v1/payments/{id}/cancel· Cancel an unconfirmed or authorized payment
Parameters
  • id (path, required)
  • Idempotency-Key (header, required)
post/v1/agent_payments· Charge an AI agent's payment token

Pass the scoped, single-seller payment token an AI agent obtained from the buyer (a shared payment token, spt_…). The payment is created and confirmed on your provider account through the same pipeline as every other payment. Agent payments must be turned on in Settings → AI agent payments.

Parameters
  • Idempotency-Key (header, required)
Body
shared_payment_token*string
amount*integer
currency*string
descriptionstring
merchant_referencestring
customer_emailstring
metadataobject
agentobject
get/v1/agent_payments/config· Agent payment configuration to share with agents

Whether agent payments are on, the network profile ID agents must scope tokens to, and your per-payment cap.

post/v1/accounts· Create a connected account

A seller on your marketplace or a user of your platform. We create their provider account and return a provider-hosted onboarding link to send them. Your own account must be able to take payments, because commissions are paid into it.

Parameters
  • Idempotency-Key (header)
Body
display_name*string
email*string
country*string
default_currency*string
business_type"individual" | "company" | "non_profit"
external_referencestring
commission_rate_bpsinteger
metadataobject
return_urlstring
refresh_urlstring
get/v1/accounts· List connected accounts
Parameters
  • limit (query)
  • starting_after (query)
get/v1/accounts/{id}· Retrieve a connected account
Parameters
  • id (path, required)
get/v1/transfers· List commission transfers

Commissions from connected-account payments, transferred to your own provider account.

Parameters
  • limit (query)
  • connected_account (query)
get/v1/refunds/{id}· Retrieve a refund
Parameters
  • id (path, required)
post/v1/invoices· Create a draft invoice
Parameters
  • Idempotency-Key (header)
Body
customer*string
currency*string
items*object[]
discount_amountinteger
due_date*integer
memostring
footerstring
get/v1/invoices· List invoices
Parameters
  • status (query)
  • customer (query)
get/v1/invoices/{id}· Retrieve an invoice
Parameters
  • id (path, required)
post/v1/invoices/{id}/finalize· Finalize a draft invoice
Parameters
  • id (path, required)
  • Idempotency-Key (header)
post/v1/invoices/{id}/send· Send an invoice (finalizes drafts)
Parameters
  • id (path, required)
  • Idempotency-Key (header)
post/v1/invoices/{id}/void· Void an invoice
Parameters
  • id (path, required)
  • Idempotency-Key (header)
post/v1/invoices/{id}/mark-uncollectible· Mark an invoice uncollectible
Parameters
  • id (path, required)
  • Idempotency-Key (header)
post/v1/customers· Create a customer
Parameters
  • Idempotency-Key (header)
Body
emailstring
namestring
phonestring
billing_addressobject
shipping_addressobject
metadataobject
get/v1/customers· List customers
Parameters
  • limit (query)
  • starting_after (query)
  • email (query)
get/v1/customers/{id}· Retrieve a customer
Parameters
  • id (path, required)
post/v1/customers/{id}· Update a customer
Parameters
  • id (path, required)
  • Idempotency-Key (header)
Body
emailstring
namestring
phonestring
billing_addressobject
shipping_addressobject
metadataobject
post/v1/products· Create a product with a price (one-time or recurring)
Parameters
  • Idempotency-Key (header)
Body
name*string
descriptionstring
image_urlstring
price*object
get/v1/products· List products and prices
get/v1/subscriptions· List customer subscriptions
post/v1/subscriptions/{id}/cancel· Cancel a subscription
Parameters
  • id (path, required)
  • Idempotency-Key (header)
Body
at_period_endboolean
get/v1/merchant/account· Retrieve your account
get/v1/merchant/capabilities· Provider-reported processing capabilities
post/v1/developer/webhooks· Create a webhook endpoint (secret returned once)
Parameters
  • Idempotency-Key (header)
Body
url*string
descriptionstring
events*"payment.succeeded" | "payment.failed" | "payment.processing" | "payment.requires_action" | "payment.canceled" | "payment.refunded" | "payment.disputed" | "refund.updated" | "checkout.session.completed" | "checkout.session.expired" | "invoice.finalized" | "invoice.paid" | "invoice.overdue" | "invoice.voided" | "account.capabilities_updated" | "subscription.created" | "subscription.updated" | "subscription.canceled" | "connected_account.updated" | "transfer.paid" | "transfer.reversed" | string[]
get/v1/developer/webhooks· List webhook endpoints
get/v1/developer/webhooks/{id}· Retrieve a webhook endpoint
Parameters
  • id (path, required)
post/v1/developer/webhooks/{id}· Enable/disable a webhook endpoint
Parameters
  • id (path, required)
  • Idempotency-Key (header)
Body
enabled*boolean
get/v1/events· List events
Parameters
  • limit (query)