Creating Tokens Via Web Services
This article will reference relative information to the subject within our Rest API Web Services located here:
https://restdocs.forte.net/?version=latest#ed3aaeec-7aa3-46c1-ba01-941e13e2a5f4
When creating tokens using the Rest API Web Services, these can fall into two categories.
Those two categories being:
- Customer Tokens
- Paymethod Tokens
The different tokens have their own requirements in order to create a valid 'POST' call.
First, there is a Cleintless Paymethod Token which only includes the customer's payment information and returns only the Paymethod Token.
The endpoint for this request is below:
"https://sandbox.forte.net/api/v3/organizations/org_{{organizationID}}/locations/loc_{{locationID}}/paymethods"
Here are the requirements for creating this type of token:
Credit Card:
All of these parameters belong to the 'Card' object.
ACH/ECheck:
All of these parameters belong to the 'echeck' object.
The response to these calls will include all of the information from the original call but will provide the Paymethod Token with the value behind the "mth_{string paymethod token"
Moving forward, the next token which has more requirements is creating a Customer Token.
Every customer must have these two variables:
- 'first_name' : 'John'
- 'last_name' : 'Smith'
From there you will create the 'addresses' object.
Within this call, you can create a Paymethod Token attached to this Customer Token by including the same parameters after the 'addresses' object with the additional variable.
Below is an example of a Rest call that will create a Client Token with an attached Paymethod.
Post new Customer Token with Paymethod:
For any additional information or guidance in working with our Rest API, please email us at integration@forte.net to receive direct support!