getPrepaidPaymentTypes()

PaymentTypes getPrepaidPaymentTypes(string usn, string prepaidCode)

This method returns information about the payment methods a customer can use to purchase a specific prepaid block, and the surcharges for each payment method.

Payment methods may vary because a customer may only be able to buy a particular block with local currency, or may not be able to use a credit card with a high surcharge to buy a discounted block, among other examples.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription to return the available payment methods .
prepaidCode
Format: string
Purpose: Specifies the code of the prepaid block.

Results

This method returns a PaymentTypes XML document that contains information about the payment methods a customer can use to purchase a prepaid block. The document also lists 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 with a single payment type. This payment method has a $5.00 fixed surcharge plus an additional 5% surcharge of the prepaid cost. For example, if this payment method is used to buy a $10 prepaid block, the surcharge is $5.50. Note that the fields in this document vary by payment type.

<PaymentTypes xmlns="http://xml.inomial.com/smile/2.xsd">
  <PaymentType>
    <PaymentTypeCode>visa</PaymentTypeCode>
    <Name>Visa</Name>
    <Currency>AUD</Currency>
    <Surcharge>
      <Percentage>5.00</Percentage>
      <Fixed>5.00</Fixed>
      <Minimum>0.00</Minimum>
    </Surcharge>
    <FieldLabels>
      <Name>Name on card</Name>
      <Number>Card number</Number>
      <CVV>CVV</CVV>
      <ExpiryDate>Expiry</ExpiryDate>
    </FieldLabels>
  </PaymentType>
</PaymentTypes>   

Faults

PrepaidException

This fault is returned when the subscription does not support the prepaid block or the caller does not have permission to perform this action.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.GetPrepaidPaymentTypes usn prepaidCode
usn
Purpose: Specifies the USN of the subscription to return the available payment methods.
prepaidCode
Purpose: Specifies the code of the prepaid block.
Note: For more information about the Java client and the options it accepts, see Java client syntax.