Skip to main content

Create VCN

⚠️ This API returns the result of receiving the request, not the final VCN creation result (status only has value 2-Processing or 4-Failed). The actual VCN creation result (card information) is sent via Webhook notifying VCN information.

Process

  • MERCHANT calls this API to create a VCN.

API Information

URL: /b2b-iccp-service/api/ext/mm/iccp/vcn-create

Method: POST

Request

Main Parameters Table

No.Field NameData TypeRequiredDescription
1request_idString(100)Unique ID for each Request from MERCHANT to Baokim.
2request_timeString(20)Request sent time. Format: YYYY-MM-DD H:i:s
3master_merchant_codeString(50)Unique identifier for MASTER MERCHANT
4sub_merchant_codeString(50)Unique identifier for SUB MERCHANT
5reference_idString(50)Reference code
6customer_nameString(255)Customer name
7expiryString(7)VCN card expiry date, format MM/YYYY
expiry must be at least 1 month greater than the current time and max 24 months from the current time
8control_typeNumber1: accountControl
2: inControlRules
9account_controlObjectRequired if control_type = 1
10in_control_rulesObjectRequired if control_type = 2
11real_card_guidStringCard identifier of the physical RCN card provided by Baokim

account_control Information

No.Field NameData TypeRequiredDescription
1aliasStringUnique memorable code for the Control
2card_limitObjectSets the overall limit for the card - throughout the card's lifetime
3monthly_limitObjectSets the monthly limit for the card
4daily_limitObjectSets the daily limit for the card
5weekly_limitObjectSets the weekly limit for the card
6quarterly_limitObjectSets the quarterly limit for the card
7yearly_limitObjectSets the yearly limit for the card
8geographiesObjectSets card usage by geographic region
9merchant_category_codesObjectSets card usage by MCC
10start_dateStringCard usage time - Start
11end_dateStringCard usage time - End

account_control.card_limit Information

No.Field NameData TypeRequiredDescription
1card_amountNumberTransaction value
2available_balanceNumberAvailable balance
readOnly -> Pass a value if available; MasterCard only uses it to collect information (if any), not to validate information
3authorisation_countNumberNumber of transactions

account_control.monthly_limit Information

No.Field NameData TypeRequiredDescription
1card_amountNumberTransaction value
2available_balanceNumberAvailable balance
readOnly -> Pass a value if available; MasterCard only uses it to collect information (if any), not to validate information
3authorisation_countNumberNumber of transactions

account_control.daily_limit Information

No.Field NameData TypeRequiredDescription
1card_amountNumberTransaction value
2available_balanceNumberAvailable balance
readOnly -> Pass a value if available; MasterCard only uses it to collect information (if any), not to validate information
3authorisation_countNumberNumber of transactions

account_control.weekly_limit Information

No.Field NameData TypeRequiredDescription
1card_amountNumberTransaction value
2available_balanceNumberAvailable balance
readOnly -> Pass a value if available; MasterCard only uses it to collect information (if any), not to validate information
3authorisation_countNumberNumber of transactions

account_control.quarterly_limit Information

No.Field NameData TypeRequiredDescription
1card_amountNumberTransaction value
2available_balanceNumberAvailable balance
readOnly -> Pass a value if available; MasterCard only uses it to collect information (if any), not to validate information
3authorisation_countNumberNumber of transactions

account_control.yearly_limit Information

No.Field NameData TypeRequiredDescription
1card_amountNumberTransaction value
2available_balanceNumberAvailable balance
readOnly -> Pass a value if available; MasterCard only uses it to collect information (if any), not to validate information
3authorisation_countNumberNumber of transactions

account_control.geographies Information

No.Field NameData TypeRequiredDescription
1country_codesArrayList of country codes - 3-character format
2negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

account_control.merchant_category_codes Information

No.Field NameData TypeRequiredDescription
1mccsArrayList of MCCs
2negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules Information

No.Field NameData TypeRequiredDescription
1aliasStringUnique memorable code for the Control
2transaction_limitsObjectSets the amount limit per card transaction
3geographiesObjectSets card usage by geographic region
4velocitiesObjectSets the frequency limit and/or total card transaction amount within a specific time period
5validity_periodsObjectControls the validity period of the control
6amount_rangesObjectControls the transaction value within a min, max range
7acceptor_idsObjectSets control over which Merchants/Acquirers the card is allowed to transact with
8ageing_velocitiesObjectSets and controls the available credit limit on the card
9curfewsObjectSets control over card transactions by time slot on specific days, and can specify the applicable time zone
10time_of_daysObjectSets control over card transactions within specific time slots of each day
11merchant_category_codesObjectSets control over card transactions by merchant MCC code
12merchant_namesObjectSets control over card transactions by Merchant name (card acceptor)
13merchant_amountsObjectSets control over card transactions by amount per transaction for a specific currency
14transaction_environmentsObjectSets control over card transactions by Transaction Method
15approve_controlObjectSets control over card transactions - The entire rule set will be used to approve/decline transactions
16entry_modesObjectSets control over transactions by card type

in_control_rules.transaction_limits Information

No.Field NameData TypeRequiredDescription
1amountFloatMaximum transaction value per transaction
This value is set based on the billing currency of the RCN registered with BPC
min: 0
max: 99999999999999
2negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.geographies Information

No.Field NameData TypeRequiredDescription
1country_codesArrayList of country codes - 3-character format
2negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.velocities Information

No.Field NameData TypeRequiredDescription
1max_transNumberMaximum number of transactions allowed within a specific time period
min: 1
max: 99999999
2cumulative_limitNumberMaximum cumulative transaction amount allowed within a specific time period
If passed as 0 - equivalent to
unlimited (this limit setting is ignored)
min: 0
max: 99999999999999
3periodStringApplicable period
- DAILY -> Daily
- WEEKLY -> Weekly
- QUARTERLY -> Quarterly
- CONTINUOUS -> From the time of setup with no reset date for the count/accumulation (reported whenever the threshold is reached)
- MONTHLY -> Monthly
- YEARLY -> Yearly
4negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.validity_periods Information

No.Field NameData TypeRequiredDescription
1fromStringControl validity start time
2toStringControl validity end time
3negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.amount_ranges Information

No.Field NameData TypeRequiredDescription
1min_amountFloatMinimum transaction amount
min: 0
max: 99999999999999
min_amount < max_amount
2max_amountFloatMaximum transaction amount
min: 0
max: 99999999999999
min_amount < max_amount
3negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.acceptor_ids Information

No.Field NameData TypeRequiredDescription
1acceptorsObjectCan be set to merchant or acquirer
2negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

Description of the data inside in_control_rules.acceptor_ids.acceptors(1)

No.Field NameData TypeRequiredDescription
1acceptor_idStringMerchant ID – identifier of the merchant (card acceptor) where the transaction takes place.
2acquirer_idStringAcquirer ID – identifier of the bank/payment entity (acquirer) that processes the transaction for the merchant.

in_control_rules.ageing_velocities Information

No.Field NameData TypeRequiredDescription
1authorization_hold_daysNumberNumber of days the transaction on the virtual card is held, used to calculate when to reset the currently configured Credit limit
min: 0
max: 9999
2cumulative_limitNumberTotal limit
If passed as 0 - equivalent to unlimited (this limit setting is ignored)
min: 0
max: 99999999999999
3time_zoneStringTime zone applied for calculating the date and time to unhold the transaction so it is excluded from the availableCredit calculation
4negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.curfews Information

No.Field NameData TypeRequiredDescription
1from_timeStringStart time transactions are allowed.
2to_timeStringEnd time transactions are allowed
(after this time, the transaction is declined)
3time_zoneString(3)Time zone applied to the above time slot
Example: UTC
4daysArrayList of days of the week the limit applies to: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY. Passed as multiple values, separated by commas
5negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.time_of_days Information

No.Field NameData TypeRequiredDescription
1timesArrayList of configuration objects for the time allowed for transactions
(after this time, the transaction is
declined)
An array of configs can be passed
2time_zoneStringTime zone applied to the above time slot (fromTime-toTime)
Note: the default applied is GMT (not the timezone registered for the RCN)
Be sure to pass this in
Example: UTC
3negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

Description of the object inside in_control_rules.time_of_days.times(1)

No.Field NameData TypeRequiredDescription
1from_timeStringStart time transactions are allowed.
2to_timeStringEnd time transactions are allowed
(after this time, the transaction is declined)
3daysArrayDays of the week the limit applies to: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY. Passed as multiple values, separated by commas

in_control_rules.merchant_category_codes Information

No.Field NameData TypeRequiredDescription
1mccsArrayList of MCCs
2negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.merchant_names Information

No.Field NameData TypeRequiredDescription
1merchant_namesArrayList of merchant names (sent in the DE43 field of the authorization message)
This name must match the name in the bank's payment data (DE43 field)
2negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.merchant_amounts Information

No.Field NameData TypeRequiredDescription
1valueFloatMaximum amount per transaction according to the currency_code set below
min: 0
max: 99999999999999
2currency_codeStringCurrency code applied according to the (ISO) 4217 standard
Default: 704
3negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.transaction_environments Information

No.Field NameData TypeRequiredDescription
1environment_codesArrayList of transaction methods
- ATM – Transaction at an automated
teller machine.
- ECOM – E-commerce
transaction (online).
- MOTO – Mail Order/Telephone Order (transaction placed by mail/phone, card and cardholder not present).
- PAYPASS – Contactless
payment.
- POS – In-store transaction (swiped on a POS machine).
- PWCB – Purchase with Cash
Back.
2negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.approve_control Information

No.Field NameData TypeRequiredDescription
1negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

in_control_rules.entry_modes Information

No.Field NameData TypeRequiredDescription
1modeStringCard acceptance type
Default: EMV
2negateNumberDetermines whether the rule is applied in reverse?
1. true
0. false => Default

Request Example

{
"request_id": "TT20260209163542",
"request_time": "2026-03-24 16:28:32",
"master_merchant_code": "MASTERMERCHANTCODE",
"sub_merchant_code": "SUBMERCHANTCODE",
"reference_id": "TT20260209163542",
"customer_name": "NGUYỄN VĂN A",
"expiry": "12/2026",
"control_type": 1,
"account_control": {
"alias": "TT20260209163542",
"card_limit": {
"card_amount": 10000000000,
"available_balance": 0,
"authorisation_count": 100
},
"daily_limit": {
"card_amount": 10000000000,
"available_balance": 10000000000,
"authorisation_count": 100
},
"weekly_limit": {
"card_amount": 10000000000,
"available_balance": 10000000000,
"authorisation_count": 100
},
"monthly_limit": {
"card_amount": 10000000000,
"available_balance": 10000000000,
"authorisation_count": 100
},
"quarterly_limit": {
"card_amount": 10000000000,
"available_balance": 10000000000,
"authorisation_count": 100
},
"yearly_limit": {
"card_amount": 10000000000,
"available_balance": 10000000000,
"authorisation_count": 100
},
"geographies": {
"country_codes": [
"704",
"840"
],
"negate": 0
},
"merchant_category_codes": {
"mccs": [
"3001",
"3005"
],
"negate": 0
},
"start_date": "2025-12-01",
"end_date": "2035-12-01"
},
"real_card_guid": "real_card_guid_test"
}

Request Example

{
"request_id": "TT20260209163542",
"request_time": "2026-03-24 15:33:06",
"master_merchant_code": "MASTERMERCHANTCODE",
"sub_merchant_code": "SUBMERCHANTCODE",
"reference_id": "TT20260209163542",
"customer_name": "NGUYỄN VĂN A",
"expiry": "12/2026",
"control_type": 2,
"in_control_rules": {
"alias": "TT20260209163542",
"transaction_limits": {
"amount": 100,
"negate": 0
},
"velocities": {
"max_trans": 100,
"cumulative_limit": 1500000,
"period": "CONTINUOUS",
"negate": 0
},
"validity_periods": {
"from": "2026-07-24 15:35:06",
"to": "2035-12-01 00:00:00",
"negate": 0
},
"acceptor_ids": {
"acceptors": {
"acceptor_id": "126548888899997",
"acquirer_id": "12325435"
},
"negate": 0
},
"ageing_velocities": {
"authorization_hold_days": 0,
"cumulative_limit": 0,
"time_zone": "UTC",
"negate": 0
},
"time_of_days": {
"times": [
{
"from_time": "00:00",
"to_time": "23:59",
"days": [
"MONDAY",
"TUESDAY",
"WEDNESDAY"
]
}
],
"time_zone": "UTC",
"negate": 0
},
"merchant_names": {
"merchant_names": [
"Amazon"
],
"negate": 0
},
"merchant_amounts": {
"value": 10000000,
"currency_code": "704",
"negate": 0
},
"transaction_environments": {
"environment_codes": [
"ECOM",
"POS"
],
"negate": 0
},
"approve_control": {
"negate": 0
},
"entry_modes": {
"mode": "EMV",
"negate": 0
}
},
"real_card_guid": "real_card_guid_test"
}

Response

Main Parameters Table

No.Field NameData TypeRequiredDescription
1codeNumber(3)Baokim error code
2messageString(200)Baokim error code message
3dataObjectData returned by Baokim

data Information

No.Field NameData TypeRequiredDescription
1reference_idStringReference code for the VCN creation request
2statusNumberVCN creation status
2: Processing
4: Failed
3created_atDateTimeRequest received time
4updated_atDateTimeRequest updated time

Response Example - when the request is created successfully

{
"code": 100,
"message": "Success",
"data": {
"reference_id": "MERCHANT1774336134305",
"status": 2,
"created_at": "2026-03-24 16:33:47",
"updated_at": "2026-03-24 16:33:47"
}
}

Response Example - when the request creation fails

{
"code": 11,
"message": "Fail",
"data": {
"reference_id": "MERCHANT1774336134305",
"status": 4,
"created_at": "2026-03-24 16:33:47",
"updated_at": "2026-03-24 16:33:47"
}
}

Error Codes

Error CodeDescription
100Success
11Failed
104Unauthorized
401Merchant verify failed
422Validation error
1000Failed to save ICCP request
1001Failed to save VCN card
1100JWT is invalid or has expired
1101Signature verification failed
1200master_merchant_code and sub_merchant_code do not match the real_card_guid configuration
1202real_card_guid does not exist
1500Request {request_id} already exists
1501reference_id already exists
1502Alias already exists