Getting Started
API Basics
The API is constructed around REST and has the following features:
-
Definite resource-oriented URLs
-
Receives JSON-encoded request bodies
-
Returns JSON-encoded responses
-
Communicates using standard HTTP response codes, authentication, and verbs.
-
Message body: This must contain valid Paysafe JSON objects as required for the type of request. Not all API calls require a message body. For example, the GET requests do not require a body.
-
Resource ID: Identifies the unique ID of a resource.
Authentication
Paysafe's REST API utilize OAuth 2.0 Bearer Tokens for request authentication, necessitating the inclusion of a bearer token in all API calls.
For additional details, please refer to OAuth 2.0 protocol.
Paysafe provides sets of OAuth 2.0 client id and client secret credentials, specifically designed for either the sandbox or live environment, tailored to the specific token type. When initiating an access token request, ensure that the Authorization header using the Basic scheme is configured with the relevant credentials corresponding to the environment in which the call is being made and the desired token type.
Get Your Client Credentials
Please contact your business relationship manager or reach out to integrations@paysafe.com for Client Credentials and Test/Production accounts.
Testing
Test accounts enable you to process API transactions that mirror the functionality of the Production environment.
Transactions processed in the Test environment are executed on a simulator. Depending on the information provided with the transaction request, the simulator returns either a successful (approved) or failed (declined) response.
With the API, you can:
- Verify support for all the operation types that you require.
- Review all common errors as well as unique errors that may occur for each operation.
- Verify the length and format for all attributes you send.
For access to test accounts and credentials, contact us. Your test account has access to the test version of the Paysafe business portal, where you can view the status of your test transactions.
Test URL
To test your integration with Paysafe, use the following Test URLs:
https://api.test.paysafe.com/digitalwallets
Going live
Once you are satisfied with your integration to the Test environment, you must repeat the configuration changes made to your Test account on your Production account.
You cannot use your Test credentials to process transaction requests in the Production environment.
Production URL
To test your integration with Paysafe, use the following Test URLs:
https://api.paysafe.com/digitalwallets
Go Live Checklist
- You must have a production account and access to business portal.
- You must have Client Credentials for the production environment.
- You must have Webhooks configured for all the events.
- You must use the Production URL for your API calls.
Pagination
In the case where an API GET request returns multiple results, the response data is paginated. The input for paginated query contains two parameters:
- limit - This is the number of records to return. Defaults to 10 and maximum is 50.
- offset - This is the starting position of the response, where 0 is the first record. Default = 0.
The total number of records is not returned. If numberOfRecords
< limit
, this means no further pages are available.
The number of previous pages can be calculated by dividing offset
to limit
.
This object contains meta
property in the response, that allows to determine the page location.
More information can be found in the PagingResultMeta.
Global Invalid Characters
You must not include any of the characters in this table as values in any of your request parameters. Object. If you do, your request will result in an error.
ISO Standards
ISO standards add value by providing the common business process data semantics to be used in the API based exchanges.
Please refer to ISO Standards for Global Invalid Characters, ISO Standards, Currency Codes, Province Codes, State Codes, and Country Codes.