Skip to content

Products API

API reference for creating and managing products.

Manage products programmatically via the GoPayLocal API. All endpoints require a secret API key.

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

Response:

{
"data": [
{
"id": "prod_abc123",
"name": "Pro Plan",
"url": "https://yourapp.com/pricing",
"baseCurrency": "USD",
"basePrice": 9.99,
"description": "Monthly pro plan",
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
}
]
}
GET /v1/products/:id
Terminal window
curl -X GET https://api.gopaylocal.com/v1/products/prod_abc123 \
-H "Authorization: Bearer gpl_sk_live_xyz789"
POST /v1/products
Terminal window
curl -X POST https://api.gopaylocal.com/v1/products \
-H "Authorization: Bearer gpl_sk_live_xyz789" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Plan",
"url": "https://yourapp.com/pricing",
"baseCurrency": "USD",
"basePrice": 9.99,
"description": "Monthly pro plan"
}'

Request Body:

FieldTypeRequiredDescription
namestringYesProduct name
urlstringYesProduct URL
baseCurrencystringYesBase currency code (e.g., “USD”)
basePricenumberYesBase price in the base currency
descriptionstringNoInternal description

Response: 201 Created

{
"data": {
"id": "prod_abc123",
"name": "Pro Plan",
"url": "https://yourapp.com/pricing",
"baseCurrency": "USD",
"basePrice": 9.99,
"description": "Monthly pro plan",
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
}
}
PATCH /v1/products/:id
Terminal window
curl -X PATCH https://api.gopaylocal.com/v1/products/prod_abc123 \
-H "Authorization: Bearer gpl_sk_live_xyz789" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Plan (Updated)",
"basePrice": 12.99
}'

All fields are optional — only include the fields you want to update.

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

Response: 204 No Content