Payment Request

Init PGW SDK


Class PGWSDKParamsBuilder
ParameterData TypeMandatoryDescription
Android: Constructors (context, apiEnvironment)
iOS: Constructors (apiEnvironment)
Context, APIEnvironmentMPGW SDK API endpoint environment.

• SDK constructor.
• Refer to: API Environment
clientIdStringOUnique client ID.

• In UUID format.
localeStringOLocale of API response.
• Based on ISO 639 codes.

Important:
• if locale is empty, api will response based on payment token locale.

• if locale is exist, api will response with requested locale.

• if clientID exist, api will response with user preference locale.
logBooleanOPGW SDK log information.

Global/Local Customer Token Payment (GCARD / LCARD)


Class CustomerTokenPaymentBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode, token)PaymentCode, StringCInit class constructor with payment code and customer token ID.

• SDK constructor.
• Refer to: Payment Code
• Token: Customer token (Generated and returned by the 2C2P payment gateway if the payment's storeCard option is set to 'true').
Constructors (channelCode, token)String, StringCInit class constructor with payment channel code and customer token ID.

• SDK constructor.
• Refer to: Payment Option Detail Response API
• Token: Customer token (Generated and returned by the 2C2P payment gateway if the payment's storeCard option is set to 'true').
expiryMonthIntegerOCredit card expiry month.

* Only use for update customer token expiry month.
expiryYearIntegerOCredit card expiry year.

* Only use for update customer token expiry year.
securityCodeStringOCredit card security code.
pinStringOCredit card PIN.
installmentInterestTypeStringCInstallment interest type.

Refer to: Installment Interest Type Code
installmentPeriodIntegerCInstallment period, in months.
installmentPayLaterPeriodIntegerCInstallment pay later period.
fxRateIdStringOExchange rate ID.

Refer to: Exchange Rate Response API
nameStringOCustomer's name.
emailStringOCustomer’s email address.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

userAddress:
Refer to: User Address

User Address Builder:
Refer to: User Address For Payment
paymentExpiryStringOPayment expiry.

The date/time when the customer must complete the payment. Payments completed after the expiry date/time will be rejected.

Date Format: yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.
loyaltyPointsArray<LoyaltyPoint>CLoyalty points redeem list.

loyaltyPoints: Refer Loyalty Point

Global/Local Card Payment (GCARD / LCARD / LCARDIPP)


Class CardPaymentBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode, cardNo)PaymentCode, StringCInit class constructor with payment code and credit card number.

• SDK constructor.
• Refer to: Payment Code
Constructors (channelCode, cardNo)String, StringCInit class constructor with payment channel code and credit card number.

• SDK constructor.
• Refer to: Payment Option Detail Response API
expiryMonthIntegerOCredit card expiry month.
expiryYearIntegerOCredit card expiry year.
securityCodeStringOCredit card security code.
pinStringOCredit card PIN.
bankStringOCredit card issuer bank name.
countryStringOCredit card issuer country code.
tokenizeBooleanCAllows customer to tokenize card information.

Allows merchant to indicate if the Store Card feature is enabled.

• false – No (default)
• true – Yes

• If true, 2C2P Payment Gateway will return Customer Token on Payment Inquiry.
installmentInterestTypeStringCInstallment interest type.

Refer to: Installment Interest Type Code
installmentPeriodIntegerCInstallment period, in months.
installmentPayLaterPeriodIntegerCInstallment pay later period.
fxRateIdStringOExchange rate ID.

Refer to: Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email address.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

userAddress:
Refer to: User Address

User Address Builder:
Refer to: User Address For Payment
paymentExpiryStringOPayment expiry.

The date/time when the customer must complete the payment. Payments completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringCustomer's note.
loyaltyPointsArray<LoyaltyPoint>Loyalty points redeem list.

LoyaltyPoints: Refer Loyalty Point

Internet Banking (IMBANK)


Class InternetBankingBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• Refer Payment Code
Constructors (channelCode, agentCode, agentChannelCode)String, String, StringCInit class constructor with payment channel code, agent code and agent channel code.

• SDK constructor.
• agentChannelCode: Refer to Payment Option Detail Response API
fxRateIdStringOExchange rate ID.

Refer to: Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email address.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

userAddress:
Refer to: User Address

User Address Builder:
Refer to: User Address For Payment
paymentExpiryStringOPayment expiry.

The date/time when the customer must complete the payment. Payments completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.

Pay At Counter (COUNTER)


Class PayAtCounterBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• Refer Payment Code
Constructors (channelCode, agentCode, agentChannelCode)String, String, StringCInit class constructor with payment channel code, agent code and agent channel code.

• SDK constructor.
• agentChannelCode : Refer to: Payment Option Detail Response API
fxRateIdStringOExchange rate ID.

Refer to: Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email address.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

userAddress:
Refer to: User Address

User Address Builder:
Refer to: User Address For Payment
paymentExpiryStringOPayment expiry.

The date/time when the customer must complete the payment. Payments completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.

Self Service Machine (SSM)


Class SelfServiceMachineBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• Refer Payment Code
Constructors (channelCode, agentCode, agentChannelCode)String, String, StringCInit class constructor with payment channel code, agent code and agent channel code.

• SDK constructor.
• agentChannelCode : Refer to: Payment Option Detail Response API
fxRateIdStringOExchange rate ID.

Refer to: Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email address.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

userAddress:
Refer to: User Address

User Address Builder:
Refer to: User Address For Payment
paymentExpiryStringOPayment expiry.

The date/time when the customer must complete the payment. Payments completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.

Web Payment (WEBPAY)


Class WebPaymentBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• Refer Payment Code
Constructors (channelCode, agentCode, agentChannelCode)String, String, StringCInit class constructor with payment channel code, agent code and agent channel code.

• SDK constructor.
• agentChannelCode : Refer to: Payment Option Detail Response API
fxRateIdStringOExchange rate ID.

Refer to: Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email address.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

userAddress:
Refer to: User Address

User Address Builder:
Refer to: User Address For Payment
paymentExpiryStringOPayment expiry.

The date/time when the customer must complete the payment. Payments completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.
cardNoStringOCredit card number.
expiryMonthIntegerOCredit card expiry month.
expiryYearIntegerOCredit card expiry year.
issuedMonthIntegerOCredit card issued month.
issuedYearIntegerOCredit card issued year.
securityCodeStringOCredit card security code.
bankStringOCredit card issuer bank name.
countryStringOCredit card issuer country code.
tokenizeBooleanOAllows customer to tokenize card information.

Allows merchant to indicate if the Store Card feature is enabled.

• false – No (default)
• true – Yes

• If true, 2C2P Payment Gateway will return Customer Token on Payment Inquiry .

Digital Payment (DPAY)


Class DigitalPaymentBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• Refer Payment Code
Constructors (channelCode)StringCInit class constructor with payment channel code.

• SDK constructor.
• agentChannelCode: Refer Payment Option Detail Response API
accountNoStringOCustomer’s account number.
tokenStringODigital payment token.
fxRateIdStringOExchange rate ID.

Refer to Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email address.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

userAddress:
Refer to: User Address

User Address Builder:
Refer to: User Address For Payment
paymentExpiryStringOPayment expiry.

The date/time when the customer must complete the payment. Payments completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
tokenizeBooleanOAllows customer to tokenize card information.

Allows merchant to indicate if the Store Card feature is enabled.

• false – No (default)
• true – Yes

• If true, 2C2P Payment Gateway will return Customer Token on Payment Inquiry
customerNoteStringOCustomer's note

QR Payment (QR)


Class QRPaymentBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• Refer Payment Code
Constructors (channelCode)StringCInit class constructor with payment channel code.

• SDK constructor.
• agentChannelCode: Refer to: Payment Option Detail Response API
typeStringOQR data type.

Refer to: QR Type Code
fxRateIdStringOExchange rate ID.

Refer to: Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email address.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

userAddress:
Refer to: User Address

User Address Builder:
Refer to: User Address For Payment
paymentExpiryStringOPayment expiry.

The date/time when the customer must complete the payment. Payments completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.

Buy Now Pay Later Payment (BNPL)


Class BuyNowPayLaterPaymentBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• Refer to: Payment Code
Constructors (channelCode)StringCInit class constructor with payment channel code, agent code and agent channel code.

• SDK constructor.
• agentChannelCode: Refer to: Payment Option Detail Response API
fxRateIdStringOExchange rate ID.

Refer to: Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email address.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

userAddress:
Refer to: User Address

User Address Builder:
Refer to: User Address For Payment
paymentExpiryStringOPayment expiry.

The date/time when the customer must complete the payment. Payments completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
installmentPayLaterPeriodIntegerOInstallment pay later period.
customerNoteStringOCustomer's note.

Universal Payment (Any type of payment)


Class UniversalPaymentBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• Refer to: Payment Code
Constructors (channelCode, agentCode, agentChannelCode)String, String, StringCInit class constructor with payment channel code, agent code and agent channel code.

• SDK constructor.
• agentChannelCode: Refer to: Payment Option Detail Response API
cardNoStringOCredit card number.
expiryMonthIntegerOCredit card expiry month.
expiryYearIntegerOCredit card expiry year.
securityCodeStringOCredit card security code.
pinStringOCredit card PIN.
bankStringOCredit card issuer bank name.
countryStringOCredit card issuer country code.
tokenizeBooleanOAllows customer to tokenize card information.

Allows merchant to indicate if the Store Card feature is enabled.

• false – No (default)
• true – Yes

• If true, 2C2P Payment Gateway will return Customer Token on Payment Inquiry
installmentInterestTypeStringOInstallment interest type.

Refer to: Installment Interest Type Code
installmentPeriodIntegerOInstallment period, in months.
installmentPayLaterPeriodIntegerOInstallment pay later period.
tokenStringOToken from customer token ID or digital payment.
accountNoStringOCustomer’s account number.
qrTypeStringOQR data type.

Refer to: QR Type Code
fxRateIdStringOExchange rate ID.

Refer to: Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email address.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

userAddress:
Refer to: User Address

User Address Builder:
Refer to: User Address For Payment
paymentExpiryStringOPayment expiry.

The date/time when the customer must complete the payment. Payments completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.
loyaltyPointsArray<LoyaltyPoint>OLoyalty points redeem list

LoyaltyPoints: Refer Loyalty Point
issuedMonthIntegerOCredit card issued month.
issuedYearIntegerOCredit card issued year.

Do Payment Request


Class TransactionResultRequestBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentToken)StringMInit class constructor with payment token ID.

• SDK constructor.
• Payment token: Retrieve from Payment Token API
clientIdStringOUnique client ID.
* In UUID format.
localeStringOLocale of API response.
• Based on ISO 639 codes.

Important:
• if locale is empty, api will response based on payment token locale.

• if locale is exist, api will response with requested locale.

• if clientID exist, api will response with user preference locale.
withPaymentRequestOPayment request from payment builder
Refer to: Payment Request.

Payment request builder:
Global/Local Card Token Payment
Global/Local Card Payment
Internet Banking
Pay At Counter
Self-Service Machine
Web Payment
Digital Payment
QR Payment
Buy Now Pay Later Payment
Universal Payment
Deep Link Payment
Online Direct Debit Payment
Loyalty Point Payment
Digital Currency Payment

User Address For Payment


Class UserAddressBuilder
ParameterData TypeMandatoryDescription
Constructors ()CInit class constructor.
userBillingAddressUserBillingAddressOCustomer's billing address information.

userBillingAddress:
Refer to: User Billing Address

Deep Link Payment (DEEPLINK)


Class DeepLinkPaymentBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• paymentCode: refer Payment Code
Constructors (channelCode, agentCode, agentChannelCode)String, String, StringCInit class constructor with payment channel code, agent code and agent channel code.

• SDK constructor.
• channelCode, agentCode, agentChannelCode: refer Payment Option Detail Response API
fxRateIdStringOExchange rate ID.

fxRateId: refer Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

• userAddress: refer User Address
• User address builder: User Address For Payment
paymentExpiryStringOPayment expiry.

Date/time which the customer allowed to complete payment. Payment completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.

Online Direct Debit Payment (ODD)


Class OnlineDirectDebitBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• paymentCode: refer Payment Code
Constructors (channelCode, agentCode, agentChannelCode)String, String, StringCInit class constructor with payment channel code, agent code and agent channel code.

• SDK constructor.
• channelCode, agentCode, agentChannelCode: refer Payment Option Detail Response API
fxRateIdStringOExchange rate ID.

fxRateId: refer Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

• userAddress: refer User Address
• User address builder: User Address For Payment
paymentExpiryStringOPayment expiry.

Date/time which the customer allowed to complete payment. Payment completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.
tokenizeBooleanOAllows customer to tokenize card information.

Allows merchant to indicate if the Store Card feature is enabled.

• false – No (default)
• true – Yes

• If true, 2C2P Payment Gateway will return Customer Token on Payment Inquiry
tokenStringOToken from customer token ID.

Loyalty Point Payment (GCARD)


Class LoyaltyPointPaymentBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCode, StringCInit class constructor with payment code.

• SDK constructor.
• paymentCode: refer Payment Code
Constructors (channelCode)String, StringCInit class constructor with payment channel code.

• SDK constructor.
• channelCode: refer Payment Option Detail Response API
cardNoStringOCredit card number.
expiryMonthIntegerOCredit card expiry month.
expiryYearIntegerOCredit card expiry year.
securityCodeStringOCredit card security code.
pinStringOCredit card pin.
bankStringOCredit card issuer bank name.
countryStringOCredit card issuer country code.
tokenizeBooleanCAllows customer to tokenize card information.

Allows merchant to indicate if the Store Card feature is enabled.

• false – No (default)
• true – Yes

• If true, 2C2P Payment Gateway will return Customer Token on Payment Inquiry
installmentInterestTypeStringCInstallment interest type.

Refer to: Installment Interest Type Code
installmentPeriodIntegerCInstallment period in month.
installmentPayLaterPeriodIntegerCInstallment pay later period.
tokenStringOToken from customer token ID.
fxRateIdStringOExchange rate ID.

fxRateId: refer Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

• userAddress: refer User Address
• User address builder: User Address For Payment
paymentExpiryStringOPayment expiry.

Date/time which the customer allowed to complete payment. Payment completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.
loyaltyPointsArray<LoyaltyPoint>CLoyalty points redeem list.

loyaltyPoints: refer Loyalty Point

Digital Currency Payment (DCURRENCY)


Class DigitalCurrencyBuilder
ParameterData TypeMandatoryDescription
Constructors (paymentCode)PaymentCodeCInit class constructor with payment code.

• SDK constructor.
• paymentCode: refer Payment Code
Constructors (channelCode)StringCInit class constructor with payment channel code.

• SDK constructor.
• channelCode: refer Payment Option Detail Response API
fxRateIdStringOExchange rate ID.

fxRateId: refer Exchange Rate Response API
nameStringOCustomer’s name.
emailStringOCustomer’s email.
mobileNoStringOCustomer’s mobile number.
userAddressUserAddressOCustomer's address.

• userAddress: refer User Address
• User address builder: User Address For Payment
paymentExpiryStringOPayment expiry.

Date/time which the customer allowed to complete payment. Payment completed after the expiry date/time will be rejected.

Date Format : yyyy-MM-dd HH:mm:ss
customerNoteStringOCustomer's note.

Payment UI


Class PaymentUIBuilder
ParameterData TypeMandatoryDescription
Constructors (activity)ActivityMInit class constructor with Android activity.

• SDK constructor.
• activity: refer https://developer.android.com/reference/android/app/Activity
Constructors (uiViewController)UIViewControllerMInit class constructor with iOS UI View controller.

• SDK constructor.
• uiViewController: refer https://developer.apple.com/documentation/uikit/uiviewcontroller