charge.ts 715 B

12345678910111213141516171819202122232425
  1. // 토스페이먼츠 V2 충전 응답 타입
  2. export type TossCreateOrderResponse = {
  3. orderID: string;
  4. orderName: string;
  5. /** VAT 포함 최종 결제 금액 (정수) */
  6. amount: number;
  7. /** 충전되는 캐시 (VAT 제외) */
  8. pointAmount: number;
  9. /** 부가세 (10%) */
  10. vatAmount: number;
  11. clientKey: string;
  12. /** 회원별 UUID — widgets({ customerKey }) 초기화에 사용 */
  13. customerKey: string;
  14. };
  15. export type TossConfirmResponse = {
  16. success: boolean;
  17. /** PaymentOrder.Status 문자열 (Paid / WaitingDeposit / Failed / NeedsReconciliation ...) */
  18. status: string;
  19. /** 충전된 캐시 (가상계좌 입금 대기 시 0) */
  20. pointAmount: number;
  21. message: string|null;
  22. paidAt: string|null;
  23. };