Retrieve Program Gateway
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/programgateways/{token} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}', 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-api.marqeta.com/v3/credit/programgateways/{token}",
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: Basic <encoded-value>"
],
]);
$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-api.marqeta.com/v3/credit/programgateways/{token}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-api.marqeta.com/v3/credit/programgateways/{token}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"url": "https://my_secure_domain.com/my_gateway",
"name": "My Program Gateway Name",
"token": "my_pg_token_1234",
"active": false,
"created_time": "2024-11-30T20:00:51Z",
"timeout_millis": 2000,
"last_modified_time": "2024-11-30T23:39:10Z",
"basic_auth_password": "my_20-50_character_password",
"basic_auth_username": "my_username"
}{
"code": 123,
"message": "<string>"
}Program Gateways
Retrieve Program Gateway
Retrieve an existing Credit Program Gateway.
GET
/
credit
/
programgateways
/
{token}
Retrieve Program Gateway
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/programgateways/{token} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}', 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-api.marqeta.com/v3/credit/programgateways/{token}",
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: Basic <encoded-value>"
],
]);
$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-api.marqeta.com/v3/credit/programgateways/{token}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-api.marqeta.com/v3/credit/programgateways/{token}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"url": "https://my_secure_domain.com/my_gateway",
"name": "My Program Gateway Name",
"token": "my_pg_token_1234",
"active": false,
"created_time": "2024-11-30T20:00:51Z",
"timeout_millis": 2000,
"last_modified_time": "2024-11-30T23:39:10Z",
"basic_auth_password": "my_20-50_character_password",
"basic_auth_username": "my_username"
}{
"code": 123,
"message": "<string>"
}GET///
Retrieve an existing Credit Program Gateway.
URL path parameters
| Fields | Description |
|---|---|
| token string Required | Unique identifier of the Program Gateway to retrieve. Send a GET request to /credit/programgateways to retrieve existing Program Gateway tokens.Allowable Values: Existing Program Gateway token |
Response body
| Fields | Description |
|---|---|
| token string Conditionally returned | Unique identifier of the Program Gateway. Allowable Values: 36 char max |
| name string Conditionally returned | Name of the Program Gateway. Allowable Values: 255 char max |
| url string Conditionally returned | URL of the Program Gateway endpoint hosted in your environment and configured to receive authorization requests made by the Marqeta platform. Allowable Values: 250 char max |
| basic_auth_username string Conditionally returned | Basic Authentication username for authenticating your environment. Allowable Values: 50 char max |
| basic_auth_password string Conditionally returned | Basic Authentication password for authenticating your environment. Allowable Values: 20–50 chars |
| timeout_millis integer Conditionally returned | Total timeout for Program Gateway calls, in milliseconds. Allowable Values: 2000 max |
| active boolean Conditionally returned | Indicates whether the Program Gateway is active. Allowable Values: true, false |
| custom_header object Conditionally returned | Additional custom information included in the HTTP header. Allowable Values: Up to three name-value pairs: 500 char max per name, 500 char max per value |
| mtls boolean Conditionally returned | Indicates whether the Program Gateway uses mutual Transport Layer Security (mTLS). Allowable Values: true, false |
| created_time datetime Conditionally returned | Date and time when the Program Gateway was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| updated_time datetime Conditionally returned | Date and time when the Program Gateway was last updated on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
{
"name": "My Program Gateway Name",
"active": false,
"token": "my_pg_token_1234",
"url": "https://my_secure_domain.com/my_gateway",
"created_time": "2024-11-30T20:00:51Z",
"last_modified_time": "2024-11-30T23:39:10Z",
"basic_auth_username": "my_username",
"basic_auth_password": "my_20-50_character_password",
"timeout_millis": 2000
}
Authorizations
Path Parameters
Response
Response containing details for the requested Program Gateway.
Contains information relevant to a Credit Program Gateway.
Was this page helpful?