private function _createSubscriptionPayment(array $data, Currency $currency): SubscriptionPayment
    {
        $payment = new SubscriptionPayment([
            'paymentAmount' => $data['amount_due'] / (10 ** $currency->minorUnit),
            'paymentCurrency' => $currency,
            'paymentDate' => $data['date'],
            'paymentReference' => $data['charge'],
            'paid' => $data['paid'],
            'response' => Json::encode($data)
        ]);

        return $payment;
    }