Obtenir la tokenisation de session
Get the current state of a tokenization session.
curl --request GET \
--url https://sandbox.gateway.sezzle.com/v2/token/{token}/session \
--header 'Authorization: <api-key>'import requests
url = "https://sandbox.gateway.sezzle.com/v2/token/{token}/session"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://sandbox.gateway.sezzle.com/v2/token/{token}/session', 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://sandbox.gateway.sezzle.com/v2/token/{token}/session",
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: <api-key>"
],
]);
$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://sandbox.gateway.sezzle.com/v2/token/{token}/session"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.gateway.sezzle.com/v2/token/{token}/session")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.gateway.sezzle.com/v2/token/{token}/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"token": "4f8cf865-2089-4423-85fd-ea833a16b62d",
"expiration": "2020-04-29T19:31:54Z",
"links": [
{
"href": "https://gateway.sezzle.com/v2/token/4f8cf865-2089-4423-85fd-ea833a16b62d/session",
"method": "GET",
"rel": "self"
}
],
"customer": {
"uuid": "a9d8e15c-5e4a-4201-aa8f-7540f934a9a2",
"expiration": "2020-10-13T14:29:41Z",
"links": [
{
"href": "https://gateway.sezzle.com/v2/customer/a9d8e15c-5e4a-4201-aa8f-7540f934a9a2",
"method": "GET",
"rel": "self"
}
]
}
}[
{
"code": "bad_request",
"message": "bad request"
}
][
{
"code": "unauthorized",
"message": "authorization not accepted"
}
][
{
"code": "record_not_found",
"message": "not found"
}
][
{
"code": "invalid",
"message": "Unprocessable entity"
}
]Autorisations
The authentication token generated from providing API Keys to Sezzle Gateway
Paramètres de chemin
The session token to retrieve
Réponse
Successful Operation
The token from the request
The UTC expiration date of the token
If the customer has not finished tokenization then the customer object is omitted
Hide child attributes
Hide child attributes
The unique identifier for this response
Available API links prefilled with UUID with accompanying method
Hide child attributes
Hide child attributes
The fully qualified URL for the API endpoint
The relationship type indicating the purpose of this link (e.g., 'self' for the current resource, 'create' for creating a new resource, 'list' for listing resources)
self, capture, checkout, create, customer, list, order, preapprove, refund, release, session The HTTP method to use when calling this API endpoint
GET, POST, PATCH, DELETE The UTC expiration date of the customer tokenization
The customer's date of birth in YYYY-MM-DD format (parameter is input only)
Hide child attributes
Hide child attributes
The fully qualified URL for the API endpoint
The relationship type indicating the purpose of this link (e.g., 'self' for the current resource, 'create' for creating a new resource, 'list' for listing resources)
self, capture, checkout, create, customer, list, order, preapprove, refund, release, session The HTTP method to use when calling this API endpoint
GET, POST, PATCH, DELETE curl --request GET \
--url https://sandbox.gateway.sezzle.com/v2/token/{token}/session \
--header 'Authorization: <api-key>'import requests
url = "https://sandbox.gateway.sezzle.com/v2/token/{token}/session"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://sandbox.gateway.sezzle.com/v2/token/{token}/session', 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://sandbox.gateway.sezzle.com/v2/token/{token}/session",
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: <api-key>"
],
]);
$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://sandbox.gateway.sezzle.com/v2/token/{token}/session"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.gateway.sezzle.com/v2/token/{token}/session")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.gateway.sezzle.com/v2/token/{token}/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"token": "4f8cf865-2089-4423-85fd-ea833a16b62d",
"expiration": "2020-04-29T19:31:54Z",
"links": [
{
"href": "https://gateway.sezzle.com/v2/token/4f8cf865-2089-4423-85fd-ea833a16b62d/session",
"method": "GET",
"rel": "self"
}
],
"customer": {
"uuid": "a9d8e15c-5e4a-4201-aa8f-7540f934a9a2",
"expiration": "2020-10-13T14:29:41Z",
"links": [
{
"href": "https://gateway.sezzle.com/v2/customer/a9d8e15c-5e4a-4201-aa8f-7540f934a9a2",
"method": "GET",
"rel": "self"
}
]
}
}[
{
"code": "bad_request",
"message": "bad request"
}
][
{
"code": "unauthorized",
"message": "authorization not accepted"
}
][
{
"code": "record_not_found",
"message": "not found"
}
][
{
"code": "invalid",
"message": "Unprocessable entity"
}
]