Cards and payment methods
Create customer payment method
Creates a payment method for a customer. Requires admin authentication.
POST
/
api
/
customers
/
{customer_id}
/
payment_methods
Create customer payment method
curl --request POST \
--url https://api.fluid.app/api/customers/{customer_id}/payment_methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "credit_card",
"country_code": "US",
"payment_method": {
"token": "tok_live_7mYq2WcVzR8pKd3nT6hLxA",
"token_provider": "vgs",
"exp_month": 11,
"exp_year": 2029
},
"default_payment_method": true
}
'import requests
url = "https://api.fluid.app/api/customers/{customer_id}/payment_methods"
payload = {
"type": "credit_card",
"country_code": "US",
"payment_method": {
"token": "tok_live_7mYq2WcVzR8pKd3nT6hLxA",
"token_provider": "vgs",
"exp_month": 11,
"exp_year": 2029
},
"default_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: 'tok_live_7mYq2WcVzR8pKd3nT6hLxA',
token_provider: 'vgs',
exp_month: 11,
exp_year: 2029
},
default_payment_method: true
})
};
fetch('https://api.fluid.app/api/customers/{customer_id}/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/customers/{customer_id}/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' => 'tok_live_7mYq2WcVzR8pKd3nT6hLxA',
'token_provider' => 'vgs',
'exp_month' => 11,
'exp_year' => 2029
],
'default_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/customers/{customer_id}/payment_methods"
payload := strings.NewReader("{\n \"type\": \"credit_card\",\n \"country_code\": \"US\",\n \"payment_method\": {\n \"token\": \"tok_live_7mYq2WcVzR8pKd3nT6hLxA\",\n \"token_provider\": \"vgs\",\n \"exp_month\": 11,\n \"exp_year\": 2029\n },\n \"default_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/customers/{customer_id}/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\": \"tok_live_7mYq2WcVzR8pKd3nT6hLxA\",\n \"token_provider\": \"vgs\",\n \"exp_month\": 11,\n \"exp_year\": 2029\n },\n \"default_payment_method\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/customers/{customer_id}/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\": \"tok_live_7mYq2WcVzR8pKd3nT6hLxA\",\n \"token_provider\": \"vgs\",\n \"exp_month\": 11,\n \"exp_year\": 2029\n },\n \"default_payment_method\": true\n}"
response = http.request(request)
puts response.read_body{
"card": {
"active": true,
"address_id": null,
"billing_address": null,
"card_network": "visa",
"created_at": "2026-09-21T14:12:08Z",
"customer_id": null,
"cvv_token": null,
"default": false,
"email": null,
"first_six_digits": null,
"fluid": false,
"fluid_pay_account_id": null,
"full_name": "Holly Flax",
"last_four_digits": "4242",
"member_id": null,
"month": 11,
"number": "XXXX-XXXX-XXXX-4242",
"test": false,
"token": "tok_live_7mYq2WcVzR8pKd3nT6hLxA",
"token_provider": "vgs",
"updated_at": "2026-09-21T14:12:08Z",
"user_id": null,
"uuid_v7": "01923f6a-8c2e-7b41-9d53-4e7a1c0f2b98",
"year": 2029
},
"customer": {
"id": 48213,
"default_payment_method_id": 251102
},
"meta": {
"request_id": "3b9e1f72-5c84-4d0a-a6e3-8f2d7c1b4e59",
"timestamp": "2026-09-21T14:12:09Z"
},
"payment_method": {
"id": 251102,
"source": "card",
"created_at": "2026-09-21T14:12:08Z",
"updated_at": "2026-09-21T14:12:08Z",
"payment_title": "Credit Card",
"au_status": null,
"default": true,
"payment_type": "Credit Card",
"details": {
"id": 251102,
"type": "CreditCard",
"card_network": "visa",
"card_brand": "Visa",
"last4_digits": "4242",
"last_four": "4242",
"exp_month": 11,
"exp_year": 2029,
"logo_url": "https://assets.fluid.app/images/payment_icons/visa.svg",
"vgs_card_id": null,
"requires_3ds": false
},
"billing_address": {
"address1": null,
"address2": null,
"city": null,
"state": null,
"postal_code": null,
"zip": null,
"country_code": "US",
"name": null
}
},
"was_created": true
}{
"message": "<string>"
}Body
application/json
⌘I
Create customer payment method
curl --request POST \
--url https://api.fluid.app/api/customers/{customer_id}/payment_methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "credit_card",
"country_code": "US",
"payment_method": {
"token": "tok_live_7mYq2WcVzR8pKd3nT6hLxA",
"token_provider": "vgs",
"exp_month": 11,
"exp_year": 2029
},
"default_payment_method": true
}
'import requests
url = "https://api.fluid.app/api/customers/{customer_id}/payment_methods"
payload = {
"type": "credit_card",
"country_code": "US",
"payment_method": {
"token": "tok_live_7mYq2WcVzR8pKd3nT6hLxA",
"token_provider": "vgs",
"exp_month": 11,
"exp_year": 2029
},
"default_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: 'tok_live_7mYq2WcVzR8pKd3nT6hLxA',
token_provider: 'vgs',
exp_month: 11,
exp_year: 2029
},
default_payment_method: true
})
};
fetch('https://api.fluid.app/api/customers/{customer_id}/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/customers/{customer_id}/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' => 'tok_live_7mYq2WcVzR8pKd3nT6hLxA',
'token_provider' => 'vgs',
'exp_month' => 11,
'exp_year' => 2029
],
'default_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/customers/{customer_id}/payment_methods"
payload := strings.NewReader("{\n \"type\": \"credit_card\",\n \"country_code\": \"US\",\n \"payment_method\": {\n \"token\": \"tok_live_7mYq2WcVzR8pKd3nT6hLxA\",\n \"token_provider\": \"vgs\",\n \"exp_month\": 11,\n \"exp_year\": 2029\n },\n \"default_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/customers/{customer_id}/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\": \"tok_live_7mYq2WcVzR8pKd3nT6hLxA\",\n \"token_provider\": \"vgs\",\n \"exp_month\": 11,\n \"exp_year\": 2029\n },\n \"default_payment_method\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/customers/{customer_id}/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\": \"tok_live_7mYq2WcVzR8pKd3nT6hLxA\",\n \"token_provider\": \"vgs\",\n \"exp_month\": 11,\n \"exp_year\": 2029\n },\n \"default_payment_method\": true\n}"
response = http.request(request)
puts response.read_body{
"card": {
"active": true,
"address_id": null,
"billing_address": null,
"card_network": "visa",
"created_at": "2026-09-21T14:12:08Z",
"customer_id": null,
"cvv_token": null,
"default": false,
"email": null,
"first_six_digits": null,
"fluid": false,
"fluid_pay_account_id": null,
"full_name": "Holly Flax",
"last_four_digits": "4242",
"member_id": null,
"month": 11,
"number": "XXXX-XXXX-XXXX-4242",
"test": false,
"token": "tok_live_7mYq2WcVzR8pKd3nT6hLxA",
"token_provider": "vgs",
"updated_at": "2026-09-21T14:12:08Z",
"user_id": null,
"uuid_v7": "01923f6a-8c2e-7b41-9d53-4e7a1c0f2b98",
"year": 2029
},
"customer": {
"id": 48213,
"default_payment_method_id": 251102
},
"meta": {
"request_id": "3b9e1f72-5c84-4d0a-a6e3-8f2d7c1b4e59",
"timestamp": "2026-09-21T14:12:09Z"
},
"payment_method": {
"id": 251102,
"source": "card",
"created_at": "2026-09-21T14:12:08Z",
"updated_at": "2026-09-21T14:12:08Z",
"payment_title": "Credit Card",
"au_status": null,
"default": true,
"payment_type": "Credit Card",
"details": {
"id": 251102,
"type": "CreditCard",
"card_network": "visa",
"card_brand": "Visa",
"last4_digits": "4242",
"last_four": "4242",
"exp_month": 11,
"exp_year": 2029,
"logo_url": "https://assets.fluid.app/images/payment_icons/visa.svg",
"vgs_card_id": null,
"requires_3ds": false
},
"billing_address": {
"address1": null,
"address2": null,
"city": null,
"state": null,
"postal_code": null,
"zip": null,
"country_code": "US",
"name": null
}
},
"was_created": true
}{
"message": "<string>"
}