Payment Session
Create temporary payment sessions for onboarded users. The session token is used to authenticate the user in the Payr payment interface (iframe or SDK).
Create a temporary payment session token for an onboarded user.
This token is valid for 15 minutes and is used for client-side payment operations. Pass the token to the Payr payment interface (iframe or SDK) to enable the user to make rent payments.
Note: The user must have been onboarded via /onboarding/ first, otherwise a 400 error is returned.
Example cURL Request
curl -X POST https://api.mypayr.co.uk/thirdparty/user-login/ \
-H "Authorization: Token your_server_token" \
-H "Content-Type: application/json" \
-d '{
"email": "john.smith@university.edu"
}'Example Response
{
"token": "x9y8z7w6v5u4t3s2r1q0p9o8n7m6l5k4j3i2h1g0f9e8d7c6b5a4",
"session_id": "01KH1FZ0N0..."
}Server-to-server authentication token obtained via the rotate-token endpoint.
Include in the Authorization header as: Authorization: Token <your_token>
Email address of the user to create a payment session for
tenant@example.comPayment session token created successfully
Temporary payment session token (valid for 15 minutes)
session_token_abc123...Session identifier (valid for 30 minutes)
01KH1FZ0N0...Bad Request - Invalid email or user not found
Unauthorized - Invalid or expired server token
POST /thirdparty/user-login/ HTTP/1.1
Host: sandbox-api.mypayr.co.uk
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"email": "john.smith@university.edu"
}{
"token": "x9y8z7w6v5u4t3s2r1q0p9o8n7m6l5k4j3i2h1g0f9e8d7c6b5a4",
"session_id": "01KH1FZ0N0..."
}Last updated

