The main interface to interact with EC
You use the ECommerce set of classes when you want to deal with the underlying EC APIs. With EC, you handle things such as title management and payment information. And you also have the option to handle components such as device information, permitting identification of the console in several ways.
For every page, you'll want to initialize the ECommerceInterface type.
var ec = new ECommerceInterface();
This special type inherits from ECGenericObject, an internal C++ type that many others use as a parent. You should only create this specific object type once per page load in JS, as it calls the special function EC_Init internally.
Inside of EC, there is a JS "test mode" that allows modification of objects that are normally not modifiable via JS. It is not possible to enable it beyond binary patching, or editing memory.


Member Name
Returns the EC library's version number. As of the Wii Shop Channel v21, this is 264192, or 0x40800.
ec.setParameter(name, value)
Sets multiple internal EC library values. Known names are:
  • TIN: a unique title number within games.
  • AppId: the current running title ID.
  • PCPW: Parental Control pin/password.
  • USE_NCRS: (unknown, accepts 0/1)
This calls EC_SetParameter internally. The Wii Shop Channel does not set a TIN as many games might.
For the current EC object, get a value for the given name from an internal store. This key will persist within the internal store for the duration of the channel's runtime.
ec.setSessionValue(name, value)
Sets the key for name to value within the internal store.
Obtains a value by name from ec.cfg.
ec.setPersistentValue(name, value)
Sets a key by name to value in ec.cfg.
Returns an ECProgress object on the state of the given operation, or the most recent operation. Returns -4007 if no operation is ongoing.
Cancels the current operation.
ec.purchaseTitle(titleId, itemId, price, payment, limits, downloadContent, taxes, purchaseInfo, discount) 🔒 Requires HTTPS
Formulates and sends a PurchaseTitle request, typically used with payment. Parameters are as follows:
  • titleId: the title ID to purchase, as a string.
  • itemId: Unknown.
  • price: An instance of ECPrice.
  • limits: An instance of ECTitleLimits. It's acceptable to have this be zero in length.
  • downloadContent: A boolean on whether the title should be downloaded .
  • taxes (optional): A string seemingly holding the price calculated for taxes. It's unclear on how this would be used.
  • purchaseInfo (optional): Unknown string value.
  • discount (optional): Unknown string value.
ec.purchaseGiftTitle(titleId, itemId, price, payment, limits, identifier, identifierKind, notes, taxes, purchaseInfo) 🔒 Requires HTTPS
Formulates and sends a PurchaseTitle request, typically used with payment. Parameters are as follows:
  • titleId: the title ID to purchase, as a string.
  • itemId: Unknown.
  • price: An instance of ECPrice.
  • limits: An instance of ECTitleLimits. It's acceptable to have this be zero in length.
  • identifier: An identifying value for the recipient console, such as its Wii friend code.
  • identifierKind: The type of identifying value.
  • notes (optional): Potentially a note for the recipient, unknown.
  • taxes (optional): A string seemingly holding the price calculated for taxes. It's unclear on how this would be used.
  • purchaseInfo (optional): Unknown string value.
  • discount (optional): Unknown string value.
ec.acceptGiftTitle(titleId, transactionId, accept, reason, downloadContent)
🔒 Requires HTTPS
Accepts, or rejects, a gifted title.
  • titleId: the title to accept.
  • transactionId: The recipient's transaction ID, sent via query parameters in the sent Wii Mail.
  • accept: Whether this gift was accepted (true) or rejected (false).
  • reason (optional): Seemingly a string as to why. It's unclear on where this is sent.
  • downloadContent (optional): Whether to download this title upon acceptance.
ec.unregister(challenge) 🔒 Requires HTTPS
Performs a request to unregister this console from the server. As part of EC_Unregister, this may mean NAND titles and tickets are deleted. The challenge parameter is typically obtained from issuing a call to ec.sendChallengeReq(), awaiting its completion, and utilizing the result from the server via ec.getChallengeResp(). However, the client does not enforce a challenge is ever called. It is safe to use any value desired.
ec.deleteOwnership(titleId, ticketId) 🔒 Requires HTTPS
Deletes the local copy of this ticket, and additionally registers with the server that a ticket has been deleted for the given titleId and ticketId.
Sends a list of local tickets on the console, and reads a list of tickets from the server The parameter type is optional, and defaults to zero. It is unknown what other sync types are available.
Synchronizes values such as ticket sync times and point balances.
Requests the console's current points balance.
Returns the current cached points balance.
Retrieves transaction history from the server, returning an ECTransactionInfos object.
ec.purchasePoints() 🔒 Requires HTTPS
ec.generateKeyPair() 🔒 Requires HTTPS
Returns -4002 - possibly not implemented, or deprecated?
ec.confirmKeyPair() 🔒 Requires HTTPS
Returns -4002 - possibly not implemented, or deprecated?
Makes a request via ECS for the CheckRegistration type.
ec.register(challenge) ec.register(challenge, extAccountId) ec.register(challenge, extAccountId, extAccountPassword) 🔒 Requires HTTPS
Performs a request to register this console to the server. It is possible to override sent credentials while registering, as during a re-register configured credentials from ec.cfg will be sent.
ec.transfer() 🔒 Requires HTTPS
ec.syncRegistration() 🔒 Requires HTTPS
Syncs the registration state of this console, seemingly updating token, serial number, friend codes, and other values as appropriate.
ec.sendChallengeReq() 🔒 Requires HTTPS
Requests a challenge from the configured IAS server.
ec.getChallengeResp() 🔒 Requires HTTPS
Retrieves the returned challenge from the given IAS server.
ec.reportCSS() 🔒 Requires HTTPS
ec.confirmCSS() 🔒 Requires HTTPS
Returns an ECTitleInfo for the specified title ID.
Returns an ECTitleInfos for all available titles on the console.
Returns an ECTicketInfos for the given title ID.
Returns an object you can use to access information with. See its dedicated page, ECDeviceInfo, for more information.
ec.setWebSvcUrls(ecs) ec.setWebSvcUrls(ecs, ias) ec.setWebSvcUrls(ecs, ias, cas)
Sets endpoints for usage.
  • ecs: The ECommerceSOAP endpoint, utilized for requests related to titles and purchases.
  • ias: The IdentityAuthenticationSOAP endpoint, utilized for identity and registration-related requests.
  • cas: The CatalogingSOAP endpoint, utilized for listing available titles (such as for DLCs or service titles).
CAS is not used within the Wii Shop Channel - only used in other ECDK-utilizing titles, such as for DLC content.
ec.setContentUrls(ccs) ec.setContentUrls(ccs, ucs)
ccs appears to be an http URL by default, presumably meaning "cached contents". ucs may mean "uncached contents", using an https URL.
Validates the given Parental Control PIN/password as a long. If this is disabled, it returns -4075, or -0xfeb.
ec.launchTitle(titleId, ticketId)
Launches the passed title with the given ticket.
Requests something, with a callback. **TODO**
ec.getWeakToken() 🔒 Requires HTTPS
ec.startLog() 🔒 Requires HTTPS
Creates a new logging buffer.
ec.stopLog() 🔒 Requires HTTPS
Destroys the present logging buffer.
ec.getLog() 🔒 Requires HTTPS
Returns a string with the internal held log from buffer.

JS Test Mode Operations

These following functions do not function without the JS test mode being enabled via binary patching. They will log such if called. Do not expect them to work.
Member Name
Overrides the configured language for this EC object.
Overrides the configured country for this EC object.
Overrides the configured region for this EC object.
Overrides the configured age for this EC object.
ec.setAccountId(accountId, deviceToken)
Overrides the configured account ID for this EC object. If a constructor parameter is not specified as a string, it will default to the string literal null.
Deletes a title's contents from the console.
Deletes a title's contents and data from the console.
ec.deleteLocalTicket(titleId, ticketId)
Deletes a title's contents, data, and ticket from the console.
Encrypts a message with the console's public key, returning a base64-encoded string of the encrypted contents.
Unknown. Appears to return zero.
ec.setOption(option, value) 🔒 Requires HTTPS
Sets an option within EC. Only two options are accepted:
  • 0: Sets the JS test mode, where value is a boolean.
  • 1: Adjusts the log level is adjusted to that of value.
All other options appear to return -4004, or 0xfa4.
Last modified 8mo ago