curl --request GET \
--url https://api.scrip.dev/v1/redemptions/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/redemptions/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/redemptions/{id}', 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://api.scrip.dev/v1/redemptions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.scrip.dev/v1/redemptions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrip.dev/v1/redemptions/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/redemptions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"amount": "1000.00",
"asset_id": "550e8400-e29b-41d4-a716-446655440003",
"capture_journal_entry_id": "550e8400-e29b-41d4-a716-446655440007",
"captured_at": "2024-01-15T10:45:00Z",
"created_at": "2024-01-15T10:30:00Z",
"description": "Redeemed: Gift Card",
"expires_at": "2024-01-15T11:30:00Z",
"failure_reason": "fulfillment_failed",
"fulfillment": {
"claim_url": "https://claim.example.com/abc123",
"created_at": "2024-01-15T10:30:00Z",
"face_currency": "USD",
"face_value_minor": 2500,
"failure_reason": "provider_permanent_error",
"provider": "TREMENDOUS",
"provider_order_id": "ord_abc123",
"resolved_at": "2024-01-15T10:45:00Z",
"status": "PROCESSING",
"updated_at": "2024-01-15T10:30:00Z"
},
"id": "550e8400-e29b-41d4-a716-446655440000",
"journal_entry_id": "550e8400-e29b-41d4-a716-446655440005",
"participant_id": "550e8400-e29b-41d4-a716-446655440002",
"program_id": "550e8400-e29b-41d4-a716-446655440001",
"quantity": 2,
"release_journal_entry_id": "550e8400-e29b-41d4-a716-446655440008",
"released_amount": "1000.00",
"reservation_id": "550e8400-e29b-41d4-a716-446655440006",
"resolved_at": "2024-01-15T10:45:00Z",
"reversed_amount": "0.00",
"reversed_quantity": 0,
"reward_id": "550e8400-e29b-41d4-a716-446655440004",
"status": "COMPLETED",
"unit_cost": "500.00",
"updated_at": "2024-01-15T10:30:00Z"
}{
"code": "bad_request",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Missing or invalid credentials"
}{
"code": "not_found",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Get redemption
Retrieve a redemption by ID.
curl --request GET \
--url https://api.scrip.dev/v1/redemptions/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/redemptions/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/redemptions/{id}', 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://api.scrip.dev/v1/redemptions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.scrip.dev/v1/redemptions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrip.dev/v1/redemptions/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/redemptions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"amount": "1000.00",
"asset_id": "550e8400-e29b-41d4-a716-446655440003",
"capture_journal_entry_id": "550e8400-e29b-41d4-a716-446655440007",
"captured_at": "2024-01-15T10:45:00Z",
"created_at": "2024-01-15T10:30:00Z",
"description": "Redeemed: Gift Card",
"expires_at": "2024-01-15T11:30:00Z",
"failure_reason": "fulfillment_failed",
"fulfillment": {
"claim_url": "https://claim.example.com/abc123",
"created_at": "2024-01-15T10:30:00Z",
"face_currency": "USD",
"face_value_minor": 2500,
"failure_reason": "provider_permanent_error",
"provider": "TREMENDOUS",
"provider_order_id": "ord_abc123",
"resolved_at": "2024-01-15T10:45:00Z",
"status": "PROCESSING",
"updated_at": "2024-01-15T10:30:00Z"
},
"id": "550e8400-e29b-41d4-a716-446655440000",
"journal_entry_id": "550e8400-e29b-41d4-a716-446655440005",
"participant_id": "550e8400-e29b-41d4-a716-446655440002",
"program_id": "550e8400-e29b-41d4-a716-446655440001",
"quantity": 2,
"release_journal_entry_id": "550e8400-e29b-41d4-a716-446655440008",
"released_amount": "1000.00",
"reservation_id": "550e8400-e29b-41d4-a716-446655440006",
"resolved_at": "2024-01-15T10:45:00Z",
"reversed_amount": "0.00",
"reversed_quantity": 0,
"reward_id": "550e8400-e29b-41d4-a716-446655440004",
"status": "COMPLETED",
"unit_cost": "500.00",
"updated_at": "2024-01-15T10:30:00Z"
}{
"code": "bad_request",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Missing or invalid credentials"
}{
"code": "not_found",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}journal_entry_id is the HOLD entry for a pending redemption, or the REDEMPTION entry for an instant one. PENDING responses include reservation_id and expires_at. A successful completion adds capture_journal_entry_id, which is the REDEMPTION entry, plus captured_at and resolved_at. Failed and cancelled redemptions include resolved_at and can include failure_reason. A timeout sets failure_reason to expired. When value was released, they also carry release_journal_entry_id, the RELEASE entry, and released_amount, the amount it returned to AVAILABLE. Both are null when all of the reserved value had expired, because there is no RELEASE.
Check reversed_amount only for COMPLETED and PARTIALLY_REVERSED redemptions when deciding whether another reversal is valid.
Gift-card fulfillment
Gift-card redemptions include a nestedfulfillment object describing the order. The redemption’s own status describes the balance spend. This endpoint never returns a claim link; use Create a claim link after fulfillment succeeds.
fulfillment.status | Meaning |
|---|---|
PENDING | Waiting to place the order. |
PROCESSING | The order is being processed. |
AWAITING_FUNDS | The account needs more funds. Scrip retries automatically. |
SUCCEEDED | The order succeeded and the redemption is COMPLETED. |
FAILED | Fulfillment stopped without delivering a card. Check fulfillment.failure_reason. |
PENDING while fulfillment is in progress. Successful fulfillment captures the held balance. Failure releases the live reserved balance and changes the redemption to FAILED, or CANCELLED when you cancelled it.
The AWAITING_FUNDS window is set by awaiting_funds_window_hours and defaults to 24 hours. If that window expires before the account is funded, fulfillment fails with insufficient_funds. The reservation’s deadline can end fulfillment sooner. Funding can move the order back to PROCESSING or directly to SUCCEEDED.
Failure reasons
fulfillment.failure_reason | Meaning |
|---|---|
provider_permanent_error | The order was rejected and cannot succeed. |
attempts_exhausted | The order still failed after Scrip’s automatic retries. |
idempotency_conflict | The vendor reported a conflict with an existing order. |
reservation_expired | The reservation deadline passed before the order finished. |
redemption_cancelled | The redemption was cancelled before the order completed. |
redemption_failed | The redemption was marked failed before the order completed. |
provider_connection_unavailable | The fulfillment account became unavailable while the order was in progress. |
insufficient_funds | The account was not funded before the funding window expired. |
Completion, cancellation, and reversal
Scrip completes gift-card redemptions automatically after the order succeeds. Calling complete on a pending one returns409 fulfillment_managed. Calling it again after completion returns the existing record with 200.
You can fail or cancel a gift-card redemption only while fulfillment.status is PENDING or AWAITING_FUNDS and no vendor order has been placed. Otherwise, those endpoints return 409 fulfillment_in_progress. Once the card is delivered, reversal returns 409 fulfillment_delivered.Authorizations
API key passed in the X-API-Key header.
Path Parameters
Redemption ID
Response
Redemption details
Total amount debited from the participant's balance (decimal string)
"1000.00"
The asset that was debited
"550e8400-e29b-41d4-a716-446655440003"
Ledger entry that captured a pending redemption
"550e8400-e29b-41d4-a716-446655440007"
When the pending redemption was captured
"2024-01-15T10:45:00Z"
When this redemption was created
"2024-01-15T10:30:00Z"
Context for this redemption, used in journal entries
"Redeemed: Gift Card"
Effective deadline of the backing reservation. Always present for pending redemptions; defaults to 90 days and may be configured up to one year.
"2024-01-15T11:30:00Z"
Machine-readable or operator-supplied terminal failure detail
"fulfillment_failed"
Gift-card vendor order status, present only for provider-backed (fulfillment) redemptions
Show child attributes
Show child attributes
Unique identifier for this redemption
"550e8400-e29b-41d4-a716-446655440000"
Immutable ledger anchor: the hold entry for pending redemptions, otherwise the instant redemption entry
"550e8400-e29b-41d4-a716-446655440005"
The participant who redeemed
"550e8400-e29b-41d4-a716-446655440002"
The program this redemption belongs to
"550e8400-e29b-41d4-a716-446655440001"
Number of units redeemed (catalog redemptions only)
2
Ledger entry that released a pending redemption's reserved value back to AVAILABLE. Present only on FAILED and CANCELLED redemptions whose reservation resolved RELEASED; null while PENDING, after capture (see capture_journal_entry_id), and when every reserved lot had already expired before release (the reservation resolved EXPIRED and no release entry was posted).
"550e8400-e29b-41d4-a716-446655440008"
Amount the release entry returned to AVAILABLE (decimal string). Equals the authorized amount unless part of the reserved value expired before release, in which case only the live remainder is reported. Present exactly when release_journal_entry_id is present.
"1000.00"
Reservation backing a pending redemption
"550e8400-e29b-41d4-a716-446655440006"
When the pending redemption reached a terminal state
"2024-01-15T10:45:00Z"
Cumulative amount reversed so far (decimal string)
"0.00"
Cumulative units reversed so far (UNIT_BASED catalog redemptions only)
0
The reward catalog item that was redeemed (catalog redemptions only)
"550e8400-e29b-41d4-a716-446655440004"
Current lifecycle and reversal state
PENDING, COMPLETED, FAILED, CANCELLED, PARTIALLY_REVERSED, FULLY_REVERSED "COMPLETED"
Cost per unit at the time of redemption (catalog redemptions only, decimal string)
"500.00"
When this redemption was last updated (e.g., after a reversal)
"2024-01-15T10:30:00Z"