# Migration v43

Contains no breaking changes. However, introduces a new payment-method sdk, which will eventually replace the zuora sdk (which is used to make a test payment method when making test users). So releasing as a breaking change to make people aware of this.

The payment-method sdk does exactly the same thing as the zuora sdk, however it is behind the tyk gateway and is not calling zuora sandbox directly. This is the preferred method. Systems should be able to easily replace the zuora sdk with the payment-method sdk. A new API key can be requested from the gateway self-service, see `docs/services/PAYMENT-METHOD.md` for details.

## Using the Zuora SDK:
```
const {
	Zuora,
} = require('@financial-times/n-membership-sdk');

const zuoraSDK = new Zuora(
    {
        zuoraApi: '...',
        zuoraAccessKeyId: '...',
        zuoraAccessKeySecret: '...',
    });

const paymentMethod = await zuoraSDK.createPaymentMethod();
```

## Using the new PaymentMethod SDK:
```
const {
	PaymentMethod,
} = require('@financial-times/n-membership-sdk');

const paymentMethodSDK = new PaymentMethod(
    {
        membershipApi: '...',
        accountLinkingApiKey: '...',
    });

const paymentMethod = await paymentMethodSDK.createTestPaymentMethod();
```


## Changes

Adds the payment-method sdk, with appropriate tests, types and docs.

