Create Disbursement
Creates a new disbursement in draft state with basic details. Important: a disbursement is not triggered until the organization adds receivers through the Upload Disbursement Instructions endpoint and the status changes from draft to ready .
curl --request POST \
--url https://api.example.com/disbursements \
--header 'Authorization: <api-key>' \
--header 'Content-Type: */*' \
--data '{
"name": "My New Disbursement name",
"wallet_id": "e2de8544-b7e2-40a9-ad40-411f70d5c4bf",
"asset_id": "d227a68c-2f40-11ee-be56-0242ac120002",
"verification_field": "DATE_OF_BIRTH",
"registration_contact_type": "PHONE_NUMBER",
"receiver_registration_message_template": "You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register."
}'import requests
url = "https://api.example.com/disbursements"
payload = "{\n \"name\": \"My New Disbursement name\",\n \"wallet_id\": \"e2de8544-b7e2-40a9-ad40-411f70d5c4bf\",\n \"asset_id\": \"d227a68c-2f40-11ee-be56-0242ac120002\",\n \"verification_field\": \"DATE_OF_BIRTH\",\n \"registration_contact_type\": \"PHONE_NUMBER\",\n \"receiver_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\"\n}"
headers = {
"Authorization": "<api-key>",
"Content-Type": "*/*"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': '*/*'},
body: '{\n "name": "My New Disbursement name",\n "wallet_id": "e2de8544-b7e2-40a9-ad40-411f70d5c4bf",\n "asset_id": "d227a68c-2f40-11ee-be56-0242ac120002",\n "verification_field": "DATE_OF_BIRTH",\n "registration_contact_type": "PHONE_NUMBER",\n "receiver_registration_message_template": "You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register."\n}'
};
fetch('https://api.example.com/disbursements', 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/disbursements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n \"name\": \"My New Disbursement name\",\n \"wallet_id\": \"e2de8544-b7e2-40a9-ad40-411f70d5c4bf\",\n \"asset_id\": \"d227a68c-2f40-11ee-be56-0242ac120002\",\n \"verification_field\": \"DATE_OF_BIRTH\",\n \"registration_contact_type\": \"PHONE_NUMBER\",\n \"receiver_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\"\n}",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: */*"
],
]);
$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/disbursements"
payload := strings.NewReader("{\n \"name\": \"My New Disbursement name\",\n \"wallet_id\": \"e2de8544-b7e2-40a9-ad40-411f70d5c4bf\",\n \"asset_id\": \"d227a68c-2f40-11ee-be56-0242ac120002\",\n \"verification_field\": \"DATE_OF_BIRTH\",\n \"registration_contact_type\": \"PHONE_NUMBER\",\n \"receiver_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "*/*")
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/disbursements")
.header("Authorization", "<api-key>")
.header("Content-Type", "*/*")
.body("{\n \"name\": \"My New Disbursement name\",\n \"wallet_id\": \"e2de8544-b7e2-40a9-ad40-411f70d5c4bf\",\n \"asset_id\": \"d227a68c-2f40-11ee-be56-0242ac120002\",\n \"verification_field\": \"DATE_OF_BIRTH\",\n \"registration_contact_type\": \"PHONE_NUMBER\",\n \"receiver_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/disbursements")
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"] = '*/*'
request.body = "{\n \"name\": \"My New Disbursement name\",\n \"wallet_id\": \"e2de8544-b7e2-40a9-ad40-411f70d5c4bf\",\n \"asset_id\": \"d227a68c-2f40-11ee-be56-0242ac120002\",\n \"verification_field\": \"DATE_OF_BIRTH\",\n \"registration_contact_type\": \"PHONE_NUMBER\",\n \"receiver_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "619da857-8725-4c58-933d-c120a458e0f5",
"name": "Disbursement Name",
"receiver_registration_message_template": "You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.",
"registration_contact_type": "EMAIL",
"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",
"created_at": "2023-07-31T20:50:45.648Z",
"updated_at": "2023-07-31T20:50:45.648Z"
},
"asset": {
"id": "ffaec4b3-46b0-4db4-a4c4-6c3508057705",
"code": "USDC",
"issuer": "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
"created_at": "2023-02-03T10:45:51Z",
"updated_at": "2023-02-03T10:45:51Z",
"deleted_at": "2023-06-03T10:55:51Z"
},
"status": "DRAFT",
"source_wallet_id": "4c379f5e-09b5-4472-a286-b84e249a1512",
"verification_field": "DATE_OF_BIRTH",
"status_history": [
{
"user_id": "3f351b9e-ed0f-40fa-a314-14757b42dab1",
"status": "DRAFT",
"timestamp": "2023-02-03T10:45:51Z"
}
],
"file_name": "disbursement-feb-03-2023.csv",
"created_at": "2023-02-03T10:45:51Z",
"updated_at": "2023-02-03T10:45:51Z",
"total_payments": 10,
"total_payments_sent": 8,
"total_payments_failed": 1,
"total_payments_remaining": 1,
"amount_disbursed": "800.00",
"total_amount": "1000.00",
"average_amount": "100.00"
}{
"error": "Bad request",
"extras": {
"status": 400,
"message": "Invalid wallet provided"
}
}{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}{
"error": "Forbidden"
}{
"error": "Not found",
"extras": {
"status": 404,
"message": "Resource not found"
}
}Authorizations
Headers
Body
Response
A new disbursement
The custom template used to send invitations to receivers. The default message isn't returned. In the message's content it's possible to add the following template variables: {{.OrganizationName}} which is the Organization Name configured and {{.RegistrationLink}} which is the link generated by SDP to send to the receiver (in case this is not present in the message, it's automatically appended at the end).
"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register."
curl --request POST \
--url https://api.example.com/disbursements \
--header 'Authorization: <api-key>' \
--header 'Content-Type: */*' \
--data '{
"name": "My New Disbursement name",
"wallet_id": "e2de8544-b7e2-40a9-ad40-411f70d5c4bf",
"asset_id": "d227a68c-2f40-11ee-be56-0242ac120002",
"verification_field": "DATE_OF_BIRTH",
"registration_contact_type": "PHONE_NUMBER",
"receiver_registration_message_template": "You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register."
}'import requests
url = "https://api.example.com/disbursements"
payload = "{\n \"name\": \"My New Disbursement name\",\n \"wallet_id\": \"e2de8544-b7e2-40a9-ad40-411f70d5c4bf\",\n \"asset_id\": \"d227a68c-2f40-11ee-be56-0242ac120002\",\n \"verification_field\": \"DATE_OF_BIRTH\",\n \"registration_contact_type\": \"PHONE_NUMBER\",\n \"receiver_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\"\n}"
headers = {
"Authorization": "<api-key>",
"Content-Type": "*/*"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': '*/*'},
body: '{\n "name": "My New Disbursement name",\n "wallet_id": "e2de8544-b7e2-40a9-ad40-411f70d5c4bf",\n "asset_id": "d227a68c-2f40-11ee-be56-0242ac120002",\n "verification_field": "DATE_OF_BIRTH",\n "registration_contact_type": "PHONE_NUMBER",\n "receiver_registration_message_template": "You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register."\n}'
};
fetch('https://api.example.com/disbursements', 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/disbursements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n \"name\": \"My New Disbursement name\",\n \"wallet_id\": \"e2de8544-b7e2-40a9-ad40-411f70d5c4bf\",\n \"asset_id\": \"d227a68c-2f40-11ee-be56-0242ac120002\",\n \"verification_field\": \"DATE_OF_BIRTH\",\n \"registration_contact_type\": \"PHONE_NUMBER\",\n \"receiver_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\"\n}",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: */*"
],
]);
$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/disbursements"
payload := strings.NewReader("{\n \"name\": \"My New Disbursement name\",\n \"wallet_id\": \"e2de8544-b7e2-40a9-ad40-411f70d5c4bf\",\n \"asset_id\": \"d227a68c-2f40-11ee-be56-0242ac120002\",\n \"verification_field\": \"DATE_OF_BIRTH\",\n \"registration_contact_type\": \"PHONE_NUMBER\",\n \"receiver_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "*/*")
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/disbursements")
.header("Authorization", "<api-key>")
.header("Content-Type", "*/*")
.body("{\n \"name\": \"My New Disbursement name\",\n \"wallet_id\": \"e2de8544-b7e2-40a9-ad40-411f70d5c4bf\",\n \"asset_id\": \"d227a68c-2f40-11ee-be56-0242ac120002\",\n \"verification_field\": \"DATE_OF_BIRTH\",\n \"registration_contact_type\": \"PHONE_NUMBER\",\n \"receiver_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/disbursements")
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"] = '*/*'
request.body = "{\n \"name\": \"My New Disbursement name\",\n \"wallet_id\": \"e2de8544-b7e2-40a9-ad40-411f70d5c4bf\",\n \"asset_id\": \"d227a68c-2f40-11ee-be56-0242ac120002\",\n \"verification_field\": \"DATE_OF_BIRTH\",\n \"registration_contact_type\": \"PHONE_NUMBER\",\n \"receiver_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "619da857-8725-4c58-933d-c120a458e0f5",
"name": "Disbursement Name",
"receiver_registration_message_template": "You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.",
"registration_contact_type": "EMAIL",
"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",
"created_at": "2023-07-31T20:50:45.648Z",
"updated_at": "2023-07-31T20:50:45.648Z"
},
"asset": {
"id": "ffaec4b3-46b0-4db4-a4c4-6c3508057705",
"code": "USDC",
"issuer": "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
"created_at": "2023-02-03T10:45:51Z",
"updated_at": "2023-02-03T10:45:51Z",
"deleted_at": "2023-06-03T10:55:51Z"
},
"status": "DRAFT",
"source_wallet_id": "4c379f5e-09b5-4472-a286-b84e249a1512",
"verification_field": "DATE_OF_BIRTH",
"status_history": [
{
"user_id": "3f351b9e-ed0f-40fa-a314-14757b42dab1",
"status": "DRAFT",
"timestamp": "2023-02-03T10:45:51Z"
}
],
"file_name": "disbursement-feb-03-2023.csv",
"created_at": "2023-02-03T10:45:51Z",
"updated_at": "2023-02-03T10:45:51Z",
"total_payments": 10,
"total_payments_sent": 8,
"total_payments_failed": 1,
"total_payments_remaining": 1,
"amount_disbursed": "800.00",
"total_amount": "1000.00",
"average_amount": "100.00"
}{
"error": "Bad request",
"extras": {
"status": 400,
"message": "Invalid wallet provided"
}
}{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}{
"error": "Forbidden"
}{
"error": "Not found",
"extras": {
"status": 404,
"message": "Resource not found"
}
}