Console Cards for Integrators and Vendors

Reach out to us to get access

Get delegation transaction

post

Generate a delegation transaction for credit management

Authorizations
Body
creditLimitintegerRequiredExample: 1000
creditTypeall ofRequiredExample: aave
string · enumOptional

Type of credit solver/protocol to use

Possible values:
userParamsobjectRequired
Responses
200
OK
application/json
Responseall of
post
POST /v1/vendor/cards/credit/delegate HTTP/1.1
Host: console.fi
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "creditLimit": 1000,
  "creditType": "aave",
  "userParams": {}
}
{
  "data": {
    "callData": "0xa9059cbb0000000000000000000000001234567890123456789012345678901234567890000000000000000000000000000000000000000000000000000000000000001",
    "chainID": 1,
    "from": "0x1234567890123456789012345678901234567890",
    "simulationSuccessful": true,
    "to": "0x9876543210987654321098765432109876543210",
    "value": "1000000000000000000"
  }
}

Get user credit metadata

get

Retrieve credit metadata for a specific credit solver type

Authorizations
Path parameters
typeanyRequired

Credit solver type (e.g., aave, euler)

Responses
200
OK
application/json
Responseall of
get
GET /v1/vendor/cards/credit/{type} HTTP/1.1
Host: console.fi
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": {
    "SupportedChainIDs": [
      1,
      8453,
      137
    ],
    "amountDelegated": "500000000000000000000",
    "availableLimit": "1000000000000000000000",
    "metadata": {}
  }
}

Get public verifying key

get

Retrieve the Rain public key used for signature verification

Responses
200
OK
application/json
Responseall of
get
GET /v1/vendor/cards/pubkey HTTP/1.1
Host: console.fi
Accept: */*
{
  "data": "text"
}

Get encrypted card details

get

Retrieve encrypted card details including optional PIN

Authorizations
Query parameters
showPinanyOptional

Include encrypted PIN in response

Header parameters
sessionIDanyRequired

Session ID for encryption

Responses
200
OK
application/json
Responseall of
get
GET /v1/vendor/cards/secrets HTTP/1.1
Host: console.fi
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": {
    "encryptedCvc": {
      "data": "text",
      "iv": "text"
    },
    "encryptedPan": {
      "data": "text",
      "iv": "text"
    },
    "encryptedPin": {
      "data": "text",
      "iv": "text"
    },
    "expirationMonth": "text",
    "expirationYear": "text"
  }
}

Get card transactions

get

Retrieve paginated transactions for a specific card

Authorizations
Path parameters
cardIDanyRequired

Card ID (UUID)

Query parameters
limitanyOptional

Number of transactions to return

cursoranyOptional

Pagination cursor

Responses
200
OK
application/json
Responseall of
get
GET /v1/vendor/cards/transactions/{cardID} HTTP/1.1
Host: console.fi
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": {
    "pagination": {
      "has_next": true,
      "limit": 10,
      "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0wMS0xNVQxMDozMDowMFoifQ=="
    },
    "transactions": [
      {
        "amount": 2500,
        "authorized_at": "2024-01-15T10:30:00Z",
        "created_at": "2024-01-15T10:30:00Z",
        "currency": "USD",
        "declined_reason": "insufficient_funds",
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "local_amount": 2500,
        "local_currency": "USD",
        "merchant": {
          "category": "Coffee Shops",
          "city": "San Francisco",
          "country": "US",
          "icon": "https://example.com/starbucks-icon.png",
          "name": "Starbucks Coffee"
        },
        "posted_at": "2024-01-15T10:31:00Z",
        "status": "completed",
        "type": "spend"
      }
    ]
  }
}

Get onchain transactions

get

Retrieve onchain transactions by transaction ID

Authorizations
Path parameters
transactionIDanyRequired

Transaction ID (UUID)

Responses
200
OK
application/json
Responseall of
get
GET /v1/vendor/cards/transactions/{transactionID}/onchain HTTP/1.1
Host: console.fi
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "amount": 2500,
      "amount_raw": "2500000000000000000000",
      "chain_id": "1",
      "completed_at": "2024-01-15T10:31:00Z",
      "created_at": "2024-01-15T10:30:00Z",
      "direction": "debit",
      "error_details": "",
      "fee_raw": "21000000000000000",
      "from_address": "0x1234567890123456789012345678901234567890",
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "purpose": "settlement",
      "status": "completed",
      "to_address": "0x9876543210987654321098765432109876543210",
      "token": "0xA0b86a33E6B5B8b1F2AcEcED5fE8b3efF12345",
      "transaction_hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
      "transaction_id": "650e8400-e29b-41d4-a716-446655440001"
    }
  ]
}

Update card PIN

put

Update the encrypted PIN for a specific card

Authorizations
Header parameters
sessionIDanyRequired

Session ID for encryption

Body
Responses
200
OK
application/json
put
PUT /v1/vendor/cards/update/pin HTTP/1.1
Host: console.fi
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "pin": {
    "encryptedPin": {
      "data": "text",
      "iv": "text"
    }
  }
}
{
  "data": null
}

Update card status

patch

Freeze or unfreeze a specific card

Authorizations
Body
freezebooleanRequiredExample: true
Responses
200
OK
patch
PATCH /v1/vendor/cards/update/status HTTP/1.1
Host: console.fi
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "freeze": true
}

No content

Get user cards

get

Retrieve all cards associated with the authenticated user

Authorizations
Responses
200
OK
application/json
Responseall of
get
GET /v1/vendor/cards/user HTTP/1.1
Host: console.fi
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "cardID": "550e8400-e29b-41d4-a716-446655440000",
      "creditProviderAddress": "0x1234567890123456789012345678901234567890",
      "creditType": "aave-v3",
      "last4": "1234",
      "protocolName": "brahma-fi",
      "status": "active",
      "type": "virtual"
    }
  ]
}

Check if applicant is US citizen

get

Check if the authenticated user is a US citizen according to SumSub

Authorizations
Responses
200
OK
application/json
Responseall of
get
GET /v1/vendor/cards/user/is_us HTTP/1.1
Host: console.fi
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": true
}

Get user status

get

Retrieve the current status of the authenticated user

Authorizations
Responses
200
OK
application/json
Responseall of
get
GET /v1/vendor/cards/user/status HTTP/1.1
Host: console.fi
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": "feePending"
}

Last updated