Skip to content

Runtime_PaymentMethodList_Load#


Description#

This function allows you to load a list of available payment methods for a basket. The shipping address must already be known for this function to return results. This function requires you pass a Session_ID and Checkout_Session_ID and optional Customer_Session_ID if calling from an external system. The Checkout_Session_ID should be passed if available. This indicates that the customer is logged into their account when checking out and any saved payment cards will be available.

Request Body Parameters#

Parameter
Type Description
Session_Type String This will always be runtime
Session_ID String The Session ID of the basket
Checkout_Session_ID String Checkout Session ID. This is available once OCST (Bill To/Ship To) has been submitted
Customer_Session_ID String Customer Session ID. This is available if the customer is currently logged in. Omitting this will cause any customer specific payment methods not to be returned

Response Parameters#

Parameter
Type Description
success boolean Boolean value for if the request was successful
module String Code of the Payment Module
code String Payment Method Code
name String Payment Method Name
paymentmethod String Concatenation for Module Code and Payment Method Code. This is used in Order_Authorize to create a new payment authorization

Note

Content-Type for the request must be ‘application/json’

Example Request#

{
    "Store_code": "beta",
    "Function": "Runtime_PaymentMethodList_Load",
    "Session_Type": "runtime",
    "Checkout_Session_ID": "70a2364cc77a729413f8ed02de9dsdds",
    "Session_ID": "9efc6bf70fdf15cd8830053910dsada",
    "Customer_Session_ID": "cab45c0b4f0c0f5c0dcbbce5adasdsds"
}

Example Response#

{
    "success": 1,
    "data": [
        {
            "module": "",
            "code": "Visa",
            "name": "Visa ending in 1111 - Expires 02/2023",
            "paymentmethod": "paymentcard:2"
        },
        {
            "module": "mivapay",
            "code": "",
            "name": "Credit Card",
            "paymentmethod": "mivapay:"
        },
        {
            "module": "cod",
            "code": "COD",
            "name": "COD",
            "paymentmethod": "cod:COD"
        },
        {
            "module": "mvaffirm",
            "code": "affirm",
            "name": "Affirm",
            "paymentmethod": "mvaffirm:affirm"
        }
    ]
}