Get Payment Methods

API Reference

This page provides API reference information for Velocity API's Get Payment Methods operation. For information on how to integrate this operation, see API.

Request

Endpoint: /crs/routingservice/external/get-payment-methods

Method: GET

Sample Request

See the sample Get Payment Methods request below:

<?xml version="1.0" encoding="UTF-8"?>
<payment_method_search_criteria>
  <event_id>5754676</event_id>
  <account_id>101118</account_id>
  <transaction>
    <type_id>1</type_id>
    <order_no>MLW761</order_no>
    <product_type>100</product_type>
    <fees>
      <fee>
        <value>2300</value>
        <type>1</type>
      </fee>
    </fees>
    <amount>
      <value>10000</value>
      <country_id>407</country_id>
      <currency_id>840</currency_id>
      <decimal>2</decimal>
    </amount>
    <orders>
      <line_item>
        <product>
          <name>RETURN</name>
          <sku>3HHQM6</sku>
          <description>return</description>
        </product>
      </line_item>
      <amount>
        <country_id>407</country_id>
        <value>273891000</value>
      </amount>
    </orders>
  </transaction>
  <client_info>
    <platform>HTML5</platform>
    <language>en</language>
    <version>2.00</version>
    <sdk-version>2.0.0</sdk-version>
    <mobile>
      <mobile>9990521077</mobile>
      <mobile_type>MobileEnriched</mobile_type>
      <country_id>407</country_id>
      <validated>true</validated>
    </mobile>
    <email>
      <email>[email protected]</email>
      <email_type>EmailEnriched</email_type>
      <validated>true</validated>
    </email>
    <device_id>2E8667F78B23402BBFF6176313BD58D314566333</device_id>
    <ip>10.36.1.15</ip>
    <client_id>10101</client_id>
  </client_info>
</payment_method_search_criteria>

Request Parameters

event_id

Parent: payment_method_search_criteria

The event_id element is required and has the following text content:

ParameterFormatRequirementDescription
event IDIntegerRequiredA unique reference ID used for audit and tracking purposes.

account_id

Parent: payment_method_search_criteria

The account_id element is required and has the following text content:

ParameterFormatRequirementDescription
account IDIntegerRequiredA storefront ID to identify web/mobile payment.

type_id

Parents: payment_method_search_criteria: transaction

The type_id element is optional and has the following text content:

ParameterFormatRequirementDescription
account IDIntegerOptionalThe type of transaction used for making payment. Velocity supports the transaction types found in the type-id Transaction Types table below.

type-id Transaction Types

Velocity supports the following transaction types (used to define type-id):

ValueTransaction typesExamples
1Online shoppingS&B Purchase
2Offline shoppingS&B Purchase
3Self Service OnlineMYB Ancillary Purchase, MYB Change Itinerary Payment, OLCI Ancillary Purchase
4Self Service OfflineMYB Pay Later
5Self Service OnlineMYB/Self Service Online with additional rules on FOP-- Managed Booking txn where additional rules on FOP can be configured
6Self Service OnlineCPL - Payment Link Transaction. Transaction originated from payment link.

order_no

Parents: payment_method_search_criteria: transaction

The order_no element is required and has the following text content:

ParameterFormatRequirementDescription
order numberStringRequiredThe order ID that a merchant generates.

Note: Some payment providers have strict guidelines for order_no. The recommended pattern is "[a-zA-Z0-9._-].

product_type

Parents: payment_method_search_criteria: transaction

The product_type element is optional and has the following text content:

ParameterFormatRequirementDescription
product typeStringOptionalThe type of product purchased in this transaction:
100 - Ticket
200 - Ancillary
210 - Insurance

fees

Parents: payment_method_search_criteria: transaction

Note the following:

  • The fees element is optional, and it may have multiple fee children.
  • Each fee child element has two children: value and type.

The value element has the following text content:

ParameterFormatRequirementDescription
valueIntegerConditional Requirement: Required if fee is present.The amount of the fee.

The type element has the following text content:

ParameterFormatRequirementDescription
product typeIntegerOptionalThe type of transaction used to pay the fee. Velocity supports the transaction types found in the type-id Transaction Types table above.

Fee > type 1 is used as the service fee rule condition.

amount

Parents: payment_method_search_criteria: transaction

The amount element is required, and it defines the total amount paid in this transaction. It has four children: value, country_id, currency_id, and decimal.

The value child element has the following text content:

ParameterFormatRequirementDescription
valueIntegerRequiredThe total amount paid in this transaction (including order amount and any fees).

The country_id child element has the following text content:

ParameterFormatRequirementDescription
country IDIntegerRequiredThe CellPoint Digital-specific country code. This is available in Reference.

The currency_id child element has the following text content:

ParameterFormatRequirementDescription
currency IDIntegerOptionalThe currency configured for the transaction amount. This should be the ISO 4217 numeric code. This depends on the configuration available through Velocity.

The decimal child element has the following text content:

ParameterFormatRequirementDescription
decimalIntegerRequiredThe number of decimal points shown for a currency.

line_item

Parents: payment_method_search_criteria: transaction: orders

Note the following:

  • The orders element contains at least one line_item children. It may contain multiple line_item children.
  • Each line_item child element must be followed by an amount element that defines the amount charged for that line item. See the amount section below for more information.
  • Each line_item element may contain multiple product children.
  • Each product element may have four children: name, sku, description, and airline_data.
  • For more information on the airline_data child element, see the Airline Itinerary Data (AID) guide.

The name element has the following text content:

ParameterFormatRequirementDescription
nameStringOptionalThe name of the product.

The sku element has the following text content:

ParameterFormatRequirementDescription
SKUStringOptionalThe SKU of the product.

The description element has the following text content:

ParameterFormatRequirementDescription
descriptionStringOptionalA description of the product.

amount

Parents: payment_method_search_criteria: transaction: orders

Within the orders element, each line_item child element must be followed by an amount element that defines the amount charged for that line item. Each amount element must contain two children: country_id and value.

The country_id element has the following text content:

ParameterFormatRequirementDescription
country IDIntegerConditional Requirement: Required if amount is present.The CellPoint Digital-specific country code. This is available in Reference.

The value element has the following text content:

ParameterFormatRequirementDescription
valueStringConditional Requirement: Required if amount is present.The value charged for the line item listed above this amount element.

platform

Parents: payment_method_search_criteria: client_info

The platform element is required and has the following text content:

ParameterFormatRequirementDescription
platformStringRequiredThe type of platform from which the request is sent.

language

Parents: payment_method_search_criteria: client_info

The language element is required and has the following text content:

ParameterFormatRequirementDescription
languageStringRequiredThe language that Velocity uses as default when translating the payment pages. Velocity uses a default language set by a merchant if this parameter is omitted.

Note: Velocity language codes are based upon the ISO- 639-1 standard. Refer to http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for details.

version

Parents: payment_method_search_criteria: client_info

The version element is required and has the following text content:

ParameterFormatRequirementDescription
versionStringRequiredThe version of the API or application sending the request.

sdk-version

Parents: payment_method_search_criteria: client_info

The sdk-version element is optional and has the following text content:

ParameterFormatRequirementDescription
versionIntegerOptionalThe version of SDK used to send the request.

mobile

Parents: payment_method_search_criteria: client_info

The mobile element is optional, and it may contain four child elements: mobile, mobile_type, country_id, and validated.

The mobile child element has the following text content:

ParameterFormatRequirementDescription
mobile numberIntegerConditional Requirement: A mobile number can be mandatory or optional, based on the requirement of a merchant or a PSP.The MSISDN of a customer without International Dialing Code.

The mobile_type element has the following text content:

ParameterFormatRequirementDescription
mobile typeStringOptionalThe type of mobile device used in the transaction.

The country_id element has the following text content:

ParameterFormatRequirementDescription
country IDIntegerConditional Requirement: Required if mobile number is present.The CellPoint Digital-specific country code. This is available in Reference.

The validated element has the following text content:

ParameterFormatRequirementDescription
validation statusBooleanOptionalIf true, the mobile phone used in this transaction has been validated.

email

Parents: payment_method_search_criteria: client_info

The email element is optional, and it may contain three child elements: email, email_type, and validated.

The email child element has the following text content:

ParameterFormatRequirementDescription
email addressStringConditional Requirement: Email can be mandatory or optional, based on the requirement of a merchant or a PSP.The customer's email address. If your customer provides this parameter, the 'Email' input field on the 'Send E-Mail Receipt' page is automatically populated with this value.

The email_type element has the following text content:

ParameterFormatRequirementDescription
email typeStringOptionalThe type of email account used in the transaction.

The validated element has the following text content:

ParameterFormatRequirementDescription
validation statusBooleanOptionalIf true, the email address used in this transaction has been validated.

device_id

Parents: payment_method_search_criteria: client_info

The device_id element is optional for a web channel, and it has the following text content:

ParameterFormatRequirementDescription
device IDStringConditional Requirement: Device ID is optional for a web channel.The ID of the customer's device used in the transaction.

ip

Parents: payment_method_search_criteria: client_info

The ip element is required, and it has the following text content:

ParameterFormatRequirementDescription
IPStringRequiredThe IP used in the transaction.

client_id

Parents: payment_method_search_criteria: client_info

The client_id element is required, and it has the following text content:

ParameterFormatRequirementDescription
client IDIntegerRequiredThe unique ID configured for a merchant on the Velocity POP.

Response

<payment_method_search_response>
  <payment_methods>
    <payment_method>
      <id>8</id>
      <psp_type/>
      <preference>1</preference>
      <state_id>1</state_id>
    </payment_method>
    <payment_method>
      <id>7</id>
      <psp_type/>
      <preference>2</preference>
      <state_id>1</state_id>
    </payment_method>
  </payment_methods>
</payment_method_search_response>

Response Parameters

payment_methods

Parent: payment_method_search_response

Note the following:

  • The payment_methods element is required.
  • The payment_methods element requires at least one payment_method child. It may contain multiple payment_method children.
  • Each payment_method child element must contain four children: id, psp_type, preference, and state_id.

The id child element has the following text content:

ParameterFormatRequirementDescription
payment method IDIntegerRequiredA card ID as defined by the mPoint system; for example, 8 for Visa or 7 for Mastercard.

The psp_type child element has the following text content:

ParameterFormatRequirementDescription
PSP typeStringRequiredThe type of processor used to process the payment.

The preference child element has the following text content:

ParameterFormatRequirementDescription
Preference for use of payment methodIntegerRequiredThis number indicates the customer's preference for using the given payment method. The payment_method in this response with the lowest preference value is considered the default payment method.

The state_id child element has the following text content:

ParameterFormatRequirementDescription
card stateIntegerRequiredThe card state of the given payment method. Possible values:
  • 1 - Enabled
  • 2 - Disabled By Merchant
  • 3 - Disabled By PSP
  • 4 - Prerequisite not Met
  • 5 - Temporarily Unavailable
  • 6 - Disable Show