Creating a Funding Channel

A Funding Channel is a partner's configured instance of a Funding Type. Every cardholder Funding Source belongs to one, so a partner creates a Funding Channel for each network and token its cardholders fund cards with before any of them can create a Funding Source. This guide covers creating one with the Create Funding Channel endpoint. See Funding Protocols to choose a Funding Type.

Request Fields

A Create Funding Channel request names the partner account, the Funding Type it configures, and the parameters that Funding Type requires. The Funding Channel ID in the response is what you pass when creating cardholder Funding Sources.

Create Funding Channel Fields
FieldDescription
accountIdThe partner account that owns the Funding Channel.
fundingTypeNameThe Funding Type to configure. Funding Types lists the available names.
purposecard-funding (the default) for channels that fund cardholder cards, or billing for the channel a custodial partner settles from. See the Custodial Card Issuing Integration Guide.
paramsSettings that depend on the Funding Type's Funding Protocol. See Funding Protocol Parameters.

Funding Protocol Parameters

The params a Funding Channel takes depend on the Funding Protocol behind its Funding Type. On-chain protocols register a contract the partner deployed beforehand; the guide for each protocol covers that setup.

Parameters by Funding Protocol
Funding ProtocolParameters
Universal EVMstorageAddress — The address of the partner's Funds Storage contract. See the Universal EVM Funding Protocol.
AlgorandpartnerChannelAddress — The address of the partner's Partner Channel contract. See the Algorand Funding Protocol.
CustodialbillingFundingSourceId — The billing Funding Source that settles card payments. webhookBaseUrl — The HTTPS base URL that receives custodial webhooks. See the Custodial Funding Protocol.
SimulatorNone; pass an empty object. See the Simulator Funding Protocol.

Universal EVM Example

The example below registers a deployed Universal EVM Funds Storage contract on the Polygon Amoy testnet, so Immersve credits deposits to that contract to your partner account. For other Funding Protocols, change the Funding Type and params to match.

Terminal window
imsv_api_host="test.immersve.com"
account_admin_api_key="<your_account_admin_api_key>"
account_admin_api_secret="<your_account_admin_api_secret>"
partner_account_id="<your_partner_account_id>"
funds_storage_address="<your_funds_storage_address>"
funding_type_name="polygon-amoy-usdc-universal-evm-test"
Set the environment variables used by the example.
Terminal window
curl -X POST "https://${imsv_api_host}/api/funding-channels" \
-H "Content-Type: application/json" \
-H "X-Api-Key: ${account_admin_api_key}" \
-H "X-Api-Secret: ${account_admin_api_secret}" \
--data '{
"accountId": "'${partner_account_id}'",
"fundingTypeName": "'${funding_type_name}'",
"params": {
"storageAddress": "'${funds_storage_address}'"
}
}'
Example call to Create Funding Channel for a Funds Storage contract.