摘要
想要簡化 WhatsApp 的支付流程?Facebook 的結帳按鈕範本 Amerikaanse 預設能讓企業直接在聊天中收款。本指南將為您介紹如何透過 WhatsApp 雲端 API 使用這些範本的快速概覽,以提供無縫的結帳體驗給您的客戶。
使用說明
結帳按鈕範本是 WhatsApp 雲端 API 的功能,讓您可以直接在訊息中嵌入 立即支付或立即購買 按鈕。當顧客點擊按鈕時,將會開啟安全的支付體驗,讓顧客只需點擊幾下即可完成購買。
開始使用所需事項
使用結帳按鈕範本之前,請確認您已有以下事項:
驗證後的 WhatsApp 商業帳戶 (WABA)
Meta 付款帳戶(透過 Meta Commerce Manager 設定)
自架商店或付款體驗(透過 Meta 或第三方提供者)
結帳按鈕範本的運作方式
透過具有結帳按鈕的訊息範本傳送,結帳按鈕尺寸包括:
標題:可選,可含文字或媒體
正文:描述產品或付款要求
按鈕:點擊時觸發結帳流程
一旦顧客點擊按鈕,他們將被導向預先設定的付款體驗。此體驗可能是一次性結帳頁面,或與特定產品或購物車連結。
主要優勢
更快的購買:顧客無需離開 WhatsApp 即可付款
提升互動:減少結帳時的離開率
安全的交易:付款透過 Meta 驗證的基礎設施處理
範例應用場景
在訂單確認後,發送「立即支付」訊息
發送預購或訂閱的付款連結
為回頭客啟用快速重新訂購
端點
POST https://{your-account-endpoint}/api/v1/checkout_button_template
透過 checkout_button_template
端點,您可以將 立即支付或立即購買 按鈕直接嵌入訊息中。當顧客點擊按鈕時,將開啟安全付款體驗,讓顧客只需點擊幾下即可完成購買。
步驟 1:查找您的 API 端點
您可以在 Wati 帳戶中的/api-docs 部分找到您的 API 端點。它的格式看起來像這樣:https://live-server-xxxx.wati.io
發送訂單的最終端點將是:
POST https://{your-account-endpoint}/api/v1/checkout_button_template
以下是此端點的參數清單:
phone_number
:這是訊息接收者的電話號碼。
template_name
: 是您所建立的範本的名稱
custom_params
: 這取決於範本中的變數
order_details
: 訂單細節的金額應與範本中的輪播卡數量相同
reference_id
: 這是每個訂單的唯一 ID
步驟 2:透過 API 端點發送結帳按鈕範本
以下是透過包含 3 個輪播卡的範本的號召性語言:
範例負荷
curl --location 'https://mt-dev-gke-server.watiapp.io/103128/api/v1/checkout_
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqd
--header 'Content-Type: application/json' \
--data '{
"phone_number": "918606328257",
"template_name": "checkout_button_template_yzn_1",
"custom_params": [
{
"name": "name"
,
"value": "TEST_NAME"
}
],
"order_details": [
{
"reference_id": "yzn-test-7",
"type": "physical-goods",
"currency": "INR",
"payment_settings": [
{
"type": "payment_gateway",
"payment_gateway": {
"type": "razorpay",
"configuration_name": "razorpay_test_payment_2"
}
}
],
"shipping_info": {
"country": "IN",
"addresses": [
{
"name": "Nidhi Tripathi",
"phone_number": "919000090000",
"address": "Bandra Kurla Complex",
"city": "Mumbai",
"state": "Maharastra",
"in_pin_code": "400051",
"house_number": "12",
"tower_number": "5",
"building_name": "One BKC",
"landmark_area": "Near BKC Circle"
}
]
},
"order": {
"items": [
{
"amount": {
"offset": 100,
"value": 200
},
"sale_amount": {
"offset": 100,
"value": 150
},
"name": "Blue Elf Aloe"
,
"quantity": 1,
"country_of_origin": "India",
"importer_name": "Lucky Shrub Imports and Exports",
"importer_address": {
"address_line1": "One BKC",
"address_line2": "Bandra Kurla Complex",
"city": "Mumbai",
"zone_code": "MH",
"postal_code": "400051",
"country_code": "IN"
}
}
],
"subtotal": {
"offset": 100,
"value": 150
},
"shipping": {
"offset": 100,
"value": 20
},
"tax": {
"offset": 100,
"value": 10
},
"discount": {
"offset": 100,
"value": 15,
"description": "Additional 10% off"
},
"status": "pending",
"expiration": {
"timestamp": "1726627150",
"description": "description"
}
},
"total_amount": {
"offset": 100,
"value": 165
}
},
{
"reference_id": "yzn-test-8",
"type": "physical-goods",
"currency": "INR",
"payment_settings": [
{
"type": "payment_gateway",
"payment_gateway": {
"type": "razorpay",
"configuration_name": "razorpay_test_payment_2"
}
}
],
"shipping_info": {
"country": "IN",
"addresses": [
{
"name": "Nidhi Tripathi",
"phone_number": "919000090000",
"address": "Bandra Kurla Complex",
"city": "Mumbai",
"state": "Maharastra",
"in_pin_code": "400051",
"house_number": "12",
"tower_number": "5",
"building_name": "One BKC",
"landmark_area": "Near BKC Circle"
}
]
},
"order": {
"items": [
{
"amount": {
"offset": 100,
"value": 200
},
"sale_amount": {
"offset": 100,
"value": 150
},
"name": "Blue Elf Aloe"
,
"quantity": 1,
"country_of_origin": "India",
"importer_name": "Lucky Shrub Imports and Exports",
"importer_address": {
"address_line1": "One BKC",
"address_line2": "Bandra Kurla Complex",
"city": "Mumbai",
"zone_code": "MH",
"postal_code": "400051",
"country_code": "IN"
}
}
],
"subtotal": {
"offset": 100,
"value": 150
},
"shipping": {
"offset": 100,
"value": 20
},
"tax": {
"offset": 100,
"value": 10
},
"discount": {
"offset": 100,
"value": 15,
"description": "Additional 10% off"
},
"status": "pending",
"expiration": {
"timestamp": "1726627150",
"description": "description"
}
},
"total_amount": {
"offset": 100,
"value": 165
}
},
{
"reference_id": "yzn-test-9",
"type": "physical-goods",
"currency": "INR",
"payment_settings": [
{
"type": "payment_gateway",
"payment_gateway": {
"type": "razorpay",
"configuration_name": "razorpay_test_payment_2"
}
}
],
"shipping_info": {
"country": "IN",
"addresses": [
{
"name": "Nidhi Tripathi",
"phone_number": "919000090000",
"address": "Bandra Kurla Complex",
"city": "Mumbai",
"state": "Maharastra",
"in_pin_code": "400051",
"house_number": "12",
"tower_number": "5",
"building_name": "One BKC",
"landmark_area": "Near BKC Circle"
}
]
},
"order": {
"items": [
{
"amount": {
"offset": 100,
"value": 200
},
"sale_amount": {
"offset": 100,
"value": 150
},
"name": "Blue Elf Aloe"
,
"quantity": 1,
"country_of_origin": "India",
"importer_name": "Lucky Shrub Imports and Exports",
"importer_address": {
"address_line1": "One BKC",
"address_line2": "Bandra Kurla Complex",
"city": "Mumbai",
"zone_code": "MH",
"postal_code": "400051",
"country_code": "IN"
}
}
],
"subtotal": {
"offset": 100,
"value": 150
},
"shipping": {
"offset": 100,
"value": 20
},
"tax": {
"offset": 100,
"value": 10
},
"discount": {
"offset": 100,
"value": 15,
"description": "Additional 10% off"
},
"status": "pending",
"expiration": {
"timestamp": "1726627150",
"description": "description"
}
},
"total_amount": {
"offset": 100,
"value": 165
}
}
]
}'
如何在 Wati 中建立結帳按鈕範本
本指南將引導您使用以下步驟在幾下點擊內建立結帳按鈕範本:
1. 登入您的 Wati 帳戶
2. 前往傳訊並選擇您的範本
3. 點擊新增範本訊息
4. 填入範本的名稱,好讓您可以輕鬆找到它
5. 在類別中,選擇行銷
6. 選擇您要範本作為基礎的語言
7. 在選擇行銷範本中,選擇結帳範本
8. 輸入您的正文內容- 這是顧客將看到的主要訊息
9. 根據需求新增輪播卡
注意:
您可以新增最多 5 張卡
每張卡均可新增圖片或影片
您可以為每張卡新增按鈕,讓顧客執行操作並參與互動