Send a pay link
curl --request POST \
--url https://api.ringup.dev/v1/send_link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkout_session_id": "cs_test_453b5401286d0f80"
}
'import requests
url = "https://api.ringup.dev/v1/send_link"
payload = { "checkout_session_id": "cs_test_453b5401286d0f80" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({checkout_session_id: 'cs_test_453b5401286d0f80'})
};
fetch('https://api.ringup.dev/v1/send_link', 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.ringup.dev/v1/send_link",
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([
'checkout_session_id' => 'cs_test_453b5401286d0f80'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.ringup.dev/v1/send_link"
payload := strings.NewReader("{\n \"checkout_session_id\": \"cs_test_453b5401286d0f80\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.ringup.dev/v1/send_link")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"checkout_session_id\": \"cs_test_453b5401286d0f80\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ringup.dev/v1/send_link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"checkout_session_id\": \"cs_test_453b5401286d0f80\"\n}"
response = http.request(request)
puts response.read_body{
"sent": true,
"pay_url": "https://ringup.dev/pay/link/?t=eyJhbGciOi...",
"short_url": "https://ringup.dev/l/k7m2xq",
"payment_required": "required",
"checkout_session_id": "cs_test_453b5401286d0f80",
"merchant_id": "mch_4f2c9a1b7e3d",
"order_id": "8QK4M2XJ",
"platform_call_id": "call_7c2a91e4"
}API Reference
Send a pay link
Text the caller a pay link for an open Checkout Session. Repeat sends inside a short window return the link with sent: false rather than texting twice.
POST
/
v1
/
send_link
Send a pay link
curl --request POST \
--url https://api.ringup.dev/v1/send_link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkout_session_id": "cs_test_453b5401286d0f80"
}
'import requests
url = "https://api.ringup.dev/v1/send_link"
payload = { "checkout_session_id": "cs_test_453b5401286d0f80" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({checkout_session_id: 'cs_test_453b5401286d0f80'})
};
fetch('https://api.ringup.dev/v1/send_link', 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.ringup.dev/v1/send_link",
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([
'checkout_session_id' => 'cs_test_453b5401286d0f80'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.ringup.dev/v1/send_link"
payload := strings.NewReader("{\n \"checkout_session_id\": \"cs_test_453b5401286d0f80\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.ringup.dev/v1/send_link")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"checkout_session_id\": \"cs_test_453b5401286d0f80\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ringup.dev/v1/send_link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"checkout_session_id\": \"cs_test_453b5401286d0f80\"\n}"
response = http.request(request)
puts response.read_body{
"sent": true,
"pay_url": "https://ringup.dev/pay/link/?t=eyJhbGciOi...",
"short_url": "https://ringup.dev/l/k7m2xq",
"payment_required": "required",
"checkout_session_id": "cs_test_453b5401286d0f80",
"merchant_id": "mch_4f2c9a1b7e3d",
"order_id": "8QK4M2XJ",
"platform_call_id": "call_7c2a91e4"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The only input. Caller, merchant, amount and verdict all come from the session, so a link can never carry a total nobody derived from an order.
Response
Success.
Available options:
required, optional, none False when a repeat send inside the dedupe window returned a link WITHOUT texting. Without this a retrying agent tells the caller "I've texted you" when nothing went out.
⌘I