Example: Requesting an DOKU Sale Using the REST API

Light Dark
Request
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
{"clientReferenceInformation": { "code": "sale1077" }, "orderInformation": { "amountDetails": { "totalAmount": "1000000", "currency": "IDR", "taxAmount": "5", "surcharge": { "amount": "1200" } }, "billTo": { "firstName": "John", "lastName": "abc", "country": "ID", "address1": "xyz street 13 14", "phoneNumber": "12628123456", "email": "abc@email.com" }, "shipTo": { "country": "ID", "address1": "Sudirman", "address2" :"test", "locality": "Jakarta", "postalCode": "12190" }, "lineItems": [ { "productName": "mobile", "quantity": "9", "unitPrice": "32.4", "totalAmount": "70000" }, { "productName": "table", "quantity": "9", "unitPrice": "32.4", "totalAmount": "30000" } ] }, "paymentInformation": { "paymentType": { "name": "bankTransfer", "method": { "name": "doku", "type":"dokuWallet" } }, "customer": { "customerid": "1234" } }, "merchantInformation": { "successUrl": "https://www.example.org/feedback.php", "merchantDescriptor": { "name": "test-merchant-descriptor" } }, "recipientInformation": { "beneficiaryAddress": "13735 SE 184th PL RN 98058", "beneficiaryId": "ben_id", "beneficiaryName": "John Doe" }, "deviceInformation": { "ipAddress": "127.0.0.1" }, "buyerInformation": { "personalIdentification": [ { "id": "personal_Identification" } ], "merchantCustomerId": "143456789700" }, "consumerAuthenticationInformation": { "customerCardAlias": "hishriva" } ] } } }}
Response to a Successful Request
123456789
{"processorInformation": { "transactionId": "1169585326", "rawStatus": "PENDING", "paymentUrl": "https://r2.paygate.de/doku/S1150/I?tx=1169585326&rs=KsDe6CmsEhILcRdYHIwTq6WuiplX1nHJ&cs=2a6c47283e3caac6890d5e1a18fff56579cedd80a7091b529426bad627093430" }, "message": "Successful", "status": "PENDING", "id": "6523329019126743603331", "submitTimeUtc": "2022-06-06T14:24:14Z"}