Skip to content

One-time payments

Autlantic Billing supports one-time USDC payments alongside recurring subscriptions.

  • Buyer sends USDC once to the merchant payout wallet
  • No vault mandate, allowance, or renewals
  • Hosted checkout at /checkout/pay/:id (mirrors /checkout/subscribe/:id)

Catalog price

In the merchant portal, create a product price with interval One-time (once).

Recurring subscriptions reject once prices. Use POST /v1/payments (or createPayment) instead.

SDK (sandbox)

ts
import { AutlanticBilling } from "@autlantic/payments-recurring";

const billing = AutlanticBilling.sandbox({ merchantId: "mer_demo" });

const { payment, checkoutUrl } = await billing.createPayment({
  merchantRef: order.id,
  customerWallet: member.walletAddress,
  payoutAddressEvm: creator.payoutAddressEvm,
  amountUsdc: 49,
});

// Sandbox: confirm without a real chain transfer
await billing.confirmPayment(payment.id);

SDK (hosted)

ts
const billing = AutlanticBilling.fromEnv();

const { payment, checkoutUrl } = await billing.createPayment({
  merchantRef: order.id,
  customerWallet: member.walletAddress,
  payoutAddressEvm: creator.payoutAddressEvm,
  priceId, // catalog price with interval "once"
});

// Redirect the buyer to Autlantic hosted checkout
// checkoutUrl → GET /checkout/pay/:id

On the hosted page:

  • Sandbox: Simulate USDC transfer
  • Live: Connect wallet (EIP-6963 / WalletConnect) → send USDC from the browser wallet → checkout confirms on-chain
  • Optional: apply or remove a portal coupon before paying (POST / DELETE /checkout/pay/:id/coupon)

Confirmation uses verifyUsdcPassPaymentFromTxHash from @autlantic/chain-evm.

HTTP

MethodPathPurpose
POST/v1/paymentsCreate payment (priceId once, or amountUsdc)
GET/v1/payments/:idFetch payment
GET/checkout/pay/:idHosted React checkout
GET/checkout/pay/:id/statusEnriched session + paid state
GET/checkout/pay/:id.jsonSame as /status
POST/checkout/pay/:id/confirmSandbox mark paid, or verify { txHash }
POST/checkout/pay/:id/couponApply merchant coupon ({ code })
DELETE/checkout/pay/:id/couponRemove applied coupon; restore list price

Webhooks

EventWhen
payment.createdPayment created (open)
payment.paidPayment confirmed

Low-level chain helpers

If you settle outside hosted checkout, use @autlantic/chain-evm:

  • encodeTransferCalldata
  • UsdcPassPaymentIntent
  • verifyUsdcPassPaymentFromTxHash

Receipts / PDF

After a one-time payment is confirmed, hosted checkout shows Download receipt PDF and Download invoice PDF (signed portal links, same pattern as subscription checkout).

Receipts use payment framing (one-time charge, PAID stamp). Invoice PDFs use the payment id as the document id.

Example

See examples/subscription-store: sandbox keeps a local simulate flow; hosted mode redirects to checkoutUrl.

Autlantic Payments SDK