Receivers
Create Receiver
Creates a new Receiver. Allows clients to create a single receiver record, which can later be referenced in payments or disbursements.
Create Receiver
curl --request POST \
--url https://api.example.com/receivers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "<string>",
"verifications": [
{
"value": "<string>"
}
],
"email": "[email protected]",
"phone_number": "<string>"
}
'import requests
url = "https://api.example.com/receivers"
payload = {
"external_id": "<string>",
"verifications": [{ "value": "<string>" }],
"email": "[email protected]",
"phone_number": "<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({
external_id: '<string>',
verifications: [{value: '<string>'}],
email: '[email protected]',
phone_number: '<string>'
})
};
fetch('https://api.example.com/receivers', 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/receivers",
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([
'external_id' => '<string>',
'verifications' => [
[
'value' => '<string>'
]
],
'email' => '[email protected]',
'phone_number' => '<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/receivers"
payload := strings.NewReader("{\n \"external_id\": \"<string>\",\n \"verifications\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\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/receivers")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"<string>\",\n \"verifications\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/receivers")
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 \"external_id\": \"<string>\",\n \"verifications\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "f83bb638-dda4-41e6-80c9-d03e6eec2aef",
"phone_number": "+15552368475",
"external_id": "usr12334",
"email": "[email protected]",
"created_at": "2023-02-03T10:45:51.000Z",
"total_payments": "2",
"successful_payments": "2",
"failed_payments": "0",
"canceled_payments": "0",
"remaining_payments": "0",
"registered_wallets": "1",
"received_amounts": [
{
"asset_code": "USDC",
"asset_issuer": "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
"received_amount": "100.00"
}
],
"wallets": [
{
"id": "803031d4-1d04-4879-b6d9-dc5641f9988e",
"receiver": {
"id": "029e2ed0-feb6-4c40-8b47-0836a85741a2"
},
"wallet": {
"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",
"enabled": true,
"user_managed": false
},
"stellar_address": "GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL",
"stellar_memo": "<string>",
"stellar_memo_type": "<string>",
"created_at": "2023-02-03T10:45:51.000Z",
"updated_at": "2023-02-03T10:45:51.000Z",
"invited_at": "2023-02-09T10:45:51.000Z",
"last_message_sent_at": "2023-02-10T10:45:51.000Z",
"total_payments": "2",
"payments_received": "2",
"failed_payments": "0",
"canceled_payments": "0",
"remaining_payments": "0",
"received_amounts": [
{
"asset_code": "USDC",
"asset_issuer": "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
"received_amount": "100.00"
}
],
"status": "DRAFT",
"status_history": [
{
"status": "DRAFT",
"timestamp": "2023-02-10T10:45:51Z"
}
]
}
]
}{
"error": "<string>",
"extras": {}
}{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}{
"error": "Forbidden"
}{
"error": "Not found",
"extras": {
"status": 404,
"message": "Resource not found"
}
}{
"error": "<string>",
"extras": {}
}Authorizations
Authorization header containing an SDP JWT (ES256) or an SDP_ API key.
Headers
Names the distribution account this request acts on. Required when the tenant has more than one active account. With a single active account, or an API key scoped to exactly one account, it may be omitted.
Body
application/json
Response
Receiver created successfully
Example:
"f83bb638-dda4-41e6-80c9-d03e6eec2aef"
Example:
"+15552368475"
Example:
"usr12334"
Example:
Example:
"2023-02-03T10:45:51.000Z"
Example:
"2"
Example:
"2"
Example:
"0"
Example:
"0"
Example:
"0"
Example:
"1"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Create Receiver
curl --request POST \
--url https://api.example.com/receivers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "<string>",
"verifications": [
{
"value": "<string>"
}
],
"email": "[email protected]",
"phone_number": "<string>"
}
'import requests
url = "https://api.example.com/receivers"
payload = {
"external_id": "<string>",
"verifications": [{ "value": "<string>" }],
"email": "[email protected]",
"phone_number": "<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({
external_id: '<string>',
verifications: [{value: '<string>'}],
email: '[email protected]',
phone_number: '<string>'
})
};
fetch('https://api.example.com/receivers', 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/receivers",
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([
'external_id' => '<string>',
'verifications' => [
[
'value' => '<string>'
]
],
'email' => '[email protected]',
'phone_number' => '<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/receivers"
payload := strings.NewReader("{\n \"external_id\": \"<string>\",\n \"verifications\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\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/receivers")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"<string>\",\n \"verifications\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/receivers")
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 \"external_id\": \"<string>\",\n \"verifications\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "f83bb638-dda4-41e6-80c9-d03e6eec2aef",
"phone_number": "+15552368475",
"external_id": "usr12334",
"email": "[email protected]",
"created_at": "2023-02-03T10:45:51.000Z",
"total_payments": "2",
"successful_payments": "2",
"failed_payments": "0",
"canceled_payments": "0",
"remaining_payments": "0",
"registered_wallets": "1",
"received_amounts": [
{
"asset_code": "USDC",
"asset_issuer": "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
"received_amount": "100.00"
}
],
"wallets": [
{
"id": "803031d4-1d04-4879-b6d9-dc5641f9988e",
"receiver": {
"id": "029e2ed0-feb6-4c40-8b47-0836a85741a2"
},
"wallet": {
"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",
"enabled": true,
"user_managed": false
},
"stellar_address": "GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL",
"stellar_memo": "<string>",
"stellar_memo_type": "<string>",
"created_at": "2023-02-03T10:45:51.000Z",
"updated_at": "2023-02-03T10:45:51.000Z",
"invited_at": "2023-02-09T10:45:51.000Z",
"last_message_sent_at": "2023-02-10T10:45:51.000Z",
"total_payments": "2",
"payments_received": "2",
"failed_payments": "0",
"canceled_payments": "0",
"remaining_payments": "0",
"received_amounts": [
{
"asset_code": "USDC",
"asset_issuer": "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
"received_amount": "100.00"
}
],
"status": "DRAFT",
"status_history": [
{
"status": "DRAFT",
"timestamp": "2023-02-10T10:45:51Z"
}
]
}
]
}{
"error": "<string>",
"extras": {}
}{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}{
"error": "Forbidden"
}{
"error": "Not found",
"extras": {
"status": 404,
"message": "Resource not found"
}
}{
"error": "<string>",
"extras": {}
}