Card transactions
Read-only. Gateway transaction records. Card data is never returned.
The object#
| Field | Type | Description |
|---|---|---|
| idread-only | integer | NolaPro id. |
| customerid | integer | Reference to customers, by id. Write either this or customer. |
| customer | string(30) | Code for the referenced customer, instead of the id. |
| b2buserid | integer | The B2B portal login that submitted the payment, when it came through the portal; 0 for payments taken inside NolaPro. |
| ccaccountid | integer | The gateway account (ccaccounts) the transaction ran through. |
| referid | integer | Row id in refertable of the document the payment applies to. |
| refertable | string(50) | Which table referid points at: arinvoice for invoice payments, gltransvoucher for deposit transactions. |
| transtype | string(1) | Transaction type sent to the gateway: S = sale, A = authorization, D = prior-authorization capture, F = capture only, C = credit, V = void. |
| cardtype | string(20) | Card brand as the gateway reported it (Visa, MasterCard, American Express, Discover). |
| amountmoney | string(4dp) | Total amount sent to the gateway. Stored as decimal(12,4). |
| nontaxablemoney | string(4dp) | Non-taxable portion of the amount, sent for level-2 card data. Stored as decimal(12,4). |
| shippingmoney | string(4dp) | Shipping portion of the amount, sent for level-2 card data. Stored as decimal(12,4). |
| taxmoney | string(4dp) | Tax portion of the amount, sent for level-2 card data. Stored as decimal(12,4). |
| transid | string(30) | The gateway’s reference number for this transaction. |
| optionalid | string(80) | Gateway-specific secondary reference: the batch reference number for middleware transactions, the saved payment-method id for appointment charges. |
| resultcode | string(1) | Outcome: A = approved, D = denied, E = error. |
| resultreasoncode | integer | Numeric reason code the gateway returned alongside resultcode. |
| resultreasontext | string(255) | Human-readable response text from the gateway. |
| authcode | string(25) | Authorization code the processor returned for an approved transaction - the code printed on receipts. |
| avscode | string(2) | Address Verification System result code from the gateway. |
| customerip | string(25) | IP address the payment was submitted from, recorded for card-not-present transactions. |
| customerconfirmation | string(20) | Confirmation number generated for the customer’s receipt. |
| authopen | integer | 1 while an authorization (transtype A) has not been captured; cleared when the capture or void arrives. |
| entrydate | string | When the record was created. |
| authtransid | string(30) | Gateway transaction id of the original authorization a capture or void applies to. |
| authorize_extra | integer | Extra percentage added when authorizing, from the account’s Extra Auth Percent option (tip headroom); 0 otherwise. |
| userdata | string(255) | Free-form gateway passthrough data. Rarely populated. |
| billingaddress | string(100) | Billing street address sent to the gateway for address verification. |
| billingcity | string(50) | Billing city sent to the gateway for address verification. |
| billingstate | string(50) | Billing state sent to the gateway for address verification. |
| billingzip | string(20) | Billing ZIP sent to the gateway for address verification. |
| cardpresent | integer | 1 when the card was physically present (swiped or tapped); 0 for keyed and online payments. |
| currency | string(10) | Currency code of the charge. |
| curratenumber | string(10dp) | Numeric string, 10 decimal places. Not money - do not apply currency rounding. |
Endpoints#
GET/cctransactions
200403
List card transactions.
Requires scope banking:read.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| customerid | query | string | Restrict to one customerid. |
| include | query | string | Comma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions. |
When it fails
| Status | Code | Meaning |
|---|---|---|
| 403 | insufficient_scope | Token lacks read scope. |
curl \ 'https://acme.nolapro.com/!/api/v2/cctransactions' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/cctransactions'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/cctransactions", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/cctransactions', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/cctransactions"); res.EnsureSuccessStatusCode();
GET/cctransactions/{id}
200404
Retrieve one record.
Requires scope banking:read.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| include | query | string | Comma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions. |
When it fails
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No record with that id. |
curl \ 'https://acme.nolapro.com/!/api/v2/cctransactions/104' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/cctransactions/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/cctransactions/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/cctransactions/104', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/cctransactions/104"); res.EnsureSuccessStatusCode();
Response 200
{
"customerid": 104,
"customer": "Example customer",
"ccaccountid": 104,
"referid": 104,
"refertable": "Example refertable",
"transtype": "Example transtype"
}