Skip to content

Single Sending

Notification whatsapp user pay order

HTTP Request

POST /v1/whatsapp/message/send

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Request Body
{
    "customerName": "Austin Bu",    
    "phone": "11987654321",  
    "countryCallingCode": "+55",  
    "messageType": "PAYMENT_REMINDER", 
    "countryCode": "BR",
    "orderInfo": {
        "productTitle": "Vacuum",      
        "orderId": "13490123",  
        "amountInCents": 100,   
        "currency": "BRL",
        "link": "https://www.liquido.com",
        "productImgList": [
            "https://static.wikia.nocookie.net/c__/images/6/6b/Quote.jpg/revision/latest?cb=20110107214657&path-prefix=cavestory"
        ]
    },
    "shippingInfo": {
        "shippingAddress": "340 E Middlefield Blvd, MTV, CA, 94043", 
        "trackingNumber": "1231242151",
        "transportCompany": "Fedex",
        "trackingLink":"https://www.fedex.com/fedextrack/?trknbr=1",
    }, 
    "paymentInfo": {
        "createTime": "2022-04-28 10:00:00",
        "paymentId": "159265", 
        "paymentMethod" : "PIX_STATIC_QR",
        "vendor": "LIQUIDO"
    } 
}

Response

Content-Type: application/json
{
    "msgId":  "gBGGFRBQmGUvAglCIxywFV5mRRY" // use this to track the message status
}
Content-Type: application/json
{
    "errors": [
        {
            "code": "601",
            "errorMessage": "This phone number does not have an associated whatsapp account."
        }
    ]
}
Content-Type: application/json
{
    "errors": [
        {
            "code": "500",
            "errorMessage": "Server internal error."
        }
    ]
}

Request Headers Parameters

Key Value
Authorization "bearer" + " " + {{access_token}}
x-api-key {{api_key}}

Request Body Parameters

Parameter Required Type Description
customerName String customer full name.
phone String phone number without country code. "11987654321"
countryCallingCode String country calling code. such as "+1" in USA.
messageType String enum Message Type
countryCode String country code.
orderInfo JSON order info
shippingInfo JSON payer info
paymentInfo JSON payment info

OrderInfo Object Parameters

Parameter Required Type Description
productTitle String product title.
orderId String order id.
amountInCents Long amount, in cents
currency String currency, such as "BRL"
link Long order link in merchant service
productImgList List product image list, required when messageType=PAYMENT_REMINDER. Only JPEG and PNG pictures. Transparent backgrounds will become black.

ShippingInfo Object Parameters

Parameter Required Type Description
shippingAddress String receiver's address.
trackingNumber String track number.
transportCompany String transport company name
trackingLink String tracking URL

PaymentInfo Object Parameters

Parameter Required Type Description
createTime String Payment creation time.
paymentId String Idempotency key from pay in request. It is required if the payment is done through Liquido.
paymentMethod String Payment method. This is used for conversion tracking. It is required if the payment is done through Liquido. Supported values are: PIX_STATIC_QR,PIX_DYNAMIC_QR,CREDIT_CARD,DEBIT_CARD,BOLETO,AME_QR,MERCADO_PAGO,BANK_TRANSFER
vendor String If the payment is done through Liquido, enter "LIQUIDO". Otherwise, enter "OTHER". This is used for conversion tracking.

Message Type

Parameter Description
PAYMENT_REMINDER When a pix payment is left unpaid for a period of time, you can send a pix payment reminder to the user to remind them of their order.
PAYMENT_SETTLED Notifies the user when a credit card payment order is create and settled.
PAYMENT_CREATED_PIX Notifies the user when a Pix payment order is created. The "Order details" button will take the user to its order details.
SHIPMENT_SHIPPED Notifies the customer when the order is shipped

Query the message status

HTTP Request

GET /v1/whatsapp/message/{msgId}

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}

Response

Content-Type: application/json
{
    "status": "Send",
    "lastUpdateTime": "2022-04-28 12:00:00"
}
Content-Type: application/json
{
    "errors": [
        {
            "code": "400",
            "errorMessage": "The request is missing one or more required parameters(s)."
        }
    ]
}
Content-Type: application/json
{
    "errors": [
        {
            "code": "500",
            "errorMessage": "Server internal error."
        }
    ]
}

Path Parameters

Parameter Required Type Description
msgId String from the response of the send message api
Back to top