Update Program Gateway
curl --request PUT \
--url https://sandbox-api.marqeta.com/v3/credit/programgateways/{token} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"mtls": false,
"name": "<string>",
"token": "<string>",
"active": true,
"custom_header": {},
"timeout_millis": 123,
"basic_auth_password": "<string>",
"basic_auth_username": "<string>"
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}"
payload = {
"url": "<string>",
"mtls": False,
"name": "<string>",
"token": "<string>",
"active": True,
"custom_header": {},
"timeout_millis": 123,
"basic_auth_password": "<string>",
"basic_auth_username": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
mtls: false,
name: '<string>',
token: '<string>',
active: true,
custom_header: {},
timeout_millis: 123,
basic_auth_password: '<string>',
basic_auth_username: '<string>'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'mtls' => false,
'name' => '<string>',
'token' => '<string>',
'active' => true,
'custom_header' => [
],
'timeout_millis' => 123,
'basic_auth_password' => '<string>',
'basic_auth_username' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"mtls\": false,\n \"name\": \"<string>\",\n \"token\": \"<string>\",\n \"active\": true,\n \"custom_header\": {},\n \"timeout_millis\": 123,\n \"basic_auth_password\": \"<string>\",\n \"basic_auth_username\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"mtls\": false,\n \"name\": \"<string>\",\n \"token\": \"<string>\",\n \"active\": true,\n \"custom_header\": {},\n \"timeout_millis\": 123,\n \"basic_auth_password\": \"<string>\",\n \"basic_auth_username\": \"<string>\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"mtls\": false,\n \"name\": \"<string>\",\n \"token\": \"<string>\",\n \"active\": true,\n \"custom_header\": {},\n \"timeout_millis\": 123,\n \"basic_auth_password\": \"<string>\",\n \"basic_auth_username\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>",
"mtls": true,
"name": "<string>",
"token": "<string>",
"active": true,
"created_time": "2023-11-07T05:31:56Z",
"updated_time": "2023-11-07T05:31:56Z",
"custom_header": {},
"timeout_millis": 123,
"basic_auth_password": "<string>",
"basic_auth_username": "<string>"
}{
"code": 123,
"message": "<string>"
}Program Gateways
Update Program Gateway
Update an existing Credit Program Gateway.
PUT
/
credit
/
programgateways
/
{token}
Update Program Gateway
curl --request PUT \
--url https://sandbox-api.marqeta.com/v3/credit/programgateways/{token} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"mtls": false,
"name": "<string>",
"token": "<string>",
"active": true,
"custom_header": {},
"timeout_millis": 123,
"basic_auth_password": "<string>",
"basic_auth_username": "<string>"
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}"
payload = {
"url": "<string>",
"mtls": False,
"name": "<string>",
"token": "<string>",
"active": True,
"custom_header": {},
"timeout_millis": 123,
"basic_auth_password": "<string>",
"basic_auth_username": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
mtls: false,
name: '<string>',
token: '<string>',
active: true,
custom_header: {},
timeout_millis: 123,
basic_auth_password: '<string>',
basic_auth_username: '<string>'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'mtls' => false,
'name' => '<string>',
'token' => '<string>',
'active' => true,
'custom_header' => [
],
'timeout_millis' => 123,
'basic_auth_password' => '<string>',
'basic_auth_username' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"mtls\": false,\n \"name\": \"<string>\",\n \"token\": \"<string>\",\n \"active\": true,\n \"custom_header\": {},\n \"timeout_millis\": 123,\n \"basic_auth_password\": \"<string>\",\n \"basic_auth_username\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://sandbox-api.marqeta.com/v3/credit/programgateways/{token}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"mtls\": false,\n \"name\": \"<string>\",\n \"token\": \"<string>\",\n \"active\": true,\n \"custom_header\": {},\n \"timeout_millis\": 123,\n \"basic_auth_password\": \"<string>\",\n \"basic_auth_username\": \"<string>\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"mtls\": false,\n \"name\": \"<string>\",\n \"token\": \"<string>\",\n \"active\": true,\n \"custom_header\": {},\n \"timeout_millis\": 123,\n \"basic_auth_password\": \"<string>\",\n \"basic_auth_username\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>",
"mtls": true,
"name": "<string>",
"token": "<string>",
"active": true,
"created_time": "2023-11-07T05:31:56Z",
"updated_time": "2023-11-07T05:31:56Z",
"custom_header": {},
"timeout_millis": 123,
"basic_auth_password": "<string>",
"basic_auth_username": "<string>"
}{
"code": 123,
"message": "<string>"
}PUT///
Update an existing Credit Program Gateway.
You may want to update a Program Gateway if you are switching it to active or inactive, updating the URL, username, or password, and more.
URL path parameters
| Fields | Description |
|---|---|
| token string Required | Unique identifier of the Program Gateway to update. Allowable Values: Existing Program Gateway token |
Request body
| Fields | Description |
|---|---|
| token string Optional | Unique identifier of the Program Gateway. Allowable Values: 36 char max |
| name string Optional | Name of the Program Gateway. Allowable Values: 255 char max |
| url string Optional | URL of the Program Gateway endpoint hosted in your environment and configured to receive authorization requests made by the Marqeta platform. Must be HTTPS. Allowable Values: 250 char max |
| basic_auth_username string Optional | Basic Authentication username for authenticating your environment. Allowable Values: 50 char max |
| basic_auth_password string Optional | Basic Authentication password for authenticating your environment. Allowable Values: 20–50 chars |
| timeout_millis integer Optional | Total timeout for Program Gateway calls, in milliseconds. Allowable Values: 2000 max |
| active boolean Optional | Indicates whether the Program Gateway is active. Allowable Values: true, false |
| mtls boolean Optional | Indicates whether the Program Gateway uses mutual Transport Layer Security (mTLS). Allowable Values: true, false |
| custom_header object Optional | Additional custom information included in the HTTP header. For example, this might contain security information, along with Basic Authentication, when making a Program Gateway request. Custom headers also appear in the associated webhook’s notifications. Allowable Values: Up to three name-value pairs: 500 char max per name, 500 char max per value Example: json JSON lines wrap { "custom_header": { "customer_header_key_1": "customer_header_value_1", "customer_header_key_2": "customer_header_value_2", "customer_header_key_3": "customer_header_value_3" } } |
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 |
Authorizations
Body
application/json
Contains information relevant to updating a Program Gateway.
Response
Response containing updated Program Gateway.
Contains information relevant to a Credit Program Gateway.
Was this page helpful?