BB_logo

tab_left
tab_right
Report Purchase Cancellation

This API is used to cancel a b-buzzy transaction.

This report to B-buzzy is optional, a purchase cancellation can also be done through the transaction page on B-buzzy.com .


The first step of the integration is to open a B-buzzy sandbox account. If you don't have an account click here.

The sandbox is a full feature B-buzzy service that doesn't create real transaction.

Prior production deployment, please check the integration with our sandbox.

When working with the sandbox environment, use sandbox.b-buzzy.com as the domain. When working with the production environment, use b-buzzy.com as the domain.


If you choose to use this API you must first produce a 'secret' key that would be used to identify your request.

The 'secret' can be produced here.

Note that the 'secret' is used to identify you, so you should keep it safe and on a none public area on your server.


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

Parameter nameDetails
sellerIdThe Id provided by B-buzzy
sellerSecretYour 'secret'
tranIdToCancelYour transaction id to be canceled.
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.
allProductsOnTransactionPut "YES" on this parameter if you wish to cancel all of the products on the transaction reported on the parmeter "tranIdToCancel".
If you report "YES" on this parameter, than you do not need to report the parameter "sellerProductId".
sellerProductIdYour product id to be canceled.
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.
cancellationReasonThe reason for the cancellation.

Must be one of the following values (without the quote):

1. 'purchase_cancellation_by_user'
2. 'purchase_cancellation_by_seller'
3. 'fraud_suspicion'
4. 'other'
cancelRemarkYour remark to the cancellation. Must be up to 300 charecters.

* 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 you try to cancel.
productIdHolds the "productId" of the product.
requestMessageHolds the message result of the request.
If the cancellation is successful than the value will be 'cancellation_saved'.
Else, the value will be 'cancellation_not_saved'.
errorsIf the cancellation 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>tranIdToCancel</name>
<value>123abc</value>
</field>
.....
</fieldsData>
<product>
<productId>123abc</productId>
<requestMessage>'cancellation_saved' or 'cancellation_not_saved'</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.