Create customer payment method
Saves a payment method on the authenticated customer’s account. Requires
type, country_code, and a payment_method payload; set
default_payment_method: true to make it the default. Requires a customer
bearer token. Returns 422 on validation or tokenization failure and 401
when unauthenticated.
curl --request POST \
--url https://api.fluid.app/api/checkout/v2026-04/customers/me/payment_methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "credit_card",
"country_code": "US",
"payment_method": {
"token": "<string>",
"token_provider": "<string>",
"cvv_token": "<string>",
"exp_month": 12,
"exp_year": 2028,
"card_holder": "<string>",
"payment_account_id": "<unknown>",
"bin": "424242",
"last_four": "4242",
"card_network": "visa"
},
"default_payment_method": true,
"browser_info": {
"color_depth": 24,
"screen_height": 1080,
"screen_width": 1920,
"time_zone": -300,
"java_enabled": true,
"java_script_enabled": true,
"language": "en-US",
"user_agent": "<string>",
"accept_header": "*/*"
},
"payment_account": "<string>",
"set_customer_payment_method": true
}
'import requests
url = "https://api.fluid.app/api/checkout/v2026-04/customers/me/payment_methods"
payload = {
"type": "credit_card",
"country_code": "US",
"payment_method": {
"token": "<string>",
"token_provider": "<string>",
"cvv_token": "<string>",
"exp_month": 12,
"exp_year": 2028,
"card_holder": "<string>",
"payment_account_id": "<unknown>",
"bin": "424242",
"last_four": "4242",
"card_network": "visa"
},
"default_payment_method": True,
"browser_info": {
"color_depth": 24,
"screen_height": 1080,
"screen_width": 1920,
"time_zone": -300,
"java_enabled": True,
"java_script_enabled": True,
"language": "en-US",
"user_agent": "<string>",
"accept_header": "*/*"
},
"payment_account": "<string>",
"set_customer_payment_method": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'credit_card',
country_code: 'US',
payment_method: {
token: '<string>',
token_provider: '<string>',
cvv_token: '<string>',
exp_month: 12,
exp_year: 2028,
card_holder: '<string>',
payment_account_id: '<unknown>',
bin: '424242',
last_four: '4242',
card_network: 'visa'
},
default_payment_method: true,
browser_info: {
color_depth: 24,
screen_height: 1080,
screen_width: 1920,
time_zone: -300,
java_enabled: true,
java_script_enabled: true,
language: 'en-US',
user_agent: '<string>',
accept_header: '*/*'
},
payment_account: '<string>',
set_customer_payment_method: true
})
};
fetch('https://api.fluid.app/api/checkout/v2026-04/customers/me/payment_methods', 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/checkout/v2026-04/customers/me/payment_methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'credit_card',
'country_code' => 'US',
'payment_method' => [
'token' => '<string>',
'token_provider' => '<string>',
'cvv_token' => '<string>',
'exp_month' => 12,
'exp_year' => 2028,
'card_holder' => '<string>',
'payment_account_id' => '<unknown>',
'bin' => '424242',
'last_four' => '4242',
'card_network' => 'visa'
],
'default_payment_method' => true,
'browser_info' => [
'color_depth' => 24,
'screen_height' => 1080,
'screen_width' => 1920,
'time_zone' => -300,
'java_enabled' => true,
'java_script_enabled' => true,
'language' => 'en-US',
'user_agent' => '<string>',
'accept_header' => '*/*'
],
'payment_account' => '<string>',
'set_customer_payment_method' => 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/checkout/v2026-04/customers/me/payment_methods"
payload := strings.NewReader("{\n \"type\": \"credit_card\",\n \"country_code\": \"US\",\n \"payment_method\": {\n \"token\": \"<string>\",\n \"token_provider\": \"<string>\",\n \"cvv_token\": \"<string>\",\n \"exp_month\": 12,\n \"exp_year\": 2028,\n \"card_holder\": \"<string>\",\n \"payment_account_id\": \"<unknown>\",\n \"bin\": \"424242\",\n \"last_four\": \"4242\",\n \"card_network\": \"visa\"\n },\n \"default_payment_method\": true,\n \"browser_info\": {\n \"color_depth\": 24,\n \"screen_height\": 1080,\n \"screen_width\": 1920,\n \"time_zone\": -300,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"en-US\",\n \"user_agent\": \"<string>\",\n \"accept_header\": \"*/*\"\n },\n \"payment_account\": \"<string>\",\n \"set_customer_payment_method\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.fluid.app/api/checkout/v2026-04/customers/me/payment_methods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"credit_card\",\n \"country_code\": \"US\",\n \"payment_method\": {\n \"token\": \"<string>\",\n \"token_provider\": \"<string>\",\n \"cvv_token\": \"<string>\",\n \"exp_month\": 12,\n \"exp_year\": 2028,\n \"card_holder\": \"<string>\",\n \"payment_account_id\": \"<unknown>\",\n \"bin\": \"424242\",\n \"last_four\": \"4242\",\n \"card_network\": \"visa\"\n },\n \"default_payment_method\": true,\n \"browser_info\": {\n \"color_depth\": 24,\n \"screen_height\": 1080,\n \"screen_width\": 1920,\n \"time_zone\": -300,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"en-US\",\n \"user_agent\": \"<string>\",\n \"accept_header\": \"*/*\"\n },\n \"payment_account\": \"<string>\",\n \"set_customer_payment_method\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/checkout/v2026-04/customers/me/payment_methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"credit_card\",\n \"country_code\": \"US\",\n \"payment_method\": {\n \"token\": \"<string>\",\n \"token_provider\": \"<string>\",\n \"cvv_token\": \"<string>\",\n \"exp_month\": 12,\n \"exp_year\": 2028,\n \"card_holder\": \"<string>\",\n \"payment_account_id\": \"<unknown>\",\n \"bin\": \"424242\",\n \"last_four\": \"4242\",\n \"card_network\": \"visa\"\n },\n \"default_payment_method\": true,\n \"browser_info\": {\n \"color_depth\": 24,\n \"screen_height\": 1080,\n \"screen_width\": 1920,\n \"time_zone\": -300,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"en-US\",\n \"user_agent\": \"<string>\",\n \"accept_header\": \"*/*\"\n },\n \"payment_account\": \"<string>\",\n \"set_customer_payment_method\": true\n}"
response = http.request(request)
puts response.read_body{
"card": {
"active": true,
"card_network": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"customer_id": 123,
"cvv_token": "<string>",
"default": true,
"email": "<string>",
"fingerprint": "<string>",
"first_six_digits": "<string>",
"fluid": true,
"fluid_pay_account_id": 123,
"full_name": "<string>",
"last_four_digits": "<string>",
"member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"month": 123,
"number": "<string>",
"test": true,
"token": "<string>",
"token_provider": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": 123,
"uuid_v7": "<string>",
"year": 123,
"address_id": 123,
"billing_address": {
"name": "<string>",
"address1": "<string>",
"address2": "<string>",
"address3": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"subdivision_code": "<string>"
}
},
"fluid_pay_account": {
"default_payment_method_id": 123,
"id": 123
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"payment_method": {
"au_status": "<string>",
"billing_address": {
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country_code": "<string>",
"name": "<string>",
"postal_code": "<string>",
"state": "<string>",
"zip": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"default": true,
"details": {
"card_brand": "<string>",
"card_network": "<string>",
"exp_month": "<string>",
"exp_year": "<string>",
"id": 123,
"last4_digits": "<string>",
"last_four": "<string>",
"logo_url": "<string>",
"requires_3ds": true,
"type": "<string>",
"vgs_card_id": "<string>"
},
"id": 123,
"payment_title": "<string>",
"payment_type": "<string>",
"source": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"was_created": true,
"customer": {
"default_payment_method_id": 123,
"id": 123
}
}{
"message": "<string>"
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer token authentication
Body
Payment method type
"credit_card"
ISO country code for the checkout country
"US"
Show child attributes
Show child attributes
Whether to set this as the default payment method
Show child attributes
Show child attributes
Flat browser device fingerprint for 3DS authentication, as produced by the checkout client's getBrowserInfo() (fluid-pay-core browserInfoSchema).
Show child attributes
Show child attributes
Payment account UUID override
When true, binds the payment method to the customer rather than the FluidPay account
curl --request POST \
--url https://api.fluid.app/api/checkout/v2026-04/customers/me/payment_methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "credit_card",
"country_code": "US",
"payment_method": {
"token": "<string>",
"token_provider": "<string>",
"cvv_token": "<string>",
"exp_month": 12,
"exp_year": 2028,
"card_holder": "<string>",
"payment_account_id": "<unknown>",
"bin": "424242",
"last_four": "4242",
"card_network": "visa"
},
"default_payment_method": true,
"browser_info": {
"color_depth": 24,
"screen_height": 1080,
"screen_width": 1920,
"time_zone": -300,
"java_enabled": true,
"java_script_enabled": true,
"language": "en-US",
"user_agent": "<string>",
"accept_header": "*/*"
},
"payment_account": "<string>",
"set_customer_payment_method": true
}
'import requests
url = "https://api.fluid.app/api/checkout/v2026-04/customers/me/payment_methods"
payload = {
"type": "credit_card",
"country_code": "US",
"payment_method": {
"token": "<string>",
"token_provider": "<string>",
"cvv_token": "<string>",
"exp_month": 12,
"exp_year": 2028,
"card_holder": "<string>",
"payment_account_id": "<unknown>",
"bin": "424242",
"last_four": "4242",
"card_network": "visa"
},
"default_payment_method": True,
"browser_info": {
"color_depth": 24,
"screen_height": 1080,
"screen_width": 1920,
"time_zone": -300,
"java_enabled": True,
"java_script_enabled": True,
"language": "en-US",
"user_agent": "<string>",
"accept_header": "*/*"
},
"payment_account": "<string>",
"set_customer_payment_method": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'credit_card',
country_code: 'US',
payment_method: {
token: '<string>',
token_provider: '<string>',
cvv_token: '<string>',
exp_month: 12,
exp_year: 2028,
card_holder: '<string>',
payment_account_id: '<unknown>',
bin: '424242',
last_four: '4242',
card_network: 'visa'
},
default_payment_method: true,
browser_info: {
color_depth: 24,
screen_height: 1080,
screen_width: 1920,
time_zone: -300,
java_enabled: true,
java_script_enabled: true,
language: 'en-US',
user_agent: '<string>',
accept_header: '*/*'
},
payment_account: '<string>',
set_customer_payment_method: true
})
};
fetch('https://api.fluid.app/api/checkout/v2026-04/customers/me/payment_methods', 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/checkout/v2026-04/customers/me/payment_methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'credit_card',
'country_code' => 'US',
'payment_method' => [
'token' => '<string>',
'token_provider' => '<string>',
'cvv_token' => '<string>',
'exp_month' => 12,
'exp_year' => 2028,
'card_holder' => '<string>',
'payment_account_id' => '<unknown>',
'bin' => '424242',
'last_four' => '4242',
'card_network' => 'visa'
],
'default_payment_method' => true,
'browser_info' => [
'color_depth' => 24,
'screen_height' => 1080,
'screen_width' => 1920,
'time_zone' => -300,
'java_enabled' => true,
'java_script_enabled' => true,
'language' => 'en-US',
'user_agent' => '<string>',
'accept_header' => '*/*'
],
'payment_account' => '<string>',
'set_customer_payment_method' => 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/checkout/v2026-04/customers/me/payment_methods"
payload := strings.NewReader("{\n \"type\": \"credit_card\",\n \"country_code\": \"US\",\n \"payment_method\": {\n \"token\": \"<string>\",\n \"token_provider\": \"<string>\",\n \"cvv_token\": \"<string>\",\n \"exp_month\": 12,\n \"exp_year\": 2028,\n \"card_holder\": \"<string>\",\n \"payment_account_id\": \"<unknown>\",\n \"bin\": \"424242\",\n \"last_four\": \"4242\",\n \"card_network\": \"visa\"\n },\n \"default_payment_method\": true,\n \"browser_info\": {\n \"color_depth\": 24,\n \"screen_height\": 1080,\n \"screen_width\": 1920,\n \"time_zone\": -300,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"en-US\",\n \"user_agent\": \"<string>\",\n \"accept_header\": \"*/*\"\n },\n \"payment_account\": \"<string>\",\n \"set_customer_payment_method\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.fluid.app/api/checkout/v2026-04/customers/me/payment_methods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"credit_card\",\n \"country_code\": \"US\",\n \"payment_method\": {\n \"token\": \"<string>\",\n \"token_provider\": \"<string>\",\n \"cvv_token\": \"<string>\",\n \"exp_month\": 12,\n \"exp_year\": 2028,\n \"card_holder\": \"<string>\",\n \"payment_account_id\": \"<unknown>\",\n \"bin\": \"424242\",\n \"last_four\": \"4242\",\n \"card_network\": \"visa\"\n },\n \"default_payment_method\": true,\n \"browser_info\": {\n \"color_depth\": 24,\n \"screen_height\": 1080,\n \"screen_width\": 1920,\n \"time_zone\": -300,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"en-US\",\n \"user_agent\": \"<string>\",\n \"accept_header\": \"*/*\"\n },\n \"payment_account\": \"<string>\",\n \"set_customer_payment_method\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/checkout/v2026-04/customers/me/payment_methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"credit_card\",\n \"country_code\": \"US\",\n \"payment_method\": {\n \"token\": \"<string>\",\n \"token_provider\": \"<string>\",\n \"cvv_token\": \"<string>\",\n \"exp_month\": 12,\n \"exp_year\": 2028,\n \"card_holder\": \"<string>\",\n \"payment_account_id\": \"<unknown>\",\n \"bin\": \"424242\",\n \"last_four\": \"4242\",\n \"card_network\": \"visa\"\n },\n \"default_payment_method\": true,\n \"browser_info\": {\n \"color_depth\": 24,\n \"screen_height\": 1080,\n \"screen_width\": 1920,\n \"time_zone\": -300,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"en-US\",\n \"user_agent\": \"<string>\",\n \"accept_header\": \"*/*\"\n },\n \"payment_account\": \"<string>\",\n \"set_customer_payment_method\": true\n}"
response = http.request(request)
puts response.read_body{
"card": {
"active": true,
"card_network": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"customer_id": 123,
"cvv_token": "<string>",
"default": true,
"email": "<string>",
"fingerprint": "<string>",
"first_six_digits": "<string>",
"fluid": true,
"fluid_pay_account_id": 123,
"full_name": "<string>",
"last_four_digits": "<string>",
"member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"month": 123,
"number": "<string>",
"test": true,
"token": "<string>",
"token_provider": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": 123,
"uuid_v7": "<string>",
"year": 123,
"address_id": 123,
"billing_address": {
"name": "<string>",
"address1": "<string>",
"address2": "<string>",
"address3": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"subdivision_code": "<string>"
}
},
"fluid_pay_account": {
"default_payment_method_id": 123,
"id": 123
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"payment_method": {
"au_status": "<string>",
"billing_address": {
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country_code": "<string>",
"name": "<string>",
"postal_code": "<string>",
"state": "<string>",
"zip": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"default": true,
"details": {
"card_brand": "<string>",
"card_network": "<string>",
"exp_month": "<string>",
"exp_year": "<string>",
"id": 123,
"last4_digits": "<string>",
"last_four": "<string>",
"logo_url": "<string>",
"requires_3ds": true,
"type": "<string>",
"vgs_card_id": "<string>"
},
"id": 123,
"payment_title": "<string>",
"payment_type": "<string>",
"source": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"was_created": true,
"customer": {
"default_payment_method_id": 123,
"id": 123
}
}{
"message": "<string>"
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}