CryptoPurchase returns the payment details required for crypto payment
curl --request POST \
--url https://api.superlink.me/v1/market/crypto/purchase \
--header 'Content-Type: application/json' \
--data '
{
"currency": "ETH",
"domain": "firstname.lastname",
"ownerAddress": "0x1234567890abcdef1234567890abcdef12345678",
"ownerEmail": "nora@gmail.com",
"ownerName": "Nora",
"partnerId": "248b8553-effa-4d99-a906-041a54f7df87",
"walletAddrs": [
{
"addr": "0x1234567890abcdef1234567890abcdef12345678",
"coinId": 60
}
],
"years": 1
}
'import requests
url = "https://api.superlink.me/v1/market/crypto/purchase"
payload = {
"currency": "ETH",
"domain": "firstname.lastname",
"ownerAddress": "0x1234567890abcdef1234567890abcdef12345678",
"ownerEmail": "nora@gmail.com",
"ownerName": "Nora",
"partnerId": "248b8553-effa-4d99-a906-041a54f7df87",
"walletAddrs": [
{
"addr": "0x1234567890abcdef1234567890abcdef12345678",
"coinId": 60
}
],
"years": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'ETH',
domain: 'firstname.lastname',
ownerAddress: '0x1234567890abcdef1234567890abcdef12345678',
ownerEmail: 'nora@gmail.com',
ownerName: 'Nora',
partnerId: '248b8553-effa-4d99-a906-041a54f7df87',
walletAddrs: [{addr: '0x1234567890abcdef1234567890abcdef12345678', coinId: 60}],
years: 1
})
};
fetch('https://api.superlink.me/v1/market/crypto/purchase', 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.superlink.me/v1/market/crypto/purchase",
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([
'currency' => 'ETH',
'domain' => 'firstname.lastname',
'ownerAddress' => '0x1234567890abcdef1234567890abcdef12345678',
'ownerEmail' => 'nora@gmail.com',
'ownerName' => 'Nora',
'partnerId' => '248b8553-effa-4d99-a906-041a54f7df87',
'walletAddrs' => [
[
'addr' => '0x1234567890abcdef1234567890abcdef12345678',
'coinId' => 60
]
],
'years' => 1
]),
CURLOPT_HTTPHEADER => [
"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.superlink.me/v1/market/crypto/purchase"
payload := strings.NewReader("{\n \"currency\": \"ETH\",\n \"domain\": \"firstname.lastname\",\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"ownerEmail\": \"nora@gmail.com\",\n \"ownerName\": \"Nora\",\n \"partnerId\": \"248b8553-effa-4d99-a906-041a54f7df87\",\n \"walletAddrs\": [\n {\n \"addr\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"coinId\": 60\n }\n ],\n \"years\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
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.superlink.me/v1/market/crypto/purchase")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"ETH\",\n \"domain\": \"firstname.lastname\",\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"ownerEmail\": \"nora@gmail.com\",\n \"ownerName\": \"Nora\",\n \"partnerId\": \"248b8553-effa-4d99-a906-041a54f7df87\",\n \"walletAddrs\": [\n {\n \"addr\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"coinId\": 60\n }\n ],\n \"years\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superlink.me/v1/market/crypto/purchase")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"ETH\",\n \"domain\": \"firstname.lastname\",\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"ownerEmail\": \"nora@gmail.com\",\n \"ownerName\": \"Nora\",\n \"partnerId\": \"248b8553-effa-4d99-a906-041a54f7df87\",\n \"walletAddrs\": [\n {\n \"addr\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"coinId\": 60\n }\n ],\n \"years\": 1\n}"
response = http.request(request)
puts response.read_body{
"address": "0xA5D70E12348Fef6A123EBD1231b123c51235E321",
"amount": 0.001,
"expiryDateEpoch": 1697009575596,
"orderId": "92456d2b-c315-4b2b-b234-c674490b7324",
"paymentId": "fa13ba20-da1d-426f-a0e4-f7629caae626",
"protocol": "ETH",
"uri": "ethereum:0x4c0f4c2ad289be425e034e9475fa243b5f6ccab4?value=1.349965E+16"
}{
"message": "Internal server error"
}Headless Marketplace
Crypto Purchase
CryptoPurchase returns the payment details required for crypto payment
POST
/
v1
/
market
/
crypto
/
purchase
CryptoPurchase returns the payment details required for crypto payment
curl --request POST \
--url https://api.superlink.me/v1/market/crypto/purchase \
--header 'Content-Type: application/json' \
--data '
{
"currency": "ETH",
"domain": "firstname.lastname",
"ownerAddress": "0x1234567890abcdef1234567890abcdef12345678",
"ownerEmail": "nora@gmail.com",
"ownerName": "Nora",
"partnerId": "248b8553-effa-4d99-a906-041a54f7df87",
"walletAddrs": [
{
"addr": "0x1234567890abcdef1234567890abcdef12345678",
"coinId": 60
}
],
"years": 1
}
'import requests
url = "https://api.superlink.me/v1/market/crypto/purchase"
payload = {
"currency": "ETH",
"domain": "firstname.lastname",
"ownerAddress": "0x1234567890abcdef1234567890abcdef12345678",
"ownerEmail": "nora@gmail.com",
"ownerName": "Nora",
"partnerId": "248b8553-effa-4d99-a906-041a54f7df87",
"walletAddrs": [
{
"addr": "0x1234567890abcdef1234567890abcdef12345678",
"coinId": 60
}
],
"years": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'ETH',
domain: 'firstname.lastname',
ownerAddress: '0x1234567890abcdef1234567890abcdef12345678',
ownerEmail: 'nora@gmail.com',
ownerName: 'Nora',
partnerId: '248b8553-effa-4d99-a906-041a54f7df87',
walletAddrs: [{addr: '0x1234567890abcdef1234567890abcdef12345678', coinId: 60}],
years: 1
})
};
fetch('https://api.superlink.me/v1/market/crypto/purchase', 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.superlink.me/v1/market/crypto/purchase",
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([
'currency' => 'ETH',
'domain' => 'firstname.lastname',
'ownerAddress' => '0x1234567890abcdef1234567890abcdef12345678',
'ownerEmail' => 'nora@gmail.com',
'ownerName' => 'Nora',
'partnerId' => '248b8553-effa-4d99-a906-041a54f7df87',
'walletAddrs' => [
[
'addr' => '0x1234567890abcdef1234567890abcdef12345678',
'coinId' => 60
]
],
'years' => 1
]),
CURLOPT_HTTPHEADER => [
"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.superlink.me/v1/market/crypto/purchase"
payload := strings.NewReader("{\n \"currency\": \"ETH\",\n \"domain\": \"firstname.lastname\",\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"ownerEmail\": \"nora@gmail.com\",\n \"ownerName\": \"Nora\",\n \"partnerId\": \"248b8553-effa-4d99-a906-041a54f7df87\",\n \"walletAddrs\": [\n {\n \"addr\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"coinId\": 60\n }\n ],\n \"years\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
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.superlink.me/v1/market/crypto/purchase")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"ETH\",\n \"domain\": \"firstname.lastname\",\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"ownerEmail\": \"nora@gmail.com\",\n \"ownerName\": \"Nora\",\n \"partnerId\": \"248b8553-effa-4d99-a906-041a54f7df87\",\n \"walletAddrs\": [\n {\n \"addr\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"coinId\": 60\n }\n ],\n \"years\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superlink.me/v1/market/crypto/purchase")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"ETH\",\n \"domain\": \"firstname.lastname\",\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"ownerEmail\": \"nora@gmail.com\",\n \"ownerName\": \"Nora\",\n \"partnerId\": \"248b8553-effa-4d99-a906-041a54f7df87\",\n \"walletAddrs\": [\n {\n \"addr\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"coinId\": 60\n }\n ],\n \"years\": 1\n}"
response = http.request(request)
puts response.read_body{
"address": "0xA5D70E12348Fef6A123EBD1231b123c51235E321",
"amount": 0.001,
"expiryDateEpoch": 1697009575596,
"orderId": "92456d2b-c315-4b2b-b234-c674490b7324",
"paymentId": "fa13ba20-da1d-426f-a0e4-f7629caae626",
"protocol": "ETH",
"uri": "ethereum:0x4c0f4c2ad289be425e034e9475fa243b5f6ccab4?value=1.349965E+16"
}{
"message": "Internal server error"
}Body
application/json
crypto purchase request
Example:
"ETH"
Example:
"firstname.lastname"
Example:
"0x1234567890abcdef1234567890abcdef12345678"
Example:
"nora@gmail.com"
Example:
"Nora"
Example:
"248b8553-effa-4d99-a906-041a54f7df87"
Show child attributes
Show child attributes
Example:
1
Response
OK
Example:
"0xA5D70E12348Fef6A123EBD1231b123c51235E321"
PaymentDetails CryptoPaymentDetails json:"paymentDetails"
Example:
0.001
Example:
1697009575596
Example:
"92456d2b-c315-4b2b-b234-c674490b7324"
Example:
"fa13ba20-da1d-426f-a0e4-f7629caae626"
Example:
"ETH"
Example:
"ethereum:0x4c0f4c2ad289be425e034e9475fa243b5f6ccab4?value=1.349965E+16"
⌘I

