Hanzo
PlatformCommerce

Payments

Payment processing and providers

Payments

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

Supported Providers

ProviderTypesCurrencies
StripeCards, ACH, SEPA, iDEAL135+ currencies
CryptoBTC, ETH, USDC, SOLNative tokens
Apple PayiOS, SafariUSD, EUR, GBP, +
Google PayAndroid, ChromeUSD, EUR, GBP, +

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