Wallets Quickstart

Create wallets for customers to store balance, earn rewards, and make instant purchases.

What you’ll build

  • Create customer wallet
  • Add balance via payment or reward
  • Deduct balance at checkout
  • Track transaction history

Quick example

// Create wallet
const wallet = await orangepill.wallets.create({
  customer_id: 'cust_abc123',
  currency: 'COP',
  type: 'stored_value'
});

// Add balance
await orangepill.wallets.transactions.create({
  wallet_id: wallet.id,
  amount: 100000,
  type: 'credit',
  description: 'Welcome bonus'
});

// Deduct at checkout
await orangepill.wallets.transactions.create({
  wallet_id: wallet.id,
  amount: 50000,
  type: 'debit',
  description: 'Purchase: order_123'
});

Use cases

  • Loyalty points and rewards
  • Gift cards and vouchers
  • Marketplace seller payouts
  • Remittance and transfers

Next steps