API Requests
To make a REST API request, you combine the HTTP GET, POST, PUT, PATCH, or DELETE method, the URL to the API service, the URI to a resource to query, submit data to, update, or delete, and one or more
The URL to the API service is either:
Sandbox:
https://sandbox.smartfastpay.com
Live:
https://api.smartfastpay.com
Optionally, you can include query parameters on GET calls to filter, limit the size of, and sort the data in the responses.
Most GET
, POST
, PUT
, and PATCH
calls require a JSON request body.
This sample request lists transactions:
Query parameters
For most REST GET
calls, you can include one or more query parameters on the request URI to filter, limit the size of, and sort the data in an API response. For filter parameters, see the individual GET
calls.
To limit, or page, and sort the data that is returned in some API responses, use these, or similar, query parameters:
Note: Not all pagination parameters are available for all APIs.
Parameter | Type | Description |
---|---|---|
|
| The number of items to return in the response. |
|
| The page number indicates which set of items will be returned in the response. So, the combination of |
|
| Sorts the items in the response by filter in ascending or descending order.
Eg.: |
|
| The start date and time for the range to show in the response, in Internet date and time format.
Eg.: |
|
| The end date and time for the range to show in the response, in Internet date and time format.
Eg.: |
|
| Sorts the items in the response by looking for the customer_id that was once provided by your system. |
|
| Sorts the items in the response by looking for the transaction_id that was once provided by your system.
To get multiple transaction_id, send each transaction_id separating by comma (,).
Eg.: |
For example, the Transaction API returns details for ten transactions starting with the second page sorted by descending id in the response:
HTTP request headers
The commonly used HTTP request headers are:
Content-Type
The response format, which is required for operations with a response body. The syntax is:
Where format
is json
.
Authorization
Required to get an access token or make API calls:
Get an access token
When you create a sandbox or live REST API app, SmartFastPay generates a set of OAuth 2.0 client ID and secret credentials for the sandbox or live environment. When you make a get an access token call, set the
Authorization
header to these credentials for the environment in which you're making the call.In exchange for these credentials, the SmartFastPay authorization server issues a bearer access token that you use for authorization when you make REST API requests.
A bearer token enables you to complete actions on behalf and with the approval of the resource owner.
Make REST API calls
Include the access token in the
Authorization
header with theBearer
authentication scheme:
Last updated