Skip to main content

Link Aja Payment Guide

DOKU has partnered with various e-money providers and one of them is Link Aja to provide E-Money Payment. Learn more about how DOKU can help you integrate with Link Aja here.


Integration steps

Here is the overview of how to integrate with Link Aja:

  1. Generate request
  2. Complete payment in Link Aja App
  3. Acknowledge payment result
Direct API - Link Aja Sequence Diagram
 Direct API Link Aja Flow

1. Generate Request

To generate request, you will need to hit this API through your Backend :

API Request

TypeValue
HTTP MethodPOST
API endpoint (Sandbox)https://api-sandbox.doku.com/linkaja-emoney/v2/ServiceRequestPayment
API endpoint (Production)https://api.doku.com/linkaja-emoney/v2 /ServiceRequestPayment

Here is the sample of request header to create an order:

Client-Id: OCO-0203-1676104296656
Request-Id: 24bb5232-3fe6-47a5-b0b0-d0fc3c6b5fdb
Request-Timestamp: 2023-06-08T08:50:00Z
Signature: HMACSHA256=vl9DBTX5KhEiXmnpOD0TSm8PYQknuHPdyHSTSc3W6Ps=
Request Header Explanation
ParameterDescription
Client-IdClient ID retrieved from DOKU Back Office
Request-IdUnique random string (max 128 characters) generated from merchant side to protect duplicate request
Request-TimestampTimestamp request on UTC time in ISO8601 UTC+0 format. It means to proceed transaction on UTC+7 (WIB), merchant need to subtract time with 7. Ex: to proceed transaction on September 22th 2020 at 08:51:00 WIB, the timestamp should be 2020-09-22T01:51:00Z
SignatureSecurity parameter that needs to be generated on merchant Backend and placed to the header request to ensure that the request is coming from valid merchant. Please refer to this section to generate the signature

Here is a sample of request body to create an order:

{
"order": {
"invoice_number": "INV-20210124-0001",
"amount": 150000,
"callback_url": "https://merchant.com/return-url",
"line_items": [
{
"name":" Roti",
"price": 10000,
"quantity": 1
}
]
},
"additional_info": {

},
"customer": {
"name": "Jessica Tessalonika",
"email": "example@doku.com",
"phone" : "081112345678"
}
}
Request Body Explanation
ParameterTypeMandatoryDescription
order.invoice_numberstringMandatoryMerchant's designated transaction invoice number
Allowed chars: alphabetic, numeric, special chars
order.amountnumberMandatoryTransaction amount
Allowed chars: numeric
order.callback_urlstringMandatoryMerchant URL that will redirected to after the order completed
order.line_itemsstringMandatoryInformation about customer's basket (item's name, price, and quantities)
customer.namestringOptionalInformation about customer's name
customer.emailstringOptionalInformation about customer's email
customer.phonenumberOptionalInformation about customer's phone
additional_infostringOptionalAdditional info

API Response

After hitting the above API request, DOKU will give the response.

TypeValue
HTTP Status200
ResultSUCCESS
Client-Id: MCH-0001-10791114622547
Request-Id: 24bb5232-3fe6-47a5-b0b0-d0fc3c6b5fdb
Response-Timestamp: 2021-07-09T02:05:14Z
Signature: HMACSHA256=9UPUFzOqJc47aJzD9ESOTcWg6TMsg3mqSP+DnUO8ENE=
Response Header Explanation
ParameterDescription
Client-IdSame as the request
Request-IdSame as the request
Response-TimestampTimestamp Response on UTC with format ISO8601 UTC+0 from DOKU
SignatureSignature generated by DOKU based on the response body

Here is the sample of response body:

{
"order": {
"invoice_number": "LINKAJA23052595",
"amount": "10000.00"
},
"emoney_configuration": {
"identifier": [
{
"name": "TERMINAL_ID",
"value": "e2etest"
}
]
},
"emoney_payment": {
"redirect_method_http": "POST",
"redirect_url_http": "https://api-uat.doku.com/doku/simulator/v1/linkaja/redirectPostToPost",
"redirect_parameter": [
{
"name": "Message",
"value":
"cXAwdzcvd3VEeDlRTzl0V1g1NGZyMmpQbFBPMDQxaHpyclNLazdlV09PTUZ1Z1lJaDlscjU1QmZNS2VPTTNiOGpFY3Mzbmp1dStqUjRWL3FaTGRsekVQWVF3YWRRUVQ2UzZsQkFRSzl2ek1zbERWQWtEY01EV0xpaTYrcnRYVUJmSkYvc0tXbGpRWXFCMHVMVHpKMXZTRSt2eTY5K2lOQ3k4aFdCTTBUc2ZGaTlYaWdQZ1JGZ2VjWTNaUlBNT0JCaTNnUzdhMitrNkRlY2hZMWh1R2xpQWtLMTlrLzIyWkxLWnNxQXZTU1VkdllqV0FmeGtqVTVzUjM3ZUIvSE9mag=="
}
],
"status": "PENDING"
}
}
Response Body Explanation
ParameterTypeMandatoryDescription
order.invoice_numberstringMandatorySame as the request
order.amountnumberMandatorySame as the request
emoney_configuration.identifierstringMandatoryMerchant identifier by Link Aja
Max length: 15
Allowed chars: alphabetic, numeric
emoney_payment.redirect_method_httpstringMandatoryHTTP redirect method by Link Aja
Max length: 8
Allowed chars: alphabetic, numeric
emoney_payment.redirect_url_httpstringMandatoryMerchant's redirect URL
emoney_payment.statusstringMandatoryStatus of the create order request
Possible value: PENDING, SUCCESS.
emoney_payment.parameterstringMandatoryCustom message

After the customer completed the payment, they will be redirected to the defined redirect.url that you set on the API request.

3. Acknowledge payment result

DOKU will send HTTP Notification to your defined Notification URL. Learn how to handle the notification from DOKU: