Send a Payout
curl --request POST \
--url https://api.dots.dev/api/v2/payouts/send-payout \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery": {
"message": "<string>"
},
"force_collect_compliance_information": false,
"additional_steps": [],
"tax_exempt": true,
"metadata": "<string>",
"memo": "<string>",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.dots.dev/api/v2/payouts/send-payout"
payload = {
"amount": 123,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery": { "message": "<string>" },
"force_collect_compliance_information": False,
"additional_steps": [],
"tax_exempt": True,
"metadata": "<string>",
"memo": "<string>",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
delivery: {message: '<string>'},
force_collect_compliance_information: false,
additional_steps: [],
tax_exempt: true,
metadata: '<string>',
memo: '<string>',
idempotency_key: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.dots.dev/api/v2/payouts/send-payout', 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.dots.dev/api/v2/payouts/send-payout",
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([
'amount' => 123,
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'delivery' => [
'message' => '<string>'
],
'force_collect_compliance_information' => false,
'additional_steps' => [
],
'tax_exempt' => true,
'metadata' => '<string>',
'memo' => '<string>',
'idempotency_key' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.dots.dev/api/v2/payouts/send-payout"
payload := strings.NewReader("{\n \"amount\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery\": {\n \"message\": \"<string>\"\n },\n \"force_collect_compliance_information\": false,\n \"additional_steps\": [],\n \"tax_exempt\": true,\n \"metadata\": \"<string>\",\n \"memo\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.dots.dev/api/v2/payouts/send-payout")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery\": {\n \"message\": \"<string>\"\n },\n \"force_collect_compliance_information\": false,\n \"additional_steps\": [],\n \"tax_exempt\": true,\n \"metadata\": \"<string>\",\n \"memo\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dots.dev/api/v2/payouts/send-payout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery\": {\n \"message\": \"<string>\"\n },\n \"force_collect_compliance_information\": false,\n \"additional_steps\": [],\n \"tax_exempt\": true,\n \"metadata\": \"<string>\",\n \"memo\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"link": "<string>",
"amount": 123,
"status": "sent",
"payee": {
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"country_code": "<string>",
"phone_number": "<string>"
},
"delivery": {
"method": "link",
"email": "jsmith@example.com",
"country_code": "<string>",
"phone_number": "<string>"
},
"tax_exempt": true,
"claimed_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": "<string>"
}Payouts
Send Payout
Send a payout to a person when you know their phone number or user id. If the user has a Dots acconut, the funds will delivered according to their saved prefernces. Otherwise, they will be sent a Payout Link to onboard and recieve funds.
POST
/
v2
/
payouts
/
send-payout
Send a Payout
curl --request POST \
--url https://api.dots.dev/api/v2/payouts/send-payout \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery": {
"message": "<string>"
},
"force_collect_compliance_information": false,
"additional_steps": [],
"tax_exempt": true,
"metadata": "<string>",
"memo": "<string>",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.dots.dev/api/v2/payouts/send-payout"
payload = {
"amount": 123,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery": { "message": "<string>" },
"force_collect_compliance_information": False,
"additional_steps": [],
"tax_exempt": True,
"metadata": "<string>",
"memo": "<string>",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
delivery: {message: '<string>'},
force_collect_compliance_information: false,
additional_steps: [],
tax_exempt: true,
metadata: '<string>',
memo: '<string>',
idempotency_key: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.dots.dev/api/v2/payouts/send-payout', 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.dots.dev/api/v2/payouts/send-payout",
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([
'amount' => 123,
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'delivery' => [
'message' => '<string>'
],
'force_collect_compliance_information' => false,
'additional_steps' => [
],
'tax_exempt' => true,
'metadata' => '<string>',
'memo' => '<string>',
'idempotency_key' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.dots.dev/api/v2/payouts/send-payout"
payload := strings.NewReader("{\n \"amount\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery\": {\n \"message\": \"<string>\"\n },\n \"force_collect_compliance_information\": false,\n \"additional_steps\": [],\n \"tax_exempt\": true,\n \"metadata\": \"<string>\",\n \"memo\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.dots.dev/api/v2/payouts/send-payout")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery\": {\n \"message\": \"<string>\"\n },\n \"force_collect_compliance_information\": false,\n \"additional_steps\": [],\n \"tax_exempt\": true,\n \"metadata\": \"<string>\",\n \"memo\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dots.dev/api/v2/payouts/send-payout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery\": {\n \"message\": \"<string>\"\n },\n \"force_collect_compliance_information\": false,\n \"additional_steps\": [],\n \"tax_exempt\": true,\n \"metadata\": \"<string>\",\n \"memo\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"link": "<string>",
"amount": 123,
"status": "sent",
"payee": {
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"country_code": "<string>",
"phone_number": "<string>"
},
"delivery": {
"method": "link",
"email": "jsmith@example.com",
"country_code": "<string>",
"phone_number": "<string>"
},
"tax_exempt": true,
"claimed_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": "<string>"
}Authorizations
Body
application/json
Response
201 - application/json
Created
The payout-link object.
Was this page helpful?