Create a funding source for an account
This endpoint can be used to claim a web3 address as a source of funds. The funding address may be an EOA or a smart contract implementing the ERC-1271 interface. If the address is a smart contract, the ownerAddress
, message
, and signature
fields are required.
The Create challenge endpoint can be used to prove ownership of a web3 address by signing the returned message.
- application/json
Request Body required
- oneOf
- create-funding-source-eoa
- create-funding-source-erc-1271
- create-funding-source-challenge
accountId string requiredThe ID of the cardholder account to add this Funding Source to.
fundingAddress string requiredThe address to claim as a Funding Source. This can be a smart contract implementing ERC-1271 or an EOA address.
fundingChannelId string requiredThe id of the Funding Channel that this Funding Source relates to.
accountId string requiredThe ID of the cardholder account to add this Funding Source to.
fundingAddress string requiredThe address to claim as a Funding Source. This can be a smart contract implementing ERC-1271 or an EOA address.
ownerAddress string requiredEOA address that matches a login wallet.
fundingChannelId string requiredThe id of the Funding Channel that this Funding Source relates to.
message string requiredAn EIP-4361 message which is signed by the ownerAddress. This is used to verify ownership of the owner address.
signature string requiredThe signature of the message.
accountId string requiredThe ID of the cardholder account to add this Funding Source to.
fundingAddress string requiredThe address to claim as a Funding Source. This can be a smart contract implementing ERC-1271 or an EOA address.
fundingChannelId string requiredThe id of the Funding Channel that this Funding Source relates to.
challengeId string requiredId of challenge returned by Create challenge endpoint
signature string requiredSignature generated by signing message from challenge returned by Create challenge endpoint
- 200
- 400
- 403
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
- id string
Funding Source primary identifier
- accountId string
Cardholder account this Funding Source belongs to
- createdAt string
Timestamp of Funding Source creation
- balance string
Current balance of Funding Source in minor units
- balanceCurrency string
Currency of the balance
- fundingChannelId string
The id of the Funding Channel that this Funding Source relates to.
{
"id": "91ad6fea3b52ca58d60d7fd310f789ec",
"accountId": "057aa15913a57f50577234c8426534c0",
"createdAt": "2022-11-16T03:13:18.142Z",
"balance": "1000000",
"balanceCurrency": "USDC",
"fundingChannelId": "315bad4e81ce0f26966a41b9d451638b"
}
Request fields are invalid
- application/json
- Schema
- Example (from schema)
Schema
- statusCode integer required
- statusName string required
- errorCode string required
- errors string[]
{
"statusCode": 400,
"statusName": "Bad Request",
"errorCode": "BAD_REQUEST",
"errors": [
"Expected string, received number"
]
}
User is not allowed to perform the action with the reason stated in the errorCode
FORBIDDEN Insufficient permissions to perform the action.
SIGNATURE_DENIED
The signature was rejected by the ERC-1271 contract isValidSignature
function.
SIGNATURE_INVALID The message signature was invalid.
ADDRESS_MISMATCH
The ownerAddress
does not match the EIP-4361 message address.
- application/json
- Schema
- Example (from schema)
Schema
- statusCode integer required
- statusName string required
- errorCode string required
- reason string
{
"statusCode": 403,
"statusName": "Forbidden",
"errorCode": "FORBIDDEN",
"reason": "Unauthorized"
}