GoodFunds Gateway - RESTful API Documentation

Gateway Accounts

Gateway Accounts are all the external applications. This could be a Credit Card Processing Account, eCheck Processing Account, External Software Account, and / or Non Processing Account ( Cash : Offline ).

GET gateways

List all gateways associated with your account or your clients account.

    Resource Information

  • Method: GET
  • URL: https://demo.goodfundsgateway.com/api/gateways.json
  • Requires authentication? Yes

Method Parameters

N/A

Query Parameters

Parameter Type Required Description
deleted string N (default) : Will show all gateway accounts
"0" : Will Show all non deleted or removed gateway accounts
"1" : Show all deleted or removed gateway accounts

PHP Sample Request: (json format)

      $data = array(
        'deleted' => '0'
      );

      if(isset($data))
      {
        $url = 'https://demo.goodfundsgateway.com/api/gateways.json?' . http_build_query($data);
      }
      else
      {
        $url = 'https://demo.goodfundsgateway.com/api/gateways.json';
      }

      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
      curl_setopt($ch, CURLOPT_SSLVERSION, 6);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'svs-api-id: [SVS-API-ID]',
        'svs-api-key: [SVS-API-KEY]')
      );
                                                                                                                       
      $result = curl_exec($ch);

      $err = curl_error($ch);

      curl_close($ch);

      if ($err) {
      echo "cURL Error #:" . $err;
      } else {
      echo $result;
      }
    

Response data: (json format)

      {
        "status": "success",
        "successMessage": {
          "response_code": 404,
          "message": {
            "gateways": [
              {
                "id": "[Gateway ID]",
                "gateway_type_id": "[Gateway Type ID]",
                "gateway_name": "[Gateway Name]",
                "gateway_display_name": "[Gateway Clean Name]",
                "date_updated": "[Last Updated Date]",
                "date_created": "[Created Date]"
              },
              {
                "id": "[Gateway ID]",
                "gateway_type_id": "[Gateway Type ID]",
                "gateway_name": "[Gateway Name]",
                "gateway_display_name": "[Gateway Clean Name]",
                "date_updated": "[Last Updated Date]",
                "date_created": "[Created Date]"
              }
            ]
          }
        }
      }
    

POST gateway

Creates a gateway account under your associated client.

    Resource Information

  • Method: POST
  • URL: https://demo.goodfundsgateway.com/api/gateway.json
  • Requires authentication? Yes

Method Parameters

N/A

Query Parameters

Parameter Type Required Description
gateway node Y Gateway Node: List all the gateway information to create account in our system
enabled int Y 1
mode string Y "dev" : Sets the Gateway Account as Developer Account
"test" : Sets the Gateway Account as a Live Account but Test is active
"live" : Sets the Gateway Account as a Live Account
gateway_name string Y "converge_cc" : For Converge Credit Card Processing Account
"converge_ach" : For Converge eCheck Processing Account
"linked2pay_ach" : For Linked2Pay (AvidiaPay) eCheck Processing Account
"authnet_cc" : For Authorize.net Credit Card Processing Account
accept_amex int N Required Condition: { If Credit Card Processing Gateway Account Y }
{ If Not Credit Card Processing Gateway Account N }

"1" To Accept American Express Brand
"0" Not to Accept American Express Brand
active_level2 int N Required Condition: { If Is A Processing Gateway Account Y }
{ If Is Software or Non Processing Gateway Account N }

"1" Will submit Level 2 information to processor
"0" Will not submit Level 2 information to processor
active_level3 int N Required Condition: { If Is A Processing Gateway Account Y }
{ If Is Software or Non Processing Gateway Account N }

"1" Will submit Level 3 information to processor
"0" Will not submit Level 3 information to processor
account_id int N Required Condition: { If Converge Gateway Account Y }
{ If Not Converge Gateway Account N }

Account ID provided by Converge formerly known as My Virtual Merchant
user_id string N Required Condition: { If Converge Gateway Account Y }
{ If Not Converge Gateway Account N }

User ID provided by Converge formerly known as My Virtual Merchant
pin string N Required Condition: { If Converge Gateway Account Y }
{ If Not Converge Gateway Account N }

PIN generated in Converge formerly known as My Virtual Merchant
login string N Required Condition: { If Linked2Pay (AvidiaPay) Gateway Account Y }
{ If Not Linked2Pay (AvidiaPay) Gateway Account N }

This is the same username that you use to login to your Linked2Pay (AvidiaPay) account.
password string N Required Condition: { If Linked2Pay (AvidiaPay) Gateway Account Y }
{ If Not Linked2Pay (AvidiaPay) Gateway Account N }

Once enabled web service in your L2P account click the Generate Web Service Access Key. This is found uner your User Information in the L2P login.
vt_template string N Required Condition: { If Linked2Pay (AvidiaPay) Gateway Account Y }
{ If Not Linked2Pay (AvidiaPay) Gateway Account N }

First your need to create a terminal instead of L2P portal than copy the name of the terminal you just created "AS IS" to use as your Virtual Terminal Template Name.

PHP Sample Request: (json format)

      $data = array(
        'gateway'  => array(
          'enabled'       =>  '1',
          'mode'          => 'dev',
          'gateway_name'   => 'converge_cc',
          'accept_amex'   => '1',
          'active_level2' => '1',
          'active_level3' => '1',
          'account_id'    => '[Account ID]',
          'user_id'       => '[User ID]',
          'pin'           => '[PIN]'
        )
      );

      $data_string = json_encode($data);

      $url = 'https://demo.goodfundsgateway.com/api/gateway.json';

      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
      curl_setopt($ch, CURLOPT_SSLVERSION, 6);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data_string),
        'svs-api-id: [SVS-API-ID]',
        'svs-api-key: [SVS-API-KEY]')
      );
                                                                                                                       
      $result = curl_exec($ch);

      $err = curl_error($ch);

      curl_close($ch);

      if ($err) {
      echo "cURL Error #:" . $err;
      } else {
      echo $result;
      }
    

Response data: (json format)

      {
        "status": "success",
        "successMessage": {
          "response_code": 400,
          "message": {
            "gateway": {
              "gateway_id": [Gateway ID]
            }
          }
        }
      }
    

GET client/{gatewayId}

Get details of a specific gateway account by ID.

    Resource Information

  • Method: GET
  • URL: https://demo.goodfundsgateway.com/api/gateway.json/{gatewayId}
  • Requires authentication? Yes

Method Parameters

Parameter Type Required Description
gatewayId int Y Specific gateway account by ID that is being requested.

Query Parameters

N/A

PHP Sample Request: (json format)

        $data = '[Gateway ID]';

        $url = 'https://demo.goodfundsgateway.com/api/gateway.json/' . $data;

        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
        curl_setopt($ch, CURLOPT_SSLVERSION, 6);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
          'Content-Type: application/json',
          'svs-api-id: [SVS-API-ID]',
          'svs-api-key: [SVS-API-KEY]')
        );
                                                                                                                         
        $result = curl_exec($ch);

        $err = curl_error($ch);

        curl_close($ch);

        if ($err) {
        echo "cURL Error #:" . $err;
        } else {
        echo $result;
        }
      

Response data: (json format)

        {
          "status": "success",
          "successMessage": {
            "response_code": 305,
            "message": {
              "gateway": {
                "id": "[Gateway ID]",
                "gateway_type_id": "[Gateway Type ID]",
                "gateway_name": "[Gateway Name]",
                "gateway_display_name": "[Gateway Display Name]",
                "date_updated": "[Last Updated Date]",
                "date_created": "[Created Date]"
              }
            }
          }
        }
      

POST gateway/{gatewayId}/update

Update details of a specific gateway by ID.

    Resource Information

  • Method: POST
  • URL: https://demo.goodfundsgateway.com/api/gateway.json/{gatewayId}/update
  • Requires authentication? Yes

Method Parameters

Parameter Type Required Description
gatewayId int Y Specific gateway account by ID to be updated.

Query Parameters

Parameter Type Required Description
gateway node N Gateway Node: List all the gateway information to create account in our system
enabled int Y 1
mode string Y "dev" : Sets the Gateway Account as Developer Account
"test" : Sets the Gateway Account as a Live Account but Test is active
"live" : Sets the Gateway Account as a Live Account
gateway_name string Y "converge_cc" : For Converge Credit Card Processing Gateway Account
"converge_ach" : For Converge eCheck Processing Gateway Account
"authnet_cc" : For Authorize.net Credit Card Processing Gateway Account
accept_amex int N Required Condition: { If Credit Card Processing Gateway Account Y }
{ If Not Credit Card Processing Gateway Account N }

"1" To Accept American Express Brand
"0" Not to Accept American Express Brand
active_level2 int N Required Condition: { If Is A Processing Gateway Account Y }
{ If Is Software or Non Processing Gateway Account N }

"1" Will submit Level 2 information to processor
"0" Will not submit Level 2 information to processor
active_level3 int N Required Condition: { If Is A Processing Gateway Account Y }
{ If Is Software or Non Processing Gateway Account N }

"1" Will submit Level 3 information to processor
"0" Will not submit Level 3 information to processor
account_id int N Required Condition: { If Converge Gateway Account Y }
{ If Not Converge Gateway Account N }

Account ID provided by Converge formerly known as My Virtual Merchant
user_id string N Required Condition: { If Converge Gateway Account Y }
{ If Not Converge Gateway Account N }

User ID provided by Converge formerly known as My Virtual Merchant
pin string N Required Condition: { If Converge Gateway Account Y }
{ If Not Converge Gateway Account N }

PIN generated in Converge formerly known as My Virtual Merchant

PHP Sample Request: (json format)

      $data = array(
        'gateway'  => array(
          'enabled'       =>  '1',
          'mode'          => 'dev',
          'gateway_name'   => 'converge_cc',
          'accept_amex'   => '1',
          'active_level2' => '1',
          'active_level3' => '1',
          'account_id'    => '[Account ID]',
          'user_id'       => '[User ID]',
          'pin'           => '[PIN]'
        )
      );

      $data_string = json_encode($data);

      $gateway_id = '[Gateway ID]';

      $url = 'https://demo.goodfundsgateway.com/api/gateway.json/' . $gateway_id . '/update';

      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
      curl_setopt($ch, CURLOPT_SSLVERSION, 6);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data_string),
        'svs-api-id: [SVS-API-ID]',
        'svs-api-key: [SVS-API-KEY]')
      );
                                                                                                                       
      $result = curl_exec($ch);

      $err = curl_error($ch);

      curl_close($ch);

      if ($err) {
      echo "cURL Error #:" . $err;
      } else {
      echo $result;
      }
    

Response data: (json format)

      {
        "status": "success",
        "successMessage": {
          "response_code": 401,
          "message": "Updated"
        }
      }
    

POST gateway/{gatewayId}/delete

Deletes or removes a specific gateway account.

    Resource Information

  • Method: POST
  • URL: https://demo.goodfundsgateway.com/api/gateway.json/{gatewayId}/delete
  • Requires authentication? Yes

Method Parameters

Parameter Type Required Description
gatewayId int Y Specific gateway account which will be deleted or removed.

Query Parameters

N/A

PHP Sample Request: (json format)

      $gateway_id = '[Gateway ID]';

      $url = 'https://demo.goodfundsgateway.com/api/gateway.json/' . $gateway_id . '/delete';

      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
      curl_setopt($ch, CURLOPT_SSLVERSION, 6);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'svs-api-id: [SVS-API-ID]',
        'svs-api-key: [SVS-API-KEY]')
      );
                                                                                                                       
      $result = curl_exec($ch);

      $err = curl_error($ch);

      curl_close($ch);

      if ($err) {
      echo "cURL Error #:" . $err;
      } else {
      echo $result;
      }
    

Response data: (json format)

        {
          "status": "success",
          "successMessage": {
            "response_code": 402,
            "message": "Deleted"
          }
        }
      

POST gateway/{gatewayId}/default

Makes a specific gateway account the default account.

    Resource Information

  • Method: POST
  • URL: https://demo.goodfundsgateway.com/api/gateway.json/{gatewayId}/default
  • Requires authentication? Yes

Method Parameters

Parameter Type Required Description
gatewayId int Y Specific gateway account which will be marked as default.
There can be a default Credit Card & ECheck Gateway account.

Query Parameters

N/A

PHP Sample Request: (json format)

      $gateway_id = '[Gateway ID]';

      $url = 'https://demo.goodfundsgateway.com/api/gateway.json/' . $gateway_id . '/default';

      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
      curl_setopt($ch, CURLOPT_SSLVERSION, 6);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'svs-api-id: [SVS-API-ID]',
        'svs-api-key: [SVS-API-KEY]')
      );
                                                                                                                       
      $result = curl_exec($ch);

      $err = curl_error($ch);

      curl_close($ch);

      if ($err) {
      echo "cURL Error #:" . $err;
      } else {
      echo $result;
      }
    

Response data: (json format)

        {
          "status": "success",
          "successMessage": {
            "response_code": 401,
            "message": "Default Gateway Account Success"
          }
        }