Introducing the FraudLabs Pro Go SDK

FraudLabs Pro Go SDK

Introduction

Go, which is also known as Golang, is increasingly popular for building high-performance, scalable applications. With the release of the FraudLabs Pro Go SDK, developers can now easily implement fraud detection features into their Go solution using the FraudLabs Pro API.

Key Features of the Go SDK

Below are the features of the FraudLabs Pro Go SDK:

Fraud Analysis & Scoring

Automatically analyze transactions based on multiple elements like IP, email, billing, shipping and so on then return a fraud score. This score helps merchants quickly decide whether to approve, review, or reject a transaction.

Credit Card Issuing Bank Validation

Check if a credit card’s issuing bank matches the details provided by the user, helping to prevent the use of stolen or fake cards.

SMS Verification & Validation

Authenticate customers with one-time SMS passcodes, ensuring only genuine users complete their transactions.

How to Use FraudLabs Pro Go SDK

To start using the FraudLabs Pro Go SDK, follow these simple steps:

1. Get Your API Key

You’ll need an API key to use the SDK. Sign up for a free account and obtain your key here:

👉 https://www.fraudlabspro.com/checkout-micro

2. Install the SDK

Install the SDK using the command below:

go get github.com/fraudlabspro/fraudlabspro-go

3. Validate an Order (Sample Code)

Here’s a simple example showing how to validate an order using FraudLabs Pro.

Copy the codes below and paste it to your main.go. Kindly replace YOUR_API_KEY to your FraudLabs Pro API key and save the file.

package main

import (
	"github.com/fraudlabspro/fraudlabspro-go/fraudlabspro"
	"fmt"
)

func main() {
	apikey := "YOUR_API_KEY"

	config, err := fraudlabspro.OpenConfiguration(apikey)

	if err != nil {
		fmt.Print(err)
		return
	}

	flp, err := fraudlabspro.OpenOrder(config)

	if err != nil {
		fmt.Print(err)
		return
	}

	params := make(map[string]string)

	params["ip"] = "146.112.62.105"

	params["user_order_id"] = "67398"
	params["currency"] = "USD"
	params["amount"] = "79.89"
	params["quantity"] = "1"
	params["payment_gateway"] = "Gateway To Bliss"
	params["payment_mode"] = fraudlabspro.PaymentMethodCreditCard

	params["number"] = "4556553172971283"

	params["first_name"] = "Hector"
	params["last_name"] = "Henderson"
	params["email"] = "hh5566@gmail.com"
	params["user_phone"] = "561-628-8674"
	params["bill_addr"] = "1766 Powder House Road"
	params["bill_city"] = "West Palm Beach"
	params["bill_state"] = "FL"
	params["bill_zip_code"] = "33401"
	params["bill_country"] = "US"

	params["ship_first_name"] = "Hector"
	params["ship_last_name"] = "Henderson"
	params["ship__addr"] = "4469 Chestnut Street"
	params["ship_city"] = "Tampa"
	params["ship_state"] = "FL"
	params["ship_zip_code"] = "33602"
	params["ship_country"] = "US"

	res, err := flp.Validate(params)

	fmt.Printf("%+v\n", res)
}

Then, run this command to get the validation result.

go run .

This is the sample output:

This example sends an order validation request to FraudLabs Pro and prints the fraud analysis result.

For detailed documentation and other examples, visit the official FraudLabs Pro Go SDK page.

For developer guides, visit the FraudLabs Pro Developer Guide page.

Conclusion

The FraudLabs Pro Go SDK provides developers with a simple and reliable way to integrate fraud prevention features into their Go applications. With built-in features for fraud analysis, credit card validation and SMS verification, it helps businesses reduce chargebacks and block fraudulent activities.

Start building secure, reliable applications today with the FraudLabs Pro Go SDK and stay ahead of online fraud.


Fortify Your Business Against Fraud

Streamline your works with our fraud detection API now!

Was this article helpful?

Related Articles