API

At the moment of Authorization, the issuer queries the Yumi API for a credit limit using an HTTP request:

a. Endpoint: Send a POST request to the permit endpoint.

POST https://yumi-app-prod.up.railway.app/underwriting/permit

b. Request Body

underwriteData object required

underwriteData.EVMwalletAddresses string[] required EVM wallet addresses of the user Example: [ "0x123...", "0x456..." ]

underwriteData.SOLwalletAddresses string[] required SOL wallet addresses of the user Example: [ "abc...", "def..." ]

underwriteData.walletBalance number required Bank account balance of the user Example: 1000

permitData object required

permitData.spender string required Executor of the permit Example: "0x789..."

permitData.value number required USDC amount the user wants to loan Example: 30

If the credit is approved, the endpoint returns a permit signature for the requested USDC value, enabling the issuer to withdraw funds from the Yumi vault.

c. Response

Success (Credit approved)
{
    "code": 1,
    "permit": {
        "signature": {
            "v": 1,
            "r": "0x...",
            "s": "0x..."
        },
        "owner": "0x...", // Yumi vault
        "spender": "0x456...",
        "value": "40000000", // 40 USDC in decimals
        "deadline": "1719000000"
    },
    "creditLimit": 250, // USDC
    "msg": "Credit approved",
    "timestamp": 1761166681347
}
Success (Credit denied)
Exception (Parameter Error)
Exception (System Error)

Last updated

Was this helpful?