Send transaction message
Last updated
Last updated
Note:
For APIs used for Partner, the API key is: <shop_key>
. The base_url information of the Partner.
Request:
Response:
Request body structure
language
string
Language used for the message Input value:
language
= WE
or
language
= IN
When selecting a language, the default content of the message will switch to the corresponding language.
buttons
array
CTA buttons (optional, up to 4 buttons)
image_icon
string
Can transmit:
image url of the image
attachment_id after using image upload API
leave blank or “default”: to use Zalo's default icon image
Note: Optimal image size: 100px * 100px
payload
object (mrButtonPayload)
content
phone_code url
title
string
Button Title
Note: Title cannot exceed 35 characters
type
string (thTemplateTxnButtonType)
Type of action that will be performed when the interested person clicks oa.open.url
: Data is a Url that will be opened in the Zalo application when the interested person clicks the button. For example:
Note: The limit for the "title" attribute is 100 characters.
oa.query.show
: Data is a string of characters, for example “#callback_data”. When the interested person clicks the button, the system will send a message containing the content in the data from the interested person to the Official Account. This message will appear in the chat window on the interested person's computer.
Attention:
The limit for the "title" attribute is 100 characters.
The limit for the "payload" attribute is 1000 characters.
oa.query.hide
: Data is a string of characters, for example “#callback_data”. When the interested person clicks the button, the system will send a message containing the content in the data from the interested person to the Official Account. This message will be hidden in the chat window on the interested person's computer.
Attention:
The limit for the "title" attribute is 100 characters.
The limit for the "payload" attribute is 1000 characters.
oa.open.sms
: The json object data contains 2 properties “content” and “phoneCode”. For example:
When the interested person clicks on the button, the SMS window on the interested person's phone will open with 2 available information: phone code and message content in data.
Attention:
The limit for the "title" attribute is 100 characters.
The "content" attribute has a limit of 160 characters.
oa.open.phone
: Phone number data will be entered when turning on the calling application, for example:
When the interested person clicks on the button, the call window on the interested person's phone will open with the available information as the phone number in the data.
Note: The limit for the "title" attribute is 100 characters.
content_banner
object (mrContentBanner)
attachment_id
: ID of the image you want to use (received via the file upload API)
image_url
: Path to the image Supported image formats: jpg and png
Maximum size: 1MB Image aspect ratio (height : width): from 1:5 to 1:1 (square image)
Note: only use 1 of the 2 variables image_url or attachment_id
content_header
object (mrContentHeader)
content
: The content of the header, up to 100 characters.
align
: Accepts 3 values
left (or blank): left margin
center: center margin
right: right margin
content_table
Array
The structure of an element in a table is:
In which must have 1 of the 2 following elements:
VN:
EN:
or
VN:
EN:
The "Status" key is the only key currently allowed to use the "Style" parameter:
VN:
EN:
Values of "style": green, blue, yellow, red, grey
In addition to the system elements specified above, the developer can declare up to 5 additional arbitrary elements.
content_text
object (mrContentText)
content
: The content of the header, up to 100 characters. align
: Accepts 3 values
left (or blank): left margin
center: margin
id
string
OA ID
recipient
object (mrRecipient)
user_id
: Zalo user ID
template_type
string
Return data attribute structure
msg_id
string
Notification ID
transaction_billing
Bill
Billing
All
transaction_order
Order
Order
All
transaction_reward
Earn points
Reward
All
transaction_contract
Contract
Contract
All
transaction_booking
Appointment
Booking
All
transaction_membership
Member
Membership
All
transaction_event
Event
Event
All
transaction_transaction
Transaction
Transaction
All
transaction_account
Account
Account
All
transaction_internal
Internal
Internal
All
transaction_partnership
Partner
Partnership
All
transaction_education
Education
Education
Education and training
transaction_rating
Evaluate
Rating
All
$BASE_URL.Zalo/SendZNSTxn
unknown
, VI
, EN
unknown
, transaction_billing
, transaction_order
, transaction_reward
, transaction_contract
, transaction_booking
, transaction_membership
, transaction_event
, transaction_transaction
, transaction_account
, transaction_internal
, transaction_partnership
, transaction_education
, transaction_rating