Create payment record using payment account uuid and cart info
Attaches a payment method to a cart and records a successful create_payment_source payment against the given payment account, moving the cart to its payment-method step. Identify the cart with cart_token; the payment account (its pa_ uuid in the path) must belong to the cart’s company. No Bearer token is needed: the cart token scopes the call. Returns 404 when the cart or payment account cannot be found.
curl --request POST \
--url https://api.fluid.app/api/v202506/payments/{payment_account_id} \
--header 'Content-Type: application/json' \
--data '
{
"cart_token": "ct_7RkPz3WfLq9TnX2bVh5cJd",
"payment_method": {
"integration_class": "CreditCard",
"source": "card"
}
}
'import requests
url = "https://api.fluid.app/api/v202506/payments/{payment_account_id}"
payload = {
"cart_token": "ct_7RkPz3WfLq9TnX2bVh5cJd",
"payment_method": {
"integration_class": "CreditCard",
"source": "card"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
cart_token: 'ct_7RkPz3WfLq9TnX2bVh5cJd',
payment_method: {integration_class: 'CreditCard', source: 'card'}
})
};
fetch('https://api.fluid.app/api/v202506/payments/{payment_account_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/v202506/payments/{payment_account_id}",
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([
'cart_token' => 'ct_7RkPz3WfLq9TnX2bVh5cJd',
'payment_method' => [
'integration_class' => 'CreditCard',
'source' => 'card'
]
]),
CURLOPT_HTTPHEADER => [
"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/v202506/payments/{payment_account_id}"
payload := strings.NewReader("{\n \"cart_token\": \"ct_7RkPz3WfLq9TnX2bVh5cJd\",\n \"payment_method\": {\n \"integration_class\": \"CreditCard\",\n \"source\": \"card\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v202506/payments/{payment_account_id}")
.header("Content-Type", "application/json")
.body("{\n \"cart_token\": \"ct_7RkPz3WfLq9TnX2bVh5cJd\",\n \"payment_method\": {\n \"integration_class\": \"CreditCard\",\n \"source\": \"card\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v202506/payments/{payment_account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"cart_token\": \"ct_7RkPz3WfLq9TnX2bVh5cJd\",\n \"payment_method\": {\n \"integration_class\": \"CreditCard\",\n \"source\": \"card\"\n }\n}"
response = http.request(request)
puts response.read_body{
"payment": {
"id": 5520930,
"uuid": "fpi_8vn4qe1xk6tz2hc9mw5rbd",
"action": "create_payment_source",
"status": "success",
"payment_account": 272,
"cart_token": "ct_7RkPz3WfLq9TnX2bVh5cJd"
},
"meta": {
"request_id": "c0a8012e-7f3b-4d6a-9e21-5b8d4f2a6c17",
"timestamp": "2026-09-30T14:15:22Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}Headers
Optional non-authorizing checkout journey UUID. Use with X-Checkout-Attempt-Id. Capture is disabled by default; malformed or incomplete pairs are ignored without changing checkout behavior. Cart scope comes from the authenticated cart token, never these headers.
Optional customer-submission UUID paired with X-Checkout-Journey-Id. Retain it for transport retries and originating continuations; use a new UUID for a new customer submission. It does not replace payment or order idempotency keys. Invalid pairs are ignored rather than rejecting payment.
Path Parameters
UUID of the existing payment account
curl --request POST \
--url https://api.fluid.app/api/v202506/payments/{payment_account_id} \
--header 'Content-Type: application/json' \
--data '
{
"cart_token": "ct_7RkPz3WfLq9TnX2bVh5cJd",
"payment_method": {
"integration_class": "CreditCard",
"source": "card"
}
}
'import requests
url = "https://api.fluid.app/api/v202506/payments/{payment_account_id}"
payload = {
"cart_token": "ct_7RkPz3WfLq9TnX2bVh5cJd",
"payment_method": {
"integration_class": "CreditCard",
"source": "card"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
cart_token: 'ct_7RkPz3WfLq9TnX2bVh5cJd',
payment_method: {integration_class: 'CreditCard', source: 'card'}
})
};
fetch('https://api.fluid.app/api/v202506/payments/{payment_account_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/v202506/payments/{payment_account_id}",
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([
'cart_token' => 'ct_7RkPz3WfLq9TnX2bVh5cJd',
'payment_method' => [
'integration_class' => 'CreditCard',
'source' => 'card'
]
]),
CURLOPT_HTTPHEADER => [
"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/v202506/payments/{payment_account_id}"
payload := strings.NewReader("{\n \"cart_token\": \"ct_7RkPz3WfLq9TnX2bVh5cJd\",\n \"payment_method\": {\n \"integration_class\": \"CreditCard\",\n \"source\": \"card\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v202506/payments/{payment_account_id}")
.header("Content-Type", "application/json")
.body("{\n \"cart_token\": \"ct_7RkPz3WfLq9TnX2bVh5cJd\",\n \"payment_method\": {\n \"integration_class\": \"CreditCard\",\n \"source\": \"card\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v202506/payments/{payment_account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"cart_token\": \"ct_7RkPz3WfLq9TnX2bVh5cJd\",\n \"payment_method\": {\n \"integration_class\": \"CreditCard\",\n \"source\": \"card\"\n }\n}"
response = http.request(request)
puts response.read_body{
"payment": {
"id": 5520930,
"uuid": "fpi_8vn4qe1xk6tz2hc9mw5rbd",
"action": "create_payment_source",
"status": "success",
"payment_account": 272,
"cart_token": "ct_7RkPz3WfLq9TnX2bVh5cJd"
},
"meta": {
"request_id": "c0a8012e-7f3b-4d6a-9e21-5b8d4f2a6c17",
"timestamp": "2026-09-30T14:15:22Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}