curl --request POST \
--url https://playground.runa.io/v2/order/estimate \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"payment_method": {
"type": "ACCOUNT_BALANCE",
"currency": "USD"
},
"items": [
{
"products": {
"type": "MULTIPLE",
"values": [
"AMZ-US",
"AIRBNB-US"
]
},
"face_value": 10
}
]
}
'import requests
url = "https://playground.runa.io/v2/order/estimate"
payload = {
"payment_method": {
"type": "ACCOUNT_BALANCE",
"currency": "USD"
},
"items": [
{
"products": {
"type": "MULTIPLE",
"values": ["AMZ-US", "AIRBNB-US"]
},
"face_value": 10
}
]
}
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({
payment_method: {type: 'ACCOUNT_BALANCE', currency: 'USD'},
items: [
{products: {type: 'MULTIPLE', values: ['AMZ-US', 'AIRBNB-US']}, face_value: 10}
]
})
};
fetch('https://playground.runa.io/v2/order/estimate', 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://playground.runa.io/v2/order/estimate",
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([
'payment_method' => [
'type' => 'ACCOUNT_BALANCE',
'currency' => 'USD'
],
'items' => [
[
'products' => [
'type' => 'MULTIPLE',
'values' => [
'AMZ-US',
'AIRBNB-US'
]
],
'face_value' => 10
]
]
]),
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://playground.runa.io/v2/order/estimate"
payload := strings.NewReader("{\n \"payment_method\": {\n \"type\": \"ACCOUNT_BALANCE\",\n \"currency\": \"USD\"\n },\n \"items\": [\n {\n \"products\": {\n \"type\": \"MULTIPLE\",\n \"values\": [\n \"AMZ-US\",\n \"AIRBNB-US\"\n ]\n },\n \"face_value\": 10\n }\n ]\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://playground.runa.io/v2/order/estimate")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method\": {\n \"type\": \"ACCOUNT_BALANCE\",\n \"currency\": \"USD\"\n },\n \"items\": [\n {\n \"products\": {\n \"type\": \"MULTIPLE\",\n \"values\": [\n \"AMZ-US\",\n \"AIRBNB-US\"\n ]\n },\n \"face_value\": 10\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://playground.runa.io/v2/order/estimate")
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 \"payment_method\": {\n \"type\": \"ACCOUNT_BALANCE\",\n \"currency\": \"USD\"\n },\n \"items\": [\n {\n \"products\": {\n \"type\": \"MULTIPLE\",\n \"values\": [\n \"AMZ-US\",\n \"AIRBNB-US\"\n ]\n },\n \"face_value\": 10\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"payment_method": {
"type": "ACCOUNT_BALANCE",
"currency": "USD"
},
"items": [
{
"products": {
"type": "MULTIPLE",
"values": [
"AMZ-US",
"AIRBNB-US"
]
},
"face_value": 10,
"price": 123,
"discount_multiplier": "0.05",
"currency": "USD"
}
],
"currency": "USD",
"total_discount": 123,
"total_price": 123,
"transaction_detail": {
"USD": {
"value": "10.00",
"fx": null
}
}
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "validation_error",
"message": "There were one or more problems processing your request, see details key.",
"details": [
{
"type": "value_error.number.not_ge",
"message": "ensure this value is greater than or equal to 1",
"location": [
"items",
"0",
"face_value"
]
}
],
"help": null
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}Estimate order
Estimate the price for the order
curl --request POST \
--url https://playground.runa.io/v2/order/estimate \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"payment_method": {
"type": "ACCOUNT_BALANCE",
"currency": "USD"
},
"items": [
{
"products": {
"type": "MULTIPLE",
"values": [
"AMZ-US",
"AIRBNB-US"
]
},
"face_value": 10
}
]
}
'import requests
url = "https://playground.runa.io/v2/order/estimate"
payload = {
"payment_method": {
"type": "ACCOUNT_BALANCE",
"currency": "USD"
},
"items": [
{
"products": {
"type": "MULTIPLE",
"values": ["AMZ-US", "AIRBNB-US"]
},
"face_value": 10
}
]
}
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({
payment_method: {type: 'ACCOUNT_BALANCE', currency: 'USD'},
items: [
{products: {type: 'MULTIPLE', values: ['AMZ-US', 'AIRBNB-US']}, face_value: 10}
]
})
};
fetch('https://playground.runa.io/v2/order/estimate', 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://playground.runa.io/v2/order/estimate",
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([
'payment_method' => [
'type' => 'ACCOUNT_BALANCE',
'currency' => 'USD'
],
'items' => [
[
'products' => [
'type' => 'MULTIPLE',
'values' => [
'AMZ-US',
'AIRBNB-US'
]
],
'face_value' => 10
]
]
]),
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://playground.runa.io/v2/order/estimate"
payload := strings.NewReader("{\n \"payment_method\": {\n \"type\": \"ACCOUNT_BALANCE\",\n \"currency\": \"USD\"\n },\n \"items\": [\n {\n \"products\": {\n \"type\": \"MULTIPLE\",\n \"values\": [\n \"AMZ-US\",\n \"AIRBNB-US\"\n ]\n },\n \"face_value\": 10\n }\n ]\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://playground.runa.io/v2/order/estimate")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method\": {\n \"type\": \"ACCOUNT_BALANCE\",\n \"currency\": \"USD\"\n },\n \"items\": [\n {\n \"products\": {\n \"type\": \"MULTIPLE\",\n \"values\": [\n \"AMZ-US\",\n \"AIRBNB-US\"\n ]\n },\n \"face_value\": 10\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://playground.runa.io/v2/order/estimate")
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 \"payment_method\": {\n \"type\": \"ACCOUNT_BALANCE\",\n \"currency\": \"USD\"\n },\n \"items\": [\n {\n \"products\": {\n \"type\": \"MULTIPLE\",\n \"values\": [\n \"AMZ-US\",\n \"AIRBNB-US\"\n ]\n },\n \"face_value\": 10\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"payment_method": {
"type": "ACCOUNT_BALANCE",
"currency": "USD"
},
"items": [
{
"products": {
"type": "MULTIPLE",
"values": [
"AMZ-US",
"AIRBNB-US"
]
},
"face_value": 10,
"price": 123,
"discount_multiplier": "0.05",
"currency": "USD"
}
],
"currency": "USD",
"total_discount": 123,
"total_price": 123,
"transaction_detail": {
"USD": {
"value": "10.00",
"fx": null
}
}
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "validation_error",
"message": "There were one or more problems processing your request, see details key.",
"details": [
{
"type": "value_error.number.not_ge",
"message": "ensure this value is greater than or equal to 1",
"location": [
"items",
"0",
"face_value"
]
}
],
"help": null
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}Authorizations
Headers
The dated version of the API, if not specified a default is used. See API versioning for more information.
Body
The details of the order to estimate.
Request for a price estimate for an order.
Payment method for the order. Select the ACCOUNT_BALANCE you want to pay for the order from.
Show child attributes
Show child attributes
List of order items for price estimation.
1 - 500 elementsShow child attributes
Show child attributes
Response
OK
Response object for a order price estimate.
Account balance payment.
Show child attributes
Show child attributes
List of order items with price and discount.
Show child attributes
Show child attributes
The currency of the order, represented by ISO 4217 currency codes. Please check the currency section in the guidelines for how to use this field.
^[A-Z]{3}$"USD"
Total discount on the entire order.
Total price of the entire order.
A mapping of the subtotal of the order using the payout currency as a key.
Show child attributes
Show child attributes
{ "USD": { "value": "10.00", "fx": null } }
Was this page helpful?