List payments for sessions
curl --request GET \
--url https://api.lynkwell.com/payments/v1/session-payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lynkwell.com/payments/v1/session-payments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lynkwell.com/payments/v1/session-payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lynkwell.com/payments/v1/session-payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lynkwell.com/payments/v1/session-payments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lynkwell.com/payments/v1/session-payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lynkwell.com/payments/v1/session-payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "pmt_I4FkDaG7zlcoJvXJDsSsw",
"network": "<string>",
"session": "<string>",
"sitePartners": [
"<string>"
],
"location": "<string>",
"currency": "USD",
"status": "PENDING",
"paymentType": "GUEST",
"costs": {
"energy": 1828,
"idle": 108,
"flat": 108,
"time": 216
},
"usages": {
"energy": 40000,
"time": 5400,
"idle": 600
},
"taxConfig": {
"totalPercentSalesTax": 0.08,
"energyPerKwhExciseTax": 0.025
},
"preTaxChargingSessionCost": 2000,
"preTaxCosts": {
"energy": 1600,
"idle": 100,
"flat": 100,
"time": 200
},
"priceAdjustment": {
"id": "<string>",
"amount": 20,
"maxAdjustment": 400,
"calculatedAdjustment": 400
},
"taxes": {
"totalPercentSalesTax": 147,
"energyPerKwhExciseTax": 100
},
"totalTaxAmount": 247,
"billedAmount": 2078,
"recordedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"additionalFee": 250,
"preTaxAdditionalFee": 231,
"collectedAt": "2023-11-07T05:31:56Z"
}
]{
"success": false,
"error": {
"name": "ZodError",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
]
}
}{
"message": "Unauthorized"
}{
"code": "FORBIDDEN",
"message": "<string>",
"status": 403
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "<string>",
"status": 500
}Session Payments
List payments for sessions
Returns the payments for up to 100 charging sessions in one request. Sessions without a payment are left out, so the list can be shorter than sessionIds or empty. A token scoped to a network only sees that network’s payments.
GET
/
payments
/
v1
/
session-payments
List payments for sessions
curl --request GET \
--url https://api.lynkwell.com/payments/v1/session-payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lynkwell.com/payments/v1/session-payments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lynkwell.com/payments/v1/session-payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lynkwell.com/payments/v1/session-payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lynkwell.com/payments/v1/session-payments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lynkwell.com/payments/v1/session-payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lynkwell.com/payments/v1/session-payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "pmt_I4FkDaG7zlcoJvXJDsSsw",
"network": "<string>",
"session": "<string>",
"sitePartners": [
"<string>"
],
"location": "<string>",
"currency": "USD",
"status": "PENDING",
"paymentType": "GUEST",
"costs": {
"energy": 1828,
"idle": 108,
"flat": 108,
"time": 216
},
"usages": {
"energy": 40000,
"time": 5400,
"idle": 600
},
"taxConfig": {
"totalPercentSalesTax": 0.08,
"energyPerKwhExciseTax": 0.025
},
"preTaxChargingSessionCost": 2000,
"preTaxCosts": {
"energy": 1600,
"idle": 100,
"flat": 100,
"time": 200
},
"priceAdjustment": {
"id": "<string>",
"amount": 20,
"maxAdjustment": 400,
"calculatedAdjustment": 400
},
"taxes": {
"totalPercentSalesTax": 147,
"energyPerKwhExciseTax": 100
},
"totalTaxAmount": 247,
"billedAmount": 2078,
"recordedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"additionalFee": 250,
"preTaxAdditionalFee": 231,
"collectedAt": "2023-11-07T05:31:56Z"
}
]{
"success": false,
"error": {
"name": "ZodError",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
]
}
}{
"message": "Unauthorized"
}{
"code": "FORBIDDEN",
"message": "<string>",
"status": 403
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "<string>",
"status": 500
}Scopes
Query Parameters
Response
The payments found, in no particular order.
How the session was paid for. GUEST: a guest checkout without a driver account. PAYMENT_TERMINAL: a card reader at the station. ROAMING: a roaming partner's driver. DRIVER_ACCOUNT: a driver's account, through the app, an RFID card or a vehicle. FREE: the session cost nothing and had no known payer. UNKNOWN: the session had a cost but no known payer.
Available options:
GUEST, PAYMENT_TERMINAL, ROAMING, FREE, UNKNOWN, DRIVER_ACCOUNT