Payment Session

Create temporary payment sessions for onboarded users. The session token is used to authenticate the user in the Payr payment iframe.

Create Payment Session

post
/user-login/

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 iframe URL (?token={token}) 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": "[email protected]"
  }'

Example Response

{
  "url": "https://sandbox.mypayr.co.uk/third-party?token={token}&session_id={session_id}"
}
Authorizations
AuthorizationstringRequired

Server-to-server authentication token obtained via the rotate-token endpoint. Include in the Authorization header as: Authorization: Token <your_token>

Body
emailstring · emailRequired

Email address of the user to create a payment session for

Example: [email protected]
Responses
chevron-right
200

Payment session token created successfully

application/json
post
/user-login/

Last updated