Overview

Mazooma is a payment option In the US that processes payments and withdrawals via the Automated Clearing House (ACH) network. The Paysafe Checkout supports Mazooma as a Payment Method.

Setup Requirements

For Paysafe to create a test account in a sandbox and production environment, contact Mazooma and get the following details.

  • Name
  • Merchant ID
  • Merchant Site ID
  • Merchant Secret Key

Certification Requirements

Each merchant is required to go through a certification process to support Mazooma as a payment method. For more information, see Mazooma Developer site.

Transaction Types

We support two types of transactions:

  1. Payments are used to transfer money from a customer's bank account to a merchant account. Post successful payments, the merchant credits the customer's wallet.
  2. Withdrawal is used to transfer money from the merchant account to the customer's bank account.

Example Payment Form

The following code sample shows a minimal Paysafe Checkout example that creates a payment overlay for the user. The overlay contains a payment button that creates a payment handle for the data entered by the user and displays the payment handle token (if successful) in the browser console.

<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
        <script src="https://hosted.paysafe.com/checkout/v2/paysafe.checkout.min.js"></script>
        <script src="https://hosted.paysafe.com/checkout/v2/paysafe.checkout.min.js"></script>
    </head>
    <body style = "width :'100%'">
        <button onclick="checkout()"> Deposit $25 </button>
    </body>
    <script>
        function checkout() {
        var PAYSAFECARD_CONSUMER_ID = "merchantclientid5HzDvoZSodKDJ7X7VQ";
        var PAYSAFECASH_CONSUMER_ID = "123456";
        var SIGHTLINE_CONSUMER_ID = "user8525";
        var SKRILL_CONSUMER_ID = "gregeteller@mailinator.com";
        paysafe.checkout.setup("c3V0LTM0ODg2MDpCLXFhMi0wLTVkM2VjYjMwLTEtMzAyYzAyMTQyYTM3NjgxMmE2YzJhYzRlNmQxMjI4NTYwNGMwNDAwNGU2NWI1YzI4MDIxNDU1N2EyNGFiNTcxZTJhOWU2MDVlNWQzMjk3MjZjMmIzZWNjNjJkNWY=",
        {
        "currency": "USD",
        "amount": 2500,
        "locale": "en_US",
        "amountoptions": [500,10000,60000],
        "simulator": "EXTERNAL",
        "merchantRefNum": "193767720k213012",
        "canEditAmount": true,
        "billingAddress": {
        "nickName": "Address 2",
        "street": "222333 Peachtree Place",
        "street2": "jhgsadjsa",
        "city": "Atlanta",
        "zip": "30318",
        "country": "US",
        "state": "GA"
        },
        "environment": "TEST",
        "merchantDescriptor": {
        "dynamicDescriptor": "Paysafe test",
        "phone": "9505610677"
        },
        "customer": {
            firstName: "ALBERTA",
            lastName: "BOBBETHCHARLESON",
            email: "accountholder0@example.com",
            phone: "1234567890",
            dateOfBirth: {
                day: 23,
                month: 12,
                year: 1990
            }
        },
        threeDs : {
        merchantUrl: window.location.href,
        messageCategory: "PAYMENT",
        authenticationPurpose: "PAYMENT_TRANSACTION",
        deviceChannel: "BROWSER"
        },
        "paymentMethodDetails": {
        mazooma: { consumerId: "PP_100222" },
        }
        }, function(instance, error, result) {
        if (result && result.paymentHandleToken) {
        console.log(result);
        // make AJAX call to Payments API
        // alert(result.paymentHandleToken + " - token to be used to make server to server call to Payments API");
        instance.showSuccessScreen("Your goods are now purchased. Expect them to be delivered in next 5 business days.");
        } else {
        console.error(error);
        // Handle the error
        }
        }, function(stage, expired) {
        switch(stage) {
        case "BeforePayment": // Handle the scenario
        case "DuringPayment": // Handle the scenario
        case "AfterPayment": // Handle the scenario
        default: // Handle the scenario
        }
        }
        );
        }
    </script>
</html>

Example Withdrawal Form

The following code sample shows a minimal Paysafe Checkout example that creates a payment overlay for the user. The overlay contains a withdraw button that creates a payment handle for the data entered by the user and displays the payment handle token (if successful) in the browser console.

<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
        <script src="https://hosted.paysafe.com/checkout/v2/paysafe.checkout.min.js"></script>
        <script src="https://hosted.paysafe.com/checkout/v2/paysafe.checkout.min.js"></script>
    </head>
    <body style = "width :'100%'">
        <button onclick="checkout()"> Withdraw $25 </button>
    </body>
    <script>
        function checkout() {
        var PAYSAFECARD_CONSUMER_ID = "merchantclientid5HzDvoZSodKDJ7X7VQ";
        var PAYSAFECASH_CONSUMER_ID = "123456";
        var SIGHTLINE_CONSUMER_ID = "user8525";
        var SKRILL_CONSUMER_ID = "gregeteller@mailinator.com";
        paysafe.checkout.setup("c3V0LTM0ODg2MDpCLXFhMi0wLTVkM2VjYjMwLTEtMzAyYzAyMTQyYTM3NjgxMmE2YzJhYzRlNmQxMjI4NTYwNGMwNDAwNGU2NWI1YzI4MDIxNDU1N2EyNGFiNTcxZTJhOWU2MDVlNWQzMjk3MjZjMmIzZWNjNjJkNWY=",
        {
        "currency": "USD",
        "amount": 2500,
        "payout": true,
        "payoutConfig" : {
            maximumAmount: 100000
        },
        "locale": "en_US",
        "amountoptions": [500,10000,60000],
        "simulator": "EXTERNAL",
        "merchantRefNum": "193767720k213012",
        "canEditAmount": true,
        "billingAddress": {
        "nickName": "Address 2",
        "street": "222333 Peachtree Place",
        "street2": "jhgsadjsa",
        "city": "Atlanta",
        "zip": "30318",
        "country": "US",
        "state": "GA"
        },
        "environment": "TEST",
        "merchantDescriptor": {
        "dynamicDescriptor": "Paysafe test",
        "phone": "9505610677"
        },
        "customer": {
            firstName: "ALBERTA",
            lastName: "BOBBETHCHARLESON",
            email: "accountholder0@example.com",
            phone: "1234567890",
            dateOfBirth: {
                day: 23,
                month: 12,
                year: 1990
            }
        },
        threeDs : {
        merchantUrl: window.location.href,
        messageCategory: "PAYMENT",
        authenticationPurpose: "PAYMENT_TRANSACTION",
        deviceChannel: "BROWSER"
        },
        "paymentMethodDetails": {
        mazooma: { consumerId: "PP_100222" },
                }
        }, function(instance, error, result) {
        if (result && result.paymentHandleToken) {
        console.log(result);
        // make AJAX call to Payments API
        // alert(result.paymentHandleToken + " - token to be used to make server to server call to Payments API");
        instance.showSuccessScreen("Your goods are now purchased. Expect them to be delivered in next 5 business days.");
        } else {
        console.error(error);
        // Handle the error
        }
        }, function(stage, expired) {
        switch(stage) {
        case "BeforePayment": // Handle the scenario
        case "DuringPayment": // Handle the scenario
        case "AfterPayment": // Handle the scenario
        default: // Handle the scenario
        }
        }
        );
        }
    </script>
</html>

The setup function creates and initializes the Paysafe Checkout in an overlay. Following are the parameters:

  • riskCallback (optional) - Use this function to receive the amount through the payment method the customer selected. Also, run the risk checks before a payment handle is created. Depending on the riskCallback response, the payment handle is created and returned in resultCallback.

Set Up Options

Options

Options Parameter Required Type Description
paymentMethodDetails Conditional object

These are additional parameters required for Mazooma payment types.

Payment Method Details

PaymentMethodDetails Parameter Required Type Description
mazooma true Object

Information related to mazooma to be passed in the object.

Mazooma Parameter Required Type Description
consumerId true string

Mazooma consumerId to be passed inside mazooma object.

Did you find this page useful?