curl --request PATCH \
--url https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"billingDetails": {
"address": {
"line1": "456 Oak Ave",
"city": "Chicago",
"postalCode": "60601",
"country": "US",
"stateOrRegion": "IL"
}
}
}
'import requests
url = "https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}"
payload = { "billingDetails": { "address": {
"line1": "456 Oak Ave",
"city": "Chicago",
"postalCode": "60601",
"country": "US",
"stateOrRegion": "IL"
} } }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
billingDetails: {
address: {
line1: '456 Oak Ave',
city: 'Chicago',
postalCode: '60601',
country: 'US',
stateOrRegion: 'IL'
}
}
})
};
fetch('https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}', 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://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'billingDetails' => [
'address' => [
'line1' => '456 Oak Ave',
'city' => 'Chicago',
'postalCode' => '60601',
'country' => 'US',
'stateOrRegion' => 'IL'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}"
payload := strings.NewReader("{\n \"billingDetails\": {\n \"address\": {\n \"line1\": \"456 Oak Ave\",\n \"city\": \"Chicago\",\n \"postalCode\": \"60601\",\n \"country\": \"US\",\n \"stateOrRegion\": \"IL\"\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.patch("https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"billingDetails\": {\n \"address\": {\n \"line1\": \"456 Oak Ave\",\n \"city\": \"Chicago\",\n \"postalCode\": \"60601\",\n \"country\": \"US\",\n \"stateOrRegion\": \"IL\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"billingDetails\": {\n \"address\": {\n \"line1\": \"456 Oak Ave\",\n \"city\": \"Chicago\",\n \"postalCode\": \"60601\",\n \"country\": \"US\",\n \"stateOrRegion\": \"IL\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyUpdate a Payment Method
Update the billing details or default status of an existing payment method
curl --request PATCH \
--url https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"billingDetails": {
"address": {
"line1": "456 Oak Ave",
"city": "Chicago",
"postalCode": "60601",
"country": "US",
"stateOrRegion": "IL"
}
}
}
'import requests
url = "https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}"
payload = { "billingDetails": { "address": {
"line1": "456 Oak Ave",
"city": "Chicago",
"postalCode": "60601",
"country": "US",
"stateOrRegion": "IL"
} } }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
billingDetails: {
address: {
line1: '456 Oak Ave',
city: 'Chicago',
postalCode: '60601',
country: 'US',
stateOrRegion: 'IL'
}
}
})
};
fetch('https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}', 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://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'billingDetails' => [
'address' => [
'line1' => '456 Oak Ave',
'city' => 'Chicago',
'postalCode' => '60601',
'country' => 'US',
'stateOrRegion' => 'IL'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}"
payload := strings.NewReader("{\n \"billingDetails\": {\n \"address\": {\n \"line1\": \"456 Oak Ave\",\n \"city\": \"Chicago\",\n \"postalCode\": \"60601\",\n \"country\": \"US\",\n \"stateOrRegion\": \"IL\"\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.patch("https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"billingDetails\": {\n \"address\": {\n \"line1\": \"456 Oak Ave\",\n \"city\": \"Chicago\",\n \"postalCode\": \"60601\",\n \"country\": \"US\",\n \"stateOrRegion\": \"IL\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/unstable/payment-methods/{paymentMethodId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"billingDetails\": {\n \"address\": {\n \"line1\": \"456 Oak Ave\",\n \"city\": \"Chicago\",\n \"postalCode\": \"60601\",\n \"country\": \"US\",\n \"stateOrRegion\": \"IL\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodydefault and billingDetails can be changed.
Returns
Returns the updated PaymentMethod object.Authorizations
Path Parameters
PaymentMethod identifier.
Query Parameters
Identifies the target user. Format: <type>:<value> (e.g., email:alice@example.com, userId:abc123). Required with server API key auth; ignored with JWT.
Body
At least one of default or billingDetails must be provided. Payout method type and account numbers cannot be changed after creation.
Set to true to make this the user's default payment method. Automatically unsets the previous default.
Updated billing information. Must include at least one of name, phone, or address. Only provided fields are updated; omitted fields remain unchanged.
Show child attributes
Show child attributes
Response
Updated PaymentMethod object.
A saved bank account payout method. Sensitive fields (full account numbers and IBANs) are never included in responses.
Unique identifier (UUID v4), assigned by the server on creation.
Whether this is the user's default payment method. Only one per user can be the default; setting a new default automatically unsets the previous one.
Human-readable label derived by the server (e.g., "Chime ••6259", "SEPA Account ••6789"). Not settable by the client.
Payout method type. Determines the country-specific bankAccount fields that are present.
bank-account-us, bank-account-mx-clabe, bank-account-co, bank-account-sepa-iban Bank account details. Present when type is a bank type. Full account numbers and IBANs are never included.
Show child attributes
Show child attributes
Read-only. ISO 8601 timestamp of the most recent successful offramp payout funded by this bank account. Absent if none.
Was this page helpful?

