Create a new payment
curl --request POST \
--url https://api.pay.walletconnect.com/v1/payments \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Merchant-Id: <merchant-id>' \
--data '
{
"amount": {
"unit": "iso4217/USD",
"value": "100"
},
"checkout": null,
"expiresAt": null,
"referenceId": "ORDER-123"
}
'import requests
url = "https://api.pay.walletconnect.com/v1/payments"
payload = {
"amount": {
"unit": "iso4217/USD",
"value": "100"
},
"checkout": None,
"expiresAt": None,
"referenceId": "ORDER-123"
}
headers = {
"Api-Key": "<api-key>",
"Merchant-Id": "<merchant-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Key': '<api-key>',
'Merchant-Id': '<merchant-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: {unit: 'iso4217/USD', value: '100'},
checkout: null,
expiresAt: null,
referenceId: 'ORDER-123'
})
};
fetch('https://api.pay.walletconnect.com/v1/payments', 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/payments",
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([
'amount' => [
'unit' => 'iso4217/USD',
'value' => '100'
],
'checkout' => null,
'expiresAt' => null,
'referenceId' => 'ORDER-123'
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json",
"Merchant-Id: <merchant-id>"
],
]);
$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/payments"
payload := strings.NewReader("{\n \"amount\": {\n \"unit\": \"iso4217/USD\",\n \"value\": \"100\"\n },\n \"checkout\": null,\n \"expiresAt\": null,\n \"referenceId\": \"ORDER-123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Key", "<api-key>")
req.Header.Add("Merchant-Id", "<merchant-id>")
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/payments")
.header("Api-Key", "<api-key>")
.header("Merchant-Id", "<merchant-id>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": {\n \"unit\": \"iso4217/USD\",\n \"value\": \"100\"\n },\n \"checkout\": null,\n \"expiresAt\": null,\n \"referenceId\": \"ORDER-123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pay.walletconnect.com/v1/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<api-key>'
request["Merchant-Id"] = '<merchant-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"unit\": \"iso4217/USD\",\n \"value\": \"100\"\n },\n \"checkout\": null,\n \"expiresAt\": null,\n \"referenceId\": \"ORDER-123\"\n}"
response = http.request(request)
puts response.read_body{
"expiresAt": 1718236800,
"gatewayUrl": "https://api.pay.walletconnect.com/pay_123",
"isFinal": false,
"paymentId": "pay_fea2ecc101KQFN7X7QP87PNA9SVQNAQAFP",
"pollInMs": 1000,
"status": "requires_action"
}{
"code": "rate_limited",
"message": "<string>"
}{
"code": "rate_limited",
"message": "<string>"
}{
"code": "rate_limited",
"message": "<string>"
}Payments
Create a new payment
Creates a new payment with the provided payment details.
POST
/
v1
/
payments
Create a new payment
curl --request POST \
--url https://api.pay.walletconnect.com/v1/payments \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Merchant-Id: <merchant-id>' \
--data '
{
"amount": {
"unit": "iso4217/USD",
"value": "100"
},
"checkout": null,
"expiresAt": null,
"referenceId": "ORDER-123"
}
'import requests
url = "https://api.pay.walletconnect.com/v1/payments"
payload = {
"amount": {
"unit": "iso4217/USD",
"value": "100"
},
"checkout": None,
"expiresAt": None,
"referenceId": "ORDER-123"
}
headers = {
"Api-Key": "<api-key>",
"Merchant-Id": "<merchant-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Key': '<api-key>',
'Merchant-Id': '<merchant-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: {unit: 'iso4217/USD', value: '100'},
checkout: null,
expiresAt: null,
referenceId: 'ORDER-123'
})
};
fetch('https://api.pay.walletconnect.com/v1/payments', 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/payments",
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([
'amount' => [
'unit' => 'iso4217/USD',
'value' => '100'
],
'checkout' => null,
'expiresAt' => null,
'referenceId' => 'ORDER-123'
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json",
"Merchant-Id: <merchant-id>"
],
]);
$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/payments"
payload := strings.NewReader("{\n \"amount\": {\n \"unit\": \"iso4217/USD\",\n \"value\": \"100\"\n },\n \"checkout\": null,\n \"expiresAt\": null,\n \"referenceId\": \"ORDER-123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Key", "<api-key>")
req.Header.Add("Merchant-Id", "<merchant-id>")
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/payments")
.header("Api-Key", "<api-key>")
.header("Merchant-Id", "<merchant-id>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": {\n \"unit\": \"iso4217/USD\",\n \"value\": \"100\"\n },\n \"checkout\": null,\n \"expiresAt\": null,\n \"referenceId\": \"ORDER-123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pay.walletconnect.com/v1/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<api-key>'
request["Merchant-Id"] = '<merchant-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"unit\": \"iso4217/USD\",\n \"value\": \"100\"\n },\n \"checkout\": null,\n \"expiresAt\": null,\n \"referenceId\": \"ORDER-123\"\n}"
response = http.request(request)
puts response.read_body{
"expiresAt": 1718236800,
"gatewayUrl": "https://api.pay.walletconnect.com/pay_123",
"isFinal": false,
"paymentId": "pay_fea2ecc101KQFN7X7QP87PNA9SVQNAQAFP",
"pollInMs": 1000,
"status": "requires_action"
}{
"code": "rate_limited",
"message": "<string>"
}{
"code": "rate_limited",
"message": "<string>"
}{
"code": "rate_limited",
"message": "<string>"
}Authorizations
API KeyApiKeyAppId
Headers
Body
application/json
Amount to be paid
Show child attributes
Show child attributes
Example:
{ "unit": "iso4217/USD", "value": "100" }
Merchant/PSP order ID
Show child attributes
Show child attributes
Example:
{ "errorUrl": "https://example.com/error", "successUrl": "https://example.com/success" }
Optional custom expiration timestamp (Unix seconds since epoch). Must be in the future if provided. If not provided, defaults to 15 minutes from now.
Response
Payment created successfully
Payment expiration timestamp, in seconds since epoch
Required range:
x >= 0Gateway URL to redirect the user to for payment
True if the payment is in a final state and no longer requires polling
Payment ID
Example:
"pay_7fa2ecc101ARZ3NDEKTSV4RRFFQ69G5FAV"
Payment status
Available options:
requires_action, processing, succeeded, failed, expired, cancelled Time to poll for payment status, in milliseconds. Not present if the payment is in a final state.
Required range:
x >= 0