Vulcan Forge
  1. Loans
Vulcan Forge
  • Introduction
  • Getting Started
  • Authentication & Authorization
  • Core Concepts
    • Terminology
    • Regulated Assets
    • Tenants
    • Mapping & Labelling
    • Solana Networks
    • Transaction Processing
    • Key Management
    • Read Layer
  • API Reference
    • Blockchain Accounts
      • Create Account
      • Fetch Account Details
      • Fetch Account Balance
      • Fetch Account Private Key
      • Fetch Accounts
      • Update Account
      • Inactivate Account
    • Financial Instruments
      • Create Financial Instrument
      • Update Financial Instrument
      • Fetch Financial Instrument Details
      • Fetch Financial Instruments
      • Token Extensions Calculator
    • Positions
      • State
        • Initialize Position
        • Close Position
        • Freeze Position
        • Unfreeze Position
      • Movements
        • Mint
        • Burn
        • Transfer Financial Instrument
        • Transfer SOL
      • Trades
        • Trade
      • History
        • Fetch Positions
        • Fetch Position Details
        • Fetch Position Balance
    • Loans
      • Create Loan
        POST
      • Fetch Loan Details
        POST
      • Fetch Loans
        POST
      • Swap Collateral
        PATCH
      • Repay Loan
        PATCH
      • Close Loan
        PATCH
      • Refinance Loan
        PATCH
    • Blockchain Transactions
      • Processing
        • Fetch Transaction Status
        • Sign Transaction
        • Submit Transaction
      • Durable Nonces
        • Create Durable Nonce Accounts
        • Fetch Durable Nonce Account Details
        • Fetch Durable Nonce Accounts
      • Address Lookup Tables
        • Create Address Lookup Table
        • Fetch Address Lookup Table Details
        • Fetch Address Lookup Tables
        • Extend Address Lookup Table
        • Update Address Lookup Table
      • History
        • Fetch Transactions
        • Fetch Transaction Details
    • Market Data
      • Update Feed
  • Schemas
    • Accounts
      • DKG
        • DKG Key Setup
      • Offchain References
      • Account Lookup
      • New Account
      • Tenancy Config
      • Account Balance
      • Offchain File
    • Transactions
      • Solana Transaction Config
      • Commitment Config
      • Transaction Lookup
    • Query
      • Query Components
        • Sort Model
        • Field Value Filter
        • Filter Model
      • Items Query
    • Reponses
      • Errors
        • Individual Error
        • Error Response
      • Accounts
        • Private Keys
          • Private Key Details
          • Database Private Key Details
          • Cloud Provider Resource Location
          • DKG Private Key Details
        • Account Response Detailed
        • Account Onchain Detailed
        • Account Offchain Detailed
        • Account Response Identifiers
        • Account Offchain Compact
        • Account Response Compact
        • Account Onchain Compact
      • Transactions
        • Solana Transaction Result
        • Solana Entity Result
      • Positions
        • Position Offchain Result
    • Positions
      • Position Lookup
      • Transfer Financial Instrument Definition
      • Burn Definition
      • Mint Definition
      • Transfer SOL Definition
      • Position Balance
    • Loans
      • Loan Duration
  1. Loans

Repay Loan

Testing
Development
https://vf-solana-api.dev.alphaledger.com
Development
https://vf-solana-api.dev.alphaledger.com
PATCH
/api/v1/loans/repay
Creates Solana Transaction:If Requested
OperationId:repayLoan
Repays a loan. Use the itemsToRepay to specify the items from the borrower wallet to payoff the debts with and the itemsToRelease to specify what items to release from the loan back to the borrower wallet.
Defi Lending Protocols supported:
Loopscale
For LOOPSCALE loands: the account of the borrower needs to be passed as the lookup in the solanaTransactionConfig.feePayer. Because the feePayer cannot be different than the borrower account set on the loan. Otherwise the borrower wallet is implied from the assetsToRepay / assetsToRelease.
Please note that the owner account (for the investor) across all assets to be paid and released has to be the same.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Query Params

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠429Too Many Requests
🔴500Internal Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://vf-solana-api.dev.alphaledger.com/api/v1/loans/repay?solanaClusterId=SOLANA_DEVNET' \
--header 'x-request-id: f9860f73-a466-41f2-a083-34eeb1cc3a3c' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "itemData": {
        "defiProtocol": "LOOPSCALE",
        "escrow": {
            "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
            "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
            "offchainReferences": {
                "alId": "ALFNDPF000153778",
                "organizationExternalId": "ALT",
                "accountNumber": "ALT10000233",
                "code": "some-authority",
                "type": "WALLET"
            },
            "isOtherTenantSigner": false,
            "otherTenantOrganizationExternalId": "ALIM",
            "offPlatform": false
        },
        "itemsToRepay": [
            {
                "positionLookup": {
                    "position": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "owner": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "financialInstrument": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "mintAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "freezeAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    }
                },
                "amount": 100.5,
                "repayAll": false,
                "transferFrom": {
                    "position": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "owner": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "financialInstrument": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "mintAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "freezeAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    }
                },
                "mintAsset": false
            }
        ],
        "itemsToRelease": [
            {
                "positionLookup": {
                    "position": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "owner": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "financialInstrument": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "mintAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "freezeAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    }
                },
                "amount": 100.5,
                "relaeaseAll": false,
                "transferTo": {
                    "position": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "owner": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "financialInstrument": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "mintAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "freezeAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    }
                },
                "burnAsset": false
            }
        ],
        "submitTransaction": true
    },
    "solanaTransactionConfig": {
        "feePayer": {
            "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
            "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
            "offchainReferences": {
                "alId": "ALFNDPF000153778",
                "organizationExternalId": "ALT",
                "accountNumber": "ALT10000233",
                "code": "some-authority",
                "type": "WALLET"
            },
            "isOtherTenantSigner": false,
            "otherTenantOrganizationExternalId": "ALIM",
            "offPlatform": false
        },
        "computeUnitConfig": {
            "enable": true,
            "limit": 1400000,
            "price": 35000,
            "priceEstimate": {
                "provider": "HELIUS",
                "calculationStrategy": "DEFAULT"
            }
        },
        "commitmentConfig": {
            "commitmentLevel": "processed"
        },
        "messageLifetimeStrategy": "RECENT_BLOCKHASH",
        "transactionVersion": "V0"
    },
    "tenancyConfig": {
        "overrideOrganizationExternalId": "ALIM"
    }
}'
Response Response Example
200 - Example 1
{
    "success": false,
    "offchainId": "ee36c656-aa74-4d6a-b23c-332c204cb202",
    "status": "SIGNED",
    "onchainId": "5nwo7XvhiVRpJasEzH5r3hGKJqaTxd7qVit3cedFJgESdAPrmawebMJu6fUKRfjXEaivuey7vBsW56xPxX76T1bm",
    "confirmationsCount": 2,
    "serializedMessage": "string",
    "errorMessage": "string",
    "txnTimestamp": "2025-10-21T16:17:45.035372Z"
}
Modified at 2025-12-05 08:59:24
Previous
Swap Collateral
Next
Close Loan
Built with