Skip to main content

Guide to Payment Link Blocks

Learn how to use the Payment Link block to collect payments from customers via Razorpay or Stripe directly in WhatsApp, Instagram, or Facebook.

Updated today

What is the Payment Link Block?

The Payment Link block is an integration block that generates a payment link and sends it to customers. It works with Razorpay and Stripe to collect payments without customers leaving the chat.

Common use cases:

  • COD to prepaid conversion (offer discount for paying online)

  • Collecting partial payments (deposits, advance payments)

  • Collecting payment for custom orders


How the Payment Link Block Works

The Payment Link block is actually an action block, not a message block. Here's what happens:

  1. The block creates a payment link (using Razorpay or Stripe)

  2. You send the link in a message using a variable

  3. The customer clicks the link and pays

  4. The flow branches based on the result:

    • Payment succeeds → Send confirmation

    • Payment fails → Send payment failed message, they can retry using the same link

    • Payment link expires → Send new link or follow-up

Important: The Payment Link block itself doesn't send anything to the customer. It just creates the link. You need to send a message with the link variable to actually share it with the customer.


Payment Link Block Structure

When you add a Payment Link block to your flow, you'll see it has 4 connectors:

  1. Payment Succeed – What happens if the customer pays successfully

  2. Payment Failed – What happens if the payment fails

  3. Payment Link Expired – What happens if the link expires before payment

  4. Next Step – This is where you send the payment link message (more on this below)


Understanding the "Next Step" Connector

This is the most confusing part, so pay attention.

The Next Step connector is not what happens after the payment. It's what happens immediately after the payment link is created.

Typical flow:

  1. Payment Link block creates the link

  2. Next Step connector → Send WhatsApp message with the link

  3. Customer clicks and pays

  4. Flow branches to Payment Succeed/Failed/Expired

How to Use the Payment Link Block

The Payment Link block lets you send payment requests to customers directly through WhatsApp. When a customer receives the link, they can pay online, and your automation responds based on whether the payment succeeds, fails, or expires.


How It Works

Here's the basic flow:

  1. Payment Link Block creates a payment link

  2. WhatsApp Message sends the link to the customer

  3. Customer pays (or doesn't)

  4. Your flow branches based on the outcome:

    • Payment Succeed → Confirmation message

    • Payment Failed → Retry option

    • Payment Link Expired → Send new link


Setting Up a Payment Link Block

Step 1: Add the Block

  1. Click the + icon in your flow

  2. Under Integrations, select Payment Link

A configuration panel opens on the left.


Step 2: Choose Your Payment Gateway

Select from the dropdown:

  • Razorpay (if connected)

  • Stripe (if connected)

Note: You must connect your payment gateway first. Go to Settings → Integrations


Step 3: Select Currency

Pick the currency that matches your gateway:

  • INR (Indian Rupee) for Razorpay

  • USD, EUR, GBP, etc. for Stripe


Step 4: Set the Payment Amount

You can use:

  • Fixed amount: 500

  • Variable from Shopify: {{trigger.total_price}}

  • Calculated amount: {{trigger.total_price}}*0.9 (for 10% discount)

Examples:

Use Case

Amount

Fixed ₹500 payment

500

Full order total

{{trigger.total_price}}

10% deposit

{{trigger.total_price}}*0.1

50% advance

{{trigger.total_price}}*0.5

COD discount (10% off)

{{trigger.total_price}}*0.9

Math operators:

  • * multiply (e.g., {{total}}*0.1 = 10%)

  • / divide (e.g., {{total}}/2 = half)

  • + add (e.g., {{total}}+50 = add ₹50)

  • - subtract (e.g., {{total}}-100 = subtract ₹100)

Important: Use * for multiplication, not × or x.


Step 5: Add Payment Description (Optional)

Add a description customers will see on the payment page.

Examples:

  • "Order #12345 - 2 items"

  • "COD to Prepaid - 10% discount applied"

  • "50% advance payment for custom order"


Step 6: Set Expiration Time

Choose how long the link stays active:

  • Minutes (max: 1440 = 24 hours)

  • Hours (max: 24 hours)

Recommended:

  • 30 minutes for urgent payments (COD conversion)

  • 2 to 4 hours for most use cases

  • 24 hours for invoices or less urgent payments

Note: All payment links expire after 24 hours maximum (Razorpay/Stripe limitation).


Step 7: Additional Discount Options (Optional)

You can either add a percentage discount or a fixed amount discount.


Step 8: Send the Payment Link

Now connect the Next Step to actually send the link.

  1. Click the Next Step connector on the Payment Link block

  2. Add a WhatsApp Message block

  3. Insert the payment link variable

How to Add the Variable:

  1. Click Add Variables in the message panel

  2. Scroll to Payment Data section

  3. Select Payment Link

  4. The variable {{paymentData.paymentLink}} gets inserted

Example Message:

Hey {{contact.firstName}}, complete your payment here:  

{{paymentData.paymentLink}}

This link expires in 30 minutes.

Better Example:

Hi {{contact.firstName}}!  

Your order total is ₹{{trigger.total_price}}.

Since you chose COD, we're offering you 10% off if you pay online now!

Pay ₹{{paymentData.amount}} here: {{paymentData.paymentLink}}

This link expires in 30 minutes. Complete payment to confirm your order!

Step 9: Handle Payment Outcomes

Connect messages to the three outcome connectors.

Payment Succeed

  1. Click the Payment Succeed connector

  2. Add a WhatsApp Message block

  3. Confirm the payment

Example:

Payment received!  

Your order #{{trigger.order_number}} is confirmed and will be dispatched soon.

Track your order here: {{trigger.order_status_url}}

Payment Failed

  1. Click the Payment Failed connector

  2. Add a WhatsApp Message block

  3. Offer to retry

Example:

Oops! Your payment failed.  

This can happen due to:

• Insufficient funds
• Payment gateway issues
• Incorrect card details

Want to try again? Click on "PAY" and we'll send you a new link.

Payment Link Expired

  1. Click the Payment Link Expired connector

  2. Add a WhatsApp Message block

  3. Offer a new link

Example:

Your payment link expired.  

No worries! We can send you a new one.

Click on "PAY" to get a fresh payment link.

You can loop this back to create a new payment link automatically.


Complete Example: COD to Prepaid Flow

Trigger: Order Created (COD payment method)

Step 1: Create Payment Link

  • Gateway: Razorpay

  • Currency: INR

  • Amount: {{trigger.total_price}}*0.9 (10% discount)

  • Description: "COD to Prepaid - 10% off"

  • Expiration: 30 minutes

Step 2: Send Payment Link (Next Step)

Hi {{contact.firstName}}!  

Thanks for your order of ₹{{trigger.total_price}}.

You chose Cash on Delivery, but if you pay online now, you'll get 10% off!

New total: ₹{{trigger.total_price}}*0.9

Pay here: {{paymentData.paymentLink}}

This offer expires in 30 minutes!

Step 3a: Payment Succeed

Awesome!  Your payment of ₹{{paymentData.amount}} was successful.  

Order confirmed! We'll ship it soon.

Track here: {{trigger.order_status_url}}

Step 3b: Payment Failed

Payment failed.  

Reasons:
• Low balance
• Bank issues
• Wrong details

Tap on "RETRY" for a new link or continue with COD.

Step 3c: Payment Link Expired

Your payment link expired.  

Tap on "RETRY" to get a new link with the same 10% discount!

Tips

✅ Always mention:

  • What they're paying for

  • How much they're paying

  • When the link expires

  • What happens after payment

✅ Keep expiration times realistic. 30 minutes works great for COD conversions.

✅ Use simple math in the amount field. {{total}}*0.9 is easier than calculating manually.

✅ Add context in your messages so customers understand why they're getting a payment link.


Need help? Contact support or check our other guides on payment integrations.Pro Tips

Always add expiration reminders – Tell customers how long they have to pay

Offer to retry – If payment fails or expires, make it easy to try again

Use clear amounts – Show both original and discounted amounts for transparency

Add order details – Help customers remember what they're paying for

Test with small amounts first – Before going live, test with ₹1 or $1 payments

Monitor failed payments – Check the Executions tab to see why payments fail

Use descriptive payment descriptions – This shows up on bank statements and helps avoid disputes

Loop expired links – Allow customers to request new links easily


Common Mistakes to Avoid

Not connecting the Next Step – If you don't send a message with the payment link, customers never see it. So you created a payment link for them, but they will never get to know you did that and will never get to pay since they didn't see it.

Using wrong math operators – Use * for multiplication, not x or ×

Forgetting to save before accessing variables – Save the flow once before the {{paymentData.paymentLink}} variable appears

Setting expiration too long – Short expiration times (30 min - 2 hours) create urgency

Not handling expired links – Always give customers a way to get a new link

Using wrong currency – Make sure currency matches your payment gateway

Not testing the full flow – Test all three outcomes (succeed, fail, expire) before going live


Frequently Asked Questions

Q: What payment gateways are supported?

A: Razorpay and Stripe. You must connect them in Settings → Integrations before using the Payment Link block.


Q: Can I use both Razorpay and Stripe in the same flow?

A: No. Each Payment Link block can only use one gateway. But you can create separate flows for different gateways.


Q: What's the maximum payment link expiration time?

A: 24 hours.


Q: Can I send the payment link via Instagram or Facebook?

A: Yes. The Payment Link block works on WhatsApp, Instagram, and Facebook. Just use Instagram/Facebook message blocks instead of WhatsApp.


Q: How do I access the payment link variable?

A: Save your flow first. Then, in any message block after the Payment Link block, click Add Variables → Payment Data → Payment Link. The variable is {{paymentData.paymentLink}}.


Q: Can I customize the payment page?

A: Not directly in Spur. The payment page design is controlled by Razorpay/Stripe. You can customize it in your Razorpay/Stripe dashboard settings.


Q: What happens if the customer doesn't pay?

A: The flow will wait until the link expires, then trigger the Payment Link Expired connector. You can send a follow-up message or offer a new link.


Q: Can I collect partial payments?

A: Yes. Use calculated amounts. For example, {{trigger.total_price}}*0.5 collects 50% of the order total as a deposit.


Q: How do I know if a payment succeeded?

A: Check the Executions tab in your flow. You'll see which path the flow took (Succeed/Failed/Expired) and what message got sent. You can also check your Razorpay/Stripe dashboard for payment confirmation.


Q: Can I add a discount code to the payment link?

A: Not directly in the Payment Link block. You'll need to calculate the discounted amount manually using math operators (e.g., {{trigger.total_price}}*0.9 for 10% off).


Q: What if payment fails multiple times?

A: You can add a condition after Payment Failed to check how many times the customer tried. If it fails multiple times, offer an alternative (like COD or manual payment instructions).


Summary

Setting

What It Does

Payment Gateway

Choose Razorpay or Stripe

Currency

INR, USD, EUR, etc.

Payment Amount

Fixed amount or variable (e.g., {{trigger.total_price}}*0.1)

Description

What the payment is for

Expiration Time

How long the link stays active (max 24 hours)

Next Step

Where you send the payment link message

Payment Succeed

What happens if payment is successful

Payment Failed

What happens if payment fails

Payment Link Expired

What happens if link expires


Need help? Reach out to our support team anytime :)

Did this answer your question?