U

Up · Checkout

by Up

POSTBase

$0.5

per call · USD Coin on Base

Buy the "My Agent Bought Me This" embroidered hat — 0.5 USDC on Base

Endpoint

POST https://web-production-77376.up.railway.app/checkout

2

Calls / 30d

1

Unique payers / 30d

Aug 17

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://web-production-77376.up.railway.app/checkout", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "address": {
      "description": "Shipping address.",
      "properties": {
        "city": {
          "description": "City.",
          "type": "string"
        },
        "country": {
          "description": "ISO 2-letter country code, e.g. US, CA, GB.",
          "type": "string"
        },
        "line1": {
          "description": "Street address line 1.",
          "type": "string"
        },
        "line2": {
          "description": "Street address line 2 (optional).",
          "type": "string"
        },
        "postal_code": {
          "description": "ZIP or postal code.",
          "type": "string"
        },
        "state": {
          "description": "State or province.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "email": {
      "description": "Email address for the order confirmation receipt.",
      "type": "string"
    },
    "name": {
      "description": "Full name of the recipient for shipping.",
      "type": "string"
    },
    "sku": {
      "description": "Product SKU. Use \"hat-myagent-os\" for the embroidered hat.",
      "type": "string"
    }
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://web-production-77376.up.railway.app/checkout" \
  -H "Content-Type: application/json" \
  -d '{"address":{"description":"Shipping address.","properties":{"city":{"description":"City.","type":"string"},"country":{"description":"ISO 2-letter country code, e.g. US, CA, GB.","type":"string"},"line1":{"description":"Street address line 1.","type":"string"},"line2":{"description":"Street address line 2 (optional).","type":"string"},"postal_code":{"description":"ZIP or postal code.","type":"string"},"state":{"description":"State or province.","type":"string"}},"type":"object"},"email":{"description":"Email address for the order confirmation receipt.","type":"string"},"name":{"description":"Full name of the recipient for shipping.","type":"string"},"sku":{"description":"Product SKU. Use \"hat-myagent-os\" for the embroidered hat.","type":"string"}}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "message": "Payment settled on Base. Your hat is on the way.",
  "order_id": "ORD-abc123",
  "payment": "x402_usdc_base",
  "sku": "hat-myagent-os",
  "status": "placed"
}

Payment details

Pay to0x08e3edbf5fe9e8b2312838d6c563fc03b037700a
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Other and the homepage with a featured placement.

Get featured →

More from Up & similar services