How it works

  • 1. Now lets take your new payment integration for a spin. Go to ‘Process sale’ page and add some items to the cart and click on Pay button. This will open your payment page slider with all payment options including your newly added payment type.
  • 2. Click on your new payment option. This will open your Gateway URL in a slider and POST the payable amount there with other necessary information. Method used for the POST is Window.postMessage()
  • 3. Now your payment gateway should return an appropriate response (e.g.: Accepted, Declined, Timed out or Transaction cancelled) based on type of transaction (e.g.: Sale or refund). If you are following this process workflow using the example code we provided, the response options will appear on the slide out screen for you to select manually. Normally in your actual implementation, these responses will come from your payment device.

Acceptable response and return parameters

  • 1. Response

Hike will send parameters in following format to your Payment Gateway URL

{https://yourpaymentgateway.com}?amount=10.50&origin=https://yourHikeAccount.hikeup.com&reference_id=c63ba4db-aec7-4bc5-aef5-f07e07cf3c88

Amount: Amount are included with decimal points.

Origin: In a string format. Your Hike store URL. This is where the request is originated from. Please ensure to POST your responses to this origin URL.

Reference_id: In a string format. It is a unique id for this payment transaction. Required field.

  • 2. Return

This are the messages Hike expects to receive from your Payment Gateway URL.

Use post() message method to send return responses to Hike. Successful payment response example included below:

var message = JSON.stringify({ "action": "ACCEPT" }); window.parent.postMessage(message,"https://.hikeup.com");

Required

Key

Type

Required

Description

action

String

Required

Required and there are various action parameters possible which are explained in table below.

transaction_id

String(guid)

Required

This must match the transaction ID included in the original payment query parameter sent by Hike

Possible actions include

ACCEPT

It means the transaction was processed successfully. If printing is enabled an approved transaction receipt will also print.

ACCEPT_SIGNATURE

It means that the transaction was successfully processed and customer signature is requested. It will print a receipt with signature slip. You may add content to the receipt with the external_transaction_id, card_last_four, payment_date, terminal_serial_number, signature_url and signature_base64 fields. If printing is enabled an approved transaction receipt will also print.

IN PROCESS

Transaction is in progress and so Hike will show the Ajax loader to suggest that the payment transaction is in progress.

DECLINE

This means that the transaction payment was declined at payment terminal. If printing is enabled a declined transaction receipt will also print.

Optional options

Key

Type

Required

Descriptions

terminal_transaction_id

string (36)

optional

Unique identifier of payment gateway reference

merchant_id

string (36)

optional

Merchant unique identifier

terminal_serial_number

string (36)

optional

Serial number of payment terminal

terminal_model_no

string (36)

optional

Payment terminal modal number

entry_method

string

optional

Enum: SWIPED, KEYED, CONTACTLESS, CHIP, FALLBACK

card_type

string

optional

Enum: OTHER, VISA, MASTERCARD, AMERICAN_EXPRESS, DISCOVER, DISCOVER_DINERS, JCB, CHINA_UNIONPAY, EBT, ENROUTE, INTERAC, VOYAGER, WEX

payment_method

string

optional

Enum: CREDIT, DEBIT

card_last_4

string

optional

The last 4 digits of the card number

signature_url

string

optional

The digital signature image as a public URL.

receipt_text

string

optional

Receipt text