Intents
List intents
Returns a paginated list of Payment Intents for your account. Filterable by state, chain, and date range.
GET
/
intents
List payment intents
curl --request GET \
--url https://api.crycketpay.com/v1/intents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.crycketpay.com/v1/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.crycketpay.com/v1/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.crycketpay.com/v1/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.crycketpay.com/v1/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.crycketpay.com/v1/intents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crycketpay.com/v1/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{
"intents": [
{
"id": "pi_abc123def456ghij",
"chain": "solana:5eykt4UsFv8P8NJdTREpY1vzqKq2Kvdp",
"token": "USDC",
"amount": "10.50",
"requestor": "<string>",
"direction": "request",
"state": "created",
"reference": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"livemode": true,
"idempotencyKey": "<string>",
"tokenAddress": "<string>",
"amountBaseUnits": "<string>",
"fulfiller": "<string>",
"retryRequired": true,
"pendingAtExpiry": true,
"txSignature": "<string>",
"detectedAt": "2023-11-07T05:31:56Z",
"ataRentLamports": 123,
"ttlSeconds": 86400,
"confirmedAt": "2023-11-07T05:31:56Z",
"finalizedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"refundedBy": "<string>",
"refundOf": "<string>"
}
],
"hasMore": true
}{
"error": {
"code": "intent.already_fulfilled",
"message": "<string>",
"param": "<string>",
"details": {}
}
}Authorizations
API key. Use pk_live_* for production or pk_test_* for test mode.
Query Parameters
Filter by intent state Current state of the Payment Intent
Available options:
created, pending, confirmed, finalized, failed, expired, cancelled Filter by CAIP-2 chain ID
Example:
"solana:5eykt4UsFv8P8NJdTREpY1vzqKq2Kvdp"
Maximum number of results to return
Required range:
x <= 100Cursor for pagination. Pass the id of the last intent from the previous page.
⌘I
List payment intents
curl --request GET \
--url https://api.crycketpay.com/v1/intents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.crycketpay.com/v1/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.crycketpay.com/v1/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.crycketpay.com/v1/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.crycketpay.com/v1/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.crycketpay.com/v1/intents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crycketpay.com/v1/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{
"intents": [
{
"id": "pi_abc123def456ghij",
"chain": "solana:5eykt4UsFv8P8NJdTREpY1vzqKq2Kvdp",
"token": "USDC",
"amount": "10.50",
"requestor": "<string>",
"direction": "request",
"state": "created",
"reference": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"livemode": true,
"idempotencyKey": "<string>",
"tokenAddress": "<string>",
"amountBaseUnits": "<string>",
"fulfiller": "<string>",
"retryRequired": true,
"pendingAtExpiry": true,
"txSignature": "<string>",
"detectedAt": "2023-11-07T05:31:56Z",
"ataRentLamports": 123,
"ttlSeconds": 86400,
"confirmedAt": "2023-11-07T05:31:56Z",
"finalizedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"refundedBy": "<string>",
"refundOf": "<string>"
}
],
"hasMore": true
}{
"error": {
"code": "intent.already_fulfilled",
"message": "<string>",
"param": "<string>",
"details": {}
}
}