Network roaming · OCPI 2.2.1

Drivers from other networks on your chargers. And yours on theirs.

It works like mobile roaming: networks connect through an open standard, and drivers can charge on any of them with the app or card they already use.

PlugrPay networkPartner network
OCPI 2.2.1

© OpenStreetMap contributors

RPPartner network app

Green Park SP

500 Augusta Street · 2 available

Available through roaming

Driver from another network

Charging authorized

ALLOWED

How it works

What happens between the two networks

  1. 01

    The networks introduce themselves

    Each side receives an access key to communicate securely.

  2. 02

    Locations appear in the app

    The partner network receives the charging station list, including addresses, connectors, and availability.

  3. 03

    The driver is authorized

    When the driver identifies at the charger, their network immediately confirms whether charging is allowed.

  4. 04

    The bill is closed

    At the end, we send the charging summary (energy, time, and amount) so the network can bill the driver.

Available endpoints

Base URL: https://api.plugrpay.com.br

MethodPathDescriptionAuth
GET/ocpi/2.2/versionsSupported OCPI versionsPublic
GET/ocpi/2.2/credentialsPlugrPay CPO credentials and rolesx-token
GET/ocpi/2.2/locationsCharging station list (Location objects)x-token
POST/ocpi/2.2/tokens/:uid/authorizeDriver token authorizationx-token
GET/ocpi/2.2/sessionsActive and historical charging sessionsx-token
GET/ocpi/2.2/cdrsCharge Detail Records for billingx-token

Example: GET /ocpi/2.2/locations

GET https://api.plugrpay.com.br/ocpi/2.2/locations?offset=0&limit=10 HTTP/1.1
Host: api.plugrpay.com.br
x-token: your-ocpi-token
Accept: application/json

HTTP/1.1 200 OK
{
  "status_code": 1000,
  "status_message": "Success",
  "timestamp": "2025-05-16T10:00:00Z",
  "data": [
    {
      "id": "charging-station-uuid",
      "type": "ON_STREET",
      "name": "Shopping Norte EV01",
      "address": "Av. Brasil, 1500",
      "city": "São Paulo",
      "postal_code": "01310-100",
      "country": "BRA",
      "coordinates": {
        "latitude": "-23.561684",
        "longitude": "-46.655981"
      },
      "evses": [
        {
          "uid": "connector-uuid",
          "status": "AVAILABLE",
          "connectors": [
            {
              "id": "1",
              "standard": "CCS2",
              "format": "SOCKET",
              "power_type": "AC_3_PHASE",
              "max_voltage": 400,
              "max_amperage": 32,
              "max_electric_power": 22000
            }
          ]
        }
      ],
      "last_updated": "2025-05-16T09:55:00Z"
    }
  ],
  "total_count": 142,
  "limit": 10,
  "offset": 0
}
        

Authentication

We use the OCPI TOKEN_A scheme: an opaque token sent in thex-token header on every request.

Partner → PlugrPay

The partner uses the token we provide when registering the connection.

GET https://api.plugrpay.com.br/ocpi/2.2/locations HTTP/1.1
x-token: plugrpay-ocpi-token
Host: api.plugrpay.com.br
          

PlugrPay → Partner

When we call the partner, we use the token they provided during the credentials handshake.

GET /versions HTTP/1.1
x-token: <partner-token>
Host: api.partner.example
          
Important: All OCPI endpoints (except /versions) require thex-token. Requests without a token or with an invalid token receiveHTTP 401 with status_code: 2001.

Test environment

Use the sandbox environment to validate your integration without affecting production data.

Base URLhttps://api.plugrpay.com.br
Test tokenplugrpay-ocpi-demo-token

Quick curl test

# 1. Check supported versions (no authentication)
curl https://api.plugrpay.com.br/ocpi/2.2/versions

# 2. List charging stations with the test token
curl https://api.plugrpay.com.br/ocpi/2.2/locations \
  -H "x-token: plugrpay-ocpi-demo-token" \
  -H "Accept: application/json"

# 3. Check CPO credentials
curl https://api.plugrpay.com.br/ocpi/2.2/credentials \
  -H "x-token: plugrpay-ocpi-demo-token"
        

Shall we connect our networks?

Write to integradores@plugrpay.com.br, and we will grant access to the test environment.