changeOffer
Vendo triggers the changeOffer postback to notify that a subscription has been updated from one offer to another, such as moving from monthly to yearly billing or from quarterly to monthly.
TimeoutsIf your platform does not respond within 30 seconds, the postback request will time out and our platform will automatically retry it.
Note: By default, postbacks for test transactions are not retried.
Request parameters
| Parameter | Data type | Description |
|---|---|---|
| callback | string | Specifies the action for this request, which in this case is "changeOffer". |
| subscription_id | numeric | Vendo's subscription identifier. Example: 123456789 |
| offer_id | numeric | Vendo internal offer id for the new offer. Example: 12345 |
| offer_identifier | string | Your offer identifier for the new offer. Example: yearly99 |
| change_type | string | Specifies the change type: upgrade or downgrade |
| is_test | boolean | Whether or not this request is related to a test transaction or subscription. 0 for no (real transaction) 1 for yes (test transaction) |
Your server must reply with one of these response formats:
OK (Response code 1)
Reply with this if the request was received successfully.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<postbackResponse>
<changeOffer>
<code>1</code>
</changeOffer>
</postbackResponse>ERROR (Response code 2)
Reply with this if you encountered an unexpected problem with the request.
Include a custom error message with your message for tracing and debugging. Make sure this error message is meaningful, as it will be stored in a log file for later debugging.
Vendo will attempt a new changeOffer postback after your error response.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<postbackResponse>
<changeOffer>
<code>2</code>
<errorMessage>Custom error message</errorMessage>
</changeOffer>
</postbackResponse>
Note for NATS usersNATS v3 doesn't support this postback. If you run NATS v3, you have to create a script to handle it. Contact Vendo support for more information.
Updated 10 days ago
