청구서 생성
curl --request POST \
--url https://api.steppay.kr/api/v1/invoices \
--header 'Content-Type: application/json' \
--header 'Secret-Token: <api-key>' \
--data '
{
"customerId": 1,
"items": [
{
"productCode": "<string>",
"priceCode": "<string>",
"minimumQuantity": 123,
"maximumQuantity": 123,
"productName": "<string>",
"price": 123
}
],
"publishType": "NOW",
"publishMethods": [],
"invoicePayMethods": [],
"discount": 0,
"purchaseDeadline": "2023-11-07T05:31:56Z",
"reservationAt": "2023-11-07T05:31:56Z",
"instantAmount": 1,
"memoToCustomer": "<string>",
"currency": "<string>"
}
'import requests
url = "https://api.steppay.kr/api/v1/invoices"
payload = {
"customerId": 1,
"items": [
{
"productCode": "<string>",
"priceCode": "<string>",
"minimumQuantity": 123,
"maximumQuantity": 123,
"productName": "<string>",
"price": 123
}
],
"publishType": "NOW",
"publishMethods": [],
"invoicePayMethods": [],
"discount": 0,
"purchaseDeadline": "2023-11-07T05:31:56Z",
"reservationAt": "2023-11-07T05:31:56Z",
"instantAmount": 1,
"memoToCustomer": "<string>",
"currency": "<string>"
}
headers = {
"Secret-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Secret-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: 1,
items: [
{
productCode: '<string>',
priceCode: '<string>',
minimumQuantity: 123,
maximumQuantity: 123,
productName: '<string>',
price: 123
}
],
publishType: 'NOW',
publishMethods: [],
invoicePayMethods: [],
discount: 0,
purchaseDeadline: '2023-11-07T05:31:56Z',
reservationAt: '2023-11-07T05:31:56Z',
instantAmount: 1,
memoToCustomer: '<string>',
currency: '<string>'
})
};
fetch('https://api.steppay.kr/api/v1/invoices', 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.steppay.kr/api/v1/invoices",
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([
'customerId' => 1,
'items' => [
[
'productCode' => '<string>',
'priceCode' => '<string>',
'minimumQuantity' => 123,
'maximumQuantity' => 123,
'productName' => '<string>',
'price' => 123
]
],
'publishType' => 'NOW',
'publishMethods' => [
],
'invoicePayMethods' => [
],
'discount' => 0,
'purchaseDeadline' => '2023-11-07T05:31:56Z',
'reservationAt' => '2023-11-07T05:31:56Z',
'instantAmount' => 1,
'memoToCustomer' => '<string>',
'currency' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Secret-Token: <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://api.steppay.kr/api/v1/invoices"
payload := strings.NewReader("{\n \"customerId\": 1,\n \"items\": [\n {\n \"productCode\": \"<string>\",\n \"priceCode\": \"<string>\",\n \"minimumQuantity\": 123,\n \"maximumQuantity\": 123,\n \"productName\": \"<string>\",\n \"price\": 123\n }\n ],\n \"publishType\": \"NOW\",\n \"publishMethods\": [],\n \"invoicePayMethods\": [],\n \"discount\": 0,\n \"purchaseDeadline\": \"2023-11-07T05:31:56Z\",\n \"reservationAt\": \"2023-11-07T05:31:56Z\",\n \"instantAmount\": 1,\n \"memoToCustomer\": \"<string>\",\n \"currency\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Secret-Token", "<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://api.steppay.kr/api/v1/invoices")
.header("Secret-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": 1,\n \"items\": [\n {\n \"productCode\": \"<string>\",\n \"priceCode\": \"<string>\",\n \"minimumQuantity\": 123,\n \"maximumQuantity\": 123,\n \"productName\": \"<string>\",\n \"price\": 123\n }\n ],\n \"publishType\": \"NOW\",\n \"publishMethods\": [],\n \"invoicePayMethods\": [],\n \"discount\": 0,\n \"purchaseDeadline\": \"2023-11-07T05:31:56Z\",\n \"reservationAt\": \"2023-11-07T05:31:56Z\",\n \"instantAmount\": 1,\n \"memoToCustomer\": \"<string>\",\n \"currency\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.steppay.kr/api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Secret-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": 1,\n \"items\": [\n {\n \"productCode\": \"<string>\",\n \"priceCode\": \"<string>\",\n \"minimumQuantity\": 123,\n \"maximumQuantity\": 123,\n \"productName\": \"<string>\",\n \"price\": 123\n }\n ],\n \"publishType\": \"NOW\",\n \"publishMethods\": [],\n \"invoicePayMethods\": [],\n \"discount\": 0,\n \"purchaseDeadline\": \"2023-11-07T05:31:56Z\",\n \"reservationAt\": \"2023-11-07T05:31:56Z\",\n \"instantAmount\": 1,\n \"memoToCustomer\": \"<string>\",\n \"currency\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}청구서 API
청구서 생성
청구서를 생성할 때 호출합니다.
POST
/
api
/
v1
/
invoices
청구서 생성
curl --request POST \
--url https://api.steppay.kr/api/v1/invoices \
--header 'Content-Type: application/json' \
--header 'Secret-Token: <api-key>' \
--data '
{
"customerId": 1,
"items": [
{
"productCode": "<string>",
"priceCode": "<string>",
"minimumQuantity": 123,
"maximumQuantity": 123,
"productName": "<string>",
"price": 123
}
],
"publishType": "NOW",
"publishMethods": [],
"invoicePayMethods": [],
"discount": 0,
"purchaseDeadline": "2023-11-07T05:31:56Z",
"reservationAt": "2023-11-07T05:31:56Z",
"instantAmount": 1,
"memoToCustomer": "<string>",
"currency": "<string>"
}
'import requests
url = "https://api.steppay.kr/api/v1/invoices"
payload = {
"customerId": 1,
"items": [
{
"productCode": "<string>",
"priceCode": "<string>",
"minimumQuantity": 123,
"maximumQuantity": 123,
"productName": "<string>",
"price": 123
}
],
"publishType": "NOW",
"publishMethods": [],
"invoicePayMethods": [],
"discount": 0,
"purchaseDeadline": "2023-11-07T05:31:56Z",
"reservationAt": "2023-11-07T05:31:56Z",
"instantAmount": 1,
"memoToCustomer": "<string>",
"currency": "<string>"
}
headers = {
"Secret-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Secret-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: 1,
items: [
{
productCode: '<string>',
priceCode: '<string>',
minimumQuantity: 123,
maximumQuantity: 123,
productName: '<string>',
price: 123
}
],
publishType: 'NOW',
publishMethods: [],
invoicePayMethods: [],
discount: 0,
purchaseDeadline: '2023-11-07T05:31:56Z',
reservationAt: '2023-11-07T05:31:56Z',
instantAmount: 1,
memoToCustomer: '<string>',
currency: '<string>'
})
};
fetch('https://api.steppay.kr/api/v1/invoices', 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.steppay.kr/api/v1/invoices",
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([
'customerId' => 1,
'items' => [
[
'productCode' => '<string>',
'priceCode' => '<string>',
'minimumQuantity' => 123,
'maximumQuantity' => 123,
'productName' => '<string>',
'price' => 123
]
],
'publishType' => 'NOW',
'publishMethods' => [
],
'invoicePayMethods' => [
],
'discount' => 0,
'purchaseDeadline' => '2023-11-07T05:31:56Z',
'reservationAt' => '2023-11-07T05:31:56Z',
'instantAmount' => 1,
'memoToCustomer' => '<string>',
'currency' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Secret-Token: <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://api.steppay.kr/api/v1/invoices"
payload := strings.NewReader("{\n \"customerId\": 1,\n \"items\": [\n {\n \"productCode\": \"<string>\",\n \"priceCode\": \"<string>\",\n \"minimumQuantity\": 123,\n \"maximumQuantity\": 123,\n \"productName\": \"<string>\",\n \"price\": 123\n }\n ],\n \"publishType\": \"NOW\",\n \"publishMethods\": [],\n \"invoicePayMethods\": [],\n \"discount\": 0,\n \"purchaseDeadline\": \"2023-11-07T05:31:56Z\",\n \"reservationAt\": \"2023-11-07T05:31:56Z\",\n \"instantAmount\": 1,\n \"memoToCustomer\": \"<string>\",\n \"currency\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Secret-Token", "<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://api.steppay.kr/api/v1/invoices")
.header("Secret-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": 1,\n \"items\": [\n {\n \"productCode\": \"<string>\",\n \"priceCode\": \"<string>\",\n \"minimumQuantity\": 123,\n \"maximumQuantity\": 123,\n \"productName\": \"<string>\",\n \"price\": 123\n }\n ],\n \"publishType\": \"NOW\",\n \"publishMethods\": [],\n \"invoicePayMethods\": [],\n \"discount\": 0,\n \"purchaseDeadline\": \"2023-11-07T05:31:56Z\",\n \"reservationAt\": \"2023-11-07T05:31:56Z\",\n \"instantAmount\": 1,\n \"memoToCustomer\": \"<string>\",\n \"currency\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.steppay.kr/api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Secret-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": 1,\n \"items\": [\n {\n \"productCode\": \"<string>\",\n \"priceCode\": \"<string>\",\n \"minimumQuantity\": 123,\n \"maximumQuantity\": 123,\n \"productName\": \"<string>\",\n \"price\": 123\n }\n ],\n \"publishType\": \"NOW\",\n \"publishMethods\": [],\n \"invoicePayMethods\": [],\n \"discount\": 0,\n \"purchaseDeadline\": \"2023-11-07T05:31:56Z\",\n \"reservationAt\": \"2023-11-07T05:31:56Z\",\n \"instantAmount\": 1,\n \"memoToCustomer\": \"<string>\",\n \"currency\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}Authorizations
Query Parameters
임시 저장 여부. 임시 저장은 청구서가 발송되지 않습니다.
Body
application/json
청구서 생성 데이터
청구서를 받을 고객 번호
Required range:
x >= 0청구 상품 및 가격플랜 목록
Show child attributes
Show child attributes
청구서 발행 타입
Available options:
NOW, RESERVATION 사용할 발송 수단 목록
사용할 발송 수단 목록
Available options:
KAKAO, SMS, EMAIL 지정 결제 수단
지정 결제 수단
Available options:
CARD, VBANK, BANK, BANK_TRANSFER, CELLPHONE, SIMPLE_PAY, CMS, CARD_BILL, CELLPHONE_BILL, CMS_BILL, PAYPAL 할인 금액
Required range:
x > 0결제 화면에서 결제 할 수 있는 PG사를 고정합니다.
Available options:
NAVER, DANAL, KAKAO, KG, KCP, NICE, JT, GOOGLE, BANKPAY, BLUEWALNUT, KSNET, TOSS, EXIMBAY, SETTLE, DAOUDATA, WELCOME, NICE_V2, STRIPE, PAYPLE, PAYPLE_GLOBAL, KICC, EMPTY, STEPPAY, UNKNOWN 결제 링크 유효 기간을 나타냅니다. ISO 8601 형식
발송 시간을 나타냅니다. ISO 8601 형식
청구서 즉시 결제
Required range:
x > 0청구서 메모
청구서 판매 Region
Available options:
AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, US_ALABAMA, US_ALASKA, US_ARIZONA, US_ARKANSAS, US_CALIFORNIA, US_COLORADO, US_CONNECTICUT, US_DELAWARE, US_FLORIDA, US_GEORGIA, US_HAWAII, US_IDAHO, US_ILLINOIS, US_INDIANA, US_IOWA, US_KANSAS, US_KENTUCKY, US_LOUISIANA, US_MAINE, US_MARYLAND, US_MASSACHUSETTS, US_MICHIGAN, US_MINNESOTA, US_MISSISSIPPI, US_MISSOURI, US_MONTANA, US_NEBRASKA, US_NEVADA, US_NEW_HAMPSHIRE, US_NEW_JERSEY, US_NEW_MEXICO, US_NEW_YORK, US_NORTH_CAROLINA, US_NORTH_DAKOTA, US_OHIO, US_OKLAHOMA, US_OREGON, US_PENNSYLVANIA, US_RHODE_ISLAND, US_SOUTH_CAROLINA, US_SOUTH_DAKOTA, US_TENNESSEE, US_TEXAS, US_UTAH, US_VERMONT, US_VIRGINIA, US_WASHINGTON, US_WEST_VIRGINIA, US_WISCONSIN, US_WYOMING, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW 청구서 승인 통화
Response
정상적으로 생성됨
청구서 번호