Skip to content

Make your first evaluation

You need an environment base URL, API key, and HMAC secret supplied by Vantrace. The examples below send the same minimal outbound-transfer payload; account_snapshot and context are optional and are covered in the request schema.

Terminal window
export VANTRACE_BASE_URL="https://your-authorised-base-url"
export VANTRACE_API_KEY="your-api-key"
export VANTRACE_HMAC_SECRET="your-hmac-secret"

Keep these values in a server-side secret manager. Do not put them in browser code or source control.

Every example serializes the payload once, signs those exact UTF-8 bytes, and sends the same bytes as the request body.

Requires Bash, cURL, OpenSSL, and uuidgen.

Terminal window
body='{"transaction":{"reference_id":"BANK-TXN-0001","amount":25000.0,"currency":"NGN","trx_type":"transfer","channel":"mobile_app","txn_direction":"outbound","is_cash":false,"source_account_id":41001,"evaluated_account_id":41001,"beneficiary_account_id":91001},"customer":{"customer_id":"CUST-1001","entity_type":"individual","kyc_tier":2,"is_pep":false,"sanctions_flag":false,"adverse_media_flag":false,"is_shell_company":false,"has_complete_cdd":true},"context":{"current_balance":480000.0}}'
timestamp="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
request_id="$(uuidgen)"
signature="$(printf '%s' "$body" | openssl dgst -sha256 -hmac "$VANTRACE_HMAC_SECRET" -hex | sed 's/^.* //')"
curl --fail-with-body --request POST \
"$VANTRACE_BASE_URL/v1/engine/evaluate" \
--header 'Content-Type: application/json' \
--header "X-API-Key: $VANTRACE_API_KEY" \
--header 'X-Signature-Version: v2' \
--header "X-Timestamp: $timestamp" \
--header "X-Request-ID: $request_id" \
--header "X-Signature: $signature" \
--data-binary "$body"

These first-call examples do not prescribe production timeout values. Before launch, configure explicit connect and read timeouts confirmed for your network path and integration agreement; see Reliability and retries.

A successful non-blocking response includes at least these decision fields:

{
"evaluation_status": "complete",
"should_block": false,
"final_action": "none"
}

Store your reference_id, the returned trx_id, and the X-Request-ID you generated for reconciliation.