Paymish Docs
Quickstart
- Paymish
- Quickstart
Quickstart
Make your first successful Paymish API call in a few minutes
This quickstart takes you from generating a key to reading a real API response. The example uses the profile endpoint because it is a safe way to verify authentication.
Before you start: create a test key in the Paymish Dashboard.
Base URL
https://api.paymish.com/api/user-service/external/v1
Authentication
Send your secret key as Authorization: Bearer ... on every request.
Call the profile endpoint to confirm that your test secret key is valid.
Python
import os
import requests
response = requests.get(
"https://api.paymish.com/api/user-service/external/v1/profile",
headers={
"Authorization": f"Bearer {os.environ['PAYMISH_SECRET_KEY']}",
"Content-Type": "application/json",
},
)
print(response.json())
Node.js
const axios = require("axios");
const { data } = await axios.get(
"https://api.paymish.com/api/user-service/external/v1/profile",
{
headers: {
Authorization: `Bearer ${process.env.PAYMISH_SECRET_KEY}`,
"Content-Type": "application/json",
},
}
);
console.log(data);
cURL
curl https://api.paymish.com/api/user-service/external/v1/profile \
-H "Authorization: Bearer $PAYMISH_SECRET_KEY" \
-H "Content-Type: application/json"
PHP
<?php
$secretKey = getenv("PAYMISH_SECRET_KEY");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.paymish.com/api/user-service/external/v1/profile");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer $secretKey",
"Content-Type: application/json",
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Most successful Paymish responses return a consistent JSON envelope with a status, message, and payload.
Example response
{
"status": true,
"message": "Profile retrieved successfully.",
"data": {
"id": "usr_abc123",
"email": "dev@example.com",
"firstName": "Kwame",
"lastName": "Mensah",
"createdAt": "2024-01-15T10:30:00Z"
}
}
statustells you if the request succeeded.messagegives a readable summary of the outcome.datacontains the endpoint-specific payload.