BB_logo

tab_left
tab_right
Report Approved Purchase

This API is used approve a b-buzzy transaction.

This report to B-buzzy is optional, use it only if you want to re-approve each report to B-buzzy before paying your users.
To use this option you must first check the parameter 'Approve every purchase by seller' on the profile page.


The transaction approval is done by an https request to this URL: https://b-buzzy.com/API/approvePurchase/index.php with the following POST NVP parameters:

Parameter nameDetails
sellerIdThe Id provided by B-buzzy
sellerSecretYour 'secret'
tranIdToApproveThe transaction id you want to approve.
This parameter must match the transaction id reported on 'bbuzzy_transactionId' parameter on the 'after purchase page'.
For more details about this parameter see the 'after purchase page' API.

Note that if the transaction includes more than one item, all items will be approved.
Canceled transactions can't be approved!
allProductsOnTransactionPut "YES" on this parameter if you wish to approve all of the products on the transaction reported on the parmeter "tranIdToApprove".
If you report "YES" on this parameter, than you do not need to report the parameter "sellerProductId".
sellerProductIdYour product id to be approve.
This parameter must match the product id reported on 'bbuzzy_sellerProductId' parameter on the 'after purchase page'.
For more details about this parameter see the 'after purchase page' API.
approvalReferenceOptional parameter - if you want to save your reference key to the approval.
Must be not longer than 45 characters.

* All of the parameters passed must be URL encoded.


The response for the request is a XML file as follows:

Node nameDetails
fieldsDataHolds all the names and values the parameters on your request.
For each field (besides "sellerSecret" for security), a node of 'name' and 'value' will be provided.
productHolds the response data of each of the products on the transaction.
productIdHolds the "productId" of the product.
requestMessageHolds the message result of the request.
If the approval is successful than the value will be 'approval_successful'.
Else, the value will be 'approval_not_successful'.
errorsIf the approval is not successful than this node will provide the error messages for each field with error.
For each field, a node of 'fieldName' and 'fieldErrorMessage' will be provided.



Here is a sample file that illustrates the structure of the XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response>
<fieldsData>
<field>
<name>sellerId</name>
<value>123abc</value>
</field>
<field>
<name>tranIdToApprove</name>
<value>123abc</value>
</field>
<field>
<name>approvalReference</name>
<value>123abc</value>
</field>
.....
</fieldsData>
<product>
<productId>123abc</productId>
<requestMessage>'approval_successful' or 'approval_not_successful'</requestMessage>
<errors>
<field>
<fieldName>sellerId</fieldName>
<fieldErrorMessage>123abc</fieldErrorMessage>
</field>
<field>
<fieldName>sellerSecret</fieldName>
<fieldErrorMessage>123abc</fieldErrorMessage>
</field>
.....
</errors>
</product>
<product>
.....
</product>
</response>






© 2019 B-buzzy Systems Ltd. All Rights Reserved.