Check Metadata
Check if transaction has proper metadata to prevent interchange downgrades
POST/api/down/checkOptional Auth
publicproductoptional-auth
Example Request
cURL
curl -X POST https://margin.so/api/down/check \
-H "Content-Type: application/json" \
-H "X-API-Key: sk_live_your_api_key_here" \
-d '{}'JavaScript
const response = await fetch('https://margin.so/api/down/check', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'sk_live_your_api_key_here'
},
body: JSON.stringify({})
});
const data = await response.json();
console.log(data);Python
import requests
response = requests.post(
'https://margin.so/api/down/check',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'sk_live_your_api_key_here'
},
json={}
)
data = response.json()
print(data)Example Response
{
"success": true,
"data": {
"transaction_id": "txn_abc123def456",
"bin": "471234",
"is_commercial": true,
"card_category": "CORPORATE",
"required_data": {
"level_2": true,
"level_3": true
},
"provided_data": {
"level_2": true,
"level_3": false,
"cvv": true,
"avs": true
},
"downgrade_risk": "high",
"missing_fields": [
"line_items",
"shipping_address"
],
"estimated_penalty_bps": 50,
"estimated_penalty_cents": 50,
"qualified_rate_bps": 280,
"downgraded_rate_bps": 330,
"recommendation": "Include Level 3 data to qualify for lower interchange rate",
"event_id": "evt_check_abc123"
}
}Request Body
| Field | Type | Required | Description |
|---|