First call
Get from API key to first order flow without guessing the contract.
The example below uses placeholder IDs and requires a confirmed sandbox merchant and test payment credentials. It has been checked against OpenAPI, not executed. Start with the branded API base, authenticate with an API key, then validate the first order and webhook loop before promoting traffic.
Create a dedicated production or test API key and keep it outside source control.
Send a first authenticated request to confirm the branded API base and key both work.
Create the first order or checkout flow using the same merchant-native contract.
Configure a webhook destination, send a test event, and verify signature handling before promoting traffic.
First authenticated call
Use the branded public API base and the X-API-Key header to verify the integration environment before building deeper order flows.
curl https://api.pivota.cc/agent/v1/merchants \
-H "X-API-Key: YOUR_API_KEY"The response lists the merchants integrated through the Pivota merchant portal that your key can order from, and each merchant_id is what the order call below takes. Add ?scope=mine to list only merchants you have already ordered from; that list starts empty. To find a product_id, search with GET /agent/v1/products/search?query=.... Each result carries its merchant_id; only results whose merchant_id appears in this list can be ordered through the order call. Results from merchants outside the portal carry merchant_id "external_seed" and the merchant's external_domain; the order call refuses them.
Most merchants are not integrated through the Pivota merchant portal. List them with ?scope=protocol and buy from them through the UCP door, not the order call: see protocol merchants below.
First order path
Move from authenticated requests into merchant-native execution by creating the first order flow on the same API contract. Then inspect order events and webhook delivery.
Every order needs a live quote first. Request one, then pass its quote_id to order creation; without it the order call returns 400 QUOTE_REQUIRED_BEFORE_PURCHASE.
curl -X POST "https://api.pivota.cc/agent/v1/quotes/preview" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"merchant_id": "merch_...",
"items": [{ "product_id": "prod_...", "variant_id": "var_...", "quantity": 1 }]
}'curl -X POST "https://api.pivota.cc/agent/v1/orders/create" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"quote_id": "q_...",
"merchant_id": "merch_...",
"customer_email": "buyer@example.com",
"shipping_address": {
"name": "Test Buyer",
"address_line1": "123 Test Street",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"items": [
{
"product_id": "prod_...",
"variant_id": "var_...",
"quantity": 1,
"unit_price": "19.99",
"subtotal": "19.99"
}
]
}'On this REST lane the API key is enough to quote and order. X-Agent-User-JWT is optional: send it to tie the order to your signed-in end user. Checkout on the MCP and UCP doors is different: it requires a verified buyer. The OpenAPI lists the headers each endpoint accepts.
Protocol merchants
Most merchants a buyer can purchase from through Pivota are reached through a checkout protocol rather than a merchant-portal integration. List them with:
curl "https://api.pivota.cc/agent/v1/merchants?scope=protocol&market=US" \
-H "X-API-Key: YOUR_API_KEY"Each row is one merchant_domain in one market; there is no merchant_id, and these merchants are not ordered through the order call above. market filters the list (for example market=US). The list is rebuilt from recent checkout checks, so a merchant drops off when its last check goes stale. Each row's checkout_routes says how a purchase there completes:
storefront_checkout: on the UCP door (https://commerce.mcp.pivota.cc/ucp/mcp), find the product withsearch_catalog, then callcreate_checkout. Checkout needs a verified buyer (OAuth sign-in, or a user token from an issuer registered in the agent portal); without one it returnsUSER_AUTH_REQUIRED. It returns a UCP checkout with statusrequires_escalationand acontinue_urlon the merchant's own storefront, where the buyer completes the purchase. Pivota collects no payment on this route. When the merchant's own checkout can price the cart, the totals are the merchant's and the link opens a prefilled cart; otherwise the totals are the last observed catalog price and the link opens the product page. Either way the buyer sees the final price on the merchant's site. Send the buyer's market incheckout.context.address_country(ISO 3166-1 alpha-2): without it, or when the merchant's checkout no longer takes buyers in that market, the checkout is refused withmerchant_not_purchasable. It is also refused when the merchant reports the item out of stock.agentic_checkout: a payment partner places the order and the buyer approves the card on the partner's page. It is listed only where that lane is live for the merchant and market, and, while the lane is in a limited pilot, only for keys in that pilot.
merchant_checkout_accepts_cards reports whether the merchant's own checkout offered an on-site card when it was last checked. It describes the merchant, not a Pivota payment capability.
The list is rebuilt in the background. A 503 means it is being rebuilt and carries a Retry-After header; wait that many seconds and retry. A 500 is also safe to retry after a short backoff. Neither means the merchants are gone.
Next: map request families, then wire auth and webhooks.
Once the first call works, move into the callable surface inventory, then finalize webhook delivery and signature verification.