Support Services

SWP Checkout Hashing

When using the SWP checkout option using hashing, please use the standard hash for transaction signing:


Hashing Format for Transaction Signing

HMAC-MD5("pg_apilogin_id | pg_transaction_type | pg_version_number | pg_total_amount | pg_utc_time | pg_transaction_order_number", “Secure Transaction Key” )


The following example will demonstrate what is needed to perform the correct computation of the algorithm:



<input name="pg_billto_postal_name_first" type="text" value="Bob"/>
<input name="pg_billto_postal_name_last" type="text" value="Smith"/>
<input type="hidden" name="pg_api_login_id" value="APILOGINID"/>
<input type="hidden" name="pg_transaction_type" value="10"/>
<input type="hidden" name="pg_version_number" value="1.0"/>
<input type="hidden" name="pg_total_amount" value="5.00"/>
<input type="hidden" name="pg_utc_time" value="634094514514687490"/>
<input type="hidden" name="pg_transaction_order_number" value="100055"/>
<input type="hidden" name="pg_ts_hash" value="4bac0b9badbea7730cd41c334384bdfa"/>



Note: 'pg_ts_hash' was computed like this:

pg_ts_hash=HMAC-MD5("APILOGINID|10|1.0|5.00|634094514514687490|100055", "SECURETRANSACTIONKEY")


Have you generated your API Login ID and Secure Transaction Key? If not, you’ll need to log into our gateway under “Gateway Settings”>Gateway Key and generate both items;

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

Related Articles