Assistance with cURL Payment Terminal Apollo

Hello everyone,

I need to implement this “command” to populate a payment terminal with text and images. Unfortunately, I have zero experience in this area, and I was only told that I can do it with Postman, but I have no further support. Can anyone help me here?

Best regards,
Dominik

curl -X 'POST' https://cps.mypayter.com/terminals/${SERIAL_NUMBER}/ui \
-H 'Authorization: CPS apikey="'${CPS_API_KEY}'"' \
-H 'Content-Type: application/json' \
-d '{
"id": "my-info-screen",
"type": "info",
"properties": {
"title": "test"
}
}'

Hey @science-cosmologist2 :wave:

Welcome to the Postman community :postman:

You can paste that full command directly into the URL bar, that will create a new request for you with the elements mentioned in the command, populated within it.

From here you can add the specific details needed for your actual request.

Thanks for the quick response.
Which URL bar do you mean?
Dominik

If you open a New Request in a tab, you can paste that into the request URL (highlighted in green)

1 Like

The thing is so very simple. Many thanks for the quick help.

1 Like

Everything has worked so far. But now I still have a problem. I still need to integrate the token here:

To convert the token into an API key, send a POST with the token to our cps service, e.g. (Generate API Key)
This returns the API key, which you can insert into the header.

Now how do I put it all together so that it works properly?

curl -X 'POST' https://cps.mypayter.com/terminals/${SERIAL_NUMBER}/ui \

-H 'Authorization: CPS apikey="'${CPS_API_KEY}'"' \
-H 'Content-Type: application/json' \
-d '{
"id": "my-info-screen",
"type": "info",
"properties": {
"title": "test",
}
}

I have no idea what that API is but going off the link you shared, I’m guessing the CPS_API_KEY value gets returned in this call :man_shrugging:

curl -X POST 'https://cps.mypayter.com/apikey/<token>'

You might need to get the token value from a portal that you’re logged into or something like that. I honestly don’t know, I’ve never seen or used this before.

This request on it’s own returns this response so it’s hitting a server:

{
    "timestamp": "2024-01-17T16:58:48.250+0000",
    "status": 404,
    "error": "Not Found",
    "message": "NO_EXISTING_TOKEN"
}

The best bet is to speak with the person/people who have given you this task to deal with - It shouldn’t be up to you to figure out how it all works.

At the very least there should be clear documentation for these requests.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.