Skip to main content

Create Order

POSThttps://<merchant_base_url>/order/create

This API is used by DANA to create the order to merchant

API Type
DANA Open API
Expected Timeout
8 seconds
SNAP Service Code
-
Accept
application/json
Content Type
application/json

Idempotent Key & Usage Rules

Please note that merchant must provide idempotent check capability based on requestId given by DANA. If found out that the request is idempotent, then merchant must return the existing order detail information. Merchant will be the one who responsible for money loss in case merchant doesn't handle this idempotent check correctly.


version
string
1 - 8 charactersRequired
API version. As per the respective API reference
function
string
1 - 128 charactersRequired
According to specifications defined by each business domain
Value: dana.digital.goods.order.create
reqTime
string
25 charactersRequired
Request time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
reqMsgId
string
1 - 64 charactersRequired
Identify an unique system request. Each request will be assigned with a unique identifier (UUID)

requestId
string
1 - 64 charactersRequired
DANA's request identifier. Merchant should store this parameter as the reference to merchant’s order
productId
string
1 - 64 charactersRequired
Merchant’s product identifier
destinationInfo
json object
Define the detail of destination information, refer to destinationInfo
primaryParam
string
1 - 64 charactersRequired
Mandatory destination parameter, e.g., mobile phone number for mobile recharge, account identifier for game top up
secondaryParam
string
1 - 64 characters
Secondary destination parameter, e.g., server identifier
billAmount
json object
User's bill amount. Contains two sub-fields:
1. Value: Amount
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequired
Value of amount. Need to provide the amount in the smallest common currency unit. For most, this is the amount in cents (or pence, or similarly named unit).
For example: To create a charge for $1.00, set amount=100 (100 cents)
currency
string
1 - 3 charactersRequired
Currency
danaSellingPrice
json object
DANA's selling price, used by merchant to deduct the deposit amount. Merchant must deduct the deposit amount using merchant’s selling price in case of DANA's selling price is lower than merchant’s selling price. Contains two sub-fields:
1. Value: Amount
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequired
Value of amount. Need to provide the amount in the smallest common currency unit. For most, this is the amount in cents (or pence, or similarly named unit).
For example: To create a charge for $1.00, set amount=100 (100 cents)
currency
string
1 - 3 charactersRequired
Currency
extendInfo
string
1 - 4096 characters
Order extended information, such as merchant's inquiryId for bill payment
1. Mobile Recharge (without extendInfo)
{
"request":{
"head":{
"version":"2.0",
"function":"dana.digital.goods.order.create",
"reqTime":"2018-07-04T12:08:56+07:00",
"reqMsgId":"1234567asdfasdf1123fd123123aasd123"
},
"body":{
"requestId":"2016234891823981234",
"productId":"123",
"destinationInfo":{
"primaryParam":"085778847384"
},
"danaSellingPrice":{
"value":"20000000",
"currency":"IDR"
}
}
},
"signature":"signature string"
}

version
string
1 - 8 charactersRequired
API version. As per the respective API reference
function
string
1 - 128 charactersRequired
According to specifications defined by each business domain
Value: dana.digital.goods.order.create
respTime
string
25 charactersRequired
Response time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
reqMsgId
string
1 - 64 charactersRequired
Identify an unique system request. Each request will be assigned with a unique identifier (UUID)

order
json object
Required
Define the detail of order information, refer to order
requestId
string
1 - 64 charactersRequired
DANA's request identifier. Merchant should store this parameter as the reference to merchant’s order
orderId
string
1 - 64 charactersRequired
Merchant's order identifier
createdTime
string
25 charactersRequired
Created order date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
modifiedTime
string
25 charactersRequired
Modified order date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
destinationInfo
json object
Required
Define the detail of destination information, refer to destinationInfo
primaryParam
string
1 - 64 charactersRequired
Mandatory destination parameter, e.g., mobile phone number for mobile recharge, account identifier for game top up
secondaryParam
string
1 - 64 characters
Secondary destination parameter, e.g., server identifier
billAmount
json object
User's bill amount. Contains two sub-fields:
1. Value: Amount
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequired
Value of amount. Need to provide the amount in the smallest common currency unit. For most, this is the amount in cents (or pence, or similarly named unit).
For example: To create a charge for $1.00, set amount=100 (100 cents)
currency
string
1 - 3 charactersRequired
Currency
orderStatus
json object
Required
Define the detail of destination information, refer to orderStatus
code
string
1 - 8 charactersRequired
Order status code
status
string
1 - 16 charactersRequired
Order status
message
string
1 - 256 charactersRequired
Order status message
serialNumber
string
1 - 32 charactersRequired
Order identifier from provider
token
string
1 - 32 charactersConditional

- For ELECTRICITY means electricity token number
- For GAME_VOUCHER means or game voucher code or
- For EGIFTCARD means giftcard code
Conditional Info
Y:= bizType is ELECTRICITY, GAME_VOUCHER, EGIFTCARD
product
json object
Required
Define the detail of product, refer to product
productId
string
1 - 64 charactersRequired
Merchant’s product identifier
type
string
1 - 32 charactersRequired
Product type specified by DANA, e.g., MOBILE_CREDIT and MOBILE_DATA.
Refer to Biz Type List
provider
string
1 - 32 charactersRequired
Product provider, e.g., telkomsel, indosat.
Refer to Provider List
price
json object
Required
Merchant’s selling price. Contains two sub-fields:
1. Value: Amount
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequired
Value of amount. Need to provide the amount in the smallest common currency unit. For most, this is the amount in cents (or pence, or similarly named unit).
For example: To create a charge for $1.00, set amount=100 (100 cents)
currency
string
1 - 3 charactersRequired
Currency
availability
boolean
Required
Product availability from merchant. This field will used to update merchant product's availability status in DANA
availability
boolean
Required
Product availability from merchant. This field will used to update merchant product's availability status in DANA. Will be true if the product is available and ready to buy
1. Mobile Recharge without extendInfo
{
"response":{
"head":{
"version":"2.0",
"function":"dana.digital.goods.order.create",
"respTime":"2018-07-04T12:08:56+07:00",
"reqMsgId":"1234567asdfasdf1123fd123123aasd123"
},
"body":{
"order":{
"requestId":"2016234891823981234",
"orderId":"723894791882739847",
"createdTime":"2001-07-04T12:08:56+05:30",
"modifiedTime":"2001-07-04T12:08:56+05:30",
"destinationInfo":{
"primaryParam":"0812312415234"
},
"orderStatus":{
"code":"10",
"status":"SUCCESS",
"message":"Success"
},
"serialNumber":"12983791283097423",
"token":"182098120983081042",
"product":{
"productId":"123",
"type":"MOBILE_CREDIT",
"provider":"telkomsel",
"price":{
"value":"9700000",
"currency":"IDR"
},
"availability":true
}
}
}
},
"signature":"signature string"
}

ResultStatusResultCodeResultMessageSolution
SUCCESS 10Success
Update order status in DANA to success. Stop retry process
PENDING 20Pending
Retry to query order detail with the same requestId
FAILED 30<FAIL_REASON>
Update order status in DANA to failed. Stop retry process and refund the money to the user
FAILED 31Insufficient Deposit
Deposit some money to merchant and retry to process the order with the same requestId
FAILED 32450 Product Closed Temporarily
Update order status in DANA to failed. Stop retry process, refund the money to the user, disable the product on DANA system temporarily
FAILED 33Product Discontinue
Update order status in DANA to failed. Stop retry process, refund the money to the user, disable the product on DANA system permanently
ask AIAI Assistant
Need help with our documentation?
Start from our frequently asked questions or feel free to ask anything else.

AI generated responses may contain mistakes.