Forte gateway guide
Quick Start
New to integrating Forte with Spreedly? Here's your setup guide:
- Retrieve your Forte credentials:
- This integration uses Forte REST v2. Create the gateway with these four values from your Forte merchant account:
- API Access ID. Send this as Spreedly
api_key. - API Secure Key. Send this as Spreedly
secret. - Location ID. Send this as Spreedly
location_id. Spreedly calls Forte asloc_{location_id} - Account ID. Send this as Spreedly
account_id. Spreedly calls Forte asact_{account_id}.
- API Access ID. Send this as Spreedly
- Spreedly authenticates with HTTP Basic (
api_key:secret) and sendsX-Forte-Auth-Account-Id: act_{account_id}.
- This integration uses Forte REST v2. Create the gateway with these four values from your Forte merchant account:
- Get familiar with the Spreedly API:
- Review Spreedly API basics.
- Review Gateways, Payment Methods, and Transactions.
- Add an Forte gateway to Spreedly in sandbox mode.
Review this documentation to understand more about how to test transactions.
| Additional notes |
|---|
|
Adding a Forte Gateway
To learn more about creating and managing gateways in the Marketplace, review the Gateway user guide. Visit your Connections area to review all gateways and add new ones. When creating your gateways, select Forte before completing the required fields. Select Sandbox to create a gateway in Sandbox mode.
Request
curl https://core.spreedly.com/v1/gateways.xml \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/xml' \
-d '<gateway>
<gateway_type>forte</gateway_type>
<api_key>Your Forte API Access ID</api_key>
<secret>Your Forte API Secure Key</secret>
<location_id>Your location id</location_id>
<account_id>Your account id</account_id>
</gateway>'Response
<gateway>
<token>KUq5DHdmsrsKq1UmMPdCHxnpxyz</token>
<gateway_type>forte</gateway_type>
<name>Forte</name>
<description nil="true"/>
<merchant_profile_key nil="true"/>
<sub_merchant_key nil="true"/>
<api_key>Your Forte API Access ID</api_key>
<location_id>Your location id</location_id>
<account_id>Your account id</account_id>
<characteristics>
<supports_purchase type="boolean">true</supports_purchase>
<supports_authorize type="boolean">true</supports_authorize>
<supports_capture type="boolean">true</supports_capture>
<supports_partial_capture type="boolean">false</supports_partial_capture>
<supports_credit type="boolean">true</supports_credit>
<supports_partial_credit type="boolean">true</supports_partial_credit>
<supports_general_credit type="boolean">true</supports_general_credit>
<supports_void type="boolean">true</supports_void>
<supports_verify type="boolean">true</supports_verify>
<supports_reference_purchase type="boolean">false</supports_reference_purchase>
<supports_purchase_via_preauthorization type="boolean">false</supports_purchase_via_preauthorization>
<supports_offsite_purchase type="boolean">false</supports_offsite_purchase>
<supports_offsite_authorize type="boolean">false</supports_offsite_authorize>
<supports_offsite_synchronous_purchase type="boolean">false</supports_offsite_synchronous_purchase>
<supports_offsite_synchronous_authorize type="boolean">false</supports_offsite_synchronous_authorize>
<supports_3dsecure_purchase type="boolean">false</supports_3dsecure_purchase>
<supports_3dsecure_authorize type="boolean">false</supports_3dsecure_authorize>
<supports_3dsecure_2_mpi_purchase type="boolean">false</supports_3dsecure_2_mpi_purchase>
<supports_3dsecure_2_mpi_authorize type="boolean">false</supports_3dsecure_2_mpi_authorize>
<supports_store type="boolean">false</supports_store>
<supports_remove type="boolean">false</supports_remove>
<supports_fraud_review type="boolean">false</supports_fraud_review>
<supports_network_tokenization type="boolean">false</supports_network_tokenization>
<supports_inquire_by_gateway_transaction_id type="boolean">true</supports_inquire_by_gateway_transaction_id>
<supports_inquire_by_order_id type="boolean">false</supports_inquire_by_order_id>
<supports_transaction_retry type="boolean">true</supports_transaction_retry>
<supports_stored_stored_credentials type="boolean">false</supports_stored_stored_credentials>
</characteristics>
<credentials>
<credential>
<name>api_key</name>
<value>Your Forte API Access ID</value>
</credential>
<credential>
<name>location_id</name>
<value>Your location id</value>
</credential>
<credential>
<name>account_id</name>
<value>Your account id</value>
</credential>
</credentials>
<gateway_settings>
</gateway_settings>
<gateway_specific_fields>
<gateway_specific_field>sec_code</gateway_specific_field>
<gateway_specific_field>service_fee_amount</gateway_specific_field>
<gateway_specific_field>xdata</gateway_specific_field>
</gateway_specific_fields>
<payment_methods>
<payment_method>credit_card</payment_method>
<payment_method>bank_account</payment_method>
</payment_methods>
<state>retained</state>
<redacted type="boolean">false</redacted>
<sandbox type="boolean">false</sandbox>
<mode>default</mode>
</gateway>Required Credentials
- api_key: Forte API Access ID
- secret: Forte API Secure Key
- location_id: Forte location id
- account_id: Forte account id
Purchase
curl https://core.spreedly.com/v1/gateways/[gateway_token]/purchase.json \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/json' \
-d '{
"transaction": {
"payment_method_token": "{{payment_method_token}}",
"amount": 100,
"currency_code": "ARS",
"order_id": "inquire-test-001"
}
}'amount is in cents. 100 is 1.00 ARS, which Spreedly sends to Forte as authorization_amount 1.00.
Authorize, capture, void, credit, general credit, verify, and inquire use the standard Spreedly transaction endpoints.
Gateway Specific Fields
For ACH transactions, Forte recommends passing sec_code to indicate the standard-entry class code of the transaction. Visit Forte's documentation for the available values. If you do not specify a value, PPD is sent.
If a merchant is configured to use service fees, then service_fee_amount can be included. This value is sent as given. It is a dollar amount, not cents. .50 is fifty cents.
The xdata object supports up to 9 fields of extra data, labeled xdata_1 through xdata_9. Each field can contain up to 80 characters. Values within this field cannot contain double quotation characters (i.e., "text").
<gateway_specific_fields>
<forte>
<sec_code>WEB</sec_code>
<service_fee_amount>.50</service_fee_amount>
<xdata>
<xdata_1>customer metadata</xdata_1>
<xdata_2>customer metadata</xdata_2>
<xdata_3>customer metadata</xdata_3>
<xdata_4>customer metadata</xdata_4>
<xdata_5>customer metadata</xdata_5>
<xdata_6>customer metadata</xdata_6>
<xdata_7>customer metadata</xdata_7>
<xdata_8>customer metadata</xdata_8>
<xdata_9>customer metadata</xdata_9>
</xdata>
</forte>
</gateway_specific_fields>| Field Name | Type | Required | Use Case (Description) | Example Value |
|---|---|---|---|---|
sec_code | String | No | ACH standard-entry class code. Sent on bank-account transactions. Defaults to PPD when omitted. | WEB |
service_fee_amount | String | No | Service fee for merchants configured to use service fees. Dollar amount, not cents. | .50 |
xdata | Object | No | Up to nine extra-data fields, xdata_1 through xdata_9. Each value is at most 80 characters and cannot contain a double quote. | See XML example |
Request
curl https://core.spreedly.com/v1/gateways/LlkjmEk0xNkcWrNixXa1fvNoTP4/purchase.xml \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/xml' \
-d '<transaction>
<payment_method_token>VX0ackf05WGJwvjkl0epp185xyz</payment_method_token>
<amount>100</amount>
<currency_code>USD</currency_code>
<gateway_specific_fields>
<forte>
<sec_code>WEB</sec_code>
<service_fee_amount>.50</service_fee_amount>
<xdata>
<xdata_1>customer metadata</xdata_1>
<xdata_2>customer metadata</xdata_2>
<xdata_3>customer metadata</xdata_3>
<xdata_4>customer metadata</xdata_4>
<xdata_5>customer metadata</xdata_5>
<xdata_6>customer metadata</xdata_6>
<xdata_7>customer metadata</xdata_7>
<xdata_8>customer metadata</xdata_8>
<xdata_9>customer metadata</xdata_9>
</xdata>
</forte>
</gateway_specific_fields>
</transaction>'Gateway Specific Response Fields
Some responses from Forte may contain an authorization_code. That is the authorization code used when calling the Forte API directly. You can find this value in gateway_specific_response_fields when present.
<transaction>
<token>LgpTNGjsWQs9DwdxcbreUVz0xyz</token>
<transaction_type>Purchase</transaction_type>
<gateway_specific_response_fields>
<forte>
<authorization_code>192837</authorization_code>
</forte>
</gateway_specific_response_fields>
</transaction>| Field Name | Type | Description |
|---|---|---|
authorization_code | string | Forte authorization code for the transaction. Spreedly also returns the Forte transaction id as gateway_transaction_id. |
To request any additional gateway_specific_fields or gateway_specific_response_fields, contact Support with your request and the gateway documentation for the fields of interest.
Bank account
Bank account is a supported payment method. Spreedly sends the bank account to Forte as an echeck on purchase, authorize, refund, and general credit:
account_holderfrom the payment method nameaccount_numberrouting_numberaccount_typecheck_numberfrom the bank-account number field, when presentsec_code, defaultPPD
A successful eCheck sale returns Forte response_code A01 and is stored as succeeded.
curl https://core.spreedly.com/v1/gateways/[gateway_token]/purchase.json \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/json' \
-d '{
"transaction": {
"payment_method_token": "bank_account_token",
"amount": 100,
"currency_code": "USD",
"gateway_specific_fields": {
"forte": {
"sec_code": "WEB"
}
}
}
}'Verify
Verify is a card account check. Spreedly sends one Forte request:
actionverifyauthorization_amount0.00
There is no preceding authorize and no following void. Forte returns A01 when the check is approved.
curl https://core.spreedly.com/v1/gateways/[gateway_token]/verify.json \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/json' \
-d '{
"transaction": {
"payment_method_token": "payment_method_token",
"currency_code": "USD",
"retain_on_success": true
}
}'Forte accepts a non-swiped zero-dollar verify for merchants whose authorizer supports it. Use a card payment method for this call.
Capture
Capture collects the full amount of a previous authorization. Spreedly sends:
actioncapturetransaction_idof the authorizationauthorization_code
authorization_amount is not included. Forte v2 defines capture as collecting the funds already authorized. A smaller amount on the Spreedly capture request is not forwarded, and supports_partial_capture is false.
curl https://core.spreedly.com/v1/transactions/[authorization_token]/capture.json \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/json' \
-d '{
"transaction": {}
}'A smaller charge is a separate transaction. Void the authorization before it settles, then run a sale for the lower amount.
Partial refund
Refund sends Forte action reverse with authorization_amount. A lower amount is a partial refund. More than one refund can be sent against the same purchase.
amount is in cents. A $1.00 purchase refunded for 50 is sent to Forte as authorization_amount 0.50.
curl https://core.spreedly.com/v1/transactions/[purchase_token]/credit.json \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/json' \
-d '{
"transaction": {
"amount": 50
}
}'Transaction sync
Forte inquire is supported by gateway transaction id. PATCH /v1/transactions/{token}.json with an empty transaction calls Forte GET /transactions/{transaction_id} and maps the status.
Approved Forte statuses move the transaction to succeeded: authorized, complete, funded, ready, settled, settling.
Failed Forte statuses move the transaction to gateway_processing_failed: declined, failed, rejected, unfunded, voided.
An unknown or unreadable Forte status leaves the current state unchanged.
A normal Forte purchase or authorize is approved in the same request and stored as succeeded, so the update API does not inquire it. Inquire runs for pending, processing, and gateway_processing_failed.
curl https://core.spreedly.com/v1/transactions/[transaction_token].json \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/json' \
-X PATCH \
-d '{
"transaction": {}
}'Additional resources
If you need support with this gateway, please contact Support at [email protected].
Forte documentation: https://forte.net/
Gateway user guide: https://developer.spreedly.com/docs/gateway-user-guide
API endpoint (production): https://api.forte.net/v2
API endpoint (sandbox): https://sandbox.forte.net/api/v2
Updated 9 days ago

