Вы находитесь на странице: 1из 7

DUITKU DOCUMENTATION

Request Transaction
Function: Transaction Request
Purpose: Request to perform purchase transaction
URL Development : http://sandbox.duitku.com/webapi/api/merchant/inquiry
URL Production : https://passport.duitku.com/webapi/api/merchant/inquiry
Request : POST
Type : application/json
Parameter
merchantCode
paymentAmount
merchantOrderId
productDetail
additionalParam
paymentMethod
merchantUserInfo
returnUrl

callbackUrl
signature

Description
Merchant Code from
Duitku
Payment Amount
Order Id from Merchant
Product Detail
(optional)
Payment Method
(optional) Merchant user
Id / email
Url for redirect when
transaction is finish or
canceled
Url for transaction
Callback
Signature

Request Example :
{

"merchantCode": "sample string 1",


"paymentAmount": 2,
"paymentMethod": "sample string 3",
"merchantOrderId": "sample string 4",
"productDetails": "sample string 5",
"additionalParam": "sample string 6",
"merchantUserInfo": "sample string 7",
"callbackUrl": "sample string 8",
"returnUrl": "sample string 9",
"signature": "sample string 10"

Example
D0010
150000
abcde12345
Payment for A Shop
BK

http://www.example.com/re
turn
http://www.example.com/ca
llback
md5(merchantCode +
orderId + amount +
merchantKey)

After posting of data, the api will response with a paymentUrl data, user will need to
be redirected to that url to process the payment.
Response :
Parameter
merchantCode
reference
paymentUrl

Description
Merchant Code
Reference from duitku
Payment Url from duitku
(Redirect User)

Example :
{

"merchantCode": "sample string 1",


"reference": "sample string 2",
"paymentUrl": "sample string 3"

Example
D0010
abcde12345

CALLBACK
Return values are returned as HTTP POST, Merchant will need to provide a call-back
page to catch the result.
Method : POST
Parameter
merchantCode
amount
merchantOrderId
productDetail
additionalParam
paymentMethod
signature

resultCode
merchantUserId
reference

Description
Merchant Code from
Duitku
Payment Amount
Order Id from Merchant
Product Detail
(optional)
Payment Method
Signature

Payment Status
User Id from Merchant
Site
Reference from duitku

Example
D0010
150000
abcde12345
Payment for A Shop
BK
md5(merchantCode +
amount + merchantOrderId
+ merchantKey)
00 Success

Note :
Please response with SUCCESS if transaction is success.

Redirect
Method : Http GET
Parameter
merchantOrderId
reference
resultCode

Description
Order id from merchant
Reference from duitku
Result Code

Example
http://www.merchantweb.com/redirect.php?
merchantOrderId=xxx&resultCode=yyy&reference=zzz

Example
00 Success, 01 - failed

Check Transaction
Function : Check Transaction
Purpose : For Merchant to request for resending of transaction data in post back
form.
This function will be optional to Merchant. This function may be used in any stage
after performing the Transaction Request method.
URL Development :
http://sandbox.duitku.com/webapi/api/merchant/transactionStatus
URL Production :
https://passport.duitku.com/webapi/api/merchant/transactionStatus
Request : POST
Type : application/json
Parameter
merchantCode
merchantOrderId
Signature

Description
Merchant Code duitku
Order ID from merchant
Signature

Example
Md5( merchantCode +
merchantOrderId +
MerchantKey)

Request Example :
{

"merchantCode": "sample string 1",


"merchantOrderId": "sample string 2",
"signature": "sample string 3"

Response :
Parameter
reference
merchantOrderId
amount
statusCode
statusMessage

Description
Reference from duitku
Order ID from merchant
Amount
statusCode
statusMessage

Example Response :
{
"merchantOrderId": "sample string 1",
"reference": "sample string 2",

Example
Amount duitku
00 Success, 01 - failed

"amount": "sample string 3",


"statusCode": "sample string 4",
"statusMessage": "sample string 5"

Вам также может понравиться