Skip to main content
GET
/
payment-profiles
/
sessions
/
{paymentProfileSessionId}
Get payment profile session
curl --request GET \
  --url https://apiv2.example.com/payment-profiles/sessions/{paymentProfileSessionId} \
  --header 'X-Api-Key: <api-key>'
import requests

url = "https://apiv2.example.com/payment-profiles/sessions/{paymentProfileSessionId}"

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-profiles/sessions/{paymentProfileSessionId}', 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-profiles/sessions/{paymentProfileSessionId}",
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-profiles/sessions/{paymentProfileSessionId}"

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-profiles/sessions/{paymentProfileSessionId}")
.header("X-Api-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://apiv2.example.com/payment-profiles/sessions/{paymentProfileSessionId}")

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
{
  "paymentProfileSessionId": "69321a62-f1fe-461f-8761-a19ae6587bb2",
  "orderId": "44567801-a504-4f09-8089-31ea78bc239b",
  "paymentProvider": "STRIPE",
  "status": "PENDING",
  "hostedUrl": "https://payments.example.com/setup/69321a62-f1fe-461f-8761-a19ae6587bb2",
  "metadata": {
    "source": "mobile_app",
    "campaign": "summer_2024"
  },
  "createdAt": "2024-09-29T10:00:00Z",
  "updatedAt": "2024-09-29T10:30:00Z"
}
{
"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

X-Api-Key
string
header
required

An API key that grants access to the Connect API. You can create and manage API keys in the portal.

Path Parameters

paymentProfileSessionId
string
required

The unique identifier of the payment profile session to retrieve.

Response

Payment profile session retrieved successfully

A payment profile session that wraps the process of setting up and saving a payment method for future use.

paymentProfileSessionId
string
required

The unique identifier for this payment profile session.

Example:

"69321a62-f1fe-461f-8761-a19ae6587bb2"

orderId
string
required

The unique identifier of the order this payment profile session is associated with.

Example:

"44567801-a504-4f09-8089-31ea78bc239b"

paymentProvider
enum<string>
required

Payment service provider that processes the transaction.

Available options:
STRIPE,
BILLOGRAM
Example:

"STRIPE"

status
enum<string>
required

Current status of a payment profile session lifecycle.

Available options:
PENDING,
REQUIRES_ACTION,
COMPLETED,
FAILED,
CANCELED
Example:

"PENDING"

hostedUrl
string<uri>
required

The hosted page to redirect the customer to in order to save their payment method.

Example:

"https://payments.example.com/setup/69321a62-f1fe-461f-8761-a19ae6587bb2"

metadata
object
required

Custom key-value pairs for additional payment profile session information.

Example:
{
"source": "mobile_app",
"campaign": "summer_2024"
}
createdAt
string<date-time>
required

When this payment profile session was created.

Example:

"2024-09-29T10:00:00Z"

updatedAt
string<date-time>
required

When this payment profile session was last updated.

Example:

"2024-09-29T10:30:00Z"