分期付款
获取分期付款计划
检索为特定账户配置的分期付款计划列表
GET
/
installments-plans
获取分期计划列表
curl --request GET \
--url https://api-sandbox.y.uno/v1/installments-plans \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/installments-plans"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/installments-plans', 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-sandbox.y.uno/v1/installments-plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-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"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/installments-plans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<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://api-sandbox.y.uno/v1/installments-plans")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/installments-plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "4d573425-33f9-4c46-b009-2c7e749b0ec7",
"name": "plan_007",
"account_id": [
"f7c5fe77-721b-49c2-84d3-957748df3c2c"
],
"merchant_reference": "Test",
"installments_plan": [
{
"installment": 1,
"rate": 1,
"provider_id": "",
"amount": {
"currency": "USD",
"value": "0",
"total_value": "0"
}
},
{
"installment": 3,
"rate": 1,
"provider_id": "",
"financial_costs": [
{
"type": "CFT",
"rate": 45.25,
"formatted_value": "45,25%"
},
{
"type": "TEA",
"rate": 38.5,
"formatted_value": "38,50%"
}
],
"amount": {
"currency": "USD",
"value": "0",
"total_value": "0"
}
},
{
"installment": 6,
"rate": 1,
"provider_id": "",
"amount": {
"currency": "USD",
"value": "0",
"total_value": "0"
}
},
{
"installment": 9,
"rate": 1,
"provider_id": "",
"amount": {
"currency": "USD",
"value": "0",
"total_value": "0"
}
},
{
"installment": 12,
"rate": 1,
"provider_id": "",
"amount": {
"currency": "USD",
"value": "0",
"total_value": "0"
}
}
],
"iin": null,
"country_code": "US",
"first_installment_deferral": 0,
"amount": {
"currency": "USD",
"min_value": 0,
"max_value": 100000000
},
"availability": {
"start_at": "2023-09-12T00:00:00Z",
"finish_at": "2030-09-20T00:00:00Z"
},
"created_at": "2023-10-11T17:52:31.886178Z",
"updated_at": "2023-10-11T17:52:31.886178Z",
"payment_method_type": "NU_PAY_ENROLLMENT"
}
]{
"code": "INVALID_REQUEST",
"messages": [
"Invalid request"
]
}Get Installments Plan API 用于检索与特定账户关联的分期付款计划列表。此 endpoint 可帮助您查看与某个账户关联的所有可用计划,包括其分期选项、限额和可用期。
使用此 API 获取特定账户 ID 下所有可用的分期付款计划。
此页面对您有帮助吗?
⌘I
获取分期计划列表
curl --request GET \
--url https://api-sandbox.y.uno/v1/installments-plans \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/installments-plans"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/installments-plans', 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-sandbox.y.uno/v1/installments-plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-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"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/installments-plans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<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://api-sandbox.y.uno/v1/installments-plans")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/installments-plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "4d573425-33f9-4c46-b009-2c7e749b0ec7",
"name": "plan_007",
"account_id": [
"f7c5fe77-721b-49c2-84d3-957748df3c2c"
],
"merchant_reference": "Test",
"installments_plan": [
{
"installment": 1,
"rate": 1,
"provider_id": "",
"amount": {
"currency": "USD",
"value": "0",
"total_value": "0"
}
},
{
"installment": 3,
"rate": 1,
"provider_id": "",
"financial_costs": [
{
"type": "CFT",
"rate": 45.25,
"formatted_value": "45,25%"
},
{
"type": "TEA",
"rate": 38.5,
"formatted_value": "38,50%"
}
],
"amount": {
"currency": "USD",
"value": "0",
"total_value": "0"
}
},
{
"installment": 6,
"rate": 1,
"provider_id": "",
"amount": {
"currency": "USD",
"value": "0",
"total_value": "0"
}
},
{
"installment": 9,
"rate": 1,
"provider_id": "",
"amount": {
"currency": "USD",
"value": "0",
"total_value": "0"
}
},
{
"installment": 12,
"rate": 1,
"provider_id": "",
"amount": {
"currency": "USD",
"value": "0",
"total_value": "0"
}
}
],
"iin": null,
"country_code": "US",
"first_installment_deferral": 0,
"amount": {
"currency": "USD",
"min_value": 0,
"max_value": 100000000
},
"availability": {
"start_at": "2023-09-12T00:00:00Z",
"finish_at": "2030-09-20T00:00:00Z"
},
"created_at": "2023-10-11T17:52:31.886178Z",
"updated_at": "2023-10-11T17:52:31.886178Z",
"payment_method_type": "NU_PAY_ENROLLMENT"
}
]{
"code": "INVALID_REQUEST",
"messages": [
"Invalid request"
]
}