private async Task <PaymentResponseContainer> CreatePayment(string baseUrl, string clientName, PaymentRequest payment) { payment.SetMissingMerchantInformationFromOptions(Options(clientName)); var payload = new PaymentRequestContainer(payment); Func <ProblemsContainer, Exception> onError = m => new CouldNotPlacePaymentException(payment, m); var url = $"{baseUrl}?$expand=prices,captures,payeeinfo,urls,transactions,authorizations,reversals,cancellations"; var res = await CreateInternalClient(clientName).HttpPost <PaymentRequestContainer, PaymentResponseContainer>(url, onError, payload); return(res); }