Create Wallet
Creates a new wallet provider that can be used for disbursements. The wallet must be configured with supported assets and proper authentication domains.
curl --request POST \
--url https://api.example.com/wallets \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"homepage": "<string>",
"deep_link_schema": "<string>",
"sep_10_client_domain": "<string>",
"enabled": true,
"assets": [
{
"id": "<string>"
}
],
"assets_ids": [
"<string>"
]
}
'import requests
url = "https://api.example.com/wallets"
payload = {
"name": "<string>",
"homepage": "<string>",
"deep_link_schema": "<string>",
"sep_10_client_domain": "<string>",
"enabled": True,
"assets": [{ "id": "<string>" }],
"assets_ids": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
homepage: '<string>',
deep_link_schema: '<string>',
sep_10_client_domain: '<string>',
enabled: true,
assets: [{id: '<string>'}],
assets_ids: ['<string>']
})
};
fetch('https://api.example.com/wallets', 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.example.com/wallets",
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([
'name' => '<string>',
'homepage' => '<string>',
'deep_link_schema' => '<string>',
'sep_10_client_domain' => '<string>',
'enabled' => true,
'assets' => [
[
'id' => '<string>'
]
],
'assets_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <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.example.com/wallets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"homepage\": \"<string>\",\n \"deep_link_schema\": \"<string>\",\n \"sep_10_client_domain\": \"<string>\",\n \"enabled\": true,\n \"assets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"assets_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.example.com/wallets")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"homepage\": \"<string>\",\n \"deep_link_schema\": \"<string>\",\n \"sep_10_client_domain\": \"<string>\",\n \"enabled\": true,\n \"assets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"assets_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"homepage\": \"<string>\",\n \"deep_link_schema\": \"<string>\",\n \"sep_10_client_domain\": \"<string>\",\n \"enabled\": true,\n \"assets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"assets_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "5ada9ed5-455a-4782-a0ee-160767e0deb1",
"name": "Vibrant Assist",
"homepage": "https://vibrantapp.com",
"sep_10_client_domain": "api-dev.vibrantapp.com",
"deep_link_schema": "https://vibrantapp.com/sdp-dev",
"created_at": "2023-07-31T20:50:45.648Z",
"updated_at": "2023-07-31T20:50:45.648Z"
}{
"error": "<string>",
"extras": {}
}{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}{
"error": "Forbidden"
}{
"error": "<string>",
"extras": {}
}Authorizations
Authorization header containing an SDP JWT (ES256) or an SDP_ API key.
Body
Human-readable name of the wallet provider
Homepage URL of the wallet provider
Deep link schema for the wallet application
SEP-10 client domain for authentication
Whether the wallet is enabled for use
Array of asset references supported by this wallet
Asset reference by ID
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Legacy: Array of asset IDs (cannot be used with assets field)
Response
Wallet created successfully
"5ada9ed5-455a-4782-a0ee-160767e0deb1"
"Vibrant Assist"
"https://vibrantapp.com"
"api-dev.vibrantapp.com"
"https://vibrantapp.com/sdp-dev"
"2023-07-31T20:50:45.648Z"
"2023-07-31T20:50:45.648Z"
curl --request POST \
--url https://api.example.com/wallets \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"homepage": "<string>",
"deep_link_schema": "<string>",
"sep_10_client_domain": "<string>",
"enabled": true,
"assets": [
{
"id": "<string>"
}
],
"assets_ids": [
"<string>"
]
}
'import requests
url = "https://api.example.com/wallets"
payload = {
"name": "<string>",
"homepage": "<string>",
"deep_link_schema": "<string>",
"sep_10_client_domain": "<string>",
"enabled": True,
"assets": [{ "id": "<string>" }],
"assets_ids": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
homepage: '<string>',
deep_link_schema: '<string>',
sep_10_client_domain: '<string>',
enabled: true,
assets: [{id: '<string>'}],
assets_ids: ['<string>']
})
};
fetch('https://api.example.com/wallets', 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.example.com/wallets",
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([
'name' => '<string>',
'homepage' => '<string>',
'deep_link_schema' => '<string>',
'sep_10_client_domain' => '<string>',
'enabled' => true,
'assets' => [
[
'id' => '<string>'
]
],
'assets_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <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.example.com/wallets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"homepage\": \"<string>\",\n \"deep_link_schema\": \"<string>\",\n \"sep_10_client_domain\": \"<string>\",\n \"enabled\": true,\n \"assets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"assets_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.example.com/wallets")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"homepage\": \"<string>\",\n \"deep_link_schema\": \"<string>\",\n \"sep_10_client_domain\": \"<string>\",\n \"enabled\": true,\n \"assets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"assets_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"homepage\": \"<string>\",\n \"deep_link_schema\": \"<string>\",\n \"sep_10_client_domain\": \"<string>\",\n \"enabled\": true,\n \"assets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"assets_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "5ada9ed5-455a-4782-a0ee-160767e0deb1",
"name": "Vibrant Assist",
"homepage": "https://vibrantapp.com",
"sep_10_client_domain": "api-dev.vibrantapp.com",
"deep_link_schema": "https://vibrantapp.com/sdp-dev",
"created_at": "2023-07-31T20:50:45.648Z",
"updated_at": "2023-07-31T20:50:45.648Z"
}{
"error": "<string>",
"extras": {}
}{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}{
"error": "Forbidden"
}{
"error": "<string>",
"extras": {}
}