Skip to main content
POST
/
execution
/
buy
/
v1
Execute a buy order
curl --request POST \
  --url https://api.collectpure.com/execution/buy/v1 \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "quoteId": "<string>",
  "expectedTotal": 4503599627370495,
  "paymentMethod": "<string>",
  "shipping": {
    "name": "<string>",
    "line1": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postalCode": "<string>",
    "country": "<string>",
    "line2": "<string>",
    "phone": "<string>"
  }
}
'
{
  "success": true,
  "data": {
    "status": "complete",
    "orderId": 123,
    "items": [
      {
        "lineItemId": "<string>",
        "productId": "<string>",
        "variantId": "<string>",
        "quantity": 123,
        "price": 123,
        "total": 123,
        "success": true
      }
    ],
    "checkout": {
      "id": "<string>",
      "currency": "<string>",
      "expiresAt": "<string>",
      "lineItems": [
        {
          "id": "<string>",
          "quantity": 123,
          "price": 123,
          "status": "<string>",
          "disabled": true,
          "error": "<string>",
          "product": {
            "sku": "<string>",
            "title": "<string>"
          },
          "variant": {
            "title": "<string>"
          }
        }
      ],
      "fees": [
        {
          "id": "<string>",
          "label": "<string>",
          "amount": 123,
          "rate": 123
        }
      ],
      "salesTax": 123,
      "subtotal": 123,
      "total": 123,
      "availableCount": 123,
      "unavailableCount": 123,
      "allowCardPayments": true,
      "allowAch": true
    }
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication

Body

application/json
quoteId
string
required

The quote ID from /execution/buy/quote/v1

expectedTotal
integer
required

The total from the quote response, in cents. The order is rejected if the current total exceeds this value.

Required range: 0 <= x <= 9007199254740991
paymentMethod
string
required

'wire_transfer' or a Stripe payment method ID (pm_... or ba_...)

shipping
object
required

Response

200 - application/json

Default Response

success
enum<boolean>
required
Available options:
true
data
object
required