SnapPay gateway Guide
Additional notes |
---|
SnapPay uses HMAC-SHA256 authentication with an API auth code for secure communication. The api_auth_code is used to generate HMAC signatures for all API requests. |
MD5 encoding can be enabled for payload encoding during HMAC generation, but this is disabled by default in Spreedly. When md5_enabled is set to true, the payload is encoded with Digest::MD5.digest before being included in the HMAC signature. |
The company_code field is mandatory for all transactions. This field identifies the company within the SnapPay system and must be provided for proper transaction routing. |
SnapPay will bypass the logic of identifying the merchant ID for the transaction when merchant_id parameter is provided. |
SnapPay Documentation: https://developer.fiserv.com/product/SnapPay/ |
SnapPay requires that all cards are Tokenized with SnapPay prior to transacting. Utilizing a Spreedly Credit Card Payment method in transactions will automatically attempt to vault the card on every transaction. You can also utilize Store prior to transacting and then utilize the Third Party Token. |
SnapPay supports Visa, Mastercard, American Express, and Discover |
Adding an Snappay gateway
To add a SnapPay gateway, use the following cURL command:
curl https://core.spreedly.com/v1/gateways.xml \
-u 'C7cRfNJGODKh4Iu5Ox3PToKjniY:4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ' \
-H 'Content-Type: application/xml' \
-d '<gateway>
<gateway_type>snap_pay</gateway_type>
<account_id>your_account_id</account_id>
<user_id>your_user_id</user_id>
<password>your_password</password>
<api_auth_code>your_api_auth_code</api_auth_code>
<md5_enabled>false</md5_enabled>
</gateway>
Required Credentials
account_id
: Your SnapPay account identifieruser_id
: Your SnapPay user identifierpassword
: Your SnapPay passwordapi_auth_code
: Your API authentication code used for HMAC signature generation
Optional Gateway Settings
md5_enabled
: Set to true to enable MD5 encoding of payload during HMAC generation (default: false)
Gateway Specific Fields
Required Fields
company_code
: The company code identifier (mandatory for all transactions)
Common Fields
merchant_id
: The merchant ID. If provided, SnapPay will bypass merchant ID identification logic.
Transaction Fields
branch_plant
: Branch or plant identifierorder_type
: Type of order being processedcustomer_id
: Customer identifieruser_id
: User identifier for the transactionreference
order_date
invoice_id
ecom_indicator
: E for ecommerce, R for recurring & T for telephone. Default value is set at MID in SnapPay
Stored Credentials (COF) Fields
cof
: Credential on File indicator ('C' for cardholder-initiated, 'M' for merchant-initiated)cof_scheduled
: Scheduled transaction indicator ('Y' for scheduled, 'N' for unscheduled)
You will need to use these fields to indicate card on file transactions with Third Party Tokens.
Fee Management Fields
fee_value
: Fee amount for the transactionfee_format
: Format of the fee (e.g., 'fixed', 'percentage')waive_fee
: Whether to waive the fee ('Y' or 'N')
Shipping Fields
shipping_from_zip
: ZIP code where the order is shipped from
Store Operation Fields (for tokenization)
request_type
: Request Type - 'C' for customer and 'S' for supplier. 'C' is the default value if this parameter is not sent.dl_state
: 2-letter state code where driver's license is issued. Required if check_type is 'P' and identification_type is 'D'.identification_type
: Identification Type - 'T' for TaxID, 'S' for SSN and 'D' for Driver's License. 'T' is applicable if check_type is 'C' and 'S' or 'D' is applicable if check_type is 'P'. Required if request_type is 'S' or TeleCheck is used for ACH.identification_number
: Identification Number - Tax ID, SSN or Driver's License Number (max 50 characters). Required if request_type is 'S' or TeleCheck is used for ACH.check_type
: Check Type - 'C' for corporate and 'P' for personal. Required if request_type is 'S' or TeleCheck is used for ACH
Stored Credentials
For SnapPay, sending stored credential fields can be done using Spreedly’s first class support. For any Authorize
or Purchase
request, you need to include two fields which tell Spreedly a little bit more about the nature of the transaction:
- stored_credential_initiator
- stored_credential_reason_type
Learn more about how Spreedly enables use of stored credentials by reviewing our Stored Credentials guide.
Gateway Specific Response Fields
SnapPay returns the following gateway-specific response fields in the gateway_specific_response_fields:
Transaction Response Fields
token_id
: Token identifier for stored payment methodsauthorization_code
: Authorization code from the processorprocessor_response_code
: Response code from the processortotal_transaction_amount
: Total amount of the transaction
Fee Response Fields
fee_return_code
: Return code for fee processingfee_return_description
: Description of fee processing resultfee_transaction_id
: Transaction ID for fee processingfee_auth_code
: Authorization code for fee processingfee_status
: Status of fee processingfee_amount
: Amount of the feefee_type
: Type of fee applied
Updated about 13 hours ago