This reference outlines the steps for initializing HelcimPay.js, including obtaining the checkoutToken for rendering the payment iFrame covered in the implementation process and the secretToken for validating the transaction response covered in the validation process.
The table below outlines the required headers for the request.
|api-token||String||Required||The api access token. Refer to this support article.|
The table below outlines the required payload for the request.
|amount||Number||Required||The final amount of the transaction to process.|
|currency||String||Required||The currency of which the transaction will be processed.|
CAD | USD
|paymentType||String||Required||The type of transaction.|
verify | purchase | preauth
|customerCode||String||Optional||An existing Helcim customer’s code you want to tie the transaction with. If this field is not present, a new customer will be created and linked to the transaction.|
|invoiceNumber||String||Optional||An existing Helcim due invoice number you want to process. If this field is not present, a new invoice will be created and linked to the transaction.|
Below is an example API call implementation that initializes the HelcimPay.js instance. Refer to the developer documentation for more interactive examples.
fetch('https://api.myhelcim.com/v2/helcim-pay/initialize', payload) .then(response => console.log(response)) .catch(err => console.error(err));
The table below details the response payload received from the API upon successful execution.
|checkoutToken||String||The token used for displaying the HelcimPay.js modal.|
|secretToken||String||The token used for validating the transaction response.|
Updated about 2 months ago