comecerodocs

Retrieve cart options

GET
/carts/{cart_id}/options

Returns what the shopper can choose and must provide to pay for the cart: payment methods (with what the browser needs to set each up), card types, shipping quotes and the required customer fields. Read it again after the items, currency or customer change. You can also get it inside the cart with expand=options; the old options=true parameter is accepted but does nothing. Any token type may call it; a limited token only for a bound cart.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

cart_id*string

The id of the cart.

Query Parameters

expand?string

Comma-separated child objects to return in full instead of as a URL, for example customer,payments. Use dot notation for nested objects (items.product), up to four levels deep. A single object takes up to 12 paths; a list takes up to 2, applied to every item. Extra paths are dropped without an error. See Expanding objects.

show?string

Comma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

hide?string

Comma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse

Response Body

The cart options.

application/json
  1. response

What the shopper can choose and must provide to pay for this cart: payment methods, card types, shipping quotes and the customer fields needed. It changes with the items, the currency and the customer's location.

cart_id*string

The cart the options are for.

account_id*string

The account the cart belongs to.

test*boolean

True for a test cart.

payment_methods*array<>

The payment method types that can pay for this cart, with their browser setup.

card_types*array<string>

The card brands the card gateways take in the cart currency, for example Visa.

shipping_quotes*array<>

The shipping methods the shopper can pick, priced for this cart. Empty when nothing ships.

customer_required_fields*array<string>

The customer fields that must be set before a payment can be made, in dot notation, for example billing_address.postal_code. They depend on your settings, the items (physical items need an address) and the customer's country.

customer_optional_fields*array<string>

The customer fields you may also collect.

allowed_customer_countries*array<string>

The ISO 3166-1 alpha-2 countries the shopper may be in or ship to.

require_cardholder_name*boolean

True when a card payment must include the cardholder name.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/carts/string/options'
Example Response
{  "cart_id": "0091307952465CafhFSTa1",  "account_id": "AB1234",  "test": true,  "payment_methods": [    {      "payment_method_type": "credit_card",      "surcharge": 0,      "currency": "USD",      "paypal_fraudnet_source_id": null,      "stripe_publishable_key": null,      "stripe_account_id": null,      "finix_card_form": null    },    {      "payment_method_type": "paypal",      "surcharge": 0,      "currency": "USD"    }  ],  "card_types": [    "Visa",    "MasterCard",    "American Express"  ],  "shipping_quotes": [    {      "shipping_method_id": "standard-us",      "method_id": "standard-us",      "description": "Standard Shipping",      "details": "3 to 5 business days",      "price": 5,      "price_original": 5,      "price_pre_tax": 5,      "price_pre_tax_original": 5,      "discount": 0,      "tax": 0,      "tax_original": 0,      "total": 5,      "tax_rate": 0,      "currency": "USD"    }  ],  "customer_required_fields": [    "name",    "email",    "billing_address.country",    "billing_address.postal_code"  ],  "customer_optional_fields": [    "phone",    "company_name"  ],  "allowed_customer_countries": [    "US",    "CA"  ],  "require_cardholder_name": false}