For the complete documentation index, see llms.txt. This page is also available as Markdown.

Payments

client.payments.create(params)

const payment = await client.payments.create({
  amount: 49.99,               // or product_id: "b2c3d4e5-..."
  token: "USDC",
  network: "BASE",
  customer_email: "john@example.com",
  customer_name: "John Doe",
  redirect_url: "https://yourapp.com/success",
  cancel_url: "https://yourapp.com/cancel",
  metadata: { order_id: "ORD-12345", plan: "pro" },
});

// Redirect customer to hosted checkout
window.location.href = payment.checkout_url;

client.payments.get(id)

Accepts UUID or short ID.

const payment = await client.payments.get("pXk9mQ");
console.log(payment.status); // "PENDING" | "COMPLETED" | "EXPIRED" | "CANCELED" | "PARTIALLY_PAID"

client.payments.list(params?)


client.payments.cancel(id)

Last updated