Cart
Create, list, search, update, and delete carts — and the products inside them. Used by the hosted Simple Payments checkout and the JavaScript cart service.
The Cart API has two halves — carts themselves, and the products associated with them. A cart is a reusable checkout configuration: a named set of products, a layout, optional success/cancel URLs, and payment method settings. Products are the line items that can be added to carts.
Carts
Get a single cart
GET
/merchant/{merchant_id}/cart/{cart_id}
{
"status": "success",
"msg": "success",
"data": {
"id": "d0doh5fsvrvasm390u6g",
"merchant_id": "testmerchant12345678",
"card_processor_id": "",
"ach_processor_id": "",
"name": "initiatives",
"description": "sample cart description",
"type": "normal",
"custom_fields_group": "default",
"products": [
{
"id": "d0doh5fsvrvasm390u30",
"public_hash": "fe254495-bca4-4d2b-9960-da166ae5f36f",
"merchant_id": "testmerchant12345678",
"sku": "dbb3fd7a-31f0-4431-8a55-1a1935844c64",
"name": "bleeding-edge",
"img": "https://picsum.photos/250/159",
"price": 233,
"local_tax": 225,
"national_tax": 210,
"fixed_amount": true,
"fixed_qty": false,
"description": "sample product description",
"created_at": "2025-05-07T16:21:42Z",
"updated_at": "2025-05-07T16:21:42Z"
}
],
"show_available_products": true,
"require_shipping_details": false,
"email_receipt": false,
"payments": ["card", "ach"],
"success_url": "https://yoursite.com/thanks",
"cancel_url": "https://yoursite.com/checkout",
"settings": {
"product_subtitle_verbiage": "Products",
"save_customer_vault": "none"
}
}
}
Search carts
POST
/merchant/{merchant_id}/cart/search
The body uses the gateway's query-object syntax — each filterable field maps to an object with operator (=, !=, and for numeric fields < or >) and value.
| Field | Type | Description |
|---|---|---|
id | QuerySearchString | Filter by cart ID. |
name | QuerySearchString | Filter by cart name. |
product | QuerySearchString | Filter by the name of a product inside the cart. |
created_at / updated_at / deleted_at | QueryDateRange | Date-range filters. |
limit | integer | Maximum records, 0–100. |
offset | integer | Records to skip. |
Get all carts
GET
/merchant/{merchant_id}/cart
Create a cart
POST
/merchant/{merchant_id}/cart
| Field | Type | Required | Description |
|---|---|---|---|
type | string | required | normal or donation. |
name | string | required | 1–100 characters. |
description | string | optional | Free-text description. |
custom_fields_group | string | optional | Fewer than 255 characters. References a custom-field group name. |
card_processor_id | string | optional | Override default card processor. Matches ^[0-9a-v]{20}$. |
ach_processor_id | string | optional | Override default ACH processor. Matches ^[0-9a-v]{20}$. |
success_url | string | optional | Redirect URL on successful checkout. |
cancel_url | string | optional | Redirect URL on cancellation. |
show_available_products | boolean | optional | Show the full catalog of products on the hosted page. |
require_shipping_details | boolean | optional | Force collection of a shipping address. |
email_receipt | boolean | optional | Automatically email a receipt on success. |
Update a cart
POST
/merchant/{merchant_id}/cart/{cart_id}
{
"name": "initiatives",
"description": "sample description",
"type": "normal",
"custom_fields_group": "default",
"payments": ["card", "ach"],
"products": ["product1", "product2", "product3", "product4"],
"show_available_products": false,
"require_shipping_details": false,
"email_receipt": false,
"success_url": "",
"cancel_url": "",
"settings": null
}
Delete a cart
DELETE
/merchant/{merchant_id}/cart/{cart_id}
Products
Get a single product
GET
/api/merchant/{merchant_id}/product/{product_id}
{
"status": "success",
"msg": "success",
"data": {
"id": "d0ecs87svrvfjfvijd70",
"public_hash": "f164740d-1005-4f9a-b958-111e4704840f",
"merchant_id": "testmerchant12345678",
"sku": "acdfd73e-9fae-45ab-8c5e-c6a6920aff30",
"name": "applications",
"img": "https://picsum.photos/244/223",
"price": 708,
"local_tax": 388,
"national_tax": 444,
"fixed_amount": true,
"fixed_qty": false,
"description": "sample description"
}
}
Search products
POST
/api/merchant/{merchant_id}/product/search
| Field | Type | Description |
|---|---|---|
id | QuerySearchString | Filter by product ID. |
name | QuerySearchString | Filter by product name. |
price | QuerySearchInt | Filter by price (supports <, > in addition to =, !=). |
created_at / updated_at / deleted_at | QueryDateRange | Date-range filters. |
limit | integer | 0–100. |
offset | integer | Records to skip. |
Get all products
GET
/api/merchant/{merchant_id}/product
Create a product
POST
/api/merchant/{merchant_id}/product
| Field | Type | Required | Description |
|---|---|---|---|
sku | string | required | Product SKU. Regex [0-9a-z]{0-20}. |
name | string | required | Display name. Regex [0-9a-z -]{0-100}. |
img | string | optional | Product image, base64-encoded. |
price | unsigned int | required | Unit price in cents. |
fixed_amount | boolean | required | When true, the amount is locked. When false, the shopper can enter their own. |
fixed_qty | boolean | required | When true, the quantity is locked. |
description | string | required | Up to 254 characters. |
Update a product
POST
/api/merchant/{merchant_id}/product/{product_id}
Delete a product
DELETE
/api/merchant/{merchant_id}/product/{product_id}