{"_id":"575676128749830e00681e95","category":{"_id":"575676128749830e00681e84","version":"575676128749830e00681e82","__v":0,"project":"55a4d5531a5f991700a9409e","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-02-26T08:50:49.316Z","from_sync":false,"order":1,"slug":"click-get","title":"urb-it as click & Get"},"user":"555b35be8e87d01900b8049e","version":{"_id":"575676128749830e00681e82","__v":2,"project":"55a4d5531a5f991700a9409e","createdAt":"2016-06-07T07:21:54.005Z","releaseDate":"2016-06-07T07:21:54.005Z","categories":["575676128749830e00681e83","575676128749830e00681e84","575676128749830e00681e85","575676128749830e00681e86","575676128749830e00681e87","575676128749830e00681e88","575676128749830e00681e89","575676128749830e00681e8a","575676128749830e00681e8b","580c5ff36c35230f003d3b49"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"parentDoc":null,"project":"55a4d5531a5f991700a9409e","__v":3,"updates":["586d030260ece32700198b46","586d0308304ecf0f00b1957f"],"next":{"pages":[],"description":""},"createdAt":"2016-03-14T15:00:28.317Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"57bc0cc860d92e0e0079e564","examples":{"codes":[]},"method":"get","auth":"required","params":[],"url":"/v2/checkouts/reference-id/{referenceId}"},"isReference":true,"order":2,"body":"**Check Payment and Order Status after redirect.**\n\nThe redirect should be interpreted as a notification stating that the payment and order is completed. It should not be considered as the final receipt of a purchase since it is stripped from all sensitive payment and order details.\n\nCreate the Authorization header following the guide at [Authorizing Requests](doc:authorizing-requests-1)\n\nOnce the response is received check the checkout_status parameter. \nIf it is set to COMPLETE the payment has been processed and the merchant may display a confirmation page and update the payment status in their backend system. \n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Url Parameters\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"reference_id\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Retailers reference id (order number)\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response properties\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"store_id\",\n    \"0-2\": \"Store ID\",\n    \"0-1\": \"guid\",\n    \"1-0\": \"retailer_reference_id\",\n    \"1-2\": \"Order number from the retailer\",\n    \"2-0\": \"checkout_status\",\n    \"2-1\": \"string\",\n    \"2-2\": \"Status of the order\\n\\n\\nCREATED = The checkout is successfully initialized\\nREADY = Customer has entered payment details\\nCOMPLETE = Customer has completed the purchase\\nFAILED = The purchase failed due to technical issues\",\n    \"3-0\": \"urber_message\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Message to the urber\",\n    \"6-0\": \"delivery_code\",\n    \"6-1\": \"string\",\n    \"6-2\": \"urb-it delivery code for tracking the delivery\",\n    \"7-0\": \"delivery_type\",\n    \"7-1\": \"string\",\n    \"7-2\": \"“Onehour” or “Specific”\",\n    \"8-0\": \"delivery_expected_at\",\n    \"8-2\": \"The expected date and time of the delivery (e.g. “2016-01-21T04:00:00”)\",\n    \"8-1\": \"datetime\",\n    \"9-0\": \"order_number\",\n    \"9-1\": \"int\",\n    \"9-2\": \"urb-it internal order number (integer)\",\n    \"10-0\": \"total_amount\",\n    \"10-2\": \"Total order amount in cents incl. VAT (integer)\",\n    \"10-1\": \"int\",\n    \"11-0\": \"total_amount_excl_vat\",\n    \"11-2\": \"Total order amount in cents excl. VAT (integer)\",\n    \"11-1\": \"int\",\n    \"12-0\": \"checkout_items\",\n    \"12-2\": \"All order articles\",\n    \"12-1\": \"[CheckoutItem](#checkoutitem)[]\",\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"4-0\": \"Consumer\",\n    \"4-1\": \"[Consumer](#consumer)\",\n    \"4-2\": \"Consumers information\",\n    \"5-0\": \"Delivery\",\n    \"5-1\": \"[Delivery](#delivery)\",\n    \"5-2\": \"Delivery information\",\n    \"13-0\": \"gift\",\n    \"13-1\": \"bool\",\n    \"13-2\": \"Indicates if the order is a gift\",\n    \"14-0\": \"payment_method_info\",\n    \"14-1\": \"[PaymentMethodInfo](#paymentmethodinfo)\",\n    \"14-2\": \"Payment method information\"\n  },\n  \"cols\": 3,\n  \"rows\": 15\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Consumer\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"first_name\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Consumers first name\",\n    \"1-0\": \"last_name\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Consumers last name\",\n    \"2-0\": \"email\",\n    \"2-1\": \"string\",\n    \"2-2\": \"Consumers email address\",\n    \"3-0\": \"phone_number\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Consumers phone number\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Delivery\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"first_name\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Receivers first name (Can be same as consumer)\",\n    \"1-0\": \"last_name\",\n    \"1-1\": \"string\",\n    \"2-0\": \"phone_number\",\n    \"2-1\": \"string\",\n    \"3-0\": \"street\",\n    \"3-1\": \"string\",\n    \"4-0\": \"postal_code\",\n    \"4-1\": \"string\",\n    \"5-0\": \"city\",\n    \"5-1\": \"string\",\n    \"1-2\": \"Receivers last name (Can be same as consumer)\",\n    \"2-2\": \"Receivers phone number (Can be same as consumer)\",\n    \"3-2\": \"Delivery street address\",\n    \"4-2\": \"Delivery Postal Code\",\n    \"5-2\": \"Delivery City\",\n    \"6-0\": \"delivery_location_type\",\n    \"6-1\": \"string\",\n    \"6-2\": \"Describing what type of delivery this is. Types supported: \\\"Car\\\", \\\"Consumer\\\" and \\\"Beneficary\\\"\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"DeliveryLocationType\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Car\",\n    \"1-0\": \"Consumer\",\n    \"2-0\": \"Beneficary\",\n    \"0-1\": \"The delivery is to a car.\",\n    \"h-0\": \"Type of delivery destination\",\n    \"h-1\": \"Description\",\n    \"1-1\": \"The consumers chosen address\",\n    \"2-1\": \"If the delivery is a gift to another person then the consumer\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"CheckoutItem\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Id\",\n    \"0-1\": \"int\",\n    \"0-2\": \"urb-it internal item ID (integer)\",\n    \"1-0\": \"name\",\n    \"1-2\": \"Article name\",\n    \"1-1\": \"string\",\n    \"2-0\": \"reference_id\",\n    \"2-2\": \"Retailer article reference ID\",\n    \"2-1\": \"string\",\n    \"3-0\": \"amount\",\n    \"3-2\": \"Article amount in cents incl. VAT (integer)\",\n    \"3-1\": \"int\",\n    \"4-0\": \"vat_rate\",\n    \"4-2\": \"Article VAT rate in cents (percentage, integer)\",\n    \"4-1\": \"int\",\n    \"5-0\": \"type\",\n    \"5-2\": \"“Product” or “DeliveryFee” or “Voucher”\",\n    \"5-1\": \"string\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PaymentMethodInfo\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"type\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Type of payment (Currently only supports card)\",\n    \"1-0\": \"control_digits\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Card control number\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Examples\"\n}\n[/block]\n**Request** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /checkout/status HTTP/1.1\\nHost: stage-retailer-api.urb-it.com\\nAuthorization: UWA b0477a45-1198-419f-b159-e484be341512:DNX22veCTbges6DH9n67TAAzSa0jFE0qOtJBstvIdyU=:48e0e16-cbc9-4953-ad33-f3d17c5330dc:1444981142\\nCache-Control: no-cache\\nContent-Type: application/json\\n{\\n  \\\"reference_id\\\": \\\"1234\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**Response** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n{  \\n  \\\"store_id\\\": \\\"776844c5-7518-42ee-bce7-db816edeea7a\\\",\\n  \\\"retailer_reference_id\\\": \\\"1234\\\",\\n  \\\"checkout_status\\\": \\\"COMPLETE\\\",\\n  \\\"gift\\\":true,\\n  \\\"consumer\\\":\\n  {\\n  \\t\\\"first_name\\\":\\\"Bengt\\\",\\n    \\\"last_name\\\":\\\"\\\",\\n    \\\"email\\\":\\\"email:::at:::mail.com\\\",\\n    \\\"phone_number\\\":\\\"+460000000\\\"\\n  },\\n  \\\"delivery\\\":\\n  {\\n  \\t\\\"first_name\\\":\\\"Bengt\\\",\\n    \\\"last_name\\\":\\\"Bengtsson\\\",\\n    \\\"phone_number\\\":\\\"+460000000\\\",\\n    \\\"street\\\":\\\"street 1\\\",\\n    \\\"postal_code\\\":\\\"11144\\\",\\n    \\\"city\\\":\\\"Stockholm\\\"\\n  }\\n  \\\"urber_message\\\": \\\"Testing testing.\\\",\\n  \\\"delivery_code\\\": \\\"ABC123\\\",\\n  \\\"delivery_type\\\": \\\"Onehour\\\",\\n  \\\"delivery_expected_at\\\": \\\"2016-02-02T14:01:51.230Z\\\",\\n  \\\"order_number\\\": 13550,\\n  \\\"total_amount\\\": 900,\\n  \\\"total_amount_excl_vat\\\": 720,\\n  \\\"payment_method_info\\\": \\n  \\t{\\n  \\t\\t\\\"type\\\": \\\"card\\\",\\n  \\t\\t\\\"control_digits\\\": \\\"456\\\"\\n\\t\\t},\\n  \\\"checkout_items\\\": [  \\n    {  \\n      \\\"id\\\": 8710,\\n      \\\"name\\\": \\\"Woo Album #1\\\",\\n      \\\"reference_id\\\": \\\"83\\\",\\n      \\\"amount\\\": 900,\\n      \\\"vat_rate\\\": 2500,\\n      \\\"type\\\": \\\"Product\\\"\\n    },\\n    {  \\n      \\\"id\\\": 8711,\\n      \\\"name\\\": \\\"urb-it\\\",\\n      \\\"reference_id\\\": \\\"\\\",\\n      \\\"amount\\\": 12900,\\n      \\\"vat_rate\\\": 2500,\\n      \\\"type\\\": \\\"DeliveryFee\\\"\\n    },\\n    {\\n      \\\"id\\\": 8712,\\n      \\\"name\\\": \\\"CODE-ALL\\\",\\n      \\\"reference_id\\\": \\\"\\\",\\n      \\\"amount\\\": -12900,\\n      \\\"vat_rate\\\": 0,\\n      \\\"type\\\": \\\"Voucher\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"checkout-payment-order-statuss","type":"endpoint","title":"Checkout Payment & Order Status"}

getCheckout Payment & Order Status


Definition

{{ api_url }}{{ page_api_url }}

Documentation

**Check Payment and Order Status after redirect.** The redirect should be interpreted as a notification stating that the payment and order is completed. It should not be considered as the final receipt of a purchase since it is stripped from all sensitive payment and order details. Create the Authorization header following the guide at [Authorizing Requests](doc:authorizing-requests-1) Once the response is received check the checkout_status parameter. If it is set to COMPLETE the payment has been processed and the merchant may display a confirmation page and update the payment status in their backend system. [block:api-header] { "type": "basic", "title": "Url Parameters" } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-0": "reference_id", "0-1": "string", "0-2": "Retailers reference id (order number)" }, "cols": 3, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Response properties" } [/block] [block:parameters] { "data": { "0-0": "store_id", "0-2": "Store ID", "0-1": "guid", "1-0": "retailer_reference_id", "1-2": "Order number from the retailer", "2-0": "checkout_status", "2-1": "string", "2-2": "Status of the order\n\n\nCREATED = The checkout is successfully initialized\nREADY = Customer has entered payment details\nCOMPLETE = Customer has completed the purchase\nFAILED = The purchase failed due to technical issues", "3-0": "urber_message", "3-1": "string", "3-2": "Message to the urber", "6-0": "delivery_code", "6-1": "string", "6-2": "urb-it delivery code for tracking the delivery", "7-0": "delivery_type", "7-1": "string", "7-2": "“Onehour” or “Specific”", "8-0": "delivery_expected_at", "8-2": "The expected date and time of the delivery (e.g. “2016-01-21T04:00:00”)", "8-1": "datetime", "9-0": "order_number", "9-1": "int", "9-2": "urb-it internal order number (integer)", "10-0": "total_amount", "10-2": "Total order amount in cents incl. VAT (integer)", "10-1": "int", "11-0": "total_amount_excl_vat", "11-2": "Total order amount in cents excl. VAT (integer)", "11-1": "int", "12-0": "checkout_items", "12-2": "All order articles", "12-1": "[CheckoutItem](#checkoutitem)[]", "h-0": "Name", "h-1": "Type", "h-2": "Description", "4-0": "Consumer", "4-1": "[Consumer](#consumer)", "4-2": "Consumers information", "5-0": "Delivery", "5-1": "[Delivery](#delivery)", "5-2": "Delivery information", "13-0": "gift", "13-1": "bool", "13-2": "Indicates if the order is a gift", "14-0": "payment_method_info", "14-1": "[PaymentMethodInfo](#paymentmethodinfo)", "14-2": "Payment method information" }, "cols": 3, "rows": 15 } [/block] [block:api-header] { "type": "basic", "title": "Consumer" } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-0": "first_name", "0-1": "string", "0-2": "Consumers first name", "1-0": "last_name", "1-1": "string", "1-2": "Consumers last name", "2-0": "email", "2-1": "string", "2-2": "Consumers email address", "3-0": "phone_number", "3-1": "string", "3-2": "Consumers phone number" }, "cols": 3, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Delivery" } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-0": "first_name", "0-1": "string", "0-2": "Receivers first name (Can be same as consumer)", "1-0": "last_name", "1-1": "string", "2-0": "phone_number", "2-1": "string", "3-0": "street", "3-1": "string", "4-0": "postal_code", "4-1": "string", "5-0": "city", "5-1": "string", "1-2": "Receivers last name (Can be same as consumer)", "2-2": "Receivers phone number (Can be same as consumer)", "3-2": "Delivery street address", "4-2": "Delivery Postal Code", "5-2": "Delivery City", "6-0": "delivery_location_type", "6-1": "string", "6-2": "Describing what type of delivery this is. Types supported: \"Car\", \"Consumer\" and \"Beneficary\"" }, "cols": 3, "rows": 7 } [/block] [block:api-header] { "type": "basic", "title": "DeliveryLocationType" } [/block] [block:parameters] { "data": { "0-0": "Car", "1-0": "Consumer", "2-0": "Beneficary", "0-1": "The delivery is to a car.", "h-0": "Type of delivery destination", "h-1": "Description", "1-1": "The consumers chosen address", "2-1": "If the delivery is a gift to another person then the consumer" }, "cols": 2, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "CheckoutItem" } [/block] [block:parameters] { "data": { "0-0": "Id", "0-1": "int", "0-2": "urb-it internal item ID (integer)", "1-0": "name", "1-2": "Article name", "1-1": "string", "2-0": "reference_id", "2-2": "Retailer article reference ID", "2-1": "string", "3-0": "amount", "3-2": "Article amount in cents incl. VAT (integer)", "3-1": "int", "4-0": "vat_rate", "4-2": "Article VAT rate in cents (percentage, integer)", "4-1": "int", "5-0": "type", "5-2": "“Product” or “DeliveryFee” or “Voucher”", "5-1": "string" }, "cols": 3, "rows": 6 } [/block] [block:api-header] { "type": "basic", "title": "PaymentMethodInfo" } [/block] [block:parameters] { "data": { "0-0": "type", "0-1": "string", "0-2": "Type of payment (Currently only supports card)", "1-0": "control_digits", "1-1": "string", "1-2": "Card control number" }, "cols": 3, "rows": 2 } [/block] [block:api-header] { "type": "basic", "title": "Examples" } [/block] **Request** [block:code] { "codes": [ { "code": "POST /checkout/status HTTP/1.1\nHost: stage-retailer-api.urb-it.com\nAuthorization: UWA b0477a45-1198-419f-b159-e484be341512:DNX22veCTbges6DH9n67TAAzSa0jFE0qOtJBstvIdyU=:48e0e16-cbc9-4953-ad33-f3d17c5330dc:1444981142\nCache-Control: no-cache\nContent-Type: application/json\n{\n \"reference_id\": \"1234\"\n}", "language": "json" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n{ \n \"store_id\": \"776844c5-7518-42ee-bce7-db816edeea7a\",\n \"retailer_reference_id\": \"1234\",\n \"checkout_status\": \"COMPLETE\",\n \"gift\":true,\n \"consumer\":\n {\n \t\"first_name\":\"Bengt\",\n \"last_name\":\"\",\n \"email\":\"[email protected]\",\n \"phone_number\":\"+460000000\"\n },\n \"delivery\":\n {\n \t\"first_name\":\"Bengt\",\n \"last_name\":\"Bengtsson\",\n \"phone_number\":\"+460000000\",\n \"street\":\"street 1\",\n \"postal_code\":\"11144\",\n \"city\":\"Stockholm\"\n }\n \"urber_message\": \"Testing testing.\",\n \"delivery_code\": \"ABC123\",\n \"delivery_type\": \"Onehour\",\n \"delivery_expected_at\": \"2016-02-02T14:01:51.230Z\",\n \"order_number\": 13550,\n \"total_amount\": 900,\n \"total_amount_excl_vat\": 720,\n \"payment_method_info\": \n \t{\n \t\t\"type\": \"card\",\n \t\t\"control_digits\": \"456\"\n\t\t},\n \"checkout_items\": [ \n { \n \"id\": 8710,\n \"name\": \"Woo Album #1\",\n \"reference_id\": \"83\",\n \"amount\": 900,\n \"vat_rate\": 2500,\n \"type\": \"Product\"\n },\n { \n \"id\": 8711,\n \"name\": \"urb-it\",\n \"reference_id\": \"\",\n \"amount\": 12900,\n \"vat_rate\": 2500,\n \"type\": \"DeliveryFee\"\n },\n {\n \"id\": 8712,\n \"name\": \"CODE-ALL\",\n \"reference_id\": \"\",\n \"amount\": -12900,\n \"vat_rate\": 0,\n \"type\": \"Voucher\"\n }\n ]\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
 
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status 
Response Headers
{{ tryResults.responseHeaders }}