discount_payload = {
"id": "discount_2", #할인 아이디
"partnerShareRate": 50000, # 10^5기준, 50% 분담
"memo": "테스트 할인"
}
headers = {
'Authorization': f'PortOne ${PORTONE_API_SECRET}',
'Content-Type': 'application/json'
}
discount_A = requests.post('https://api.portone.io/platform/discount-share-policies', headers=headers, json=discount_payload)
const axios = require("axios");
const discount_payload = {
id: "discount_2", //할인 아이디
partnerShareRate: 50000, // 10^5기준, 50% 분담
memo: "테스트 할인",
};
axios
.post(
"https://api.portone.io/platform/discount-share-policies",
discount_payload,
{
headers: {
"Content-Type": "application/json",
Authorization: `PortOne ${PORTONE_API_SECRET}`,
},
},
)
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.error("Error:", error.response.data);
});