Skip to main content

Prime PayFi

Prime PayFi lends a payment orchestrator (PO) 90% of each payout while the sender's fiat clears. Liquidity providers fund the 90% through a lending market open only to that PO. The PO adds the other 10% from its own custody account, pays the receiver in full at once, and repays the loan when the fiat arrives one to three days later.

Every advance, release and repayment is a Stellar transaction. The PO's borrowing account is a Prime smart account, and its on-chain rules check each payout before it runs: the loan size, the PO's collateral cover, the price feeds and the line's cap. Untangled's signing service screens each receiver and ties each advance to the pay-in it funds.

Status​

Prime PayFi is in public beta on Stellar testnet, with a test dollar (TUSD) in place of a real stablecoin. Stellar mainnet and other networks are planned. The SDK and the signing service refuse mainnet today, and the beta's figures are testnet settings that a production line will set again. The items left before real money are listed in Limits and protections.

Beta app and servicepayfi-beta.untangled.finance
TypeScript SDK@crediolabs/payfi-sdk 0.2.2 on npm
APIOpenAPI 3.1, shipped in the SDK package (API reference)
NetworkStellar testnet

Reading order​

The pages run from the business case to a working integration.

PageWhat it covers
The problem and the modelWhy a PO needs the advance, the 90/10 split, who takes part, and a worked example
How it worksThe accounts and contracts, who signs each flow, what the chain checks, and the protocols underneath
FlowsA payout, a repayment, an overdue advance, a cover withdrawal, a liquidation and a take-over, as diagrams
Limits and protectionsEvery limit with its testnet value, what protects the liquidity providers, what stays open
IntegrateThe SDK, quick start, auth, each flow in code, steps, errors and the API routes
Onboarding a POThe steps from first contact to the first funded payout and repayment
GlossaryThe terms these pages use

A business reader can stop after the first four pages. An engineer joining a PO's integration can start at Integrate and come back to How it works for the reasons behind each check.

Built on Untangled protocols​

Prime PayFi uses existing Untangled contracts, configured for one PO per line.

  • OctoLend: the lending market that holds the liquidity providers' money and lends against the PO's payment obligations.
  • Untangled Prime: the smart account that borrows, with its policy rules, execution contract and custody gate. The contract mechanics are on the OctoGate page Prime contracts on Stellar.

The beta adds one small contract of its own: an admin-gated price feed.