For the complete documentation index, see llms.txt. This page is also available as Markdown.

TossPay.authorize

Functional API checkoutPaymentYou can use the same functionality with this as well. The function-based API is the same as v2 { params: { payToken } } takes arguments in this form.

Feature description

It opens the TossPay payment window and performs user authentication. When authentication is complete, it returns whether it succeeded.

Actual payment approval should be handled on the server payTokenand handled separately.

Type

TossPay.authorize(params: CheckoutPaymentOptions): Promise<CheckoutPaymentResult>;

Params

type CheckoutPaymentOptions = {
  /** This is the payment token. */
  payToken: string;
};

Response

type CheckoutPaymentResult = {
  /** Whether authentication succeeded. */
  success: boolean;
  /** The reason if authentication failed. */
  reason?: string;
};

Example code

Was this helpful?