Yuva DocsBack to Yuva
MVP / design

Provider Abstraction

A stable interface lets provider-specific behavior change underneath.

On this page

PaymentProvider contract#

A planned adapter can resolve a destination, prepare an instruction, retrieve transfer state and receive verified status updates. Optional operations such as cancellation require an explicit capability.

Example
// Illustrative interface, not a shipped remote SDK.
interface PaymentProvider {
  prepare(input: TransferInput): Promise<TransferIntent>;
  execute(id: string, approval: Approval): Promise<TransferResult>;
  retrieve(id: string): Promise<TransferResult>;
}

Other interfaces#

BankProvider handles account data and supported bank actions. CryptoProvider handles balances, quotes and authorized crypto execution. CardProvider handles funded TRY and card controls. InvestmentProvider handles supported holdings and orders.

Implement honestly#

The local adapters have different signatures from this illustrative contract. A production interface must define decimal representation, errors, idempotency, freshness, permissions and uncertain outcomes. Do not invent institution-specific endpoints.

Search Yuva Docs

Type to search the documentation.

↑ ↓ to navigate Enter to open · Esc to close