Optional$The plugin's error codes and their default (English) messages
OptionalendpointsHTTP routes added to the handler
OptionaleventsTyped payment events (see payment.on())
OptionalhooksRuns before and after provider operations
Unique id, e.g. commission-router
OptionalinitRuns once, before the first operation. Plugins run it in order.
OptionalmethodsMembers added to the payment object, e.g. { router: { quote } }
OptionalonRuns on every response of the HTTP handler (also replayed ones) and can return a replacement. If it throws, the error is logged and the response is sent unchanged.
OptionaloptionsThe options the plugin was created with, for introspection
Optionalversion
A plugin: an object with an
idand only the parts it needs.Example