Skip to content

Instantly share code, notes, and snippets.

@patrickxrivera
Last active May 30, 2019 18:15
Show Gist options
  • Save patrickxrivera/a8c24d80695d2e529886138b43c5d17c to your computer and use it in GitHub Desktop.
Save patrickxrivera/a8c24d80695d2e529886138b43c5d17c to your computer and use it in GitHub Desktop.
Checkout Totals Module Data
{
"module_data": {
"apple_pay_request": {
"countryCode": "US",
"currencyCode": "USD",
"lineItems": [
{
"type": "final",
"label": "Subtotal",
"amount": "89.91"
},
{
"type": "final",
"label": "Delivery",
"amount": "3.99"
},
{
"type": "final",
"label": "Service fee",
"amount": "4.50"
},
{
"type": "final",
"label": "Bottle deposits, taxes and fees",
"amount": "1.00"
}
],
"total": {
"label": "Instacart (Temp)",
"amount": "120.00"
}
},
"formatted_disclaimers": [
{
"strings": [
{
"value": "By placing your order, you agree to be bound by the Instacart ",
"attributes": []
},
{
"value": "Terms of Service",
"color": "#43b02a",
"attributes": [],
"action": {
"type": "navigate_to_url",
"data": {
"url": "/terms",
"target": null
}
}
},
{
"value": " and ",
"attributes": []
},
{
"value": "Privacy Policy",
"color": "#43b02a",
"attributes": [],
"action": {
"type": "navigate_to_url",
"data": {
"url": "/privacy",
"target": null
}
}
},
{
"value": ". Your card will be temporarily authorized for $120. Your statement will reflect the final order total after order completion. ",
"attributes": []
},
{
"value": "Learn more",
"color": "#43b02a",
"attributes": [],
"action": {
"type": "navigate_to_url",
"data": {
"url": "http://localhost:3000/help/section/#",
"target": null
}
}
}
],
"action": null,
"alt": null
},
{
"strings": [
{
"value": "A bag fee may be added to your final total if required by law or the retailer. The fee will be visible on your receipt after delivery.",
"attributes": []
}
],
"action": null,
"alt": null
}
],
"express_placement": {
"cashback_image": {
"url": "http://localhost:3000/assets/express/shop-as-usual-placeorder@3x-0de57fd619996c53e59c89374d53f8af71b37f1e50d0af780c834606c71cb11e.png",
"alt": null,
"responsive": null,
"sizes": []
},
"carrot_badge_image": {
"url": "http://localhost:3000/assets/express/carrot_badge@3x-5f72b27e756f69c29f1fd166d5af77474ee1bb9cc2aae9dfc3b599aefed720bc.png",
"alt": null,
"responsive": null,
"sizes": []
},
"header_formatted": {
"strings": [
{
"value": "Save ",
"attributes": ["bold"]
},
{
"value": "$8.49",
"attributes": ["bold"]
},
{
"value": " right now",
"attributes": ["bold"]
}
],
"action": null,
"alt": null
},
"action_formatted": {
"strings": [
{
"value": "Get Instacart Express",
"color": "#43B02A",
"attributes": []
}
],
"action": {
"type": "express_placement_modal",
"data": {
"path": "next_gen/express/savings?source_type=checkout_totals_savings",
"tracking_params": {
"product_flow": "placement",
"source_type": "checkout_totals_savings"
},
"tracking_event_names": {
"view": "view",
"click": "click",
"close": "close"
},
"modal_class": null
}
},
"alt": null
},
"tracking_params": {
"product_flow": "placement",
"source_type": "checkout_totals_savings"
},
"tracking_event_names": {
"view": "view",
"click": "click",
"close": "close"
},
"type": "checkout_totals_savings"
},
"explicit_tip": {
"label": "Driver Tip",
"additional_information": "100% of the tip goes to your driver",
"formatted_additional_information": null,
"attributes": [],
"display_value": "$4.50",
"active_step_type": "4.5",
"steps": [
{
"type": "no_tip",
"attributes": [],
"label": "None",
"sublabel": null,
"amount": 0,
"value": 0,
"percent": null
},
{
"type": "4.5",
"attributes": ["selected"],
"label": "5% ($4.50)",
"sublabel": null,
"amount": 4.5,
"value": "4.5_pct-0.05",
"percent": 0.05,
"is_selected": true
},
{
"type": "8.99",
"attributes": [],
"label": "10% ($8.99)",
"sublabel": null,
"amount": 8.99,
"value": "8.99_pct-0.1",
"percent": 0.1
},
{
"type": "13.49",
"attributes": [],
"label": "15% ($13.49)",
"sublabel": null,
"amount": 13.49,
"value": "13.49_pct-0.15",
"percent": 0.15
},
{
"type": "17.98",
"attributes": [],
"label": "20% ($17.98)",
"sublabel": null,
"amount": 17.98,
"value": "17.98_pct-0.2",
"percent": 0.2
},
{
"type": "custom",
"attributes": [],
"label": "Other amount",
"sublabel": null,
"amount": null,
"value": null,
"percent": null,
"min_amount": 0,
"max_amount": 500,
"steps": []
}
],
"description": "Tip your delivery person?",
"description_lines": [
{
"text": "100% of tips go to your delivery person",
"style": {}
},
{
"text": "Tips are always optional",
"style": {}
},
{
"text": "You can change your tip after your delivery",
"style": {}
}
],
"learn_more": null,
"notice": null,
"note": null,
"existingValue": "$4.50",
"currentTip": 4.5,
"tracking_event_names": {
"view": "tip_service_edit_view",
"close": "tip_service_exit",
"save": "tip_service_save"
}
},
"is_inline_tip": true,
"selected_amounts": {
"service_fee": 4.5,
"initial_tip": 4.5
},
"preselected_attributes": {
"service_fee_shown": 4.5,
"tip_shown": 4.5,
"subtotal_shown": 89.91,
"delivery_fees_shown": 3.99,
"sales_tax_shown": 0,
"bottle_deposit_shown": 1,
"coupon_discount_shown": 0,
"total_shown": 103.9,
"scheduled_delivery_discount_shown": 0,
"express_pickup_discount_shown": 0,
"cart_updated_at_shown": 1559237033
},
"emphasized_totals": false,
"collapsible_totals": false,
"collapsible_savings": false,
"coupon_link_text": "Add promo code",
"line_items": [
{
"attributes": [],
"label": "Subtotal",
"label_formatted": null,
"value": "$89.91",
"value_formatted": null,
"note": null,
"additional_information": null,
"formatted_additional_information": null,
"actionable_icon": null,
"label_action": null
},
{
"attributes": [],
"label": "Delivery",
"label_formatted": null,
"value": "$3.99",
"value_formatted": null,
"note": null,
"additional_information": null,
"formatted_additional_information": null,
"actionable_icon": null,
"label_action": null
},
{
"attributes": [],
"label": "Service fee",
"label_formatted": null,
"value": "$4.50",
"value_formatted": null,
"note": null,
"additional_information": null,
"formatted_additional_information": [
{
"content": {
"strings": [
{
"value": "This fee helps support the Instacart platform and covers a broad range of operating costs including insurance, background checks, and customer support.",
"attributes": []
}
],
"action": null,
"alt": null
}
}
],
"actionable_icon": null,
"label_action": null
},
{
"attributes": [],
"label": "Bottle deposits, taxes and fees",
"label_formatted": null,
"value": "$1.00",
"value_formatted": null,
"note": null,
"additional_information": null,
"formatted_additional_information": null,
"actionable_icon": null,
"label_action": null
}
],
"total": {
"attributes": [],
"label": "Total",
"label_formatted": null,
"value": "$103.90",
"value_formatted": null,
"note": null,
"additional_information": null,
"formatted_additional_information": null,
"actionable_icon": null,
"label_action": null
},
"savings": {
"attributes": [],
"label": "You Saved",
"label_formatted": {
"strings": [
{
"value": "Nice! You saved $12.00",
"color": "#E6003D",
"attributes": ["semibold"]
}
],
"action": null,
"alt": null
},
"value": "$12.00",
"value_formatted": null,
"note": null,
"additional_information": null,
"formatted_additional_information": null,
"actionable_icon": null,
"label_action": null
}
},
"meta": {
"request_timestamp": "1559240086265"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment