x402 payment destination and quote
curl --request GET \
--url https://gateway.molpha.io/v1/x402/statusconst options = {method: 'GET'};
fetch('https://gateway.molpha.io/v1/x402/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://gateway.molpha.io/v1/x402/status"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gateway.molpha.io/v1/x402/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"gateway": "GwPDA1111111111111111111111111111111111111",
"authority": "GwAuthority11111111111111111111111111111111",
"payTo": "ProtocolConfigPDA111111111111111111111111111",
"treasuryAta": "TreasuryAta111111111111111111111111111111",
"quotedNextPrice": "1030",
"pendingTickets": 1
}{
"error": "validation failed"
}{
"error": "validation failed"
}{
"error": "validation failed"
}Rounds
x402 payment destination and quote
The protocol treasury every x402 payment pays, the next round price, and the gateway’s pending tickets.
GET
/
v1
/
x402
/
status
x402 payment destination and quote
curl --request GET \
--url https://gateway.molpha.io/v1/x402/statusconst options = {method: 'GET'};
fetch('https://gateway.molpha.io/v1/x402/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://gateway.molpha.io/v1/x402/status"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gateway.molpha.io/v1/x402/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"gateway": "GwPDA1111111111111111111111111111111111111",
"authority": "GwAuthority11111111111111111111111111111111",
"payTo": "ProtocolConfigPDA111111111111111111111111111",
"treasuryAta": "TreasuryAta111111111111111111111111111111",
"quotedNextPrice": "1030",
"pendingTickets": 1
}{
"error": "validation failed"
}{
"error": "validation failed"
}{
"error": "validation failed"
}Query Parameters
Quorum used for the price quote (default protocol min_signers)
Example:
3
Response
x402 payment destination and quote
Where x402 payments go and what the next round costs.
Gateway PDA (base58).
Gateway authority public key (base58).
Protocol treasury owner, the ProtocolConfig PDA (base58). The x402 payee.
USDC associated token account of the protocol treasury.
Price of the next round at the requested quorum (USDC atomic units, decimal string).
Example:
"1030"
This gateway's served rounds with no final ticket outcome yet.
Example:
1