Testing Bulk Enrollment
Run bulk enrollment in the sandbox environment: create a network bulk feed, send a simulated network delivery, and watch cards and transactions appear.
For: developers
Introduction
This guide runs bulk enrollment in the sandbox environment end to end: create a network bulk feed, send a simulated network delivery, and watch cards and transactions appear, with no real network file. Every request below runs against https://api.sandbox.astrada.co with a bearer token from Get a token.
In production, the network (Visa, Mastercard, American Express) delivers card files to Astrada on a schedule you do not control. In sandbox, you play the network: POST /simulate/ingestion/{network} creates a simulated delivery and Astrada processes it like a real one, drawing cards from fixed test card pools. Everything after the delivery is the real processing, so the webhooks and resources you see here are what you will see in production.
1. Create a bulk feed
A feed registers the network reference that your files arrive under. Create one per network you want to test; this walkthrough uses a Visa file feed (type: VCF). Use any of your subaccounts as {subaccountId} (or create one as in Testing Bank Linking). The networkReference format is network-specific, and the feed's network and type must match the simulate endpoint you call in step 2.
POST /network-bulk-feeds HTTP/1.1
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
{
"networkReference": "1_123_45_6789",
"network": "VISA",
"type": "VCF",
"subaccountId": "{subaccountId}"
}curl -X POST https://api.sandbox.astrada.co/network-bulk-feeds \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"networkReference": "1_123_45_6789",
"network": "VISA",
"type": "VCF",
"subaccountId": "{subaccountId}"
}'{
"networkReference": "1_123_45_6789",
"network": "VISA",
"type": "VCF",
"subaccountId": "{subaccountId}"
}Response (201 Created): the feed resource with state: submitted. A VCF feed stores its Visa reference without the region and without leading zeros, so 1_123_45_6789 comes back as 123_45_6789.
{
"id": "75ea3c99-6bf5-4b16-8f68-0cdc43d75806",
"subaccountId": "...",
"network": "VISA",
"networkReference": "123_45_6789",
"state": "submitted",
"type": "VCF",
"panFormat": "encrypted",
"createdAt": "2026-08-28T09:00:00Z",
"updatedAt": "2026-08-28T09:00:00Z"
}Per-network bodies:
| Network | network / type | networkReference format | Notes |
|---|---|---|---|
| Visa, feed type not yet known | VISA / omit type | Visa reference 1_123_45_6789 | Astrada registers the feed for both Visa feed types; type is null until the first Visa delivery arrives, then it becomes VBDS or VCF. In sandbox the simulated starter data of a pulled feed sets VBDS right after creation. |
| Visa, pulled feed | VISA / VBDS | Visa reference 1_123_45_6789 | Astrada pulls the data from Visa. cardCount (1-20, sandbox-only, this feed type only) sizes an automatic starter fetch at creation, so cards appear without step 2. |
| Visa, file | VISA / VCF | Visa reference 1_123_45_6789 | File-based; nothing happens until step 2. |
| Mastercard, file | MASTERCARD / SMARTDATA (default) | Delivery ID G1234567 | File-based. |
| American Express, file | AMEX / GL (default) | Recipient ID R12345 | File-based. panFormat: tokenized (sandbox-only, American Express only) tests network tokens in place of card numbers; default is encrypted. On a tokenized feed newCardCount is unsupported and an omitted cardCount draws the whole tokenized pool (see the Sandbox API Reference). |
One feed per reference
POST /network-bulk-feedsreturns409 Conflictif the subaccount already has a feed for thatnetworkReferencethat has not failed or been deleted. For Visa, the same reference with or without its region number in front counts as the same feed. Reuse the existing feed and go straight to step 2; the simulate endpoints can be called on the same feed as often as you like.
2. Send a simulated delivery
Each network has a simulate endpoint that creates a simulated delivery for an existing feed. All four take the same three fields (cardCount, newCardCount, transactionsPerCard) and return 202 Accepted with an empty body; processing is asynchronous.
POST /simulate/ingestion/vcf HTTP/1.1
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
{
"networkReference": "1_123_45_6789",
"cardCount": 0,
"newCardCount": 5,
"transactionsPerCard": 3
}curl -X POST https://api.sandbox.astrada.co/simulate/ingestion/vcf \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"networkReference": "1_123_45_6789",
"cardCount": 0,
"newCardCount": 5,
"transactionsPerCard": 3
}'{
"networkReference": "1_123_45_6789",
"cardCount": 0,
"newCardCount": 5,
"transactionsPerCard": 3
}The other three are the same call with a different path and reference format: POST /simulate/ingestion/smartdata ("networkReference": "G1234567"), POST /simulate/ingestion/amex-gl ("networkReference": "R12345"), and POST /simulate/ingestion/vbds ("networkReference": "1_12345_67890_54321"). Full body-param tables and response codes are in the Sandbox API Reference.
How the three fields behave on repeat calls:
cardCountreplays the head of the network's test-card pool: the same cards every call, deduplicated once enrolled, like a re-delivered production file.newCardCountdraws cards this subaccount has never seen, so each call enrolls that many new cards and fires theircardsubscription.createdwebhooks.transactionsPerCardgenerates that many transactions per included card, with fresh references and recent dates on every call, so repeats always producetransaction.created/transaction.updatedwebhooks, including for already-enrolled cards.
American Express is the only network that differsThe fields behave identically on the Visa file, Mastercard and pulled Visa endpoints: an omitted
cardCountdefaults to5, andnewCardCountis always available. American Express is the exception on two points. An omittedcardCountdraws3on an encrypted feed, or the whole enrollable tokenized pool on apanFormat: tokenizedfeed, rather than5. And a tokenized feed has no new-card region, so anynewCardCount > 0on it is rejected with400. See the Sandbox API Reference for the per-endpoint tables.
Feed activation, and the extra card on a new Visa file feedA feed moves from
submittedtoactiveonly once a delivery creates at least one new card link. The first delivery normally does this with the head cardscardCountdraws by default. The Visa file endpoint adds one more card: if the subaccount has already enrolled those head cards, a head-only replay would deduplicate into nothing and leave the feed stuck, so on a feed that has never completed a deliverynewCardCount: 0still draws one never-seen card (at most once per feed). This applies to the Visa file endpoint only. The Mastercard, pulled Visa and American Express endpoints activate with the head cards their defaultcardCountdraws (5, or3or the tokenized pool for American Express), so they have no such extra card.
3. See what was created
Processing usually completes within a minute. Observe the results through the normal read APIs and webhooks:
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
"https://api.sandbox.astrada.co/network-bulk-feeds/{networkBulkFeedId}"Response (200 OK): the feed, now state: active.
Then:
GET /cards?subaccountId={subaccountId}lists the enrolled cards, on the network's reserved test BIN.GET /card-subscriptions?subaccountId={subaccountId}shows one subscription per card withenrollmentType: "network-bulk"and thenetworkBulkFeedIdback-reference.GET /cards/{cardId}/cardholderreturns test cardholder data (firstName,lastName,postalCode,corporate.employeeId;emailonly from the Visa file endpoint).- With
transactionsPerCard > 0,GET /transactions?subaccountId={subaccountId}fills up as the settlements are processed.
Webhooks fired along the way (delivery order can vary): networkbulkfeed.statechanged (submitted to active), one cardsubscription.created per new card, and transactionmessage.created / transaction.created / transaction.updated per generated transaction. Payloads are in the Webhook Event Types reference.
The transactions above are the plain settlements generated with each delivery. Once you have enrolled cards, you can also run a specific transaction shape on one of them with Simulate a transaction scenario: a catalog of predefined flows (purchases, refunds, partial settlements, currency conversions, hotel and car-rental pre-authorizations, the American Express authorization lifecycles, and the multi-country ride-share scenarios), useful for testing how you match card spend to expenses.
4. Test card pools
Simulated cards come from fixed, reserved pools, one per network (Visa BIN 404507, Mastercard 510755, American Express 370000). You rarely need the raw lists, because cardCount and newCardCount draw from them for you; the full lists and how the head and new regions work are on Bulk Test Card Pools.
Next steps
- Simulate a transaction scenario: run a specific predefined transaction shape, from simple purchases and refunds to currency conversions and the multi-country ride-share flows, on a card you enrolled above.
- Sandbox API Reference: full body params and response codes for every simulate endpoint.
- Testing Bank Linking: bank linking in the same environment.
- Network Bulk Enrollment: how the production feeds work.
Updated 5 days ago
