Payment Request
Init PGW SDK
Class PGWSDKParamsBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Android: Constructors (context, apiEnvironment) iOS: Constructors (apiEnvironment) | Context, APIEnvironment | M | PGW SDK API endpoint environment • SDK constructor • Refer to: API Environment |
clientId | String | O | Unique client ID • In UUID format |
locale | String | O | Locale 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 |
log | Boolean | O | PGW SDK log information. |
Global/Local Customer Token Payment (GCARD / LCARD)
Class CustomerTokenPaymentBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode, token) | PaymentCode, String | C | Init class constructor with payment code and card 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, String | C | Init class constructor with payment channel code and card 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') |
expiryMonth | Integer | O | Credit card expiry month * Only used to update card token expiry month |
expiryYear | Integer | O | Credit card expiry year * Only used to update card token expiry year. |
securityCode | String | O | Credit card security code |
pin | String | O | Credit card PIN |
installmentInterestType | String | C | Installment interest type Refer to: Installment Interest Type Code |
installmentPeriod | Integer | C | Installment period, in months |
fxRateId | String | O | Exchange rate ID Refer to: Exchange Rate Response API |
String | O | Customer’s email address | |
mobileNo | String | O | Customer’s mobile number |
userAddress | UserAddress | O | Customer's address userAddress: Refer to: User Address User Address Builder: Refer to: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
loyaltyPoints | Array | C | Loyalty points redeem list. loyaltyPoints: Refer Loyalty Point |
Global/Local Card Payment (GCARD / LCARD / LCARDIPP)
Class CardPaymentBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode, cardNo) | PaymentCode, String | C | Init class constructor with payment code and credit card number • SDK constructor • Refer to: Payment Code |
Constructors (channelCode, cardNo) | String, String | C | Init class constructor with payment channel code and credit card number • SDK constructor • Refer to: Payment Option Detail Response API |
expiryMonth | Integer | O | Credit card expiry month |
expiryYear | Integer | O | Credit card expiry year |
securityCode | String | O | Credit card security code |
pin | String | O | Credit card PIN |
bank | String | O | Credit card issuer bank name |
country | String | O | Credit card issuer country code |
tokenize | Boolean | C | Allows 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. |
installmentInterestType | String | C | Installment interest type Refer to: Installment Interest Type Code |
installmentPeriod | Integer | C | Installment period, in months |
fxRateId | String | O | Exchange rate ID Refer to: Exchange Rate Response API |
name | String | O | Customer’s name |
String | O | Customer’s email address | |
mobileNo | String | O | Customer’s mobile number |
userAddress | UserAddress | O | Customer's address userAddress: Refer to: User Address User Address Builder: Refer to: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | Customer's note. | |
loyaltyPoints | Array | Loyalty points redeem list. LoyaltyPoints: Refer Loyalty Point |
Internet Banking (IMBANK)
Class InternetBankingBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code • SDK constructor • Refer Payment Code |
Constructors (channelCode, agentCode, agentChannelCode) | String, String, String | C | Init class constructor with payment channel code, agent code and agent channel code • SDK constructor • agentChannelCode: Refer to Payment Option Detail Response API |
fxRateId | String | O | Exchange rate ID Refer to: Exchange Rate Response API |
name | String | O | Customer’s name |
String | O | Customer’s email address | |
mobileNo | String | O | Customer’s mobile number |
userAddress | UserAddress | O | Customer's address userAddress: Refer to: User Address User Address Builder: Refer to: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
Pay At Counter (COUNTER)
Class PayAtCounterBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code • SDK constructor • Refer Payment Code |
Constructors (channelCode, agentCode, agentChannelCode) | String, String, String | C | Init class constructor with payment channel code, agent code and agent channel code • SDK constructor • agentChannelCode : Refer to: Payment Option Detail Response API |
fxRateId | String | O | Exchange rate IF Refer to: Exchange Rate Response API |
name | String | O | Customer’s name |
String | O | Customer’s email address | |
mobileNo | String | O | Customer’s mobile number |
userAddress | UserAddress | O | Customer's address userAddress: Refer to: User Address User Address Builder: Refer to: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
Self Service Machine (SSM)
Class SelfServiceMachineBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code • SDK constructor • Refer Payment Code |
Constructors (channelCode, agentCode, agentChannelCode) | String, String, String | C | Init class constructor with payment channel code, agent code and agent channel code • SDK constructor • agentChannelCode : Refer to: Payment Option Detail Response API |
fxRateId | String | O | Exchange rate ID Refer to: Exchange Rate Response API |
name | String | O | Customer’s name |
String | O | Customer’s email address | |
mobileNo | String | O | Customer’s mobile number |
userAddress | UserAddress | O | Customer's address userAddress: Refer to: User Address User Address Builder: Refer to: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
Web Payment (WEBPAY)
Class WebPaymentBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code • SDK constructor • Refer Payment Code |
Constructors (channelCode, agentCode, agentChannelCode) | String, String, String | C | Init class constructor with payment channel code, agent code and agent channel code • SDK constructor • agentChannelCode : Refer to: Payment Option Detail Response API |
fxRateId | String | O | Exchange rate ID Refer to: Exchange Rate Response API |
name | String | O | Customer’s name |
String | O | Customer’s email address | |
mobileNo | String | O | Customer’s mobile number |
userAddress | UserAddress | O | Customer's address userAddress: Refer to: User Address User Address Builder: Refer to: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
cardNo | String | O | Credit card number. |
expiryMonth | Integer | O | Credit card expiry month. |
expiryYear | Integer | O | Credit card expiry year. |
issuedMonth | Integer | O | Credit card issued month. |
issuedYear | Integer | O | Credit card issued year. |
securityCode | String | O | Credit card security code. |
bank | String | O | Credit card issuer bank name. |
country | String | O | Credit card issuer country code. |
tokenize | Boolean | O | Allowing customer to tokenize payment info. Allowing merchant to specify if customer token feature is enabled. • false – No (default) • true – Yes If true, 2C2P Payment Gateway will return Customer Token on Payment Inquiry API. |
Digital Payment (DPAY)
Class DigitalPaymentBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code • SDK constructor • Refer Payment Code |
Constructors (channelCode) | String | C | Init class constructor with payment channel code • SDK constructor • agentChannelCode: Refer Payment Option Detail Response API |
accountNo | String | O | Customer’s account number |
token | String | O | Digital payment token |
fxRateId | String | O | Exchange rate ID Refer to Exchange Rate Response API |
name | String | O | Customer’s name |
String | O | Customer’s email address | |
mobileNo | String | O | Customer’s mobile number |
userAddress | UserAddress | O | Customer's address userAddress: Refer to: User Address User Address Builder: Refer to: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
tokenize | Boolean | O | Allowing customer to tokenize payment info. Allowing merchant to specify if customer token feature is enabled. • false – No (default) • true – Yes If true, 2C2P Payment Gateway will return Customer Token on Payment Inquiry. |
QR Payment (QR)
Class QRPaymentBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code • SDK constructor • Refer Payment Code |
Constructors (channelCode) | String | C | Init class constructor with payment channel code • SDK constructor • agentChannelCode: Refer to: Payment Option Detail Response API |
type | String | O | QR data type Refer to: QR Type Code |
fxRateId | String | O | Exchange rate ID Refer to: Exchange Rate Response API |
name | String | O | Customer’s name |
String | O | Customer’s email address | |
mobileNo | String | O | Customer’s mobile number |
userAddress | UserAddress | O | Customer's address userAddress: Refer to: User Address User Address Builder: Refer to: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
Buy Now Pay Later Payment (BNPL)
Class BuyNowPayLaterPaymentBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code • SDK constructor • Refer to: Payment Code |
Constructors (channelCode) | String | C | Init class constructor with payment channel code, agent code and agent channel code • SDK constructor • agentChannelCode: Refer to: Payment Option Detail Response API |
fxRateId | String | O | Exchange rate ID Refer to: Exchange Rate Response API |
name | String | O | Customer’s name |
String | O | Customer’s email address | |
mobileNo | String | O | Customer’s mobile number |
userAddress | UserAddress | O | Customer's address userAddress: Refer to: User Address User Address Builder: Refer to: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
Universal Payment (Any type of payment)
Class UniversalPaymentBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code • SDK constructor • Refer to: Payment Code |
Constructors (channelCode, agentCode, agentChannelCode) | String, String, String | C | Init class constructor with payment channel code, agent code and agent channel code • SDK constructor • agentChannelCode: Refer to: Payment Option Detail Response API |
cardNo | String | O | Credit card number |
expiryMonth | Integer | O | Credit card expiry month |
expiryYear | Integer | O | Credit card expiry year |
securityCode | String | O | Credit card security code |
pin | String | O | Credit card PIN |
bank | String | O | Credit card issuer bank name |
country | String | O | Credit card issuer country code |
tokenize | Boolean | O | Allowing customer to tokenize payment info. Allowing merchant to specify if customer token feature is enabled. • false – No (default) • true – Yes If true, 2C2P Payment Gateway will return Customer Token on Payment Inquiry. |
installmentInterestType | String | O | Installment interest type Refer to: Installment Interest Type Code |
installmentPeriod | Integer | O | Installment period, in months |
token | String | O | Token from card token ID or digital payment |
accountNo | String | O | Customer’s account number |
qrType | String | O | QR data type Refer to: QR Type Code |
fxRateId | String | O | Exchange rate ID Refer to: Exchange Rate Response API |
name | String | O | Customer’s name |
String | O | Customer’s email address | |
mobileNo | String | O | Customer’s mobile number |
userAddress | UserAddress | O | Customer's address userAddress: Refer to: User Address User Address Builder: Refer to: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
loyaltyPoints | Array | O | Loyalty points redeem list. LoyaltyPoints: Refer Loyalty Point |
issuedMonth | Integer | O | Credit card issued month. |
issuedYear | Integer | O | Credit card issued year. |
Do Payment Request
Class TransactionResultRequestBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentToken) | String | M | Init class constructor with payment token ID • SDK constructor • retrieve from Payment Token API |
clientId | String | O | Unique client ID * In UUID format |
locale | String | O | Locale of API response. _ Based on ISO 639 codes _ If locale is empty, the API will respond based on the payment token locale. _ If locale is indicated, the API will respond with the requested locale _ If the clientID is indicated, the API will respond with the user's selected locale |
with | PaymentRequest | O | Payment 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 |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors () | C | Init class constructor | |
userBillingAddress | UserBillingAddress | O | Customer's billing address information userBillingAddress: Refer to: User Billing Address |
Deep Link Payment (DEEPLINK)
Class DeepLinkPaymentBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code. • SDK constructor • paymentCode: refer Payment Code |
Constructors (channelCode, agentCode, agentChannelCode) | String, String, String | C | Init class constructor with payment channel code, agent code and agent channel code. • SDK constructor • channelCode, agentCode, agentChannelCode: refer Payment Option Detail Response API |
fxRateId | String | O | Exchange rate id. fxRateId: refer Exchange Rate Response API |
name | String | O | Customer’s name. |
String | O | Customer’s email. | |
mobileNo | String | O | Customer’s mobile number. |
userAddress | UserAddress | O | Customer's address. • userAddress: refer User Address • User address builder: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
Online Direct Debit Payment (ODD)
Class OnlineDirectDebitBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code. • SDK constructor • paymentCode: refer Payment Code |
Constructors (channelCode, agentCode, agentChannelCode) | String, String, String | C | Init class constructor with payment channel code, agent code and agent channel code. • SDK constructor • channelCode, agentCode, agentChannelCode: refer Payment Option Detail Response API |
fxRateId | String | O | Exchange rate id. fxRateId: refer Exchange Rate Response API |
name | String | O | Customer’s name. |
String | O | Customer’s email. | |
mobileNo | String | O | Customer’s mobile number. |
userAddress | UserAddress | O | Customer's address. • userAddress: refer User Address • User address builder: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
tokenize | Boolean | O | Allowing customer to tokenize payment info. • Allowing merchant to specify if customer token feature is enabled. • false – No (default) • true – Yes • If true, 2C2P Payment Gateway will return • Customer Token on Payment Inquiry API. |
token | String | O | Token from customer token id. |
Loyalty Point Payment (GCARD)
Class LoyaltyPointPaymentBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode, String | C | Init class constructor with payment code. • SDK constructor • paymentCode: refer Payment Code |
Constructors (channelCode) | String, String | C | Init class constructor with payment channel code. • SDK constructor • channelCode: refer Payment Option Detail Response API |
cardNo | String | O | Credit card number. |
expiryMonth | Integer | O | Credit card expiry month. |
expiryYear | Integer | O | Credit card expiry year. |
securityCode | String | O | Credit card security code. |
pin | String | O | Credit card pin. |
bank | String | O | Credit card issuer bank name. |
country | String | O | Credit card issuer country code. |
tokenize | Boolean | C | Allowing customer to tokenize card info. • Allowing merchant to specify if customer token feature is enabled. • false – No (default) • true – Yes • If true, 2C2P Payment Gateway will return Customer Token on Payment Inquiry API. |
installmentInterestType | String | C | Installment interest type. refer 4.3 Installment Interest Type Code |
installmentPeriod | Integer | C | Installment period in month. |
installmentPayLaterPeriod | Integer | C | Installment pay later period. |
token | String | O | Token from customer token id |
fxRateId | String | O | Exchange rate id. fxRateId: refer Exchange Rate Response API |
name | String | O | Customer’s name. |
String | O | Customer’s email. | |
mobileNo | String | O | Customer’s mobile number. |
userAddress | UserAddress | O | Customer's address. • userAddress: refer User Address • User address builder: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
loyaltyPoints | Array | C | Loyalty points redeem list. loyaltyPoints: refer Loyalty Point |
Digital Currency Payment (DCURRENCY)
Class DigitalCurrencyBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (paymentCode) | PaymentCode | C | Init class constructor with payment code. • SDK constructor • paymentCode: refer Payment Code |
Constructors (channelCode) | String | C | Init class constructor with payment channel code. • SDK constructor • channelCode: refer Payment Option Detail Response API |
fxRateId | String | O | Exchange rate id. fxRateId: refer Exchange Rate Response API |
name | String | O | Customer’s name. |
String | O | Customer’s email. | |
mobileNo | String | O | Customer’s mobile number. |
userAddress | UserAddress | O | Customer's address. • userAddress: refer User Address • User address builder: User Address For Payment |
paymentExpiry | String | O | Payment 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 |
customerNote | String | O | Customer's note. |
Payment UI
Class PaymentUIBuilder |
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
Constructors (activity) | Activity | M | Init class constructor with Android activity. • SDK constructor • activity: refer https://developer.android.com/reference/android/app/Activity |
Constructors (uiViewController) | UIViewController | M | Init class constructor with iOS UI View controller. • SDK constructor • uiViewController: refer https://developer.apple.com/documentation/uikit/uiviewcontroller |
Updated 7 days ago