AI Caller
Initiate Recovery Outreach for Abandoned User Flows
Notifies Yuno’s recovery agent to contact a customer who abandoned checkout before completing payment
POST
/
smart-support
/
external
/
payments
Initiate Recovery Outreach for Abandoned User Flows
curl --request POST \
--url https://api-sandbox.y.uno/v1/smart-support/external/payments \
--header 'Content-Type: application/json' \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>' \
--data '
{
"customer": {
"full_name": "Robert Johnson",
"phone_number": "+12125550103",
"email": "robert.johnson@example.com",
"country_code": "US",
"language": "en"
},
"session": {
"abandonment_timestamp": "2025-05-13T22:45:00Z",
"flow_stage": "cart_review",
"platform": "ios",
"session_id": "sess_def456uvw"
},
"cart": {
"total_value": 29.99,
"currency": "USD",
"items": [
{
"name": "Bluetooth Speaker",
"sku": "BSPEAKER-PRO",
"quantity": 1,
"price": 29.99
}
]
},
"engagement": {
"preferred_channel": "whatsapp",
"reason": "user_abandoned_cart",
"metadata": {
"utm_campaign": "summer_promo",
"last_clicked_button": "Continue Shopping"
}
}
}
'import requests
url = "https://api-sandbox.y.uno/v1/smart-support/external/payments"
payload = {
"customer": {
"full_name": "Robert Johnson",
"phone_number": "+12125550103",
"email": "robert.johnson@example.com",
"country_code": "US",
"language": "en"
},
"session": {
"abandonment_timestamp": "2025-05-13T22:45:00Z",
"flow_stage": "cart_review",
"platform": "ios",
"session_id": "sess_def456uvw"
},
"cart": {
"total_value": 29.99,
"currency": "USD",
"items": [
{
"name": "Bluetooth Speaker",
"sku": "BSPEAKER-PRO",
"quantity": 1,
"price": 29.99
}
]
},
"engagement": {
"preferred_channel": "whatsapp",
"reason": "user_abandoned_cart",
"metadata": {
"utm_campaign": "summer_promo",
"last_clicked_button": "Continue Shopping"
}
}
}
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'public-api-key': '<api-key>',
'private-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer: {
full_name: 'Robert Johnson',
phone_number: '+12125550103',
email: 'robert.johnson@example.com',
country_code: 'US',
language: 'en'
},
session: {
abandonment_timestamp: '2025-05-13T22:45:00Z',
flow_stage: 'cart_review',
platform: 'ios',
session_id: 'sess_def456uvw'
},
cart: {
total_value: 29.99,
currency: 'USD',
items: [{name: 'Bluetooth Speaker', sku: 'BSPEAKER-PRO', quantity: 1, price: 29.99}]
},
engagement: {
preferred_channel: 'whatsapp',
reason: 'user_abandoned_cart',
metadata: {utm_campaign: 'summer_promo', last_clicked_button: 'Continue Shopping'}
}
})
};
fetch('https://api-sandbox.y.uno/v1/smart-support/external/payments', 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-sandbox.y.uno/v1/smart-support/external/payments",
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([
'customer' => [
'full_name' => 'Robert Johnson',
'phone_number' => '+12125550103',
'email' => 'robert.johnson@example.com',
'country_code' => 'US',
'language' => 'en'
],
'session' => [
'abandonment_timestamp' => '2025-05-13T22:45:00Z',
'flow_stage' => 'cart_review',
'platform' => 'ios',
'session_id' => 'sess_def456uvw'
],
'cart' => [
'total_value' => 29.99,
'currency' => 'USD',
'items' => [
[
'name' => 'Bluetooth Speaker',
'sku' => 'BSPEAKER-PRO',
'quantity' => 1,
'price' => 29.99
]
]
],
'engagement' => [
'preferred_channel' => 'whatsapp',
'reason' => 'user_abandoned_cart',
'metadata' => [
'utm_campaign' => 'summer_promo',
'last_clicked_button' => 'Continue Shopping'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"private-secret-key: <api-key>",
"public-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://api-sandbox.y.uno/v1/smart-support/external/payments"
payload := strings.NewReader("{\n \"customer\": {\n \"full_name\": \"Robert Johnson\",\n \"phone_number\": \"+12125550103\",\n \"email\": \"robert.johnson@example.com\",\n \"country_code\": \"US\",\n \"language\": \"en\"\n },\n \"session\": {\n \"abandonment_timestamp\": \"2025-05-13T22:45:00Z\",\n \"flow_stage\": \"cart_review\",\n \"platform\": \"ios\",\n \"session_id\": \"sess_def456uvw\"\n },\n \"cart\": {\n \"total_value\": 29.99,\n \"currency\": \"USD\",\n \"items\": [\n {\n \"name\": \"Bluetooth Speaker\",\n \"sku\": \"BSPEAKER-PRO\",\n \"quantity\": 1,\n \"price\": 29.99\n }\n ]\n },\n \"engagement\": {\n \"preferred_channel\": \"whatsapp\",\n \"reason\": \"user_abandoned_cart\",\n \"metadata\": {\n \"utm_campaign\": \"summer_promo\",\n \"last_clicked_button\": \"Continue Shopping\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-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://api-sandbox.y.uno/v1/smart-support/external/payments")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customer\": {\n \"full_name\": \"Robert Johnson\",\n \"phone_number\": \"+12125550103\",\n \"email\": \"robert.johnson@example.com\",\n \"country_code\": \"US\",\n \"language\": \"en\"\n },\n \"session\": {\n \"abandonment_timestamp\": \"2025-05-13T22:45:00Z\",\n \"flow_stage\": \"cart_review\",\n \"platform\": \"ios\",\n \"session_id\": \"sess_def456uvw\"\n },\n \"cart\": {\n \"total_value\": 29.99,\n \"currency\": \"USD\",\n \"items\": [\n {\n \"name\": \"Bluetooth Speaker\",\n \"sku\": \"BSPEAKER-PRO\",\n \"quantity\": 1,\n \"price\": 29.99\n }\n ]\n },\n \"engagement\": {\n \"preferred_channel\": \"whatsapp\",\n \"reason\": \"user_abandoned_cart\",\n \"metadata\": {\n \"utm_campaign\": \"summer_promo\",\n \"last_clicked_button\": \"Continue Shopping\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/smart-support/external/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"full_name\": \"Robert Johnson\",\n \"phone_number\": \"+12125550103\",\n \"email\": \"robert.johnson@example.com\",\n \"country_code\": \"US\",\n \"language\": \"en\"\n },\n \"session\": {\n \"abandonment_timestamp\": \"2025-05-13T22:45:00Z\",\n \"flow_stage\": \"cart_review\",\n \"platform\": \"ios\",\n \"session_id\": \"sess_def456uvw\"\n },\n \"cart\": {\n \"total_value\": 29.99,\n \"currency\": \"USD\",\n \"items\": [\n {\n \"name\": \"Bluetooth Speaker\",\n \"sku\": \"BSPEAKER-PRO\",\n \"quantity\": 1,\n \"price\": 29.99\n }\n ]\n },\n \"engagement\": {\n \"preferred_channel\": \"whatsapp\",\n \"reason\": \"user_abandoned_cart\",\n \"metadata\": {\n \"utm_campaign\": \"summer_promo\",\n \"last_clicked_button\": \"Continue Shopping\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyThis endpoint allows merchants to notify Yuno’s Recovery Agent when a user abandons their purchase flow, such as during product selection or after initiating checkout, before completing a payment. The submitted data enables Yuno to follow up with the user via call or WhatsApp to encourage completion of the transaction.
Security and compliance
- Authentication: API access requires a valid API key provided in the request headers.
- Data Protection: All data must be transmitted over HTTPS. Yuno adheres to relevant data protection regulations, including GDPR and LGPD.
- Data Usage: Submitted data will be used solely for the purpose of customer engagement and will not be stored beyond the necessary duration.
Use Case ExampleA user named Jane Doe adds a pair of wireless headphones to her cart on a merchant’s website but abandons the checkout process. The merchant’s system detects this and sends the relevant payload to Yuno’s Recovery Agent API. Yuno then initiates a WhatsApp message to Jane, reminding her of the items left in her cart and offering assistance to complete the purchase.
Authorizations
Example: <Your public-api-key>
Example: <Your private-secret-key>
Body
application/json
Response
Successfully initiated recovery outreach.
Was this page helpful?
Previous
Communications CampaignsExplains the Campaigns API for automating declined payment recovery communications via WhatsApp or phone.
Next
⌘I
Initiate Recovery Outreach for Abandoned User Flows
curl --request POST \
--url https://api-sandbox.y.uno/v1/smart-support/external/payments \
--header 'Content-Type: application/json' \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>' \
--data '
{
"customer": {
"full_name": "Robert Johnson",
"phone_number": "+12125550103",
"email": "robert.johnson@example.com",
"country_code": "US",
"language": "en"
},
"session": {
"abandonment_timestamp": "2025-05-13T22:45:00Z",
"flow_stage": "cart_review",
"platform": "ios",
"session_id": "sess_def456uvw"
},
"cart": {
"total_value": 29.99,
"currency": "USD",
"items": [
{
"name": "Bluetooth Speaker",
"sku": "BSPEAKER-PRO",
"quantity": 1,
"price": 29.99
}
]
},
"engagement": {
"preferred_channel": "whatsapp",
"reason": "user_abandoned_cart",
"metadata": {
"utm_campaign": "summer_promo",
"last_clicked_button": "Continue Shopping"
}
}
}
'import requests
url = "https://api-sandbox.y.uno/v1/smart-support/external/payments"
payload = {
"customer": {
"full_name": "Robert Johnson",
"phone_number": "+12125550103",
"email": "robert.johnson@example.com",
"country_code": "US",
"language": "en"
},
"session": {
"abandonment_timestamp": "2025-05-13T22:45:00Z",
"flow_stage": "cart_review",
"platform": "ios",
"session_id": "sess_def456uvw"
},
"cart": {
"total_value": 29.99,
"currency": "USD",
"items": [
{
"name": "Bluetooth Speaker",
"sku": "BSPEAKER-PRO",
"quantity": 1,
"price": 29.99
}
]
},
"engagement": {
"preferred_channel": "whatsapp",
"reason": "user_abandoned_cart",
"metadata": {
"utm_campaign": "summer_promo",
"last_clicked_button": "Continue Shopping"
}
}
}
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'public-api-key': '<api-key>',
'private-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer: {
full_name: 'Robert Johnson',
phone_number: '+12125550103',
email: 'robert.johnson@example.com',
country_code: 'US',
language: 'en'
},
session: {
abandonment_timestamp: '2025-05-13T22:45:00Z',
flow_stage: 'cart_review',
platform: 'ios',
session_id: 'sess_def456uvw'
},
cart: {
total_value: 29.99,
currency: 'USD',
items: [{name: 'Bluetooth Speaker', sku: 'BSPEAKER-PRO', quantity: 1, price: 29.99}]
},
engagement: {
preferred_channel: 'whatsapp',
reason: 'user_abandoned_cart',
metadata: {utm_campaign: 'summer_promo', last_clicked_button: 'Continue Shopping'}
}
})
};
fetch('https://api-sandbox.y.uno/v1/smart-support/external/payments', 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-sandbox.y.uno/v1/smart-support/external/payments",
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([
'customer' => [
'full_name' => 'Robert Johnson',
'phone_number' => '+12125550103',
'email' => 'robert.johnson@example.com',
'country_code' => 'US',
'language' => 'en'
],
'session' => [
'abandonment_timestamp' => '2025-05-13T22:45:00Z',
'flow_stage' => 'cart_review',
'platform' => 'ios',
'session_id' => 'sess_def456uvw'
],
'cart' => [
'total_value' => 29.99,
'currency' => 'USD',
'items' => [
[
'name' => 'Bluetooth Speaker',
'sku' => 'BSPEAKER-PRO',
'quantity' => 1,
'price' => 29.99
]
]
],
'engagement' => [
'preferred_channel' => 'whatsapp',
'reason' => 'user_abandoned_cart',
'metadata' => [
'utm_campaign' => 'summer_promo',
'last_clicked_button' => 'Continue Shopping'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"private-secret-key: <api-key>",
"public-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://api-sandbox.y.uno/v1/smart-support/external/payments"
payload := strings.NewReader("{\n \"customer\": {\n \"full_name\": \"Robert Johnson\",\n \"phone_number\": \"+12125550103\",\n \"email\": \"robert.johnson@example.com\",\n \"country_code\": \"US\",\n \"language\": \"en\"\n },\n \"session\": {\n \"abandonment_timestamp\": \"2025-05-13T22:45:00Z\",\n \"flow_stage\": \"cart_review\",\n \"platform\": \"ios\",\n \"session_id\": \"sess_def456uvw\"\n },\n \"cart\": {\n \"total_value\": 29.99,\n \"currency\": \"USD\",\n \"items\": [\n {\n \"name\": \"Bluetooth Speaker\",\n \"sku\": \"BSPEAKER-PRO\",\n \"quantity\": 1,\n \"price\": 29.99\n }\n ]\n },\n \"engagement\": {\n \"preferred_channel\": \"whatsapp\",\n \"reason\": \"user_abandoned_cart\",\n \"metadata\": {\n \"utm_campaign\": \"summer_promo\",\n \"last_clicked_button\": \"Continue Shopping\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-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://api-sandbox.y.uno/v1/smart-support/external/payments")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customer\": {\n \"full_name\": \"Robert Johnson\",\n \"phone_number\": \"+12125550103\",\n \"email\": \"robert.johnson@example.com\",\n \"country_code\": \"US\",\n \"language\": \"en\"\n },\n \"session\": {\n \"abandonment_timestamp\": \"2025-05-13T22:45:00Z\",\n \"flow_stage\": \"cart_review\",\n \"platform\": \"ios\",\n \"session_id\": \"sess_def456uvw\"\n },\n \"cart\": {\n \"total_value\": 29.99,\n \"currency\": \"USD\",\n \"items\": [\n {\n \"name\": \"Bluetooth Speaker\",\n \"sku\": \"BSPEAKER-PRO\",\n \"quantity\": 1,\n \"price\": 29.99\n }\n ]\n },\n \"engagement\": {\n \"preferred_channel\": \"whatsapp\",\n \"reason\": \"user_abandoned_cart\",\n \"metadata\": {\n \"utm_campaign\": \"summer_promo\",\n \"last_clicked_button\": \"Continue Shopping\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/smart-support/external/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"full_name\": \"Robert Johnson\",\n \"phone_number\": \"+12125550103\",\n \"email\": \"robert.johnson@example.com\",\n \"country_code\": \"US\",\n \"language\": \"en\"\n },\n \"session\": {\n \"abandonment_timestamp\": \"2025-05-13T22:45:00Z\",\n \"flow_stage\": \"cart_review\",\n \"platform\": \"ios\",\n \"session_id\": \"sess_def456uvw\"\n },\n \"cart\": {\n \"total_value\": 29.99,\n \"currency\": \"USD\",\n \"items\": [\n {\n \"name\": \"Bluetooth Speaker\",\n \"sku\": \"BSPEAKER-PRO\",\n \"quantity\": 1,\n \"price\": 29.99\n }\n ]\n },\n \"engagement\": {\n \"preferred_channel\": \"whatsapp\",\n \"reason\": \"user_abandoned_cart\",\n \"metadata\": {\n \"utm_campaign\": \"summer_promo\",\n \"last_clicked_button\": \"Continue Shopping\"\n }\n }\n}"
response = http.request(request)
puts response.read_body