curl --request POST \
--url https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry \
--header 'Content-Type: application/json' \
--data '
{
"card_token": "**CARD_TOKEN**"
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry"
payload = { "card_token": "**CARD_TOKEN**" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({card_token: '**CARD_TOKEN**'})
};
fetch('https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'card_token' => '**CARD_TOKEN**'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry"
payload := strings.NewReader("{\n \"card_token\": \"**CARD_TOKEN**\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry")
.header("Content-Type", "application/json")
.body("{\n \"card_token\": \"**CARD_TOKEN**\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"card_token\": \"**CARD_TOKEN**\"\n}"
response = http.request(request)
puts response.read_body{
"transaction": {
"type": "product.inquiry",
"state": "CLEARED",
"token": "**TRANSACTION_TOKEN**",
"user_token": "**USER_TOKEN**",
"card_token": "**CARD_TOKEN**",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"created_time": "2025-08-05T22:11:10Z",
"user_transaction_time": "2025-08-05T22:11:10Z",
"settlement_date": "2025-08-05T00:00:00Z",
"amount": "0.00",
"request_amount": "0.00",
"gpa": {
"ledger_balance": "17.01",
"available_balance": "0.00"
},
"currency_code": "USD",
"currency_conversion": {
"original_amount": "0.00",
"conversion_rate": 1,
"original_currency_code": "840"
},
"network": "VISA",
"subnetwork": "VISANET",
"acquirer_fee_amount": "0",
"flex": {
"eligible": true,
"selected_product": "DEBIT"
},
"card_acceptor": {
"mid": "000000000011111",
"mcc": "6411",
"name": "Marqeta Storefront",
"city": "St. Petersburg",
"state": "FL"
},
"gpa_order": {
"amount": "0.00",
"created_time": "2025-08-05T22:11:11Z",
"currency_code": "USD",
"funding": {
"amount": "0.00",
"gateway_log": {
"duration": 70,
"message": "Approved or completed successfully",
"order_number": "**ORDER_NUMBER**",
"timed_out": false,
"transaction_id": "**TRANSACTION_ID**"
},
"source": {
"active": true,
"created_time": "2025-08-05T17:15:25Z",
"is_default_account": false,
"last_modified_time": "2025-08-05T17:15:25Z",
"token": "**SOURCE_TOKEN**",
"type": "programgateway"
}
},
"funding_source_token": "**SOURCE_TOKEN**",
"jit_funding": {
"amount": "0.00",
"balances": {},
"method": "pgfs.product.inquiry",
"token": "**JIT_TOKEN**",
"user_token": "**USER_TOKEN**"
},
"last_modified_time": "2025-08-05T22:11:11Z",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"state": "COMPLETION",
"token": "**GPA_ORDER_TOKEN**",
"transaction_token": "**TRANSACTION_TOKEN**",
"user_token": "**USER_TOKEN**"
},
"original_credit": {}
}
}{
"error_code": "<string>",
"error_message": "<string>"
}Simulate Product Inquiry
Use this endpoint to simulate a product.inquiry type transaction.
curl --request POST \
--url https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry \
--header 'Content-Type: application/json' \
--data '
{
"card_token": "**CARD_TOKEN**"
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry"
payload = { "card_token": "**CARD_TOKEN**" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({card_token: '**CARD_TOKEN**'})
};
fetch('https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'card_token' => '**CARD_TOKEN**'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry"
payload := strings.NewReader("{\n \"card_token\": \"**CARD_TOKEN**\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry")
.header("Content-Type", "application/json")
.body("{\n \"card_token\": \"**CARD_TOKEN**\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/simulations/cardtransactions/product.inquiry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"card_token\": \"**CARD_TOKEN**\"\n}"
response = http.request(request)
puts response.read_body{
"transaction": {
"type": "product.inquiry",
"state": "CLEARED",
"token": "**TRANSACTION_TOKEN**",
"user_token": "**USER_TOKEN**",
"card_token": "**CARD_TOKEN**",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"created_time": "2025-08-05T22:11:10Z",
"user_transaction_time": "2025-08-05T22:11:10Z",
"settlement_date": "2025-08-05T00:00:00Z",
"amount": "0.00",
"request_amount": "0.00",
"gpa": {
"ledger_balance": "17.01",
"available_balance": "0.00"
},
"currency_code": "USD",
"currency_conversion": {
"original_amount": "0.00",
"conversion_rate": 1,
"original_currency_code": "840"
},
"network": "VISA",
"subnetwork": "VISANET",
"acquirer_fee_amount": "0",
"flex": {
"eligible": true,
"selected_product": "DEBIT"
},
"card_acceptor": {
"mid": "000000000011111",
"mcc": "6411",
"name": "Marqeta Storefront",
"city": "St. Petersburg",
"state": "FL"
},
"gpa_order": {
"amount": "0.00",
"created_time": "2025-08-05T22:11:11Z",
"currency_code": "USD",
"funding": {
"amount": "0.00",
"gateway_log": {
"duration": 70,
"message": "Approved or completed successfully",
"order_number": "**ORDER_NUMBER**",
"timed_out": false,
"transaction_id": "**TRANSACTION_ID**"
},
"source": {
"active": true,
"created_time": "2025-08-05T17:15:25Z",
"is_default_account": false,
"last_modified_time": "2025-08-05T17:15:25Z",
"token": "**SOURCE_TOKEN**",
"type": "programgateway"
}
},
"funding_source_token": "**SOURCE_TOKEN**",
"jit_funding": {
"amount": "0.00",
"balances": {},
"method": "pgfs.product.inquiry",
"token": "**JIT_TOKEN**",
"user_token": "**USER_TOKEN**"
},
"last_modified_time": "2025-08-05T22:11:11Z",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"state": "COMPLETION",
"token": "**GPA_ORDER_TOKEN**",
"transaction_token": "**TRANSACTION_TOKEN**",
"user_token": "**USER_TOKEN**"
},
"original_credit": {}
}
}{
"error_code": "<string>",
"error_message": "<string>"
}product.inquiry type transaction.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
{
"card_token": "**CARD_TOKEN**",
"amount": 0,
"card_acceptor": {
"mid": "11111"
},
"flex": {
"eligible": true,
"eligible_products": [
"DEBIT_TO_LOAN"
]
},
"network": "VISA"
}
Response body
See Card Transaction Simulation Response.Sample response body
{
"transaction": {
"type": "product.inquiry",
"state": "CLEARED",
"token": "**TRANSACTION_TOKEN**",
"user_token": "**USER_TOKEN**",
"card_token": "**CARD_TOKEN**",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"created_time": "2025-08-05T22:11:10Z",
"user_transaction_time": "2025-08-05T22:11:10Z",
"settlement_date": "2025-08-05T00:00:00Z",
"amount": "0.00",
"request_amount": "0.00",
"gpa": {
"ledger_balance": "17.01",
"available_balance": "0.00"
},
"currency_code": "USD",
"currency_conversion": {
"original_amount": "0.00",
"conversion_rate": 1,
"original_currency_code": "840"
},
"network": "VISA",
"subnetwork": "VISANET",
"acquirer_fee_amount": "0",
"flex": {
"eligible": true,
"selected_product": "DEBIT"
},
"card_acceptor": {
"mid": "000000000011111",
"mcc": "6411",
"name": "Marqeta Storefront",
"city": "St. Petersburg",
"state": "FL"
},
"gpa_order": {
"amount": "0.00",
"created_time": "2025-08-05T22:11:11Z",
"currency_code": "USD",
"funding": {
"amount": "0.00",
"gateway_log": {
"duration": 70,
"message": "Approved or completed successfully",
"order_number": "**ORDER_NUMBER**",
"timed_out": false,
"transaction_id": "**TRANSACTION_ID**"
},
"source": {
"active": true,
"created_time": "2025-08-05T17:15:25Z",
"is_default_account": false,
"last_modified_time": "2025-08-05T17:15:25Z",
"token": "**SOURCE_TOKEN**",
"type": "programgateway"
}
},
"funding_source_token": "**SOURCE_TOKEN**",
"jit_funding": {
"amount": "0.00",
"balances": {},
"method": "pgfs.product.inquiry",
"token": "**JIT_TOKEN**",
"user_token": "**USER_TOKEN**"
},
"last_modified_time": "2025-08-05T22:11:11Z",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"state": "COMPLETION",
"token": "**GPA_ORDER_TOKEN**",
"transaction_token": "**TRANSACTION_TOKEN**",
"user_token": "**USER_TOKEN**"
},
"original_credit": {}
}
}
Body
Unique identifier of the card. Useful when a single account holder has multiple cards.
36Amount of the transaction.
x >= 0Anticipated amount of the transaction, as provided by the card network.
The cashback amount requested.
Indicates if the transaction is a pre-authorization.
Set to true to mark the amount as an authorization only.
Contains information about the merchant.
Show child attributes
Show child attributes
Set to true to simulate a forced clearing transaction.
NOTE: If you set this field to true, you must also set the original_transaction_token field to an existing transaction token (the transaction does not need to be related).
List of fees associated with the transaction.
This array is returned if it exists in the resource.
Show child attributes
Show child attributes
Contains attributes that govern card usage.
Show child attributes
Show child attributes
Contains information about the point of sale, including details on how the card was presented. May be returned if the request uses Transaction Model v2 of the Marqeta Core API.
Not returned for Transaction Model v1 requests.
Show child attributes
Show child attributes
Unique identifier of the card. Useful when a single account holder has multiple cards.
36Indicates which card network was used to complete the transaction.
VISA, MASTERCARD, DISCOVER, PULSE Indicates which subnetwork was used to complete the transaction.
VISANET, VISANETDEBIT, VISAINTERLINK, VISAPLUS, MAESTRO, CIRRUS, MASTERCARDDEBIT Contains information from the card network about currency conversion, including the original currency of the transaction, the amount of the transaction in the origination currency, and the conversion rate.
Returned if the transaction involves currency conversion.
Show child attributes
Show child attributes
Currency type of the transaction.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYR, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, ISK, JEP, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SPL, SRD, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TVD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEF, VND, VUV, WST, XAF, XCD, XDR, XOF, XPF, YER, ZAR, ZMW, ZWD Information used when funding an account.
Show child attributes
Show child attributes
Contains information about an original credit transaction (OCT), which enables the cardholder to receive funds on the specified card from an external source via the card network.
Show child attributes
Show child attributes
Requests model to invoke Flexible Credential transactions.
Show child attributes
Show child attributes
Response
Created
Contains information about the simulated transaction.
Contains information about the transaction.
Show child attributes
Show child attributes
Was this page helpful?