---
description: "Build your first integration with a ticket shop or a read request to the Paydro API."
group: "Get started"
order: 1
---

# Getting started

Build your first integration with a ticket shop or a read request to the Paydro API.

This guide is for developers connecting a website or server application to Paydro. For the API path, you should know how to run a terminal command and read JSON. By the end, you will have retrieved an event and checked that it is the one your integration needs.

## Choose your starting point {#choose-your-starting-point}

-   [Embed registration and checkout](/en-us/docs/embed-ticket-shop.md): you need your public shop URL and access to your website’s HTML. No API credentials are needed; continue with the embed guide.
-   **Build a server integration**: follow the steps below, then [synchronize orders and attendees](/en-us/docs/synchronizing-data.md) or use the [integration recipes](/en-us/docs/integration-recipes.md).
-   **Connect an existing service**: follow the [HubSpot](/en-us/docs/hubspot.md) or [Mailchimp](/en-us/docs/mailchimp.md) setup guide.

## Prepare your access {#prepare-your-access}

1.  Ask your organization administrator for an active Paydro organizer account with access to the relevant event. Use a dedicated account for a server integration where your organization supports one.
2.  Set your API origin to your organization’s Paydro host, or `https://shop.paydro.com`. The developer hostname serves documentation.
3.  Copy the event UUID from the organizer event URL. Event slugs in public shop URLs are different from UUIDs.
4.  Store the account email and password in your server’s secret environment. Keep them out of browser JavaScript.

Use an [authorized test event](/en-us/docs/testing.md#prepare-test-data). The local `.test.test` sites are for an installed development environment; they are not a public sandbox. This first request only reads event data.

## Make your first request {#make-your-first-request}

In Bash or Zsh, replace the email and example UUID below with your organizer email and event UUID. Set the origin without a trailing slash. Enter your password at the hidden prompt; it will not be saved in shell history.

```bash
export PAYDRO_ORIGIN="https://shop.paydro.com"
export PAYDRO_EMAIL="integration@example.com"
export EVENT_ID="11111111-1111-4111-8111-111111111111"
printf 'Paydro password: '
read -rs PAYDRO_PASSWORD
printf '\n'
export PAYDRO_PASSWORD
```

Choose one client below and run it from that same terminal. Use cURL directly; save PHP as `first-request.php` (including the opening `<?php`) and run `php first-request.php`; save Node.js as `first-request.mjs` and run `node first-request.mjs`; or save Python as `first-request.py` and run `python3 first-request.py`.

Requirements: cURL; PHP 7.3+ with its cURL extension; Node.js 18+ with built-in `fetch`; or Python 3 with `requests`. For Python, create an environment with `python3 -m venv .venv`, activate it with `source .venv/bin/activate`, then run `python3 -m pip install requests`.

```curl group=first-request
curl --include --silent --show-error --max-time 30 \
  --user "$PAYDRO_EMAIL:$PAYDRO_PASSWORD" \
  --header 'Accept: application/json' \
  "$PAYDRO_ORIGIN/api/v2/events/$EVENT_ID"
```

```php group=first-request
<?php
$url = getenv('PAYDRO_ORIGIN') . '/api/v2/events/' . getenv('EVENT_ID');
$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_USERPWD => getenv('PAYDRO_EMAIL') . ':' . getenv('PAYDRO_PASSWORD'),
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);
$response = curl_exec($ch);
if ($response === false) throw new RuntimeException(curl_error($ch));
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
unset($ch);
if ($status !== 200) throw new RuntimeException('HTTP ' . $status);
$data = json_decode($response, true, 512, JSON_THROW_ON_ERROR);
if (($data['Event']['id'] ?? null) !== getenv('EVENT_ID')) {
    throw new RuntimeException('Expected the requested Event');
}
echo json_encode($data, JSON_PRETTY_PRINT), PHP_EOL;
```

```node group=first-request
const { PAYDRO_ORIGIN, PAYDRO_EMAIL, PAYDRO_PASSWORD, EVENT_ID } = process.env;
const credentials = Buffer.from(`${PAYDRO_EMAIL}:${PAYDRO_PASSWORD}`).toString('base64');
const response = await fetch(`${PAYDRO_ORIGIN}/api/v2/events/${EVENT_ID}`, {
  headers: { Authorization: `Basic ${credentials}`, Accept: 'application/json' },
  redirect: 'error',
  signal: AbortSignal.timeout(30000),
});
if (response.status !== 200) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
if (data.Event?.id !== EVENT_ID) throw new Error('Expected the requested Event');
console.log(JSON.stringify(data, null, 2));
```

```python group=first-request
import json, os, requests

response = requests.get(
    os.environ['PAYDRO_ORIGIN'] + '/api/v2/events/' + os.environ['EVENT_ID'],
    auth=(os.environ['PAYDRO_EMAIL'], os.environ['PAYDRO_PASSWORD']),
    headers={'Accept': 'application/json'},
    timeout=30,
    allow_redirects=False,
)
if response.status_code != 200:
    raise RuntimeError(f'HTTP {response.status_code}')
data = response.json()
if data.get('Event', {}).get('id') != os.environ['EVENT_ID']:
    raise RuntimeError('Expected the requested Event')
print(json.dumps(data, indent=2))
```

## Read the result {#read-the-result}

A successful v2 event request returns an object with an `Event` property. The object below is a shortened illustrative response; actual events contain additional settings.

```json
{"Event":{"id":"11111111-1111-4111-8111-111111111111","name":"Community Summit","currency":"EUR","start_date":"2026-11-20 09:00:00"}}
```

Expect HTTP `200`, a JSON body, and `Event.id` equal to `EVENT_ID`. cURL prints the response headers and body; the other examples check the status and event ID before printing JSON. Confirm the event name, too. A successful HTTP status alone does not prove that a legacy API operation succeeded.

When finished, run `unset PAYDRO_PASSWORD`. For unattended requests, supply credentials through your server’s secret manager.

## Troubleshoot your first request {#troubleshoot-your-first-request}

| Result | Next step |
| --- | --- |
| `403` with `Unauthorized` | Check the email, password and active account status. Stop repeated attempts; see [authentication failures](/en-us/docs/authentication.md#failed-authentication). |
| Redirect, login HTML or JSON parsing error | Check the API origin and that credentials were exported in the same terminal. Do not follow login redirects as API responses. |
| `404` or `invalid_id` | Use the organizer host, the exact request path and an event UUID you can access. A public shop slug cannot replace the UUID. |
| `429`, `503` or timeout | Follow [retry guidance](/en-us/docs/rate-limits-and-retries.md); honor `Retry-After` when present. |

See [handling errors](/en-us/docs/errors.md) for other responses and what to include in a support request.

## Continue building {#continue-building}

-   Understand origins, paths and response envelopes in [API basics](/en-us/docs/api-basics.md).
-   Look up methods, parameters and response schemas in the [API reference](/en-us/reference/overview), or download [OpenAPI JSON](/openapi/v2.json).
-   Before writing data, check the [permissions matrix](/en-us/docs/permissions.md#operation-matrix) and [workflow limits](/en-us/docs/api-coverage.md).
-   Complete [integration testing](/en-us/docs/testing.md) and the [go-live checklist](/en-us/docs/going-live.md) before enabling production automation.
