Skip to main content
The Purchase API is how agents on Agentcard buy things. An agent says what the user wants, Agentcard finds it at the merchant, shows the user an exact total, and places the order once they confirm. It works today at Amazon, Walmart, Target, DoorDash and the other merchants on the Purchase API page. If you are a merchant, this page lists what we need you to expose so we can add your store. You do not build against Agentcard. You give us a small read API for your catalog and a small write API for orders, and we do the integration on our side.

How to get listed

Email founders@agentcard.sh with:
  1. The base URL of your API and a link to its docs, or the endpoints below if you are building them for us.
  2. How to get us an API key, for staging first and production later. Do not paste keys in the email: a one-time secret link works, or invite founders@agentcard.sh to your developer dashboard.
  3. Which payment provider you charge through.
  4. A few items we can order in staging without real inventory or money moving.
We build the connector, place test orders against your staging environment with you, and list you in GET /buy/merchants once real orders go through cleanly. Nothing to deploy, no SDK to install, no Agentcard account needed.

What we need you to expose

Three groups: a catalog we can search, an orders endpoint we can quote and place against, and a way to pay. Field names below are a suggestion. If you already have an API that carries the same information under different names, send us that instead. The endpoint names and JSON examples below illustrate a proposed merchant API contract. We agree the final contract with you during integration. All money is an integer in the smallest unit of the currency, so 2250 is $22.50. Every id must be stable, so the same product returns the same id tomorrow.

1. Catalog

The agent needs to find what the user asked for and show them the price before anything is bought.
Search takes a free-text query and pages through results. Add whatever filters make sense for your catalog, such as category, city, from or to. A product: A variant:

Events and tickets

If you sell events, expose them as events rather than products, so the agent can search by city and date and the user can see when and where it is.
An event: A ticket type:
If you also sell merchandise, keep GET /products alongside GET /events.

2. Orders

The user confirms an exact total before we place anything. So we need to quote first, then place, then read back the result.

Quote

POST /orders/quote returns exact totals without committing anything. A preview: true flag on POST /orders works too. Request: Response:
The total has to be exact and repeatable. We show it to the user, they confirm that number, and you must charge only that approved total. If the total changes between quote and order, we have to go back to the user, so include shipping, service fees and tax here rather than at order time.

Place the order

POST /orders with an Idempotency-Key header. Request: The example below shows the shared order fields. We agree the payment fields with you during integration.
Response:
Two things we lean on:
  • Return the same order on retries. If we retry with the same Idempotency-Key, return the same order with its id, not an error. A retry after a dropped connection must never create a second order.
  • Specific failures. If something cannot be bought, say which item and why. A generic 500 makes us ask the user to try again when the answer is really “sold out”.
Error response:

Read the order

GET /orders/{id}. We poll this after placing to confirm the order went through, and to tell the user when something ships or is ready. Response:

Cancel

POST /orders/{id}/cancel. Optional. Cancels and refunds whatever your policy allows. If you cannot cancel through the API, tell us and we send users to your support flow instead. Request: no body. Response:

Webhooks

Optional. Share your existing webhook and signature documentation so we can plan how order updates reach Agentcard.
We agree the receiving URL, signature verification, timestamp tolerance and retry policy with you during integration.

3. Payment

We pay each order through your own payment provider, and you charge it like any other order. Tell us which provider you use and we handle the rest on our side. Providers we support today:
  • Stripe
  • Shopify Payments
  • Adyen
  • Braintree
  • Square
  • Recurly
  • Razorpay
If yours is not on the list, tell us anyway and we will let you know what it takes.

Checklist before you email us

  • Catalog search and product detail, with stable ids and prices in minor units.
  • A quote that returns the exact total including fees, tax and shipping, with a quote_id.
  • Order create checks quote_id and expected_total, and rejects with total_changed instead of charging a different amount.
  • Order create with Idempotency-Key, returning the order id on duplicates.
  • Order read, with status.
  • Order create charges exactly the quoted total through your payment provider.
Send the base URL, your API docs or the endpoints above, how to get a staging key, your payment provider, and a couple of test items to founders@agentcard.sh. A first test order is usually placed within a few days.