Dodo API
The Dodo API endpoints allow you to manage your Dodo Payments integration with Lumen. This includes configuring your Dodo API keys and validating them.
Overview
Integrating with Dodo Payments allows you to process payments through the Dodo payment gateway. The configuration requires a secret key from your Dodo account.
Authentication
All API requests require authentication via merchant credentials.
Endpoints
Get Dodo Configuration
Retrieves the current Dodo Payments configuration for the authenticated merchant. The secret key is masked for security.
GET https://api.getlumen.dev/v1/dodo/config
Response
{
"id": "dodo_cfg_123",
"secretKey": "dodo_sk_...****1234",
"hasWebhook": true,
"environment": "live",
"createdAt": "2024-01-01T00:00:00Z"
}
Validate Dodo Key
Validates a Dodo Payments secret key by making a test API call to Dodo.
POST https://api.getlumen.dev/v1/dodo/validate-key
Request Body
{
"secretKey": "dodo_sk_..."
}
Response
{
"message": "Dodo API key is valid (live environment)",
"success": true,
"environment": "live"
}
Configure Dodo
Creates or updates the Dodo Payments configuration for the merchant. This process can automatically create a new webhook endpoint in your Dodo account.
POST https://api.getlumen.dev/v1/dodo/config
Request Body
{
"secretKey": "dodo_sk_...",
"webhookSecret": "whsec_..."
}
Request Fields
Field | Type | Required | Description |
---|---|---|---|
secretKey | string | ✓ | Your Dodo Payments secret key. |
webhookSecret | string | Your Dodo Payments webhook secret. |
Response
{
"message": "Dodo configuration updated successfully",
"id": "dodo_cfg_123"
}