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"
}
]
},
"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"
}
] },
"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'}
]
},
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'
]
]
],
'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 },\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 },\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 },\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{
"isFinal": true,
"pollInMs": null,
"status": "succeeded"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Gateway
Confirm a payment
Submit the selected option and executed action results to confirm the payment.
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"
}
]
},
"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"
}
] },
"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'}
]
},
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'
]
]
],
'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 },\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 },\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 },\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{
"isFinal": true,
"pollInMs": null,
"status": "succeeded"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Path Parameters
Payment ID
Query Parameters
Maximum time to long-poll for payment status, in milliseconds.
Required range:
x >= 0Body
application/json
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 Time to poll for payment status, in milliseconds. Not present if the payment is in a final state.
Required range:
x >= 0⌘I