{"id":7190,"date":"2024-12-04T00:00:00","date_gmt":"2024-12-03T16:00:00","guid":{"rendered":"https:\/\/www.fraudlabspro.com\/resources2\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/"},"modified":"2026-04-02T18:33:37","modified_gmt":"2026-04-02T10:33:37","password":"","slug":"how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar","status":"publish","type":"docs","link":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/","title":{"rendered":"How to use FraudLabs Pro API to validate order in Lunar?"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"600\" src=\"https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order.png\" alt=\"How to use FraudLabs Pro API to validate order in Lunar\" class=\"wp-image-4723\" srcset=\"https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order.png 1200w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order-300x150.png 300w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order-1024x512.png 1024w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order-768x384.png 768w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order-50x25.png 50w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order-920x460.png 920w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order-600x300.png 600w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order-320x160.png 320w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>Lunar is a Laravel e-commerce package which provides functionalities similar to well-known e-commerce platforms like Shopify. It&#8217;s aiming to assist the developers in creating e-commerce shop using Laravel easily. It is claimed that the developers will only need to create the storefront, as they have provided the backend of the e-commerce system.<\/p>\n\n\n\n<p>Although they had constructed the backbone of the system, but they also allow the developers to extend the backend for more functionality. These are usually been done through a mechanism called pipeline, where developers just need to create a new pipeline and add it into the configuration. Developers can benefit from this customization as they can add more custom functions to secure the e-commerce store. For example, the developers can use any fraud validation API to validate the order before it proceeds to the payment stage.<\/p>\n\n\n\n<p>In this tutorial, we are going to show how to call the FraudLabs Pro Screen Order API to validate the order in real-time, and also reject the order if the validation status is REJECT. If you are interested to get more information about the API, you can always refer to its&nbsp;<a href=\"https:\/\/www.fraudlabspro.com\/developer\/api\/screen-order\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a>.<\/p>\n\n\n\n<p>Before we get started, make sure that you have a FraudLabs Pro API key with you. If you don\u00e2\u20ac\u2122t, you can always&nbsp;<a href=\"https:\/\/www.fraudlabspro.com\/checkout-micro\" target=\"_blank\" rel=\"noreferrer noopener\">register<\/a>&nbsp;for a free API key to get started. This tutorial will also assume that you had already installed and setup Lunar in your machine. If you haven\u00e2\u20ac\u2122t, the simplest way to get it is to follow their installation instructions in their <a href=\"https:\/\/docs.lunarphp.io\/core\/starter-kits.html#installation\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">documentation<\/a> to get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to use FraudLabs Pro API in&nbsp;Lunar<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>CD into your Lunar project in command prompt, and run the following command to generate a new pipeline class: <code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">php artisan make:class ValidateOrderFraud<\/code>.<\/li>\n\n\n\n<li>Open the generated <em>app\/ValidateOrderFraud.php<\/em> file, and replaced the contents with the following code:<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\nnamespace App;\n\nuse Closure;\nuse IlluminateSupportFacadesLog;\nuse IlluminateSupportFacadesDB;\nuse IlluminateSupportFacadesHttp;\n\nclass ValidateOrderFraud\n{\n    \/**\n     * Create a new class instance.\n     *\/\n    public function __construct()\n    {\n        \/\/\n    }\n\n    \/**\n     * Handle the incoming order.\n     *\n     * @param  mixed  $order\n     * @param  Closure  $next\n     * @return mixed\n     *\/\n    public function handle($order, Closure $next)\n    {\n        $billingDetails = $order->addresses->firstWhere('type', 'billing');\n        $shippingDetails = $order->addresses->firstWhere('type', 'shipping');\n        \/\/ Fetch the country code for billing\n        $billingCountryId = $billingDetails->country_id ?? null;\n        $billingCountryIso = $billingCountryId \n            ? DB::table('lunar_countries')->where('id', $billingCountryId)->value('iso2') \n            : $billingCountryId;\n\n        \/\/ Fetch the country code for shipping\n        $shippingCountryId = $shippingDetails->country_id ?? null;\n        $shippingCountryIso = $shippingCountryId \n            ? DB::table('lunar_countries')->where('id', $shippingCountryId)->value('iso2') \n            : $shippingCountryId;\n        \n        $total = $order->total->value;\n        $decimalPlaces = $order->total->currency->decimal_places;\n        \/\/ Format the total using the decimal places\n        $formattedTotal = number_format($total \/ pow(10, $decimalPlaces), $decimalPlaces, '.', '');\n        \n        $payloads = [\n            'key'            => env('FRAUDLABSPRO_API_KEY'),\n            'format'         => 'json',\n\n            \/\/ Billing information\n            'first_name'    => $billingDetails->first_name,\n            'last_name'     => $billingDetails->last_name,\n            'username_hash' => $billingDetails->line_one,\n            'email'         => $billingDetails->contact_email,\n            'bill_addr'     => $billingDetails->line_one,\n            'bill_city'     => $billingDetails->city,\n            'bill_zip_code' => $billingDetails->postcode,\n            'bill_country'  => $billingCountryIso,\n\n            \/\/ Order information\n            'user_order_id'   => $order->id,\n            'amount'          => $formattedTotal,\n            'quantity'        => $order->total->unitQty,\n            'currency'        => $order->total->currency->code,\n\n            \/\/ Shipping information\n            'ship_first_name' => $shippingDetails->first_name,\n            'ship_last_name'  => $shippingDetails->last_name,\n            'ship_addr'       => $shippingDetails->line_one,\n            'ship_city'       => $shippingDetails->city,\n            'ship_zip_code'   => $shippingDetails->postcode,\n            'ship_country'    => $shippingCountryIso,\n        ];\n        \/\/ Fill in values if they are not null\n        if ($billingDetails->state !== null) {\n            $payloads['bill_state'] = $billingDetails->state;\n        }\n        if ($billingDetails->contact_phone !== null) {\n            $payloads['user_phone'] = $billingDetails->contact_phone;\n        }\n        if ($shippingDetails->state !== null) {\n            $payloads['ship_state'] = $shippingDetails->state;\n        }\n        if ($order->notes !== null) {\n            $payloads['user_order_memo'] = $order->notes;\n        }\n        \n        \/\/ FraudLabs Pro API endpoint\n        $url = 'https:\/\/api.fraudlabspro.com\/v2\/order\/screen';\n\n        \/\/ Make the API request\n        $response = Http::post($url, $payloads);\n\n        if ($response->successful()) {\n            $result = $response->json();\n\n            \/\/ Check the fraudlabspro_status\n            if (isset($result['fraudlabspro_status']) &amp;&amp; $result['fraudlabspro_status'] === 'REJECT') {\n                \/\/ Terminate the pipeline by throwing an exception\n                abort(403, 'Order has been rejected. Please try again later.');\n            }\n        } else {\n            Log::error('FraudLabs Pro API request failed', ['response' => $response->body()]);\n        }\n\n\n        \/\/ Continue to the next pipeline stage\n        return $next($order);\n    }\n}\n<\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>After that, go to the <em>config\/lunar\/orders.php<\/em>, find the pipelines=&gt;creation array, and add the following line into the last order of the line: <code>AppValidateOrderFraud::class,<\/code>.<\/li>\n\n\n\n<li>Double check the modification to make sure the newly added line is at the last order, for example, here is how it may look like:<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    'pipelines' => [\n        'creation' => [\n            LunarPipelinesOrderCreationFillOrderFromCart::class,\n            LunarPipelinesOrderCreationCreateOrderLines::class,\n            LunarPipelinesOrderCreationCreateOrderAddresses::class,\n            LunarPipelinesOrderCreationCreateShippingLine::class,\n            LunarPipelinesOrderCreationCleanUpOrderLines::class,\n            LunarPipelinesOrderCreationMapDiscountBreakdown::class,\n            AppValidateOrderFraud::class,\n        ],<\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>Finally, add your FraudLabs Pro API key into your .env file like this:&nbsp;<code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">FRAUDLABSPRO_API_KEY=YOUR_API_KEY<\/code>. Now your e-commerce shop should be able to validate the order and reject the transaction if fraudulent. For example, here is how it may look like if the API found the order to be suspicious and thus reject it:<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"389\" src=\"https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/screenshot-localhost_8000-2024_12_04-10_03_01-1024x389.png\" alt=\"\" class=\"wp-image-4683\" srcset=\"https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/screenshot-localhost_8000-2024_12_04-10_03_01-1024x389.png 1024w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/screenshot-localhost_8000-2024_12_04-10_03_01-300x114.png 300w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/screenshot-localhost_8000-2024_12_04-10_03_01-768x292.png 768w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/screenshot-localhost_8000-2024_12_04-10_03_01-50x19.png 50w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/screenshot-localhost_8000-2024_12_04-10_03_01-1536x583.png 1536w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/screenshot-localhost_8000-2024_12_04-10_03_01-920x349.png 920w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/screenshot-localhost_8000-2024_12_04-10_03_01-600x228.png 600w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/screenshot-localhost_8000-2024_12_04-10_03_01-320x122.png 320w, https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/screenshot-localhost_8000-2024_12_04-10_03_01.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-text-align-center\">Fortify Your Business Against Fraud<\/h2>\n\n\n\n<p class=\"has-text-align-center\">Streamline your works with our fraud detection API now!<\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-1 wp-block-buttons-is-layout-flex\"><div class=\"wp-block-button has-text-align-center\" style=\"width:100%;\"><a id=\"btn-click\" class=\"wp-block-button__link has-white-color has-text-color has-background wp-element-button\" href=\"https:\/\/www.fraudlabspro.com\/checkout-micro?utm_source=blog&#038;utm_medium=link&#038;utm_campaign=cta&#038;utm_term=footer-free\" style=\"background-color:#ed4747;margin:0px 10px 10px 10px;width:auto;\" target=\"_blank\" rel=\"noreferrer noopener\">Integrate API For Free Now<\/a><a id=\"btn-click\" class=\"wp-block-button__link has-text-color has-background wp-element-button\" href=\"https:\/\/www.fraudlabspro.com\/developer\/api\/screen-order?utm_source=blog&#038;utm_medium=link&#038;utm_campaign=cta&#038;utm_term=footer-devguide\" style=\"margin:0px 10px 10px 10px;color:#ed4747;border:1px solid #ed4747;background-color:#ffffff;width:auto;\" target=\"_blank\" rel=\"noreferrer noopener\">Explore Documentation<\/a><\/div><\/div>\n\n\n\n<div style=\"height:54px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Lunar is a Laravel e-commerce package which provides functionalities similar to well-known e-commerce platforms like Shopify. It&#8217;s aiming to assist [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_lmt_disableupdate":"","_lmt_disable":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_category":[185],"doc_tag":[],"class_list":["post-7190","docs","type-docs","status-publish","hentry","doc_category-developer-guide"],"year_month":"2026-05","word_count":792,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"FraudLabs Pro","author_nicename":"hexasoft","author_url":"https:\/\/www.fraudlabspro.com\/resources\/author\/hexasoft\/"},"doc_category_info":[{"term_name":"Developer Guide","term_url":"https:\/\/www.fraudlabspro.com\/resources\/categories\/developer-guide\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to use FraudLabs Pro API to validate order in Lunar? -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use FraudLabs Pro API to validate order in Lunar? -\" \/>\n<meta property=\"og:description\" content=\"Lunar is a Laravel e-commerce package which provides functionalities similar to well-known e-commerce platforms like Shopify. It&#8217;s aiming to assist [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-02T10:33:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/tutorials\\\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\\\/\",\"url\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/tutorials\\\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\\\/\",\"name\":\"How to use FraudLabs Pro API to validate order in Lunar? -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/tutorials\\\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/tutorials\\\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/flp-lunar-validate-order.png\",\"datePublished\":\"2024-12-03T16:00:00+00:00\",\"dateModified\":\"2026-04-02T10:33:37+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/tutorials\\\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/tutorials\\\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/tutorials\\\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/flp-lunar-validate-order.png\",\"contentUrl\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/flp-lunar-validate-order.png\",\"width\":1200,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/tutorials\\\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to use FraudLabs Pro API to validate order in Lunar?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/#website\",\"url\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/\",\"name\":\"\",\"description\":\"Resources About FraudLabs Pro Services\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.fraudlabspro.com\\\/resources\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use FraudLabs Pro API to validate order in Lunar? -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/","og_locale":"en_US","og_type":"article","og_title":"How to use FraudLabs Pro API to validate order in Lunar? -","og_description":"Lunar is a Laravel e-commerce package which provides functionalities similar to well-known e-commerce platforms like Shopify. It&#8217;s aiming to assist [&hellip;]","og_url":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/","article_modified_time":"2026-04-02T10:33:37+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/","url":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/","name":"How to use FraudLabs Pro API to validate order in Lunar? -","isPartOf":{"@id":"https:\/\/www.fraudlabspro.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/#primaryimage"},"image":{"@id":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order.png","datePublished":"2024-12-03T16:00:00+00:00","dateModified":"2026-04-02T10:33:37+00:00","breadcrumb":{"@id":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/#primaryimage","url":"https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order.png","contentUrl":"https:\/\/www.fraudlabspro.com\/resources\/wp-content\/uploads\/2024\/12\/flp-lunar-validate-order.png","width":1200,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/how-to-use-fraudlabs-pro-api-to-validate-order-in-lunar\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fraudlabspro.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/www.fraudlabspro.com\/resources\/tutorials\/"},{"@type":"ListItem","position":3,"name":"How to use FraudLabs Pro API to validate order in Lunar?"}]},{"@type":"WebSite","@id":"https:\/\/www.fraudlabspro.com\/resources\/#website","url":"https:\/\/www.fraudlabspro.com\/resources\/","name":"","description":"Resources About FraudLabs Pro Services","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.fraudlabspro.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.fraudlabspro.com\/resources\/wp-json\/wp\/v2\/docs\/7190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fraudlabspro.com\/resources\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.fraudlabspro.com\/resources\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.fraudlabspro.com\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fraudlabspro.com\/resources\/wp-json\/wp\/v2\/comments?post=7190"}],"version-history":[{"count":0,"href":"https:\/\/www.fraudlabspro.com\/resources\/wp-json\/wp\/v2\/docs\/7190\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.fraudlabspro.com\/resources\/wp-json\/wp\/v2\/media?parent=7190"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.fraudlabspro.com\/resources\/wp-json\/wp\/v2\/doc_category?post=7190"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.fraudlabspro.com\/resources\/wp-json\/wp\/v2\/doc_tag?post=7190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}