Credit Card
Create Credit Card Order
Create credit card order via Paylabs API.
URL: ${ROOT_URL}/payment/v2.3/cc/create
HTTPMethod: POST
EndpointUrl: /payment/v2.3/cc/create
Data Signing Rules
| Field Name | Type | Value | Required |
|---|
| Content-Type | String(30) | Fixed value "application/json;charset=utf-8" | Yes |
| X-TIMESTAMP | String(29) | Current time, format 2022-09-16T16:58:47.964+07:00 | Yes |
| X-SIGNATURE | String(64) | Signature. For details please check Data Signing Rules | Yes |
| X-PARTNER-ID | String(20) | Merchant ID | Yes |
| X-REQUEST-ID | String(64) | Unique ID for each request | Yes |
| Parameter | Type | Required | Remarks |
|---|
| requestId | String(64) | Yes | Unique identifier on every request |
| merchantId | String(20) | Yes | Unique identifier provided by payment gateway to merchant |
| storeId | String(30) | No | Only if using branch ID |
| paymentType | String(20) | Yes | Payment type, see Payment Type |
| amount | Decimal(12,2) | Yes | Amount in IDR |
| merchantTradeNo | String(32) | Yes | Unique identifier created by merchant for each transaction |
| notifyUrl | String(200) | No | Callback URL for payment success; see Inquiry Order for parameters |
| + paymentParams | Object | No | Channel-specific extra parameters; see Payment Type table |
| productName | String(100) | Yes | Product/service name |
| + productInfo | Array<Object>(30) | No | Product/service details |
| - id | String(10) | Yes | Product ID |
| - name | String(32) | Yes | Product Name |
| - price | decimal(12,2) | Yes | Amount in IDR, supports two decimals |
| - type | String(20) | Yes | Product Type |
| - url | String(200) | No | Product URL |
| - quantity | Number(4) | Yes | Product Quantity |
| feeType | String(3) | No | Fee deduction type: BEN/OUR. Default BEN. OUR adds fee to order amount automatically. |
| Payment Type | Code |
|---|
| Credit Card 3D-Secure | CreditCard |
| Credit Card 2D-Secure | CreditCard_2DSecure |
| Installment (6 Months) | CreditCard_6Mos |
| Installment (12 Months) | CreditCard_12Mos |
| Parameter | Type | Required | Remarks |
|---|
| redirectUrl | String(200) | Yes | Target URL for redirection after success or failure |
Data Signing Rules
| Field Name | Type | Value | Required |
|---|
| Content-Type | String(30) | Fixed value "application/json;charset=utf-8" | Yes |
| X-TIMESTAMP | String(29) | Current time, format 2022-09-16T16:58:47.964+07:00 | Yes |
| X-SIGNATURE | String(64) | Signature. For details please check Data Signing Rules | Yes |
| X-PARTNER-ID | String(20) | Merchant ID | Yes |
| X-REQUEST-ID | String(64) | Unique ID for each request | Yes |
Error Code
| Parameter | Type | Required | Remarks |
|---|
| requestId | String(64) | Yes | Unique identifier on every request |
| errCode | String(32) | Yes | 0 means success, otherwise see Error Code |
| errCodeDes | String(128) | No | Error description |
| merchantId | String(20) | Yes | Merchant ID |
| storeId | String(30) | No | Only if using branch ID |
| paymentType | String(20) | Yes | Payment type |
| requestAmount | Decimal(12,2) | No | Amount at request |
| amount | Decimal(12,2) | Yes | Amount in IDR with 2 decimals. Fee type OUR adds fee; fractional fees rounded up (10,000.11 → 10,001.00). |
| merchantTradeNo | String(32) | Yes | Merchant order number |
| createTime | String(16) | No | yyyyMMddHHmmss |
| + paymentActions | Object | No | Payment URLs (PC, Web, etc.) |
| - payUrl | String(200) | No | Payment URL |
| platformTradeNo | String(32) | No | Paylabs platform order number |
| successTime | String(16) | No | yyyyMMddHHmmss |
| expiredTime | String(16) | No | yyyyMMddHHmmss |
| status | String(32) | No | 01: Pending, 09: Failed, 02: Success |
| productName | String(100) | Yes | Product/service name |
| + productInfo | Array<Object>(30) | No | Product/service details |
| - id | String(10) | Yes | Product ID |
| - name | String(32) | Yes | Product Name |
| - price | decimal(12,2) | Yes | Amount in IDR, supports two decimals |
| - type | String(20) | Yes | Product Type |
| - url | String(200) | No | Product URL |
| - quantity | Number(4) | Yes | Product Quantity |
| transFeeRate | Decimal(6,6) | No | Transaction Rate, six decimals |
| transFeeAmount | Decimal(12,2) | No | Fees, two decimals |
| totalTransFee | Decimal(12,2) | No | Total transaction fee rate (excluding vatFee), two decimals |
| vatFee | Decimal(12,2) | No | Taxes, two decimals |
POST /payment/v2.3/cc/create
# HTTP Header
Content-Type: application/json;charset=utf-8
X-TIMESTAMP: 2022-09-16T16:58:47.964+07:00
X-SIGNATURE: xxxxxxxxx
X-PARTNER-ID: 010001
X-REQUEST-ID: xxxxxxxxxxxxxxxxxxxxxxxx
# HTTP Body
{
"merchantId":"0010001",
"merchantTradeNo":"100100011649751697607",
"requestId":"100100011649751697607",
"paymentType":"CreditCard",
"amount":"10000.00",
"productName":"Test",
"paymentParams":{
"redirectUrl": "http://google.com"
}
}
POST /payment/v2.3/cc/create
# HTTP Header
Content-Type: application/json;charset=utf-8
X-TIMESTAMP: 2022-09-16T16:58:47.964+07:00
X-SIGNATURE: xxxxxxxxx
X-PARTNER-ID: 010001
X-REQUEST-ID: xxxxxxxxxxxxxxxxxxxxxxxx
# HTTP Body
{
"amount":"10000.00",
"merchantTradeNo":"T00100011649751697607",
"platformTradeNo":"2022041200000000015",
"expiredTime":"20220413152138",
"paymentType":"CreditCard",
"paymentActions":{
"payUrl":"http://192.168.0.119:8081/en-credit-index.html?k=c2b2da7c8ce8b00691a68c38d77e000eeec0f030655f06a93eeeee051ca3235024591ab3207f9a39e58e4082d2b6f922"
},
"createTime":"20220412152138",
"merchantId":"0010001",
"errCode":"0",
"requestId":"R00100011649751697607",
"productName":"Test",
"status":"01",
"transFeeRate":"0",
"transFeeAmount":"0",
"totalTransFee":"0",
"vatFee":"0"
}