Cart and checkout
Connect API · https://api.conciar.com/connect/v1
Carts and webshop orders are secret-key calls: run them on your server. Totals in cart responses are plain numbers; cart and order responses are the stored records with their relations, limited to the fields a storefront may see.
INFO
La référence de l’API est en anglais.
Create a cart
Limite de débit: 30/min per key
curl -X POST "https://api.conciar.com/connect/v1/store/cart/init" \
-H "Accept: application/json" \
-H "X-Api-Key: cnct_your_secret_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token"{
"data": {
"cart_token": "example_cart_token",
"cart": {
"cart_token": "example_cart_token",
"items": [],
"totals": {
"subtotal": 0,
"discount": 0,
"promotion_discount": 0,
"total": 0,
"…": "…"
},
"…": "…"
}
}
}Set cart lines and coupons
Declarative: quantities are set, not added, and the coupons you send replace the current ones (send none to clear). A line's price is fixed when it is first added.
Limite de débit: 120/min per key
Corps
cart_tokenstringobligatoireThe cart.
items[].product_idintegerobligatoireProduct id (required when items is sent).
items[].product_variant_idintegerVariant of that product (ignored when it belongs to another product).
items[].quantityintegerobligatoireMin 0; 0 removes the line (required when items is sent).
items[].purchase_typestringone_time (default) or subscription.
items[].metadataobjectYour own data for the line.
coupon_codesstring[]All coupons for the cart; an empty list clears them.
coupon_codestringOne coupon instead of coupon_codes (ignored when coupon_codes is sent).
organization_customer_idintegerLink the cart to a member.
Codes de statut
404Cart not found or no longer active.422Validation, an invalid or expired coupon, or more than one coupon on a channel without stacking.
curl -X POST "https://api.conciar.com/connect/v1/store/cart/sync" \
-H "Accept: application/json" \
-H "X-Api-Key: cnct_your_secret_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token" \
-H "Content-Type: application/json" \
-d '{
"cart_token": "example_cart_token",
"items": [
{
"product_id": 9001,
"quantity": 2
}
]
}'{
"cart": {
"cart_token": "example_cart_token",
"items": [
{
"product_id": 9001,
"quantity": 2,
"promotion_discount": 0,
"promotions": [],
"line_total": 49.9,
"…": "…"
}
],
"totals": {
"subtotal": 49.9,
"discount": 0,
"promotion_discount": 0,
"total": 49.9,
"currency_id": 1,
"coupons": [],
"promotions": [],
"free_shipping": null
},
"…": "…"
}
}Get a cart
Paramètres de chemin
cart_tokenstringobligatoireThe token from POST /store/cart/init.
Codes de statut
404Unknown, converted or expired cart.
curl "https://api.conciar.com/connect/v1/store/cart/example_cart_token" \
-H "Accept: application/json" \
-H "X-Api-Key: cnct_your_secret_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token"{
"cart": {
"cart_token": "example_cart_token",
"items": [
"…"
],
"totals": {
"…": "…"
},
"…": "…"
}
}Check a cart before checkout
Blocking issues per line (unavailable, not_in_channel, out_of_stock, insufficient_stock, variant_unavailable), price changes on live-pricing channels, and coupons that no longer apply.
Paramètres de chemin
cart_tokenstringobligatoireThe token from POST /store/cart/init.
Codes de statut
404Unknown, converted or expired cart.
Bon à savoir
- issues[]: {sku, name, type} (insufficient_stock adds available). warnings[]: {sku, name, original_price, new_price, currency}. coupon_warnings[]: {code, reason}.
curl "https://api.conciar.com/connect/v1/store/cart/example_cart_token/checkout-check" \
-H "Accept: application/json" \
-H "X-Api-Key: cnct_your_secret_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token"{
"can_proceed": true,
"issues": [],
"has_changes": false,
"warnings": [],
"coupon_warnings": []
}Shipping methods for a cart
Limite de débit: 120/min per key
Paramètres de chemin
cart_tokenstringobligatoireThe token from POST /store/cart/init.
Corps
country_codestringobligatoireISO-2.
postal_codestringMax 20.
province, city, districtstringMax 100 each.
Codes de statut
404Unknown, converted or expired cart.
Bon à savoir
- When nothing ships to the address the answer is still 200: shipping_methods is [] with a message.
curl -X POST "https://api.conciar.com/connect/v1/store/cart/example_cart_token/shipping-methods" \
-H "Accept: application/json" \
-H "X-Api-Key: cnct_your_secret_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token" \
-H "Content-Type: application/json" \
-d '{
"country_code": "NL",
"postal_code": "1000 AA"
}'{
"shipping_methods": [
{
"id": 3,
"type": "flat_rate",
"sort_order": 1,
"is_free": false,
"carrier": null,
"delivery_type": "delivery",
"resolved_info": {
"name": "Standard",
"description": null
},
"rate": {
"amount": 4.95,
"display_price": "€ 4,95",
"currency": {
"symbol": "EUR",
"…": "…"
}
}
}
]
}Payment methods for a cart
Methods that accept the cart amount. A cart with subscription lines only gets methods that support recurring payments.
Limite de débit: 120/min per key
Paramètres de chemin
cart_tokenstringobligatoireThe token from POST /store/cart/init.
Corps
shipping_method_idintegerChosen shipping method (an existing id).
country_idintegerCountry id from GET /countries.
Codes de statut
404Unknown, converted or expired cart.
Bon à savoir
- The amount checked is the cart in the X-Currency currency (else EUR). When no method fits the answer is still 200: payment_methods is [] with a message.
curl -X POST "https://api.conciar.com/connect/v1/store/cart/example_cart_token/payment-methods" \
-H "Accept: application/json" \
-H "X-Api-Key: cnct_your_secret_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token" \
-H "Content-Type: application/json" \
-d '{
"shipping_method_id": 3
}'{
"payment_methods": [
{
"id": 1,
"key": "ideal",
"type": "redirect",
"name": "iDEAL",
"logo": "…",
"status": "live",
"fixed_fee": null,
"fixed_percentage": 0,
"requires": [],
"payment_service_provider_id": 2,
"payment_service_provider_key": "example_psp",
"min_amount": null,
"max_amount": null
}
]
}List payment methods
The payment methods enabled for the organization, narrowed to the channel's own selection when it has one. type is wallet (Apple Pay, Google Pay) or redirect; requires lists the customer details a method needs (name, email, phone, billing_address, birth_date).
Paramètres de requête
amountnumber0–99999999, in the channel currency. Drop methods whose minimum or maximum excludes this amount.
recurringbooleanOnly methods that support recurring payments.
curl "https://api.conciar.com/connect/v1/store/payment-methods" \
-H "Accept: application/json" \
-H "X-Api-Key: pk_your_publishable_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token"{
"payment_methods": [
{
"id": 1,
"key": "ideal",
"type": "redirect",
"name": "iDEAL",
"logo": "…",
"status": "live",
"supports_recurrent": false,
"requires": [],
"payment_service_provider_id": 2,
"payment_service_provider_key": "example_psp",
"min_amount": null,
"max_amount": null
}
],
"currency": "EUR"
}Find pickup points
PostNL pickup points near a postcode. Only when the merchant has PostNL enabled.
Paramètres de requête
country_codestringobligatoireISO-2.
postal_codestringobligatoireMax 16.
Codes de statut
404No shipping carrier is available.
curl "https://api.conciar.com/connect/v1/store/shipping/locations?country_code=NL&postal_code=1000AA" \
-H "Accept: application/json" \
-H "X-Api-Key: cnct_your_secret_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token"{
"locations": [
{
"code": "123456",
"name": "Example pickup point",
"distance": 350,
"latitude": 52,
"longitude": 4,
"address": {
"…": "…"
},
"delivery_options": [
"PG"
],
"opening_hours": {
"Monday": [
"09:00-18:00"
]
}
}
]
}Delivery timeframes
PostNL daytime delivery windows from tomorrow up to seven days ahead.
Paramètres de requête
country_codestringobligatoireISO-2.
postal_codestringobligatoireMax 16.
house_numberstringobligatoireMax 16.
Codes de statut
404No shipping carrier is available.
curl "https://api.conciar.com/connect/v1/store/shipping/delivery-options?country_code=NL&postal_code=1000AA&house_number=1" \
-H "Accept: application/json" \
-H "X-Api-Key: cnct_your_secret_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token"{
"delivery_options": [
{
"date": "2026-10-17",
"timeframes": [
{
"from": "09:00:00",
"to": "12:00:00",
"options": [
"Daytime"
]
}
]
}
]
}Place a webshop order
Turns a cart into an order and starts the payment. Redirect methods return payment_url; with an Apple Pay or Google Pay token the charge happens in this call. Customer details are required unless a bearer token is sent or the channel allows guest checkout.
Corps
cart_tokenstringobligatoireAn active cart with items.
shipping_method_idintegerobligatoireFrom the cart's shipping methods.
payment_method_keystringobligatoirePayment method key.
payment_service_provider_keystringobligatoireProvider key.
return_urlstringA URL. Required except for applepay and google_pay.
shipping_addressobjectobligatoirecity (max 100) and country_id required; street (max 255), house_number (max 20), apartment (max 20), zipcode (max 20), district (max 100), state (max 100) optional.
billing_addressobjectSame fields (city and country_id required when sent); defaults to the shipping address.
customerobjectRequired (with email) unless a bearer token is sent or the channel allows guest checkout. email (max 255), first_name, last_name (max 100 each), phone {number (max 20), country_id}.
customer_notesstringMax 1000.
internal_notesstringMax 1000. A note for the merchant's staff; never shown to the customer.
pickup_location_codestringA pickup point code (a number is accepted). Max 32.
apple_pay_token, google_pay_tokenobject|stringWallet token for an immediate charge (object, JSON or base64). payment_data is still accepted as the older name of google_pay_token.
card_tokenstringFor visa, mastercard and amex: a card token passed to the provider.
Codes de statut
404The shipping method is inactive or belongs to another organization.422Validation (cart, stock, coupon, address problems), a shipping method or payment method not available for this order, or {status: false, message} with PAYMENT_METHOD_UNAVAILABLE (with reason and limit), INVALID_WALLET_TOKEN or PAYMENT_FAILED (a declined wallet charge; nothing is kept and the cart stays open).500The provider could not start a redirect payment; nothing is kept.
Bon à savoir
- With a wallet token, payment is {type: wallet, method, status (paid or pending), transaction_key} and payment_url is left out.
- price_warnings is added when a live-pricing channel repriced a line at checkout.
curl -X POST "https://api.conciar.com/connect/v1/store/orders" \
-H "Accept: application/json" \
-H "X-Api-Key: cnct_your_secret_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token" \
-H "Content-Type: application/json" \
-d '{
"cart_token": "example_cart_token",
"shipping_method_id": 3,
"payment_method_key": "ideal",
"payment_service_provider_key": "example_psp",
"return_url": "https://shop.example.com/checkout/return",
"customer": {
"email": "alex@example.com",
"first_name": "Alex"
},
"shipping_address": {
"street": "Example Street",
"house_number": "1",
"zipcode": "1000 AA",
"city": "Example City",
"country_id": 150
}
}'{
"order": {
"reference": "ORD-EXAMPLE00001",
"…": "…"
},
"invoice": {
"…": "…"
},
"transaction": {
"…": "…"
},
"payment_url": "https://payment-provider.example/checkout/…",
"transaction_key": "example-transaction-key",
"payment": {
"type": "redirect",
"payment_url": "https://payment-provider.example/checkout/…",
"transaction_key": "example-transaction-key"
}
}Check a payment
Call this when the customer comes back on your return_url. A pending payment is checked live with the provider.
Limite de débit: 60/min per key (a publishable key: per key and IP)
Paramètres de chemin
transaction_keystringobligatoireFrom the order response.
Codes de statut
404Unknown transaction.
curl "https://api.conciar.com/connect/v1/store/payment/example-transaction-key/status" \
-H "Accept: application/json" \
-H "X-Api-Key: pk_your_publishable_key" \
-H "X-Sales-Channel: cnct_ch_your_channel_token"{
"transaction_key": "example-transaction-key",
"status": "paid",
"is_paid": true,
"is_pending": false,
"is_failed": false,
"amount": "49.90",
"order_reference": "ORD-EXAMPLE00001"
}