Using Mazooma APIs


Mazooma APIs follow the general patterns of REST. You manage Merchant resources (payins, payouts, reports, etc.) by making HTTPS requests to URLs, or endpoints, that represent those resources.

Staging versus Production

Mazooma Merchants are provided a staging account, which allows access to an isolated environment where you can test your system integration and prepare it for production.

When your integration has been fully implemented and tested in the staging environment, the Merchant Integration team will certify your integration (see, post integration) and provide your production account credentials.

About access tokens

To use a Mazooma API, you must provide an access token with every API call. An access token has specific permissions to resources in a specific Merchant account. Use an access token that is appropriate for your use case.

For more information, see Authentication.

Creating an HTTPS request

All API requests must be made over HTTPS. The base URL for the request is https://staging.mazoomagateway.com. The complete URL, or endpoint, varies depending on the resource being accessed and is shown on the relevant API reference page. For more information about service URLS, see prerequisites.

For example, to make an interactive transaction request, the URL is: https://staging.mazoomagateway.com/transaction/v4/interactive

In addition to the correct URL, you also need to specify the appropriate headers, method, request body, and query parameters.

Let’s start with a basic request using cURL.

This cURL command passes a JSON object containing the values used to initiate a Consumer payment using the interactive transaction endpoint:

POST /transaction/V4/interactive

curl https://staging.mazoomagateway.com/transaction/v4/interactive
-H 'x-pgw-app-id: 123' 
-H 'x-pgw-client-id: qa'
-H 'Authorization: Bearer ACCESS_TOKEN'
-H "Content-type: application/json"

-d '{
    "product": "ECHECKSELECT",
    "countryCode": "US",
    "transactionRegion": "NJ",
    "language": "en_us",
    "dataPassThrough": "sub-",
    "originatorIp": "127.0.0.1",
    "merchant": {
    "merchantId": "12345678",
    "merchantUserId": "123User123",
    "merchantTransactionId": "123123456",
    "merchantSubId": "0"
    },