Release payment hold
curl --request POST \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/payments/{payment_token}/releasehold \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/payments/{payment_token}/releasehold"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/payments/{payment_token}/releasehold', 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}/payments/{payment_token}/releasehold",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/payments/{payment_token}/releasehold"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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}/payments/{payment_token}/releasehold")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/payments/{payment_token}/releasehold")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"token": "my_payment_25",
"amount": 25,
"method": "CHECK",
"status": "COMPLETED",
"on_hold": false,
"metadata": "check_number123",
"hold_days": 5,
"description": "minimum payment",
"transitions": [
{
"token": "my_transition_token1234",
"status": "COMPLETED",
"created_time": "2024-09-09T22:42:35.068Z",
"account_token": "account-12",
"payment_token": "my_payment_25"
}
],
"created_time": "2024-09-09T22:42:35.065Z",
"updated_time": "2024-09-09T22:48:09.722Z",
"account_token": "my_account_token_12",
"currency_code": "USD",
"hold_end_time": "2024-09-09T22:48:09.721Z",
"is_manually_released": true
}{
"code": 123,
"message": "<string>"
}Payments
Release payment hold
Manually release a payment hold on a credit account.
POST
/
credit
/
accounts
/
{account_token}
/
payments
/
{payment_token}
/
releasehold
Release payment hold
curl --request POST \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/payments/{payment_token}/releasehold \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/payments/{payment_token}/releasehold"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/payments/{payment_token}/releasehold', 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}/payments/{payment_token}/releasehold",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/payments/{payment_token}/releasehold"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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}/payments/{payment_token}/releasehold")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/payments/{payment_token}/releasehold")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"token": "my_payment_25",
"amount": 25,
"method": "CHECK",
"status": "COMPLETED",
"on_hold": false,
"metadata": "check_number123",
"hold_days": 5,
"description": "minimum payment",
"transitions": [
{
"token": "my_transition_token1234",
"status": "COMPLETED",
"created_time": "2024-09-09T22:42:35.068Z",
"account_token": "account-12",
"payment_token": "my_payment_25"
}
],
"created_time": "2024-09-09T22:42:35.065Z",
"updated_time": "2024-09-09T22:48:09.722Z",
"account_token": "my_account_token_12",
"currency_code": "USD",
"hold_end_time": "2024-09-09T22:48:09.721Z",
"is_manually_released": true
}{
"code": 123,
"message": "<string>"
}POST//////
Manually release a payment hold on a credit account.
URL path parameters
| Fields | Description |
|---|---|
| account_token string Required | Unique identifier of the credit account on which a payment hold is being released. Send a GET request to /credit/accounts to retrieve existing credit account tokens.Allowable Values: Existing account token |
| payment_token string Required | Unique identifier of the payment currently on hold. Send a GET request to /credit/accounts/{account_token}/payments to retrieve existing payment tokens.Allowable Values: Existing payment token |
Response body
| Fields | Description |
|---|---|
| token string Returned | Unique identifier of the payment. 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 on which the payment is made. Allowable Values: 36 char max Existing account token |
| method string Returned | Method of payment. Allowable Values: ACH, CHECK, DEBIT, CASH |
| payment_source_token string Conditionally returned | Unique identifier of the payment source. Required for ACH payments. Allowable Values: Existing payment source token |
| payment_schedule_token string Conditionally returned | Unique identifier of the payment schedule. Allowable Values: 36 char max |
| amount decimal Returned | Total amount of the payment. Allowable Values: 0 min |
| currency_code string Returned | Valid three-digit ISO 4217 currency code. Allowable Values: USD |
| status string Returned | Current status of the payment or refund. Allowable Values: INITIATED, PENDING, PROCESSING, SUBMITTED, CANCELLED, COMPLETED, RETURNED, REFUNDED, SYS_ERROR, ACH_ERROR |
| description string Returned | Description of the payment. Allowable Values: 255 char max |
| metadata string Conditionally returned | Customer-defined additional information about the payment (for example, a check number). Allowable Values: 255 char max |
| hold_days integer Returned | After a payment completes, the number of days to hold the available credit on the account before increasing it. Allowable Values: Any integer |
| hold_end_time datetime Conditionally returned | Date and time when the available credit hold is released. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| is_manually_released boolean Conditionally returned | Whether the available credit hold was manually released for this payment. Allowable Values: true, falseDefault value: false |
| on_hold boolean Conditionally returned | Whether the available credit is on hold for this payment. Allowable Values: true, falseDefault value: false |
| returned_details object Conditionally returned | Contains information on a returned payment. Allowable Values: Existing returned_details object |
| returned_details.return_code string Returned | Return code for the returned payment. For more, see NACHA ACH return codes. Allowable Values: Valid return code |
| returned_details.return_reason string Returned | Reason the payment was returned. For more, see NACHA ACH return codes. Allowable Values: Valid return reason |
| refund_details object Conditionally returned | Contains details for a refund. Allowable Values: Existing refund_details object |
| refund_details.method string Returned | Payment instrument used to issue the refund. Allowable Values: ACH, CHECK |
| refund_details.description string Returned | Description of the refund. Allowable Values: 255 char max |
| refund_details.status string Returned | Current status of the refund. Allowable Values: INITIATED, PENDING, PROCESSING, SUBMITTED, CANCELLED, COMPLETED, RETURNED |
| waive_returned_payment_fee boolean Conditionally returned | A value of true indicates that a returned payment fee should not be applied. The default value of this field is false.This field is only considered when transitioning the status of the fee to REFUNDED.Allowable Values: true, false |
| created_time datetime Returned | Date and time when the payment was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| updated_time datetime Returned | Date and time when the payment was last updated on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| transitions array of objects Returned | Contains one or more transitions objects, which contain information about a payment status transition.Allowable Values: One or more transitions objects |
| transitions[].token string Returned | Unique identifier of the payment status transition. Allowable Values: 36 char max |
| transitions[].account_token string Returned | Unique identifier of the credit account on which you want to transition a payment status. Allowable Values: Existing account token |
| transitions[].payment_token string Returned | Unique identifier of the payment whose status you want to transition. Allowable Values: Existing payment token |
| transitions[].status string Returned | Current status of the payment or refund. Allowable Values: INITIATED, PENDING, PROCESSING, SUBMITTED, CANCELLED, COMPLETED, RETURNED, REFUNDED, SYS_ERROR, ACH_ERROR |
| transitions[].created_time datetime Conditionally returned | Date and time when the payment transition was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| allocations array of objects Conditionally returned | List of objects that contain information about how a payment is allocated. Allowable Values: List of payment allocations |
| allocations[].bucket undefined Returned | Category to which a portion of the payment is allocated. Allowable Values: PRINCIPAL, INTEREST, FEES36 char max |
| allocations[].amount decimal Returned | Total amount of the payment allocation. Allowable Values: 0 min |
| program_migration_time datetime Conditionally returned | Date and time when the statement summary was migrated to Marqeta’s credit platform, in UTC. The value of this field is null if it has not been migrated.Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
{
"token": "my_payment_25",
"account_token": "my_account_token_12",
"method": "CHECK",
"amount": 25,
"currency_code": "USD",
"status": "COMPLETED",
"description": "minimum payment",
"metadata": "check_number123",
"hold_days": 5,
"hold_end_time": "2024-09-09T22:48:09.721Z",
"is_manually_released": true,
"on_hold": false,
"created_time": "2024-09-09T22:42:35.065Z",
"updated_time": "2024-09-09T22:48:09.722Z",
"transitions": [
{
"token": "my_transition_token1234",
"account_token": "account-12",
"payment_token": "my_payment_25",
"status": "COMPLETED",
"created_time": "2024-09-09T22:42:35.068Z"
}
]
}
Authorizations
Path Parameters
Response
Expected response.
Response containing payment details with transition history.
Valid three-digit link:https://www.iso.org/iso-4217-currency-codes.html[ISO 4217 currency code, window="_blank"].
Available options:
USD Was this page helpful?