curl --request GET \
--url https://laso.finance/get-purchase-conversation \
--header 'Authorization: <api-key>'import requests
url = "https://laso.finance/get-purchase-conversation"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://laso.finance/get-purchase-conversation', 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://laso.finance/get-purchase-conversation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://laso.finance/get-purchase-conversation"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://laso.finance/get-purchase-conversation")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://laso.finance/get-purchase-conversation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"conversation_id": "<string>",
"open": true,
"turn_in_progress": true,
"last_checkout": {
"merchant": "<string>",
"merchant_name": "<string>",
"status": "placed",
"message": "<string>",
"order_id": "<string>",
"decline_code": "<string>",
"approval_url": "<string>",
"charge_status": "<string>",
"total_cents": 123,
"at": 123
},
"orders": [
{
"order_id": "<string>",
"merchant": "<string>",
"merchant_name": "<string>",
"status": "settled",
"total_cents": 123,
"card_last4": "<string>",
"placed_at": 123
}
],
"carts": [
{
"merchant": "<string>",
"merchant_name": "<string>",
"items": [
{
"name": "<string>",
"quantity": 123,
"price_cents": 123,
"product_id": "<string>"
}
],
"fees_cents": 123,
"tip_cents": 123,
"total_cents": 123,
"approved_ceiling_cents": 123,
"hash": "<string>"
}
]
}Read a purchase conversation's orders
The record of a purchase conversation: whether a turn is still running, the last checkout attempt, and every order it placed with its charge status. Use it to track an order, and to settle what happened before repeating a confirm whose outcome is unclear (in_progress, charge_status: unknown, or a failed turn).
curl --request GET \
--url https://laso.finance/get-purchase-conversation \
--header 'Authorization: <api-key>'import requests
url = "https://laso.finance/get-purchase-conversation"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://laso.finance/get-purchase-conversation', 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://laso.finance/get-purchase-conversation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://laso.finance/get-purchase-conversation"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://laso.finance/get-purchase-conversation")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://laso.finance/get-purchase-conversation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"conversation_id": "<string>",
"open": true,
"turn_in_progress": true,
"last_checkout": {
"merchant": "<string>",
"merchant_name": "<string>",
"status": "placed",
"message": "<string>",
"order_id": "<string>",
"decline_code": "<string>",
"approval_url": "<string>",
"charge_status": "<string>",
"total_cents": 123,
"at": 123
},
"orders": [
{
"order_id": "<string>",
"merchant": "<string>",
"merchant_name": "<string>",
"status": "settled",
"total_cents": 123,
"card_last4": "<string>",
"placed_at": 123
}
],
"carts": [
{
"merchant": "<string>",
"merchant_name": "<string>",
"items": [
{
"name": "<string>",
"quantity": 123,
"price_cents": 123,
"product_id": "<string>"
}
],
"fees_cents": 123,
"tip_cents": 123,
"total_cents": 123,
"approved_ceiling_cents": 123,
"hash": "<string>"
}
]
}Authorizations
Firebase ID token from /auth or any paid route, sent as a Bearer token: Authorization: Bearer <id_token> (the Bearer prefix is required).
Query Parameters
The conversation_id from a purchase turn.
Response
The conversation.
True while a turn is still running. Wait for it to clear before reading orders.
Show child attributes
Show child attributes
Every order this conversation placed, oldest first.
Show child attributes
Show child attributes
Carts still open in the conversation.
Show child attributes
Show child attributes
Was this page helpful?