import { IParticipantAsWebApplication, IParticipantAsPerson, IParticipantAsSeller, IAction as IBaseAction } from '../../../action'; import { AvailablePaymentMethodType, IMovieTicket } from '../../../action/trade/pay'; import { ActionType } from '../../../actionType'; import { ICreditCard, IFromLocation, IInvoiceReferenceOrder, ITokenizedPaymentCard } from '../../../assetTransaction/pay'; import { AssetTransactionType } from '../../../assetTransactionType'; import { IOrderPaymentMethodIssuedThrough, ITotalPaymentDue } from '../../../order'; import { PaymentStatusType } from '../../../paymentStatusType'; import { IPropertyValue } from '../../../propertyValue'; import { IPermitAsServiceOutput } from '../../../service/paymentService'; import { TransactionType } from '../../../transactionType'; import { IAttributes as IBaseAttributes } from '../../authorize'; export type IAgent = IParticipantAsWebApplication | IParticipantAsPerson; export type IRecipient = IParticipantAsSeller; export declare enum ResultType { Payment = "Payment" } export { ICreditCard, IFromLocation, ITokenizedPaymentCard }; export interface IObjectIncludingPaymentMethodDetails { /** * The identifier for the account the payment will be applied to. * MovieTicket->購入管理番号 * PaymentCard->カード識別子 * その他->空文字 */ accountId: string; /** * 追加特性 */ additionalProperty?: IPropertyValue[]; /** * The amount of money. * MovieTicket->固定で0指定(金額として0) * その他->決済金額 */ amount: number; /** * 説明 * PaymentCardのみ対応 */ description?: string; /** * 決済方法名称 * 指定すると注文の決済方法名称へ連携 */ name?: string; /** * 決済方法区分 */ paymentMethod: AvailablePaymentMethodType; /** * 決済方法ID */ paymentMethodId: string; typeOf: ResultType; issuedThrough: { /** * 発行決済サービスID */ id: string; }; /** * 転送元(PaymentCard決済) */ fromLocation?: IFromLocation; /** * 支払い方法(CreditCard決済) */ method?: string; /** * クレジットカード情報(CreditCard決済) */ creditCard?: ICreditCard; /** * (MovieTicket決済) */ movieTickets?: IMovieTicket[]; /** * 決済方法チケット * 当初はメンバーシップチケットとして使用(2024-08-13~) * メンバーシップチケットに限らず、承認前に発行された決済方法チケットを指定すると、paymentMethodIdはチケットに依存する */ ticketToken?: string; referencesOrder: IInvoiceReferenceOrder; } export type IAuthorizeAnyPaymentObject = Pick & { creditCard?: never; method?: never; movieTickets?: never; paymentMethodId?: never; fromLocation?: never; description?: never; referencesOrder?: never; }; export type IAuthorizeCreditCardObject = Pick & { /** * 決済URL発行の場合、発行済のpaymentMethodIdを指定 */ paymentMethodId?: string; /** * 関連注文 * 指定すると、注文取引確定時にアイテムの整合性が検証される */ referencesOrder?: IInvoiceReferenceOrder; movieTickets?: never; fromLocation?: never; description?: never; }; export type IAuthorizeMovieTicketObject = Pick & { /** * fix 0 as JPY */ amount: 0; creditCard?: never; method?: never; paymentMethodId?: never; fromLocation?: never; description?: never; referencesOrder?: never; }; export type IAuthorizePaymentCardObject = Pick & { description?: string; creditCard?: never; method?: never; movieTickets?: never; ticketToken?: never; paymentMethodId?: never; referencesOrder?: never; }; /** * 決済承認リクエストの承認対象オブジェクト */ export type IObjectWithoutDetail = IAuthorizeAnyPaymentObject | IAuthorizeCreditCardObject | IAuthorizeMovieTicketObject | IAuthorizePaymentCardObject; /** * 決済承認アクションオブジェクト * paymentMethodIdが決済取引の取引番号に等しい */ export type IObject = Pick; export interface IResultPaymentMethod { /** * 決済方法区分 */ typeOf: AvailablePaymentMethodType; amount?: { /** * 決済カード通貨区分 */ currency?: string; }; } export interface IResultAsInvoice { /** * The identifier for the account the payment will be applied to. */ accountId: string; /** * 決済方法 * amount.currencyに対応するために追加(2023-08-13~) * startDate>=2022-08-16T00:00:00Zのアクションの関しては互換性維持済 */ paymentMethodAsObject: IResultPaymentMethod; /** * 決済方法ID */ paymentMethodId: string; /** * 決済ステータス * 注文に連携(2023-08-23~) */ paymentStatus: PaymentStatusType.PaymentAutomaticallyApplied | PaymentStatusType.PaymentDue; /** * 決済方法名称 */ name: string; /** * The total amount due. */ totalPaymentDue?: ITotalPaymentDue; /** * 追加特性 */ additionalProperty?: IPropertyValue[]; typeOf: ResultType; issuedThrough: IOrderPaymentMethodIssuedThrough; /** * 請求の関連注文 * support(2025-11-23~) */ referencesOrder?: IInvoiceReferenceOrder; } export type IResultAsPermit = Pick & { /** * メンバーシップコード */ identifier: string; }; export type IResult = [IResultAsInvoice, IResultAsPermit?]; export interface IPurpose { typeOf: TransactionType.PlaceOrder; id: string; } export declare enum ServiceIdentifier { Chevre = "Chevre" } export interface IInstrumentAsAssetTransaction { typeOf: AssetTransactionType.Pay; transactionNumber: string; identifier: ServiceIdentifier; } export type IInstrument = IInstrumentAsAssetTransaction; export interface IAttributes extends Pick, 'typeOf' | 'sameAs' | 'result' | 'recipient' | 'purpose' | 'project' | 'object' | 'identifier' | 'error' | 'agent'> { typeOf: ActionType.AuthorizeAction; object: IObject; agent: IAgent; /** * 決済取引としてのinstrument * @deprecated object.paymentMethodIdに依存すること */ instrument: IInstrument; recipient: IRecipient; purpose: IPurpose; /** * add identifier for an unique index(2025-02-25~) * authorize payment action identifier */ identifier: string; } /** * authorize payment action */ export type IAction = IBaseAction;