curl --request POST \
--url https://api.ionicfi.com/v1/spend_intents/{id}/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{}'import requests
url = "https://api.ionicfi.com/v1/spend_intents/{id}/claim"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.ionicfi.com/v1/spend_intents/{id}/claim', 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.ionicfi.com/v1/spend_intents/{id}/claim",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ionicfi.com/v1/spend_intents/{id}/claim"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.ionicfi.com/v1/spend_intents/{id}/claim")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionicfi.com/v1/spend_intents/{id}/claim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"spend_intent_id": "<string>",
"card": {
"number": "<string>",
"cvc": "<string>",
"exp_month": 6,
"exp_year": 5999,
"holder_name": "<string>"
},
"billing_details": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country": "<string>",
"line2": "<string>",
"state": "<string>"
},
"email": "[email protected]"
},
"proxy": {
"protocol": "https",
"host": "<string>",
"port": 443,
"username": "<string>",
"password": "<string>",
"ca_bundle_url": "<string>"
},
"allowed_hosts": [
"<string>"
],
"browser_requirements": {
"reload_payment_page": true
},
"expires_at": 1
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"spend_intent": {
"id": "<string>",
"object": "spend_intent",
"account_id": "<string>",
"agent_id": "<string>",
"livemode": true,
"version": 2,
"action": "payment",
"card_id": "<string>",
"purpose": "<string>",
"seller": {
"name": "<string>",
"checkout_url": "<string>"
},
"amount": 4503599627370495,
"currency": "<string>",
"billing_details": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country": "<string>",
"line2": "<string>",
"state": "<string>"
},
"email": "[email protected]"
},
"reference": "<string>",
"status": "pending_approval",
"allowed_hosts": [
"<string>"
],
"approval_url": "<string>",
"return_url": "<string>",
"created": 1,
"approval_expires_at": 1,
"approved_at": 1,
"claimed_at": 1,
"canceled_at": 1,
"claim_expires_at": 1,
"credential_expires_at": 1,
"claim_replay_available": true,
"credential_exposure": "none",
"claim_within_seconds": 300,
"approvals": [
{
"authority": "owner",
"status": "pending",
"over_limit": true,
"decided_at": 1
}
],
"limit_breaches": [
{
"authority": "owner",
"limit_id": "<string>",
"rule": {
"type": "max_amount",
"window": "1h"
},
"limit": 4503599627370496,
"usage": 4503599627370495,
"requested": 4503599627370495,
"on_breach": "hold"
}
],
"blocked_at": 1
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"spend_intent": {
"id": "<string>",
"object": "spend_intent",
"account_id": "<string>",
"agent_id": "<string>",
"livemode": true,
"version": 2,
"action": "payment",
"card_id": "<string>",
"purpose": "<string>",
"seller": {
"name": "<string>",
"checkout_url": "<string>"
},
"amount": 4503599627370495,
"currency": "<string>",
"billing_details": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country": "<string>",
"line2": "<string>",
"state": "<string>"
},
"email": "[email protected]"
},
"reference": "<string>",
"status": "pending_approval",
"allowed_hosts": [
"<string>"
],
"approval_url": "<string>",
"return_url": "<string>",
"created": 1,
"approval_expires_at": 1,
"approved_at": 1,
"claimed_at": 1,
"canceled_at": 1,
"claim_expires_at": 1,
"credential_expires_at": 1,
"claim_replay_available": true,
"credential_exposure": "none",
"claim_within_seconds": 300,
"approvals": [
{
"authority": "owner",
"status": "pending",
"over_limit": true,
"decided_at": 1
}
],
"limit_breaches": [
{
"authority": "owner",
"limit_id": "<string>",
"rule": {
"type": "max_amount",
"window": "1h"
},
"limit": 4503599627370496,
"usage": 4503599627370495,
"requested": 4503599627370495,
"on_breach": "hold"
}
],
"blocked_at": 1
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}Claim a spend intent
Returns the card details for an approved spend intent. Call it from your trusted browser worker immediately before entering the card at checkout.
The card number and security code are stand-ins: the returned proxy replaces them with the real card details only on requests to allowed_hosts. Never put the response in model prompts, logs, recordings, or ordinary job storage.
Requires the agent secret key that created the intent, with spend:write, and an empty JSON body. After claim_in_progress, wait for Retry-After and retry with the same Idempotency-Key. A retry never extends expires_at. If the status becomes issuance_unknown, stop the purchase and don’t create a replacement automatically.
curl --request POST \
--url https://api.ionicfi.com/v1/spend_intents/{id}/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{}'import requests
url = "https://api.ionicfi.com/v1/spend_intents/{id}/claim"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.ionicfi.com/v1/spend_intents/{id}/claim', 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.ionicfi.com/v1/spend_intents/{id}/claim",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ionicfi.com/v1/spend_intents/{id}/claim"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.ionicfi.com/v1/spend_intents/{id}/claim")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionicfi.com/v1/spend_intents/{id}/claim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"spend_intent_id": "<string>",
"card": {
"number": "<string>",
"cvc": "<string>",
"exp_month": 6,
"exp_year": 5999,
"holder_name": "<string>"
},
"billing_details": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country": "<string>",
"line2": "<string>",
"state": "<string>"
},
"email": "[email protected]"
},
"proxy": {
"protocol": "https",
"host": "<string>",
"port": 443,
"username": "<string>",
"password": "<string>",
"ca_bundle_url": "<string>"
},
"allowed_hosts": [
"<string>"
],
"browser_requirements": {
"reload_payment_page": true
},
"expires_at": 1
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"spend_intent": {
"id": "<string>",
"object": "spend_intent",
"account_id": "<string>",
"agent_id": "<string>",
"livemode": true,
"version": 2,
"action": "payment",
"card_id": "<string>",
"purpose": "<string>",
"seller": {
"name": "<string>",
"checkout_url": "<string>"
},
"amount": 4503599627370495,
"currency": "<string>",
"billing_details": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country": "<string>",
"line2": "<string>",
"state": "<string>"
},
"email": "[email protected]"
},
"reference": "<string>",
"status": "pending_approval",
"allowed_hosts": [
"<string>"
],
"approval_url": "<string>",
"return_url": "<string>",
"created": 1,
"approval_expires_at": 1,
"approved_at": 1,
"claimed_at": 1,
"canceled_at": 1,
"claim_expires_at": 1,
"credential_expires_at": 1,
"claim_replay_available": true,
"credential_exposure": "none",
"claim_within_seconds": 300,
"approvals": [
{
"authority": "owner",
"status": "pending",
"over_limit": true,
"decided_at": 1
}
],
"limit_breaches": [
{
"authority": "owner",
"limit_id": "<string>",
"rule": {
"type": "max_amount",
"window": "1h"
},
"limit": 4503599627370496,
"usage": 4503599627370495,
"requested": 4503599627370495,
"on_breach": "hold"
}
],
"blocked_at": 1
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"spend_intent": {
"id": "<string>",
"object": "spend_intent",
"account_id": "<string>",
"agent_id": "<string>",
"livemode": true,
"version": 2,
"action": "payment",
"card_id": "<string>",
"purpose": "<string>",
"seller": {
"name": "<string>",
"checkout_url": "<string>"
},
"amount": 4503599627370495,
"currency": "<string>",
"billing_details": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country": "<string>",
"line2": "<string>",
"state": "<string>"
},
"email": "[email protected]"
},
"reference": "<string>",
"status": "pending_approval",
"allowed_hosts": [
"<string>"
],
"approval_url": "<string>",
"return_url": "<string>",
"created": 1,
"approval_expires_at": 1,
"approved_at": 1,
"claimed_at": 1,
"canceled_at": 1,
"claim_expires_at": 1,
"credential_expires_at": 1,
"claim_replay_available": true,
"credential_exposure": "none",
"claim_within_seconds": 300,
"approvals": [
{
"authority": "owner",
"status": "pending",
"over_limit": true,
"decided_at": 1
}
],
"limit_breaches": [
{
"authority": "owner",
"limit_id": "<string>",
"rule": {
"type": "max_amount",
"window": "1h"
},
"limit": 4503599627370496,
"usage": 4503599627370495,
"requested": 4503599627370495,
"on_breach": "hold"
}
],
"blocked_at": 1
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
}
}Authorizations
Headers
Body
The body is of type object.
Response
The card details for checkout. Keep this response private.
One protected bundle per intent. Original key recovers the exact same values until original expiry while currently authorized. No refreshed TTL. Generic idempotency caches must never store this response.
Exact plaintext reveal destinations. Supply 1-20 distinct lowercase public DNS hosts on create to avoid seller pre-registration. Null, empty, wildcard, URL, port, path, IP and local/internal names are rejected. The actual hosts are customer-approved and immutable; redirects do not expand them. Not a whole-browser network allowlist, merchant-legitimacy check, or merchant-account/amount constraint.
1 - 20 elements253^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+$
