OTC

Over the Counter (OTC) Order

Create OTC order (Indomaret/Alfamart/POS) via Paylabs API.

Request URL

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

HTTPMethod: POST

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

Generate OTC 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 ID provided by payment gateway to merchant
paymentTypeString(20)YesPayment type
amountdecimal(12,2)YesAmount in IDR, with 2 decimals
merchantTradeNoString(32)YesUnique identifier created by merchant for each transaction
notifyUrlString(200)NoCallback URL on payment success; see Inquiry Order for parameters
payerString(60)YesPayer name
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
Convenience StoreIndomaret,Alfarmart,POS

OTC 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 are rounded up (10,000.11 → 10,001.00).
merchantTradeNoString(32)YesMerchant order number
createTimeString(16)NoyyyyMMddHHmmss
paymentCodeString(32)NoPayment Code
platformTradeNoString(32)NoPaylabs platform order number
successTimeString(16)NoyyyyMMddHHmmss
expiredTimeString(16)NoyyyyMMddHHmmss
statusString(32)No01 PENDING 09 FAILED 02 SUCCEEDED
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
payerString(60)NoActual payer name if supported; otherwise null. Not the payer sent when initiating request.
accountNoString(32)NoActual payer account number if supported; otherwise null.

Example

Request

POST  /payment/v2.3/store/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":"100100011649755895582",
  "requestId":"200100011649755895582",
  "paymentType":"Indomaret",
  "amount":"10000.00",
  "productName":"Test",
  "payer":"test"
}

Response

POST /payment/v2.3/store/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":"100100011649755895582",
  "paymentCode":"xxxxxxxxxxxx",
  "platformTradeNo":"2022041200000000025",
  "expiredTime":"20220413163136",
  "paymentType":"BTNVA",
  "createTime":"20220412163136",
  "merchantId":"0010001",
  "errCode":"0",
  "requestId":"200100011649755895582",
  "productName":"Test",
  "status":"01",
  "transFeeRate":"0",
  "transFeeAmount":"0",
  "totalTransFee":"0",
  "vatFee":"0"
}