Cards and payment methods
Update customer payment method (PUT)
The PUT form of PATCH /api/customers/{customer_id}/payment_methods/{id}. Both methods reach one
update action, take the same body and return the same responses. Read
that operation for the details.
PUT
/
api
/
customers
/
{customer_id}
/
payment_methods
/
{id}
Update customer payment method (PUT)
curl --request PUT \
--url https://api.fluid.app/api/customers/{customer_id}/payment_methods/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"set_as_default": true
}
'import requests
url = "https://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}"
payload = { "set_as_default": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({set_as_default: true})
};
fetch('https://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}', 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://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}",
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([
'set_as_default' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}"
payload := strings.NewReader("{\n \"set_as_default\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"set_as_default\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"set_as_default\": true\n}"
response = http.request(request)
puts response.read_body{
"customer": {
"id": 48213,
"default_payment_method_id": 251044
},
"payment_method": {
"id": 251044,
"source": "card",
"created_at": "2026-09-12T18:40:03Z",
"updated_at": "2026-09-21T14:30:55Z",
"payment_title": "Credit Card",
"au_status": null,
"default": true,
"payment_type": "Credit Card",
"details": {
"id": 251044,
"type": "CreditCard",
"card_network": "mastercard",
"card_brand": "Mastercard",
"last4_digits": "4444",
"last_four": "4444",
"exp_month": 6,
"exp_year": 2028,
"logo_url": "https://assets.fluid.app/images/payment_icons/master.svg",
"vgs_card_id": null,
"requires_3ds": false
}
},
"meta": {
"request_id": "9a4c7e13-2f8b-4d65-b1e0-5c3a8f7d2e14",
"timestamp": "2026-09-21T14:30:55Z"
}
}{
"message": "<string>"
}Authorizations
Bearer token authentication
Body
application/json
⌘I
Update customer payment method (PUT)
curl --request PUT \
--url https://api.fluid.app/api/customers/{customer_id}/payment_methods/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"set_as_default": true
}
'import requests
url = "https://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}"
payload = { "set_as_default": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({set_as_default: true})
};
fetch('https://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}', 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://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}",
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([
'set_as_default' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}"
payload := strings.NewReader("{\n \"set_as_default\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"set_as_default\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/customers/{customer_id}/payment_methods/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"set_as_default\": true\n}"
response = http.request(request)
puts response.read_body{
"customer": {
"id": 48213,
"default_payment_method_id": 251044
},
"payment_method": {
"id": 251044,
"source": "card",
"created_at": "2026-09-12T18:40:03Z",
"updated_at": "2026-09-21T14:30:55Z",
"payment_title": "Credit Card",
"au_status": null,
"default": true,
"payment_type": "Credit Card",
"details": {
"id": 251044,
"type": "CreditCard",
"card_network": "mastercard",
"card_brand": "Mastercard",
"last4_digits": "4444",
"last_four": "4444",
"exp_month": 6,
"exp_year": 2028,
"logo_url": "https://assets.fluid.app/images/payment_icons/master.svg",
"vgs_card_id": null,
"requires_3ds": false
}
},
"meta": {
"request_id": "9a4c7e13-2f8b-4d65-b1e0-5c3a8f7d2e14",
"timestamp": "2026-09-21T14:30:55Z"
}
}{
"message": "<string>"
}