Register a blockchain address
curl --request POST \
--url https://sandbox-api.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountAlias": "user@example.com",
"address": "0x46Be1B5b35708e369b943CE6094c6f0484d480A7",
"asset": "USDC_POLYGON"
}
'import requests
url = "https://sandbox-api.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses"
payload = {
"accountAlias": "user@example.com",
"address": "0x46Be1B5b35708e369b943CE6094c6f0484d480A7",
"asset": "USDC_POLYGON"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountAlias: 'user@example.com',
address: '0x46Be1B5b35708e369b943CE6094c6f0484d480A7',
asset: 'USDC_POLYGON'
})
};
fetch('https://sandbox-api.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses', 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.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses",
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([
'accountAlias' => 'user@example.com',
'address' => '0x46Be1B5b35708e369b943CE6094c6f0484d480A7',
'asset' => 'USDC_POLYGON'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://sandbox-api.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses"
payload := strings.NewReader("{\n \"accountAlias\": \"user@example.com\",\n \"address\": \"0x46Be1B5b35708e369b943CE6094c6f0484d480A7\",\n \"asset\": \"USDC_POLYGON\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountAlias\": \"user@example.com\",\n \"address\": \"0x46Be1B5b35708e369b943CE6094c6f0484d480A7\",\n \"asset\": \"USDC_POLYGON\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountAlias\": \"user@example.com\",\n \"address\": \"0x46Be1B5b35708e369b943CE6094c6f0484d480A7\",\n \"asset\": \"USDC_POLYGON\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"accountAlias": "<string>",
"status": "Active",
"address": "<string>",
"asset": "POL",
"createdAt": "<string>",
"updatedAt": "<string>"
}Mastercard Crypto Credential
Register a blockchain address
Attaches a blockchain address to an existing account alias, so that resolving the alias for that asset returns this address. An account can hold several addresses, one per asset. The response is the only place the new address id is returned — keep it, or find it later through the account search endpoint.
POST
/
v1
/
mastercard
/
crypto-credential
/
crypto-addresses
Register a blockchain address
curl --request POST \
--url https://sandbox-api.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountAlias": "user@example.com",
"address": "0x46Be1B5b35708e369b943CE6094c6f0484d480A7",
"asset": "USDC_POLYGON"
}
'import requests
url = "https://sandbox-api.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses"
payload = {
"accountAlias": "user@example.com",
"address": "0x46Be1B5b35708e369b943CE6094c6f0484d480A7",
"asset": "USDC_POLYGON"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountAlias: 'user@example.com',
address: '0x46Be1B5b35708e369b943CE6094c6f0484d480A7',
asset: 'USDC_POLYGON'
})
};
fetch('https://sandbox-api.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses', 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.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses",
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([
'accountAlias' => 'user@example.com',
'address' => '0x46Be1B5b35708e369b943CE6094c6f0484d480A7',
'asset' => 'USDC_POLYGON'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://sandbox-api.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses"
payload := strings.NewReader("{\n \"accountAlias\": \"user@example.com\",\n \"address\": \"0x46Be1B5b35708e369b943CE6094c6f0484d480A7\",\n \"asset\": \"USDC_POLYGON\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountAlias\": \"user@example.com\",\n \"address\": \"0x46Be1B5b35708e369b943CE6094c6f0484d480A7\",\n \"asset\": \"USDC_POLYGON\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.borderless.xyz/v1/mastercard/crypto-credential/crypto-addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountAlias\": \"user@example.com\",\n \"address\": \"0x46Be1B5b35708e369b943CE6094c6f0484d480A7\",\n \"asset\": \"USDC_POLYGON\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"accountAlias": "<string>",
"status": "Active",
"address": "<string>",
"asset": "POL",
"createdAt": "<string>",
"updatedAt": "<string>"
}Authorizations
Body
application/json
The token tied to a specific blockchain held at the address. It determines which network the address resolves on.
Available options:
POL, USDT_POLYGON, USDC_POLYGON, SBC_POLYGON, ETH, USDT_ETHEREUM, USDC_ETHEREUM, PYUSD_ETHEREUM, DAI_ETHEREUM, EURC_ETHEREUM, SBC_ETHEREUM, TRX, USDT_TRON, SBC_TRON, ETH_BASE, USDC_BASE, USDB_BASE, USDB_ETHEREUM, EURC_BASE, SBC_BASE, ETH_OPTIMISM, USDT_OPTIMISM, USDC_OPTIMISM, BTC, CELO, CUSD_CELO, USDC_CELO, SBC_CELO, SOL, USDC_SOLANA, USDT_SOLANA, PYUSD_SOLANA, USDP_SOLANA, EURC_SOLANA, SBC_SOLANA Example:
"USDC_POLYGON"
Response
201 - application/json
Crypto address registered successfully.
The token tied to a specific blockchain held at the address. It determines which network the address resolves on.
Available options:
POL, USDT_POLYGON, USDC_POLYGON, SBC_POLYGON, ETH, USDT_ETHEREUM, USDC_ETHEREUM, PYUSD_ETHEREUM, DAI_ETHEREUM, EURC_ETHEREUM, SBC_ETHEREUM, TRX, USDT_TRON, SBC_TRON, ETH_BASE, USDC_BASE, USDB_BASE, USDB_ETHEREUM, EURC_BASE, SBC_BASE, ETH_OPTIMISM, USDT_OPTIMISM, USDC_OPTIMISM, BTC, CELO, CUSD_CELO, USDC_CELO, SBC_CELO, SOL, USDC_SOLANA, USDT_SOLANA, PYUSD_SOLANA, USDP_SOLANA, EURC_SOLANA, SBC_SOLANA Was this page helpful?