paygreenjs variable has many methods.

Example :

window.addEventListener("load", function () {
  paygreenjs.setLanguage("en");
});

NameDescription
initInit the payment form.
Take ParamsType as parameter. See here
unmountUnmount the form.
Accept a boolean parameter to unsubsribe events (default false)
useInstrumentUse an instrument to complete the actual payment flow.
Accept an instrument ID as paramter.
statusGive the actual state of flows
submitPaymentManually submit the payment form.
focusChange the actual field focus.
Accept an enum as parameter pan | cvv | exp
onListen an event.
Accept two parameters, first the name of the event, second the callback
offRemove an event listener previoulsy attached
EventsList all available events
updateConsentChange the actual state of the consent.
Accept a boolean true/false parameter which represents if the user's consentment is implicit.
(If you do not display the check box used to collect user consent for reuse of the instrument. Be sure to respect the CNIL recommendations regarding consent)
setPaymentMethodChange the payment method of the actual flow.
Accepts string like the init params paymentMethod
setLanguageChange the current language of PGJS. Take language as param example: setLanguage("en")
versionShow current version