Getting Started
Authentication
Modem Pay uses API keys to authenticate requests, ensuring that only authorized applications can access payment functions. API keys are generated in the Modem Pay dashboard and can be used in either live or test modes.
-
API Keys
Modem Pay provides two types of API keys:- Public Key: Used on the client side for initial requests (e.g., HTML form submissions).
- Secret Key: Used on the server side for secure API calls and operations that need high trust (e.g., managing payment intents, accessing sensitive customer data).
-
Using API Keys in Requests
To authenticate a request, include the appropriate key in the request header:Alternatively, in HTML forms, pass the
public_key
as a hidden field. -
Test and Live Modes
Modem Pay separates test and live keys, enabling you to test transactions without impacting real accounts. Test keys operate in a sandbox environment, allowing you to simulate payment flows before going live.