APIs Interface

PGW SDK API Interface
Payment Option Request API      Payment Option Response API
Payment Option Detail Request API      Payment Option Detail Response API
Do Payment Request API      Do Payment Response API
Card Token Info Request API      Card Token Info Response API
Exchange Rate Request API      Exchange Rate Response API
User Preference Request API      User Preference Response API
Transaction Status Request API      Transaction Status Response API
System Initialization Request API      System Initialization Response API
Payment Notification Request API      Payment Notification Response API
Cancel Transaction Request API      Cancel Transaction Response API

 

PGW SDK API Interface


Class PGWSDK

Methods

Data Type

Mandatory

Description

Constructors initialize(params)

PGWSDKParams

M

Init class constructor with PGW SDK params initialiize

• SDK constructor
• Refer Init PGW SDK

instance/shared

PGWSDK

M

PGW SDK instance methods

pgwSDKParams

PGWSDKParams

M

PGW SDK params

clientId

String

O

Unique client id.

paymentOption
(request, response)

PaymentOptionRequest,
APIResponse

O

Payment option API method.

request: refer Payment Option Request API
response: refer Payment Option Response API

paymentOptionDetail
(request, response)

PaymentOptionDetailRequest,
APIResponse

O

Payment option detail API method.

request: refer Payment Option Detail Request API
response: refer Payment Option Detail Response API

proceedTransaction
(request, response)

TransactionResultRequest,
APIResponse

O

Do payment API method.

request: refer Do Payment Request API
response: refer Do Payment Response API

cardTokenInfo
(request, response)

CardTokenInfoRequest,
APIResponse

O

Card token Info API method.

request: refer Card Token Info Request API
response: refer Card Token Info Response API

exchangeRate
(request, response)

ExchangeRateRequest, APIResponse

O

Exchange rate API method.

request: refer Exchange Rate Request API
response: refer Exchange Rate Response API

userPreference
(request, response)

UserPreferenceRequest, APIResponse

O

User preference API method.

request: refer User Preference Request API
response: refer User Preference Response API

transactionStatus
(request, response)

TransactionStatusRequest, APIResponse

O

Transaction status API method.

request: refer Transaction Status Request API
response: refer Transaction Status Response API

systemInitialization
(request, response)

SystemInitializationRequest,
APIResponse

O

System Intialization API method.

request: refer System Initialization Request API
response: refer System Initialization Response API

paymentNotification
(request, response)

PaymentNotificationRequest,
APIResponse

O

Payment Notification API method.

request: refer Payment Notification Request API
response: refer Payment Notification Response API

cancelTransaction
(request, response)

CancelTransactionRequest,
APIResponse

O

Cancel Transaction API method.

request: refer Cancel Transaction Request API
response: refer Cancel Transaction Response API

 

Payment Option Request API


Class PaymentOptionRequest

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.

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

 

Payment Option Response API


Class PaymentOptionResponse

Parameter

Data Type

Mandatory

Description

paymentToken

String

M

Payment token id.

merchantInfo

MerchantInfo

M

Merchant information.

Refer: Merchant Info

userInfo

UserInfo

C

User information.

Refer: User Info

User info can be pass via Payment Token API

channels

PaymentChannelCategory

M

Payment channel category.

Refer: Payment Channel Category

transactionInfo

TransactionInfo

M

Transaction information.

Refer: Transaction Info

configurationInfo

ConfigurationInfo

M

Configuration information.

Refer: Configuration Info

responseCode

String

M

API response code.

responseDescription

String

M

API response description.

 

Payment Option Detail Request API


Class PaymentOptionDetailRequest

Parameter

Data Type

Mandatory

Description

Constructors (paymentToken)

String

M

Init class constructor with payment token id.

SDK constructor
PaymentToken: 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.

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

categoryCode

String

M

Payment channel category code.

Refer: Payment Option Response API

groupCode

String

M

Payment channel group code.

Refer: Payment Option Response API

 

Payment Option Detail Response API


Class PaymentOptionDetailResponse

Parameter

Data Type

Mandatory

Description

name

String

M

Payment channel title.

categoryCode

String

M

Payment channel category code.

groupCode

String

M

Payment channel group code.

iconUrl

String

M

Payment channel icon url.

validation

CommonValidation

M

Payment channel global common validation.

Refer: Common Validation

channels

PaymentChannel

M

Payment channel list.

Refer: Payment Channel

totalChannel

Integer

M

Total channel count of payment channel.

configurationInfo

ConfigurationInfo

O

Payment channel configuration information.

Refer: Configuration Info

responseCode

String

M

API response code.

responseDescription

String

M

API response description.

 

Do Payment Request API


Class TransactionResultRequest

Parameter

Data Type

Mandatory

Description

Constructors (paymentToken)

String

M

Init class constructor with payment token id.

• SDK constructor
• PaymentToken: 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.

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

payment

PaymentRequest

M

Payment request of customer payment data.

Refer: Payment Request

 

Do Payment Response API


Class TransactionResultResponse

Parameter

Data Type

Mandatory

Description

channelCode

String

M

Payment channel code.

Refer: Payment Channel Matrix

invoiceNo

String

M

Transaction invoice number.

Unique merchant order number.

only returned when respCode is 2000 (transaction completed)

type

String

C

Payment data type.

data

String

M

Payment data information.

Refer: API Response Code

fallbackData

String

C

Payment fallback data information.

For payment flow 1004 only.

if user device doesn't installed specific native app, this fallback allow do payment with web payment.

expiryTimer

Integer

C

Expiry timer count down in millisecond.

For payment flow 1005 only.

expiryDescription

String

C

Payment expiry description.

For payment flow 1005 only.

additionalInfo

TransactionResultAdditionalInfo

C

Refer Transaction Result Additional Info

responseCode

String

M

API response code.

responseDescription

String

M

API response description.

 

Card Token Info Request API


Class CardTokenInfoRequest

Parameter

Data Type

Mandatory

Description

Constructors (paymentToken)

String

M

Init class constructor with payment token id.

SDK constructor
PaymentToken: retrieve from Payment Token API

clientId

String

O

Unique client id.

In UUID fromat.

locale

String

O

Locale of API response.

Based on ISO 639.

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

 

Card Token Info Response API


Class CardTokenInfoResponse

Parameter

Data Type

Mandatory

Description

paymentToken

String

M

Payment token id.

cardTokens

Array

M

Card token list.

Refer: Card Token Info

responseCode

String

M

API response code.

responseDescription

String

M

API response description.

 

Exchange Rate Request API


Class ExchangeRateRequest

Parameter

Data Type

Mandatory

Description

Constructors (paymentToken)

String

M

Init class constructor with payment token id.

SDK constructor
PaymentToken: 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.

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

bin

String

O

Credit card bin.

Bin for retrieve Dynamic Currency Conversion currency data.

 

Exchange Rate Response API


Class ExchangeRateResponse

Parameter

Data Type

Mandatory

Description

paymentToken

String

M

Payment token id.

providerCode

String

M

Exchange rate provider code.

expire

Integer

M

Exchange rate offer expire time.

In Unix timestamp.

fxRates

Array

M

Exchange rate rate list.

responseCode

String

M

API response code.

responseDescription

String

M

API response description.

 

User Preference Request API


Class UserPreferenceRequest

Parameter

Data Type

Mandatory

Description

Constructors (paymentToken)

String

M

Init class constructor with payment token.

• SDK constructor
• PaymentToken: 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.

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

 

User Preference Response API


Class UserPreferenceResponse

Parameter

Data Type

Mandatory

Description

paymentToken

String

M

Payment token id.

info

UserPreferenceInfo

M

User preference information.

Refer: User Preference Info

responseCode

String

M

API response code.

responseDescription

String

M

API response description.

 

Transaction Status Request API


Class TransactionStatusRequest

Parameter

Data Type

Mandatory

Description

Constructors (paymentToken)

String

M

Init class constructor with payment token.

• SDK constructor
• PaymentToken: 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.

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

additionalInfo

String

O

Additional transaction information on the response.

default = false

if true, api will return more information.

 

Transaction Status Response API


Class TransactionStatusResponse

Parameter

Data Type

Mandatory

Description

channelCode

String

M

Payment channel code.

invoiceNo

String

M

Transaction invoice number.

Unique merchant order number.

only returned when respCode is 2000 (transaction completed)

additionalInfo

TransactionStatusAdditionalInfo

O

Additional transaction information.

Refer: Transaction Status Additional Info

responseCode

String

M

API response code.

responseDescription

String

M

API response description.

 

System Initialization Request API


Class SystemInitializationRequest

Parameter

Data Type

Mandatory

Description

Constructors (paymentToken)

String

M

Init class constructor with payment token.

• SDK constructor
• PaymentToken: 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.

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

 

System Initialization Response API


Class SystemInitializationResponse

Parameter

Data Type

Mandatory

Description

initialization

SystemInitialization

M

System Initialization information.

Refer: System Initialization

responseCode

String

M

API response code.

responseDescription

String

M

API response description.

 

Payment Notification Request API


Class PaymentNotificationRequest

Parameter

Data Type

Mandatory

Description

Constructors (paymentToken)

String

M

Init class constructor with payment token.

• SDK constructor
• PaymentToken: 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.

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

platform

String

M

Platform type.

Refer: Payment Notification Platform Code

recipientId

String

M

User ID obtain from platform.

recipientName

String

M

User name obtain from platform.

 

Payment Notification Response API


Class PaymentNotificationResponse

Parameter

Data Type

Mandatory

Description

responseCode

String

M

API response code

responseDescription

String

M

API response description.

 

Cancel Transaction Request API


Class CancelTransactionRequest

Parameter

Data Type

Mandatory

Description

channelCode

String

M

Payment channel code.
Refer: Payment Channel Matrix

invoiceNo

String

M

Transaction invoice number.

Unique merchant order number.

only returned when respCode is 2000 (transaction completed)

type

String

C

Payment data type.

For QR = QR data type

data

String

M

Payment data information.

Refer: API Response Code

fallbackData

String

C

Payment fallback data information.

For payment flow 1004 only.

if user device doesn't installed specific native app, this fallback allow do payment with web payment.

responseCode

String

M

API response code.

responseDescription

String

M

API response description.

 

Cancel Transaction Response API


Class CancelTransactionResponse

Parameter

Data Type

Mandatory

Description

channelCode

String

M

Payment channel code.
Refer: Payment Channel Matrix

invoiceNo

String

M

Transaction invoice number.

Unique merchant order number.

only returned when respCode is 2000 (transaction completed)

responseCode

String

M

API response code.

responseDescription

String

M

API response description.