Keep credentials on your server.
The proposed API uses bearer authentication over HTTPS. Production keys must never appear in browser bundles, URLs or client-side storage. This preview issues no real keys.
Use scoped credentials per environment.
Store keys in a server-side secrets manager.
Rotate and revoke credentials, and redact them from logs.
/v1/payments// Proposed contract · no live endpoint
const response = await fetch(
'https://api.paytovio.example/v1/payments',
{
method: 'POST',
headers: {
Authorization: 'Bearer sk_sandbox_PLACEHOLDER',
'Content-Type': 'application/json',
'Idempotency-Key': 'order_demo_1048'
},
body: JSON.stringify({
amount: '249.00',
token: 'USDC',
network: 'base',
order_id: 'order_demo_1048'
})
}
);
if (!response.ok) throw new Error('Payment request failed');
const payment = await response.json();
Server-side authentication, input validation, wallet ownership checks, network monitoring, finality policy, signature verification and operational controls require separate implementation. Fulfill orders only from a verified backend state.