curl --request POST \
--url https://api.scrip.dev/v1/participants/{participant_id}/balances/void-pending \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
"description": "Order #123",
"program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"
}
'import requests
url = "https://api.scrip.dev/v1/participants/{participant_id}/balances/void-pending"
payload = {
"asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
"description": "Order #123",
"program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset_id: 'a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02',
description: 'Order #123',
program_id: '8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01'
})
};
fetch('https://api.scrip.dev/v1/participants/{participant_id}/balances/void-pending', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/participants/{participant_id}/balances/void-pending"
payload := strings.NewReader("{\n \"asset_id\": \"a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02\",\n \"description\": \"Order #123\",\n \"program_id\": \"8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"amount_processed": "100.00",
"asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
"balance": {
"available": "1400.00",
"deferred": "0.00",
"held": "200.00"
},
"journal_entry_id": "657a0312-1aaa-4ba7-842b-edfbb39edf14",
"message": "Processed 100.00",
"operation": "VOID_PENDING",
"program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
"reference_id": "auth_12345"
}Void pending rewards
Cancel pending rewards credited into HELD for a reference_id and return the value to its source.
curl --request POST \
--url https://api.scrip.dev/v1/participants/{participant_id}/balances/void-pending \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
"description": "Order #123",
"program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"
}
'import requests
url = "https://api.scrip.dev/v1/participants/{participant_id}/balances/void-pending"
payload = {
"asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
"description": "Order #123",
"program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset_id: 'a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02',
description: 'Order #123',
program_id: '8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01'
})
};
fetch('https://api.scrip.dev/v1/participants/{participant_id}/balances/void-pending', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/participants/{participant_id}/balances/void-pending"
payload := strings.NewReader("{\n \"asset_id\": \"a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02\",\n \"description\": \"Order #123\",\n \"program_id\": \"8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"amount_processed": "100.00",
"asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
"balance": {
"available": "1400.00",
"deferred": "0.00",
"held": "200.00"
},
"journal_entry_id": "657a0312-1aaa-4ba7-842b-edfbb39edf14",
"message": "Processed 100.00",
"operation": "VOID_PENDING",
"program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
"reference_id": "auth_12345"
}HELD for a reference_id. The value returns to the program wallet for PREFUNDED assets or system issuance for UNLIMITED assets. Use this when a merchant reverses an authorization before settlement.
Only processes lots created directly in HELD via CREDIT. Lots moved to HELD via a HOLD operation are excluded because returning those to the source would confiscate participant-owned funds. Use release for participant-held funds.
Requires a LOT-mode asset. Without amount, all pending rewards for the reference_id are voided. lot_ids, earned_from, and earned_to are not supported.
With amount, the newest lots are voided first. amount is the rewards to void, in the asset’s units, and must be positive. A blank amount is rejected with 400. For a partial reversal, use the reward difference, rather than the reversed purchase amount.
A lot that is only partly voided stays in HELD with its reference_id and dates. An amount above the pending balance cancels only what remains. amount_processed shows the value voided.
Void pending is allowed on CLOSED participants and archived assets.
Authorizations
Send your API key as Authorization: Bearer <key>.
Headers
A key you choose to make this request safe to retry: 1 to 255 printable ASCII characters. Send the same key with the same request to get the first response again, marked Idempotent-Replayed: true. Routes that return a secret once, and claim links, do not replay a response. Event ingest uses the key as the event's identity.
255Path Parameters
The participant's id, or ext: followed by the participant's external_id.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|ext:.{1,255})$Body
Void pending operation details
Holds, releases, forfeits or voids value, depending on the endpoint. Choose which value moves with an amount, lot ids, lot dates or a reference_id.
Asset to operate on
"a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02"
Reason for this operation
1 - 500"Order #123"
Program this operation belongs to
"8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"
Amount to process. Omit to process the full balance (SIMPLE) or all matching lots (LOT)
"100.00"
Which bucket to forfeit from. Required for forfeit; ignored for hold/release
AVAILABLE, HELD "AVAILABLE"
Only process lots earned on or after this time (RFC 3339). LOT mode only.
"2027-01-01T00:00:00Z"
Only process lots earned on or before this time (RFC 3339). LOT mode only. Must be >= earned_from when both are provided.
"2027-12-31T23:59:59Z"
Your key for this operation. You can send it in the Idempotency-Key header instead; when both are sent they must match. The same key with the same fields returns the first result again, and the same key with different fields returns 409 idempotency_conflict.
1 - 255"order-1001-completed"
Restrict to specific lots. LOT mode only
["4a6c8e02-b1d3-4f57-9c80-e2a4b6d8f012"]
Correlation ID linking holds to releases. LOT mode only. Hold stamps lots; release filters by reference.
"auth_12345"
Response
Void pending processed
The result of a hold, release, forfeit or void: the amount processed, the lots touched and the balance after.
Total amount processed
"100.00"
The asset the operation applied to.
"a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02"
Balance after the operation
Show child attributes
Show child attributes
Ledger journal entry created by this operation
"657a0312-1aaa-4ba7-842b-edfbb39edf14"
Individual lots affected. Only present for LOT mode assets
Show child attributes
Show child attributes
Confirmation message
"Processed 100.00"
The balance operation that was performed, matching the endpoint you called.
HOLD, RELEASE, FORFEIT, VOID_PENDING The program the operation belongs to.
"8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"
Correlation ID linking this hold/release (if provided)
"auth_12345"