The following events occur when the request is made:

  1. The payment method is authorized for the total of the order.
  2. The each bag is submitted to the source merchants e-commerce platform.
  3. Upon successful receipt from the merchants e-commerce platform the payment amount is captured and the order is moved to a processing state.

POST /checkout/cart/{cart_id}/submit

Submit a given cart to merchants for order processing. API Reference: Submit Cart

Request

cart_id

The ID of the cart that is being submitted.

Curl
curl -X POST https://sandbox-api.violet.io/v1/checkout/cart/{cart_id}/submit \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json" \
-d '{}'

At this point your order has been completed. If you subscribe to order Webhooks you will be notified as the order transitions from the processing state to the shipped and completed states.

Response

JSON
{
    "id": 20956,
    "token": "c8f17e9e6fec4268bc9188f039ec68ad",
    "user_id": 10397,
    "app_id": 10382,
    "developer_id": 10292,
    "customer": {
        "user_id": 10397,
        "first_name": "Paul",
        "last_name": "Sherman",
        "email": "dorythefish@disney.com",
        "name": "Paul Sherman"
    },
    "bags": [
        {
            "id": 20440,
            "order_id": 20956,
            "merchant_id": 10000,
            "app_id": 10382,
            "external_id": "4319545720950",
            "status": "ACCEPTED",
            "fulfillment_status": "PROCESSING",
            "financial_status": "PAID",
            "skus": [
                {
                    "id": 24987,
                    "merchant_id": 10000,
                    "app_id": 10382,
                    "product_id": "0ff55c5cda7447118d6ae1c8395f8f11",
                    "sku_id": 10064,
                    "external_id": "13884047425654",
                    "name": "GoPro - Karma Quadcopter with HERO6 Black - White - White",
                    "brand": "GoPro",
                    "thumbnail": "https://cdn.shopify.com/s/files/1/0057/6467/7750/products/6029300_ra.jpg",
                    "quantity": 1,
                    "price": 84999,
                    "weight": 13.45,
                    "available": true,
                    "status": "PROCESSING",
                    "line_price": 84999
                }
            ],
            "shipping_method": {
                "type": "FLAT_RATE_PRICE",
                "carrier": "OTHER",
                "label": "International Shipping",
                "price": 2000,
                "id": 17032,
                "shipping_method_id": "shopify-International%20Shipping-20.00",
                "bag_id": 20440,
                "merchant_id": 10000
            },
            "taxes": [],
            "sub_total": 84999,
            "shipping_total": 2000,
            "tax_total": 0,
            "total": 86999,
            "transactions": [
                {
                    "id": 15408,
                    "merchant_id": 10000,
                    "app_id": 10382,
                    "order_id": 20956,
                    "bag_id": 20440,
                    "gateway_transaction_id": "A5b3y7RlF6ncU4WmEs1NIboTWrNVz9DgUXdEUabTkoc=",
                    "gateway": "stripe",
                    "amount": 86999,
                    "currency": "USD",
                    "type": "CAPTURE",
                    "status": "COMPLETED",
                    "date_created": "2022-05-12T16:30:13+0000",
                    "date_last_modified": "2022-05-12T16:30:20+0000"
                }
            ],
            "external_checkout": true,
            "commission_rate": 15.0,
            "date_created": "2022-05-11T16:17:16+0000",
            "remorse_period_ends": "2022-06-10T16:17:16+0000",
            "currency": "USD",
            "external_currency": "USD",
            "channel": "APP",
            "platform": "SHOPIFY",
            "fulfillments": [],
            "merchant_name": "Violet-Besties"
        }
    ],
    "shipping_address": {
        "city": "Sydney",
        "state": "NSW",
        "country": "AU",
        "postal_code": "2000",
        "type": "SHIPPING",
        "address_1": "42 Wallaby Way"
    },
    "billing_address": {
        "city": "Sydney",
        "state": "NSW",
        "country": "AU",
        "postal_code": "2000",
        "type": "BILLING",
        "address_1": "42 Wallaby Way"
    },
    "payment_method": {
        "brand": "visa",
        "last_four": "4242",
        "exp_month": 12,
        "exp_year": 2025,
        "payment_method_id": 5465
    },
    "sub_total": 84999,
    "shipping_total": 2000,
    "tax_total": 0,
    "total": 86999,
    "status": "COMPLETED",
    "date_created": "2022-05-11T16:17:16+0000",
    "date_last_modified": "2022-05-12T16:30:19+0000",
    "priced": true,
    "currency": "USD",
    "channel": "APP",
    "currency_symbol": "$",
    "stripe_key": "pk_test_UHg8oLvg4rrDCbvtqfwTE8qd",
    "guest": true
}

Was this page helpful?