Global API
...
Request
Transaction
Create Transaction
1min
to create a transaction in the payment processor, use the action as chargeprocessor and pass the payment data in the requestjson under "payments" note you can only create one record at a time the following is an example of creating a payment where we set every possible field (see https //app archbee io/docs/ lihuunv 7xnqrtzhskkc/hnjmkn99qxwdeafyyifsq transaction docid\ xzux8mg anyg7zknpnerv for all available fields) the response will return the response from the payment processor, which includes the payment id ( internalid ), plus the newly created salesforce payment id ( salesforceid ) map\<string, object> chargedata = new map\<string, object>(); chargedata put('processorcustomerid', 'processorcustomerid'); chargedata put('paymentmethodid', 'paymentmethodid'); chargedata put('amount', '123 12'); chargedata put('chargecurrency', 'usd'); chargedata put('description', 'test payment'); chargedata put('paymentmethodtype', 'card'); // initializing the requestjson data to be passed map\<string, object> requestjsonmap = new map\<string, object>(); requestjsonmap put('transactions', new list\<object>{chargedata}); string reqjson = json serialize(requestjsonmap); map\<string, object> reqobj = new map\<string, object>(); reqobj put('version','1 0'); reqobj put('action','chargeprocessor'); 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); { action=chargeprocessor, version=1 0, statuscode=200, timestamp=1654158904112, validrequest=true responsejson={ "transactions" \[ { "taxamount" null, "status" "succeeded", "staffname" null, "source" "source", "salesforceid" "salesforceid", "salesforcecontact" null, "salesforceaccount" null, "receipturl" "https //pay stripe com/receipts/payment/cacafwovywnjdf8xr2i1te1drzkzngzsehjyklfs4zqgmgzq82sbe u6lba3h5 am13 sozaofepx86g6qsvsz6mbt7qbbbfw3xjuug54robox7jjml4", "receiptnumber" null, "receiptemail" null, "processortype" "processortype", "processororgid" "processororgid", "processorid" "processorid", "processorcustomerid" "processorcustomerid", "processingfee" null, "paymentmethodtype" null, "paymentmethodid" null, "paymentintentid" null, "locationid" null, "keyvalue" null, "ischargeexept" null, "errormessage" null, "description" "test payment", "customer" "customrid", "createdvia" "breadwinner api", "createddateinprocessor" "2022 06 02t08 35 02 000z", "chargestatus" null, "chargecurrency" "usd", "captured" true, "billingstreetaddress2" "", "billingstreetaddress1" "", "billingpostalcode" "11111", "billingcountry" "", "billingcity" "", "applicationfee" null, "amountrefunded" 0 00, "amount" 123 12 } ] } }