Payment Link Template Message

Use this API to send a payment link template message to a WhatsApp user.


📘

Note:

  1. Use the recipient parameter only when BSUID is enabled for the app.
  2. When both to and recipient fields are used in the payload, the to field gets the priority.

Request Parameters

KeyDescriptionValueData typeRequired/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token
appIdApp ID to fetch the access token{{APP_ID}}StringRequiredThe Id should be a valid app Id of Gupshup.
messaging_productMessaging productwhatsappStringRequired
recipient_typeRecipient typeindividualStringRequired
toDestination phone no where the message need to be send91785876xxxxStringRequired (Can be optional if BSUID is enabled for the app and recipient parameter is used instead)Must be a valid phone number
recipientDestination BSUID where the message needs to be sentIN.461449821882xxxxStringOptionalMust be a valid BSUID
typeMessaging typetemplateStringRequired

Type should be interactive to send

interactive message.

templateAdd template bodytemplate: {<body>}objectRequiredKey should be a template to send interactive message.

Sample Request

curl --location 'https://partner.gupshup.io/partner/app/dbb0afed-9377-4f82-bd28-77e419c818c9/v3/message' \
--header 'Authorization: sk_c33e12d15ab84e16baab042d8ffd468a' \
--header 'Content-Type: application/json' \
--data '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "5511972932562",
		"recipient": "IN.4614498218826880",
    "type": "template",
    "template": {
        "name": "boleto_and_payment_link_order_detail_template_aug_6_2025_test",
        "language": {
            "policy": "deterministic",
            "code": "en"
        },
        "components": [
            {
                "type": "body",
                "parameters": []
            },
            {
                "type": "button",
                "sub_type": "order_details",
                "index": 0,
                "parameters": [
                    {
                        "type": "action",
                        "action": {
                            "order_details": {
                                "currency": "BRL",
                                "order": {
                                    "status": "pending",
                                    "tax": {
                                        "value": 0,
                                        "offset": 100,
                                        "description": "optional text"
                                    },
                                    "items": [
                                        {
                                            "retailer_id": "1234567",
                                            "name": "Cake",
                                            "amount": {
                                                "value": 100,
                                                "offset": 100
                                            },
                                            "quantity": 1
                                        }
                                    ],
                                    "subtotal": {
                                        "value": 100,
                                        "offset": 100
                                    }
                                },
                                "total_amount": {
                                    "value": 100,
                                    "offset": 100
                                },
                                "reference_id": "reference-id-76126787",
                                "type": "digital-goods",
                                "payment_type": "br",
                                "payment_settings": [
                                    {
                                        "type": "payment_link",
                                        "payment_link": {
                                            "uri": "https://my-payment-link-url"
                                        }
                                    }
                                ]
                            }
                        }
                    }
                ]
            }
        ]
    }
}'

Sample Response

{
	"messages": 
	[
		{
			"id": "GUPSHUP_MESSAGE_ID"
		}
	],
"messaging_product": "whatsapp",
"contacts": 
	[
		{
			"input": "DESTINATION_PHONE_NO",
			"wa_id": "DESTINATION_PHONE_NO"
		}
	]
}

Status Codes

Status CodeResponseComments
Success
200

{

"messages":[{"id": "GUPSHUP_MESSAGE_ID"}],"messaging_product": "whatsapp",
"contacts":
[
{
"input": "DESTINATION_PHONE_NO",
"wa_id": "DESTINATION_PHONE_NO"
}
]
}

Error
400

{

"message": "Callback Billing must be enabled for this API","status": "error"}

if Callback billing is not enabled for the app
400

{

"message": "Invalid App Details","status": "error"}

if app details are not found
401

{

"status": "error",

"message": "Authentication Failed"}

When API key authentication fails