Skip to main content

Pay By Link

Send your customers a unique link via email, WhatsApp or SMS to pay online in one click!

Pay By Link

Overview

This page explains how to create payment links from the MONEI Dashboard or programmatically using the MONEI Payments API.

Pay By Link generates a unique URL for a specific payment amount that directs the customer to a secure MONEI-hosted payment page.

Create from Dashboard

You can create payment links directly from the MONEI Dashboard without writing any code.

1. Navigate to Payments

Go to MONEI Dashboard → Payments and click the Pay By Link button.

Dashboard Payments

2. Fill in the payment form

Fill in the payment details. Some fields are always required, while others depend on the selected payment methods.

Quick Summary
  • Always required: Amount, Allowed payment methods.
  • Conditionally required: Customer email and Billing Address (for specific methods).
  • Optional: Expiration date, Order ID, customer details, description, store, shipping address.
FieldStatusNotes
AmountRequiredPayment amount in your account currency
Allowed payment methodsRequiredAt least one method must be selected
Expiration dateOptionalDefaults to 7 days from creation; must be a future date
Order IDOptionalAlphanumeric identifier, max 40 characters
Customer nameOptional
Customer emailConditionalRequired when Multibanco or MB WAY is selected
Customer phoneOptional
DescriptionOptionalCustom description attached to the payment
StoreOptionalOnly visible if you have multiple stores configured
Billing AddressConditionalRequired when Multibanco or MB WAY is selected
Shipping AddressOptionalOptional, collapsible section
Create Payment Form

Conditional behavior by payment method

The form adapts automatically based on the selected payment methods.

Billing Address and Customer Email become required when any of these payment methods is selected:

  • Multibanco
  • MB WAY
Billing Address

Manually capture payment checkbox appears only when all selected payment methods support manual capture:

  • Card
  • PayPal
  • Bizum

If any other method is included (e.g. Multibanco), the manual capture option is hidden.

Manual Capture

After clicking Create payment, a Send payment request modal appears where you can review the payment details before sending the link to your customer.

Send Payment Request

From this modal you can configure:

  • Delivery channel — Choose how to deliver the link: Email, WhatsApp, SMS, or Payment request.
  • Send to — The recipient's email address or phone number, depending on the selected channel.
  • Customer language — The language for the payment page and notification (English, Español, Català, Português, Deutsch, Italiano, Français).
Delivery Channel
Customer Language

The modal also shows:

  • A preview of the payment notification with order ID, amount, date, and billing details.
  • A Permalink and Get short link option to copy the payment URL directly without sending a notification.

Click Send payment request to deliver the link to the customer through the selected channel.

API Integration

The following section explains the API flow (server-side implementation).

Before You Begin (API)

  • You'll need a MONEI account and your API keys (test or live). Find them in your MONEI Dashboard.
  • Use your test mode keys for integration testing.
  • Ensure relevant payment methods are enabled in your account settings for the hosted page.
  • You can monitor test payments in your MONEI Dashboard → Payments (ensure Test Mode is active).

Integration Steps

Creating and processing a Pay By Link payment via API involves creating a payment on your server, sending the generated link to the customer, and processing the final payment status via webhooks.

1. Create Payment (Server-side)

Create a Payment on your server with an amount, currency, and optionally customer details.

POST https://api.monei.com/v1/payments
curl --request POST 'https://api.monei.com/v1/payments' \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 110,
"currency": "EUR",
"orderId": "14379133960355",
"description": "Test Shop - #14379133960355",
"customer": {
"email": "email@example.com",
"phone": "+34666555444"
},
"callbackUrl": "https://example.com/checkout/callback",
"completeUrl": "https://example.com/checkout/complete", // Optional: Redirect after payment attempt
"cancelUrl": "https://example.com/checkout/cancel" // Optional: Redirect if user cancels
}'

(Replace YOUR_API_KEY with your actual MONEI API key)

Key Parameters:

  • amount positive integer: Amount in the smallest currency unit.
  • currency string: Three-letter ISO currency code.
  • orderId string: Your unique order identifier.
  • customer.email / customer.phone string: At least one is required if you want MONEI to send the link automatically (Step 2).
  • callbackUrl string: Your server endpoint for webhook notifications (crucial for final status).
  • completeUrl / cancelUrl string (Optional): URLs for redirecting the customer after interaction.

Check all available request parameters.

The response contains the payment.id, needed for the next step.

You have two main options to get the link to the customer:

Option A: MONEI Sends the Link (Recommended for Simplicity)

Make a POST request to the /v1/payments/{payment_id}/link endpoint. If you provided customer.email or customer.phone in Step 1, MONEI will automatically send the link via the appropriate channel (email, WhatsApp, or SMS).

POST https://api.monei.com/v1/payments/{payment_id}/link
curl --request POST 'https://api.monei.com/v1/payments/{payment_id}/link' \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"language": "es", // Optional: Set language for email/SMS template
"channel": "email" // Optional: Force channel (email, whatsapp, sms)
}'

(Replace {payment_id} and YOUR_API_KEY)

Option B: You Send the Link

The Payment object returned in Step 1 contains payment.nextAction.redirectUrl. This is the payment link.

Example Partial Response from Step 1
{
"id": "af6029f80f5fc73a8ad2753eea0b1be0",
// ... other fields ...
"nextAction": {
"type": "CONFIRM",
"mustRedirect": true,
"redirectUrl": "https://secure.monei.com/payments/af6029f80f5fc73a8ad2753eea0b1be0" // <-- This is the Pay By Link URL
}
}

You can take this redirectUrl and send it to your customer through your own communication channels (email, SMS, in-app message, etc.).

Customer Interaction:

  1. The customer clicks the link.
  2. They are taken to the secure MONEI payment page.
  3. They choose a payment method, enter details, and complete any required authentication (like 3D Secure).
  4. After attempting payment or cancelling, they might be redirected to your completeUrl or cancelUrl if you provided them in Step 1.

3. Process Webhook Notification (Server-side)

Regardless of whether the customer is redirected, MONEI sends the final, authoritative payment status via an asynchronous HTTP POST request to the callbackUrl you provided in Step 1. The request body contains the full Payment object in JSON format.

This webhook is the only reliable way to confirm the definitive payment outcome.

Crucially, you must:

  1. Verify the MONEI-Signature header included in the request. This confirms the webhook genuinely came from MONEI. See the Verify Signatures guide for implementation details.
  2. Return a 200 OK HTTP status code immediately upon receiving the webhook to acknowledge receipt. Any other status code tells MONEI the notification failed.

If MONEI doesn't receive a 200 OK, it will retry sending the webhook.

Once the signature is verified, inspect the status field in the Payment object (SUCCEEDED, FAILED, CANCELED, etc.) to determine whether to fulfill the order or handle the failure.