Create API Key
https://api-sandbox.letpay.io/access-key
Create New API Key and Secret
This endpoint is used to create a new API key and secret.
The first pair of API keys must be generated by the main admin on the merchant dashboard. Access merchant/API Keys
Request Body
- Form-Data
api_key:
(text) The API keyapi_secret:
(text) The API secret
Response
The response will contain the newly generated API key and secret in the following format:
json
{
"api_key": "********",
"api_secret": "********"
}
Purpose
The purpose of this API endpoint is to allow the main admin on the merchant dashboard to generate the first pair of API keys.
AUTHORIZATION | API Key |
---|---|
Key | X-Auth-Token |
Value | MY_ACCESS_TOKEN |
Example Request
- 200 - Success
- 401 - Unauthorized
Example Request
200 - Authenticated
curl --location --request POST 'https://api-sandbox.letpay.io/access-key' \
--header 'X-Auth-Token: INVALID_ACCESS_TOKEN'
Example Response
Header
Content-Type: application/json
Body
{
"api_key": "MY_API_KEY",
"api_secret": "MY_API_SECRET"
}
Example Request
401 - Unauthorized
curl --location 'https://api-sandbox.letpay.io/auth' \
--form 'apiKey="INVALID_API_KEY"' \
--form 'apiSecret="INVALID_API_SECRET"'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-15T19:23:27.248+0000",
"status": 401,
"error": "Unauthorized",
"message": "Access Denied",
"path": "/access-key"
}