Can my customers order a document which is not yet ready?
As described in this
blog post sometimes the source document (PDF or an image) may not yet be ready prior to the checkout process. In that case we change the configuration of the merchant such that:
- A customer can order the document even though the source URL is unknown. Based on the desired width, height and number of pages the Peecho checkout can determine which products can be selected for this document to be printed on.
- The customer pays for the document
- When Peecho receives this new order we temporarily put the order processing workflow on hold to send a GET request to a URL defined by the merchant. The GET request includes the unique Peecho Order ID and the unique merchant reference number which you specified when the customer opened the Peecho checkout. The URL has the following form: http://merchant.com/peecho/ping?peechoId=%PEECHOID%&merchantId=%MERCHANTID%&secret=%SECRET% The third parameter 'secret' is used to prevent tampering with the HTTP request.
- When the merchant is ready preparing the source document you can invoke the following REST API call:http://printcloud.peecho.com/rest/order/set_source_url which is specified in the API manual. This will trigger the regular Peecho processing workflow and the document will be produced.