{"_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 }}