GoodFunds Gateway - RESTful API Documentation

Payment Methods

Payment Method can be either a credit card or eCheck stored in the Secure Vault System which can be used for recurring charges or as individual charges at any time as needed.

Requirements for Credit Cards:
In order to successfully save any Payment Method that is a credit card in our system we will need your account to be setup with tokenization. We no longer store Primary Account Numbers but in turn have created a more secure environment. With tokenization we will be able to process your credit cards using tokenization instead of processing with the full credit card details.

This does not apply towards eCheck processing.

GET paymentmethods

List all payment methods of a specific customer.

    Resource Information

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

Method Parameters

N/A

Query Parameters

Parameter Type Required Description
method_type string N (default) : Will show all payment methods
"1" : Will Show only credit card payment methods
"2" : Will Show only eCheck payment methods
customer_id int N Only show payment methods for this specific customer
internal_id int N Only show payment methods for this specific customer
filter node N Filter Node for setting the following: sort, sort_dir, & limit
sort string N Sort by either of the following values:
customer_id, internal_id, method_type_cc, method_type_echeck, or payment_method_id
Default: payment_method_id
sort_dir string N Sort direction by either of the following values:
ASC or DSC
Default: DESC
limit int N Limits the number of results returned

PHP Sample Request: (json format)

      $data = array(
        'method_type' =>  1,
        'customer_id' =>  '1212',
        'internal_id' =>  '1375894109',
        'filter'    =>  array(
          'sort'    =>  'internal_id',
          'limit'   =>  '5',
          'sort_dir'  =>  'ASC'
        )
      );

      if(isset($data))
      {
        $url = 'https://demo.goodfundsgateway.com/demoapi/paymentmethods.json?' . http_build_query($data);
      }
      else
      {
        $url = 'https://demo.goodfundsgateway.com/demoapi/paymentmethods.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": 706,
          "message": {
            "paymentmethods": [
              {
                "id": "[Payment Method ID]",
                "client_id": "[Client ID]",
                "customer_id": "[Customer ID]",
                "internal_id": "[Internal ID]",
                "billing_info": {
                  "first_name": "Cristina",
                  "last_name": "Andres",
                  "company": "",
                  "address1": "4242 Cypress Hill Rd",
                  "address2": "",
                  "city": "Bayshore",
                  "state": "CA",
                  "postal_code": "94326",
                  "country": "USA",
                  "phone": "415-555-2174",
                  "email": "cristina@samplename.com"
                },
                "shipping_info": {
                  "first_name": "Cristina",
                  "last_name": "Andres",
                  "company": "",
                  "address1": "4242 Cypress Hill Rd",
                  "address2": "",
                  "city": "Bayshore",
                  "state": "CA",
                  "postal_code": "94326",
                  "country": "USA"
                },
                "level3": {
                  "ship_from_postal_code": "92106",
                  "destination_postal_code": "94326",
                  "frieght_number": "",
                  "duty_amount": "",
                  "item_product_code": "",
                  "item_commodity_code": "",
                  "item_description": "",
                  "item_quantity": "",
                  "item_unit_of_measure": "",
                  "item_extended_amount": ""
                },
                "credit_card": {
                  "cc_masked": "41**********1111",
                  "name": "Cristina Andres",
                  "card_type": "VISA",
                  "exp_month": "01",
                  "exp_year": "2017",
                  "lastfour": "1111"
                },
                "defaults": "1",
                "method_type": "1",
                "payment_method_active": "1"
              },
              {
                "id": "[Payment Method ID]",
                "client_id": "[Client ID]",
                "customer_id": "[Customer ID]",
                "internal_id": "[Internal ID]",
                "billing_info": {
                  "first_name": "Cristina",
                  "last_name": "Andres",
                  "company": "",
                  "address1": "4242 Cypress Hill Rd",
                  "address2": "",
                  "city": "Bayshore",
                  "state": "CA",
                  "postal_code": "94326",
                  "country": "USA",
                  "phone": "415-555-2174",
                  "email": "cristina@samplename.com"
                },
                "shipping_info": {
                  "first_name": "Cristina",
                  "last_name": "Andres",
                  "company": "",
                  "address1": "4242 Cypress Hill Rd",
                  "address2": "",
                  "city": "Bayshore",
                  "state": "CA",
                  "postal_code": "94326",
                  "country": "USA"
                },
                "level3": {
                  "ship_from_postal_code": "92106",
                  "destination_postal_code": "94326",
                  "frieght_number": "",
                  "duty_amount": "",
                  "item_product_code": "",
                  "item_commodity_code": "",
                  "item_description": "",
                  "item_quantity": "",
                  "item_unit_of_measure": "",
                  "item_extended_amount": ""
                },
                "echeck": {
                  "name": "John Doe",
                  "account_number": "****0002",
                  "routing_number": "321174851",
                  "bank_account_type": "1",
                  "bank_holder_type": "0",
                  "seccode": "",
                  "lastfour": "1111"
                },
                "defaults": "1",
                "method_type": "1",
                "payment_method_active": "1"
              }
            ]
          }
        }
      }
    

POST paymentmethod

Creates a credit card payment method under a specific customer.

    Resource Information

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

Method Parameters

N/A

Query Parameters

Parameter Type Required Description
gateway_id int N Unique gateway account id to be used for tokenization.
customer node N Customer Node: Customer information node
internal_id string N A username or user ID in your own records, e.g. "Simulatedusername", "98765432".
first_name string Y Joe
last_name string Y Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
billto node N Billto Node: Billing information to be attached for the specific Credit Card
first_name string Y Joe
last_name string Y Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
shipto node N Shipto Node: Shipping information to be attached for the specific Credit Card
first_name string N Joe
last_name string N Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
level3 node N Level3 Node: Level3 information to be attached for the specific Credit Card
ship_from_postal_code string N Postal code for the address from which the goods are shipped, e.g. "A1B2C3", "90210".
destination_postal_code string N Postal code for the shipping address.
This is the same as level3_ship_from_postal_code when your customer takes possession of the items at your location.
e.g. "A1B2C3", "90210".
frieght_number string N The frieght number.
duty_amount string N Total charges for any import or export duties included in the order
item_product_code string N Product code for the item. In the United States, this may be a UPC code, part number, or product number.
item_commodity_code string N Commodity code used to classify the item.
item_description string N Text description of the item.
item_quantity string N Number of units of the item purchased. Must be a whole number.
item_unit_of_measure string N Unit of measure, or unit of measure code, for the item.
item_extended_amount string N The item extended amount.
creditcard node Y Credit Card Node: Credit Card information to be saved
creditcard_name string Y Full Name printed on Credit Card.
creditcard_number string Y Full Credit Card number otherwise known as Primary Account Number.
creditcard_type string N Credit Card brand, e.g. "Visa", "MasterCard".
Supported Brands if not present:
Visa, MasterCard, Discover, AmericanExpress, DinersClub, JCB, EnRoute, & Maestro
creditcard_exp_month int Y Credit Card 2-digit expiration month, e.g. "01", "12".
creditcard_exp_year int Y Credit Card 4-digit expiration year, e.g. "2020".
creditcard_cvv int N Credit Card Security Code, e.g. "222" or for American Express "2222".
CVV: Will not be stored / saved in any manner this is just for verification of credit card purposes only
default int Y "1" : Make this payment method default for this specific customer
"0" : (Default) Don't make this payment method default payment method for this specific customer

PHP Example CC Request: (json format)

      $data = array(
          'gateway_id'   =>  '[Gateway ID]',
          'customer'    =>  array(
            'internal_id'   =>  '1375894109',
            'first_name'    =>  'John',
            'last_name'     =>  'Doe',
            'company'       =>  'John Doe\'s Bakery',
            'address_1'     =>  '321 Way St.',
            'address_2'     =>  'Suite 400',
            'city'          =>  'San Diego',
            'state'         =>  'CA',
            'postal_code'   =>  '92020',
            'country'       =>  'US',
            'phone'         =>  '619-444-5555',
            'email'         =>  'example@domain.com'
          ),
          'billto'  =>  array(
            'first_name'      =>  'John',
            'last_name'       =>  'Doe',
            'company'         =>  'John Doe\'s Bakery',
            'address_1'       =>  '321 Way St.',
            'address_2'       =>  'Suite 400',
            'city'            =>  'San Diego',
            'state'           =>  'CA',
            'postal_code'     =>  '92020',
            'country'         =>  'US',
            'phone'           =>  '619-444-5555',
            'email'           =>  'example@domain.com;example2@domain.com'
          ),
          'shipto'  =>  array(
            'first_name'    =>  'John',
            'last_name'     =>  'Doe',
            'company'       =>  'John Doe\'s Bakery',
            'address_1'     =>  '321 Way St.',
            'address_2'     =>  'Suite 400',
            'city'          =>  'San Diego',
            'state'         =>  'CA',
            'postal_code'   =>  '92020',
            'country'       =>  'US',
            'phone'         =>  '619-444-5555',
            'email'         =>  'example@domain.com'
          ),
          'level3'  =>  array(
            'ship_from_postal_code'   =>  '92106',
            'destination_postal_code' =>  '92020'
          ),
          'creditcard'  =>  array(
            'creditcard_name'       =>  'John Doe',
            'creditcard_number'     =>  '4111111111111111',
            'creditcard_type'       =>  'VISA',
            'creditcard_exp_month'  =>  '05',
            'creditcard_exp_year'   =>  '2018',
            'creditcard_cvv'        =>  '222'
          ),
          'default'  =>  '1'
        );

      $data_string = json_encode($data);

      $ch = curl_init('https://demo.goodfundsgateway.com/demoapi/paymentmethod.json');
      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": 700,
          "message": {
            "payment_method": {
              "payment_method_id": [Payment Method ID]
            }
          }
        }
      }
    

POST paymentmethod

Creates a eCheck payment method under a specific customer.

    Resource Information

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

Method Parameters

N/A

Query Parameters

Parameter Type Required Description
gateway_id int N Unique gateway account id to be used for tokenization.
customer node N Customer Node: Customer information node
internal_id string N A username or user ID in your own records, e.g. "Simulatedusername", "98765432".
first_name string Y Joe
last_name string Y Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
billto node N Billto Node: Billing information to be attached for the specific Credit Card
first_name string Y Joe
last_name string Y Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
shipto node N Shipto Node: Shipping information to be attached for the specific Credit Card
first_name string N Joe
last_name string N Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
level3 node N Level3 Node: Level3 information to be attached for the specific Credit Card
ship_from_postal_code string N Postal code for the address from which the goods are shipped, e.g. "A1B2C3", "90210".
destination_postal_code string N Postal code for the shipping address.
This is the same as level3_ship_from_postal_code when your customer takes possession of the items at your location.
e.g. "A1B2C3", "90210".
frieght_number string N The frieght number.
duty_amount string N Total charges for any import or export duties included in the order
item_product_code string N Product code for the item. In the United States, this may be a UPC code, part number, or product number.
item_commodity_code string N Commodity code used to classify the item.
item_description string N Text description of the item.
item_quantity string N Number of units of the item purchased. Must be a whole number.
item_unit_of_measure string N Unit of measure, or unit of measure code, for the item.
item_extended_amount string N The item extended amount.
echeck node N ECheck Node: ECheck information for that specific ECheck
echeck_name string Y Full Name as printed on Check.
echeck_account_number int Y Full ABA Bank Account Number.
echeck_routing_number int Y Full ABA Bank Rounting Number.
Must be 9 digits length
echeck_account_type int Y "0" : Business Bank Account
"1" : Personal Bank Account
echeck_holder_type int Y "0" : Checking Account
"1" : Savings Account
echeck_seccode int Y "WEB" : Internet-Initiated Entry
"TEL" : Telephone-Initiated Entry
"PPD" : Prearranged Payment & Deposit Entry
"CCD" : Cash Concentration or Disbursement
default int Y "1" : Make this payment method default for this specific customer
"0" : (Default) Don't make this payment method default payment method for this specific customer

PHP Example ECheck Request: (json format)

      $data = array(
          'gateway_id'   =>  '[Gateway ID]',
          'customer'    =>  array(
            'internal_id'   =>  '1375894109',
            'first_name'    =>  'John',
            'last_name'     =>  'Doe',
            'company'       =>  'John Doe\'s Bakery',
            'address_1'     =>  '321 Way St.',
            'address_2'     =>  'Suite 400',
            'city'          =>  'San Diego',
            'state'         =>  'CA',
            'postal_code'   =>  '92020',
            'country'       =>  'US',
            'phone'         =>  '619-444-5555',
            'email'         =>  'example@domain.com'
          ),
          'billto'  =>  array(
            'first_name'      =>  'John',
            'last_name'       =>  'Doe',
            'company'         =>  'John Doe\'s Bakery',
            'address_1'       =>  '321 Way St.',
            'address_2'       =>  'Suite 400',
            'city'            =>  'San Diego',
            'state'           =>  'CA',
            'postal_code'     =>  '92020',
            'country'         =>  'US',
            'phone'           =>  '619-444-5555',
            'email'           =>  'example@domain.com;example2@domain.com'
          ),
          'shipto'  =>  array(
            'first_name'    =>  'John',
            'last_name'     =>  'Doe',
            'company'       =>  'John Doe\'s Bakery',
            'address_1'     =>  '321 Way St.',
            'address_2'     =>  'Suite 400',
            'city'          =>  'San Diego',
            'state'         =>  'CA',
            'postal_code'   =>  '92020',
            'country'       =>  'US',
            'phone'         =>  '619-444-5555',
            'email'         =>  'example@domain.com'
          ),
          'level3'  =>  array(
            'ship_from_postal_code'   =>  '92106',
            'destination_postal_code' =>  '92020'
          ),
          'echeck'  =>  array(
            'echeck_name'           =>  'John Doe',
            'echeck_account_number' =>  '9900000003',
            'echeck_routing_number' =>  '321174851',
            'echeck_account_type'   =>  '1',
            'echeck_holder_type'    =>  '0',
            'echeck_seccode'        =>  'PPD'
          ),
          'default'  =>  '1'
        );

      $data_string = json_encode($data);

      $ch = curl_init('https://demo.goodfundsgateway.com/demoapi/paymentmethod.json');
      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": 700,
          "message": {
            "payment_method": {
              "payment_method_id": [Payment Method ID]
            }
          }
        }
      }
    

GET paymentmethod/{paymentmethodId}

Get details of a specific payment method by Payment Method ID.

    Resource Information

  • Method: GET
  • URL: https://demo.goodfundsgateway.com/demoapi/paymentmethod.json/{paymentmethodId}
  • Requires authentication? Yes

Method Parameters

Parameter Type Required Description
paymentmethodId int Y Unique payment method id generated by Receive Pay

Query Parameters

N/A

PHP Example Request:

        $data = '3324';

        $url = 'https://demo.goodfundsgateway.com/demoapi/paymentmethod.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": 706,
            "message": {
              "payment_method": {
                "id": "[Payment Method ID]",
                "client_id": "[Client ID]",
                "customer_id": "[Customer ID]",
                "internal_id": "[Internal ID]",
                "billing_info": {
                  "first_name": "[Billing First Name]",
                  "last_name": "[Billing First Name]",
                  "company": "[Billing Company Name]",
                  "address1": "[Billing Street Address]",
                  "address2": "[Billing Address Line 2]",
                  "city": "[Billing City]",
                  "state": "[Billing State]",
                  "postal_code": "[Billing Postal Code]",
                  "country": "[Billing Country]",
                  "phone": "[Billing Phone Number]",
                  "email": "[Billing Email]"
                }, // If shipping info was saved
                "shipping_info": {
                  "first_name": "[Shipping First Name]",
                  "last_name": "[Shipping Last Name]",
                  "company": "[Shipping Company]",
                  "address1": "[Shipping Street Address]",
                  "address2": "[Shipping Address Line 2]",
                  "city": "[Shipping City]",
                  "state": "[Shipping State]",
                  "postal_code": "[Shipping Postal Code]",
                  "country": "[Shipping Country]"
                }, // If Level 3 information was saved
                "level3": {
                  "ship_from_postal_code": "[Ship From Postal Code]",
                  "destination_postal_code": "[Destination Postal Code]",
                  "frieght_number": "[Frieght Number]",
                  "duty_amount": "[Duty Amount]",
                  "item_product_code": "[Item Product Code]",
                  "item_commodity_code": "[Item Commodity Code]",
                  "item_description": "[Item Description]",
                  "item_quantity": "[Item Quantity]",
                  "item_unit_of_measure": "[Item Unit of Measure]",
                  "item_extended_amount": "[Item Extended Amount]"
                },
                "credit_card": {
                  "name": "[Full Name On Credit Card]",
                  "cc_masked": "[Masked Credit Card]",
                  "card_type": "[Credit Card Brand]",
                  "exp_month": "[Expire Month]",
                  "exp_year": "[Expire Year]",
                  "lastfour": "[Last Four]"
                },
                "default": "[Default]",
                "method_type": "[Payment Method Type]",
                "payment_method_active": "[Active]"
              }
            }
          }
        }
      

POST paymentmethod/{paymentmethodId}/update

Update details of a specific credit card payment method by Payment Method ID.

    Resource Information

  • Method: POST
  • URL: https://demo.goodfundsgateway.com/demoapi/paymentmethod.json/{paymentmethodId}/update
  • Requires authentication? Yes

Method Parameters

Parameter Type Required Description
paymentmethodId int Y Unique payment method id generated by Receive Pay

Query Parameters

Parameter Type Required Description
gateway_id int N Unique gateway account id to be used for tokenization.
customer node N Customer Node: Customer information node
internal_id string N A username or user ID in your own records, e.g. "Simulatedusername", "98765432".
first_name string Y Joe
last_name string Y Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
billto node N Billto Node: Billing information to be attached for the specific Credit Card
first_name string Y Joe
last_name string Y Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
shipto node N Shipto Node: Shipping information to be attached for the specific Credit Card
first_name string N Joe
last_name string N Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
level3 node N Level3 Node: Level3 information to be attached for the specific Credit Card
ship_from_postal_code string N Postal code for the address from which the goods are shipped, e.g. "A1B2C3", "90210".
destination_postal_code string N Postal code for the shipping address.
This is the same as level3_ship_from_postal_code when your customer takes possession of the items at your location.
e.g. "A1B2C3", "90210".
frieght_number string N The frieght number.
duty_amount string N Total charges for any import or export duties included in the order
item_product_code string N Product code for the item. In the United States, this may be a UPC code, part number, or product number.
item_commodity_code string N Commodity code used to classify the item.
item_description string N Text description of the item.
item_quantity string N Number of units of the item purchased. Must be a whole number.
item_unit_of_measure string N Unit of measure, or unit of measure code, for the item.
item_extended_amount string N The item extended amount.
creditcard node Y Credit Card Node: Credit Card information to be saved
creditcard_name string Y Full Name printed on Credit Card.
creditcard_number string Y Full Credit Card number otherwise known as Primary Account Number.
creditcard_type string N Credit Card brand, e.g. "Visa", "MasterCard".
Supported Brands if not present:
Visa, MasterCard, Discover, AmericanExpress, DinersClub, JCB, EnRoute, & Maestro
creditcard_exp_month int Y Credit Card 2-digit expiration month, e.g. "01", "12".
creditcard_exp_year int Y Credit Card 4-digit expiration year, e.g. "2020".
creditcard_cvv int N Credit Card Security Code, e.g. "222" or for American Express "2222".
CVV: Will not be stored / saved in any manner this is just for verification of credit card purposes only
default int Y "1" : Make this payment method default for this specific customer
"0" : (Default) Don't make this payment method default payment method for this specific customer

PHP Example Request: (json format)

      $data = array(
          'gateway_id'   =>  '[Gateway ID]',
          'customer'    =>  array(
            'internal_id'   =>  '1375894109'
          ),
          'billto'  =>  array(
            'first_name'      =>  'John',
            'last_name'       =>  'Doe',
            'company'         =>  'John Doe\'s Bakery',
            'address_1'       =>  '321 Way St.',
            'address_2'       =>  'Suite 400',
            'city'            =>  'San Diego',
            'state'           =>  'CA',
            'postal_code'     =>  '92020',
            'country'         =>  'US',
            'phone'           =>  '619-444-5555',
            'email'           =>  'example@domain.com;example2@domain.com'
          ),
          'shipto'  =>  array(
            'first_name'    =>  'John',
            'last_name'     =>  'Doe',
            'company'       =>  'John Doe\'s Bakery',
            'address_1'     =>  '321 Way St.',
            'address_2'     =>  'Suite 400',
            'city'          =>  'San Diego',
            'state'         =>  'CA',
            'postal_code'   =>  '92020',
            'country'       =>  'US',
            'phone'         =>  '619-444-5555',
            'email'         =>  'example@domain.com'
          ),
          'level3'  =>  array(
            'ship_from_postal_code'   =>  '92106',
            'destination_postal_code' =>  '92020'
          ),
          'creditcard'  =>  array(
            'creditcard_name'       =>  'John Doe',
            'creditcard_number'     =>  '4111111111111111',
            'creditcard_type'       =>  'VISA',
            'creditcard_exp_month'  =>  '05',
            'creditcard_exp_year'   =>  '2018',
            'creditcard_cvv'        =>  '222'
          ),
          'default'  =>  '1'
        );

        $data_string = json_encode($data);

        $payment_method_id = '3343';

        $url = 'https://demo.goodfundsgateway.com/demoapi/paymentmethod.json/'. $payment_method_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": 701,
          "message": "Updated Payment Method"
        }
      }
    

POST paymentmethod/{paymentmethodId}/update

Update details of a specific eCheck payment method by Payment Method ID.

    Resource Information

  • Method: POST
  • URL: https://demo.goodfundsgateway.com/demoapi/paymentmethod.json/{paymentmethodId}/update
  • Requires authentication? Yes

Method Parameters

Parameter Type Required Description
paymentmethodId int Y Unique payment method id generated by Receive Pay

Query Parameters

Parameter Type Required Description
gateway_id int N Unique gateway account id to be used for tokenization.
customer node N Customer Node: Customer information node
internal_id string N A username or user ID in your own records, e.g. "Simulatedusername", "98765432".
first_name string Y Joe
last_name string Y Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
billto node N Billto Node: Billing information to be attached for the specific Credit Card
first_name string Y Joe
last_name string Y Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
shipto node N Shipto Node: Shipping information to be attached for the specific Credit Card
first_name string N Joe
last_name string N Smith
company string N John Smith Plumbing
address_1 string N 12345 Simulated St.
address_2 string N For apartment/unit/suite #'s, eg. "Unit 2".
city string N San Diego
state string N The state/province/region of the customer. For the US and Canada, this must be supplied as the two letter abbreviation, eg. "CA"
postal_code string N The zip or postal code of the user, e.g. "A1B2C3", "90210".
country string N The ISO 3166-1 alpha-3 code of the customer's country, e.g. "CAN", "USA".
email string N A valid email address for the customer. Email node can be generated more than once inside the emails wrapper.
phone string N Supported: 1-555-555-0000 | 555-555-5555 | 555.555.5555 | 555 555 5555 | (555) 555-5555
level3 node N Level3 Node: Level3 information to be attached for the specific Credit Card
ship_from_postal_code string N Postal code for the address from which the goods are shipped, e.g. "A1B2C3", "90210".
destination_postal_code string N Postal code for the shipping address.
This is the same as level3_ship_from_postal_code when your customer takes possession of the items at your location.
e.g. "A1B2C3", "90210".
frieght_number string N The frieght number.
duty_amount string N Total charges for any import or export duties included in the order
item_product_code string N Product code for the item. In the United States, this may be a UPC code, part number, or product number.
item_commodity_code string N Commodity code used to classify the item.
item_description string N Text description of the item.
item_quantity string N Number of units of the item purchased. Must be a whole number.
item_unit_of_measure string N Unit of measure, or unit of measure code, for the item.
item_extended_amount string N The item extended amount.
echeck node N ECheck Node: ECheck information for that specific ECheck
echeck_name string Y Full Name as printed on Check.
echeck_account_number int Y Full ABA Bank Account Number.
echeck_routing_number int Y Full ABA Bank Rounting Number.
Must be 9 digits length
echeck_account_type int Y "0" : Business Bank Account
"1" : Personal Bank Account
echeck_holder_type int Y "0" : Checking Account
"1" : Savings Account
default int Y "1" : Make this payment method default for this specific customer
"0" : (Default) Don't make this payment method default payment method for this specific customer

PHP Example Request: (json format)

      $data = array(
          'gateway_id'   =>  '[Gateway ID]',
          'customer'    =>  array( // Customer Job From QB's
            'internal_id'   =>  '1375894109'
          ),
          'billto'  =>  array( // AVS billing information
            'first_name'      =>  'Josh',
            'last_name'       =>  'Doe',
            'company'         =>  'John Doe\'s Bakery',
            'address_1'       =>  '321 Way St.',
            'address_2'       =>  'Suite 400',
            'city'            =>  'San Diego',
            'state'           =>  'CA',
            'postal_code'     =>  '92020',
            'country'         =>  'US',
            'phone'           =>  '619-444-5555',
            'email'           =>  'example@domain.com;example@domain.com'
          ),
          'shipto'  =>  array( // Shipping information
            'first_name'    =>  'John',
            'last_name'     =>  'Doe',
            'company'       =>  'John Doe\'s Bakery',
            'address_1'     =>  '321 Way St.',
            'address_2'     =>  'Suite 400',
            'city'          =>  'San Diego',
            'state'         =>  'CA',
            'postal_code'   =>  '92020',
            'country'       =>  'US',
            'phone'         =>  '619-444-5555',
            'email'         =>  'example@domain.com'
          ),
          'level3'  =>  array( // Level 3 data to be sent to processor
            'ship_from_postal_code'   =>  '92106',
            'destination_postal_code' =>  '92020'
          ),
          'echeck'  =>  array( // ECheck information
            'echeck_name'           =>  'John Doe',
            'echeck_account_number' =>  '****0002',
            'echeck_routing_number' =>  '321174851',
            'echeck_account_type'   =>  '1',
            'echeck_holder_type'    =>  '0'
          ),
          'default'  =>  '1'
        );

        $data_string = json_encode($data);

        $payment_method_id = '3350';

        $url = 'https://demo.goodfundsgateway.com/demoapi/paymentmethod.json/'. $payment_method_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": 701,
          "message": "Updated Payment Method"
        }
      }
    

POST paymentmethod/{paymentmethodId}/delete

Deletes a specific payment method.

    Resource Information

  • Method: POST
  • URL: https://demo.goodfundsgateway.com/demoapi/paymentmethod/{paymentmethodId}/delete
  • Requires authentication? Yes

Method Parameters

Parameter Type Required Description
paymentmethodId int Y Unique Payment Method ID generated by Receive Pay.

Query Parameters

Parameter Type Required Description
gateway_id int N Unique gateway account id to be used for deleting token from processor end.

PHP Example Request: (json format)

      $data = array(
          'gateway_id'   =>  '[Gateway ID]'
        );

        $data_string = json_encode($data);

        $payment_method_id = '3350';

        $url = 'https://demo.goodfundsgateway.com/demoapi/paymentmethod.json/'. $payment_method_id .'/delete';

        $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)

        $payment_method_id = '3343';

        $url = 'https://demo.goodfundsgateway.com/demoapi/paymentmethod.json/'. $payment_method_id .'/delete';

        $ch = curl_init($url);                                                                      
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        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": 702,
            "message": "Payment Method Deleted"
          }
        }