curl --request GET \
--url https://apiv2.example.com/payment-sessions/{paymentSessionId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://apiv2.example.com/payment-sessions/{paymentSessionId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://apiv2.example.com/payment-sessions/{paymentSessionId}', 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://apiv2.example.com/payment-sessions/{paymentSessionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <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://apiv2.example.com/payment-sessions/{paymentSessionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<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://apiv2.example.com/payment-sessions/{paymentSessionId}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.example.com/payment-sessions/{paymentSessionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"paymentSessionId": "d2e3f4a5-b6c7-8901-2345-012345678901",
"orderId": "e3f4a5b6-c7d8-9012-3456-123456789012",
"paymentProvider": "STRIPE",
"savePaymentProfile": true,
"hostedUrl": "https://payments.example.com/checkout/d2e3f4a5-b6c7-8901-2345-012345678901",
"status": "PENDING",
"metadata": {
"source": "mobile_app",
"campaign": "summer_2024"
},
"createdAt": "2024-09-29T10:00:00Z",
"updatedAt": "2024-09-29T10:30:00Z",
"paymentProfileId": "f4a5b6c7-d8e9-0123-4567-234567890123",
"returnUrl": "https://example.com/order/confirmation",
"cancelUrl": "https://example.com/order/checkout"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}Get payment session
Retrieve details of a specific payment session by its identifier.
curl --request GET \
--url https://apiv2.example.com/payment-sessions/{paymentSessionId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://apiv2.example.com/payment-sessions/{paymentSessionId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://apiv2.example.com/payment-sessions/{paymentSessionId}', 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://apiv2.example.com/payment-sessions/{paymentSessionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <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://apiv2.example.com/payment-sessions/{paymentSessionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<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://apiv2.example.com/payment-sessions/{paymentSessionId}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.example.com/payment-sessions/{paymentSessionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"paymentSessionId": "d2e3f4a5-b6c7-8901-2345-012345678901",
"orderId": "e3f4a5b6-c7d8-9012-3456-123456789012",
"paymentProvider": "STRIPE",
"savePaymentProfile": true,
"hostedUrl": "https://payments.example.com/checkout/d2e3f4a5-b6c7-8901-2345-012345678901",
"status": "PENDING",
"metadata": {
"source": "mobile_app",
"campaign": "summer_2024"
},
"createdAt": "2024-09-29T10:00:00Z",
"updatedAt": "2024-09-29T10:30:00Z",
"paymentProfileId": "f4a5b6c7-d8e9-0123-4567-234567890123",
"returnUrl": "https://example.com/order/confirmation",
"cancelUrl": "https://example.com/order/checkout"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}Authorizations
An API key that grants access to the Connect API. You can create and manage API keys in the portal.
Path Parameters
The unique identifier of the payment session to retrieve.
Response
Payment session retrieved successfully
A payment session that wraps the payment process and collects payment information from the user for a specific order.
The unique identifier for this payment session.
"d2e3f4a5-b6c7-8901-2345-012345678901"
The unique identifier of the order this payment session is for.
"e3f4a5b6-c7d8-9012-3456-123456789012"
Payment service provider that processes the transaction.
STRIPE, BILLOGRAM "STRIPE"
Whether to save the payment profile for future use. Only applicable if the customer is authenticated or for the initial order. Defaults to false.
true
The hosted checkout page to redirect the customer to in order to complete payment.
"https://payments.example.com/checkout/d2e3f4a5-b6c7-8901-2345-012345678901"
Current status of a payment session lifecycle.
PENDING, REQUIRES_ACTION, COMPLETED, FAILED, CANCELED, EXPIRED "PENDING"
Custom key-value pairs for additional payment session information.
Show child attributes
Show child attributes
{
"source": "mobile_app",
"campaign": "summer_2024"
}
When this payment session was created.
"2024-09-29T10:00:00Z"
When this payment session was last updated.
"2024-09-29T10:30:00Z"
The saved payment method to use for this payment (for returning customers).
"f4a5b6c7-d8e9-0123-4567-234567890123"
The URL the customer is redirected to after payment completion.
"https://example.com/order/confirmation"
The URL the customer is redirected to if they cancel the payment.
"https://example.com/order/checkout"