List payment method types
curl --request GET \
--url https://app.zenedu.io/api/v1/payment-systems/types \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.zenedu.io/api/v1/payment-systems/types"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.zenedu.io/api/v1/payment-systems/types', 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://app.zenedu.io/api/v1/payment-systems/types",
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: Bearer <token>"
],
]);
$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://app.zenedu.io/api/v1/payment-systems/types"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.zenedu.io/api/v1/payment-systems/types")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.zenedu.io/api/v1/payment-systems/types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"type": "<string>",
"name": "<string>",
"settings": [
"<string>"
],
"supports_subscription": true
}
]
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}Способи оплати
Список типів способів оплати
Повертає типи способів оплати і налаштування, які приймає кожен
GET
/
api
/
v1
/
payment-systems
/
types
List payment method types
curl --request GET \
--url https://app.zenedu.io/api/v1/payment-systems/types \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.zenedu.io/api/v1/payment-systems/types"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.zenedu.io/api/v1/payment-systems/types', 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://app.zenedu.io/api/v1/payment-systems/types",
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: Bearer <token>"
],
]);
$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://app.zenedu.io/api/v1/payment-systems/types"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.zenedu.io/api/v1/payment-systems/types")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.zenedu.io/api/v1/payment-systems/types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"type": "<string>",
"name": "<string>",
"settings": [
"<string>"
],
"supports_subscription": true
}
]
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}Повертає всі типи способів оплати із ключами
settings, які приймає кожен. Код type використовуйте під час створення способу оплати.
Для stripe параметри settings.automatic_tax і settings.collect_billing_address — незалежні необов’язкові логічні значення, за замовчуванням обидва вимкнені. Податок додається зверху вартості. Наявні підписки зберігають попередні умови. Адреса доступна в деталях замовлення та експорті замовлень, але не в профілі підписника. Перед увімкненням автоматичного податку налаштуйте Stripe Tax і податкові реєстрації у Stripe. Зміна цих параметрів не створює вебхук Stripe повторно; під час оновлення пропущені ключі зберігають свої значення.