paypal
Apply a PayPal shipping address change
Updates the cart’s shipping (and mirrored billing) address from the PayPal onShippingChange callback, recalculates the cart, and patches the PayPal order.
PATCH
/
api
/
payments
/
v2026-04
/
carts
/
{cart_token}
/
paypal
/
shipping
Apply a PayPal shipping address change
curl --request PATCH \
--url https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/shipping \
--header 'Content-Type: application/json' \
--data '
{
"order_id": "5O190127TN364715T",
"shipping_address": {
"city": "Austin",
"state": "TX",
"postal_code": "78701",
"country_code": "US"
}
}
'import requests
url = "https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/shipping"
payload = {
"order_id": "5O190127TN364715T",
"shipping_address": {
"city": "Austin",
"state": "TX",
"postal_code": "78701",
"country_code": "US"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
order_id: '5O190127TN364715T',
shipping_address: {city: 'Austin', state: 'TX', postal_code: '78701', country_code: 'US'}
})
};
fetch('https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/shipping', 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/payments/v2026-04/carts/{cart_token}/paypal/shipping",
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([
'order_id' => '5O190127TN364715T',
'shipping_address' => [
'city' => 'Austin',
'state' => 'TX',
'postal_code' => '78701',
'country_code' => 'US'
]
]),
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/payments/v2026-04/carts/{cart_token}/paypal/shipping"
payload := strings.NewReader("{\n \"order_id\": \"5O190127TN364715T\",\n \"shipping_address\": {\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"78701\",\n \"country_code\": \"US\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/shipping")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": \"5O190127TN364715T\",\n \"shipping_address\": {\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"78701\",\n \"country_code\": \"US\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/shipping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_id\": \"5O190127TN364715T\",\n \"shipping_address\": {\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"78701\",\n \"country_code\": \"US\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"order_id": "5O190127TN364715T",
"meta": {
"request_id": "018f2c1a-8b3a-7e6d-9f10-2a3b4c5d6e7f",
"timestamp": "2026-04-01T12:00:00Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"shop_url": "<string>",
"cart": {}
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Path Parameters
Opaque cart token returned by the create-cart response. It scopes the request to a single cart and is the credential for these endpoints — cart-token authentication carried in the path, with no bearer token or API key.
Response
Shipping change applied
Success body for the PayPal shipping address change callback.
⌘I
Apply a PayPal shipping address change
curl --request PATCH \
--url https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/shipping \
--header 'Content-Type: application/json' \
--data '
{
"order_id": "5O190127TN364715T",
"shipping_address": {
"city": "Austin",
"state": "TX",
"postal_code": "78701",
"country_code": "US"
}
}
'import requests
url = "https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/shipping"
payload = {
"order_id": "5O190127TN364715T",
"shipping_address": {
"city": "Austin",
"state": "TX",
"postal_code": "78701",
"country_code": "US"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
order_id: '5O190127TN364715T',
shipping_address: {city: 'Austin', state: 'TX', postal_code: '78701', country_code: 'US'}
})
};
fetch('https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/shipping', 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/payments/v2026-04/carts/{cart_token}/paypal/shipping",
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([
'order_id' => '5O190127TN364715T',
'shipping_address' => [
'city' => 'Austin',
'state' => 'TX',
'postal_code' => '78701',
'country_code' => 'US'
]
]),
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/payments/v2026-04/carts/{cart_token}/paypal/shipping"
payload := strings.NewReader("{\n \"order_id\": \"5O190127TN364715T\",\n \"shipping_address\": {\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"78701\",\n \"country_code\": \"US\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/shipping")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": \"5O190127TN364715T\",\n \"shipping_address\": {\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"78701\",\n \"country_code\": \"US\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/shipping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_id\": \"5O190127TN364715T\",\n \"shipping_address\": {\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"78701\",\n \"country_code\": \"US\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"order_id": "5O190127TN364715T",
"meta": {
"request_id": "018f2c1a-8b3a-7e6d-9f10-2a3b4c5d6e7f",
"timestamp": "2026-04-01T12:00:00Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"shop_url": "<string>",
"cart": {}
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}