Learn how to integrate Dodo Payments with your Express App Router project using our Express Adaptor. Covers checkout, customer portal, webhooks, and secure environment setup.
Install the package
Set up environment variables
.env
file in your project root:.env
file or secrets to version control.Static Checkout (GET)
?productId=pdt_nZuwz45WAs64n3l07zpQR
).USD
).1000
for $10.00).metadata_
will be passed as metadata.productId
is missing, the handler returns a 400 response. Invalid query parameters also result in a 400 response.Dynamic Checkout (POST)
?customer_id=cus_123
).true
, sends an email to the customer with the portal link.customer_id
is missing.webhookKey
. Returns 401 if verification fails.