---
updatedAt: 2025-03-18T22:48:06.000Z
agentTools:
  projectIndex: https://docs.shophumm.com.au/llms.txt
---

# Pre-Population API

# Pre-Population API

## Overview

The Pre-Population API has been designed for merchants who obtain and store their customers information within their own CMS. When a customer would like to purchase with humm, the Merchant can easily populate data from their CMS into a humm Buyer Portal application automatically using this API.

## How does it work?

The client's browser performs a post to humm's API. The POST endpoint returns a view. This view is essentially a UI to complete the final payment step (and resolve any validation errors from the posted data).

An approved, declined, error page may follow an authorisation. These pages do not redirect automatically. The page relies on the client to press the **Redirect Now** button. This action will redirect to the URLs you provided in the original POST.

<br />

![https://files.readme.io/7b5419423d8c0e08f6c1ef85036af5c85dbb1d3d6e7c8d1c31a39473e5bb2ad9-image.png](https://files.readme.io/7b5419423d8c0e08f6c1ef85036af5c85dbb1d3d6e7c8d1c31a39473e5bb2ad9-image.png)

<br />

## Resource Information

|                             |                                               |
| --------------------------- | --------------------------------------------- |
| **HTTP Method**             | POST from a client side HTML page             |
| **Testing Resource URL**    | <https://integration-seller.shophumm.com.au/> |
| **Production Resource URL** | <https://seller.shophumm.com.au/>             |

<br />

## Data Definitions

### Request Parameters

#### Account Details

| Key            | Type       | Required | Sample   | Description                                                                                               |
| -------------- | ---------- | -------- | -------- | --------------------------------------------------------------------------------------------------------- |
| x\_account\_id | String     | True     | 30199999 | The merchant number provided to you by Humm.                                                              |
| x\_signature   | String     | True     |          | The signature for this request. See the section [Signature Generation](#signature-generation) for details |
| x\_guid        | Guid (200) | False    |          | Your GUID reference for this transaction (required for resuming transactions)                             |
| x\_reference   | String     | False    | ABC123   | Your reference for this transaction                                                                       |
| x\_test        | Boolean    | False    | True     | Perform process under test mode                                                                           |

#### Staff Information

| Key                   | Type   | Required | Sample | Description                                                    |
| --------------------- | ------ | -------- | ------ | -------------------------------------------------------------- |
| x\_staff\_first\_name | String | False    | Harry  | The first name of the staff member processing this transaction |
| x\_staff\_last\_name  | String | False    | Tipper | The last name of the staff member processing this transaction  |

#### Transaction Details

| Key                | Type      | Required | Sample       | Description                                                                                                   |
| ------------------ | --------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------- |
| x\_currency        | String    | False    | AUD, NZD     | Will default to AUD if not specified                                                                          |
| x\_amount          | Decimal   | False    | 1500.00      | The total sales amount of the transaction                                                                     |
| x\_deposit\_amount | Decimal   | False    | 100.00       | The deposit paid by the customer                                                                              |
| product            | String    |          | Diamond Ring | Short description of the item or service purchased. **NOTE**: This is excluded from the API signature process |
| x\_vip\_number     | Long (10) | False    | 1234567890   | The customer's VIP or Pre-Approval number                                                                     |

<br />

#### Customer Personal Information

| Key                        | Type   | Required | Sample                            | Description                                                |
| -------------------------- | ------ | -------- | --------------------------------- | ---------------------------------------------------------- |
| x\_customer\_title         | String | False    | Mr = 1, Mrs = 2, Ms = 3, Miss = 4 | The customer's title                                       |
| x\_customer\_first\_name   | String | False    | John                              | The customer's first name                                  |
| x\_customer\_middle\_name  | String | False    | Andrew                            | The customer's middle name (not initial)                   |
| x\_customer\_last\_name    | String | False    | Smith                             | The customer's surname                                     |
| x\_customer\_email         | String | False    | <ASmith@gmail.com>                | The customer's email address                               |
| x\_customer\_mobile\_phone | String | False    | 0400123123                        | The customer's mobile phone number                         |
| x\_customer\_home\_phone   | String | False    | 0881231234                        | The customer's full home phone number                      |
| x\_customer\_dob           | Date   | False    | 1980-12-01                        | The customer's date of birth (ISO8601), 18 years and older |

#### Customer Address

| Key                                  | Type    | Required | Sample                              | Description                            |
| ------------------------------------ | ------- | -------- | ----------------------------------- | -------------------------------------- |
| x\_customer\_address\_unit           | String  | False    | 1                                   | The customer's address (unit number)   |
| x\_customer\_address\_street\_number | String  | False    | 97                                  | The customer's address (street number) |
| x\_customer\_address\_street\_name   | String  | False    | Pirie                               | The customer's address (street name)   |
| x\_customer\_address\_street\_type   | String  | False    | Street                              | The customer's address (street type)   |
| x\_customer\_suburb                  | String  | False    | Adelaide                            | The customer's address (suburb)        |
| x\_customer\_state                   | String  | False    | ACT, NSW, QLD, SA, TAS, NT, VIC, WA | The customer's address (state)         |
| x\_customer\_postcode                | Integer | False    | 5000                                | The customer's address (postcode)      |
| x\_customer\_country                 | String  | False    | AU, NZ                              | Will default to AU if not specified    |

#### Employment Information

| Key                                       | Type    | Required | Sample                           | Description                                                     |
| ----------------------------------------- | ------- | -------- | -------------------------------- | --------------------------------------------------------------- |
| x\_customer\_employment\_type             | Integer | False    | FullTime = 1, PartTime = 2, etc. | Employment type of the customer                                 |
| x\_customer\_employment\_hours\_per\_week | Decimal | False    | 38                               | Customer's total working hours (Not required for APC, VPC, SFR) |
| x\_customer\_employer\_name               | String  | False    | BHP Billiton                     | Customer's employer (Not required for APC, VPC, SFR)            |
| x\_customer\_employer\_suburb             | String  | False    | Adelaide                         | Customer's employer suburb                                      |
| x\_customer\_work\_phone                  | String  | False    | 0882345678                       | Customer's work phone number                                    |
| x\_customer\_abn                          | String  | False    | 99 888 888 888                   | Customer's ABN/ACN (Only if Self Employed)                      |
| x\_customer\_last\_pay\_date              | Date    | False    | 2018-05-01                       | Customer's last pay date                                        |

<br />

#### Identification

| Key                           | Type    | Required | Sample                    | Description                                |
| ----------------------------- | ------- | -------- | ------------------------- | ------------------------------------------ |
| x\_customer\_id\_type         | Integer | False    | 1: Driver's License, etc. | Identity type provided by the customer     |
| x\_customer\_id\_state        | String  | False    | SA                        | State where the Customer's Identity issued |
| x\_customer\_id\_expiry\_date | Date    | False    | 2020-01-01                | Expiry date of Customer's Identity card    |
| x\_customer\_id\_number       | String  | False    | abc255q                   | Identity card number                       |
| x\_customer\_id\_reference    | String  | False    | 123                       | Additional identity card number/reference  |

#### URLs

| Key              | Type         | Required | Sample                       | Description                          |
| ---------------- | ------------ | -------- | ---------------------------- | ------------------------------------ |
| x\_url\_cancel   | String (200) | False    | <https://example.com/Cancel> | Redirect URL for cancellation/errors |
| x\_url\_complete | String (200) | False    | <https://example.com/API>    | Callback URL for API response        |

## Response Parameters

| Key                 | Type     | Description                                                             |
| ------------------- | -------- | ----------------------------------------------------------------------- |
| x\_account\_id      | String   | Your humm Merchant Number                                               |
| x\_purchase\_number | String   | Your purchase number for this transaction                               |
| x\_reference        | String   | Your originating reference for this transaction                         |
| x\_guid             | Guid     | Your originating GUID reference for this transaction                    |
| x\_test             | Boolean  | Test mode enabled flag                                                  |
| x\_amount           | Decimal  | The purchase amount of the transaction                                  |
| x\_deposit          | Decimal  | The deposit amount required for this transaction                        |
| x\_timestamp        | DateTime | System timestamp for the transaction                                    |
| x\_result           | String   | Response code (Pending, Approved, Cancelled, Declined, Errors, Expired) |
| x\_signature        | String   | Response signature for verification                                     |

## Code Examples

### HTML Generation

```
private function postToCheckout($checkoutUrl, $payload)

{

            echo

            "<html>

                        <body>

                        <form id='form' action='$checkoutUrl' method='post'>";

            foreach ($payload as $key => $value) {

                        echo "<input type='hidden' id='$key' name='$key' value='$value'/>";

            }

            echo

            '</form>

                        </body>';

            echo

            '<script>

                                    var form = document.getElementById("form");

                                    form.submit();

                        </script>

            </html>';

}
```

<br />

## Testing

The merchant API has a test page for constructing a valid POST message at <https://uat-seller.shophumm.com.au/TEST/API>. Make sure each request has a unique (GUID) API reference. You may want to use a form auto-filler such as Chrome recorder as this is a very large form.

> **Note**: If you require Sandbox Credentials for testing the API, please reach out to us via the [Integration Assistance Form](https://docs.shophumm.com.au/docs/assistance).