Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Info |
---|
All API endpoints require an authentication header to be included with the request. See API Authentication |
Fetch Customers Collection
End-point | Method | Description |
---|---|---|
https://secure.gotobilling.com/api/customers | GET | Returns a collection of customers, along with an array containing the payment accounts for each customer. |
Collection Filters
Parameters that can be included in the query string of the request when using the GET /api/customers
endpoint.
Parameter | Type | Description |
---|---|---|
id | int or Array Filter | OmniFund assigned Customer ID |
customerRef | string | Merchant provided customer reference ID |
firstName | string | Customer first name |
lastName | string | Customer last name |
company | string | Company name |
string | Customer email address |
Request
Code Block |
---|
GET /api/customers?id[]=23143879&id[]=21879654 |
Response
Code Block |
---|
{ "@context": "/api/contexts/customers", "@id": "/api/customers", "@type": "hydra:Collection", "hydra:member": [ { "@id": "/api/customers/23143879", "@type": "customers", "id": 23143879, "customerRef": "sw-1234", "company": "Cloud City", "firstName": "Lando", "lastName": "Calrissian", "displayAs": "company", "address1": "123 main st", "address2": "", "city": "Somewhere", "state": "Co", "zip": "55555", "phone": "(800) 555-4578", "email": "test@email.com", "displayAspaymentAccounts": [ { "@type": "Bank", "@id": "company_:2270", "address1bankName": "123 main st",", "isSavings": 0, "address2businessAccount": false, "id": 46907, "cityaccountName": "", "Somewhereenabled": 1, "stateccName": "Co", "zipexpiration": "55555", "phone "referenceId": "(800) 555-4578","tok_994603312262e9bc23e53fd084234259", "maskedAccountNumber": "xx-8888" }, { "@type": "Card", "@id": "_:2271", "ccName": "Lando Calrissian", "expiration": "427", "bankName": "visa", "id": 46908, "accountName": "", "enabled": 1, "isSavings": 0, "businessAccount": 0, "referenceId": "tok_5038266569624cb6d2e6f92751499331", "maskedAccountNumber": "xx-1111" } ] }, { "@id": "/api/customers/21879654", "@type": "customers", "id": 21879654, "customerRef": "sw-1235", "company": "", "firstName": "Han", "lastName": "Solo", "displayAs": "contact", "address1": "123 main st", "address2": "", "city": "Somewhere", "state": "Co", "zip": "55555", "phone": "(800) 555-4578", "email": "test@email.com", "displayAs"paymentAccounts": [ { "@type": "contactCard", "address1": "123 main st", "@id": "_:6284", "ccName": "Han Solo", "address2expiration": "1225", "city": "Somewhere", "bankName": "visa", "id": 2964753, "stateaccountName": "", "Coenabled": 1, "zipisSavings": 0, "55555" "businessAccount": 0, "phone": "(800) 555-4578" "referenceId": "tok_92870016546269c90860653185186651", "maskedAccountNumber": "xx-2222" } ] } ], "hydra:totalItems": 2 } |
Fetch Customer Resource
Return a single customer resource based on the ID provided
End-point | Method | Description |
---|---|---|
https://secure.gotobilling.com/api/customers/{id} | GET | Return a single customer resource based on the ID provide |
Request
Code Block |
---|
GET https://secure.gotobilling.com/api/customers/2613558 |
Response
Code Block |
---|
Content-Type application/ld+json; charset=utf-8 { "@context": "/api/contexts/customers", "@id": "/api/customers/2613558", "@type": "customers", "id": 2613558, "customerRef": "123456", "company": "123 Company", "firstName": "", "lastName": "", "email": "test@email.com", "displayAs": "contact", "address1": "123 main st", "address2": "", "city": "Somewhere", "state": "Co", "zip": "55555", "phone": "(800) 555-4578", "email": "test@email.com", "paymentAccounts": [ { "@type": "Card", "@id": "_:2755", "ccName": "123 Company", "expiration": "1225", "bankName": "visa", "id": 2964777, "accountName": "", "enabled": 1, "isSavings": 0, "businessAccount": 0, "referenceId": "tok_779506319962b2a54a304c5426607837", "maskedAccountNumber": "xx-2222" } ] } |
Create Customer Resource
End-point | Method | Description |
---|---|---|
https://secure.gotobilling.com/api/customers | POST | Create a new customer resource |
Parameters
Parameter | Type | Description |
---|---|---|
customerRef | string | Required. Merchant provided customer reference ID. |
firstName | string | Customer first name |
lastName | string | Customer last name |
company | string | Company name |
string | Customer email address. Either | |
displayAs | string | Valid options: |
address1 | string | Address line 1 |
address2 | string | Address line 2 |
city | string | City |
state | string (2) | Two-characater State abbreviation |
zip | string | Zip code |
phone | string | Phone number |
Request
Code Block |
---|
POST https://secure.gotobilling.com/api/customers Content-Type application/json { "customerRef": "test-1234", "type": "individual", "firstName": "Test", "lastName": "Account", "company": "Acme Widgets", "email": "test@email.com" } |
Response
Code Block |
---|
Content-Type application/ld+json; charset=utf-8 { "@context": "/api/contexts/customers", "@id": "/api/customers/2970583", "@type": "customers", "id": 2970583, "customerRef": "test-1234", "company": "Acme Widgets", "firstName": "Test", "lastName": "Account", "email": "test@email.com", "displayAs": "contact", "address1": "", "address2": "", "city": "", "state": "", "zip": "", "phone": "" } |
Table of Contents |
---|