Global API
...
Request
Customer
Update Customer
1min
The following is an example of Update Customer. The Processor Customer Id (processorCustomerId) is required to update the customer.
Updated 03 Mar 2023

Did this page help you?
The following is an example of Update Customer. The Processor Customer Id (processorCustomerId) is required to update the customer.
// Create a Map to store all the data of a Customer Map<String, Object> customerMap = new Map<String, Object>(); customerMap.put('processorCustomerId', 'processorCustomerId'); customerMap.put('customerName', 'Johnny Doe'); customerMap.put('email', 'test@bwp.com'); customerMap.put('customerPhone', '616-928-5099'); // Create Stripe Address data customerMap.put('line1', '124 Main Street'); customerMap.put('line2', 'Apt 3'); customerMap.put('city', 'Anytown'); customerMap.put('state', 'NY'); customerMap.put('postal_code', '12346'); // Initializing the RequestJSON Data to be passed. Map<String, Object> requestJSONMap = new Map<String, Object>(); requestJSONMap.put('customers', new List<Object>{customerMap}); String reqJSON = JSON.serialize(requestJSONMap); Map<String, Object> reqObj = new Map<String, Object>(); reqObj.put('version', '1.0'); reqObj.put('action', 'UpdateCustomer'); reqObj.put('processorId', 'processorId'); reqObj.put('requestJSON', reqJSON); // Placing a request to Breadwinner Global API Map<String, Object> resp = bw_payments.BreadwinnerPaymentsAPI.call(reqObj); System.debug(resp);