1 USD ≈ 27,000 credits · display only
Reference rate may change over time.
1 USD ≈ 27,000 credits · display only
Reference rate may change over time.
Gommo Developer client
Official Gommo Developer TypeScript client — npm alias @ai-gateway/client. Calls Gommo public API (api.gommo.net, v2.api.gommo.net).
Coming to Gommo platform
client.billing requires self-hosted gateway (transport: 'gateway', gatewayBaseUrl). Gommo platform billing SDK is on the roadmap.
Gommo billing API — credit top-up via bank transfer (gateway proxy today).
const status = await client.billing.status();
const packages = await client.billing.packages();const me = await client.auth.me();
const username = me.userInfo?.username!;
const payment = await client.billing.createPayment({
username,
packageId: 'basic-member',
invoiceBuyer: {
type: 'consumer',
name: 'Bán cho người tiêu dùng',
email: '',
},
promoCode: 'OPTIONAL',
});
const orderCode = payment.data?.content ?? payment.data?.orderCode;
console.log(payment.data?.qrImage);const sync = await client.billing.syncPayment({ orderCode: String(orderCode) });
if (sync.data?.paid) console.log('Credits applied by Gommo');const orders = await client.billing.listOrders(username, 20);const order = await client.billing.createTopup({ username, packageId: 'basic-member' });Requires server PAYOS_* + merchant token.