Get an x402 payment
Returns a single x402 payment transaction by ID. The transaction must belong to the authenticated user; organization sub-users must have read permission on transactions. Returns 404 if the transaction does not exist or belongs to another user.
GET
/
x402
/
credit_account
/
payments
/
{id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const X402TransactionDetail = await client.x402.creditAccount.payments.retrieve('id');
console.log(X402TransactionDetail.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
x402_transaction_detail = client.x402.credit_account.payments.retrieve(
"id",
)
print(x402_transaction_detail.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
payment, err := client.X402.CreditAccount.Payments.Get(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", payment.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.x402().creditAccount().payments().retrieve("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
x402_transaction_detail = telnyx.x402.credit_account.payments.retrieve("id")
puts(x402_transaction_detail)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$x402_transaction_detail = $client->x402->creditAccount->payments->retrieve(
'id',
);
var_dump($x402_transaction_detail);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx x402:credit-account:payments retrieve \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/x402/credit_account/payments/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "de06811a-2e43-4561-af5a-7d0a26e20aaa",
"record_type": "x402_transaction",
"amount": "50.00",
"currency": "USD",
"status": "settled",
"quote_id": "quote_abc123",
"tx_hash": "0xabc123def456...",
"created_at": "2026-03-13T15:00:00Z",
"updated_at": "2026-03-13T15:00:00Z"
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request."
}
]
}{
"errors": [
{
"code": "10010",
"title": "Authorization failed",
"detail": "You do not have permission to perform the requested action on the specified resource or resources."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
},
"source": {
"pointer": "/"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The x402 payment transaction ID.
Response
x402 payment transaction details
An x402 payment transaction.
Show child attributes
Show child attributes
Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const X402TransactionDetail = await client.x402.creditAccount.payments.retrieve('id');
console.log(X402TransactionDetail.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
x402_transaction_detail = client.x402.credit_account.payments.retrieve(
"id",
)
print(x402_transaction_detail.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
payment, err := client.X402.CreditAccount.Payments.Get(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", payment.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.x402().creditAccount().payments().retrieve("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
x402_transaction_detail = telnyx.x402.credit_account.payments.retrieve("id")
puts(x402_transaction_detail)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$x402_transaction_detail = $client->x402->creditAccount->payments->retrieve(
'id',
);
var_dump($x402_transaction_detail);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx x402:credit-account:payments retrieve \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/x402/credit_account/payments/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "de06811a-2e43-4561-af5a-7d0a26e20aaa",
"record_type": "x402_transaction",
"amount": "50.00",
"currency": "USD",
"status": "settled",
"quote_id": "quote_abc123",
"tx_hash": "0xabc123def456...",
"created_at": "2026-03-13T15:00:00Z",
"updated_at": "2026-03-13T15:00:00Z"
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request."
}
]
}{
"errors": [
{
"code": "10010",
"title": "Authorization failed",
"detail": "You do not have permission to perform the requested action on the specified resource or resources."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
},
"source": {
"pointer": "/"
}
}
]
}