Pay with a signed EIP-3009 authorization
curl --request POST \
--url https://api.tozzecard.xyz/merchant/orders/{id}/pay \
--header 'PAYMENT-SIGNATURE: <payment-signature>'import requests
url = "https://api.tozzecard.xyz/merchant/orders/{id}/pay"
headers = {"PAYMENT-SIGNATURE": "<payment-signature>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'PAYMENT-SIGNATURE': '<payment-signature>'}};
fetch('https://api.tozzecard.xyz/merchant/orders/{id}/pay', 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.tozzecard.xyz/merchant/orders/{id}/pay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"PAYMENT-SIGNATURE: <payment-signature>"
],
]);
$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.tozzecard.xyz/merchant/orders/{id}/pay"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("PAYMENT-SIGNATURE", "<payment-signature>")
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.tozzecard.xyz/merchant/orders/{id}/pay")
.header("PAYMENT-SIGNATURE", "<payment-signature>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tozzecard.xyz/merchant/orders/{id}/pay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["PAYMENT-SIGNATURE"] = '<payment-signature>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"amount": "<string>",
"description": "<string>",
"status": "open",
"payer": "<string>",
"tx": "<string>",
"createdAt": 123
}{
"error": "<string>",
"code": "<string>"
}{
"x402Version": 2,
"accepts": [
{
"scheme": "exact",
"network": "eip155:56",
"amount": "<string>",
"asset": "<string>",
"payTo": "<string>",
"maxTimeoutSeconds": 123,
"extra": {}
}
],
"error": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Merchant
Pay with a signed EIP-3009 authorization
POST
/
merchant
/
orders
/
{id}
/
pay
Pay with a signed EIP-3009 authorization
curl --request POST \
--url https://api.tozzecard.xyz/merchant/orders/{id}/pay \
--header 'PAYMENT-SIGNATURE: <payment-signature>'import requests
url = "https://api.tozzecard.xyz/merchant/orders/{id}/pay"
headers = {"PAYMENT-SIGNATURE": "<payment-signature>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'PAYMENT-SIGNATURE': '<payment-signature>'}};
fetch('https://api.tozzecard.xyz/merchant/orders/{id}/pay', 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.tozzecard.xyz/merchant/orders/{id}/pay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"PAYMENT-SIGNATURE: <payment-signature>"
],
]);
$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.tozzecard.xyz/merchant/orders/{id}/pay"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("PAYMENT-SIGNATURE", "<payment-signature>")
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.tozzecard.xyz/merchant/orders/{id}/pay")
.header("PAYMENT-SIGNATURE", "<payment-signature>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tozzecard.xyz/merchant/orders/{id}/pay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["PAYMENT-SIGNATURE"] = '<payment-signature>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"amount": "<string>",
"description": "<string>",
"status": "open",
"payer": "<string>",
"tx": "<string>",
"createdAt": 123
}{
"error": "<string>",
"code": "<string>"
}{
"x402Version": 2,
"accepts": [
{
"scheme": "exact",
"network": "eip155:56",
"amount": "<string>",
"asset": "<string>",
"payTo": "<string>",
"maxTimeoutSeconds": 123,
"extra": {}
}
],
"error": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Headers
paymentHeader(url, accepts[0], authorization, signature)