Signing the API parameters is a feature that allows you to secure your 2Pay API calls, by using MD5 encryption and authenticated hash.
You will need to retrieve your API token from the 2Pay Dashboard in order to build the parameters of your API calls. API parameters must be signed with MD5 encryption.
Building the API parameter signature
To sign the API parameters, you need to follow these steps:
Sort the parameters alphabetically according to the parameter name.Delete parameters with empty values.
Concatenate the parameter names and values using '=' and '&' character.
Append the MD5 hash value of your API token to the end of your parameters with the '&' prefix.
Calculate the MD5 hash value of the Step 3 result.
📢 Parameters with empty values do not participate in the signature.