ProtectedisCheck if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json
MIME (Multipurpose Internet Mail Extensions)
True if the given MIME is JSON, false otherwise.
ProtectedrequestSends the request. Network errors and timeouts (while waiting for the answer or reading its body), 408, 429 and 5xx are retried for idempotent methods (see ConfigurationParameters.maxRetries). A 401 is retried once with a new token. Any other status outside 200 to 299 throws a ResponseError subclass. The body is read here, whole.
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Creates a simulated American Express bulk-enrollment file, plus a companion settlement file when transactionsPerCard is above 0, and processes it as if American Express had delivered it. The call returns 202 Accepted at once; enrolled cards appear as card subscriptions when processing finishes, and their settlements follow shortly after. A bulk feed must already exist for the networkReference, created with POST /network-bulk-feeds. cardCount replays the fixed head of the sandbox account pool (encrypted feeds; for tokenized feeds see below): the same accounts every call, so once enrolled in a subaccount they deduplicate (no new cardsubscription.created), exactly like a file that is delivered twice. newCardCount draws accounts the subaccount has never seen from a reserved pool, so every call enrolls that many new cards. All included cards get transactionsPerCard transactions with fresh ids and recent dates, so repeat calls always produce transaction.* webhooks. For a feed registered tokenized (see panFormat on POST /network-bulk-feeds), cardCount draws American Express network tokens instead of raw card numbers, and newCardCount is not supported (there is no tokenized new-card pool).
Simulate an American Express bulk file (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Creates a simulated American Express bulk-enrollment file, plus a companion settlement file when transactionsPerCard is above 0, and processes it as if American Express had delivered it. The call returns 202 Accepted at once; enrolled cards appear as card subscriptions when processing finishes, and their settlements follow shortly after. A bulk feed must already exist for the networkReference, created with POST /network-bulk-feeds. cardCount replays the fixed head of the sandbox account pool (encrypted feeds; for tokenized feeds see below): the same accounts every call, so once enrolled in a subaccount they deduplicate (no new cardsubscription.created), exactly like a file that is delivered twice. newCardCount draws accounts the subaccount has never seen from a reserved pool, so every call enrolls that many new cards. All included cards get transactionsPerCard transactions with fresh ids and recent dates, so repeat calls always produce transaction.* webhooks. For a feed registered tokenized (see panFormat on POST /network-bulk-feeds), cardCount draws American Express network tokens instead of raw card numbers, and newCardCount is not supported (there is no tokenized new-card pool).
Simulate an American Express bulk file (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Creates a simulated Mastercard bulk-enrollment file and processes it as if Mastercard had delivered it. The call returns 202 Accepted at once; enrolled cards appear as card subscriptions when processing finishes. A bulk feed must already exist for the networkReference, created with POST /network-bulk-feeds. cardCount replays the fixed head of the sandbox test-card pool: the same cards every call, so once enrolled in a subaccount they deduplicate (no new cardsubscription.created), exactly like a file that is delivered twice. newCardCount draws cards the subaccount has never seen from a reserved pool, so every call enrolls that many new cards. All included cards get transactionsPerCard transactions with fresh references and recent dates, so repeat calls always produce transaction.* webhooks.
Simulate a Mastercard bulk file (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Creates a simulated Mastercard bulk-enrollment file and processes it as if Mastercard had delivered it. The call returns 202 Accepted at once; enrolled cards appear as card subscriptions when processing finishes. A bulk feed must already exist for the networkReference, created with POST /network-bulk-feeds. cardCount replays the fixed head of the sandbox test-card pool: the same cards every call, so once enrolled in a subaccount they deduplicate (no new cardsubscription.created), exactly like a file that is delivered twice. newCardCount draws cards the subaccount has never seen from a reserved pool, so every call enrolls that many new cards. All included cards get transactionsPerCard transactions with fresh references and recent dates, so repeat calls always produce transaction.* webhooks.
Simulate a Mastercard bulk file (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Simulates one delivery on a Visa bulk feed of type: VBDS, the kind Astrada pulls from Visa instead of receiving a file. The delivery enrolls cards and, when transactionsPerCard is above 0, adds settlements for them. The call returns 202 Accepted at once; enrolled cards appear as card subscriptions when processing finishes. A bulk feed must already exist for the networkReference, created with POST /network-bulk-feeds; otherwise the call returns 400. cardCount replays the fixed head of the sandbox card pool: the same cards every call, so once enrolled in a subaccount they deduplicate (no new cardsubscription.created), exactly like a delivery that arrives twice. newCardCount draws cards the subaccount has never seen from a reserved pool, so every call enrolls that many new cards. All included cards get transactionsPerCard transactions with fresh ids and recent dates, so repeat calls always produce transaction.* webhooks.
Simulate a pulled Visa bulk feed delivery (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Simulates one delivery on a Visa bulk feed of type: VBDS, the kind Astrada pulls from Visa instead of receiving a file. The delivery enrolls cards and, when transactionsPerCard is above 0, adds settlements for them. The call returns 202 Accepted at once; enrolled cards appear as card subscriptions when processing finishes. A bulk feed must already exist for the networkReference, created with POST /network-bulk-feeds; otherwise the call returns 400. cardCount replays the fixed head of the sandbox card pool: the same cards every call, so once enrolled in a subaccount they deduplicate (no new cardsubscription.created), exactly like a delivery that arrives twice. newCardCount draws cards the subaccount has never seen from a reserved pool, so every call enrolls that many new cards. All included cards get transactionsPerCard transactions with fresh ids and recent dates, so repeat calls always produce transaction.* webhooks.
Simulate a pulled Visa bulk feed delivery (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Creates a simulated Visa bulk-enrollment file (a feed of type: VCF) and processes it as if Visa had delivered it. The call returns 202 Accepted at once; enrolled cards appear as card subscriptions when processing finishes. A bulk feed must already exist for the networkReference, created with POST /network-bulk-feeds. cardCount replays the fixed head of the sandbox test-card pool: the same cards every call, so once enrolled in a subaccount they deduplicate (no new cardsubscription.created), exactly like a file that is delivered twice. newCardCount draws cards the subaccount has never seen from a reserved pool, so every call enrolls that many new cards. All included cards get transactionsPerCard transactions with fresh references and recent dates, so repeat calls always produce transaction.* webhooks.
Simulate a Visa bulk file (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Creates a simulated Visa bulk-enrollment file (a feed of type: VCF) and processes it as if Visa had delivered it. The call returns 202 Accepted at once; enrolled cards appear as card subscriptions when processing finishes. A bulk feed must already exist for the networkReference, created with POST /network-bulk-feeds. cardCount replays the fixed head of the sandbox test-card pool: the same cards every call, so once enrolled in a subaccount they deduplicate (no new cardsubscription.created), exactly like a file that is delivered twice. newCardCount draws cards the subaccount has never seen from a reserved pool, so every call enrolls that many new cards. All included cards get transactionsPerCard transactions with fresh references and recent dates, so repeat calls always produce transaction.* webhooks.
Simulate a Visa bulk file (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Starts a new simulated transaction on an enrolled card by publishing one transaction message, an authorization or a settlement, as if a card network had sent it. Follow it with POST /simulate/transactions/{transactionId} to add further messages to the transaction. Besides simulation:write, the access token needs cards:read: the card is read from the public API to resolve its subaccount and network.
Simulate a transaction (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Publishes one more transaction message (authorization, adjustment, reversal, settlement or refund) on an existing sandbox transaction. The transaction can have been created by POST /simulate/transactions or by the scenario endpoint; take its id from the transaction.created webhook or from GET /transactions?transactionMessageId=. Besides simulation:write, the access token needs transactions:read and transaction-messages:read: the transaction and its messages are read from the public API to carry over the network reference and the current hold and settled amounts. adjustment and reversal are checked against the hold Astrada has processed so far and rejected with 409 when there is nothing to adjust or reverse. The check is best effort: a step published immediately after another may see the earlier state.
Simulate a transaction message (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Publishes one more transaction message (authorization, adjustment, reversal, settlement or refund) on an existing sandbox transaction. The transaction can have been created by POST /simulate/transactions or by the scenario endpoint; take its id from the transaction.created webhook or from GET /transactions?transactionMessageId=. Besides simulation:write, the access token needs transactions:read and transaction-messages:read: the transaction and its messages are read from the public API to carry over the network reference and the current hold and settled amounts. adjustment and reversal are checked against the hold Astrada has processed so far and rejected with 409 when there is nothing to adjust or reverse. The check is best effort: a step published immediately after another may see the earlier state.
Simulate a transaction message (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Starts a new simulated transaction on an enrolled card by publishing one transaction message, an authorization or a settlement, as if a card network had sent it. Follow it with POST /simulate/transactions/{transactionId} to add further messages to the transaction. Besides simulation:write, the access token needs cards:read: the card is read from the public API to resolve its subaccount and network.
Simulate a transaction (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Runs a predefined transaction scenario, such as a purchase followed by a refund, on an enrolled card. The call publishes every transaction message of the scenario as if a card network had sent them and returns 202 Accepted with their ids. The transactions arrive asynchronously through the transaction.created and transaction.updated webhooks. The call does not look the card up first: well-formed ids return 202 even when they do not name an enrolled card of your account. If no transaction appears, check that cardId is enrolled in subaccountId.
Simulate a transaction scenario (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunctionWorks in the sandbox only (https://api.sandbox.astrada.co). Production has no such call. Runs a predefined transaction scenario, such as a purchase followed by a refund, on an enrolled card. The call publishes every transaction message of the scenario as if a card network had sent them and returns 202 Accepted with their ids. The transactions arrive asynchronously through the transaction.created and transaction.updated webhooks. The call does not look the card up first: well-formed ids return 202 even when they do not name an enrolled card of your account. If no transaction appears, check that cardId is enrolled in subaccountId.
Simulate a transaction scenario (sandbox only)
OptionalinitOverrides: RequestInit | InitOverrideFunction
The middleware of this instance; protected so hand-written subclasses can pass it on.