Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.unseen.finance/llms.txt

Use this file to discover all available pages before exploring further.

The SDK is installed; this page walks through unseen.me() and every unseen.payments.* helper that maps to session states.

Merchant profile

const merchant = await unseen.me();
// { id, name, email, walletAddress, apiKeyPrefix, network, webhookUrl, ... }

Payments resource

Accessible as unseen.payments.
MethodDescription
create(input)Create a payment session (amount, reference, optional mint, expiresIn, successUrl, cancelUrl, webhookUrl, metadata).
get(paymentId)Fetch session by ID.
verify(paymentId)Ask Unseen to confirm on-chain state.
getTxSignatures(paymentId)List associated transaction signatures.
list(filters?)Cursor-paginated list (status, reference, limit, cursor).
cancel(paymentId)Cancel a pending session.

Create

const payment = await unseen.payments.create({
  amount: 50_000_000,
  reference: "order_123",
  description: "Premium Plan",
});
console.log(payment.checkoutUrl);
Amounts use raw token units (e.g. smallest USDC units). Optionally pass mint to override default USDC for the configured network.

Verify

Use after checkout or alongside webhooks:
const result = await unseen.payments.verify(payment.id);
if (result.status === "confirmed") {
  console.log(result.txSignature, result.reference);
}

List

const { data, pagination } = await unseen.payments.list({
  status: "confirmed",
  limit: 20,
});

if (pagination.hasMore && pagination.nextCursor) {
  const nextPage = await unseen.payments.list({
    status: "confirmed",
    cursor: pagination.nextCursor,
  });
}
Next: Webhook signatures