This section provides a technical introduction to the integration of our eCash products by facilitating REST API.
About the API
The REST API follows RESTful design principles making it easy to understand and integrate the API. Representational State Transfer (REST) is a software architecture style, consisting of guidelines for creating scalable web services. RESTful systems typically communicate over the Hypertext Transfer Protocol with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) used by web browsers to retrieve web pages and send data to remote servers. It facilitates solid and universally accepted foundations like http basic authentication, http verbs, JSON and CORS.
Versioning
Every time there is backwards-incompatible change to the API, a new major version will be released. This major version is part of the URL path. The current major version is v1. Unless informed by our technical support department that we are dropping support for a particular API version, you do not need to switch API versions.
Establishing a connection
A connection to the PaysafeCard system is successful if the following prerequisites are fulfilled:
- X.509 certificate for request authenticity (provided by PaysafeCard).
- API key for request authentication (provided by PaysafeCard).
- Authorization of the business partner server IP address (if a 403 error is received when trying to access the service, it is likely that the IP address is not yet allowed to access).
- Content-type: Please make sure that the content type in the HTTP header, when submitting requests, is set to Content-Type: application/json
- Character encoding needs to be in UTF-8
Connect to our services only via respective FQDNs Do not cache DNS resolutions of PaysafeCard FQDNs in your infrastructure (Client servers, Resolvers etc.). The DNS resolutions should expire as soon as the TTL is reached. In case your application is based on Java, please check your TTL setup on JVM, the DNS caching behavior needs to be adjusted to: networkaddress.cache.ttl=60 (TTL 60 seconds). Please note that, this parameter needs to be persisted in the JVM security config If your application is based on any other framework that caches DNS resolution, please make sure to set the DNS TTL to no more than 60 seconds or rely on the TTL set by our DNS records
Honoring DNS changes will make sure that you connect always to our active system.
DNS settings
- Connect only via respective FQDN
- Do not cache DNS resolutions of PaysafeCard FQDNs in your infrastructure (Client servers, Resolvers etc.). The DNS resolutions should expire as soon as the TTL is reached.
- In case your application is based on Java, please check your TTL setup on JVM, the DNS caching behavior needs to be adjusted to: networkaddress.cache.ttl=60 (TTL 60 seconds). Please note that, this parameter needs to be persisted in the JVM security config
- If your application is based on any other framework that caches DNS resolution, please make sure to set the DNS TTL to no more than 60 seconds or rely on the TTL set by our DNS records
Honoring our DNS changes will make sure that you always connect to our active system.
X.509 Certificate Authenticity
PaysafeCard will provide the business partner with a .conf file that must be used to create a signed certificate requests (CSR). Instructions for the creation of the CSR will be provided with the test data delivery.
After successful CSR creation, PaysafeCard will then provide the business partner with the X.509 certificate based on this CSR, which will work on both test and productive environments.
Important: Please keep the private key in a safe place and do not provide it to PaysafeCard nor disclose it to third parties. PaysafeCard will never ask for the private key.
SSL Encryption
The certificate ensures encryption of all communications.
- Only TLS 1.2 (SSL 3.3) is supported
- Weak ciphers are disabled