Confirm a payment
curl --request POST \
--url https://api.pay.walletconnect.com/v1/gateway/payment/{id}/confirm \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"collectedData": {
"fields": [
{
"id": "fullName",
"value": "John Smith"
},
{
"id": "dob",
"value": "1990-01-01"
},
{
"id": "tosConfirmed",
"value": "true"
},
{
"id": "pobCountry",
"value": "US"
},
{
"id": "pobAddress",
"value": "New York, NY"
}
]
},
"excludeFromRelayer": null,
"optionId": "opt_123",
"results": [
{
"data": [
"0x123"
],
"type": "walletRpc"
}
]
}
'import requests
url = "https://api.pay.walletconnect.com/v1/gateway/payment/{id}/confirm"
payload = {
"collectedData": { "fields": [
{
"id": "fullName",
"value": "John Smith"
},
{
"id": "dob",
"value": "1990-01-01"
},
{
"id": "tosConfirmed",
"value": "true"
},
{
"id": "pobCountry",
"value": "US"
},
{
"id": "pobAddress",
"value": "New York, NY"
}
] },
"excludeFromRelayer": None,
"optionId": "opt_123",
"results": [
{
"data": ["0x123"],
"type": "walletRpc"
}
]
}
headers = {
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collectedData: {
fields: [
{id: 'fullName', value: 'John Smith'},
{id: 'dob', value: '1990-01-01'},
{id: 'tosConfirmed', value: 'true'},
{id: 'pobCountry', value: 'US'},
{id: 'pobAddress', value: 'New York, NY'}
]
},
excludeFromRelayer: null,
optionId: 'opt_123',
results: [{data: ['0x123'], type: 'walletRpc'}]
})
};
fetch('https://api.pay.walletconnect.com/v1/gateway/payment/{id}/confirm', 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.pay.walletconnect.com/v1/gateway/payment/{id}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'collectedData' => [
'fields' => [
[
'id' => 'fullName',
'value' => 'John Smith'
],
[
'id' => 'dob',
'value' => '1990-01-01'
],
[
'id' => 'tosConfirmed',
'value' => 'true'
],
[
'id' => 'pobCountry',
'value' => 'US'
],
[
'id' => 'pobAddress',
'value' => 'New York, NY'
]
]
],
'excludeFromRelayer' => null,
'optionId' => 'opt_123',
'results' => [
[
'data' => [
'0x123'
],
'type' => 'walletRpc'
]
]
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pay.walletconnect.com/v1/gateway/payment/{id}/confirm"
payload := strings.NewReader("{\n \"collectedData\": {\n \"fields\": [\n {\n \"id\": \"fullName\",\n \"value\": \"John Smith\"\n },\n {\n \"id\": \"dob\",\n \"value\": \"1990-01-01\"\n },\n {\n \"id\": \"tosConfirmed\",\n \"value\": \"true\"\n },\n {\n \"id\": \"pobCountry\",\n \"value\": \"US\"\n },\n {\n \"id\": \"pobAddress\",\n \"value\": \"New York, NY\"\n }\n ]\n },\n \"excludeFromRelayer\": null,\n \"optionId\": \"opt_123\",\n \"results\": [\n {\n \"data\": [\n \"0x123\"\n ],\n \"type\": \"walletRpc\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.pay.walletconnect.com/v1/gateway/payment/{id}/confirm")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"collectedData\": {\n \"fields\": [\n {\n \"id\": \"fullName\",\n \"value\": \"John Smith\"\n },\n {\n \"id\": \"dob\",\n \"value\": \"1990-01-01\"\n },\n {\n \"id\": \"tosConfirmed\",\n \"value\": \"true\"\n },\n {\n \"id\": \"pobCountry\",\n \"value\": \"US\"\n },\n {\n \"id\": \"pobAddress\",\n \"value\": \"New York, NY\"\n }\n ]\n },\n \"excludeFromRelayer\": null,\n \"optionId\": \"opt_123\",\n \"results\": [\n {\n \"data\": [\n \"0x123\"\n ],\n \"type\": \"walletRpc\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pay.walletconnect.com/v1/gateway/payment/{id}/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collectedData\": {\n \"fields\": [\n {\n \"id\": \"fullName\",\n \"value\": \"John Smith\"\n },\n {\n \"id\": \"dob\",\n \"value\": \"1990-01-01\"\n },\n {\n \"id\": \"tosConfirmed\",\n \"value\": \"true\"\n },\n {\n \"id\": \"pobCountry\",\n \"value\": \"US\"\n },\n {\n \"id\": \"pobAddress\",\n \"value\": \"New York, NY\"\n }\n ]\n },\n \"excludeFromRelayer\": null,\n \"optionId\": \"opt_123\",\n \"results\": [\n {\n \"data\": [\n \"0x123\"\n ],\n \"type\": \"walletRpc\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"info": null,
"isFinal": true,
"pollInMs": null,
"status": "succeeded"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Gateway
Confirm a payment
This endpoint confirms a payment and submits it to the blockchain for processing.
POST
/
v1
/
gateway
/
payment
/
{id}
/
confirm
Confirm a payment
curl --request POST \
--url https://api.pay.walletconnect.com/v1/gateway/payment/{id}/confirm \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"collectedData": {
"fields": [
{
"id": "fullName",
"value": "John Smith"
},
{
"id": "dob",
"value": "1990-01-01"
},
{
"id": "tosConfirmed",
"value": "true"
},
{
"id": "pobCountry",
"value": "US"
},
{
"id": "pobAddress",
"value": "New York, NY"
}
]
},
"excludeFromRelayer": null,
"optionId": "opt_123",
"results": [
{
"data": [
"0x123"
],
"type": "walletRpc"
}
]
}
'import requests
url = "https://api.pay.walletconnect.com/v1/gateway/payment/{id}/confirm"
payload = {
"collectedData": { "fields": [
{
"id": "fullName",
"value": "John Smith"
},
{
"id": "dob",
"value": "1990-01-01"
},
{
"id": "tosConfirmed",
"value": "true"
},
{
"id": "pobCountry",
"value": "US"
},
{
"id": "pobAddress",
"value": "New York, NY"
}
] },
"excludeFromRelayer": None,
"optionId": "opt_123",
"results": [
{
"data": ["0x123"],
"type": "walletRpc"
}
]
}
headers = {
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collectedData: {
fields: [
{id: 'fullName', value: 'John Smith'},
{id: 'dob', value: '1990-01-01'},
{id: 'tosConfirmed', value: 'true'},
{id: 'pobCountry', value: 'US'},
{id: 'pobAddress', value: 'New York, NY'}
]
},
excludeFromRelayer: null,
optionId: 'opt_123',
results: [{data: ['0x123'], type: 'walletRpc'}]
})
};
fetch('https://api.pay.walletconnect.com/v1/gateway/payment/{id}/confirm', 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.pay.walletconnect.com/v1/gateway/payment/{id}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'collectedData' => [
'fields' => [
[
'id' => 'fullName',
'value' => 'John Smith'
],
[
'id' => 'dob',
'value' => '1990-01-01'
],
[
'id' => 'tosConfirmed',
'value' => 'true'
],
[
'id' => 'pobCountry',
'value' => 'US'
],
[
'id' => 'pobAddress',
'value' => 'New York, NY'
]
]
],
'excludeFromRelayer' => null,
'optionId' => 'opt_123',
'results' => [
[
'data' => [
'0x123'
],
'type' => 'walletRpc'
]
]
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pay.walletconnect.com/v1/gateway/payment/{id}/confirm"
payload := strings.NewReader("{\n \"collectedData\": {\n \"fields\": [\n {\n \"id\": \"fullName\",\n \"value\": \"John Smith\"\n },\n {\n \"id\": \"dob\",\n \"value\": \"1990-01-01\"\n },\n {\n \"id\": \"tosConfirmed\",\n \"value\": \"true\"\n },\n {\n \"id\": \"pobCountry\",\n \"value\": \"US\"\n },\n {\n \"id\": \"pobAddress\",\n \"value\": \"New York, NY\"\n }\n ]\n },\n \"excludeFromRelayer\": null,\n \"optionId\": \"opt_123\",\n \"results\": [\n {\n \"data\": [\n \"0x123\"\n ],\n \"type\": \"walletRpc\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.pay.walletconnect.com/v1/gateway/payment/{id}/confirm")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"collectedData\": {\n \"fields\": [\n {\n \"id\": \"fullName\",\n \"value\": \"John Smith\"\n },\n {\n \"id\": \"dob\",\n \"value\": \"1990-01-01\"\n },\n {\n \"id\": \"tosConfirmed\",\n \"value\": \"true\"\n },\n {\n \"id\": \"pobCountry\",\n \"value\": \"US\"\n },\n {\n \"id\": \"pobAddress\",\n \"value\": \"New York, NY\"\n }\n ]\n },\n \"excludeFromRelayer\": null,\n \"optionId\": \"opt_123\",\n \"results\": [\n {\n \"data\": [\n \"0x123\"\n ],\n \"type\": \"walletRpc\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pay.walletconnect.com/v1/gateway/payment/{id}/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collectedData\": {\n \"fields\": [\n {\n \"id\": \"fullName\",\n \"value\": \"John Smith\"\n },\n {\n \"id\": \"dob\",\n \"value\": \"1990-01-01\"\n },\n {\n \"id\": \"tosConfirmed\",\n \"value\": \"true\"\n },\n {\n \"id\": \"pobCountry\",\n \"value\": \"US\"\n },\n {\n \"id\": \"pobAddress\",\n \"value\": \"New York, NY\"\n }\n ]\n },\n \"excludeFromRelayer\": null,\n \"optionId\": \"opt_123\",\n \"results\": [\n {\n \"data\": [\n \"0x123\"\n ],\n \"type\": \"walletRpc\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"info": null,
"isFinal": true,
"pollInMs": null,
"status": "succeeded"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
API KeyApiKeyAppId
Headers
Path Parameters
Payment ID
Example:
"pay_7fa2ecc101ARZ3NDEKTSV4RRFFQ69G5FAV"
Query Parameters
Maximum time to long-poll for payment status, in milliseconds.
Required range:
x >= 0Body
application/json
ID of the option to confirm
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
{
"fields": [
{ "id": "fullName", "value": "John Smith" },
{ "id": "dob", "value": "1990-01-01" },
{ "id": "tosConfirmed", "value": "true" },
{ "id": "pobCountry", "value": "US" },
{
"id": "pobAddress",
"value": "New York, NY"
}
]
}
Response
Payment confirmed successfully
True if the payment is in a final state and no longer requires polling
Payment status
Available options:
requires_action, processing, succeeded, failed, expired, cancelled Payment information (transaction hash). Present when status is Succeeded, null otherwise.
Show child attributes
Show child attributes
Time to poll for payment status, in milliseconds. Not present if the payment is in a final state.
Required range:
x >= 0⌘I