Web Services v2
Ready. . .Set. . .Integrate.

NOTE: For the best experience, we recommend upgrading your REST API integration to Version 3.
Introduction
Forte’s REST API allows merchants to perform a variety of powerful tasks, such as querying, retrieving detailed object information, and updating or deleting customer and transaction records. Merchants can access information through standard HTTP methods within a secure and simple-to-integrate architecture. This architecture begins with an Account ID. You can find the Account ID in various places in the REST API as it can denote a home_account_id
at the top of a hierarchy of child accounts or a parent account_id
where objects live. Forte's REST API offers the following benefits:
- Simplicity
Use the existing infrastructure of the web (e.g., web servers, client libraries, caches, etc.) to make integrations simple and fast - Access
Make requests through standard HTTP protocols with any language or on any platform to retrieve information from Forte - Flexibility
Serialize the data through XML or JSON
Base URI
Use the following URI when making REST calls:
https://sandbox.forte.net/api/v2
for sandbox testinghttps://api.forte.net/v2
for production.
Supported Actions
Forte REST web services support the following actions to the defined endpoints.
Action | HTTP Method | Description |
---|---|---|
Create | POST
|
Creates the resource that corresponds to the data type defined in the endpoint. |
Find | GET
|
Returns summary information for all the items that match the provided query parameters. To return detailed |
Update | PUT
|
Modifies the existing resource for the provided endpoint. |
Delete | DELETE
|
Deletes the existing resource for the provided endpoint. |
Request/Response Formatting
The service supports Content Negotiation using the Accept header sent in the request. The default value for this is "application/json," which returns JSON responses. You can also use "application/xml," which returns XML responses.
The Forte REST API does not support cross-origin resource sharing (CORS).
ID Formatting
Requests and responses require object prefixing followed by an underscore and an ID number or a token. Prefixing identifies the corresponding object and can aid in troubleshooting. Use these prefixing and formatting standards for the following objects:
Object | Prefix | Example |
---|---|---|
accounts
|
act_ + ID
|
act_200000
|
locations
|
loc_ + ID
|
loc_100000
|
customers
|
cst_ + Token |
cst_SoGUG6mcLUS1nVzYBIbk3g
|
addresses
|
add_ + Token |
add_jUYRwbRjKUWgswNrFpSdKg
|
paymethods
|
mth_ + Token |
mth_ymC20TMkHE-YmYxMt0UvMA
|
transactions
|
trn_ + GUID |
trn_55c98c85-d3e8-4230-85e9-21d7d522eec0
|
settlements
|
stl_ + GUID |
stl_51cf4633-1767-484f-8784-be76a4076791
|
schedules
|
sch_ + GUID |
sch_2e5770ae-c120-414f-ae8c-d065753567e7
|
scheduleitems
|
sci_ + GUID |
sci_4690fbfb-0b77-4477-a066-2c07ca2e5a3c
|
Hypermedia
The REST service returns the following format for hypermedia responses. Result availability is dependent on the resource/action. NOTE: The following sample of hypermedia responses are merely formatting examples provided for reference.
{
"links": {
"self":"/customers?page_index=1",
"prev":"/customers?page_index=0",
"next":"/customers?page_index=2",
"paymethod":"/customers/cst_SoGUG6mcLUS1nVzYBIbk3g/paymethods",
"transactions":"/customers/cst_SoGUG6mcLUS1nVzYBIbk3g/transactions",
"addresses":"/customers/cst_SoGUG6mcLUS1nVzYBIbk3g/addresses",
}
}
Request Filters
Forte REST web services support the following filtering parameters for GET
requests without resource IDs (i.e., general resource searches). Use these search filters for all resources. NOTE: Some resources (e.g., transactions
and settlements
) may have additional filter parameters that you can use to narrow down your search results.
Parameter | Description | Example |
---|---|---|
orderby
|
|
/settlements?filter=start_settle_date eq '2014-11-20'&orderby=settle_date desc&page_size=2&page_index=0
|
page_size
|
|
/transactions?filter=action eq sale &orderby=received_date+desc&page_size=1000&page_index=3
|
page_index
|
|
/paymethods/??filter=paymethod_type eq card &orderby=name_on_cardasc;page_size=50&page_index=0
|
When using search filters, the search_criteria
object will display in the response and echo back all the resource parameters included in the GET request in the resource_specific
object.
Status Codes
Forte's REST web services uses standard HTTP status codes along with messages where appropriate. The table below displays the most common codes:
Code | Text | Description |
---|---|---|
200
|
OK | This code indicates a successful HTTP request; the actual response depends on the request method. For example, responses for GET requests contain entities corresponding to the requested resource while responses for POST requests contain entities describing the result of the action. |
201
|
Created | This code indicates that the server has fulfilled the request and has created a new resource. |
400
|
Bad Request or Failed Transaction |
This code indicates that the server cannot fulfill the request because of bad syntax (e.g., a create echeck request with a missing routing number) or the transaction failed (responses for failed transactions also contain the failed transaction information). |
401
|
Unauthorized | This code occurs when the user sends a bad username, password, and/or X-Forte-Auth-Account-Id combination with the request. |
404
|
Not Found | This code occurs when the user attempts an ID GET request, but the ID he/she provides does not exist in the database. |
500
|
Internal Error | This generic error code indicates that the server has encountered an unexpected condition and cannot provide a more specific or suitable error message. |
For status codes in the 400's, ensure that you correctly formatted the JSON in the original request, especially when the system returns a descriptive error message along with the status code, like the following example messages:
{
message: "Authentication Account ID in header is missing or invalid."
}
{
message: "Payment Method's routing number length is invalid."
}
Integration
To begin the integration process, merchants should contact their Forte representative who will provision their information to a sandbox account. Once provisioned, Forte sends the merchant an Account ID, Location ID, an API Access ID, and an API Secure Key for the sandbox environments. NOTE: The Location ID represents the same information as the Merchant ID in the Virtual Terminal.
Authentication
Forte's REST services rely on Basic access authentication over HTTPS using an API Access ID and an API Secure Key as the username and password values. Forte will assign your APIAccessID and APISecureKey. Then, an HTTP Header field named "Authorization" will be required with data content:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Additionally, user agents must authenticate their Account IDs using the custom header property X-Forte-Auth-Account-Id
(e.g., act_nnnnnn). NOTE: A user who authenticates his or her account in the X-Forte-Auth-Account-Id
header property can access sub-accounts through the Account ID listed in the route of the resource.
Authenticating Requests
HMAC requests must be Base64 encoded, which converts the request into a simple ASCII string that you can attach to the request. To add Base64 encoding, use the following code:
Convert.ToBase64String(Encoding.Default.GetBytes(APIAccessID + ":" + APISecureKey)).Trim()
If you're including the authentication request directly into the URI, you must encode the plus sign
character (+) using %2B;
and the forward slash character (/) using %2F;
.
Responses
Forte includes the response
subobject in responses for POST and PUT operations to the transactions
, customers
, paymethods
, and addresses
resources. NOTE: Forte returns the response_desc
and environment
parameters for all resources; the remaining parameters are returned for the transactions
resource only.
response
Object
Parameter | Description |
---|---|
response_desc
|
A short description of the action's response. All resources use this parameter. |
environment
|
The environment in which the user made the request. The value for this field can be either live or sandbox . All resources use this parameter. |
authorization_code
|
The code indicating the transaction was authorized. This field is not used for voiding transactions |
response_type
|
The type of response this action generated. |
response_code
|
The response code of the action. |
preauth_result
|
The result of the pre-authorization attempt on the transaction. |
preauth_description
|
A short description of the transaction's pre-authorization attempt. |
preauth_neg_report
|
Indicates whether the pre-authorization attempt contains a negative report. |
avs_result
|
Forte only returns this field if the merchant passes any combination of billing address parameters from the
|
cvv_code
|
The card verification value response. Supported values for this field include the following:
|
available_card_balance
|
The available balance on the credit card if a credit card is used for the transaction. |
requested_amount
|
The transaction amount |
Webhooks
NOTE: Currently, Forte IT must configure webhooks.
Webhooks provide near-real-time notifications about the events that occur during a transaction through POSTs to a customer-defined endpoint. Forte notifies merchants about events through subscriptions. Depending on these subscriptions, multiple events can occur during an operation. For example, a POST
transaction request that creates tokens for a customer and a paymethod causes three events to be fired: transaction.sale
, customer.create
, and paymethod.create
. These three events can be combined under a common event ID (e.g., evt_xxxxxx
) for easier information management. NOTE: Depending on how you configure your event subscriptions, the same data may be generated twice in separate webhooks. For example, a POST
to the customer
object that includes the creation of a paymethod could (if subscribed) generate a customer webhook with both customer and paymethod data as well as a paymethod webhook.
If a webhook post fails (i.e., does not result in an HTTP 200 response), Forte retries the webhook post up to twenty times adding one minute for each retry.
The following code samples display example webhooks for common operations.
Example - Webhook Payloads
Testing
To help you gain a greater understanding of how Forte's REST API works, we've built a Postman collection of sample REST requests based on the examples displayed for each request type in each resource section below. To import the collection of requests and really dig into Forte's robust version 2 REST API, simple click:
Resource Descriptions
Transactions
The transaction
object represents transaction(s) with a merchant's location. The transaction
object includes the customer
, card
, echeck
, and settlement
sub-objects. Token-based transactions will use the default addresses. Token payments require you to set the customer's default shipping and billing addresses prior to passing the transaction data. The transaction
object supports both Canadian and U.S.-based addresses and payment methods. For more information on how to correctly format Canadian routing numbers see the echeck
object.
Schedules
The schedule
object represents scheduled transactions for a merchant's account or location. Merchants can specify a particular quantity of scheduled transactions or can set up continuous transactions that will occur until the schedule is suspended or deleted. Scheduled transactions can only be created with the customer_token
and paymethod_token
values.
Scheduleitems
The scheduleitems
object represents the planned individual transactions that make up a schedule. This object enables merchants to create and make one-time adjustments to a scheduled transaction such as the amount or status of the transaction.
Settlements
The settlement
object represents the status of transactions within a merchant's location. GET requests to this endpoint can be filtered according to settlement date, response, and method.
Customers
The customer
object represents a customer's information and enables the merchant to create, maintain, and retrieve customer data that can be tokenized for a more efficient checkout process.
Addresses
The address
object represents the customer's billing and/or shipping addresses.
Paymethods
The paymethod
object represents a customer's form of payment—be it a credit card or an echeck. This object enables the merchant to tokenize the customer's payment information within Forte's secure data vault. These paymethod tokens can be used to streamline the checkout process for repeat customers or to handle recurring payments without the need to store a customer's sensitive payment information on your own servers. The paymethod
object supports both Canadian and U.S.-based credit cards and echecks. For more information on how to correctly format Canadian routing numbers see the echeck
object.
Transactions
Create and maintain customer transaction data with the transaction
object using the following input parameters and code samples.
transaction
Object
Parameter | Description | Req |
---|---|---|
account_id
|
The identification number of the associated account. For example, act_5551236 . |
Required |
location_id
|
The merchant's six-digit ID code. | Required |
action
|
The supported transaction types include the following values:
|
Required |
customer_token
|
A unique string used to represent a customer. For example, |
Optional |
customer_id
|
A merchant-defined string created at the customer level to identify the customer. | Optional |
paymethod_token
|
A unique string used to represent a payment method.
For example, mth_1578436587 . [max length = 26] |
Optional |
reference_id
|
A merchant-defined string that identifies the transaction. | Optional |
authorization_amount
|
The amount to be charged/credited to the customer. | Required |
order_number
|
A merchant-assigned ID code that is returned with the transaction response. | Optional |
original_transaction_id
|
The trace number returned by the original transaction. | Optional |
transaction_id
|
A 36-character code that uniquely identifies the transaction. | Optional |
authorization_code
|
An approval code from a vendor that authorizes a merchant to void a transaction. | Optional |
entered_by
|
The name or the ID of the person entering the data. | Optional |
received_date
|
The date the merchant received the transaction | Optional (Return only) |
origination_date
|
The date the funds of the transaction go to the originating depository financial institution. | Optional (Return only) |
sales_tax_amount
|
The sales tax amount. This field is only required for procurement card transactions. | Optional |
service_fee_amount
|
The service fee (i.e., convenience fee) for this transaction. Use the following definitions when calculating a service fee
For a service fee of 2.45% for example, you will need to follow the scenario below:
The Create Transaction - Credit Card code sample provides an example of a service fee calculation. |
Optional |
billing_address
|
The Address Object |
Required |
shipping_address
|
The Address Object |
Optional |
card
|
The card Object |
Required |
echeck
|
The echeck Object |
Required |
line_items
|
The line_items Object |
Optional |
xdata
|
The xdata Object |
Optional |
card
Object
The transaction cards
object contains the following parameters.
Parameter | Description | Req |
---|---|---|
card_type
|
The type of credit card [max length = 4]. Options for this field include the following:
|
Required |
name_on_card
|
The name printed on the credit card [max length = 50]. This field is required when creating a new record or creating a permanent token from a one-time token. | Required |
last_4_account_number
|
The last four digits of the redacted account number. This field is return only. [max length = 4] | — |
account_number
|
The card number. This field is required when creating a new record and can only contain digits. Forte echoes this parameter in the card.masked_account_number response parameter. [max length = 19]. |
Required |
expire_month
|
The expiration month. This field is required when creating a new record and must be a valid future date. [max length = 2]. | Required |
expire_year
|
The expiration year. This field is required when creating a new record and must be a valid future date. [max length = 4]. | Required |
card_verification_value
|
The card verification number. Forte does not store this field with the paymethod token, but echoes it back. [max length = 5]. | Required |
procurement_card
|
Indicates whether or not this is a procurement card transaction. Accepted values are either true or false. For procurement card transactions, merchants must pass the customer_accounting_code field in the card object and the sales_tax_amount field in the transaction object. [max length = 5]. |
Optional |
customer_accounting_code
|
Lists the procurement card accounting code. Forte does not save this information if the merchant is creating a paymethod. [max length = 17] | Optional |
one_time_token | A single use token generated by Forte.js (e.g., ott_g7vnjqikszabzynu6eowbq ). |
Optional |
card_reader
|
The eight-digit device part number specifying which swipe device was used to capture the card data. Currently, only the following models and part numbers are supported when capturing encrypted card data:
[max length = 20] |
Optional |
card_data
|
The full set of swipe data received from the encrypting swipe device. [max length = 1500] | Optional |
card_emv_data
|
The full set of emv data received from the emv device. [max length = 1500] | Optional |
fallback_swipe
|
Indicates if this swiped transaction is a fallback swipe after a dipped transaction failed to process. Accepted values are either true or false [max length = 5] | Optional |
echeck
Object
The transaction echecks
object contains the following parameters.
Parameter | Description | Req |
---|---|---|
account_holder
|
The name of the account owner. This field is required when creating or updating a new record. | Optional |
account_number
|
The DDA or eCheck account number. This field is required when creating or updating a new record and can only contain digits. | Optional |
routing_number
|
The transit routing number. This field supports both U.S. and Canadian routing numbers. NOTE: A Canadian routing number displayed on a check needs to be reformatted differently for electronic payments. If a check displays a routing number as BBBBB-AAA (where AAA indicates the Financial Institution and BBBBB is the branch), then the routing number must be changed to 0AAABBBBB to process the payment electronically. For example, if a check from an account issued by the Bank of Montreal showed the routing number 00011-001, then that number would need to be reformatted to 000100011 for the payment to be electronically processed. Click here for a directory of Canadian financial institutions. This field is required when creating or updating a new record and can only contain digits. |
Optional |
account_type
|
Use one of the following values for this parameter:
|
Optional |
check_number
|
The customer's check number. NOTE: This field is only available for transactions and is not included in the Paymethods object. | Optional |
sec_code
|
Use one of the following values for this standard-entry class code: For more information on these codes, see Using ACH and SEC Return Codes. While this parameter is optional for REST echeck transactions, Forte recommends passing it to conform to a NACHA requirement that states when submitting a transaction for processing, the originator must designate how the transaction was authorized. Forte customers primarily use the |
Optional |
line_items
Object
The transaction line_item
s object contains the following parameters. Merchants can include up to 100 line item fields.
Parameter | Description | Req |
---|---|---|
line_item_header
|
Description of the data elements contained within each line item. This header will be displayed when viewing transaction details. | Optional |
line_item_1
|
Contents of the line item formatted according to the line_item_header . |
Optional |
line_item_100
|
Contents of the line item formatted according to the line_item_header . |
Optional |
xdata
Object
The transaction xdata
object contains the following parameters. Merchants can include up to nine fields of extra data that they can associate with a schedule or transaction.
Parameter | Description | Req |
---|---|---|
xdata_1-9
|
Up to nine fields (1-9) of extra data that can be associated with a schedule or transaction. Each xdata_# field can contain up to 255 characters. |
Optional |
Find Transactions
Use the following endpoints to find transactions
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/transactions
|
Returns all transactions for a location. Use the filters in the filter table to narrow down your search results. NOTES:
|
/accounts/{account_id}/locations/{location_id}/transactions/{action}
|
Returns the following transactions types (actions) for a location:
|
/accounts/{account_id}/locations/{location_id}/transactions/{transaction_id}
|
Returns transaction object detail |
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}/transactions
|
Returns all transactions for a customer |
To narrow your search data using specific criteria, use the following parameters with the endpoints above to filter your results:
Filter Parameter | Example |
---|---|
account_id
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=account_id+eq+act_300005
|
location_id
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=location_id+eq+loc_115161
|
start_received_date /end_recevied_date |
/accounts/{account_id}/locations/{location_id}/transactions/?filter=start_received_date+eq+
|
start_origination_date /end_origination_date |
/accounts/{account_id}/locations/{location_id}/transactions/?filter=start_origination_date+eq+
|
received_date
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=received_date+eq+'2002-01-08'
|
origination_date
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=origination_date+eq+'2002-01-08'
|
customer_token
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=customer_token+eq+
|
paymethod_token
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=paymethod_token+eq+
|
original_transaction_id
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=original_transaction_id+eq+
|
customer_id
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=customer_id+eq+000012359864
|
order_number
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=order_number+eq+12AFE968-09
|
reference_id
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=reference_id+eq+123456789
|
status
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=status+eq+voided
|
action
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=action+eq+sale
|
authorization_amount
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=authorization_amount+eq+501.23
|
entered_by
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=entered_by+eq+GriffTannen123
|
bill_to_company_name
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=bill_to_company_name+eq+'MJF Productions'
|
bill_to_first_name
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=bill_to_first_name+eq+Marty
|
bill_to_last_name
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=bill_to_last_name+eq+McFly
|
paymethod_type
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=paymethod_type+eq+card
/accounts/{account_id}/locations/{location_id}/transactions/?filter=paymethod_type+eq+echeck
|
last_4_account_number
|
/accounts/{account_id}/locations/{location_id}/transactions/?filter=last_4_account_number+eq+'1111'
|
The following code samples display example endpoints and GET
calls you can use to find a transaction.
Example - Find Transactions
Create Transactions
Use the following endpoints to create transactions
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/transactions
|
This endpoint can perform the following tasks while returning a new Transaction ID:
|
/accounts/{account_id}/transactions
|
This endpoint can perform the same tasks listed above; however, the data that the user passes in must specify a location_id . For example, if the user was creating an ad-hoc transaction, he or she would also need to pass in the location_id parameter. |
/accounts/{account_id}/locations/{location_id}/transactions/{action}
|
Creates the following transactions types (actions) for a location:
|
The following code samples display example endpoints and POST
calls you can use to create a transaction.
Example - Create Transactions
Update Transactions
Use the following endpoints to update a transaction
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/transactions/{transaction_id}
|
Updates the Transaction and returns a new Transaction ID |
/accounts/{account_id}/locations/{location_id}/transactions/{transaction_id}/{action}
|
Updates the following Transactions types (actions) for a Location:
|
The following code samples display example endpoints and PUT
calls you can use to update a transaction.
Example - Void Transactions
Schedule
Find, create, and update scheduled transactions with the schedule
object using the following input parameters and code samples.
schedule
Object
Parameter | Description | Req |
---|---|---|
account_id
|
The identification number of the associated account. For example, act_5551236 . |
Required |
location_id
|
The identification number of the associated location. For example, loc_1234568 . |
Required |
schedule_id
|
A unique string used to represent a schedule. For example, sch_2e5770ae-c120-414f-ae8c-d065753567e7. |
Required |
customer_token
|
A unique string used to represent a customer. For example, |
Required |
paymethod_token
|
A unique string used to represent a payment method.
For example, |
Required |
action
|
The supported transaction type includes the following value:
|
Required |
schedule_quantity
|
Indicates the quantity of transactions to perform. For continuous schedules, set the value of this field to 0 . |
Required |
schedule_frequency
|
Indicates the frequency of the scheduled transactions. The supported values for this field include the following:
|
Required |
schedule_amount
|
Indicates the amount of the recurring payment. The value of this parameter depends on the value in the schedule_frequency parameter. |
Optional |
schedule_start_date
|
Indicates the start day of the next recurring transaction in |
Optional |
schedule_created_date
|
The date the schedule was created. | Optional |
customer_acct_code
|
The customer accounting code. This field only applies to credit card transactions. | Optional |
sec_code
|
The Standard Entry Class code for the transaction. This field only applies to echeck transactions. | Optional |
schedule_status
|
The current status of the schedule. The supported values for this field include the following:
|
Optional |
item_description
|
The check number or other description of the item to be processed. | Optional |
reference_id
|
A merchant-defined string that identifies the transaction. | Optional |
order_number
|
A merchant-assigned ID code that is returned with the transaction response. | Optional |
customer_id
|
A merchant-defined string created at the customer level to identify the customer. | Optional |
summary
|
The summary object. |
Optional |
xdata
|
The xdata object. |
Optional |
summary
Object
The schedule summary
object enables merchants to quickly access schedule information such as the amount of the next scheduled transaction or when the next scheduled transaction will be processed. To find summary information for a schedule, use the following parameters.
Parameter | Description | Req |
---|---|---|
schedule_next_date
|
The next date when a scheduled transaction will be processed. This parameter is return only. | — |
schedule_next_amount
|
The amount of the next scheduled transaction that will be processed. This parameter is return only. | — |
schedule_last_amount
|
The authorization amount for the last scheduled transaction that Forte processed. This parameter is return only. | — |
schedule_last_date
|
The date and timestamp when Forte processed the last scheduled transaction. This parameter is return only. | — |
schedule_successful_amount
|
The total amount of the successful transactions for this schedule. This parameter is return only. | — |
schedule_successful_authorization_amount
|
The authorization amount of the last scheduled transaction that Forte successfully processed. This parameter is return only. | — |
schedule_successful_quantity
|
The total number of successful transaction for this schedule. This parameter is return only. | — |
schedule_failed_amount
|
The total amount of failed transactions for this schedule. This parameter is return only. | — |
schedule_failed_quantity
|
The total number of failed transactions for this schedule. This parameter is return only. | — |
scheduled_remaining_amount
|
The total amount of the remaining transactions for this schedule. This parameter is return only. | — |
scheduled_remaining_quantity
|
The total number of the remaining transactions for this schedule. This parameter is return only. | — |
scheduled_suspended_amount
|
The total amount of the suspended transactions for this schedule. This parameter is return only. | — |
scheduled_suspended_quantity
|
The total number of suspended transactions for this schedule. This parameter is return only. | — |
Find Schedules
Use the following endpoints to find a schedule
.
Endpoint | Description |
---|---|
/accounts/{account_id}/schedules
|
This endpoint returns all schedules for an account. |
/accounts/{account_id}/locations/{location_id}/schedules
|
This endpoint returns all schedules for a location. |
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}/schedules
|
This endpoint returns all schedules associated with a particular customer. |
/accounts/{account_id}/locations/{location_id}/schedules/{schedule_id}
|
This endpoint returns a specific schedule, including schedule summary data that can be used to quickly find useful schedule information. |
To narrow your search data using specific criteria, use the following parameters with the endpoints above to filter your results:
Filter Parameter | Example |
---|---|
account_id
|
/accounts/{account_id}/locations/{location_id}/schedules/?filter=account_id+eq+act_300005
|
location_id
|
/accounts/{account_id}/locations/{location_id}/schedules/?filter=location_id+eq+loc_115161
|
customer_token
|
/accounts/{account_id}/locations/{location_id}/schedules/?filter=customer_token+eq+
|
paymethod_token
|
/accounts/{account_id}/locations/{location_id}/schedules/?filter=paymethod_token+eq+
|
action
|
/accounts/{account_id}/locations/{location_id}/schedules/?filter=action+eq+sale
|
schedule_quantity
|
/accounts/{account_id}/locations/{location_id}/schedules/?filter=schedule_quantity+eq+'12'
|
schedule_frequency
|
/accounts/{account_id}/locations/{location_id}/schedules/?filter=schedule_frequency+eq+monthly
|
schedule_amount
|
/accounts/{account_id}/locations/{location_id}/schedules/?filter=schedule_amount+eq+'100.01'
|
start_schedule_created_date /end_schedule_created_date |
/accounts/{account_id}/locations/{location_id}/schedules/?filter=start_schedule_created_date+eq+
|
start_schedule_start_date /end_schedule_start_date |
/accounts/{account_id}/locations/{location_id}/schedules/?filter=start_schedule_start_date+eq+
|
The following code samples display example endpoints and GET
calls you can use to find a schedule.
Example - Find Schedules
Create Schedules
Use the following endpoints to create a schedule
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/schedules
|
Creates a new schedule and returns a new unique schedule ID. NOTE: Both the customer_token and paymethod_token parameters must be specified in the request. |
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}/schedules
|
Creates a new schedule and returns a new unique schedule ID for the customer. NOTE: The paymethod_token must be specified in the request. |
The following code samples display example endpoints and POST
calls you can use to find a schedule.
Example - Create Schedules
Update Schedules
Use the following endpoints to update a schedule
's status
or paymethod_token
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/schedules/{schedule_id}
|
Updates the schedule definition's status and/or paymethod token. NOTE: When updating a schedule definition from suspended to active status, the scheduleitems associated with that schedule definition must be individually updated to ensure the scheduled transactions occur. |
The following code samples display example endpoints and PUT
calls you can use to update a schedule definition.
Example - Update Schedules
Delete Schedules
Use the following endpoint to delete a schedule
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/schedules/{schedule_id}
|
Deletes the schedule. When deleting a schedule, all scheduleitems are also deleted. |
The following code samples display example endpoints and DELETE
calls you can use to delete a schedule.
Example - Delete Schedules
Scheduleitems
Find, create, and update individual future transactions with the scheduleitems
object using the following input parameters and code samples.
scheduleitems
Object
Parameter | Description | Req |
---|---|---|
account_id
|
The identification number of the associated account. For example, act_5551236 . |
Required |
location_id
|
The identification number of the associated location. For example, loc_1234568 . |
Required |
schedule_item_id
|
A unique string used to represent a schedule item. For example, sci_2e5770ae-c120-414f-ae8c-d065753567e7. |
Required |
customer_token
|
A unique string used to represent a customer. For example, |
Required |
paymethod_token
|
A unique string used to represent a payment method.
For example, |
Required |
schedule_id
|
A unique string used to represent a schedule. For example, |
Required |
schedule_item_amount
|
Indicates the amount of the scheduled item. | Optional |
schedule_item_status
|
Indicates the status of the scheduled item. The supported values for this field include the following:
|
Required |
schedule_item_date
|
Indicates the date of the scheduled item. For POSTs, the value of this field must be greater than today's date. | Required |
schedule_item_processed_date
|
Indicates the date when the scheduled item will be processed. |
Optional |
schedule_item_created_date
|
Indicates the date when the merchant created the scheduled item. | Optional |
schedule_item_description
|
A brief description of the scheduled item being processed. | Optional |
Find Scheduleitems
Use the following endpoints to find a scheduleitems
.
Endpoint | Description |
---|---|
/accounts/{account_id}/scheduleitems
|
This endpoint returns all scheduleitems for an |
/accounts/{account_id}/locations/{location_id}/scheduleitems
|
This endpoint returns all scheduleitems for a location. |
|
This endpoint returns all future scheduleitems for a particular customer or paymethod. |
/accounts/{account_id}/scheduleitems/{schedule_item_id}
|
This endpoint returns a specific scheduleitem. |
To narrow your search data using specific criteria, use the following parameters with the endpoints above to filter your results:
Filter Parameter | Example |
---|---|
account_id
|
/accounts/{account_id}/locations/{location_id}/scheduleitems/?filter=account_id+eq+act_300005
|
location_id
|
/accounts/{account_id}/locations/{location_id}/scheduleitems/?filter=location_id+eq+loc_115161
|
customer_token
|
/accounts/{account_id}/locations/{location_id}/scheduleitems/?filter=customer_token+eq+
|
paymethod_token
|
/accounts/{account_id}/locations/{location_id}/scheduleitems/?filter=paymethod_token+eq+
|
schedule_id
|
/accounts/{account_id}/locations/{location_id}/scheduleitems/?filter=schedule_id+eq+
|
schedule_item_amount
|
/accounts/{account_id}/locations/{location_id}/scheduleitems/?filter=schedule_item_amount+eq+'100.01'
|
schedule_item_status
|
/accounts/{account_id}/locations/{location_id}/scheduleitems/?filter=schedule_item_status+eq+
|
start_schedule_item_date /end_schedule_item_date |
/accounts/{account_id}/locations/{location_id}/scheduleitems/?filter=start_schedule_item_date+eq+
|
start_schedule_item_processed_date /end_schedule_item_processed_date |
/accounts/{account_id}/locations/{location_id}/scheduleitems/?filter=
|
start_schedule_item_created_date /end_schedule_item_created_date |
/accounts/{account_id}/locations/{location_id}/scheduleitems/?filter=
|
The following code samples display example endpoints and GET
calls you can use to find a scheduleitem.
Example - Find Scheduleitems
Create Scheduleitems
Use the following endpoint to create a scheduleitems
.
Endpoint | Description |
---|---|
/accounts/{account_id}/location/{location_id}/schedules/{schedule_id}/scheduleitems/
|
This endpoint creates a new scheduleitem and returns a unique |
The following code samples display example endpoints and POST
calls you can use to create a scheduleitem.
Example - Create Scheduleitems
Update Scheduleitems
Use the following endpoint to create a scheduleitems
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/scheduleitems/{schedule_item_id}
|
This endpoint updates the specified scheduleitem. Only scheduleitems |
The following code samples display example endpoints and PUT
calls you can use to create a scheduleitem.
Example - Update Scheduleitems
Delete Scheduleitems
Use the following endpoint to delete a scheduleitem
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/scheduleitems/{schedule_item_id}
|
This endpoint deletes the specified scheduleitem. Deleting a |
The following code samples display example endpoints and DELETE
calls you can use to delete a scheduleitem.
Example - Delete Scheduleitems
Settlement
Find transaction settlement data with the settlement
object using the following input parameters and code samples. Use the settle_date
, settle_response_code
, and method
fields to filter your data.
settlement
Object
Parameter | Description | Req |
---|---|---|
account_id
|
The identification number of the associated account. For example, act_5551236 . |
Required |
location_id
|
The identification number of the associated location. For example, loc_1234568 . |
Required |
customer_token
|
A unique string used to represent a customer. For example, |
Optional |
customer_id
|
A merchant-defined string created at the customer level to identify the customer. | Optional |
order_number
|
A merchant-defined string. | Optional |
reference_id
|
A merchant-defined string that identifies the transaction. | Optional |
settle_id
|
The settlement ID of the settled transaction (e.g., stl_51cf4633-1767-484f-8784-be76a4076791 ) |
Required |
transaction_id
|
A 36-character code that uniquely identifies the transaction. | Optional |
settle_batch_id
|
The ID of the credit card settlement batch, which the merchant can use to reconcile credit card bank deposits. This parameter is view only and only for credit card transactions. | Optional |
settle_date
|
The date when the transaction was settled. | Optional |
settle_type
|
The type of settlement. Supported settlement types include the following values. For echeck transactions:
For credit card transactions:
|
Optional |
settle_response_code
|
See the Response Codes table for more information. NOTE: Credit card transactions that do not return a settle response can be considered settled. | Optional |
settle_amount
|
The amount the transaction settled for. |
Optional |
method
|
The payment method. The supported payment methods include the following values:
|
Optional |
NOTE: When a merchant passes a customer token with a transaction, Forte ignores any other customer data in favor of the default data stored with the token.
Find Settlements
Use the following endpoint to find a settlement
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/settlements
|
This endpoint returns all the transaction settlements for a Location. |
To narrow your search data using specific criteria, use the following parameters with the endpoints above to filter your results:
Filter Parameter | Example |
---|---|
account_id
|
/accounts/{account_id}/locations/{location_id}/settlements/?filter=account_id+eq+act_300005
|
location_id
|
/accounts/{account_id}/locations/{location_id}/settlements/?filter=location_id+eq+loc_115161
|
customer_token
|
/accounts/{account_id}/locations/{location_id}/settlements/?filter=customer_token+eq+cst_6cHpUhBG_02bIb4SXxOm5A
|
transaction_id
|
/accounts/{account_id}/locations/{location_id}/settlements/?filter=transaction_id+eq+
|
customer_id
|
/accounts/{account_id}/locations/{location_id}/settlements/?filter=customer_id+eq+'ABC5698350001'
|
order_number
|
/accounts/{account_id}/locations/{location_id}/settlements/?filter=order_number+eq+'0000012598756'
|
reference_id
|
/accounts/{account_id}/locations/{location_id}/settlements/?filter=reference_id+eq+'456789123'
|
start_settle_date / end_settle_date |
/accounts/{account_id}/locations/{location_id}/settlements/?filter=start_settle_date+eq+'2002-01-08'+and+end_settle_date+eq+'2013-12-08'
|
settle_response_code
|
/accounts/{account_id}/locations/{location_id}/settlements/?filter=settle_response_code+eq+'R21'
|
method
|
/accounts/{account_id}/locations/{location_id}/settlements/?filter=method+eq+'cc'
|
NOTE: If both the start_settle_date
and end_settle_date
filters are not passed in, the query automatically uses a default date range of 90 days. If you do not pass in any date filters, the system automatically uses the current date and the previous 90 days.
The following code samples display example endpoints and GET
calls you can use to find a settlement.
Example - Find Settlements
Customer
Create, maintain, and delete customer data with the customer
object using the following input parameters and code samples.
customer
Object
Parameter | Description | Req |
---|---|---|
account_id
|
The identification number of the associated Home Account. For example, act_5551236 . |
Required |
location_id
|
The identification number of the associated location. For example, loc_1234568 . |
Required |
customer_token
|
A unique string used to represent a customer.
For example, |
Optional |
customer_id
|
A merchant-defined string created at the customer level to identify the customer. | Optional |
default_paymethod_token
|
The customer's default paymethod token. The system returns this token when creating a customer with a paymethod. | Optional |
default_billing_address_token
|
A unique string used to represent the customer's default billing address. The system returns this token when creating a customer with a billing address. | Optional |
default_shipping_address_token
|
A unique string used to represent a customer's default shipping address. This system returns this token when creating a customer with a shipping address. | Optional |
status
|
Use one of the following values:
|
Optional |
first_name
|
The first name of the customer. [max length = 50] |
Required |
last_name
|
The last name of the customer. [max length = 50] |
Required |
company_name
|
The company name of the customer. [max length = 50] |
Optional |
paymethod
|
The Paymethod Object | Optional |
addresses
|
An array of Address Objects |
Find Customers
Use the following endpoints to find a customer
within a specific location.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/customers
|
This endpoint returns all the customers for a location. |
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}
|
This endpoint returns all the default information of a specific customer. |
To narrow your search data using specific criteria, use the following parameters with the endpoints above to filter your results:
Filter Parameter | Example |
---|---|
account_id
|
/accounts/{account_id}/locations/{location_id}/customers/?filter=account_id+eq+act_300005
|
location_id
|
/accounts/{account_id}/locations/{location_id}/customers/?filter=location_id+eq+loc_115161
|
status
|
/accounts/{account_id}/locations/{location_id}/customers/?filter=status+eq+active
|
first_name
|
/accounts/{account_id}/locations/{location_id}/customers/?filter=first_name+eq+Marty
|
last_name
|
/accounts/{account_id}/locations/{location_id}/customers/?filter=last_name+eq+McFly
|
company_name
|
/accounts/{account_id}/locations/{location_id}/customers/?filter=company_name+eq+'Brown Associates'
|
customer_id
|
/accounts/{account_id}/locations/{location_id}/customers/?filter=customer_id+eq+025897
|
The following code samples display example endpoints and GET
calls you can use to find a customer.
Example - Find Customers
Create Customers
Use the following endpoints to create a customer
under a specific location.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/customers
|
This endpoint can perform the following tasks while returning a new
|
/accounts/{account_id}/customers
|
This endpoint can perform the same tasks listed above; however, the data that the user passes in must specify a location_id . For example, if the user was creating a customer with a payment method, he or she would also need to pass in the location_id parameter. |
The following code samples display example endpoints and POST
calls you can use to create a customer.
Example - Create Customers
Update Customers
Use the following endpoint to update a customer
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}
|
This endpoint can perform the following tasks while returning the
NOTE: This endpoint cannot update a customer's addresses or paymethods. To update that data, you must use the |
The following code samples display example endpoints and PUT
calls you can use to update a customer record.
Example - Update Customers
Delete Customers
Use the following endpoint to delete a customer. NOTE: A customer cannot be deleted if he or she is tied to an active schedule.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}
|
This endpoint deletes the specified customer record. |
The following code samples display example endpoints and DELETE
calls you can use to delete a customer record.
Example - Delete Customers
Address
Create, maintain, and delete customer address data with the address
object using the following input parameters and code samples. NOTE: For token payments, Forte will use the default shipping and billing addresses. Set the customers default shipping and billing addresses prior to creating a token payment.
address
Object
Parameter | Description | Req |
---|---|---|
address_token
|
A unique string used to represent an address. For example, add_tq0hemmmtf-zsxgq689rew . |
Required |
customer_token
|
A unique string used to represent a customer. For example, cst_SoGUG6mcLUS1nVzYBIbk3g . |
Required |
account_id
|
The identification number of the associated account. For example, act_5551236 . |
Required |
location_id
|
The identification number of the associated location. For example, loc_1234568 . |
Required |
first_name
|
The first name of the user associated with this billing or shipping address [max length = 50]. NOTE: The first_name and last_name parameters are required for billing addresses when creating transactions without tokens. |
Required |
last_name
|
The last name of the user associated with this billing or shipping address [max length = 50]. NOTE: The first_name and last_name parameters are required for billing addresses when creating transactions without tokens. |
Required |
company_name
|
The name of the company associated with this billing or shipping address [max length = 50]. NOTE: The company_name parameter is required for billing addresses when creating transactions without tokens. |
Required |
phone
|
The phone number associated with this billing or shipping address. This field supports both U.S. and Canadian phone numbers. [max length = 15] | Optional |
fax
|
The fax number associated with this billing or shipping address | Optional |
email
|
The email address associated with this billing or shipping address [max length = 50] | Optional |
label
|
A label that succinctly identifies the address. For example, "Work" or "Home." | Optional |
address_type
|
The type of address. Use one of the following values:
|
Optional |
shipping_address_type
|
Indicates whether the address is a residential or commercial address. |
Required |
physical_address
|
The Physical Address object. | Optional |
physical_address
Object
The physical_address
object is returned within GET, POST, and PUT Address calls and contains the following child parameters.
Parameter | Description | Req |
---|---|---|
street_line1
|
The first line of the street address [max length = 35] | Optional |
street_line2
|
The second line of the street address [max length = 35] | Optional |
locality
|
Locality or city/town/village [max length = 25] | Optional |
region
|
Region or state/province. This field supports both U.S. and Canadian regions. [max length = 2] | Optional |
postal_code
|
Postal Code [max length = 15]. This field supports both U.S. and Canadian postal codes. | Optional |
Find Addresses
Use the following endpoints to find an address
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}/addresses/
|
Returns all Address(es) for a Customer |
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}/addresses/{address_token}
|
Returns Address object detail |
To narrow your search data using specific criteria, use the following parameters with the endpoints above to filter your results:
Filter Parameter | Example |
---|---|
account_id
|
/accounts/{account_id}/locations/{location_id}/addresses/?filter=account_id+eq+act_300005
|
location_id
|
/accounts/{account_id}/locations/{location_id}/addresses/?filter=location_id+eq+loc_115161
|
customer_token
|
/accounts/{account_id}/locations/{location_id}/addresses/?filter=customer_token+eq+cst_SoGUG6mcLUS1nVzYBIbk3g
|
The following code samples display example endpoint and GET
calls you can use to find a customer address.
Example - Find Addresses
Create Addresses
Use the following endpoint to create an address
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}/addresses/
|
Creates a new Address for the Customer. Returns the address_token . |
/accounts/{account_id}/customers/{customer_token}/addresses/
|
This endpoint also creates a new address for the specified customer; however, the data that the user passes in must specify a Location ID. For example, if the user was creating an address, he or she would also need to pass in the location_id field. |
The following code samples display example endpoints and POST
calls you can use to create an address.
Example - Create Addresses
Update Addresses
Use the following endpoint to update an address
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}/addresses/{address_token}
|
Updates the Address and returns the address_token . |
The following code samples display example endpoints and PUT
calls you can use to create an address.
Example - Update Addresses
Delete Addresses
Use the following endpoint to delete an address
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}/addresses/{address_token}
|
This endpoint deletes the specified address. |
The following code samples display example endpoints and DELETE
calls you can use to delete an address.
Example - Delete Addresses
Paymethods
Create, maintain, and delete customer payment data with the paymethod
object using the following input parameters and code samples.
paymethod
Object
Parameter | Description | Req |
---|---|---|
account_id
|
The identification number of the associated account. For example, act_5551236 . |
Required |
location_id
|
The identification number of the associated location. For example, loc_1234568 . |
Required |
customer_token
|
A unique string used to represent a customer. For example, NOTE: When a merchant passes a customer token with a transaction, Forte ignores any other customer data in favor of the default data stored with the token. |
Optional |
paymethod_token
|
A unique string used to represent a payment method.
For example, |
Optional |
label
|
A friendly, customer-defined name for the payment method.
For example, |
Required |
card
|
The card object |
Optional |
echeck
|
The echeck object |
Optional |
notes
|
A short description of the paymethod. | Optional |
Find Paymethods
Use the following endpoints to find paymethods
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/paymethods/{paymethod_token}
|
Returns Paymethod object detail |
/accounts/{account_id}/locations/{location_id}/paymethods
|
Returns all Paymethods for a Location |
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}/paymethods
|
Returns all Paymethods for a Customer |
To narrow your search data using specific criteria, use the following parameters with the endpoints above to filter your results:
Filter Parameter | Example |
---|---|
account_id
|
/accounts/{account_id}/locations/{location_id}/paymethods/?filter=account_id+eq+act_300005
|
location_id
|
/accounts/{account_id}/locations/{location_id}/paymethods/?filter=location_id+eq+loc_115161
|
customer_token
|
/accounts/{account_id}/locations/{location_id}/paymethods/?filter=customer_token+eq+cst_SoGUG6mcLUS1nVzYBIbk3g
|
start_au_updated_date /end_au_updated_date |
/accounts/{account_id}/locations/{location_id}/transactions/?filter=start_au_updated_date+eq+
|
paymethod_type
|
/accounts/{account_id}/locations/{location_id}/paymethods/?filter=paymethod_type+eq+card
/accounts/{account_id}/locations/{location_id}/paymethods/?filter=paymethod_type+eq+echeck
|
The following code samples display example endpoints and GET
calls you can use to find a paymethod.
Example - Find Paymethods
Create Paymethods
Use the following endpoint to create paymethods
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/paymethods
|
This endpoint can perform the following tasks while returning a new Paymethod token:
|
/accounts/{account_id}/paymethods
|
This endpoint can perform the same tasks listed above; however, the data that the user passes in must specify a location_id . Forexample, if the user was creating a paymethod with only credit card information, he or she would also need to pass in the location_id field. |
/accounts/{account_id}/locations/{location_id}/customers/{customer_token}/paymethods
|
Creates a new paymethod for the customer and returns a paymethod token. A permanent Paymethod token can be created from a one-time token. |
The following code samples display example endpoints and POST
calls you can use to create a paymethod. For information on creating a one-time token, see the Forte.js documentation.
Example - Create Paymethods
Update Paymethods
Use the following endpoint to update paymethods
.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/paymethods/{paymethod_token}
|
Updates Paymethods while returning a paymethod_token |
The following code samples display example endpoints and PUT
calls you can use to update a paymethod.
Example - Update Paymethods
Delete Paymethods
Use the following endpoint to delete paymethods
. NOTE: A paymethod cannot be deleted if it is tied to an active schedule.
Endpoint | Description |
---|---|
/accounts/{account_id}/locations/{location_id}/paymethods/{paymethod_token}
|
Deletes the specified paymethod |
The following code samples display example endpoints and DELETE
calls you can use to delete a paymethod.
Example - Delete Paymethods