# Get Started

## Welcome to Payr

Welcome to the Payr Third-Party Integration documentation. This guide will help you integrate Payr's rent payment solution into your platform.

### What is Payr?

Payr enables your users to pay their rent by card through an embedded payment interface. With our API, you can:

* **Onboard users** with their tenancy details and KYC documents
* **Create payment sessions** for seamless rent payments
* **Embed our payment iframe** directly into your platform
* **Receive webhooks** for real-time payment notifications

***

## Quick Start

Get up and running with Payr in four simple steps.

### 1. Get Your API Credentials

Contact **<support@mypayr.co.uk>** to request your API credentials. You'll receive:

* A **Server API Token** for server-to-server authentication
* Access to the **Sandbox environment** for testing

### 2. Onboard Your Users

Call the `/onboarding/` endpoint to register users with their:

* Personal details (name, email, phone, date of birth)
* Tenancy information (address, rent amount, payment schedule)
* KYC documents (ID front/back, selfie)

```bash
curl -X POST https://sandbox-api.mypayr.co.uk/thirdparty/onboarding/ \
  -H "Authorization: Token your_server_token" \
  -H "Content-Type: application/json" \
  -d '{
    "student_id": 12345,
    "email": "user@example.com",
    "first_name": "John",
    "last_name": "Smith",
    ...
  }'
```

### 3. Create a Payment Session

When a user wants to pay rent, call `/user-login/` to create a payment session:

```bash
curl -X POST https://sandbox-api.mypayr.co.uk/thirdparty/user-login/ \
  -H "Authorization: Token your_server_token" \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com"}'
```

This returns a `token` valid for 15 minutes.

### 4. Choose Your Payment Interface

Payr offers two ways to present the payment interface to your users:

**Iframe Integration** - Fastest setup, embedded hosted page

* Quick integration
* All features included
* Fixed Payr branding

**SDK Integration** - Customizable, white-label experience

* Full UI customization (colors, fonts, styling)
* Features can be chosen (all are available)
* Requires JavaScript integration

See **Payment Interface** to compare and choose your integration method.

***

### Next Steps

* [**Payment Interface**](/payment-interface.md) - Choose between iframe or SDK integration
* [**Integration Flows**](/integration-flows.md) - Understand the complete payment flow
* [**Authentication**](/authentication.md) - Learn about token types and rotation
* [**Onboarding** ](/onboarding.md)- Full field reference for user registration
* [**Payment Session**](/payment-session.md) - Create and manage payment sessions

***

### Need Help?

Contact **<support@mypayr.co.uk>** for:

* API credentials and webhook configuration
* Sandbox environment access
* Integration support and troubleshooting


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mypayr.co.uk/get-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
