website logo
Product Overview
NetSuite
Payments
QuickBooks
Xero
Navigate through spaces
⌘K
Guided Wizard
Guided Wizard Settings
Bill Configuration
Custom Guided Wizard
Button URL Structure
Button URL Generator
Support
Global API
API Overview
Request
Response
Code Examples
Technical Resources
Breadwinner Setup
Requirements
ERD / Object Structure
Getting Help
Version History
Docs powered by
Archbee
Global API
...
Request
Payment

Create

1min

The following is an example of create Payment where we are setting every possible field (See Payment for the available fields). The response will return the exact request data plus the new QuickBooks Payment Id (Id) and the newly created Salesforce Payment Id (salesforceID).

Note: You can only create one record at a time.

Request
Response
|
//  Create a Map to store all the data of a Payment
Map<String, Object> paymentMap = new Map<String, Object>(); 
    paymentMap.put('TotalAmt','100');
    paymentMap.put('DisplayName','Breadwinner Inc');
    paymentMap.put('CustomerRef' , new Map<String, Object>{'value' => '99'});

//  Initializing the RequestJSON Data to be passed.
Map<String, Object> requestJSONMap = new Map<String, Object>();
    requestJSONMap.put('payments', new List<Object>{paymentMap});
    String reqJSON = JSON.serialize(requestJSONMap);

Map<String, Object> reqObj = new Map<String, Object>();
    reqObj.put('version', '1.0');
    reqObj.put('action', 'createPayment');
    reqObj.put('requestJSON', reqJSON);
    //Required, if QuickBooks Multi-Org is enabled in Breadwinner. 
    reqObj.put('qbOrgId', '!aa00TM');

//  Placing a request to Breadwinner Global API
Map<String, Object> respMap = breadwinner_qbo.BreadwinnerQBAPI.call(reqObj);
System.debug(respMap);




Updated 12 Sep 2023
Did this page help you?
PREVIOUS
Read
NEXT
Update
Docs powered by
Archbee
Docs powered by
Archbee