Dual Authentication
As a platform merchant, one of the most important needs is to create payments on behalf of the sub-merchant programmatically in the KOMOJU system.
To achieve this, we have built various API to facilitate it. For example, the Split Payments feature allows merchants to create payments that are split between the platform merchant and sub-merchant.
However, those API needs the caller to authenticate both the platform merchant and the sub-merchant. Therefore, we designed the dual authentication feature to achieve that.
Dual Keys
As the name suggests, the dual authentication key contains two parts.
Firstly, Platform operators will register as a user on the KOMOJU platform. The user of platform operator will be issued with a user-level authentication key. This key is the first part of the dual key.
Secondly, the Accounts API allows platform merchants to create sub-merchants under their account, where the ID of those sub-merchants can be obtained. This sub-merchant ID is then used as the second part of the dual key.
Presenting the Dual Key
KOMOJU Platform API uses HTTP Basic Authentication to achieve the dual authenticate. You will need to pass the user-level API key of the platform merchant as the username, and pass the ID of the sub-merchant as the password. For example
curl -u user_level_key:merchant_id "https://komoju.com/api/v1/accounts"
Examples
As a concrete example, the Onboarding Process requires the dual authentication if the platform merchant was to initiate the onboarding process on behalf of one of its sub-merchants.