Knit API Documentation
CPN Onboarding Checklist
This checklist maps Circle CPN V2 requirements to Knit's Managed Signing API.
Overview
| Step | Action | Endpoint | Frequency |
|---|---|---|---|
| 1 | Create Wallet | POST /managed-signing/wallets | Once |
| 2 | Create Policy | POST /managed-signing/policies | Once |
| 3 | Permit2 Approval | POST /managed-signing/requests | Once per token |
| 4 | Per-Payment Signature | POST /managed-signing/requests | Per payment |
Step 1: Create a Managed Signing Wallet
Create a wallet that will hold funds and sign CPN transactions.
Production:
{
"type": "EVM",
"networks": ["MATIC_MAINNET"]
}Testing (Sandbox/Dev):
{
"type": "EVM",
"networks": ["MATIC_AMOY"]
}See: Create Wallet
Step 2: Create a CPN Policy
Configure policy rules that allow CPN V2 signature flows.
Production:
{
"name": "cpn-v2",
"rules": {
"chains": ["MATIC_MAINNET"],
"tokens": ["<USDC token address>"],
"spenders": ["<Permit2 contract address>"],
"typedData": { "allow": true },
"denyUnlimitedApprovals": false,
"allowRawTx": false
}
}Testing (Sandbox/Dev):
{
"name": "cpn-v2-test",
"rules": {
"chains": ["MATIC_AMOY"],
"tokens": ["<USDC testnet token address>"],
"spenders": ["<Permit2 testnet contract address>"],
"typedData": { "allow": true },
"denyUnlimitedApprovals": false,
"allowRawTx": false
}
}See: Create Policy
Step 3: One-Time Permit2 Approval
Approve the Permit2 contract to spend USDC on behalf of your wallet.
{
"walletId": "<wallet-id>",
"network": "MATIC_MAINNET",
"type": "evm_tx",
"kind": "erc20_approve",
"payload": {
"token": "<USDC token address>",
"spender": "<Permit2 contract address>",
"amount": "<approval amount>"
},
"broadcast": true
}For testing, use MATIC_AMOY network with testnet token/contract addresses.
See: Permit2 Approval
Step 4: Per-Payment Signature
For each payment, Circle provides messageToBeSigned (EIP-712 typed data). Sign it and return the signature.
{
"walletId": "<wallet-id>",
"network": "MATIC_MAINNET",
"type": "eip712",
"payload": {
"typedData": { "...Circle's messageToBeSigned..." }
}
}For testing, use MATIC_AMOY network.
(Optional) Step 5: CPN V1 Raw Transaction
Only needed for legacy CPN V1 integration.
See: CPN V1 Raw TX
Key Addresses
Production Networks
| Network | USDC Token | Permit2 Contract |
|---|---|---|
| Polygon (MATIC_MAINNET) | Contact Circle | Contact Circle |
| Ethereum (ETHEREUM_MAINNET) | Contact Circle | Contact Circle |
Testnet Networks (Sandbox/Dev)
| Network | USDC Token | Permit2 Contract |
|---|---|---|
| Polygon Amoy (MATIC_AMOY) | Contact Circle | Contact Circle |
Contact Circle or refer to their documentation for the exact contract addresses for your integration.
Note: Most merchants test CPN integration using MATIC_AMOY testnet before moving to production.