Skip to main content

Documentation

Payment Method Type

A type of payment method that a customer can use for making payments.

A payment method type is a type of payment method that any customer can use, for example, ee_mastercard_card, Mastercard for Estonia. When it is added to a customer profile, it becomes a payment method that is specific to that one customer.

Conditions - Examples

The following examples show how conditionally required fields appear in the response to Get Payment Method Required Fields.

Condition Defined by a Payment Field

In the following example, the identification_value field is required if the payment field amount is greater than 100.

Payment Condition

{
        
//  ...        
        
    "data": {
        "type": "my_alliancebank_bank",
        "fields": [
                {
                "name": "identification_value",
                "type": "string",
                "regex": "^[0-9a-zA-Z.:|?*,!&_ -]{1,128}$",
                "conditions": [
                    {
                        "operator": "$gt",
                        "description": "If the payment amount is greater than 100, this field is required.",
                        "element_name": "payment.amount",
                        "threshold_value": "100"
                    }
                ],
                "description": "Customer’s identification number on the document mentioned in identification_type",
                "is_required": false,
                "is_updatable": false
            }
        ],

//  ...        

    }
}

Condition Defined by a Payment Method Type Field

In the following example, the date_of_birth field is required if the type field in the payment method type object is individual.

Payment Method Type Condition

{

//  ...        

    "data": {
        "type": "my_alliancebank_bank",
        "fields": [
                {
                "name": "type",
                "type": "string",
                "regex": "individual|company",
                "description": "",
                "is_required": true,
                "is_updatable": false
            }, 
            {
                "name": "date_of_birth",
                "type": "string",
                "regex": "",
                "conditions": [{
                        "operator": "$eq",
                        "description": "If the value of the field type is individual, this field is required.",
                        "element_name": "payment.payment_method_type.fields.type",
                        "threshold_value": "individual"
                    }
                ]
                "description": "",
                "is_required": false,
                "is_updatable": false                 
            }
        ],

 //  ...        

    }
}

Condition Defined by an Organization Field

In the following example, the identification_value field is required if the merchant_type field in the organization is one of the following:

  • digital_wallet - Digital wallet merchant

  • financial_services - Financial services merchant

  • crypto - Cryptocurrency merchant

Organization Condition

{

//  ...

    "data": {
        "type": "pe_bcp_cash",
        "fields": [            
            {
                "name": "identification_value",
                "type": "number",
                "regex": "^[0-9]{1,14}$",
                "conditions": [
                    {
                        "operator": "$in",
                        "description": "If the Merchant is a Digital Wallet or Financial Services or Crypto Merchant, this field is required.",
                        "element_name": "organization.merchant_type",
                        "threshold_value": [
                            "digital_wallet",
                            "financial_services",
                            "crypto"
                        ]
                    }
                ],
                "description": "Customer’s identification number on the document mentioned in identification_type",
                "is_required": false,
                "is_updatable": false
            }
        ],

//  ...

    }
}