Update payment source
curl --request PUT \
--url https://sandbox-api.marqeta.com/v3/credit/paymentsources/{token} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "ACTIVE"
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/paymentsources/{token}"
payload = { "status": "ACTIVE" }
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({status: 'ACTIVE'})
};
fetch('https://sandbox-api.marqeta.com/v3/credit/paymentsources/{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/paymentsources/{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([
'status' => 'ACTIVE'
]),
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/paymentsources/{token}"
payload := strings.NewReader("{\n \"status\": \"ACTIVE\"\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/paymentsources/{token}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"ACTIVE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/paymentsources/{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 \"status\": \"ACTIVE\"\n}"
response = http.request(request)
puts response.read_body{
"name": "John Jacob",
"owner": "INDIVIDUAL",
"token": "my_payment_source_token_6789",
"status": "ACTIVE",
"user_token": "user5678",
"source_type": "CHECKING",
"created_time": "2025-05-19T19:19:24Z",
"account_token": "my_account_token_12",
"account_suffix": "5678",
"routing_number": "payment_source_routing_number",
"last_modified_time": "2025-05-19T19:19:24Z",
"verification_status": "ACH_VERIFIED"
}{
"code": 123,
"message": "<string>"
}Payment Sources
Update payment source
Update details of a payment source.
PUT
/
credit
/
paymentsources
/
{token}
Update payment source
curl --request PUT \
--url https://sandbox-api.marqeta.com/v3/credit/paymentsources/{token} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "ACTIVE"
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/paymentsources/{token}"
payload = { "status": "ACTIVE" }
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({status: 'ACTIVE'})
};
fetch('https://sandbox-api.marqeta.com/v3/credit/paymentsources/{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/paymentsources/{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([
'status' => 'ACTIVE'
]),
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/paymentsources/{token}"
payload := strings.NewReader("{\n \"status\": \"ACTIVE\"\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/paymentsources/{token}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"ACTIVE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/paymentsources/{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 \"status\": \"ACTIVE\"\n}"
response = http.request(request)
puts response.read_body{
"name": "John Jacob",
"owner": "INDIVIDUAL",
"token": "my_payment_source_token_6789",
"status": "ACTIVE",
"user_token": "user5678",
"source_type": "CHECKING",
"created_time": "2025-05-19T19:19:24Z",
"account_token": "my_account_token_12",
"account_suffix": "5678",
"routing_number": "payment_source_routing_number",
"last_modified_time": "2025-05-19T19:19:24Z",
"verification_status": "ACH_VERIFIED"
}{
"code": 123,
"message": "<string>"
}PUT///
Update details of a payment source.
URL path parameters
| Fields | Description |
|---|---|
| token string Required | Unique identifier of the payment source to retrieve. Send a GET request to /credit/paymentsources to retrieve existing payment source tokens.Allowable Values: Existing payment source token |
Request body
| Fields | Description |
|---|---|
| status string Required | Current status of the payment source. Allowable Values: ACTIVE, PENDING, INACTIVE |
Sample request body
JSON
{
"status": "ACTIVE"
}
Response body
| Fields | Description |
|---|---|
| token string Conditionally returned | Unique identifier of the payment source. Allowable Values: 36 char max |
| account_token string Conditionally returned | Unique identifier of the credit account receiving the payment. Allowable Values: 36 char max Existing account token |
| user_token string Conditionally returned | Unique identifier of the user making the payment. Allowable Values: Existing user token |
| business_token string Conditionally returned | Unique identifier of the business making the payment. Allowable Values: Existing business token |
| created_time datetime Conditionally returned | Date and time when the payment source was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| last_modified_time datetime Conditionally returned | Date and time when the payment source was last updated on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| source_type string Conditionally returned | Type of payment source. Allowable Values: CHECKING, SAVINGS, SECURE_ACCOUNT_FUND, OTHER, EXTERNAL |
| name string Conditionally returned | Name of the individual or business who owns the payment source. Allowable Values: 255 char max |
| owner string Conditionally returned | Type of payment source owner. Allowable Values: INDIVIDUAL, BUSINESS |
| verification_status string Conditionally returned | Status of the verification for the payment source. Allowable Values: ACH_VERIFIED, PENDING |
| verification_notes string Conditionally returned | Additional information on the verification (for example, an external verification identifier that’s outside Marqeta’s credit platform). Allowable Values: 255 char max |
| account_suffix string Conditionally returned | Last four digits of the payment source account number. Allowable Values: 4 char max |
| routing_number string Conditionally returned | Routing number of the payment source. Allowable Values: 255 char max |
| bank_name string Conditionally returned | Name of the bank associated with the routing number. Allowable Values: 255 char max |
| status string Conditionally returned | Current status of the payment source. Allowable Values: ACTIVE, PENDING, INACTIVE |
Sample response body
JSON
{
"token": "my_payment_source_token_6789",
"account_token": "my_account_token_12",
"user_token": "user5678",
"created_time": "2025-05-19T19:19:24Z",
"last_modified_time": "2025-05-19T19:19:24Z",
"source_type": "CHECKING",
"name": "John Jacob",
"owner": "INDIVIDUAL",
"verification_status": "ACH_VERIFIED",
"account_suffix": "5678",
"routing_number": "payment_source_routing_number",
"status": "ACTIVE"
}
Authorizations
Path Parameters
Body
application/json
Response
Response containing updated payment source
Contains information about a payment source.
Was this page helpful?