Credit Card

Create Credit Card Order

Create credit card order via Paylabs API.

Request URL

URL: ${ROOT_URL}/payment/v2.3/cc/create

HTTPMethod: POST

EndpointUrl: /payment/v2.3/cc/create

Create Credit Card Order Request Parameters

Data Signing Rules

Field NameTypeValueRequired
Content-TypeString(30)Fixed value "application/json;charset=utf-8"Yes
X-TIMESTAMPString(29)Current time, format 2022-09-16T16:58:47.964+07:00Yes
X-SIGNATUREString(64)Signature. For details please check Data Signing RulesYes
X-PARTNER-IDString(20)Merchant IDYes
X-REQUEST-IDString(64)Unique ID for each requestYes

Body

ParameterTypeRequiredRemarks
requestIdString(64)YesUnique identifier on every request
merchantIdString(20)YesUnique identifier provided by payment gateway to merchant
storeIdString(30)NoOnly if using branch ID
paymentTypeString(20)YesPayment type, see Payment Type
amountDecimal(12,2)YesAmount in IDR
merchantTradeNoString(32)YesUnique identifier created by merchant for each transaction
notifyUrlString(200)NoCallback URL for payment success; see Inquiry Order for parameters
+ paymentParamsObjectNoChannel-specific extra parameters; see Payment Type table
productNameString(100)YesProduct/service name
+ productInfoArray<Object>(30)NoProduct/service details
- idString(10)YesProduct ID
- nameString(32)YesProduct Name
- pricedecimal(12,2)YesAmount in IDR, supports two decimals
- typeString(20)YesProduct Type
- urlString(200)NoProduct URL
- quantityNumber(4)YesProduct Quantity
feeTypeString(3)NoFee deduction type: BEN/OUR. Default BEN. OUR adds fee to order amount automatically.

paymentType

Payment TypeCode
Credit Card 3D-SecureCreditCard
Credit Card 2D-SecureCreditCard_2DSecure
Installment (6 Months)CreditCard_6Mos
Installment (12 Months)CreditCard_12Mos

paymentParams

ParameterTypeRequiredRemarks
redirectUrlString(200)YesTarget URL for redirection after success or failure

Create Credit Card Order Response Parameters

Header

Data Signing Rules

Field NameTypeValueRequired
Content-TypeString(30)Fixed value "application/json;charset=utf-8"Yes
X-TIMESTAMPString(29)Current time, format 2022-09-16T16:58:47.964+07:00Yes
X-SIGNATUREString(64)Signature. For details please check Data Signing RulesYes
X-PARTNER-IDString(20)Merchant IDYes
X-REQUEST-IDString(64)Unique ID for each requestYes

Body

Error Code

ParameterTypeRequiredRemarks
requestIdString(64)YesUnique identifier on every request
errCodeString(32)Yes0 means success, otherwise see Error Code
errCodeDesString(128)NoError description
merchantIdString(20)YesMerchant ID
storeIdString(30)NoOnly if using branch ID
paymentTypeString(20)YesPayment type
requestAmountDecimal(12,2)NoAmount at request
amountDecimal(12,2)YesAmount in IDR with 2 decimals. Fee type OUR adds fee; fractional fees rounded up (10,000.11 → 10,001.00).
merchantTradeNoString(32)YesMerchant order number
createTimeString(16)NoyyyyMMddHHmmss
+ paymentActionsObjectNoPayment URLs (PC, Web, etc.)
- payUrlString(200)NoPayment URL
platformTradeNoString(32)NoPaylabs platform order number
successTimeString(16)NoyyyyMMddHHmmss
expiredTimeString(16)NoyyyyMMddHHmmss
statusString(32)No01: Pending, 09: Failed, 02: Success
productNameString(100)YesProduct/service name
+ productInfoArray<Object>(30)NoProduct/service details
- idString(10)YesProduct ID
- nameString(32)YesProduct Name
- pricedecimal(12,2)YesAmount in IDR, supports two decimals
- typeString(20)YesProduct Type
- urlString(200)NoProduct URL
- quantityNumber(4)YesProduct Quantity
transFeeRateDecimal(6,6)NoTransaction Rate, six decimals
transFeeAmountDecimal(12,2)NoFees, two decimals
totalTransFeeDecimal(12,2)NoTotal transaction fee rate (excluding vatFee), two decimals
vatFeeDecimal(12,2)NoTaxes, two decimals

Example

Request

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"
        }
}

Response

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"
}