cURL
curl --request POST \
--url https://api.steamgold.dev/v1/pouch/{pouchId}/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"name": "<string>",
"phone": "<string>",
"comment": "<string>",
"delivery": {
"rates": {
"tariff_code": 123,
"tariff_name": "<string>",
"tariff_description": "<string>",
"delivery_mode": 123,
"period_min": 123,
"period_max": 123,
"delivery_sum": 123
},
"address": {
"name": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"city": "<string>",
"city_code": 123,
"type": "<string>",
"have_cashless": true,
"have_cash": true,
"allowed_cod": true,
"is_dressing_room": true,
"code": "<string>",
"address": "<string>",
"work_time": "<string>",
"location": [
123
],
"position": [
123
],
"kind": "<string>",
"precision": "<string>",
"formatted": "<string>"
}
}
}
'import requests
url = "https://api.steamgold.dev/v1/pouch/{pouchId}/checkout"
payload = {
"email": "jsmith@example.com",
"name": "<string>",
"phone": "<string>",
"comment": "<string>",
"delivery": {
"rates": {
"tariff_code": 123,
"tariff_name": "<string>",
"tariff_description": "<string>",
"delivery_mode": 123,
"period_min": 123,
"period_max": 123,
"delivery_sum": 123
},
"address": {
"name": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"city": "<string>",
"city_code": 123,
"type": "<string>",
"have_cashless": True,
"have_cash": True,
"allowed_cod": True,
"is_dressing_room": True,
"code": "<string>",
"address": "<string>",
"work_time": "<string>",
"location": [123],
"position": [123],
"kind": "<string>",
"precision": "<string>",
"formatted": "<string>"
}
}
}
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({
email: 'jsmith@example.com',
name: '<string>',
phone: '<string>',
comment: '<string>',
delivery: {
rates: {
tariff_code: 123,
tariff_name: '<string>',
tariff_description: '<string>',
delivery_mode: 123,
period_min: 123,
period_max: 123,
delivery_sum: 123
},
address: {
name: '<string>',
postal_code: '<string>',
country_code: '<string>',
city: '<string>',
city_code: 123,
type: '<string>',
have_cashless: true,
have_cash: true,
allowed_cod: true,
is_dressing_room: true,
code: '<string>',
address: '<string>',
work_time: '<string>',
location: [123],
position: [123],
kind: '<string>',
precision: '<string>',
formatted: '<string>'
}
}
})
};
fetch('https://api.steamgold.dev/v1/pouch/{pouchId}/checkout', 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.steamgold.dev/v1/pouch/{pouchId}/checkout",
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([
'email' => 'jsmith@example.com',
'name' => '<string>',
'phone' => '<string>',
'comment' => '<string>',
'delivery' => [
'rates' => [
'tariff_code' => 123,
'tariff_name' => '<string>',
'tariff_description' => '<string>',
'delivery_mode' => 123,
'period_min' => 123,
'period_max' => 123,
'delivery_sum' => 123
],
'address' => [
'name' => '<string>',
'postal_code' => '<string>',
'country_code' => '<string>',
'city' => '<string>',
'city_code' => 123,
'type' => '<string>',
'have_cashless' => true,
'have_cash' => true,
'allowed_cod' => true,
'is_dressing_room' => true,
'code' => '<string>',
'address' => '<string>',
'work_time' => '<string>',
'location' => [
123
],
'position' => [
123
],
'kind' => '<string>',
'precision' => '<string>',
'formatted' => '<string>'
]
]
]),
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.steamgold.dev/v1/pouch/{pouchId}/checkout"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"comment\": \"<string>\",\n \"delivery\": {\n \"rates\": {\n \"tariff_code\": 123,\n \"tariff_name\": \"<string>\",\n \"tariff_description\": \"<string>\",\n \"delivery_mode\": 123,\n \"period_min\": 123,\n \"period_max\": 123,\n \"delivery_sum\": 123\n },\n \"address\": {\n \"name\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country_code\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": 123,\n \"type\": \"<string>\",\n \"have_cashless\": true,\n \"have_cash\": true,\n \"allowed_cod\": true,\n \"is_dressing_room\": true,\n \"code\": \"<string>\",\n \"address\": \"<string>\",\n \"work_time\": \"<string>\",\n \"location\": [\n 123\n ],\n \"position\": [\n 123\n ],\n \"kind\": \"<string>\",\n \"precision\": \"<string>\",\n \"formatted\": \"<string>\"\n }\n }\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.steamgold.dev/v1/pouch/{pouchId}/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"comment\": \"<string>\",\n \"delivery\": {\n \"rates\": {\n \"tariff_code\": 123,\n \"tariff_name\": \"<string>\",\n \"tariff_description\": \"<string>\",\n \"delivery_mode\": 123,\n \"period_min\": 123,\n \"period_max\": 123,\n \"delivery_sum\": 123\n },\n \"address\": {\n \"name\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country_code\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": 123,\n \"type\": \"<string>\",\n \"have_cashless\": true,\n \"have_cash\": true,\n \"allowed_cod\": true,\n \"is_dressing_room\": true,\n \"code\": \"<string>\",\n \"address\": \"<string>\",\n \"work_time\": \"<string>\",\n \"location\": [\n 123\n ],\n \"position\": [\n 123\n ],\n \"kind\": \"<string>\",\n \"precision\": \"<string>\",\n \"formatted\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.steamgold.dev/v1/pouch/{pouchId}/checkout")
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 \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"comment\": \"<string>\",\n \"delivery\": {\n \"rates\": {\n \"tariff_code\": 123,\n \"tariff_name\": \"<string>\",\n \"tariff_description\": \"<string>\",\n \"delivery_mode\": 123,\n \"period_min\": 123,\n \"period_max\": 123,\n \"delivery_sum\": 123\n },\n \"address\": {\n \"name\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country_code\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": 123,\n \"type\": \"<string>\",\n \"have_cashless\": true,\n \"have_cash\": true,\n \"allowed_cod\": true,\n \"is_dressing_room\": true,\n \"code\": \"<string>\",\n \"address\": \"<string>\",\n \"work_time\": \"<string>\",\n \"location\": [\n 123\n ],\n \"position\": [\n 123\n ],\n \"kind\": \"<string>\",\n \"precision\": \"<string>\",\n \"formatted\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"paymentId": "payment_12345",
"paymentUrl": "<string>",
"message": "Payment initiated"
}{
"code": 123,
"message": "<string>"
}API корзины
Выставление счета
Выставляет счет на оплату корзины (один счет на все намерения корзины)
POST
/
pouch
/
{pouchId}
/
checkout
cURL
curl --request POST \
--url https://api.steamgold.dev/v1/pouch/{pouchId}/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"name": "<string>",
"phone": "<string>",
"comment": "<string>",
"delivery": {
"rates": {
"tariff_code": 123,
"tariff_name": "<string>",
"tariff_description": "<string>",
"delivery_mode": 123,
"period_min": 123,
"period_max": 123,
"delivery_sum": 123
},
"address": {
"name": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"city": "<string>",
"city_code": 123,
"type": "<string>",
"have_cashless": true,
"have_cash": true,
"allowed_cod": true,
"is_dressing_room": true,
"code": "<string>",
"address": "<string>",
"work_time": "<string>",
"location": [
123
],
"position": [
123
],
"kind": "<string>",
"precision": "<string>",
"formatted": "<string>"
}
}
}
'import requests
url = "https://api.steamgold.dev/v1/pouch/{pouchId}/checkout"
payload = {
"email": "jsmith@example.com",
"name": "<string>",
"phone": "<string>",
"comment": "<string>",
"delivery": {
"rates": {
"tariff_code": 123,
"tariff_name": "<string>",
"tariff_description": "<string>",
"delivery_mode": 123,
"period_min": 123,
"period_max": 123,
"delivery_sum": 123
},
"address": {
"name": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"city": "<string>",
"city_code": 123,
"type": "<string>",
"have_cashless": True,
"have_cash": True,
"allowed_cod": True,
"is_dressing_room": True,
"code": "<string>",
"address": "<string>",
"work_time": "<string>",
"location": [123],
"position": [123],
"kind": "<string>",
"precision": "<string>",
"formatted": "<string>"
}
}
}
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({
email: 'jsmith@example.com',
name: '<string>',
phone: '<string>',
comment: '<string>',
delivery: {
rates: {
tariff_code: 123,
tariff_name: '<string>',
tariff_description: '<string>',
delivery_mode: 123,
period_min: 123,
period_max: 123,
delivery_sum: 123
},
address: {
name: '<string>',
postal_code: '<string>',
country_code: '<string>',
city: '<string>',
city_code: 123,
type: '<string>',
have_cashless: true,
have_cash: true,
allowed_cod: true,
is_dressing_room: true,
code: '<string>',
address: '<string>',
work_time: '<string>',
location: [123],
position: [123],
kind: '<string>',
precision: '<string>',
formatted: '<string>'
}
}
})
};
fetch('https://api.steamgold.dev/v1/pouch/{pouchId}/checkout', 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.steamgold.dev/v1/pouch/{pouchId}/checkout",
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([
'email' => 'jsmith@example.com',
'name' => '<string>',
'phone' => '<string>',
'comment' => '<string>',
'delivery' => [
'rates' => [
'tariff_code' => 123,
'tariff_name' => '<string>',
'tariff_description' => '<string>',
'delivery_mode' => 123,
'period_min' => 123,
'period_max' => 123,
'delivery_sum' => 123
],
'address' => [
'name' => '<string>',
'postal_code' => '<string>',
'country_code' => '<string>',
'city' => '<string>',
'city_code' => 123,
'type' => '<string>',
'have_cashless' => true,
'have_cash' => true,
'allowed_cod' => true,
'is_dressing_room' => true,
'code' => '<string>',
'address' => '<string>',
'work_time' => '<string>',
'location' => [
123
],
'position' => [
123
],
'kind' => '<string>',
'precision' => '<string>',
'formatted' => '<string>'
]
]
]),
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.steamgold.dev/v1/pouch/{pouchId}/checkout"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"comment\": \"<string>\",\n \"delivery\": {\n \"rates\": {\n \"tariff_code\": 123,\n \"tariff_name\": \"<string>\",\n \"tariff_description\": \"<string>\",\n \"delivery_mode\": 123,\n \"period_min\": 123,\n \"period_max\": 123,\n \"delivery_sum\": 123\n },\n \"address\": {\n \"name\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country_code\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": 123,\n \"type\": \"<string>\",\n \"have_cashless\": true,\n \"have_cash\": true,\n \"allowed_cod\": true,\n \"is_dressing_room\": true,\n \"code\": \"<string>\",\n \"address\": \"<string>\",\n \"work_time\": \"<string>\",\n \"location\": [\n 123\n ],\n \"position\": [\n 123\n ],\n \"kind\": \"<string>\",\n \"precision\": \"<string>\",\n \"formatted\": \"<string>\"\n }\n }\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.steamgold.dev/v1/pouch/{pouchId}/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"comment\": \"<string>\",\n \"delivery\": {\n \"rates\": {\n \"tariff_code\": 123,\n \"tariff_name\": \"<string>\",\n \"tariff_description\": \"<string>\",\n \"delivery_mode\": 123,\n \"period_min\": 123,\n \"period_max\": 123,\n \"delivery_sum\": 123\n },\n \"address\": {\n \"name\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country_code\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": 123,\n \"type\": \"<string>\",\n \"have_cashless\": true,\n \"have_cash\": true,\n \"allowed_cod\": true,\n \"is_dressing_room\": true,\n \"code\": \"<string>\",\n \"address\": \"<string>\",\n \"work_time\": \"<string>\",\n \"location\": [\n 123\n ],\n \"position\": [\n 123\n ],\n \"kind\": \"<string>\",\n \"precision\": \"<string>\",\n \"formatted\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.steamgold.dev/v1/pouch/{pouchId}/checkout")
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 \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"comment\": \"<string>\",\n \"delivery\": {\n \"rates\": {\n \"tariff_code\": 123,\n \"tariff_name\": \"<string>\",\n \"tariff_description\": \"<string>\",\n \"delivery_mode\": 123,\n \"period_min\": 123,\n \"period_max\": 123,\n \"delivery_sum\": 123\n },\n \"address\": {\n \"name\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country_code\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": 123,\n \"type\": \"<string>\",\n \"have_cashless\": true,\n \"have_cash\": true,\n \"allowed_cod\": true,\n \"is_dressing_room\": true,\n \"code\": \"<string>\",\n \"address\": \"<string>\",\n \"work_time\": \"<string>\",\n \"location\": [\n 123\n ],\n \"position\": [\n 123\n ],\n \"kind\": \"<string>\",\n \"precision\": \"<string>\",\n \"formatted\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"paymentId": "payment_12345",
"paymentUrl": "<string>",
"message": "Payment initiated"
}{
"code": 123,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID корзины
Body
application/json
⌘I