Skip to content

Dodo Payments

Integrate GoPayLocal with Dodo Payments for automatic PPP discounts.

Dodo Payments is GoPayLocal’s recommended payment provider. As a Merchant of Record (MoR), Dodo handles tax compliance, allowing you to focus on your product.

  1. Get your Dodo API key

    Log in to the Dodo Payments dashboard and go to API Keys. Copy your API key.

    For testing, use the test mode key (available in the Dodo dashboard under test mode toggle).

  2. Connect in GoPayLocal

    Go to your GoPayLocal dashboard > Settings > Integrations > Dodo Payments and click Connect. Enter your API key in the dialog and optionally provide an account ID.

    Click Test after connecting to verify your credentials are valid.

  3. Import products (optional)

    After connecting, you can import your existing Dodo products into GoPayLocal. Go to the integration settings and use Sync Products to pull your product catalog. Prices are automatically converted from Dodo’s minor units (cents) to standard currency amounts.

  4. Create a campaign

    Create or edit a campaign and select Dodo Payments as the payment provider. When you activate the campaign, GoPayLocal automatically creates discount codes in your Dodo account based on your pricing mode:

    • Group mode: Uses your parity group percentages
    • PPP Factor mode: Calculates discounts from PPP multipliers
    • Custom mode: Uses your per-country overrides
  5. Verify discount codes

    Check your Dodo Payments dashboard > Discounts to see the auto-created codes.

GoPayLocal creates percentage-based discounts in Dodo Payments via their API:

{
"code": "PPP-INDIA-30",
"type": "percentage",
"amount": 30,
"product_id": "prod_xxx"
}

When a visitor copies the code and applies it at Dodo’s checkout, the discount is validated and applied.

Dodo Payments supports auto-applying discounts via the discount_code parameter in checkout sessions:

// When creating a Dodo checkout session on your server
const session = await dodo.checkoutSessions.create({
product_id: 'prod_xxx',
discount_code: 'PPP-INDIA-30', // Auto-applied
success_url: 'https://yoursite.com/success',
cancel_url: 'https://yoursite.com/cancel',
});

To use auto-apply, enable it in your campaign settings and configure your checkout flow to pass the coupon code from the GoPayLocal API response.

Dodo Payments provides a full test mode environment:

  • Use test API keys
  • Create test products and discounts
  • Process test payments without real charges
  • Webhooks fire in test mode

Set environment: 'test_mode' in the GoPayLocal integration settings.

GoPayLocal automatically receives webhooks from Dodo Payments at https://api.gopaylocal.com/v1/webhooks/dodo. The following events are processed:

EventWhat GoPayLocal does
payment.succeededTracks discount code redemptions and updates analytics (impressions, revenue saved)
subscription.createdCreates subscription record, links to your organization
subscription.updatedUpdates plan, status, and billing period
subscription.canceledMarks subscription as canceled
subscription.expiredMarks subscription as expired
payment.failedMarks subscription as past due

All webhooks are verified using HMAC-SHA256 signatures and deduplicated to prevent double-processing.

  • Discount codes are scoped to specific products (not store-wide)
  • Maximum 100 active discount codes per product
  • Test mode and live mode use separate API keys