paypal
Authorize a PayPal order
Authorizes a previously created PayPal order (identified by order_id in
the body) and returns its authorization_id. Cart-token authenticated.
Returns 400 when the order id is invalid, 404 when the cart is not
found, 410 when the cart has already been processed, and 422 for invalid
parameters or a zero-amount cart.
POST
/
api
/
payments
/
v2026-04
/
carts
/
{cart_token}
/
paypal
/
authorize
Authorize a PayPal order
curl --request POST \
--url https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/authorize \
--header 'Content-Type: application/json' \
--data '
{
"order_id": "5O190127TN364715T"
}
'import requests
url = "https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/authorize"
payload = { "order_id": "5O190127TN364715T" }
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({order_id: '5O190127TN364715T'})
};
fetch('https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/authorize', 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/authorize",
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([
'order_id' => '5O190127TN364715T'
]),
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/authorize"
payload := strings.NewReader("{\n \"order_id\": \"5O190127TN364715T\"\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/payments/v2026-04/carts/{cart_token}/paypal/authorize")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": \"5O190127TN364715T\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/authorize")
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 \"order_id\": \"5O190127TN364715T\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"order_id": "5O190127TN364715T",
"authorization_id": "3AY52541TU409455V",
"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"
}
}{
"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.
Body
application/json
PayPal order id returned from order creation.
Response
Order authorized
Success body for PayPal order authorization.
⌘I
Authorize a PayPal order
curl --request POST \
--url https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/authorize \
--header 'Content-Type: application/json' \
--data '
{
"order_id": "5O190127TN364715T"
}
'import requests
url = "https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/authorize"
payload = { "order_id": "5O190127TN364715T" }
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({order_id: '5O190127TN364715T'})
};
fetch('https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/authorize', 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/authorize",
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([
'order_id' => '5O190127TN364715T'
]),
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/authorize"
payload := strings.NewReader("{\n \"order_id\": \"5O190127TN364715T\"\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/payments/v2026-04/carts/{cart_token}/paypal/authorize")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": \"5O190127TN364715T\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/paypal/authorize")
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 \"order_id\": \"5O190127TN364715T\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"order_id": "5O190127TN364715T",
"authorization_id": "3AY52541TU409455V",
"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"
}
}{
"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"
}
}