Authentification
π Getting an API Key
Sign up or log in to your sandbox account at: https://business.krezypay.com/login
Navigate to Settings > Developer Setting
Complete your developer profile
π Make your first request
Generate your first token
POST
https://api.krezypay.com/v1/sandbox/token
Body
Name
Type
Description
public_key
string
The public key issued by the system
secret_key
string
The secret key issued by the system
Response
{
"token_type": "Bearer",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vYXBpLmtyZXp5cGF5LmNvbSIsImlhdCI6MTcyOTAyMTI2NCwiZXhwIjoxNzI5MTA3NjY0LCJ1c2VyX2lkIjoiRGZZOW82VDlSM2x5Z21qTjNwQXBWMXVXMjB4MTloSzEwd0NRNjJ4UzhNbmRsN2RJYnlpa1hmdmF6d1VjOHJCaWU0cU9FdHQ4Wm5nNmVjcTI3Rkc1YXI0anNoc3ZMbWI3ejRIMzUwUG9KazV1In0.Fg92V5ZK-eKqTPXP-kPehvechFGZOBcHlTvOwj9nYAI",
"expires_in": 86400
}
See Examples Below
const url = 'https://api.krezypay.com/v1/sandbox/token';
const data = {
public_key: "pk_G85mdzusjlK...",
secret_key: "sk_7d03871lQ5..."
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
Congrats, you've authenticated and made your first request!
Last updated