toJSON

open external fun toJSON(): JsAny(source)

The toJSON() method of the PaymentResponse interface returns a JSON-serializable plain object representing the PaymentResponse object.

MDN Reference