Skip to content

Authentication

All Astro API requests are authenticated via API keys passed in HTTP headers.

Key Types

KeyHeaderWho uses itPrefix
Merchant API KeyAuthorization: Bearer {key}Your server backendmk_live_ / mk_test_
Bank Partner KeyX-OpenWave-Bank-Key: {key}Bank systemsowbk_
Admin KeyX-OpenWave-Admin-Key: {key}Internal admin opsowadmin_
Session TokenX-Session-Token: {token}Client-side (checkout)ost_

Merchant API Key

The merchant key is used for all payment session and mandate operations. Never expose it in client-side code.

typescript
// ✅ Server-side only
import { createClient } from '@neptune.fintech/astro-sdk'

const astro = createClient({
  baseUrl: 'https://astro.neptune.ly/api/v1',
  merchantKey: process.env.ASTRO_MERCHANT_KEY
})
dart
// ✅ Flutter: keep key in secure backend, not in the app
final astro = AstroClient(AstroConfig(
  baseUrl: Uri.parse('https://astro.neptune.ly/api/v1'),
  merchantKey: const String.fromEnvironment('ASTRO_KEY'),
));

Test vs Live Keys

Keys prefixed mk_test_ hit the sandbox. Keys prefixed mk_live_ are production.

Keep keys secret

Never commit API keys to source control. Use environment variables or a secrets manager.

Session Tokens

Short-lived session tokens (ost_) are issued by Astro for individual payment sessions. They are scoped to a single session and have a 15-minute TTL. The checkout UI uses these automatically — you never need to handle them directly.

Built on the OpenWave open standard.