Skip to content

Integrations API

API reference for connecting and managing payment provider integrations.

Manage payment provider connections programmatically.

GET /v1/integrations
Terminal window
curl -X GET https://api.gopaylocal.com/v1/integrations \
-H "Authorization: Bearer gpl_sk_live_xyz789"

Response:

{
"data": [
{
"id": "int_abc123",
"provider": "stripe",
"status": "connected",
"environment": "live",
"createdAt": "2025-01-15T10:30:00Z",
"lastSyncAt": "2025-01-20T14:22:00Z"
}
]
}
POST /v1/integrations
Terminal window
curl -X POST https://api.gopaylocal.com/v1/integrations \
-H "Authorization: Bearer gpl_sk_live_xyz789" \
-H "Content-Type: application/json" \
-d '{
"provider": "stripe",
"apiKey": "sk_live_xxx",
"environment": "live"
}'

Request Body:

FieldTypeRequiredDescription
providerstringYesProvider name: stripe, paddle, dodo, lemon_squeezy, gumroad, chargebee, whop, polar
apiKeystringYesProvider API key
environmentstringNo"live" or "test" (default: "live")
siteNamestringNoRequired for Chargebee (subdomain)
DELETE /v1/integrations/:id
Terminal window
curl -X DELETE https://api.gopaylocal.com/v1/integrations/int_abc123 \
-H "Authorization: Bearer gpl_sk_live_xyz789"

Response: 204 No Content

Trigger a manual sync of discount codes with the connected provider.

POST /v1/integrations/:id/sync
Terminal window
curl -X POST https://api.gopaylocal.com/v1/integrations/int_abc123/sync \
-H "Authorization: Bearer gpl_sk_live_xyz789"

This creates or updates discount codes in the payment provider based on your current parity groups and campaign settings.

Verify that the integration’s API key is valid.

POST /v1/integrations/:id/test

Response (success):

{
"ok": true,
"message": "Connection successful"
}

Response (failure):

{
"ok": false,
"message": "Authentication failed — check your API key"
}

Fetch products from the connected payment provider. Currently supported by Dodo Payments.

GET /v1/integrations/:id/products
Terminal window
curl -X GET https://api.gopaylocal.com/v1/integrations/int_abc123/products \
-H "Authorization: Bearer gpl_sk_live_xyz789"

Response:

{
"data": [
{
"providerProductId": "prod_abc123",
"name": "Pro Plan",
"price": 29.99,
"currency": "USD",
"url": "https://dodopayments.com/products/prod_abc123"
}
]
}

Import selected products from the payment provider into GoPayLocal.

POST /v1/integrations/:id/products/import

Request Body:

{
"productIds": ["prod_abc123", "prod_def456"]
}

Response:

{
"data": {
"imported": 2
}
}

Duplicate products (matching by URL) are automatically skipped.