curl --request POST \
--url https://sandbox-api.marqeta.com/v3/simulations/directdeposits/credit \
--header 'Content-Type: application/json' \
--data '
{
"amount": 10,
"account_number": "**ACCOUNT_NUMBER**",
"settlement_date": "2025-02-03T13:22:42Z"
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/simulations/directdeposits/credit"
payload = {
"amount": 10,
"account_number": "**ACCOUNT_NUMBER**",
"settlement_date": "2025-02-03T13:22:42Z"
}
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({
amount: 10,
account_number: '**ACCOUNT_NUMBER**',
settlement_date: '2025-02-03T13:22:42Z'
})
};
fetch('https://sandbox-api.marqeta.com/v3/simulations/directdeposits/credit', 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/directdeposits/credit",
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([
'amount' => 10,
'account_number' => '**ACCOUNT_NUMBER**',
'settlement_date' => '2025-02-03T13:22:42Z'
]),
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/directdeposits/credit"
payload := strings.NewReader("{\n \"amount\": 10,\n \"account_number\": \"**ACCOUNT_NUMBER**\",\n \"settlement_date\": \"2025-02-03T13:22:42Z\"\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/directdeposits/credit")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10,\n \"account_number\": \"**ACCOUNT_NUMBER**\",\n \"settlement_date\": \"2025-02-03T13:22:42Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/simulations/directdeposits/credit")
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 \"amount\": 10,\n \"account_number\": \"**ACCOUNT_NUMBER**\",\n \"settlement_date\": \"2025-02-03T13:22:42Z\"\n}"
response = http.request(request)
puts response.read_body{
"token": "**DIRECT_DEPOSIT_TOKEN**",
"user_token": "**USER_TOKEN**",
"type": "CREDIT",
"state": "PENDING",
"state_reason": "testing",
"amount": 10,
"created_time": "2025-03-23T19:34:05Z",
"direct_deposit_account_token": "**DIRECT_DEPOSIT_ACCT_TOKEN**",
"last_modified_time": "2025-03-23T19:34:05Z",
"settlement_date": "2025-02-03T13:22:42Z"
}{
"error_code": "<string>",
"error_message": "<string>"
}Simulate credit
Use this endpoint to simulate crediting funds to a deposit account.
curl --request POST \
--url https://sandbox-api.marqeta.com/v3/simulations/directdeposits/credit \
--header 'Content-Type: application/json' \
--data '
{
"amount": 10,
"account_number": "**ACCOUNT_NUMBER**",
"settlement_date": "2025-02-03T13:22:42Z"
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/simulations/directdeposits/credit"
payload = {
"amount": 10,
"account_number": "**ACCOUNT_NUMBER**",
"settlement_date": "2025-02-03T13:22:42Z"
}
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({
amount: 10,
account_number: '**ACCOUNT_NUMBER**',
settlement_date: '2025-02-03T13:22:42Z'
})
};
fetch('https://sandbox-api.marqeta.com/v3/simulations/directdeposits/credit', 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/directdeposits/credit",
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([
'amount' => 10,
'account_number' => '**ACCOUNT_NUMBER**',
'settlement_date' => '2025-02-03T13:22:42Z'
]),
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/directdeposits/credit"
payload := strings.NewReader("{\n \"amount\": 10,\n \"account_number\": \"**ACCOUNT_NUMBER**\",\n \"settlement_date\": \"2025-02-03T13:22:42Z\"\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/directdeposits/credit")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10,\n \"account_number\": \"**ACCOUNT_NUMBER**\",\n \"settlement_date\": \"2025-02-03T13:22:42Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/simulations/directdeposits/credit")
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 \"amount\": 10,\n \"account_number\": \"**ACCOUNT_NUMBER**\",\n \"settlement_date\": \"2025-02-03T13:22:42Z\"\n}"
response = http.request(request)
puts response.read_body{
"token": "**DIRECT_DEPOSIT_TOKEN**",
"user_token": "**USER_TOKEN**",
"type": "CREDIT",
"state": "PENDING",
"state_reason": "testing",
"amount": 10,
"created_time": "2025-03-23T19:34:05Z",
"direct_deposit_account_token": "**DIRECT_DEPOSIT_ACCT_TOKEN**",
"last_modified_time": "2025-03-23T19:34:05Z",
"settlement_date": "2025-02-03T13:22:42Z"
}{
"error_code": "<string>",
"error_message": "<string>"
}account_number field of the response when you create a new deposit account. Alternatively, you can retrieve it by sending a GET request to the /depositaccounts/user/{user_token} endpoint. For more information, see Direct Deposit.
You can view the full request body structure on the Simulations 2.0 — Direct Deposits page.
Request body
See Request Body.Sample request body
{
"amount": 10,
"account_number": "**ACCOUNT_NUMBER**",
"settlement_date": "2025-02-03T13:22:42Z",
"earlyPayEligible": false
}
Response body
See Response Body.Sample response body
{
"token": "**DIRECT_DEPOSIT_TOKEN**",
"user_token": "**USER_TOKEN**",
"type": "CREDIT",
"state": "PENDING",
"state_reason": "testing",
"amount": 10,
"created_time": "2025-03-23T19:34:05Z",
"direct_deposit_account_token": "**DIRECT_DEPOSIT_ACCT_TOKEN**",
"last_modified_time": "2025-03-23T19:34:05Z",
"settlement_date": "2025-02-03T13:22:42Z"
}
Body
The account number of the user to debit or credit.
Amount of the transaction.
Date when the credit or debit is applied.
Company-specific data provided by the direct deposit originator.
20Company-specific data provided by the direct deposit originator.
10Alphanumeric code that identifies the direct deposit originator.
10Name of the direct deposit originator.
16Indicates whether the transaction is eligible for early pay.
Accounting number by which the recipient is known to the direct deposit originator.
22Identity of the direct deposit recipient.
35Three-letter code identifying the type of entry.
3Unique identifier of the direct deposit transaction.
If you do not include a token, the system generates one automatically. This token is used in other API calls. Marqeta recommends that you enter a string that you can remember for the token, rather than having the system generate a token for you. This value cannot be updated.
36Response
Created
Whether funds are being debited from or credited to the account.
CREDIT, DEBIT Current status of the direct deposit record.
PENDING, APPLIED, REVERSED, REJECTED Explains the current state of the direct deposit record.
A standard code describing the reason for the current state.
Unique identifier of the direct deposit record.
Unique identifier of the user associated with the direct deposit record.
Amount being debited or credited.
Unique identifier of the business associated with the direct deposit record.
Company-specific data provided by the direct deposit originator.
Description of the purpose of the direct deposit.
Alphanumeric code that identifies the direct deposit originator.
Name of the direct deposit originator.
Date and time when the deposit account was created, in UTC.
Unique identifier of the affected deposit account.
Accounting number by which the recipient is known to the direct deposit originator.
Name of the direct deposit recipient.
Date and time when the direct deposit account was last modified, in UTC.
Date and time when the credit or debit is applied, in UTC.
Three-letter code identifying the type of entry.
Was this page helpful?