How to use
This page explains how to make different API calls by changing parameters.
Before you start, make sure that you have the following:
- the API token and code from your account.
- a Sales Location where you want the transactions to be registered on.
Authentication
We love ObjectCodesPAY is build on 'ObjectCodes', there is no need to share names, secrets or other information with our Team or during integration. Objects like AT-####-#### (For Token Identification) are safe to share.
In order to make a call to our endpoint, you first need the the API token from your PAY. account. You can copy it from: https://admin.pay.nl/company/tokens by clicking on the token.
You can fill this out in the authentication block in the upper right corner. Use the account code (starts with AT) for username and use the copied token as password.

Setting the serviceId
After filling out the authentication header, you must provide for a serviceId to be able to perform an API call.

Using the parameters to create an API call
Now that you have set the credentials, you can use the different parameters in order to build the JSON that will be posted to our endpoint. For instance, you can set the amount to 12 (meaning 12 cents) and the JSON will immediately be updated with the corresponding object:

Please provide for a valid value for all required parameters and then click on the blue button 'Try it!'. You have now posted the request and you will see the response from our server. If you have not changed the serviceID an error will be thrown like
"serviceId": {
"message": "not_a_service",
Please change this value to one you actually have in your PAY. account.
Using the built-in examples
For every endpoint, one or more examples are built in. You can choose them in the black box on the right side by clicking on the button Example in the upper right cormer.

After choosing the extended example, you are still able to change specific values in the main screen.

Examples of possible responses
Like with the API calls, you can also choose directly for the response you want to see. For that, please click on the desired response under the button Examples in the grey box on the right beneath the black box with the JSON.

In this case, you are able to see examples for the following three cases:
- Succesful Transaction
- Bad request
- Unprocessable Entity
Updated 3 months ago