List spend intents
curl --request GET \
--url https://api.ionicfi.com/v1/spend_intents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ionicfi.com/v1/spend_intents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ionicfi.com/v1/spend_intents', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.ionicfi.com/v1/spend_intents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.ionicfi.com/v1/spend_intents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionicfi.com/v1/spend_intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"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
}
],
"has_more": 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
}
}{
"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
}
}Spend intents
List spend intents
Lists the calling agent’s spend intents for the selected business.
Requires the agent secret key that created them, with spend:read.
GET
/
v1
/
spend_intents
List spend intents
curl --request GET \
--url https://api.ionicfi.com/v1/spend_intents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ionicfi.com/v1/spend_intents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ionicfi.com/v1/spend_intents', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.ionicfi.com/v1/spend_intents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.ionicfi.com/v1/spend_intents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionicfi.com/v1/spend_intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"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
}
],
"has_more": 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
}
}{
"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
}
}
