publ betaReference (MCP guide)
Open publ console

publ Reference

messenger_app_products_apply

Create or edit one app unlock product in the Messenger app (pApp D00003). Create (CREATE_MESSENGER_APP_PRODUCT): name 4–20, presentationalName, KRW 300–100,000,000 in steps of 100 or USD 5–100,000, period 1/3/7/15/30/60/90/180/365 days, private state, CASH_ONLY or CASH_AND_CP. Edit (CHANGE_MESSENGER_APP_PRODUCT): presentationalName, private state, original price and purchase methods only. Write; no deletion exists. CASH_AND_CP needs point branding. After a creation the selling price and access period cannot be changed (the original edit screen has no such fields). A lost receipt stays pending and is never resent; task_resume only observes, and prepared work needs the identical apply. Called without confirmToken it previews and returns a confirmToken; repeating the same input with it executes once. Ask the user again before executing; this cannot be undone. When the preview has requiresReconfirmation, execute only with irreversibleConfirmed: true after the person confirms again.

Inputs

Field Required here Contract
target Yes one of: creation, edit (by kind)
target.productId Yes When target.kind is edit: integer; greater than 0
change Yes one of: create, edit (by action)
change.confirmation Yes When change.action is create: CREATE_MESSENGER_APP_PRODUCT
change.fields Yes When change.action is create: object
change.fields.presentationalName Yes When change.action is create: string; min length 1; max length 20
change.fields.isDeactivated Yes When change.action is create: boolean
change.fields.availablePurchaseMethodsType Yes When change.action is create: CASH_ONLY, CASH_AND_CP
change.fields.currency No When change.action is create: KRW, USD; Optional assertion against the freshly read channel currency. Omit to use that verified currency; this never changes the channel currency or supplies a default.
change.fields.originalPrice No When change.action is create: string; pattern ^(?:0|[1-9]\d{0,8})(?:\.\d{1,2})?$; Create: omission uses sellingPrice. Edit: omission preserves the original price; clearing is not supported.
change.fields.name Yes When change.action is create: string; min length 1; max length 20
change.fields.sellingPrice Yes When change.action is create: string; pattern ^(?:0|[1-9]\d{0,8})(?:\.\d{1,2})?$
change.fields.expiryPeriodInDays Yes When change.action is create: 1 or 3 or 7 or 15 or 30 or 60 or 90 or 180 or 365
change.confirmation Yes When change.action is edit: CHANGE_MESSENGER_APP_PRODUCT
change.fields Yes When change.action is edit: object
change.fields.presentationalName Yes When change.action is edit: string; min length 1; max length 20
change.fields.isDeactivated Yes When change.action is edit: boolean
change.fields.availablePurchaseMethodsType Yes When change.action is edit: CASH_ONLY, CASH_AND_CP
change.fields.currency No When change.action is edit: KRW, USD; Optional assertion against the freshly read channel currency. Omit to use that verified currency; this never changes the channel currency or supplies a default.
change.fields.originalPrice No When change.action is edit: string; pattern ^(?:0|[1-9]\d{0,8})(?:\.\d{1,2})?$; Create: omission uses sellingPrice. Edit: omission preserves the original price; clearing is not supported.
confirmToken No string; pattern ^ct[a-f\d]{32}$; The confirmToken from this tool's preview result. Omit it to preview; repeat the same input with it to execute.
irreversibleConfirmed No true; true only after the person confirmed again, when the preview has requiresReconfirmation: the action cannot be undone.