Skip to main content
Swervpay uses short-lived bearer access tokens to authorize API requests. Keep your business ID and secret key on your server, exchange them for an access token, and send that token with subsequent requests. To get an access token, send a POST request to /auth with your business ID and secret key encoded as Base64 in the Basic authorization header. The request body is empty.
Authentication URL: POST https://api.swervpay.co/api/v1/auth

Sample Request

Sample Response

Response
Access tokens expire after one hour. Request a new token when it expires instead of storing the secret key in the bearer-token field.