Developer Quick Start

Authentication

To authenticate with the Lemonade Payment API, you will need to provide a consumer key and consumer secret, which can be found on the developer page in your Lemonade Payment business account. These keys will be used in conjunction with HTTP Basic Authentication to generate a Bearer token.

To generate a Bearer token, you will need to send a POST request to the Lemonade Payment OAuth token endpoint, including your consumer key and secret in the Authorization header. The response from this request will include a Bearer token that you can use to make subsequent API requests.

IP Whitelisting

In addition to authentication, Lemonade Payment requires clients to provide an IP whitelist for added security. This means that only requests coming from the specified IP addresses will be accepted by the Lemonade PaymentAPI.

To set up an IP whitelist, you required to submit production and test environment IP to our technical team via written request letter signed and stamped. .

Generate your Bearer token

To generate your Bearer token, you'll need your consumer key, consumer secret and the API Key that you will pass in the Authorization header of your request.


curl --location --request POST 'https://prod-url-here/api/v2/auth/login' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "consumer_key": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
    "secret_key": "XXXXXXXXXXXXXXXXXXXX"
}'
                                    
                                  

Sample Response


200 OK

{
    "success": true,
    "message": "Success",
    "data": {
        "access_token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "token_type": "bearer",
        "expires_in": 3600
    }
}