...
Field | Required | Description |
---|---|---|
merchant_id | Required | Merchant ID assigned by gotoBilling |
merchant_pin | Required | Merchant Pin associated with the Merchant ID. Assigned by gotoBilling |
Optional Fields
Field | Required | Max Length | Description |
---|---|---|---|
x_relay_url | Optional | an. .. | Contains the URL to which the gateway will post the response. Include http:// or https://. When set the gateway response will automatically be sent via HTTP POST to this location. |
x_relay_type | Optional | a. 7 | Indicates the type of action of the response. When ACTIVE is set the browser will automatically be sent to the location specified with x_relay_url. When PASSIVE is set the browser will not be redirected, but the response will be sent to the location specified with x_relay_url via HTTP POST. This is set to default to PASSIVE |
x_debug | Optional | n. 1 | When set to 1 (numerical one) transactions will be sent in test mode. A response will be given for the transaction, but no processing will occur. Default: 0 (zero). |
x_version | Optional | ns 3 | DEFAULT: 1.1 (When this value is set to 1.2, the transaction Gateway Response will be returned in JSON format, rather than XML format) |
Customer Fields
Field | Required | Max Length | Description |
---|---|---|---|
x_customer_id | Required | ans 32 | A unique customer Identification number set by the merchant. |
x_company | Conditional | an 32 | The company associated with the billing address. Either first name & last name, or company name must be given. |
x_last_name | Conditional | an 32 | The last name of the customer associated with the billing address. Either first name & last name, or company name must be given. |
x_first_name | Conditional | an 32 | The first name of the customer associated with the billing address. Either first name & last name, or company name must be given. |
x_address1 | Optional | an 32 | The address associated with the billing address |
x_address2 | Optional | an 32 | Continuation address associated with the billing address |
x_city | Optional | a 40 | The city associated with the billing address |
x_state | Optional | a 2 | The state associated with the billing address. The state is formatted using the two letter post abbreviation. Example: FL |
x_zip | Optional | ns 10 | The zip code associated with the billing address |
x_phone | Optional | n 10 | The phone number of the customer associated with the billing address. Does not contain any dashes – ex. 2223334444 |
x_email | Optional | ans 50 | The email of the customer associated with the billing address. |
...
<ResponseData> <status>G</status> <order_number>122879-20050804-985829</order_numbernumber> <term_code>0</term_code> <tran_amount>36.00</tran_amount> <tran_date>20160804</tran_date> <tran_time>091121</tran_time>
<ticket_id>1234</ticket_id> <auth_code>094533</auth_code>"; <description>APPROVED</description> <avs>GOOD</avs> <cvv>UNKNOWN</cvv>
</ResponseData>
Credit Card PRE-AUTH, CAPTURE
PRE-AUTH Request
POST <type>card</type>
<card>
<network>Visa</network>
<number>4111xxxxxxxx1111</number>
<expiration>1215</expiration>
</card>
</ResponseData>
Credit Card PRE-AUTH, CAPTURE
PRE-AUTH Request
POST https://secure.gotobilling.com/os/system/gateway/transact.php
Content-Type: application/x-www-form-urlencoded
merchant_id = "123456"
merchant_pin' = "gatewayPin"
x_transaction_type = "AS"
x_customer_id = "27500000001"
x_first_name = "Test"
x_last_name = "Account"
x_zip = "55555"
x_amount = "36.00"
x_cc_number = "4111111111111111"
x_cc_name = "Ester Tester"
x_cc_exp = "1215"
...
<ResponseData> <status>G</status> <order_number>123456-20050804-985829</order_number <term_code>0</term_code> <tran_amount>36.00</tran_amount> <tran_date>20160804</tran_date> <tran_time>091121</tran_time> <ticket_id>1234</ticket_id> <auth_code>094533</auth_code>"; <description>APPROVED</description> <avs>GOOD</avs> <cvv>UNKNOWN</cvv>
<type>card</type>
<card>
<network>Visa</network>
<number>4111xxxxxxxx1111</number>
<expiration>1215</expiration>
</card> <payment_token_id>tok_194bfc699e124281b87f1ad4266e64be</payment_token_id> </ResponseData>
...
<ResponseData>
<status>G</status>
<order_number>123456-20170509-59120e0c5b178</order_number>
<term_code>0</term_code>
<tran_amount>36.00</tran_amount>
<tran_date>20160804</tran_date>
<tran_time>091121</tran_time>
<ticket_id>1234</ticket_id>
<auth_code>094533</auth_code>";
<description>APPROVED</description>
<avs>GOOD</avs>
<cvv>UNKNOWN</cvv>
<phard_code>SUCCESS</phard_code>
<payment_token_id>tok_194bfc699e124281b87f1ad4266e64be</payment_token_id>
</ResponseData>
...
<ResponseData> <status>G</status> <order_number>123456-20161128-583c83a833fcd</order_number> <term_code>0</term_code> <tran_amount></tran_amount> <tran_date>20161128</tran_date> <tran_time>132112</tran_time> <invoice_id></invoice_id> <transaction_id></transaction_id>
<type>card</type>
<card>
<network>Visa</network>
<number>4111xxxxxxxx1111</number>
<expiration>1215</expiration>
</card> <payment_token_id>tok_9fc0739aa554441e96151bae88943154</payment_token_id> </ResponseData>
...
<ResponseData> <status>G</status> <order_number>122879-20050804-985829</order_number <term_code>0</term_code> <tran_amount>36.00</tran_amount> <tran_date>20160804</tran_date> <tran_time>091121</tran_time> <ticket_id>1234</ticket_id> <auth_code>094533</auth_code>"; <description>APPROVED</description> <avs>GOOD</avs> <cvv>UNKNOWN</cvv>
<type>card</type>
<card>
<payment_token_id>tok_5aeda1a4e5e244cbbb45d6594dbb1ad</payment_token_id> </ResponseData>
...
<network>Visa</network>
<number>4111xxxxxxxx1111</number>
<expiration>1215</expiration>
</card> <payment_token_id>tok_5aeda1a4e5e244cbbb45d6594dbb1ad</payment_token_id> </ResponseData>
Subsequent Requests
All other request may utilize the 'x_payment_token_id' instead of the card data.
...
The Gateway Response API defines the type of information that will be sent by the gateway once a transaction has been processed. The gateway response type can be changed from the default XML response to a JSON response by passing in x_version=1.2 through incoming parameters, as outlined in the Optional Fields section above.
Non-Rely Response.
Gateway Responses are delimited by the GOTOBILLING tags:
<ResponseData> </ResponseData>
Tag name | Description |
---|---|
<status></status> | Transaction Status. Values are:
Response Statuses for Various Transaction Types: Credit Card:
Future dated transactions always get R on both Credit Card and ACH transactions. When using the ACH Verification option, if an ACH transaction receives an Authorization the status sent back will be R, if it is Declined, the status will be D. An |
<order_number></order_number> | A 22-digit code, formatted nnnn-nnnnn-nnnnn, used by GOTOBILLING to synchronize and track transactions and orders. It is not used or recognized by the GOTOBILLING host computers. |
<term_code></term_code> | The reason the gotoBilling process terminated. Values are: 30998 Internal software error. 20999 Missing or invalid Merchant-ID 20998 Could not validate Merchant-ID 20997 Invalid server (potential security violation) 20996 Missing transaction type 20995 Invalid transaction type 20994 Reserved 20993 Reserved 20992 Reserved 20991 Reserved 20990 Reserved 20989 Both Card and Check services are turned off 20988 Merchant is not approved for service 20987 Reserved 20986 Reserved 20985 Reserved 20984 Reserved 20983 Reserved 20982 Reserved 20981 Reserved 20980 Reserved 20979 A required transaction field is missing 20978 A required transaction field is invalid/missing 0 Normal Termination On 20979 and 20978 the <description> field will tell what field it is that is missing or invalid. |
<tran_amount></tran_amount> | The amount of the transaction. This field should be the same as the field x_amount in the submitted transaction (see above). |
<tran_date></tran_date> | Date Stamp of when the transaction was processed. Format: YYYYMMDD |
<tran_time></tran_time> | Time Stamp of when the transaction was processed. Format: HHMMSS |
<invoice_id></invoice_id> | Echo of merchant submitted Order ID |
<ticket_id></ticket_id> | For credit card transactions this is the 'x_ticket_id' that is used when performing a void or refund. |
<auth_code></auth_code> | Reference number identifying the transaction on the gateway |
<description></description> | Description of any error or decline returned for the transaction. |
<avs></avs> | AVS response text
|
<cvv></cvv> | CVV response text
|
| |
<phard_code></phard_code> | Text supplied by the card issuer. Generally additional details about a decline |
<version></version> | (optional response) Version response text is returned ONLY when x_version is specified in incoming parameters.
|
<type></type> | (Conditional response based on type of payment specified) The type of payment received will be indicated by the following values:
The type value returned in this node will indicate what payment type value node to look for in the provided response. |
<card> <network></network> <number></number> <expiration></expiration> </card> | (Conditional response provided ONLY for Credit Card payments) Additional information about the credit card payment type will now be included in the card node. Children nodes include:
|
<bank> <account></account> <routing></routing> </bank> | (Conditional response provided ONLY for ACH payments) Additional information about the ACH payment type will now be included in the bank node. Children nodes include:
|
<payment_token_id></payment_token_id> | Token assigned to the payment account. Can be used in subsequent request instead of providing the actual card or bank details. |
Example Non-Relay Response Data
...
<ResponseData> <status>D</status> <order_number>122879-20081217198384</order_number> <term_code>0</term_code> <tran_amount>1.01</tran_amount> <tran_date>20081217</tran_date> <tran_time>131643</tran_time> <invoice_id>44444</invoice_id> <description>CHEXDIRECT|DECLINE CHECK|3 UNPAIDS (ALL)|UNPAID AMT= 35|PHN 800-238-5888|EXPRESS RECOVERY</description>
</ResponseData>
Level 2 Verification Information
...