Bank of Georgia (BOG) Payment Gateway API integration for accepting online payments...
This skill provides guidance for integrating with the Bank of Georgia (BOG) Online Payment API.
| Item | Value |
|---|---|
| Auth URL | https://oauth2.bog.ge/auth/realms/bog/protocol/openid-connect/token |
| API Base | https://api.bog.ge/payments/v1 |
| Auth Method | OAuth 2.0 Client Credentials |
| Data Format | JSON |
IMPORTANT:
Accept-Language: ka or Accept-Language: en headerconst getAccessToken = async (clientId: string, clientSecret: string) => {
const credentials = Buffer.from(`${clientId}:${clientSecret}`).toString('base64');
const response = await fetch(
'https://oauth2.bog.ge/auth/realms/bog/protocol/openid-connect/token',
{
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Basic ${credentials}`
},
body: 'grant_type=client_credentials'
}
);
const { access_token, expires_in } = await response.json();
return { access_token, expires_in };
};
POST https://api.bog.ge/payments/v1/ecommerce/orders
Authorization: Bearer {access_token}
Content-Type: application/json
Request body:
{
"callback_url": "https://example.com/callback",
"external_order_id": "ORDER-123",
"purchase_units": {
"currency": "GEL",
"total_amount": 100.00,
"basket": [
{
"product_id": "PROD-1",
"quantity": 1,
"unit_price": 100.00
}
]
},
"redirect_urls": {
"success": "https://example.com/success",
"fail": "https://example.com/fail"
}
}
Response includes _links.redirect.href for payment page URL.
GET https://api.bog.ge/payments/v1/receipt/{order_id}
Authorization: Bearer {access_token}
POST https://api.bog.ge/payments/v1/payment/refund/{order_id}
Authorization: Bearer {access_token}
Content-Type: application/json
{"amount": 50.00} // Optional - omit for full refund
| Code | Meaning |
|---|---|
| 100 | Successful payment |
| 200 | Successful preauthorization |
| 101 | Card usage limited |
| 102 | Saved card not found |
| 103 | Invalid card |
| 104 | Transaction limit exceeded |
| 105 | Card expired |
| 106 | Amount limit exceeded |
| 107 | Insufficient funds |
| 108 | Authentication declined |
| 109 | Technical issue |
| 110 | Transaction expired |
| 111 | Authentication timeout |
| 112 | General error |
client_id and client_secret securely (env vars)