주문 정보 등록 API
curl --request POST \
--url https://api.steppay.kr/api/v1/cover/order \
--header 'Content-Type: application/json' \
--header 'Secret-Token: <api-key>' \
--data '
{
"customerId": 123,
"amount": 123,
"amountReturned": 123,
"items": [
{
"quantity": 123,
"priceId": 123
}
],
"replaceIfExists": true,
"partnerOrderId": "<string>",
"paymentDate": "2023-11-07T05:31:56Z",
"idKey": "<string>",
"canceledDate": "2023-11-07T05:31:56Z",
"subscriptionId": 123,
"paymentInfo": "<string>",
"paymentFailed": true,
"errorCode": "<string>",
"errorMessage": "<string>"
}
'import requests
url = "https://api.steppay.kr/api/v1/cover/order"
payload = {
"customerId": 123,
"amount": 123,
"amountReturned": 123,
"items": [
{
"quantity": 123,
"priceId": 123
}
],
"replaceIfExists": True,
"partnerOrderId": "<string>",
"paymentDate": "2023-11-07T05:31:56Z",
"idKey": "<string>",
"canceledDate": "2023-11-07T05:31:56Z",
"subscriptionId": 123,
"paymentInfo": "<string>",
"paymentFailed": True,
"errorCode": "<string>",
"errorMessage": "<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: 123,
amount: 123,
amountReturned: 123,
items: [{quantity: 123, priceId: 123}],
replaceIfExists: true,
partnerOrderId: '<string>',
paymentDate: '2023-11-07T05:31:56Z',
idKey: '<string>',
canceledDate: '2023-11-07T05:31:56Z',
subscriptionId: 123,
paymentInfo: '<string>',
paymentFailed: true,
errorCode: '<string>',
errorMessage: '<string>'
})
};
fetch('https://api.steppay.kr/api/v1/cover/order', 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/cover/order",
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' => 123,
'amount' => 123,
'amountReturned' => 123,
'items' => [
[
'quantity' => 123,
'priceId' => 123
]
],
'replaceIfExists' => true,
'partnerOrderId' => '<string>',
'paymentDate' => '2023-11-07T05:31:56Z',
'idKey' => '<string>',
'canceledDate' => '2023-11-07T05:31:56Z',
'subscriptionId' => 123,
'paymentInfo' => '<string>',
'paymentFailed' => true,
'errorCode' => '<string>',
'errorMessage' => '<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/cover/order"
payload := strings.NewReader("{\n \"customerId\": 123,\n \"amount\": 123,\n \"amountReturned\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"priceId\": 123\n }\n ],\n \"replaceIfExists\": true,\n \"partnerOrderId\": \"<string>\",\n \"paymentDate\": \"2023-11-07T05:31:56Z\",\n \"idKey\": \"<string>\",\n \"canceledDate\": \"2023-11-07T05:31:56Z\",\n \"subscriptionId\": 123,\n \"paymentInfo\": \"<string>\",\n \"paymentFailed\": true,\n \"errorCode\": \"<string>\",\n \"errorMessage\": \"<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/cover/order")
.header("Secret-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": 123,\n \"amount\": 123,\n \"amountReturned\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"priceId\": 123\n }\n ],\n \"replaceIfExists\": true,\n \"partnerOrderId\": \"<string>\",\n \"paymentDate\": \"2023-11-07T05:31:56Z\",\n \"idKey\": \"<string>\",\n \"canceledDate\": \"2023-11-07T05:31:56Z\",\n \"subscriptionId\": 123,\n \"paymentInfo\": \"<string>\",\n \"paymentFailed\": true,\n \"errorCode\": \"<string>\",\n \"errorMessage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.steppay.kr/api/v1/cover/order")
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\": 123,\n \"amount\": 123,\n \"amountReturned\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"priceId\": 123\n }\n ],\n \"replaceIfExists\": true,\n \"partnerOrderId\": \"<string>\",\n \"paymentDate\": \"2023-11-07T05:31:56Z\",\n \"idKey\": \"<string>\",\n \"canceledDate\": \"2023-11-07T05:31:56Z\",\n \"subscriptionId\": 123,\n \"paymentInfo\": \"<string>\",\n \"paymentFailed\": true,\n \"errorCode\": \"<string>\",\n \"errorMessage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"customer": {
"id": 123,
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"partnerCustomerId": "<string>"
},
"amount": 123,
"amountReturned": 123,
"items": [
{
"quantity": 123,
"price": {
"id": 123,
"name": "<string>",
"partnerPriceId": "<string>",
"product": {
"id": 123,
"name": "<string>",
"partnerProductId": "<string>",
"featuredImageUrl": "<string>"
},
"price": 123,
"isRecurring": true,
"recurringIntervalCount": 123
}
}
],
"partnerOrderId": "<string>",
"canceledDate": "2023-11-07T05:31:56Z",
"paymentDate": "2023-11-07T05:31:56Z",
"idKey": "<string>",
"retryDate": "2023-11-07T05:31:56Z"
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}커버 API
주문 정보 등록 API
주문 정보를 스텝커버에 등록할 때 사용합니다.
POST
/
api
/
v1
/
cover
/
order
주문 정보 등록 API
curl --request POST \
--url https://api.steppay.kr/api/v1/cover/order \
--header 'Content-Type: application/json' \
--header 'Secret-Token: <api-key>' \
--data '
{
"customerId": 123,
"amount": 123,
"amountReturned": 123,
"items": [
{
"quantity": 123,
"priceId": 123
}
],
"replaceIfExists": true,
"partnerOrderId": "<string>",
"paymentDate": "2023-11-07T05:31:56Z",
"idKey": "<string>",
"canceledDate": "2023-11-07T05:31:56Z",
"subscriptionId": 123,
"paymentInfo": "<string>",
"paymentFailed": true,
"errorCode": "<string>",
"errorMessage": "<string>"
}
'import requests
url = "https://api.steppay.kr/api/v1/cover/order"
payload = {
"customerId": 123,
"amount": 123,
"amountReturned": 123,
"items": [
{
"quantity": 123,
"priceId": 123
}
],
"replaceIfExists": True,
"partnerOrderId": "<string>",
"paymentDate": "2023-11-07T05:31:56Z",
"idKey": "<string>",
"canceledDate": "2023-11-07T05:31:56Z",
"subscriptionId": 123,
"paymentInfo": "<string>",
"paymentFailed": True,
"errorCode": "<string>",
"errorMessage": "<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: 123,
amount: 123,
amountReturned: 123,
items: [{quantity: 123, priceId: 123}],
replaceIfExists: true,
partnerOrderId: '<string>',
paymentDate: '2023-11-07T05:31:56Z',
idKey: '<string>',
canceledDate: '2023-11-07T05:31:56Z',
subscriptionId: 123,
paymentInfo: '<string>',
paymentFailed: true,
errorCode: '<string>',
errorMessage: '<string>'
})
};
fetch('https://api.steppay.kr/api/v1/cover/order', 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/cover/order",
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' => 123,
'amount' => 123,
'amountReturned' => 123,
'items' => [
[
'quantity' => 123,
'priceId' => 123
]
],
'replaceIfExists' => true,
'partnerOrderId' => '<string>',
'paymentDate' => '2023-11-07T05:31:56Z',
'idKey' => '<string>',
'canceledDate' => '2023-11-07T05:31:56Z',
'subscriptionId' => 123,
'paymentInfo' => '<string>',
'paymentFailed' => true,
'errorCode' => '<string>',
'errorMessage' => '<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/cover/order"
payload := strings.NewReader("{\n \"customerId\": 123,\n \"amount\": 123,\n \"amountReturned\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"priceId\": 123\n }\n ],\n \"replaceIfExists\": true,\n \"partnerOrderId\": \"<string>\",\n \"paymentDate\": \"2023-11-07T05:31:56Z\",\n \"idKey\": \"<string>\",\n \"canceledDate\": \"2023-11-07T05:31:56Z\",\n \"subscriptionId\": 123,\n \"paymentInfo\": \"<string>\",\n \"paymentFailed\": true,\n \"errorCode\": \"<string>\",\n \"errorMessage\": \"<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/cover/order")
.header("Secret-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": 123,\n \"amount\": 123,\n \"amountReturned\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"priceId\": 123\n }\n ],\n \"replaceIfExists\": true,\n \"partnerOrderId\": \"<string>\",\n \"paymentDate\": \"2023-11-07T05:31:56Z\",\n \"idKey\": \"<string>\",\n \"canceledDate\": \"2023-11-07T05:31:56Z\",\n \"subscriptionId\": 123,\n \"paymentInfo\": \"<string>\",\n \"paymentFailed\": true,\n \"errorCode\": \"<string>\",\n \"errorMessage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.steppay.kr/api/v1/cover/order")
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\": 123,\n \"amount\": 123,\n \"amountReturned\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"priceId\": 123\n }\n ],\n \"replaceIfExists\": true,\n \"partnerOrderId\": \"<string>\",\n \"paymentDate\": \"2023-11-07T05:31:56Z\",\n \"idKey\": \"<string>\",\n \"canceledDate\": \"2023-11-07T05:31:56Z\",\n \"subscriptionId\": 123,\n \"paymentInfo\": \"<string>\",\n \"paymentFailed\": true,\n \"errorCode\": \"<string>\",\n \"errorMessage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"customer": {
"id": 123,
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"partnerCustomerId": "<string>"
},
"amount": 123,
"amountReturned": 123,
"items": [
{
"quantity": 123,
"price": {
"id": 123,
"name": "<string>",
"partnerPriceId": "<string>",
"product": {
"id": 123,
"name": "<string>",
"partnerProductId": "<string>",
"featuredImageUrl": "<string>"
},
"price": 123,
"isRecurring": true,
"recurringIntervalCount": 123
}
}
],
"partnerOrderId": "<string>",
"canceledDate": "2023-11-07T05:31:56Z",
"paymentDate": "2023-11-07T05:31:56Z",
"idKey": "<string>",
"retryDate": "2023-11-07T05:31:56Z"
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}Authorizations
Body
application/json
주문 생성 데이터
고객 ID
주문 금액
환불된 금액
주문 항목
Show child attributes
Show child attributes
partnerOrderId가 이미 존재할 때 replaceIfExists가 true 이면 값을 수정하고, false 이면 exception 이 발생합니다.
결제 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 가맹점에서 사용하는 주문의 unique ID
결제일
스텝페이 결제 ID
취소 날짜
연관된 구독 ID
결제 정보(카드사, 카드번호 등)
주문 등록과 함께 시나리오가 실행되게 하려면 true 입력
PG사에서 받은 에러 코드(paymentFailed가 true일 때)
PG사에서 받은 에러 메세지(paymentFailed가 true일 때)
Response
주문 정보가 정상적으로 등록됨
주문 ID - 다른 API 호출에 사용되므로 해당 주문 정보와 함께 저장해놓고 사용하세요.
고객 정보
Show child attributes
Show child attributes
주문 금액
환불 금액
주문 항목
Show child attributes
Show child attributes
주문 상태
Available options:
CREATED, PAID, CANCEL_REQ, CANCELED, CHANGE_REQ, CHANGE_PROCESS, CHANGED, RETURN_REQ, RETURN_PROCESS, RETURNED, PREPARING, SHIPPING, FULFILLED, FULL_REFUND, PARTIAL_REFUND, PAYMENT_FAILURE 가맹점에서 사용하는 주문의 unique ID
주문 취소 시점
주문 결제 시점
스텝페이 주문 idKey
다음 결제 시도 시점 - 시나리오에 의해서 계산된 시점입니다. 해당 시점에 다시 결제를 시도해주세요(실패 주문을 생성했을 때 포함됩니다).
⌘I