# Useful objects

This documentation covers concepts and objects common across integration methods.

# Order object

Using the Order object, you can provide a list of orders for each charge. These orders will be displayed in the invoice sent to the customer.

Parameter Required Description
id Required Merchant's order id
name Required Order name
quantity Required Quantity
amount Required Amount to be paid for this order

# Available locales

Next locales are available in widget. See how to use it

Parameter Description
en English
th Thai
zh Chinese
ko Korean
ph Tagalog
vi Vietnamese
id Indonesian
ml Malay

# Payment methods

You can specify payment methods available for each country in options. The payment methods argument is an object with country code as the key and a list of selected payment methods in front of it.

const paymentMethods = {
  HK: ["fps", "hk-bank-transfer"],
  SG: ["paynow"],
  VN: ["viettel-pay"],
  MY: ["duit-now"],
  PH: ["instapay"],
  TH: ["prompt-pay"],
  IN: ["in-bank-transfer"],
  ID: ["gojek-id", "id-bank-transfer"],
  AU: ["au-bank-transfer"],
  NZ: ["nz-bank-transfer"],
  KR: ["toss"],
};

# Autofill

If you are redirecting customers from an online store, you may already have some of their personal information. For instance, you may already have a verified email for a logged in customer. You can facilitate faster checkout by pre-filling customer information.

To do so, you can pass email and phone OR email only in the following format:

const customer = {
  email: "test@test.test",
  firstName: "John",
  lastName: "Doe",
  phone: {
    code: "+66",
    phone: "12345678901",
  },
};