Global API
Response
5min
response the response is the information returned from the request call it will be returned in the form of a map\<string, object> below is the list of keys or parameters returned in the response map key (string) value (object) additional detail version ‘1 0’ returns the same version sent in the request action see the list of available actions returns the same action sent in the request timestamp timestamp in milliseconds (unix) the time at which the response was returned, can be used to troubleshoot validrequest either true or false if the request satisfies the breadwinner validations, it will be returned as true apierrors this will be a list of errors returned as json errors which breadwinner gets while validating the request and before making the request to payments processor responsejson returns the response of the record(s) as a json string this includes the records data as well as any errors from the processor errors there can be some exceptions within breadwinner and the payment processor may throw some errors as part of our api actions and those errors are returned in separate layers in the form of json before requesting the payment processor errors that occur while validating the request, or while making a request to the payment processor are returned as ‘errors’; when these exceptions are there, validrequest key will be sent as false these errors are returned as ‘errors’ as a key of the response map, and errors is a list of error object after requesting the payment processor errors that occur within the payment processor while processing the request, or while processing the data in breadwinner are sent as ‘errors’ in the responsejson key of the response map these errors are returned as ‘errors’ in the responsejson, which is a key of the response map and errors is a list of error object error object error object contains two string parameters field name data type description message string short message about the error code string for some errors that could be handled programmatically, a short string indicating the error code is reported detail string a detailed explanation of the error occurred example breadwinner was unable to process the request as the action parameter was invalid example breadwinner does validation prior to calling out to the payment processor invalid request { apierrors={ "errors" \[ { "message" "invalid processor id ", "detail" "processorid is not valid please refer the breadwinner api docs ", "code" "invalid processor" } ] }, timestamp=1654159364579, validrequest=false } this is an error sent back from processor that was reformatted for easier reading 400 { action=createcustomer, timestamp=1635239587001, version=1 0, statuscode=400, responsejson={ "errors" \[ { "message" "email invalid", "detail" "invalid email address tests com", "code" "invalid request error" } ] } }