JavaScript
import CheckoutIntents from 'checkout-intents';
const client = new CheckoutIntents({
apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
});
const order = await client.orders.updateBuyer('id', { buyer: {} });
console.log(order.id);import os
from checkout_intents import CheckoutIntents
client = CheckoutIntents(
api_key=os.environ.get("CHECKOUT_INTENTS_API_KEY"), # This is the default and can be omitted
)
order = client.orders.update_buyer(
id="id",
buyer={},
)
print(order.id)package com.rye.example;
import com.rye.client.CheckoutIntentsClient;
import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
import com.rye.models.orders.Order;
import com.rye.models.orders.OrderUpdateBuyerParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();
OrderUpdateBuyerParams params = OrderUpdateBuyerParams.builder()
.id("id")
.buyer(OrderUpdateBuyerParams.Buyer.builder().build())
.build();
Order order = client.orders().updateBuyer(params);
}
}curl https://staging.api.rye.com/api/v1/orders/$ID/buyer \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY" \
-d '{
"buyer": {}
}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.rye.com/api/v1/orders/{id}/buyer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'buyer' => [
'firstName' => 'John',
'lastName' => 'Doe',
'email' => 'john.doe@example.com',
'phone' => '1234567890',
'address1' => '123 Main St',
'address2' => 'Apt 1',
'city' => 'New York',
'province' => 'NY',
'country' => 'US',
'postalCode' => '10001'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://staging.api.rye.com/api/v1/orders/{id}/buyer"
payload := strings.NewReader("{\n \"buyer\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"1234567890\",\n \"address1\": \"123 Main St\",\n \"address2\": \"Apt 1\",\n \"city\": \"New York\",\n \"province\": \"NY\",\n \"country\": \"US\",\n \"postalCode\": \"10001\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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))
}require 'uri'
require 'net/http'
url = URI("https://staging.api.rye.com/api/v1/orders/{id}/buyer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"buyer\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"1234567890\",\n \"address1\": \"123 Main St\",\n \"address2\": \"Apt 1\",\n \"city\": \"New York\",\n \"province\": \"NY\",\n \"country\": \"US\",\n \"postalCode\": \"10001\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"checkoutIntentId": "ci_aaa8af5c5aae4c0e8ef0172c26c65c13",
"buyer": {
"postalCode": "10001",
"country": "US",
"province": "NY",
"city": "New York",
"address1": "123 Main St",
"phone": "1234567890",
"email": "john.doe@example.com",
"lastName": "Doe",
"firstName": "John",
"address2": "Apt 1"
},
"createdAt": "2026-03-25T00:00:00Z",
"updatedAt": "2026-03-27T00:00:00Z",
"cancellation": {
"reason": {
"code": "requested_by_customer",
"message": "<string>"
},
"marketplaceOrderId": "<string>",
"checkoutIntentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"state": "requested"
},
"referenceId": "order-1234"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"status": 123,
"fields": {},
"stack": "<string>"
}Orders
Update order buyer
Update buyer fields for an order and update its Shopify shipping address.
PUT
/
api
/
v1
/
orders
/
{id}
/
buyer
JavaScript
import CheckoutIntents from 'checkout-intents';
const client = new CheckoutIntents({
apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
});
const order = await client.orders.updateBuyer('id', { buyer: {} });
console.log(order.id);import os
from checkout_intents import CheckoutIntents
client = CheckoutIntents(
api_key=os.environ.get("CHECKOUT_INTENTS_API_KEY"), # This is the default and can be omitted
)
order = client.orders.update_buyer(
id="id",
buyer={},
)
print(order.id)package com.rye.example;
import com.rye.client.CheckoutIntentsClient;
import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
import com.rye.models.orders.Order;
import com.rye.models.orders.OrderUpdateBuyerParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();
OrderUpdateBuyerParams params = OrderUpdateBuyerParams.builder()
.id("id")
.buyer(OrderUpdateBuyerParams.Buyer.builder().build())
.build();
Order order = client.orders().updateBuyer(params);
}
}curl https://staging.api.rye.com/api/v1/orders/$ID/buyer \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY" \
-d '{
"buyer": {}
}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.rye.com/api/v1/orders/{id}/buyer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'buyer' => [
'firstName' => 'John',
'lastName' => 'Doe',
'email' => 'john.doe@example.com',
'phone' => '1234567890',
'address1' => '123 Main St',
'address2' => 'Apt 1',
'city' => 'New York',
'province' => 'NY',
'country' => 'US',
'postalCode' => '10001'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://staging.api.rye.com/api/v1/orders/{id}/buyer"
payload := strings.NewReader("{\n \"buyer\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"1234567890\",\n \"address1\": \"123 Main St\",\n \"address2\": \"Apt 1\",\n \"city\": \"New York\",\n \"province\": \"NY\",\n \"country\": \"US\",\n \"postalCode\": \"10001\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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))
}require 'uri'
require 'net/http'
url = URI("https://staging.api.rye.com/api/v1/orders/{id}/buyer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"buyer\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"1234567890\",\n \"address1\": \"123 Main St\",\n \"address2\": \"Apt 1\",\n \"city\": \"New York\",\n \"province\": \"NY\",\n \"country\": \"US\",\n \"postalCode\": \"10001\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"checkoutIntentId": "ci_aaa8af5c5aae4c0e8ef0172c26c65c13",
"buyer": {
"postalCode": "10001",
"country": "US",
"province": "NY",
"city": "New York",
"address1": "123 Main St",
"phone": "1234567890",
"email": "john.doe@example.com",
"lastName": "Doe",
"firstName": "John",
"address2": "Apt 1"
},
"createdAt": "2026-03-25T00:00:00Z",
"updatedAt": "2026-03-27T00:00:00Z",
"cancellation": {
"reason": {
"code": "requested_by_customer",
"message": "<string>"
},
"marketplaceOrderId": "<string>",
"checkoutIntentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"state": "requested"
},
"referenceId": "order-1234"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"status": 123,
"fields": {},
"stack": "<string>"
}Body
application/json
Buyer fields to merge over the order's current buyer
Response
OK
Represents a completed order. Orders are created after a checkout intent reaches
the completed state.
Was this page helpful?

