Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers


Get Payment Methods and Create Payment

Gets a collection of PaymentMethod objects.

Parameters for getting payment methods

Parameter Type Details
country Country Specifying which country defined in Ucommerce, to get the payment methods from

Parameters for creating a payment

Parameter Type Details
paymentMethodId int The id of the payment method to use for the payment.
amount decimal The payment amount. This is the current basket order total by default.
requestPayment bool If the payment should be requested immediately. Set to true by default.
overwriteExisting bool If the existing payment on the current customer's basket should be overwritten. Set to true by default.
    ICollection<PaymentMethod> paymentMethods = transactionLibrary.GetPaymentMethods();
        amount: -1, 

Request Payments

When you're ready to let the customer proceed to payment, you can use the following snippet.

    string url = transactionLibrary.GetPaymentPageUrl(transactionLibrary.GetBasket(false).Payments.First());
    //or return Redirect(url) in MVC