Scan Code

Create Scan Code

Called by the Independent Software Vendor. Returns a base64 encoded QR code.

post/scan_codes

Request

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

Headers

Authorizationstring api_id:api_token required

Needs to include Basic word before Base64 encoded api_id:api_token. The api_id is the identifier of the organization created on TAP; size range - up to 36 characters. The api_token is the unique token previously generated by TAP and provided securely to the organization; size range - 32. Example: Basic ODA5BVgrNdZkZmbiFlJlTThkYTA2eG00MzA5dHh1bWZnZgfdZDE=

Acceptstring required
Example:application/vnd.paymentfusion.v3.0.0+json

Specifies the requested API version. If this field is not specified or has an invalid format, the API will return an error. If the specified version does not exist, a 404 page will be displayed. Accepted values - application/vnd.paymentfusion.v3.0.0+json

Content-Typestring required
Example:application/x-www-form-urlencoded

The Content-Type entity header is used to indicate the media type of the resource.

Request body application/x-www-form-urlencoded

idstring required

The HPP identifer for the transaction

transaction_typestring required

The type of transaction that will be performed. (e.g. transaction_type=Sale)

Allowed Values - "Auth", "Sale", "SaveOnly"

amountnumber 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").

typestring required

The type of scan code that will be returned.

Allowed Values - "qr_code"

ttlinteger

The time to live in hours for the scan code. Default - 744, Range - 1 to 4464

invoice_numberstring

The invoice number of the transaction that will be performed. (e.g. invoice_number=INV333)

pn_refstring

The gateway's transaction reference number (e.g. pn_ref=523222)

echo_fieldsboolean

Enable echo_fields

approved_redirectstring

Redirect URL for approval

declined_redirectstring

Redirect URL for declined

send_customer_receiptboolean

Determines if the receipt should be sent or not

receipt_templatestring

Allowed Values - "pending", "approved", "declined", "void", "error", "installment", "refund", "refunded", "credit", "default"

customer_emailstring

Specifies the customer email address

test_modeboolean

Enable test_mode

force_duplicateboolean

Allows multiple transactions with the same amount to be created on the same merchant

amount_is_editableboolean

Specifies if the amount is editable or not

non_taxableboolean

Specifies if the transaction is non taxable

tax_amountnumber 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_amountnumber 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_amountnumber 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_amountnumber 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_namestring

Specifies the customer name

phone_numberstring

Specifies the customer phone number

billing_first_namestring

Specifies the billing first name

billing_last_namestring

Specifies the billing last name

billing_address_1string

Specifies the billing address line 1

billing_address_2string

Specifies the billing address line 2

billing_citystring

Specifies the billing city

billing_statestring

Specifies the billing state

billing_zipstring

Specifies the billing zip code

shipping_is_billingboolean

Specifies if the shipping address is the same as the billing address

shipping_first_namestring

Specifies the shipping person first name

shipping_last_namestring

Specifies the shipping person last name

shipping_address_1string

Specifies the shipping address line 1

shipping_address_2string

Specifies the shipping address line 2

shipping_citystring

Specifies the shipping city

shipping_statestring

Specifies the shipping state

shipping_zipstring

Specifies the shipping address zip code

commentstring

Specifies a comment for the transaction

descriptionstring

Specifies the description of the transaction

clerkstring

Sales clerk. Optional value indicating the clerk/person processing transaction, for reporting purposes.

remote_idstring

Specifies the remote id

short_urlboolean

Generates a short HPP URL

custom_fieldsstring

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_1string

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_2string

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_3string

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.

Example request

{
  "transaction_type": "Sale"
}

Response

Success

idstring

identifier for the scan code in our system

scan_codestring

base64 encode png image of scan code

vstring

The API version that was used to handle the request.

Example response

{
  "id": "string",
  "v": "string"
}

Changes

No recorded changes to this operation across all 1 revision of this API.