Non UI Request Properties
The following are My2c2pSDK field's summary along with the complete example of payment request.
- Payment Request
- Payment Request With Stored-card
- Payment Request With Recurring
- Payment Request With IPP
- Payment Request For Alternative
- Payment Request For Payment Channel
- Payment Request With Tokenize Without Authorization
- Payment Request With Kanbawza Bank On Us (KBZ Bank)
- Payment Request With Apple Pay
Payment Request
Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|
double | N | API version | apiVersion is deprecated. Please use version .Default value is 9.0 |
|
merchantID | String | Y | Merchant ID | - |
uniqueTransactionCode | String | Y | Transaction unique invoice number | Recommend 12 numeric number |
desc | String | Y | Product Description | The following symbols are not allowed:!@#$%^&*()<> . |
double | Y | Payment amount | The amount should be decimal point. eg: 20 = 20.00 .amt is deprecated. Please use amount . |
|
currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code. eg: 764 |
securityCode | String | N | Three/Four Digit CVV2/CVC2/CID value at the back of the card |
- |
cardExpireMonth | Int | Y | Credit Card Expiry Month | Credit Card Expiry month in 'MM' format. |
cardExpireYear | Int | Y | Credit Card Expiry Year | Credit Card Expiry Year in 'YYYY' format. |
String | Y | Card Holder Name | cardholderName is deprecated. Please use cardHolderName . |
|
pan | String | Y | Credit Card No | - |
panBank | String | N | Credit Card Issuer Bank name | - |
panCountry | String | Y | Credit Card Issuer Bank Country Code | - |
String | N | Card Holder Email | cardholderEmail is deprecated. Please use cardHolderEmail . |
|
secretKey | String | Y | secret key | Provided by 2c2p system. |
BOOL | N | Payment UI flag | A flag to determine whether the SDK should display payment UI or not. Set to NO for Non-UI payment. Default is NO .displayPaymentPage is deprecated. Please use paymentUI . |
|
storeCard | BOOL | N | Store card flag | A flag to determine whether the SDK should stored card or not. If the value set to true, processor will response unique ID of the card data upon successful authorization. Next payment can be made by sending unique ID instead of full card information |
payCategoryID | String | N | Merchant predefined payment category code for reporting purpose | - |
userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
productionMode | BOOL | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is YES , it is set to Production mode. if the value is NO , it is set to development mode. Default is NO . |
request3DS | String | N | Only accept Y , N , F . Y is using 3DS if it's available. N is not using 3DS. F is FORCE 3DS. | Default is Y |
statementDescriptor | String | N | Dynamic statement description | (Optional) only allow alphanumeric in latin character. Require version 8.5 or later |
subMerchantID | String | N | Sub merchant ID | - |
subMerchantList | NSArray/[SubMerchant] | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.uniqueTransactionCode = @"123456789";
paymentSDK.desc = @"product item 1";
paymentSDK.amount = 20.00;
paymentSDK.currencyCode = @"764";
paymentSDK.pan = @"5105105105105100";
paymentSDK.cardExpireMonth = 12;
paymentSDK.cardExpireYear = 2019;
paymentSDK.cardHolderName = @"Mr. John";
paymentSDK.panCountry = @"TH";
paymentSDK.secretKey = @"123456";
//optional
paymentSDK.paymentUI = NO;
paymentSDK.storeCard = YES; // store card
paymentSDK.cardHolderEmail = @"john@email.com";
paymentSDK.securityCode = @"123";
paymentSDK.panBank = @"POSB";
paymentSDK.payCategoryID = @"2";
paymentSDK.userDefined1 = @"ref1";
paymentSDK.userDefined2 = @"ref2";
paymentSDK.userDefined3 = @"ref3";
paymentSDK.userDefined4 = @"ref4";
paymentSDK.userDefined5 = @"ref5";
paymentSDK.request3DS = @"N";
//payment
[paymentSDK requestWithTarget:self onResponse:^(NSDictionary *response) {
//success
} onFail:^(NSError *error) {
//fail
}];
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.uniqueTransactionCode = "123456789"
paymentSDK.desc = "product item 1"
paymentSDK.amount = 20.00
paymentSDK.currencyCode = "764"
paymentSDK.pan = "5105105105105100"
paymentSDK.cardExpireMonth = 12
paymentSDK.cardExpireYear = 2019
paymentSDK.cardHolderName = "Mr. John"
paymentSDK.panCountry = "TH"
paymentSDK.secretKey = "123456"
//optional
paymentSDK.paymentUI = false
paymentSDK.storeCard = true // store card
paymentSDK.cardHolderEmail = "john@email.com"
paymentSDK.securityCode = "123"
paymentSDK.panBank = "POSB"
paymentSDK.payCategoryID = "2"
paymentSDK.userDefined1 = "ref1"
paymentSDK.userDefined2 = "ref2"
paymentSDK.userDefined3 = "ref3"
paymentSDK.userDefined4 = "ref4"
paymentSDK.userDefined5 = "ref5"
paymentSDK.request3DS = "N"
paymentSDK.request(withTarget: self, onResponse: { (response) in
print("response: \(String(describing: response))")
}) { (error) in
if error != nil {
print("error: \(String(describing: error?.localizedDescription))")
}else{
print("user cancel payment")
}
}
Payment Request with Stored-card
Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|
double | N | API version | apiVersion is deprecated. Please use version .Default value is 9.0 |
|
merchantID | String | Y | Merchant ID | - |
uniqueTransactionCode | String | Y | Transaction unique invoice number | Recommend 12 numeric number |
desc | String | Y | Product Description | The following symbols are not allowed:!@#$%^&*()<> . |
double | Y | Payment amount | The amount should be decimal point. eg: 20 = 20.00 .amt is deprecated. Please use amount . |
|
currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code. eg: 764 |
securityCode | String | N | Three/Four Digit CVV2/CVC2/CID value at the back of the card |
- |
storeCardUniqueID | String | Y | Unique ID of store card info. | - |
BOOL | N | Payment UI flag | A flag to determine whether the SDK should display payment UI or not. Set to NO for Non-UI payment. Default is NO .displayPaymentPage is deprecated. Please use paymentUI . |
|
secretKey | String | Y | secret key | Provided by 2c2p system. |
pan | String | Y | Credit Card No | - |
payCategoryID | String | N | Merchant predefined payment category code for reporting purpose | - |
userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
productionMode | BOOL | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is YES , it is set to Production mode. if the value is NO , it is set to development mode. Default is NO . |
request3DS | String | N | Only accept Y , N , F . Y is using 3DS if it's available. N is not using 3DS. F is FORCE 3DS. | Default is Y |
statementDescriptor | String | N | Dynamic statement description | (Optional) only allow alphanumeric in latin character. Require version 8.5 or later |
subMerchantID | String | N | Sub merchant ID | - |
subMerchantList | NSArray/[SubMerchant] | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.uniqueTransactionCode = @"123456789";
paymentSDK.desc = @"product item 1";
paymentSDK.amount = 20.00;
paymentSDK.currencyCode = @"764";
paymentSDK.secretKey = @"123456";
//mandatory for store card
paymentSDK.storeCardUniqueID = @"123456789";
//optional
paymentSDK.paymentUI = NO;
paymentSDK.cardHolderEmail = @"user@domain.com";
paymentSDK.securityCode = @"123";
paymentSDK.payCategoryID = @"2";
paymentSDK.userDefined1 = @"ref1";
paymentSDK.userDefined2 = @"ref2";
paymentSDK.userDefined3 = @"ref3";
paymentSDK.userDefined4 = @"ref4";
paymentSDK.userDefined5 = @"ref5";
paymentSDK.request3DS = @"Y";
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.uniqueTransactionCode = "123456789"
paymentSDK.desc = "product item 1"
paymentSDK.amount = 20.00
paymentSDK.currencyCode = "764"
paymentSDK.secretKey = "123456"
//mandatory for store card
paymentSDK.storeCardUniqueID = "123456789"
//optional
paymentSDK.paymentUI = false;
paymentSDK.cardHolderEmail = "user@domain.com"
paymentSDK.securityCode = "123"
paymentSDK.payCategoryID = "2"
paymentSDK.userDefined1 = "ref1"
paymentSDK.userDefined2 = "ref2"
paymentSDK.userDefined3 = "ref3"
paymentSDK.userDefined4 = "ref4"
paymentSDK.userDefined5 = "ref5"
paymentSDK.request3DS = "Y"
Payment Request With Recurring
Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|
double | N | API version | apiVersion is deprecated. Please use version .Default value is 9.0 |
|
merchantID | String | Y | Merchant ID | - |
uniqueTransactionCode | String | Y | Transaction unique invoice number | Recommend 12 numeric number |
desc | String | Y | Product Description | The following symbols are not allowed:!@#$%^&*()<> . |
double | Y | Payment amount | The amount should be decimal point. eg: 20 = 20.00 .amt is deprecated. Please use amount . |
|
currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code. eg: 764 |
securityCode | String | N | Three/Four Digit CVV2/CVC2/CID value at the back of the card |
- |
cardExpireMonth | Int | Y | Credit Card Expiry Month | Credit Card Expiry month in 'MM' format. |
cardExpireYear | Int | Y | Credit Card Expiry Year | Credit Card Expiry Year in 'YYYY' format. |
String | Y | Card Holder Name | cardholderName is deprecated. Please use cardHolderName . |
|
pan | String | Y | Credit Card No | - |
panBank | String | N | Credit Card Issuer Bank name | - |
panCountry | String | Y | Credit Card Issuer Bank Country Code | - |
String | N | Card Holder Email | cardholderEmail is deprecated. Please use cardHolderEmail . |
|
secretKey | String | Y | secret key | Provided by 2c2p system. |
BOOL | N | Payment UI flag | A flag to determine whether the SDK should display payment UI or not. Set to NO for Non-UI payment. Default is NO .displayPaymentPage is deprecated. Please use paymentUI . |
|
storeCard | BOOL | N | Store card flag | A flag to determine whether the SDK should stored card or not. If the value set to true, processor will response unique ID of the card data upon successful authorization. Next payment can be made by sending unique ID instead of full card information |
payCategoryID | String | N | Merchant predefined payment category code for reporting purpose | - |
userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
productionMode | BOOL | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is YES , it is set to Production mode. if the value is NO , it is set to development mode. Default is NO . |
request3DS | String | N | Only accept Y , N , F . Y is using 3DS if it's available. N is not using 3DS. F is FORCE 3DS. | Default is Y |
statementDescriptor | String | N | Dynamic statement description | (Optional) only allow alphanumeric in latin character. Require version 8.5 or later |
recurring | BOOL | Y | Command to do recurring payment | If recurring value is YES , payment wil process the recurring. Recurring will save card information data for recurring. |
invoicePrefix | String | Y | Invoice number prefix | Invoice Prefix will be used to generate invoice no of recurring payment. System will generate with invoice prefix followed by serial no in 5 digits format (e.g 123456789012345000 01 ). |
recurringAmount | Double | Y | Recurring Amount | The amount charged in recurring payment. If this value is not set, payment amount will be used for recurring payment. The amount should be decimal point. e.g: 20 = 20.00 |
recurringCount | Int | Y | Recurring total count allowed | Repeat this payment x times. Value 0 for endless loop until terminated manually. |
recurringInterval | Int | Y | Recurring interval in days | Charge card every x days. Max value 365 (1 year). |
allowAccumulate | BOOL | N | Allow accumulation if authorization failed or not | The value will determine to allow accumulation in next recurring cycle or not. |
maxAccumulateAmt | Double | N | Limit for the accumulate amount before terminate |
If the current accumulate amount exceed the limitation, the recurring cycle will be terminated. The amount should be decimal point. eg: 20 = 20.00 |
chargeNextDate | String | N | The next date of recurring payment | Date in 'DDMMYYYY' format. If it is not set, the value will be current date + recurring Interval. if recurring payment is with chargeOnDate then chargeNextDate is optional. if chargeNextDate is not set, chargeOnDate Date and Month will be used. |
promotion | String | N | Promotion Code | Promotion Code if merchant wants to perform promotion payment. (e.g Promotion Code V001 is for Visa Card holder, payment gateway will accept only Visa Card for this payment.) Merhant can set promotion by Card Type OR BIN |
subMerchantID | String | N | Sub merchant ID | - |
subMerchantList | NSArray/[SubMerchant] | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
chargeOnDate | String | N | To charge recurring payment on specific date every month. | Date in 'ddMM' format. The MM is only used if chargeNextDate is not set. otherwise the dd will be used for every month. Only required if recurring is enabled and recurringInterval is not used. |
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.uniqueTransactionCode = @"123456789";
paymentSDK.desc = @"product item 1";
paymentSDK.amount = 20.00;
paymentSDK.currencyCode = @"764";
paymentSDK.pan = @"5105105105105100";
paymentSDK.cardExpireMonth = 12;
paymentSDK.cardExpireYear = 2019;
paymentSDK.cardHolderName = @"Mr. John";
paymentSDK.panCountry = @"TH";
paymentSDK.secretKey = @"123456";
//mandatory only if recurring is set to true
paymentSDK.recurring = YES;
paymentSDK.invoicePrefix = @"pre";
paymentSDK.recurringInterval = 7; //below 365
paymentSDK.recurringCount = 3;
paymentSDK.recurringAmount = 20.00;
//mandatory only if allowAccumulate is set to true
paymentSDK.allowAccumulate = YES;
paymentSDK.maxAccumulateAmt = 100.00;
//optional
paymentSDK.paymentUI = NO;
paymentSDK.storeCard = true;
paymentSDK.cardHolderEmail = @"user@domain.com";
paymentSDK.securityCode = @"123";
paymentSDK.panBank = @"POSB";
paymentSDK.payCategoryID = @"2";
paymentSDK.userDefined1 = @"ref1";
paymentSDK.userDefined2 = @"ref2";
paymentSDK.userDefined3 = @"ref3";
paymentSDK.userDefined4 = @"ref4";
paymentSDK.userDefined5 = @"ref5";
paymentSDK.request3DS = @"Y";
paymentSDK.chargeNextDate = @"17102014"; //DDMMYYYY
paymentSDK.chargeOnDate = @"1710"; //DDMM
paymentSDK.promotion = @"promo";
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.uniqueTransactionCode = "123456789"
paymentSDK.desc = "product item 1"
paymentSDK.amount = 20.00
paymentSDK.currencyCode = "764"
paymentSDK.pan = "5105105105105100"
paymentSDK.cardExpireMonth = 12
paymentSDK.cardExpireYear = 2019
paymentSDK.cardHolderName = "Mr. John"
paymentSDK.panCountry = "TH"
paymentSDK.secretKey = "123456"
//mandatory only if recurring is set to true
paymentSDK.recurring = true
paymentSDK.invoicePrefix = "pre"
paymentSDK.recurringInterval = 7 //below 365
paymentSDK.recurringCount = 3
paymentSDK.recurringAmount = 20.00
//mandatory only if allowAccumulate is set to true
paymentSDK.allowAccumulate = true
paymentSDK.maxAccumulateAmt = 100.00
//optional
paymentSDK.paymentUI = false
paymentSDK.storeCard = true
paymentSDK.cardHolderEmail = "userdomain@2c2p.com"
paymentSDK.securityCode = "123"
paymentSDK.panBank = "POSB"
paymentSDK.payCategoryID = "2"
paymentSDK.userDefined1 = "ref1"
paymentSDK.userDefined2 = "ref2"
paymentSDK.userDefined3 = "ref3"
paymentSDK.userDefined4 = "ref4"
paymentSDK.userDefined5 = "ref5"
paymentSDK.request3DS = "Y"
paymentSDK.chargeNextDate = "17102014" //DDMMYYYY
paymentSDK.chargeOnDate = "1710" //DDMM
paymentSDK.promotion = "promo"
Payment Request with IPP
Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|
double | N | API version | apiVersion is deprecated. Please use version .Default value is 9.0 |
|
merchantID | String | Y | Merchant ID | - |
uniqueTransactionCode | String | Y | Transaction unique invoice number | Recommend 12 numeric number |
desc | String | Y | Product Description | The following symbols are not allowed:!@#$%^&*()<> . |
double | Y | Payment amount | The amount should be decimal point. eg: 20 = 20.00 .amt is deprecated. Please use amount . |
|
currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code. eg: 764 |
securityCode | String | N | Three/Four Digit CVV2/CVC2/CID value at the back of the card |
- |
cardExpireMonth | Int | Y | Credit Card Expiry Month | Credit Card Expiry month in 'MM' format. |
cardExpireYear | Int | Y | Credit Card Expiry Year | Credit Card Expiry Year in 'YYYY' format. |
String | Y | Card Holder Name | cardholderName is deprecated. Please use cardHolderName . |
|
pan | String | Y | Credit Card No | - |
panBank | String | N | Credit Card Issuer Bank name | - |
panCountry | String | Y | Credit Card Issuer Bank Country Code | - |
String | N | Card Holder Email | cardholderEmail is deprecated. Please use cardHolderEmail . |
|
secretKey | String | Y | secret key | Provided by 2c2p system. |
BOOL | N | Payment UI flag | A flag to determine whether the SDK should display payment UI or not. Set to NO for Non-UI payment. Default is NO .displayPaymentPage is deprecated. Please use paymentUI . |
|
storeCard | BOOL | N | Store card flag | A flag to determine whether the SDK should stored card or not. If the value set to true, processor will response unique ID of the card data upon successful authorization. Next payment can be made by sending unique ID instead of full card information |
payCategoryID | String | N | Merchant predefined payment category code for reporting purpose | - |
userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
productionMode | BOOL | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is YES , it is set to Production mode. if the value is NO , it is set to development mode. Default is NO . |
request3DS | String | N | Only accept Y , N , F . Y is using 3DS if it's available. N is not using 3DS. F is FORCE 3DS. | Default is Y |
statementDescriptor | String | N | Dynamic statement description | (Optional) only allow alphanumeric in latin character. Require version 8.5 or later |
ippTransaction | BOOL | Y | Command to do installment payment | If ippTransaction value is YES , payment will process the instalment payment. |
installmentPeriod | Int | Y | Valid installment period provided by 2c2p | - |
interestType | String | Y | Interest type of value of 'C' or 'M' |
C - Customer Payment Interest M - Merchant Pay Interest |
promotion | String | N | Promotion Code | Promotion Code if merchant wants to perform promotion payment. (e.g Promotion Code V001 is for Visa Card holder, payment gateway will accept only Visa Card for this payment.) Merhant can set promotion by Card Type OR BIN |
productCode | String | N | Product Code for the payment. | - |
subMerchantID | String | N | Sub merchant ID | - |
subMerchantList | NSArray/[SubMerchant] | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.uniqueTransactionCode = @"123456789";
paymentSDK.desc = @"product item 1";
paymentSDK.amount = 20.00;
paymentSDK.currencyCode = @"764";
paymentSDK.pan = @"5105105105105100";
paymentSDK.cardExpireMonth = 12;
paymentSDK.cardExpireYear = 2019;
paymentSDK.cardHolderName = @"Mr. John";
paymentSDK.panCountry = @"TH";
paymentSDK.secretKey = @"123456";
//mandatory only if ippTransaction is set to true
paymentSDK.ippTransaction = YES;
paymentSDK.installmentPeriod = 3;
paymentSDK.interestType = @"C"; //C or M
//optionals for IPP
paymentSDK.promotion = @"Happy1";
paymentSDK.productCode = @"ProductA";
//optional
paymentSDK.paymentUI = NO;
paymentSDK.storeCard = YES; // store card
paymentSDK.cardHolderEmail = @"john@email.com";
paymentSDK.securityCode = @"123";
paymentSDK.panBank = @"POSB";
paymentSDK.payCategoryID = @"2";
paymentSDK.userDefined1 = @"ref1";
paymentSDK.userDefined2 = @"ref2";
paymentSDK.userDefined3 = @"ref3";
paymentSDK.userDefined4 = @"ref4";
paymentSDK.userDefined5 = @"ref5";
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.uniqueTransactionCode = "123456789"
paymentSDK.desc = "product item 1"
paymentSDK.amount = 20.00
paymentSDK.currencyCode = "764"
paymentSDK.pan = "5105105105105100"
paymentSDK.cardExpireMonth = 12
paymentSDK.cardExpireYear = 2019
paymentSDK.cardHolderName = "Mr. John"
paymentSDK.panCountry = "TH"
paymentSDK.secretKey = "123456"
//mandatory only if ippTransaction is set to true
paymentSDK.ippTransaction = true
paymentSDK.installmentPeriod = 3
paymentSDK.interestType = "C" //C or M
//optionals for IPP
paymentSDK.promotion = "Happy1"
paymentSDK.productCode = "ProductA"
//optional
paymentSDK.paymentUI = false
paymentSDK.storeCard = true // store card
paymentSDK.cardHolderEmail = "johnemail@2c2p.com"
paymentSDK.securityCode = "123"
paymentSDK.panBank = "POSB"
paymentSDK.payCategoryID = "2"
paymentSDK.userDefined1 = "ref1"
paymentSDK.userDefined2 = "ref2"
paymentSDK.userDefined3 = "ref3"
paymentSDK.userDefined4 = "ref4"
paymentSDK.userDefined5 = "ref5"
Payment Request For Alternative
Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|
double | N | API version | apiVersion is deprecated. Please use version .Default value is 9.0 |
|
merchantID | String | Y | Merchant ID | - |
uniqueTransactionCode | String | Y | Transaction unique invoice number | Recommend 12 numeric number |
desc | String | Y | Product Description | The following symbols are not allowed:!@#$%^&*()<> . |
double | Y | Payment amount | The amount should be decimal point. eg: 20 = 20.00 .amt is deprecated. Please use amount . |
|
currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code. eg: 764 |
secretKey | String | Y | secret key | Provided by 2c2p system. |
BOOL | N | Payment UI flag | A flag to determine whether the SDK should display payment UI or not. Set to NO for Non-UI payment. Default is NO .displayPaymentPage is deprecated. Please use paymentUI . |
|
payCategoryID | String | N | Merchant predefined payment category code for reporting purpose | - |
userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
productionMode | BOOL | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is YES , it is set to Production mode. if the value is NO , it is set to development mode. Default is NO . |
paymentChannel | PaymentChannel | Y | - | Default value is PaymentChannelCreditCard. paymentUI must be no to use paymentChannel. |
cardHolderName | String | Y | Payer Name for the 123 | - |
cardHolderEmail | String | Y | Payer Email for the 123 | - |
agentCode | String | Y | agentCode for the 123 | - |
channelCode | String | N | channelCode for the 123 | It's required for Bank and Kiosk |
paymentExpiry | String | N | payment expiry date for the 123 | - |
mobileNo | String | N | mobile no for 123 | - |
subMerchantID | String | N | Sub merchant ID | - |
subMerchantList | NSArray/[SubMerchant] | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.uniqueTransactionCode = @"123456789";
paymentSDK.desc = @"production item 1";
paymentSDK.amount = 10.00;
paymentSDK.currencyCode = @"764";
paymentSDK.cardHolderName = @"Mr. John";
paymentSDK.cardHolderEmail = @"john@email.com";
paymentSDK.secretKey = @"123456";
//set 123 mandatory fields
paymentSDK.paymentChannel = PaymentChannelOneTwoThree;
paymentSDK.agentCode = @"SCB";
paymentSDK.channelCode = @"ATM";
//set 123 optionals fields
paymentSDK.paymentExpiry = @"";
paymentSDK.mobileNo = @"";
//optional
paymentSDK.paymentUI = NO;
paymentSDK.payCategoryID = @"2";
paymentSDK.userDefined1 = @"ref1";
paymentSDK.userDefined2 = @"ref2";
paymentSDK.userDefined3 = @"ref3";
paymentSDK.userDefined4 = @"ref4";
paymentSDK.userDefined5 = @"ref5";
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.uniqueTransactionCode = "123456789"
paymentSDK.desc = "production item 1"
paymentSDK.amount = 10.00
paymentSDK.currencyCode = "764"
paymentSDK.cardHolderName = "Mr. John"
paymentSDK.cardHolderEmail = "johnemail@2c2p.com"
paymentSDK.secretKey = "123456"
//set 123 mandatory fields
paymentSDK.paymentChannel = PaymentChannel.oneTwoThree.rawValue as NSString
paymentSDK.agentCode = "SCB"
paymentSDK.channelCode = "ATM"
//set 123 optionals fields
paymentSDK.paymentExpiry = ""
paymentSDK.mobileNo = ""
//optional
paymentSDK.paymentUI = false
paymentSDK.payCategoryID = "2"
paymentSDK.userDefined1 = "ref1"
paymentSDK.userDefined2 = "ref2"
paymentSDK.userDefined3 = "ref3"
paymentSDK.userDefined4 = "ref4"
paymentSDK.userDefined5 = "ref5"
Payment Request For Payment Channels
Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|
double | N | API version | apiVersion is deprecated. Please use version .Default value is 9.0 |
|
merchantID | String | Y | Merchant ID | - |
uniqueTransactionCode | String | Y | Transaction unique invoice number | Recommend 12 numeric number |
desc | String | Y | Product Description | The following symbols are not allowed:!@#$%^&*()<> . |
double | Y | Payment amount | The amount should be decimal point. eg: 20 = 20.00 .amt is deprecated. Please use amount . |
|
currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code. eg: 764 |
secretKey | String | Y | secret key | Provided by 2c2p system. |
BOOL | N | Payment UI flag | A flag to determine whether the SDK should display payment UI or not. Set to NO for Non-UI payment. Default is NO .displayPaymentPage is deprecated. Please use paymentUI . |
|
payCategoryID | String | N | Merchant predefined payment category code for reporting purpose | - |
userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
productionMode | BOOL | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is YES , it is set to Production mode. if the value is NO , it is set to development mode. Default is NO . |
paymentChannel | PaymentChannel | Y | Payment channel for 3rd-party payment options. | Refer to Payment Channel |
subMerchantID | String | N | Sub merchant ID | - |
subMerchantList | NSArray/[SubMerchant] | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
cardHolderName | String | Y | Payer Name | - |
cardHolderEmail | String | N | Payer Email | - |
mobileNo | String | N | Payer Mobile No. | - |
accountNo | String | C | Payer Account No. | e.g: PaymentChannelTrueMoney PaymentChannelOKDollar PaymentChannelWavePay |
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.uniqueTransactionCode = @"123456789";
paymentSDK.desc = @"production item 1";
paymentSDK.amount = 10.00;
paymentSDK.currencyCode = @"840";
paymentSDK.secretKey = @"123456";
//mandatory for Payment Channel
paymentSDK.paymentChannel = PaymentChannelAlipay;
//mandatory for certain Payment Channel
paymentSDK.accountNo = @"088888888";
//optional
paymentSDK.paymentUI = NO;
paymentSDK.cardHolderName = @"Mr. John";
paymentSDK.cardHolderEmail = @"user@domain.com";
paymentSDK.mobileNo = @"088888888";
paymentSDK.payCategoryID = @"2";
paymentSDK.userDefined1 = @"ref1";
paymentSDK.userDefined2 = @"ref2";
paymentSDK.userDefined3 = @"ref3";
paymentSDK.userDefined4 = @"ref4";
paymentSDK.userDefined5 = @"ref5";
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.uniqueTransactionCode = "123456789"
paymentSDK.desc = "production item 1"
paymentSDK.amount = 10.00
paymentSDK.currencyCode = "840"
paymentSDK.secretKey = "123456"
//mandatory for Payment Channel
paymentSDK.paymentChannel = PaymentChannel.alipay.rawValue as NSString
//mandatory for certain Payment Channel
paymentSDK.accountNo = "088888888"
//optional
paymentSDK.paymentUI = false
paymentSDK.cardHolderName = "Mr. John"
paymentSDK.cardHolderEmail = "user@domain.com"
paymentSDK.mobileNo = "088888888"
paymentSDK.payCategoryID = "2"
paymentSDK.userDefined1 = "ref1"
paymentSDK.userDefined2 = "ref2"
paymentSDK.userDefined3 = "ref3"
paymentSDK.userDefined4 = "ref4"
paymentSDK.userDefined5 = "ref5"
Payment Request With Tokenize Without Authorization
Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|
version | double | N | API version | Default value is 9.1 |
merchantID | String | Y | Merchant ID | - |
pan | String | Y | Credit Card No | - |
cardExpireMonth | Int | Y | Credit Card Expiry Month | Credit Card Expiry month in 'MM' format. |
cardExpireYear | Int | Y | Credit Card Expiry Year | Credit Card Expiry Year in 'YYYY' format. |
cardHolderName | String | Y | Card Holder Name | cardholderName is deprecated. Please use cardHolderName . |
cardHolderEmail | String | N | Card Holder Email | cardholderEmail is deprecated. Please use cardHolderEmail . |
panCountry | String | Y | Credit Card Issuer Bank Country Code | - |
secretKey | String | Y | secret key | Provided by 2c2p system. |
productionMode | BOOL | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is YES , it is set to Production mode. if the value is NO , it is set to development mode. Default is NO . |
BOOL | N | Payment UI flag | A flag to determine whether the SDK should display payment UI or not. Set to NO for Non-UI payment. Default is NO .displayPaymentPage is deprecated. Please use paymentUI . |
|
panBank | String | N | Credit Card Issuer Bank name | - |
tokenizeWithoutAuthorization | BOOL | Y | To only tokenize card without authorization | YES - Perform tokenization. NO - Perform normal authorization. |
request3DS | String | N | Only accept Y , N , F . Y is using 3DS if it's available. N is not using 3DS. F is FORCE 3DS. | Default is Y |
subMerchantID | String | N | Sub merchant ID | - |
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.pan = @"5105105105105100";
paymentSDK.cardExpireMonth = 12;
paymentSDK.cardExpireYear = 2019;
paymentSDK.cardHolderName = @"Mr. John";
paymentSDK.secretKey = @"123456";
paymentSDK.tokenizeWithoutAuthorization = YES;
//optional for TWA
paymentSDK.cardHolderEmail = @"user@domain.com";
paymentSDK.panCountry = @"SG";
paymentSDK.panBank = @"2c2p Bank";
paymentSDK.request3DS = @"Y";
//optional
paymentSDK.paymentUI = NO;
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.pan = "5105105105105100"
paymentSDK.cardExpireMonth = 12
paymentSDK.cardExpireYear = 2019
paymentSDK.cardHolderName = "Mr. John"
paymentSDK.secretKey = "123456"
paymentSDK.tokenizeWithoutAuthorization = true
//optional for TWA
paymentSDK.cardHolderEmail = "user@domain.com"
paymentSDK.panCountry = "SG"
paymentSDK.panBank = "2c2p Bank"
paymentSDK.request3DS = "Y"
//optional
paymentSDK.paymentUI = false
Payment Request with Kanbawza Bank On Us (KBZ Bank)
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | N | Version of the Payment Request | Default value is 9.1 |
2 | merchantID | String | Y | Merchant ID | - |
3 | uniqueTransactionCode | String | Y | Transaction unique invoice number. | Recommended 12 numeric number. |
4 | String | Y | Product Description | The following symbols are not allowed: !@#$%^&\*()<> (My2C2PSDK v2.8.9 and above, renamed to desc ) |
|
5 | amount | double | Y | Payment amount | The amount should be decimal point. e.g: 20 = 20.00 |
6 | currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code e.g 764 |
7 | pan | String | Y | Credit Card No | Only accept KBZ cards. |
8 | cardPin | String | Y | Card Pin No. | For KBZ on us. |
9 | cardExpireMonth | String | Y | Credit Card Expiry month | Credit Card Expiry month in 'MM' format. |
10 | cardExpireYear | String | Y | Credit Card Expiry Year | Credit Card Expiry Year in 'YYYY' format. |
11 | cardHolderName | String | Y | Cardholder Name | - |
12 | panCountry | String | Y | Credit Card Issuer Bank Country Code | Only accept MM for pan country. |
13 | cardHolderEmail | String | N | Cardholder Email | - |
14 | secretKey | String | Y | secret key | Provided by 2c2p system |
15 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
16 | boolean | N | PaymentUI flag | A flag to determine whether the library should display payment UI or not. Set to false for Non-UI payment . (My2C2PSDK v2.8.9 and above, renamed to paymentUI ) |
|
17 | panBank | String | N | Credit Card Issuer Bank name. | Only accept KBZ for pan bank. |
18 | payCategoryID | String | N | Merchant predefined payment category code for reporting | - |
19 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
20 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
21 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
22 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
23 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
24 | statementDescriptor | String | N | Dynamic statement description | (Optional) only allow alphanumeric in latin character. Require version 8.5 or later. |
25 | subMerchantID | String | N | Sub merchant ID | - |
26 | subMerchantList | NSArray/[SubMerchant] | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
27 | paymentChannel | PaymentChannel | Y | - | Only accept KBZ for Kanbawza Bank On Us Payment Request. |
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.uniqueTransactionCode = @"123456789";
paymentSDK.desc = @"product item 1";
paymentSDK.amount = 20.00;
paymentSDK.currencyCode = @"764";
paymentSDK.pan = @"5105105105105100";
paymentSDK.cardExpireMonth = 12;
paymentSDK.cardExpireYear = 2019;
paymentSDK.cardHolderName = @"Mr. John";
paymentSDK.panCountry = @"MM";
paymentSDK.secretKey = @"123456";
//mandatory for KBZ
paymentSDK.cardPin = @"123456";
paymentSDK.paymentChannel = PaymentChannelKBZ;
//set optional fields
paymentSDK.cardHolderEmail = @"user@domain.com";
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.uniqueTransactionCode = "123456789"
paymentSDK.desc = "product item 1"
paymentSDK.amount = 20.00
paymentSDK.currencyCode = "764"
paymentSDK.pan = "5105105105105100"
paymentSDK.cardExpireMonth = 12
paymentSDK.cardExpireYear = 2019
paymentSDK.cardHolderName = "Mr. John"
paymentSDK.panCountry = "MM"
paymentSDK.secretKey = "123456"
//mandatory for KBZ
paymentSDK.cardPin = "123456"
paymentSDK.paymentChannel = PaymentChannel.KBZ.rawValue as NSString
//set optional fields
paymentSDK.cardHolderEmail = "user@domain.com"
Payment Request With Apple Pay
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | N | Version of the Payment Request | Default value is 9.1 , Payment request with Payment Channel. |
2 | merchantID | String | Y | Merchant ID | - |
3 | uniqueTransactionCode | String | Y | Transaction unique invoice number. | Recommended 12 numeric number. |
4 | String | Y | Product Description | The following symbols are not allowed: !@#$%^&\*()<> (My2C2PSDK v2.8.9 and above, renamed to desc ) |
|
5 | amount | double | Y | Payment amount | The amount should be decimal point. e.g: 20 = 20.00 |
6 | currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code e.g 764 |
7 | secretKey | String | Y | secret key | Provided by 2c2p system |
8 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
9 | payCategoryID | String | N | Merchant predefined payment category code for reporting | - |
10 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
11 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
12 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
13 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
14 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
15 | paymentChannel | PaymentChannel | Y | - | GCASH for GCASH Payment Request WAVEPAY for WavePay Payment Request. |
16 | subMerchantID | String | N | Sub merchant ID | - |
17 | subMerchantList | NSArray/[SubMerchant] | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
18 | appleMerchantIdentifier | String | Y | Apple MerchantIdentifier | Generate from Apple developer portal. |
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.uniqueTransactionCode = @"123456789";
paymentSDK.desc = @"product item 1";
paymentSDK.amount = 20.00;
paymentSDK.currencyCode = @"840";
paymentSDK.secretKey = @"123456";
//mandatory for ApplePay
paymentSDK.paymentChannel = PaymentChannelApplePay;
paymentSDK.appleMerchantIdentifier = @"merchant.com.ccpp.pgw.web.applepay.sandbox";
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.uniqueTransactionCode = "123456789"
paymentSDK.desc = "product item 1"
paymentSDK.amount = 20.00
paymentSDK.currencyCode = "840"
paymentSDK.secretKey = "123456"
//mandatory for ApplePay
paymentSDK.paymentChannel = PaymentChannel.applePay.rawValue as NSString
paymentSDK.appleMerchantIdentifier = "merchant.com.ccpp.pgw.web.applepay.sandbox"