Business & Catalog

If the paired number is a WhatsApp Business account, the socket exposes the commerce surface below. Signatures are the package's own.

Catalog & products

MethodSignatureNotes
getCatalog({ jid, limit, cursor })paginatedRead any business's catalog page by page β€” follow the returned cursor
getCollections(jid?, limit?)Product collections of a business
productCreate(create)β†’ Promise<Product>Create a product in your catalog (name, price, description, images…)
productUpdate(productId, update)β†’ Promise<Product>Patch a product
productDelete(productIds)β†’ { deleted: number }Delete products by ID
getOrderDetails(orderId, tokenBase64)β†’ Promise<OrderDetails>Resolve an order message: items, totals β€” the token comes from the order message itself
getBusinessProfile(jid)Also listed under Chats β€” description, email, websites, address, hours

A minimal shop loop

// Publish a product
const product = await sock.productCreate({
  name: 'AunuCore Sticker Pack β€” Digital',
  price: 15000,               // in the currency's smallest unit per WA rules
  currency: 'IDR',
  description: 'The official AunuCore sticker collection.',
  isHidden: false
})

// Send it in a chat as a product message
await sock.sendMessage(jid, {
  product: {
    productImage: { url: 'https://example.com/pack.jpg' },
    productId: product.id,
    title: product.name,
    description: product.description,
    currencyCode: 'IDR',
    priceAmount1000: 15000000,
    retailerId: 'aunucore',
    url: 'https://ai.aunuhost.bond',
    productQuantity: 1
  },
  businessOwnerJid: sock.user.id
})

// When an order arrives (orderMessage in messages.upsert), resolve it:
const order = m.message.orderMessage
const details = await sock.getOrderDetails(String(order.orderId), order.token)

Calls

Incoming calls arrive on the call event. Most bots reject politely and follow up in text:

sock.ev.on('call', async ([call]) => {
  if (call.status === 'offer') {
    await sock.rejectCall(call.id, call.from)
    await sock.sendMessage(call.from, { text: 'Hi! This number is a bot β€” please chat here instead πŸ–€' })
  }
})
Catalog β‰  shop platform. These APIs manage the WhatsApp-side catalog only. Payments, invoices, and storefronts live in your own system β€” the bot's job is discovery and ordering inside the chat.