How to fulfill an In-App Purchase transaction manually (for testing)

After a transaction has been authorized by the IMVU user it is the job of the application developer to fulfill the transaction, to confirm with IMVU that the user has been given the item they purchased. This fulfillment will be performed by the application's servers in a secure server-to-server communication when the app is live. However, you may find it useful to fulfill transactions manually during testing. This document explains how to manually fulfill transactions.

NOTE: This manual fulfillment process is expected to soon be replaced with a python script which will make it simpler.

LOGIN

  • Open chrome apps and run Advanced Rest Client (which allows you to make REST requests)
  • Copy the url https://api.imvu.com/login into the primary field
  • Select a POST request
  • Set the content-type to application/json
  • Set the body of the request to:
  • {"username":"YOUR USERNAME","password":"YOUR PASSWORD"}
  • Send the request
  • If status 200/201 then you are done

GET THE MAGIC SAUCE

  • In the same rest tool (Advanced Rest Client), copy the url https://api.imvu.com/login/me into the primary field
  • Select GET request
  • Send the request
  • From the resulting JSON, pull out your sauce value (Example: "sauce": "lZtXdKlpHEeRgyMc2iX6oIYtiig=")

FULFILL AN IN-APP PURCHASE

  • Perchase an IAP in the InAppPurchase Demo in unity
  • Copy the ID of the purchase
  • Open Chrome’s Advanced Rest Client
  • Copy the purchase ID url into the primary field (example: https://api.imvu.com/app_purchase/app_purchase-27)
  • Select a POST request
  • Set the content-type to application/json
  • Set the body of the request to: {"status":3}
  • Select Headers Form and add another header for Content-type set to X-IMVU-SAUCE
  • Set the application/json value for X-IMVU-SAUCE to your sauce string from above...example: lZtXdKlpHEeRgyMc2iX6oIYtiig=
  • Send the request
  • If status 200 then you are done
  • If status 401/403 then redo login and get your new sauce and repeat the above steps
  • Hit refresh in the IAP demo in Unity and confirm that your transaction has been fulfilled