This content is archived. See latest version here

Last updated: Oct 12 2015

Payments are central to an e-commerce system. Episerver Commerce offers both default payment options and flexible possibilities to create your own payment solutions. The sample package contains example integrations with various payment providers.

Classes in this topic are available in the following namespaces:

How it works

When creating and configuring payment methods in ECF, three components need to be created or re-used and configured: Payment Types, Payment Gateways and Payment Methods.

Payment types

Payment types are classes that contain the properties of a particular payment type. For example, a credit card payment type contains credit card number, card expiration date, card type, etc. All payment types inherit from the abstract class Payment. The most common payment types are built-in to EPiServer Commerce: Credit card, cash card, gift card, and invoice. In addition, a generic OtherPayment type is included. Payment types are meta-classes as part of MetaDataPlus.

Payment gateways

Payment gateways provide an interface to a system which provides payment processing. A payment type is passed to the payment gateway, and the gateway executes the payment transaction with the payment system, for instance PayPal. One payment type is associated with each payment gateway.

These are some gateway properties:

  • Id. The system-assigned unique identifier for the payment gateway.
  • Name. The name to be displayed to the user.
  • Description. A description that can be displayed to the user.
  • System Keyword. The unique name for each instance of the gateway; new non-unique keywords are not saved to the database. This is not editable after a gateway is initially created.
  • Language. A language for the payment gateway.
  • Class Name. Name of the gateway class to be associated with the payment.

Payment methods

Payment methods contain information about the way a customer views a payment option and has a payment gateway associated with it.

Implementing payment options

Several payment options are available for your site:

  • Use one of the built-in payment gateways included with ECF, including integration with nSoftware.
  • Create multiple instances of the same gateway with a different configuration. This would apply to a situation where you need two payment setups with different account information for PayPal, especially for a multi-site implementation.
  • Create a custom payment gateway. An easy way to adapt capabilities and use any payment gateway.

Related topics

Do you have feedback on this documentation? Send an email to For development-related questions and discussions, refer to our Forums on