Prepare#
const intent = api.payments.prepare({
from: 'me', to: 'eren', amount: 2500,
note: 'Shared expense', context: { type: 'send' },
key: 'example-send-1'
});Approve and execute#
const proof = api.auth.issue('me',
api.payments.paymentScope(intent), 'demo-confirmation');
const result = await api.payments.execute(intent.id, proof);
// Check result.status; submission is not settlement.Proposed HTTP contract#
POST /transfers is an illustrative server boundary, not an available endpoint. A production design must authenticate the sender, represent monetary values safely and reconcile provider outcomes. Reuse the same idempotency key for the same instruction only.