Purchase of content from a back-end server

The following diagram illustrates the purchasing process for items delivered from your own back-end server. The green color indicates the secure payment process that is executed by the in-app purchase API rather than the app.

The purchasing process is as follows:

  1. To be able to display the purchasable items to the consumer, the app must know the IDs of the products that are available for purchase. Before you code the app, you use Nokia Publish to identify in-app purchase items. Nokia Publish returns IDs for these items. Use the in-app purchase API to get descriptions for purchasable items, using IDs to identify items.

  2. The back-end server provides the product IDs.

  3. To get the product metadata to display in the UI, the app sends a request with all the item product IDs to Nokia Store.

  4. Nokia Store returns the product metadata (name, price, and description) that matches the given product IDs.

  5. The app displays the items to the consumer, using the metadata received.

  6. The consumer selects which item they want to purchase.

  7. The app triggers a payment process using the in-app purchase API.

  8. Nokia Store processes the payment, and completes the transaction. The process includes prompting the consumer for their Nokia account password, if the consumer is not yet signed in.

    Note: Select publishers can use Nokia Publish to request that Nokia Store send a purchase receipt directly to a specified server. This is a backup measure if, in step 9, the device loses its network connection and cannot send the receipt to the server. For details about how your server would handle these receipts, see Verify purchases from a back-end server, under Check the HTTP response status.

  9. The app receives the purchase receipt from Nokia Store, and forwards it to the back-end server.

  10. The back-end server reads the receipt, and sends it to Nokia Store to verify that it is a real purchase.

  11. Nokia Store returns both the receipt and an indication of whether or not the receipt (and consequently the purchase) is valid.

  12. The back-end server delivers the purchased item. The consumer can now access the purchased item in the app.