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.
| Provider | Types | Status |
|---|---|---|
| Square | Cards, card-on-file, subscriptions | The card processor |
| Crypto | BTC, ETH, USDC, SOL | Native tokens |
| Apple Pay | iOS, Safari | Via Square |
| Google Pay | Android, Chrome | Via Square |
| Stripe | Cards, ACH | Legacy — 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 URLRefunds
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