Create balance refund
curl --request POST \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/creditbalancerefunds \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 500,
"method": "CHECK",
"description": "credit balance refund",
"currency_code": "USD"
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/creditbalancerefunds"
payload = {
"amount": 500,
"method": "CHECK",
"description": "credit balance refund",
"currency_code": "USD"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 500,
method: 'CHECK',
description: 'credit balance refund',
currency_code: 'USD'
})
};
fetch('https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/creditbalancerefunds', 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/credit/accounts/{account_token}/creditbalancerefunds",
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' => 500,
'method' => 'CHECK',
'description' => 'credit balance refund',
'currency_code' => 'USD'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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/credit/accounts/{account_token}/creditbalancerefunds"
payload := strings.NewReader("{\n \"amount\": 500,\n \"method\": \"CHECK\",\n \"description\": \"credit balance refund\",\n \"currency_code\": \"USD\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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/credit/accounts/{account_token}/creditbalancerefunds")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 500,\n \"method\": \"CHECK\",\n \"description\": \"credit balance refund\",\n \"currency_code\": \"USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/creditbalancerefunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 500,\n \"method\": \"CHECK\",\n \"description\": \"credit balance refund\",\n \"currency_code\": \"USD\"\n}"
response = http.request(request)
puts response.read_body{
"token": "credit_balance_refund_token1234",
"amount": 0,
"method": "CHECK",
"status": "COMPLETED",
"description": "credit balance refund",
"created_time": "2025-07-14T20:17:28Z",
"updated_time": "2025-07-14T20:17:28Z",
"account_token": "my_account_token_12"
}{
"code": 123,
"message": "<string>"
}Balance Refunds
Create balance refund
Create a new balance refund, which can be issued to the account holder if their credit account balance is negative.
POST
/
credit
/
accounts
/
{account_token}
/
creditbalancerefunds
Create balance refund
curl --request POST \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/creditbalancerefunds \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 500,
"method": "CHECK",
"description": "credit balance refund",
"currency_code": "USD"
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/creditbalancerefunds"
payload = {
"amount": 500,
"method": "CHECK",
"description": "credit balance refund",
"currency_code": "USD"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 500,
method: 'CHECK',
description: 'credit balance refund',
currency_code: 'USD'
})
};
fetch('https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/creditbalancerefunds', 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/credit/accounts/{account_token}/creditbalancerefunds",
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' => 500,
'method' => 'CHECK',
'description' => 'credit balance refund',
'currency_code' => 'USD'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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/credit/accounts/{account_token}/creditbalancerefunds"
payload := strings.NewReader("{\n \"amount\": 500,\n \"method\": \"CHECK\",\n \"description\": \"credit balance refund\",\n \"currency_code\": \"USD\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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/credit/accounts/{account_token}/creditbalancerefunds")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 500,\n \"method\": \"CHECK\",\n \"description\": \"credit balance refund\",\n \"currency_code\": \"USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/creditbalancerefunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 500,\n \"method\": \"CHECK\",\n \"description\": \"credit balance refund\",\n \"currency_code\": \"USD\"\n}"
response = http.request(request)
puts response.read_body{
"token": "credit_balance_refund_token1234",
"amount": 0,
"method": "CHECK",
"status": "COMPLETED",
"description": "credit balance refund",
"created_time": "2025-07-14T20:17:28Z",
"updated_time": "2025-07-14T20:17:28Z",
"account_token": "my_account_token_12"
}{
"code": 123,
"message": "<string>"
}POST////
Create a new balance refund, which can be issued to the account holder if their credit account balance is negative.
URL path parameters
| Fields | Description |
|---|---|
| account_token string Required | Unique identifier of the credit account for which you want to create a balance refund. Send a GET request to /credit/accounts to retrieve existing credit account tokens.Allowable Values: Existing account token |
Request body
| Fields | Description |
|---|---|
| token string Optional | Unique identifier of the credit balance refund. Allowable Values: 36 char max |
| method string Required | Payment instrument used to issue the refund. Allowable Values: ACH, CHECK |
| amount decimal Required | Amount of the credit balance refund. The maximum refund amount is the amount that brings the account balance to $0. For example, $4000 is the maximum refund amount for a -$4000 account balance. Allowable Values: 0.01 min |
| description string Required | Description for the credit balance refund. Allowable Values: 255 char max |
| currency_code string Required | Valid three-digit ISO 4217 currency code. Allowable Values: USD |
Sample request body
JSON
{
"method": "CHECK",
"amount": 500,
"description": "credit balance refund",
"currency_code": "USD"
}
Response body
| Fields | Description |
|---|---|
| token string Returned | Unique identifier of the credit balance refund. If in the detail_object, unique identifier of the detail object.Allowable Values: 36 char max |
| account_token string Returned | Unique identifier of the credit account that needs the credit balance refund. Allowable Values: 36 char max Existing account token |
| status string Returned | Current status of the payment or refund. Allowable Values: INITIATED, PENDING, PROCESSING, SUBMITTED, CANCELLED, COMPLETED, RETURNED, REFUNDED, SYS_ERROR, ACH_ERROR |
| method string Returned | Payment instrument used to issue the refund. Allowable Values: ACH, CHECK |
| amount decimal Returned | Amount of the credit balance refund. The maximum refund amount is the amount that brings the account balance to $0. For example, $4000 is the maximum refund amount for a -$4000 account balance. Allowable Values: 0.01 min |
| description string Returned | Description for the credit credit balance refund. Allowable Values: 255 char max |
| created_time datetime Returned | Date and time when the credit balance refund was created. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| updated_time datetime Returned | Date and time when the credit balance refund was last updated. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
{
"token": "credit_balance_refund_token1234",
"account_token": "my_account_token_12",
"status": "COMPLETED",
"method": "CHECK",
"amount": 0,
"description": "credit balance refund",
"created_time": "2025-07-14T20:17:28Z",
"updated_time": "2025-07-14T20:17:28Z"
}
Authorizations
Path Parameters
Body
application/json
Contains details on a credit balance refund.
Valid three-digit link:https://www.iso.org/iso-4217-currency-codes.html[ISO 4217 currency code, window="_blank"].
Available options:
USD Response
Expected response.
Contains details on a credit balance refund.
Was this page helpful?