Pay to ZBD Gamertag
curl --request POST \
--url https://sandbox-api.zbdpay.com/v0/gamertag/send-payment \
--header 'Content-Type: application/json' \
--header 'apikey: <apikey>' \
--data '
{
"amount": "<string>",
"gamertag": "<string>",
"description": "<string>"
}
'import requests
url = "https://sandbox-api.zbdpay.com/v0/gamertag/send-payment"
payload = {
"amount": "<string>",
"gamertag": "<string>",
"description": "<string>"
}
headers = {
"apikey": "<apikey>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<apikey>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '<string>', gamertag: '<string>', description: '<string>'})
};
fetch('https://sandbox-api.zbdpay.com/v0/gamertag/send-payment', 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://sandbox-api.zbdpay.com/v0/gamertag/send-payment",
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' => '<string>',
'gamertag' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <apikey>"
],
]);
$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://sandbox-api.zbdpay.com/v0/gamertag/send-payment"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"gamertag\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<apikey>")
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://sandbox-api.zbdpay.com/v0/gamertag/send-payment")
.header("apikey", "<apikey>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"gamertag\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.zbdpay.com/v0/gamertag/send-payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<apikey>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"gamertag\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "4a67ea26-00b7-4310-82bd-2c5d1490cc2a",
"status": "settled",
"transactionId": "4be87b3a-bf40-45fa-9624-1aa5cb6d61c5",
"receiverId": "14db5692-133a-42ba-a58d-abbcae282185",
"amount": "1000",
"comment": "Sending to Gamertag",
"settledAt": "2023-04-13T15:38:54.595Z"
},
"message": "Payment done.",
}
{
"success": false,
"message": "You cannot pay to this user, missing destination"
}
Gamertags
Pay to ZBD Gamertag
Start sending test Bitcoin payments to ZBD Gamertags.
POST
/
v0
/
gamertag
/
send-payment
Pay to ZBD Gamertag
curl --request POST \
--url https://sandbox-api.zbdpay.com/v0/gamertag/send-payment \
--header 'Content-Type: application/json' \
--header 'apikey: <apikey>' \
--data '
{
"amount": "<string>",
"gamertag": "<string>",
"description": "<string>"
}
'import requests
url = "https://sandbox-api.zbdpay.com/v0/gamertag/send-payment"
payload = {
"amount": "<string>",
"gamertag": "<string>",
"description": "<string>"
}
headers = {
"apikey": "<apikey>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<apikey>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '<string>', gamertag: '<string>', description: '<string>'})
};
fetch('https://sandbox-api.zbdpay.com/v0/gamertag/send-payment', 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://sandbox-api.zbdpay.com/v0/gamertag/send-payment",
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' => '<string>',
'gamertag' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <apikey>"
],
]);
$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://sandbox-api.zbdpay.com/v0/gamertag/send-payment"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"gamertag\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<apikey>")
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://sandbox-api.zbdpay.com/v0/gamertag/send-payment")
.header("apikey", "<apikey>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"gamertag\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.zbdpay.com/v0/gamertag/send-payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<apikey>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"gamertag\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "4a67ea26-00b7-4310-82bd-2c5d1490cc2a",
"status": "settled",
"transactionId": "4be87b3a-bf40-45fa-9624-1aa5cb6d61c5",
"receiverId": "14db5692-133a-42ba-a58d-abbcae282185",
"amount": "1000",
"comment": "Sending to Gamertag",
"settledAt": "2023-04-13T15:38:54.595Z"
},
"message": "Payment done.",
}
{
"success": false,
"message": "You cannot pay to this user, missing destination"
}
This API endpoint is to be used with the ZBD Sandbox API. To use this API you must first create a Project in the ZBD Developer Dashboard and then generate a Sandbox API Key.Sandbox keys only work with the Sandbox API. Live keys only work with the Live API.
Description
This API endpoint is used to send fake Sandbox Bitcoin payments directly to a user’s ZBD Gamertag.Usage
The idea behind this API endpoint is to allow developers integrating ZBD Gamertag capabilities to test their integrations before going Live.Configuration
Header Parameters
string
required
ZBD Project API Key
string
Content Type
Body
string
required
The amount for the Payment -> in millisatoshis
string
required
Destination SANDBOX ZBD Gamertag
string
Note or comment for this Payment (visible to recipient)
{
"success": true,
"data": {
"id": "4a67ea26-00b7-4310-82bd-2c5d1490cc2a",
"status": "settled",
"transactionId": "4be87b3a-bf40-45fa-9624-1aa5cb6d61c5",
"receiverId": "14db5692-133a-42ba-a58d-abbcae282185",
"amount": "1000",
"comment": "Sending to Gamertag",
"settledAt": "2023-04-13T15:38:54.595Z"
},
"message": "Payment done.",
}
{
"success": false,
"message": "You cannot pay to this user, missing destination"
}
Was this page helpful?