getPaymentTypes()

PaymentTypes getPaymentTypes(string currency)

This method returns information about the payment methods appropriate for the current user and the provided currency, and the surcharges for each payment method.

Parameters

currency
Format: string
Purpose: (Optional) Specifies the ISO 4217 currency code to filter payment type results. If not provided, payment types of all currencies will be returned.

Results

This method returns a PaymentTypes XML document that contains information about the payment methods a user may use. This document also lists any payment surcharges and the fields that must be completed to use a payment method.

There are no messages defined by this method.

Example: A returned PaymentTypes XML document

This example shows a returned PaymentTypes XML document. The payment type is American Express in Australian dollars. This payment method has a $0.50 fixed surcharge plus an additional 1% surcharge of the cost, with a minimum charge of $1.00.

<PaymentTypes xmlns:="http://xml.inomial.com/smile/2.xsd" xmlns:="http://ws.inomial.com/smile.2">
  <PaymentType>
    <Name>American Express</Name>
    <Currency>AUD</Currency>
    <Surcharge/>
    <FieldLabels>
      <Name>Card holder</Name>
      <Number>Card number</Number>
      <ExpiryDate>Expiry</ExpiryDate>
    </FieldLabels>
  </PaymentType>
  <PaymentTypeCode>payway</PaymentTypeCode>
    <Name>Westpac PayWay</Name>
    <Currency>AUD</Currency>
    <Surcharge>
      <Percentage>1</Percentage>
      <Fixed formatted="$0.50" currency="AUD">0.5</Fixed>
      <Minimum formatted="$1.00" currency="AUD">1</Minimum>
    </Surcharge>
    <FieldLabels>
      <Number>Number</Number>
      <CVV>CVV</CVV>
    </FieldLabels>
  </PaymentType>
</PaymentTypes>

Faults

NoSuchItemException

This fault is returned when the currency code provided is not configured in Smile for the current company.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.GetPaymentTypes [currency]
currency
Purpose: (Optional) Specifies the ISO 4217 currency code to filter payment type results. If not provided, payment types of all currencies will be returned.
Note: For more information about the Java client and the options it accepts, see Java client syntax.