Invoice ISubscriptionService.GetUpcomingInvoice(string customerBillingId) { var invoiceService = new StripeInvoiceService(); StripeInvoice response = null; try { response = invoiceService.Upcoming(customerBillingId); return(new Invoice { AmountDueInCents = response.AmountDueInCents, AttemptCount = response.AttemptCount, Attempted = response.Attempted, ChargeId = response.ChargeId, Closed = response.Closed, CustomerId = response.CustomerId, Date = response.Date, EndingBalanceInCents = response.EndingBalanceInCents, Id = response.Id, LiveMode = response.LiveMode, NextPaymentAttempt = response.NextPaymentAttempt, Paid = response.Paid, PeriodEnd = response.PeriodEnd, PeriodStart = response.PeriodStart, StartingBalanceInCents = response.StartingBalanceInCents, SubtotalInCents = response.SubtotalInCents, TotalInCents = response.TotalInCents }); } catch { } return(new Invoice()); }