https://pay.chargeakku.com/api/v1This API enables payment processing through multiple banks via Open Banking. The flow is:
List all available banks/institutions.
Response:{
"success": true,
"data": [
{
"id": "modelo-sandbox",
"name": "Modelo Bank",
"fullName": "Modelo Sandbox Bank",
"countries": ["GB"],
"media": [...]
}
]
}
Get details for a specific institution.
Example:GET /api/v1/institutions/modelo-sandbox
Initiate a new payment. Returns an authorization URL for the user.
Request Body:{
"institutionId": "modelo-sandbox",
"amount": 10.50,
"currency": "GBP",
"reference": "Test Payment",
"callbackUrl": "myapp://payment-callback" // Optional
}
Response:
{
"success": true,
"data": {
"sessionId": "abc123...",
"authorisationUrl": "https://auth.yapily.com/...",
"consentId": "xyz789..."
}
}
authorisationUrl in a browser/webviewcallbackUrl with consent tokenconsent parameter from callback
Execute the payment after user authorization.
Request Body:{
"sessionId": "abc123...",
"consentToken": "eyJhbGc..."
}
Response:
{
"success": true,
"data": {
"paymentId": "pay_123...",
"status": "PENDING",
"amount": 10.50,
"currency": "GBP",
"reference": "Test Payment",
"institutionId": "modelo-sandbox",
"createdAt": "2025-10-19T..."
}
}
Check payment status.
Example:GET /api/v1/payments/abc123/status
Response:
{
"success": true,
"data": {
"sessionId": "abc123...",
"paymentId": "pay_123...",
"status": "COMPLETED",
"amount": 10.50,
"currency": "GBP",
"reference": "Test Payment",
"institutionId": "modelo-sandbox",
"payee": {...},
"payer": {...},
"createdAt": "2025-10-19T...",
"statusDetails": {...}
}
}
Get session details (without querying Yapily).
// 1. Initiate payment
const response = await fetch('https://pay.chargeakku.com/api/v1/payments/initiate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
institutionId: 'modelo-sandbox',
amount: 10.50,
currency: 'GBP',
reference: 'App Payment',
callbackUrl: 'myapp://payment-callback'
})
});
const { data } = await response.json();
const { sessionId, authorisationUrl } = data;
// 2. Open bank authorization
Linking.openURL(authorisationUrl);
// 3. Handle callback (in your deep link handler)
const handleDeepLink = async (url) => {
const params = new URL(url).searchParams;
const consentToken = params.get('consent');
// 4. Execute payment
await fetch('https://pay.chargeakku.com/api/v1/payments/execute', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ sessionId, consentToken })
});
// 5. Check status
const status = await fetch(`https://pay.chargeakku.com/api/v1/payments/${sessionId}/status`);
const { data: payment } = await status.json();
console.log('Payment status:', payment.status);
};
All errors return the following format:
{
"success": false,
"error": "Error type",
"message": "Detailed error message",
"details": {...} // Optional additional details
}
Set these environment variables in your .env file:
YAPILY_APP_ID=your_app_id
YAPILY_APP_SECRET=your_secret
PORT=8765
BASE_URL=https://pay.chargeakku.com
CALLBACK_URL=https://pay.chargeakku.com/payment-callback