How to use the @mollie/api-client.MandateMethod.directdebit function in @mollie/api-client

To help you get started, we’ve selected a few @mollie/api-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mollie / mollie-api-node / examples / mandates / create.ts View on Github external
(async () => {
  try {
    const mandate: Mandate = await mollieClient.customers_mandates.create({
      customerId: 'cst_pzhEvnttJ2',
      method: MandateMethod.directdebit,
      consumerName: 'John Doe',
      consumerAccount: 'NL55INGB0000000000',
      consumerBic: 'INGBNL2A',
      signatureDate: '2018-05-07',
      mandateReference: 'YOUR-COMPANY-MD13804',
    });

    console.log(mandate);
  } catch (error) {
    console.warn(error);
  }
})();