This guide will help you integrate the Dodo Payments API into your website.
To integrate the Dodo Payments API, you’ll need:
If you don’t have an account yet, you can get your business approved by contacting the founder or by filling out this form.
Navigate to the Dodo Payments Dashboard
Create a product (one-time payment or subscription)
Test the checkout flow:
4242 4242 4242 4242
Generate your API key:
Configure webhooks:
Dodo Payments supports two types of payment links for integrating payments into your website:
For a seamless in-page experience, you can use our Overlay Checkout integration, which embeds the Dodo Payments checkout on your site by leveraging these payment links.
Static payment links let you quickly accept payments by sharing a simple URL. You can customize the checkout experience by passing query parameters to pre-fill customer details, control form fields, and add custom metadata.
Construct your payment link
Start with the base URL and append your product ID:
Add core parameters
Include essential query parameters:
The redirect URL will include payment details as query parameters, for example:
https://example.com/?payment_id=pay_ts2ySpzg07phGeBZqePbH&status=succeeded
Pre-fill customer information (optional)
Add customer or billing fields as query parameters to streamline checkout.
Control form fields (optional)
You can disable specific fields to make them read-only for the customer. This is useful when you already have the customer’s details (e.g., logged-in users).
To disable a field, provide its value and set the corresponding disable…
flag to true
:
Field | Disable Flag | Required Parameter |
---|---|---|
Full Name | disableFullName | fullName |
First Name | disableFirstName | firstName |
Last Name | disableLastName | lastName |
disableEmail | email | |
Country | disableCountry | country |
Address Line | disableAddressLine | addressLine |
City | disableCity | city |
State | disableState | state |
ZIP Code | disableZipCode | zipCode |
Field | Disable Flag | Required Parameter |
---|---|---|
Full Name | disableFullName | fullName |
First Name | disableFirstName | firstName |
Last Name | disableLastName | lastName |
disableEmail | email | |
Country | disableCountry | country |
Address Line | disableAddressLine | addressLine |
City | disableCity | city |
State | disableState | state |
ZIP Code | disableZipCode | zipCode |
Disabling fields helps prevent accidental changes and ensures data consistency.
Add advanced controls (optional)
metadata_orderId=123
).Share the link
Send the completed payment link to your customer. When they visit, all query parameters are collected and stored with a session ID. The URL is then simplified to include just the session parameter (e.g., ?session=sess_1a2b3c4d
). The stored information persists through page refreshes and is accessible throughout the checkout process.
The customer’s checkout experience is now streamlined and personalized based on your parameters.
Created via API call or our sdk with customer details. Here’s an example:
There are two APIs for creating dynamic payment links:
The guide below is for one-time payment link creation.
For detailed instructions on integrating subscriptions, refer to this Subscription Integration Guide.
payment_link = true
to get payment link You can see all our available SDKs on Dodo Payments SDK page.
For detailed API request body requirements, consult our API Reference.
For a seamless in-page checkout experience, explore our Overlay Checkout integration that allows customers to complete payments without leaving your website.
Set up an API endpoint to receive payment notifications. Here’s an example using Next.js:
Our webhook implementation follows the Standard Webhooks specification. For webhook type definitions, refer to our Webhook Event Guide.
You can refer to this project with demo implementation on GitHub using Next.js and TypeScript.
You can check out the live implementation here.
This guide will help you integrate the Dodo Payments API into your website.
To integrate the Dodo Payments API, you’ll need:
If you don’t have an account yet, you can get your business approved by contacting the founder or by filling out this form.
Navigate to the Dodo Payments Dashboard
Create a product (one-time payment or subscription)
Test the checkout flow:
4242 4242 4242 4242
Generate your API key:
Configure webhooks:
Dodo Payments supports two types of payment links for integrating payments into your website:
For a seamless in-page experience, you can use our Overlay Checkout integration, which embeds the Dodo Payments checkout on your site by leveraging these payment links.
Static payment links let you quickly accept payments by sharing a simple URL. You can customize the checkout experience by passing query parameters to pre-fill customer details, control form fields, and add custom metadata.
Construct your payment link
Start with the base URL and append your product ID:
Add core parameters
Include essential query parameters:
The redirect URL will include payment details as query parameters, for example:
https://example.com/?payment_id=pay_ts2ySpzg07phGeBZqePbH&status=succeeded
Pre-fill customer information (optional)
Add customer or billing fields as query parameters to streamline checkout.
Control form fields (optional)
You can disable specific fields to make them read-only for the customer. This is useful when you already have the customer’s details (e.g., logged-in users).
To disable a field, provide its value and set the corresponding disable…
flag to true
:
Field | Disable Flag | Required Parameter |
---|---|---|
Full Name | disableFullName | fullName |
First Name | disableFirstName | firstName |
Last Name | disableLastName | lastName |
disableEmail | email | |
Country | disableCountry | country |
Address Line | disableAddressLine | addressLine |
City | disableCity | city |
State | disableState | state |
ZIP Code | disableZipCode | zipCode |
Field | Disable Flag | Required Parameter |
---|---|---|
Full Name | disableFullName | fullName |
First Name | disableFirstName | firstName |
Last Name | disableLastName | lastName |
disableEmail | email | |
Country | disableCountry | country |
Address Line | disableAddressLine | addressLine |
City | disableCity | city |
State | disableState | state |
ZIP Code | disableZipCode | zipCode |
Disabling fields helps prevent accidental changes and ensures data consistency.
Add advanced controls (optional)
metadata_orderId=123
).Share the link
Send the completed payment link to your customer. When they visit, all query parameters are collected and stored with a session ID. The URL is then simplified to include just the session parameter (e.g., ?session=sess_1a2b3c4d
). The stored information persists through page refreshes and is accessible throughout the checkout process.
The customer’s checkout experience is now streamlined and personalized based on your parameters.
Created via API call or our sdk with customer details. Here’s an example:
There are two APIs for creating dynamic payment links:
The guide below is for one-time payment link creation.
For detailed instructions on integrating subscriptions, refer to this Subscription Integration Guide.
payment_link = true
to get payment link You can see all our available SDKs on Dodo Payments SDK page.
For detailed API request body requirements, consult our API Reference.
For a seamless in-page checkout experience, explore our Overlay Checkout integration that allows customers to complete payments without leaving your website.
Set up an API endpoint to receive payment notifications. Here’s an example using Next.js:
Our webhook implementation follows the Standard Webhooks specification. For webhook type definitions, refer to our Webhook Event Guide.
You can refer to this project with demo implementation on GitHub using Next.js and TypeScript.
You can check out the live implementation here.