Dodo Payments
Create checkouts, manage subscriptions, customers, and refunds via Dodo Payments
Dodo Payments Integration
The Dodo Payments integration allows you to automate payment collection, checkout generation, subscription lifecycles, and customer management within your Cloudflare-native Nodes2Cloud workflows.
How to Get Credentials
Dodo Payments authenticates requests via Bearer API Keys.
- Log in to your Dodo Payments Dashboard.
- Navigate to Developer → API Keys in the sidebar.
- Click Create API Key:
- For testing and staging workflows, create a Test Mode key (starts with
dodo_test_). - For live production workflows, create a Live Mode key (starts with
dodo_live_).
- For testing and staging workflows, create a Test Mode key (starts with
- Copy the API key string.
- In Nodes2Cloud, navigate to Integrations → Add Connection, select Dodo Payments, and paste the key.
Environment Auto-Detection: Nodes2Cloud automatically detects whether your key is for Test Mode (
test.dodopayments.com) or Live Mode (live.dodopayments.com) based on the key prefix. You can also explicitly choose the environment in the node inspector.
Operations & Actions
The Dodo Payments node supports the following operations via the Operation selector:
1. Checkout Operations
- Create Checkout Session (
POST /checkouts): Creates a hosted checkout session or payment link.- Product Cart (JSON): Required. Array of line items to charge, e.g.
[{ "product_id": "pdt_123", "quantity": 1 }]. - Customer Email / Name / Phone: Customer identity fields for the checkout session.
- Return / Success URL: Where the customer is redirected upon payment completion.
- Billing Address (JSON): Optional billing address object (
street,city,state,country,zipcode). - Metadata (JSON): Custom key-value pairs attached to the checkout (e.g.
{ "userId": "123" }).
- Product Cart (JSON): Required. Array of line items to charge, e.g.
- Get Checkout Session (
GET /checkouts/:id): Retrieves session details, payment status, and customer details.- Checkout Session ID: The
cks_…identifier returned from session creation.
- Checkout Session ID: The
2. Customer Operations
- Create Customer (
POST /customers): Registers a new customer profile.- Customer Email: Required.
- Customer Name / Phone: Optional identity fields.
- Get Customer (
GET /customers/:id): Retrieves a customer profile and associated billing history.- Customer ID: The
cus_…identifier.
- Customer ID: The
- List Customers (
GET /customers): Fetches a paginated list of customers.- Page Size: Optional number of records per page (default: 20).
3. Subscription Management
- Get Subscription (
GET /subscriptions/:id): Retrieves active subscription status, current period end date, and product information.- Subscription ID: The
sub_…identifier.
- Subscription ID: The
- Cancel Subscription (
PATCH /subscriptions/:id): Cancels a recurring subscription.- Subscription ID: Required
sub_…identifier. - Cancel At Period End: Defaults to
true. When enabled, the customer keeps access through the paid billing cycle, and cancellation takes effect at the renewal date.
- Subscription ID: Required
4. Payments & Refunds
- Get Payment (
GET /payments/:id): Retrieves payment details and transaction records.- Payment ID: The
pay_…identifier.
- Payment ID: The
- List Payments (
GET /payments): Fetches recent payments.- Page Size: Optional limit for results.
- Create Refund (
POST /refunds): Issues a full or partial refund.- Payment ID: The
pay_…identifier to refund. - Refund Amount (Optional): Amount in the smallest currency unit (e.g., cents). Omit to issue a full refund.
- Refund Reason: Optional note describing the reason for the refund.
- Payment ID: The
AI Agent & Tool Availability
The Dodo Payments node is fully toolable. When you add an AI Agent node to your workflow, you can connect the Dodo Payments node into the agent's Tools socket. The model will automatically receive function schemas for creating checkouts, querying customer statuses, and retrieving payments.
Common Troubleshooting
- 401 Unauthorized: Ensure your API key was copied completely and is valid. Check whether you are using a
dodo_test_key against a production customer ID or vice versa. - 404 Not Found on API Base: Dodo Payments uses
test.dodopayments.comandlive.dodopayments.com. The domainapi.dodopayments.comdoes not exist; Nodes2Cloud automatically routes to the correct host. - 422 Validation Error on Product Cart: Ensure
Product Cartis valid JSON array containing objects withproduct_idandquantity. Example:[{ "product_id": "pdt_123", "quantity": 1 }].
