Stripe
1 min
To create a Customer Portal Session URL in Stripe, submit a request with a valid customerId and processorId. A good request will return a valid response from Stripe, which includes the new Stripe Customer Portal Session URL. Request and Response sample:
Map<String, Object> requestJSONMap = new Map<String, Object>();
requestJSONMap.put('customerId', 'Customer Id in Stripe');
String reqJSON = JSON.serialize(requestJSONMap);
Map<String, Object> reqObj = new Map<String, Object>();
reqObj.put('version', '1.0');
reqObj.put('action', 'CreateCustomerPortalSessionURL');
reqObj.put('processorId', 'Stripe Account Id');
reqObj.put('requestJSON', reqJSON);
Map<String, Object> resp = bw_payments.BreadwinnerPaymentsAPI.call(reqObj);
System.debug(resp);