BucksBox Developer DocsBucksBox Developer Docs
Getting Started
Merchant API
Partner API
SDK
GitHub
Getting Started
Merchant API
Partner API
SDK
GitHub
  • Quick Start
  • Configuration
  • Auth
  • DMT
  • AEPS
  • QR
  • Vendor
  • Commission
  • Crypto Utilities

SDK — Auth Module

client.auth.* — login, logout, OTP, and registration. Direct paymentSystem calls (no gateway encryption).

Methods

login(body)

const res = await client.auth.login({
  email:    'vendor@example.com',
  password: 'your-password',
});
// JWT is stored automatically in the client

logout()

client.auth.logout(); // clears the stored JWT

sendOtp(body)

await client.auth.sendOtp({ mobile: '9876543210' });

verifyOtp(body)

await client.auth.verifyOtp({ mobile: '9876543210', otp: '123456' });

register(body)

Self-registration for new vendors (no auth required).

await client.auth.register({
  name:     'My Company',
  email:    'vendor@example.com',
  mobile:   '9876543210',
  password: 'secure-password',
});

changePassword(body)

await client.auth.changePassword({
  currentPassword: 'old-pass',
  newPassword:     'new-pass',
});

resetPassword(body)

await client.auth.resetPassword({ email: 'vendor@example.com', otp: '123456', newPassword: 'new-pass' });
Prev
Configuration
Next
DMT