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.
14001400
  • 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()
14001400
  • 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

KeyTypeRequiredDescription
actionStringRequiredRequired and there are various action parameters possible which are explained in table below.
transaction_idString(guid)RequiredThis must match the transaction ID included in the original payment query parameter sent by Hike

Possible actions include

ACCEPTIt means the transaction was processed successfully. If printing is enabled an approved transaction receipt will also print.
ACCEPT_SIGNATUREIt 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 PROCESSTransaction is in progress and so Hike will show the Ajax loader to suggest that the payment transaction is in progress.
DECLINEThis means that the transaction payment was declined at payment terminal. If printing is enabled a declined transaction receipt will also print.

Optional options

KeyTypeRequiredDescriptions
terminal_transaction_idstring (36)optionalUnique identifier of payment gateway reference
merchant_idstring (36)optionalMerchant unique identifier
terminal_serial_numberstring (36)optionalSerial number of payment terminal
terminal_model_nostring (36)optionalPayment terminal modal number
entry_methodstringoptionalEnum: SWIPED, KEYED, CONTACTLESS, CHIP, FALLBACK
card_typestringoptionalEnum: OTHER, VISA, MASTERCARD, AMERICAN_EXPRESS, DISCOVER, DISCOVER_DINERS, JCB, CHINA_UNIONPAY, EBT, ENROUTE, INTERAC, VOYAGER, WEX
payment_methodstringoptionalEnum: CREDIT, DEBIT
card_last_4stringoptionalThe last 4 digits of the card number
signature_urlstringoptionalThe digital signature image as a public URL.
receipt_textstringoptionalReceipt text