get https://staging-api.capa.fi/api/partner/v2/transactions/mock-testing-guide
Mock Testing Guide for Partners - Staging Environment
This guide explains how partners can test different transaction outcomes in the Capa.fi staging environment using specific transaction amounts.
Overview
The mock testing feature allows partners to simulate various transaction statuses without depending on real operational behavior. Capa will have this feature enabled in the staging environment for partner testing.
How to Use Mock Testing
For On-Ramp Transactions
Use the fiatAmount
to trigger specific mock behaviors:
Fiat Amount | Expected Status | Description |
---|---|---|
1.01 | COMPLETED | Transaction completes successfully |
1.02 | CANCELLED (NAME_VERIFICATION_FAILED) | Bank beneficiary is not the KYC'd user |
For Off-Ramp Transactions
Use the cryptoAmount
to trigger specific mock behaviors:
Crypto Amount | Expected Status | Description |
---|---|---|
1.01 | COMPLETED | Transaction completes successfully |
1.02 | CANCELLED (NAME_VERIFICATION_FAILED) | Bank beneficiary is not a KYC'd user |
1.03 | CRYPTO_NOT_RECEIVED | Failure due to no crypto transfer |
API Endpoint
You can get the current mock testing configuration by calling:
GET /api/v1/transactions/mock-testing-guide
This endpoint returns:
enabled
: Boolean indicating if mock testing is availableenvironment
: Current environment (should be "staging")onRampRules
: Array of on-ramp mock rulesoffRampRules
: Array of off-ramp mock rules
{
"cryptoAmount": 1.03,
"fiatAmount": 10.0,
"fiatCurrencyId": "...",
"blockchainToTokenId": "...",
"userBankInformationId": "..."
}
Important Notes
- Exact Amounts: You must use the exact amounts specified above (1.01, 1.02, 1.03)
- State Transitions: The system will automatically handle the necessary state transitions to reach the target status
- Real Validation: All other validation rules still apply (KYC status, limits, etc.)