Read a purchase conversation's orders
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>"
}
]
}Cards
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).
GET
/
get-purchase-conversation
Read a purchase conversation's orders
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
Response
The conversation.
Was this page helpful?