400 Bad Request 에러 문의

안녕하세요. 온라인결제 API 테스트 중에 400 Bad Request 에러가 떠서 문의 드립니다.

import org.springframework.http.HttpHeaders;
import java.util.LinkedHashMap;
import java.util.Map;
import org.springframework.http.HttpEntity;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

@Controller
public class PayController {
    
    String SECRET_KEY = ""; // 시크릿 키(Secret key(dev)) 입력
    String auth = "SECRET_KEY " + SECRET_KEY;
    @PostMapping("/payready")
    @ResponseBody
    public String createPayment() {
    	ObjectMapper objectMapper = new ObjectMapper();
        
        String apiUrl = "https://open-api.kakaopay.com/online/v1/payment/ready";

        HttpHeaders headers = new HttpHeaders();
        headers.set("Content-type","application/json");
        headers.set("Authorization", auth);
        
        Map<String, Object> requestBodyMap = new LinkedHashMap<>();
        requestBodyMap.put("cid", "TC0ONETIME");
        requestBodyMap.put("partner_order_id", "kor240401");
        requestBodyMap.put("partner_user_id", "qweqwe");
        requestBodyMap.put("item_name", "초코파이");
        requestBodyMap.put("quantity", 1);
        requestBodyMap.put("total_amount", 10000);
        requestBodyMap.put("vat_amount", 200);
        requestBodyMap.put("tax_free_amount", 0);
        requestBodyMap.put("approval_url", "https://developers.kakao.com/success");
        requestBodyMap.put("fail_url", "https://developers.kakao.com/fail");
        requestBodyMap.put("cancel_url", "https://developers.kakao.com/cancel");

        String requestBody;
        try {
            requestBody = objectMapper.writeValueAsString(requestBodyMap);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
            return "JSON 변환에 실패했습니다.";
        }
        
        HttpEntity<String> requestEntity = new HttpEntity<>(requestBody, headers);

        RestTemplate restTemplate = new RestTemplate();
        ResponseEntity<String> response = restTemplate.postForEntity(apiUrl, requestEntity, String.class);

        if (response.getStatusCode().is2xxSuccessful()) {
            return response.getBody(); // 카카오페이 서버에서 반환된 JSON 응답을 그대로 클라이언트에 반환
        } else {
            return "결제 생성에 실패했습니다.";
        }
    }
}

스프링에서 위 코드대로 썼는데 400 Bad Request 에러가 나서 문의 드렸습니다.
답변 부탁 드리겠습니다.

안녕하세요. 카카오페이입니다.
response body 전체를 알려주셔야 할것 같습니다.(오류코드, 오류메세지 포함)
CID를 TC0ONETIME으로 진행하셨다면 SECRET_KEY(dev)를 사용해주셔야합니다.
정확한 확인을 위해 호출하신 시크릿키 공유주시면 내부 유입값 확인 안내드리도록 하겠습니다.
만약 운영 SECRET_KEY와 운영CID로 진행하셨다면 주문번호 (partner_order_id)를 유니크하게 생성하여 공유부탁드립니다.
감사합니다.