# Default shipping method in Express Checkout
The integration has to have a default shipping method and it selects the first one by default. You can use the isDefaultShippingMethod
function to have more control over it. The first shipping method which returns a truthy value will be a new default.
Signature of the function:
import { Cart, ShippingMethod } from '@vsf-enterprise/commercetools-types';
(shippingMethod: ShippingMethod, index: number, shippingMethods: ShippingMethod[]): boolean
Example implementation:
// middleware.config.js
module.exports = {
integrations: {
paypal: {
location: '@vsf-enterprise/paypal-commercetools/server',
configuration: {
paypalApi: {
isDefaultShippingMethod(shippingMethod) {
return shippingMethod.label === 'Express EU';
}
}
}
}
}
};
If the function doesn't find a matching shipping method, the application will pick the first element in the array.