Skip to main content

Revup API Keys

Revup processes every request through an API credential linked to your company account.
For those requests to be successful, you must include the appropriate API key in each case.
Every Revup account has two API keys (per environment), namely:


Public API Key

It must be in the configuration object of the Revup SDK, which in turn provides the tools to load the form and process the payment.
Find below an example of how to create that configuration object:

const config = {
orderId: 'xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx',
apiKey: 'YOUR_PUBLIC_API_KEY',
env: 'live'
};

Private API Key

It must be in the headers of any API request in the server-to-server communication. These requests must include the special header x-API-key providing the private API key as value. Find below a command-line example of how to perform a payment, including this key within the header:

Curl Request Example
curl –location \
--request POST 'https://test.api.macropay.com/v2/orders/6a609c3c-9a89-43db-a2eb-b0d4e3e519f0/pay' \
--header 'x-api-key: YOUR_PRIVATE_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": "65b81fl7r496bdac2gumbrxiqx2imnd6nrtsdxaat1p42wbnaod2ynzbbe4hq6prld1e0l34",
"paymentMethod": "credit_card_ciphered_data"
}'