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
This API is used for the following solution:
Digital Goods are enables partners to provide digital products within the DANA system, from publishing and synchronizing product catalogs, validating customer information, creating transactions, to tracking order status.
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 charactersRequiredAPI version. As per the respective API reference
function
string
1 - 128 charactersRequiredAccording to specifications defined by each business domain
Value:
Value:
dana.digital.goods.order.createreqTime
string
25 charactersRequiredRequest time, in format
YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)reqMsgId
string
1 - 64 charactersRequiredIdentify an unique system request. Each request will be assigned with a unique identifier (
UUID)requestId
string
1 - 64 charactersRequiredDANA's request identifier. Merchant should store this parameter as the reference to merchant’s order
productId
string
1 - 64 charactersRequiredMerchant’s product identifier
destinationInfo
json object
Define the detail of destination information, refer to
destinationInfoprimaryParam
string
1 - 64 charactersRequiredMandatory destination parameter, e.g., mobile phone number for mobile recharge, account identifier for game top up
secondaryParam
string
1 - 64 charactersSecondary 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
1. Value: Amount
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequiredValue 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)
For example: To create a charge for $1.00, set amount=100 (100 cents)
currency
string
1 - 3 charactersRequiredCurrency
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
1. Value: Amount
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequiredValue 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)
For example: To create a charge for $1.00, set amount=100 (100 cents)
currency
string
1 - 3 charactersRequiredCurrency
extendInfo
string
1 - 4096 charactersOrder extended information, such as merchant's
inquiryId for bill payment1. 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 charactersRequiredAPI version. As per the respective API reference
function
string
1 - 128 charactersRequiredAccording to specifications defined by each business domain
Value:
Value:
dana.digital.goods.order.createrespTime
string
25 charactersRequiredResponse time, in format
YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)reqMsgId
string
1 - 64 charactersRequiredIdentify an unique system request. Each request will be assigned with a unique identifier (
UUID)order
json object
RequiredDefine the detail of order information, refer to
orderrequestId
string
1 - 64 charactersRequiredDANA's request identifier. Merchant should store this parameter as the reference to merchant’s order
orderId
string
1 - 64 charactersRequiredMerchant's order identifier
createdTime
string
25 charactersRequiredCreated order date time, in format
YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)modifiedTime
string
25 charactersRequiredModified order date time, in format
YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)destinationInfo
json object
RequiredDefine the detail of destination information, refer to
destinationInfoprimaryParam
string
1 - 64 charactersRequiredMandatory destination parameter, e.g., mobile phone number for mobile recharge, account identifier for game top up
secondaryParam
string
1 - 64 charactersSecondary 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
1. Value: Amount
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequiredValue 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)
For example: To create a charge for $1.00, set amount=100 (100 cents)
currency
string
1 - 3 charactersRequiredCurrency
orderStatus
json object
RequiredDefine the detail of destination information, refer to
orderStatuscode
string
1 - 8 charactersRequiredOrder status code
status
string
1 - 16 charactersRequiredOrder status
message
string
1 - 256 charactersRequiredOrder status message
serialNumber
string
1 - 32 charactersRequiredOrder 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 codeConditional Info
Y:= bizType is
ELECTRICITY, GAME_VOUCHER, EGIFTCARDproduct
json object
RequiredDefine the detail of product, refer to
productproductId
string
1 - 64 charactersRequiredMerchant’s product identifier
type
string
1 - 32 charactersRequiredProduct type specified by DANA, e.g.,
Refer to Biz Type List
MOBILE_CREDIT and MOBILE_DATA. Refer to Biz Type List
provider
string
1 - 32 charactersRequiredProduct provider, e.g.,
Refer to Provider List
telkomsel, indosat. Refer to Provider List
price
json object
RequiredMerchant’s selling price. Contains two sub-fields:
1. Value: Amount
2. Currency: Currency code based on ISO
1. Value: Amount
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequiredValue 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)
For example: To create a charge for $1.00, set amount=100 (100 cents)
currency
string
1 - 3 charactersRequiredCurrency
availability
boolean
RequiredProduct availability from merchant. This field will used to update merchant product's availability status in DANA
availability
boolean
RequiredProduct 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 buy1. 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"
}
| ResultStatus | ResultCode | ResultMessage | Solution |
|---|---|---|---|
| SUCCESS | 10 | Success | Update order status in DANA to success. Stop retry process |
| PENDING | 20 | Pending | 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 | 31 | Insufficient Deposit | Deposit some money to merchant and retry to process the order with the same requestId |
| FAILED | 32 | 450 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 | 33 | Product Discontinue | Update order status in DANA to failed. Stop retry process, refund the money to the user, disable the product on DANA system permanently |