The path of the endpoint that will be hitted e.g: /credit-card/v1/payment-page. NOTE: For the HTTP Notification from DOKU to merchant server, this will be the path of merchant Notification URL. As for the Inquiry Request, this will be the path of merchant Inquiry URL
5
Digest
Encoded (base64) value of hashed (SHA-256) JSON body. This component only applied for POST Method.
Before generating Signature, merchant need to prepare all the component required.Set Client-Id, Request-Id, Request-Timestamp.Use the Client-Id, Request-Id, Request-Timestamp that is placed on the Request Header.Set Request-TargetThe Request-Target is depending on who is sending the request:
1.
When merchant hits DOKU endpoints: The Request-Target is the path of the DOKU API that merchant hits. For instance, if merchant wants to hit DOKU Cards API: https://api.doku.com//credit-card/v1/payment-page. Therefore, the Request-Target value is /credit-card/v1/payment-page.
2.
When DOKU hits merchant endpoints (HTTP Notification / Inquiry Request): The Request-Target is the path of merchant Notification URL or the Inquiry URL. For instance, if merchant set the Notification URL: https://yourdomain.com/payments/notifications. Therefore, the Request-Target value is /payments/notifications.
Generate DigestDigest is the hashed of the request body. To generate the Digest:
After all the Signature component has been set, merchant can now generate it:
1.
Arrange the signature components to one component and its value per line by adding escape character. Don't add at the end of the string. Sample of the raw format:
This is how merchant see it:
2.
Calculate HMAC-SHA256 base64 from all the components above using the Secret Key from DOKU Back Office
3.
Put encoded value and prepend HMACSHA256= to the Signature. Sample: