API Documentation

We 💙 developers

Perhaps you are a P2P lending platform and want to increase your outreach to the investor community?

Then you are in the right place!

💡 See the Platforms API OpenAPI spec.

Mission

beyondp2p is a data-centric source for P2P investors and P2P platforms alike.

Driven by the passion for software products, we created beyondp2p to innovate on data mining, analytics and marketing automatization for European P2P investing.

Getting Started

Sign up for a platform account

In order to use the API, please use the following form or contact us directly.

We will get back to you as soon as possible!

You are going to receive your platform's client-id and client-secret in order to authenticate yourself with our API.

Authentication

We use OpenID Connect for authentication. Basically, you need to use your client-id and client-secret to obtain short running access token from our identity provider:

curl --location --request POST 'https://accounts.staging.beyondp2p.com/realms/beyondp2p/protocol/openid-connect/token' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'client_id=platform-myplatform' \
    --data-urlencode 'client_secret=LUMQXBHXfvnwsswQltHkxtJtR7E4aadH' \
    --data-urlencode 'grant_type=client_credentials'
    
The API returns:
{
    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSeWRrczNMbVBRU0JMeVg4MVlFWEdfeDU1TmRCdkdlOGVhOEpGRU9JM3FBIn0.eyJleHAiOjE2NjM1MTAxNzQsImlhdCI6MTY2MzUwOTg3NCwianRpIjoiNzNhY2ZiMGYtZGY0Ny00YjFhLWIwODAtZTMxNzEwYWVjMzhhIiwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5zdGFnaW5nLmJleW9uZHAycC5jb20vcmVhbG1zL2JleW9uZHAycCIsInN1YiI6IjZjNjY5NTYwLTMwMDAtNDA2NS1iZGNlLWU5MDg4MzlkOTA0OCIsInR5cCI6IkJlYXJlciIsImF6cCI6InBsYXRmb3JtLW1pbnRvcyIsImFjciI6IjEiLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsicGxhdGZvcm0iXX0sInNjb3BlIjoicHJvZmlsZSBlbWFpbCIsInBsYXRmb3JtUXVhbGlmaWVyIjoiTUlOVE9TIiwiY2xpZW50SG9zdCI6Ijk1LjEyOS4yNTIuMiIsImNsaWVudElkIjoicGxhdGZvcm0tbWludG9zIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzZXJ2aWNlLWFjY291bnQtcGxhdGZvcm0tbWludG9zIiwiY2xpZW50QWRkcmVzcyI6Ijk1LjEyOS4yNTIuMiJ9.ACCKDzfxcLLeCRCTifvmINYLtndpyL2Ahx7I0okA9pZeDpf4YmA0RsC644O6uID1DLo3PuJQt8uPiIIWslLGWuRkNRX4eM1tts1bUH-lAMlv2xtUv89G28cp2GUXyWQOtzToHIWputjtX-JTesl3Y4wSY0GV1lcn6OHJ98CfPePJ-nzq05xUv2BK7eF4xXpoIfgjGytTtkGkVOgqIZdWthwPqffsYrLj1Ie5s4w56XBC-M7nv0LviEo5JnUFS1eUzkObPFD9MUjSD9CBamLQNpVsICYOlrPuQ6MjxnpuN0IwDXFWBKRzLZzG4zDL13rnlbN69tShVp7pcy_s2IVGew",
    "expires_in": 300,
    "refresh_expires_in": 0,
    "token_type": "Bearer",
    "not-before-policy": 1658510414,
    "scope": "profile email"
}
    

Use the value of "access_token" in your Authorization header as Bearer token for the following request.

Send your first request

In order to send your first request to the Platforms API, please watch out for two important things:
  1. Authorization Header: Make sure to use the access token from the token exchange endpoint as the "Bearer" token.
  2. Accept Header: Make sure to use the correct Accept header when sending requests from the Platforms API. You can find the supported Accept headers in the OpenAPI spec. The accept header for the current API version is "application/com.beyondp2p.api-v1.0+json". The Accept header serves to maintain a consumer-driven contract between the API and its clients. In case we need to introduce breaking changes to an endpoint, we can know up to which Accept header version a client supports the endpoint. We can then take measures to guarantee the retro-compatability of legacy clients.
curl \
    --location --request POST 'https://api.beyondp2p.com/v1/platforms/statistics' \
    --header 'Accept: application/com.beyondp2p.api-v1.0+json' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSeWRrczNMbVBRU0JMeVg4MVlFWEdfeDU1TmRCdkdlOGVhOEpGRU9JM3FBIn0.eyJleHAiOjE2NjM1MTAxNzQsImlhdCI6MTY2MzUwOTg3NCwianRpIjoiNzNhY2ZiMGYtZGY0Ny00YjFhLWIwODAtZTMxNzEwYWVjMzhhIiwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5zdGFnaW5nLmJleW9uZHAycC5jb20vcmVhbG1zL2JleW9uZHAycCIsInN1YiI6IjZjNjY5NTYwLTMwMDAtNDA2NS1iZGNlLWU5MDg4MzlkOTA0OCIsInR5cCI6IkJlYXJlciIsImF6cCI6InBsYXRmb3JtLW1pbnRvcyIsImFjciI6IjEiLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsicGxhdGZvcm0iXX0sInNjb3BlIjoicHJvZmlsZSBlbWFpbCIsInBsYXRmb3JtUXVhbGlmaWVyIjoiTUlOVE9TIiwiY2xpZW50SG9zdCI6Ijk1LjEyOS4yNTIuMiIsImNsaWVudElkIjoicGxhdGZvcm0tbWludG9zIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzZXJ2aWNlLWFjY291bnQtcGxhdGZvcm0tbWludG9zIiwiY2xpZW50QWRkcmVzcyI6Ijk1LjEyOS4yNTIuMiJ9.ACCKDzfxcLLeCRCTifvmINYLtndpyL2Ahx7I0okA9pZeDpf4YmA0RsC644O6uID1DLo3PuJQt8uPiIIWslLGWuRkNRX4eM1tts1bUH-lAMlv2xtUv89G28cp2GUXyWQOtzToHIWputjtX-JTesl3Y4wSY0GV1lcn6OHJ98CfPePJ-nzq05xUv2BK7eF4xXpoIfgjGytTtkGkVOgqIZdWthwPqffsYrLj1Ie5s4w56XBC-M7nv0LviEo5JnUFS1eUzkObPFD9MUjSD9CBamLQNpVsICYOlrPuQ6MjxnpuN0IwDXFWBKRzLZzG4zDL13rnlbN69tShVp7pcy_s2IVGew' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "loansTotalFunded": 8344647204,
        "loansOutstanding": 548738125,
        "loansCurrent": 414935909,
        "loansDaysLate1To15": 38743106,
        "loansDaysLate16To30": 37136819,
        "loansDaysLate31To60": 45179015,
        "loansDaysLate60Plus": 51702,
        "loansLate": null,
        "loansDefaultedInRecovery": null,
        "loansDefaultedRecovered": null,
        "loansDefaultedWrittenOff": null,
        "investors": 497302,
        "averageNetAnnualReturn": 12.48,
        "averageAmountPerInvestor": 2097,
        "principalReturned": null,
        "interestEarned": 205313088,
        "lateFeesEarned": null
    }'
    

Environments

Staging environment

A staging environment is available! You can easily test your integration with beyondp2p API by using the staging environment.

Conventions

If not stated otherwise, the currency of the API is Euro.

The API usually works with UTC time zone. Customer facing values are often formatted in Europe/Berlin time zone.

Features

Platform Statistics

platforms statistics earnings charts

As a P2P lending platform, you can share comprehensive platform performance statistics with us. This concerns many data points: total funding volume, outstanding portfolio, number of investors and so on.

Why is this useful? We provide investors insights and notifications regarding these statistics. We keep your investors informed and up to date about your platform developments.

You stay in control: all data fields for the platforms statistics are optional. If you only want to share a part of the data, you are free to do so. Just set the field to `null` in the POST request body when sending the data.

We recommend to implement a daily cron job that shares the data automatically with us.

See this platform page with statistics for an example.

Telegram Bot

platforms telegram bot example message

One of our key products is the @beyondp2p_bot on telegram. It is trusted by hundreds of P2P investors.

With the Telegram Bot API you can share loan or other investment updates. Send platform alerts straight to the hand of the investors on telegram.

Please contact us to set up the alert/channel for your P2P lending platform.

Contact

Please contact info@beyondp2p.com if you need help to use the API.

We have an active group of investors and developers on telegram to push forward the development of the platform.