Hanzo
PlatformCommerce

Payments

Payment processing and providers

Payments

Hanzo Commerce supports multiple payment providers for cards, crypto, and mobile wallets.

Supported Providers

Square is the card processor. Stripe is not surfaced for a new charge — the payment-method surface a storefront renders is Square, crypto and wire. Setup lives in Payments.

ProviderTypesStatus
SquareCards, card-on-file, subscriptionsThe card processor
CryptoBTC, ETH, USDC, SOLNative tokens
Apple PayiOS, SafariVia Square
Google PayAndroid, ChromeVia Square
StripeCards, ACHLegacy — existing integrations only

Process Payment

const payment = await commerce.payments.create({
  amount: 100.00,
  currency: 'USD',
  paymentMethod: 'pm_xxx',
  customerId: 'cus_123',
  description: 'API Credits - 1000 units'
})

Crypto Payments

const payment = await commerce.crypto.createPayment({
  amount: 100.00,
  currency: 'USDC',
  network: 'ethereum'
})

// Returns payment address for on-chain transfer
console.log(payment.address)  // 0x...
console.log(payment.qrCode)   // QR code data URL

Refunds

const refund = await commerce.payments.refund(payment.id, {
  amount: 50.00,  // partial refund
  reason: 'customer_request'
})

Payment Intents

For complex checkout flows, use payment intents:

const intent = await commerce.paymentIntents.create({
  amount: 250.00,
  currency: 'USD',
  paymentMethods: ['card', 'crypto'],
  metadata: { orderId: 'ord_123' }
})

// Client-side confirmation
const result = await commerce.paymentIntents.confirm(intent.id, {
  paymentMethod: 'pm_xxx'
})

How is this guide?

Last updated on

On this page