---
title: "Generate HPP"
method: POST
path: "/hpps"
tags: ["Hosted Payment Page"]
---

# Generate HPP

`POST /hpps`

## Request

- Base URL: `https://tb.paymentfusion.com`
- URL: `https://tb.paymentfusion.com/hpps`
- Auth: none declared. Required headers: `Authorization`, `Accept`, `Content-Type`

Called by the Independent Software Vendor. Generates a Hosted Payment Page

## Headers

- `Authorization` string, api_id:api_token, required
- `Accept` string, required
- `Content-Type` string, required

## Request body `application/x-www-form-urlencoded`

- object
  - `id` string, required: The HPP identifer for the transaction
  - `transaction_type` string, required: The type of transaction that will be performed. (e.g. transaction_type=Sale) Allowed Values - `"Auth"`, `"Sale"`, `"SaveOnly"`
  - `amount` number, float, required: The amount in USD up to 6 decimals that will be charged, must be a number greater than 0 and its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
  - `invoice_number` string: The invoice number of the transaction that will be performed. (e.g. invoice_number=INV333)
  - `pn_ref` string: The gateway's transaction reference number (e.g. pn_ref=523222)
  - `echo_fields` boolean: Enable echo_fields
  - `approved_redirect` string: Redirect URL for approval
  - `declined_redirect` string: Redirect URL for declined
  - `send_customer_receipt` boolean: Determines if the receipt should be sent or not
  - `receipt_template` string: Allowed Values - `"pending"`, `"approved"`, `"declined"`, `"void"`, `"error"`, `"installment"`, `"refund"`, `"refunded"`, `"credit"`, `"default"`
  - `customer_email` string: Specifies the customer email address
  - `test_mode` boolean: Enable test_mode
  - `force_duplicate` boolean: Allows multiple transactions with the same amount to be created on the same merchant
  - `amount_is_editable` boolean: Specifies if the amount is editable or not
  - `non_taxable` boolean: Specifies if the transaction is non taxable
  - `tax_amount` number, float: Specifies the tax amount value in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
  - `shipping_amount` number, float: Specifies the shipping amount value in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
  - `discount_amount` number, float: Specifies the discount value in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
  - `tip_amount` number, float: Specifies the tip value in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
  - `customer_name` string: Specifies the customer name
  - `phone_number` string: Specifies the customer phone number
  - `billing_first_name` string: Specifies the billing first name
  - `billing_last_name` string: Specifies the billing last name
  - `billing_address_1` string: Specifies the billing address line 1
  - `billing_address_2` string: Specifies the billing address line 2
  - `billing_city` string: Specifies the billing city
  - `billing_state` string: Specifies the billing state
  - `billing_zip` string: Specifies the billing zip code
  - `shipping_is_billing` boolean: Specifies if the shipping address is the same as the billing address
  - `shipping_first_name` string: Specifies the shipping person first name
  - `shipping_last_name` string: Specifies the shipping person last name
  - `shipping_address_1` string: Specifies the shipping address line 1
  - `shipping_address_2` string: Specifies the shipping address line 2
  - `shipping_city` string: Specifies the shipping city
  - `shipping_state` string: Specifies the shipping state
  - `shipping_zip` string: Specifies the shipping address zip code
  - `comment` string: Specifies a comment for the transaction
  - `description` string: Specifies the description of the transaction
  - `clerk` string: Sales clerk. Optional value indicating the clerk/person processing transaction, for reporting purposes.
  - `remote_id` string: Specifies the remote id
  - `merchant_trans_id` string: Merchant Transaction Id. Must be between 1 and 39 characters in length. When using the Elavon Processor, this field will contain a 3 character Facility ID concatenated with the Patient Account Number which will be passed to the Elavon Processor.
  - `expiration_in_days` integer: Sets the expiration in days for the transaction between 1-365. 1 is the default value.
  - `sec_code` string: The Standard Entry Class (SEC) value to use with processors that require it. If left empty, the default value will be `"WEB"`. Allowed values - `"WEB"`, `"TEL"`
  - `short_url` boolean: Generates a short HPP URL
  - `custom_fields` string: Optional field of comma separated key=value pairs (e.g. custom_fields=key_1=value_1,key_2=value_2,key_3=value_3) reserved keys tb_id, tb_transaction_type
  - `callback_url_1` string: One of the three URLs where Transaction Broker will POST to when a HPP request is completed. This eliminates the need for polling for the request's status. Only HTTPS URLs are allowed. The callback will the callback will retry if the host is unresponsive. The response received from the callback url must have the response code 2xx. Basic auth credentials may be added in to url ie. 'https://username:password@address.com' or as an url param 'https://address.com?token=secret'. Size range - `0..2000`.
  - `callback_url_2` string: One of the three URLs where Transaction Broker will POST to when a HPP request is completed. This eliminates the need for polling for the request's status. Only HTTPS URLs are allowed. The callback will the callback will retry if the host is unresponsive. The response received from the callback url must have the response code 2xx. Basic auth credentials may be added in to url ie. 'https://username:password@address.com' or as an url param 'https://address.com?token=secret'. Size range - `0..2000`.
  - `callback_url_3` string: One of the three URLs where Transaction Broker will POST to when a HPP request is completed. This eliminates the need for polling for the request's status. Only HTTPS URLs are allowed. The callback will the callback will retry if the host is unresponsive. The response received from the callback url must have the response code 2xx. Basic auth credentials may be added in to url ie. 'https://username:password@address.com' or as an url param 'https://address.com?token=secret'. Size range - `0..2000`.
  - `allow_partial_auth` boolean: Sets the flag for allowing partial payment. If not set then it is not sent in the HPP request.
  - `healthcare` HealthcareRequestFields: Optional parameters passed to the gateway.
    - `iias_verified` 'true' | 'false' | 'exempt': Merchant verified/did not verify the purchased items against an IIAS or Merchant claims exemption from IIAS based on the 90 percent rule.
    - `healthcare_amount` string: Amount health-care. Field includes the amounts in prescription_amount, vision_amount, clinic_other_amount, dental_amount and should always be equal or greater to their sum. Available for Visa and Mastercard only. Described in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
    - `prescription_amount` string: Total amount of prescriptions used to gain access to "Rx Only" purses. This amount is included in the health-care_amount. Available for Visa and Mastercard only. Described in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
    - `copay_amount` string: Total amount for co-payments. Described in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
    - `vision_amount` string: Total amount of vision care purchases. This amount is included in healthcare_amount. Available for Visa only. Described in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
    - `clinic_other_amount` string: Total amount of clinic or other medical services. This amount is included in healthcare_amount. Available for Visa only. Described in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
    - `dental_amount` string: Total amount of dental services. This amount is included in healthcare_amount. Available for Visa only. Described in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
    - `transit_amount` string: Total amount charged to an FSA card for transportation to/from a healthcare provider. Available for Visa only. Described in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
    - `cumulative_amount` string: Total cumulative authorized amount for a series of incremental authorization transactions. Described in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").

## Response `200`

Success

- object
  - `hpp` string: Full URL for the retrieved HPP
  - `v` string: The API version that was used to handle the request.

## Other responses

- `4XX`: Possible errors - 1, 28, 29, 85, 106, 189, 223, 225, 226, 251, 257, 259, 275, 276, 277, 278, 281, 282, 283
- `5XX`: Possible errors - 221

---

[API](https://skmtc.dev/bankofamerica/apis/transaction-broker-api.md) - [All operations](https://skmtc.dev/bankofamerica/apis/transaction-broker-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bankofamerica/apis/transaction-broker-api/revisions/6097bc689e41?raw)
