Create a payment link for a contact.
curl --request POST \
--url https://dash.dmly.io/api/v1/payment-links \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"contact_id": "9f1c2a7e-3b4d-4e5f-8a90-1234567890ab",
"amount": 250,
"currency": "USD",
"provider": "stripe",
"description": "Invoice INV-2026-0042",
"external_reference": "ERP-INV-2026-0042",
"channels": "card",
"return_url": "https://example.com/thank-you"
}
'import requests
url = "https://dash.dmly.io/api/v1/payment-links"
payload = {
"contact_id": "9f1c2a7e-3b4d-4e5f-8a90-1234567890ab",
"amount": 250,
"currency": "USD",
"provider": "stripe",
"description": "Invoice INV-2026-0042",
"external_reference": "ERP-INV-2026-0042",
"channels": "card",
"return_url": "https://example.com/thank-you"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact_id: '9f1c2a7e-3b4d-4e5f-8a90-1234567890ab',
amount: 250,
currency: 'USD',
provider: 'stripe',
description: 'Invoice INV-2026-0042',
external_reference: 'ERP-INV-2026-0042',
channels: 'card',
return_url: 'https://example.com/thank-you'
})
};
fetch('https://dash.dmly.io/api/v1/payment-links', 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://dash.dmly.io/api/v1/payment-links",
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([
'contact_id' => '9f1c2a7e-3b4d-4e5f-8a90-1234567890ab',
'amount' => 250,
'currency' => 'USD',
'provider' => 'stripe',
'description' => 'Invoice INV-2026-0042',
'external_reference' => 'ERP-INV-2026-0042',
'channels' => 'card',
'return_url' => 'https://example.com/thank-you'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://dash.dmly.io/api/v1/payment-links"
payload := strings.NewReader("{\n \"contact_id\": \"9f1c2a7e-3b4d-4e5f-8a90-1234567890ab\",\n \"amount\": 250,\n \"currency\": \"USD\",\n \"provider\": \"stripe\",\n \"description\": \"Invoice INV-2026-0042\",\n \"external_reference\": \"ERP-INV-2026-0042\",\n \"channels\": \"card\",\n \"return_url\": \"https://example.com/thank-you\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://dash.dmly.io/api/v1/payment-links")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact_id\": \"9f1c2a7e-3b4d-4e5f-8a90-1234567890ab\",\n \"amount\": 250,\n \"currency\": \"USD\",\n \"provider\": \"stripe\",\n \"description\": \"Invoice INV-2026-0042\",\n \"external_reference\": \"ERP-INV-2026-0042\",\n \"channels\": \"card\",\n \"return_url\": \"https://example.com/thank-you\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.dmly.io/api/v1/payment-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact_id\": \"9f1c2a7e-3b4d-4e5f-8a90-1234567890ab\",\n \"amount\": 250,\n \"currency\": \"USD\",\n \"provider\": \"stripe\",\n \"description\": \"Invoice INV-2026-0042\",\n \"external_reference\": \"ERP-INV-2026-0042\",\n \"channels\": \"card\",\n \"return_url\": \"https://example.com/thank-you\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Create a payment link for a contact.
Mints a checkout link through a connected gateway (the workspace default when provider is omitted) and returns the pending payment with its link_url. Nothing is sent to the contact. external_reference is your own id for what is being paid, for example an ERP invoice number, and comes back on the payment, on payment.* webhooks and as {{payment.external_reference}} in automations. Asking again with the same external_reference, amount, currency and provider returns the link that is already open (200) instead of creating a second checkout (201). channels restricts the hosted page where the gateway supports it (card or bank_transfer). Needs the finance:write permission.
POST
/
payment-links
Create a payment link for a contact.
curl --request POST \
--url https://dash.dmly.io/api/v1/payment-links \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"contact_id": "9f1c2a7e-3b4d-4e5f-8a90-1234567890ab",
"amount": 250,
"currency": "USD",
"provider": "stripe",
"description": "Invoice INV-2026-0042",
"external_reference": "ERP-INV-2026-0042",
"channels": "card",
"return_url": "https://example.com/thank-you"
}
'import requests
url = "https://dash.dmly.io/api/v1/payment-links"
payload = {
"contact_id": "9f1c2a7e-3b4d-4e5f-8a90-1234567890ab",
"amount": 250,
"currency": "USD",
"provider": "stripe",
"description": "Invoice INV-2026-0042",
"external_reference": "ERP-INV-2026-0042",
"channels": "card",
"return_url": "https://example.com/thank-you"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact_id: '9f1c2a7e-3b4d-4e5f-8a90-1234567890ab',
amount: 250,
currency: 'USD',
provider: 'stripe',
description: 'Invoice INV-2026-0042',
external_reference: 'ERP-INV-2026-0042',
channels: 'card',
return_url: 'https://example.com/thank-you'
})
};
fetch('https://dash.dmly.io/api/v1/payment-links', 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://dash.dmly.io/api/v1/payment-links",
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([
'contact_id' => '9f1c2a7e-3b4d-4e5f-8a90-1234567890ab',
'amount' => 250,
'currency' => 'USD',
'provider' => 'stripe',
'description' => 'Invoice INV-2026-0042',
'external_reference' => 'ERP-INV-2026-0042',
'channels' => 'card',
'return_url' => 'https://example.com/thank-you'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://dash.dmly.io/api/v1/payment-links"
payload := strings.NewReader("{\n \"contact_id\": \"9f1c2a7e-3b4d-4e5f-8a90-1234567890ab\",\n \"amount\": 250,\n \"currency\": \"USD\",\n \"provider\": \"stripe\",\n \"description\": \"Invoice INV-2026-0042\",\n \"external_reference\": \"ERP-INV-2026-0042\",\n \"channels\": \"card\",\n \"return_url\": \"https://example.com/thank-you\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://dash.dmly.io/api/v1/payment-links")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact_id\": \"9f1c2a7e-3b4d-4e5f-8a90-1234567890ab\",\n \"amount\": 250,\n \"currency\": \"USD\",\n \"provider\": \"stripe\",\n \"description\": \"Invoice INV-2026-0042\",\n \"external_reference\": \"ERP-INV-2026-0042\",\n \"channels\": \"card\",\n \"return_url\": \"https://example.com/thank-you\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.dmly.io/api/v1/payment-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact_id\": \"9f1c2a7e-3b4d-4e5f-8a90-1234567890ab\",\n \"amount\": 250,\n \"currency\": \"USD\",\n \"provider\": \"stripe\",\n \"description\": \"Invoice INV-2026-0042\",\n \"external_reference\": \"ERP-INV-2026-0042\",\n \"channels\": \"card\",\n \"return_url\": \"https://example.com/thank-you\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Authorizations
apiKeyAuthbearerAuth
Body
application/json
Response
Success.
Was this page helpful?

