Praxis Wiki logo

Agent API {get-gateway-options}


This API method is essential for Direct API / APM integration.
By using {get-gateway-options}, you can dynamically retrieve all available payment methods along with the necessary details to render the appropriate forms for customers. For example: payment service names, icons, and arbitrary details that must be submitted for processing with a specific e-wallet.

Endpoints

Name URL
Sandbox https://gateway.cashier-test.com/agent/get-gateway-options
Live https://gw.praxisgate.com/agent/get-gateway-options

Request Parameters

✓ - required value
? - optional, value or null
✕ - always appears as null

Variable Type Description
merchant_id varchar(50) ✓ Merchant API client account identifier
application_key varchar(32) ✓ Identifier of your application (website)
version varchar(3) ✓ API version
timestamp int(11) ✓ Request time (unix timestamp, seconds)
gateway varchar(32) ? A specific gateway to be found
transaction_type varchar(32) ? A type of gateway (authorization, sale, payout)

Response Parameters

Variable Type Description
status int ✓ API communication status - for transaction processing status please refer to transaction.transaction.status
- 0 if the request was successful
- Negative integer if internal server/network error occurs
- Positive integer if application/logical error occurs
description varchar(256) ✓ Accurate description of the result. Return the actual error for any exception as it helps to diagnose issues in production.
gateway_options List<Object> ? List of gateway objects, where keys are gateway hash strings and values are actual data objects. Appears in all cases except the authentication/validation error, or application malfunction.
version varchar(3) ✓ API version
timestamp int(11) ✓ Response time (unix timestamp, seconds)

Signature

The full signature generation algorithm can be found in the Authentication section.

Request signature parameters

  1. merchant_id
  2. application_key
  3. timestamp

Response signature parameters

  1. status
  2. timestamp

Example

Request

{
    "merchant_id": "Test-Integration-Merchant",
    "application_key": "Sandbox",
    "version": "1.3",
    "timestamp": 1590613956,
    "transaction_type": "payout"
}

Response (Found)

{
    "status": 0,
    "description": "Ok",
    "gateway_options": [
        {
            "payment_method": "Credit Card",
            "payment_processor": "TestCardProcessor",
            "gateway": "s-pTSZyK23E1Ee5KZpcNbX_aFl0HuhQ0",
            "system_name":"CardPay - CC payments",
            "image": "",
            "status":"active",
            "deposit_supported":1,
            "authorization_supported":0,
            "payout_supported":1,
            "refund_supported":0,
            "is_3d":null,
            "input_fields": []
        },
        {
            "payment_method": "WireOnline",
            "payment_processor": "TestWallet",
            "gateway": "XkI4sCxOBpcXylpK3-7ycM39RLTAqsyt",
            "system_name":"WireOnline - use for EU payments",
            "image": "",
            "status":"active",
            "deposit_supported":1,
            "authorization_supported":0,
            "payout_supported":1,
            "refund_supported":0,
            "is_3d":null,
            "input_fields": {
                "input_fields_for_payment":[
                    {
                        "key":"login",
                        "label":"Login",
                        "format":"text",
                        "default_value":"",
                        "required":0,
                        "min":0,
                        "max":50
                    },
                    {
                        "key":"full_name",
                        "label":"Full Name",
                        "format":"text",
                        "default_value":"",
                        "required":0,
                        "min":0,
                        "max":50
                    }
                ],
                "input_fields_for_withdrawal":[
                    {
                        "key":"login",
                        "label":"Login",
                        "format":"text",
                        "default_value":"",
                        "required":0,
                        "min":0,
                        "max":50
                    }
                ]
            }
        }
    ],
    "version": "1.3",
    "timestamp": 1590611635
}

Response (No gateway options available)

{
    "status": 0,
    "description": "Ok",
    "gateway_options": [],
    "version": "1.3",
    "timestamp": 1590611635
}