Authentication
Authentication with the AZA Finance API relies on correctly setting the headers on each request with the following data:
- Accept and Content-Type should be “application/json”
- Authorization-Key is your application”s API key, which can be received from the AZA Finance developer portal
- Authorization-Nonce is a string, which must be unique per request - generating a new GUID for every request is the preferred approach
- Authorization-Signature is a HMAC-SHA512 digest of the nonce, request method, URL, and a SHA512 hash of the request body - you will need your API Secret, also available on the developer portal, to sign
You will also need
- your API Secret, obtainable from the developer portal
- the request body - this should be a JSON string
- the full request URL, including protocol, host, port and query parameters
Example data
For the following example, we will assume you are using the following details to create a Personal Sender:
- API Key:
YOUR_API_KEY
- API Secret:
YOUR_API_SECRET
- Nonce:
00c6a48a-ccb8-4653-a0c8-de7c1ab67529
- Request Body:
- A
POST
request tohttps://api-sandbox.transferzero.com/v1/senders
Building the signature
The string to sign is generated by concatenating request-specific strings together, joined with an ampersand (&):
- the Authorization-Nonce value
- the HTTP verb, in uppercase
GET
POST
PUT
PATCH
DELETE
- the full request URL, including protocol, host, port, query parameters and anchors
- a SHA512 hex digest of the request body”s JSON
- For the example data above, this will be
947148915d2982f7897ab187fd851e854265883109935e5e8c7ba662232b2de15e92a298067687b5402319f0efebf0561d37fc4e73460c408f91c7e25bb66ae0
- For
GET
andDELETE
requests without a JSON body this should be the SHA512 hash for the empty string:cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
- For the example data above, this will be
- Please note that, depending on the language, characters in the JSON may be escaped differently and your result might be different from this - see the code example for your specific language for individual implementations.
For the example values above, this results in the following string to sign:
00c6a48a-ccb8-4653-a0c8-de7c1ab67529&POST&https://api-sandbox.transferzero.com/v1/senders&947148915d2982f7897ab187fd851e854265883109935e5e8c7ba662232b2de15e92a298067687b5402319f0efebf0561d37fc4e73460c408f91c7e25bb66ae0
This string to sign is encrypted with the SHA512 algorithm and your API Secret, with the resulting value:
fc44e638c823b660e41f30ba78abe0e04f0dfc6b365e4a7129e44a181530146e4b777940fe8948af6fee5133b7f85d46a3cdcab449b9559617e60e593b73853c
This is passed as the Authorization-Signature
header for sending the request.
Full sample header
Complete code examples
Please check our SDKs on how thhey implement thhe authentication mechanism
API Environments
- For testing, use
https://api-sandbox.transferzero.com
- For production, use
https://api.transferzero.com
You will need a valid API Key and API Secret for each environment, obtainable in the AZA Finance developer portal once your application has been approved.