Vayapay Docs

Payment links

Get paid without a webshop by sending your customers a link to the Vayapay hosted payment page.

A payment link is a URL you send to your customer, for example in an email, chat message or invoice. The link opens the hosted payment page, where your customer selects a payment method and pays.

Your customer can use the same link again after a failed attempt, until the payment succeeds or the link expires. Every time your customer opens the link and tries to pay, Vayapay creates a new order. A link allows up to 25 attempts.

How it works

Create payment links in the merchant portal at https://merchant.secure.vayapay.com. You don't need a technical integration, so you can start accepting payments right away.

To create links from your own systems, for example for every invoice, use the API. You need the API key of a test project: in the merchant portal, go to Settings > API Key.

Send a POST request to /v1/paymentlinks/:

curl https://api.secure.vayapay.com/v1/paymentlinks/ \
  --user "$API_KEY:" \
  --header "Content-Type: application/json" \
  --data '{
    "merchant_order_id": "EXAMPLE001",
    "amount": 995,
    "currency": "EUR",
    "description": "Invoice EXAMPLE001",
    "expiration_period": "P20D",
    "payment_methods": ["credit-card", "apple-pay", "google-pay"],
    "return_url": "https://www.example.com/thank-you",
    "webhook_url": "https://www.example.com/webhook"
  }'

The response contains the link id and the payment_url. The response is shortened:

{
  "id": "a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7",
  "merchant_order_id": "EXAMPLE001",
  "amount": 995,
  "currency": "EUR",
  "description": "Invoice EXAMPLE001",
  "expiration_period": "P20D",
  "payment_methods": ["credit-card", "apple-pay", "google-pay"],
  "payment_url": "https://api.secure.vayapay.com/paylink/a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7/"
}

Save the id to look up the link later.

Only merchant_order_id, amount and currency are required. Without expiration_period, the link stays valid for 30 days. See Create a payment link in the API reference for all fields.

Send the payment_url to your customer, for example in an email, a chat message or on an invoice.

Retrieve the link to see its status and all orders created from it:

curl https://api.secure.vayapay.com/v1/paymentlinks/a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7/ \
  --user "$API_KEY:"
{
  "id": "a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7",
  "merchant_order_id": "EXAMPLE001",
  "amount": 995,
  "currency": "EUR",
  "description": "Invoice EXAMPLE001",
  "expiration_period": "P20D",
  "payment_url": "https://api.secure.vayapay.com/paylink/a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7/",
  "created": "2026-10-12T15:39:12.773776+00:00",
  "modified": "2026-10-12T16:18:37.196467+00:00",
  "completed": "2026-10-12T16:18:32.574222+00:00",
  "completed_order_id": "3bb663cc-2a20-400d-8bf6-18d9695d0c66",
  "orders": {
    "error": ["0d79014c-0aaa-4fd6-87c5-c8cfa5f5ac69"],
    "completed": ["3bb663cc-2a20-400d-8bf6-18d9695d0c66"]
  },
  "status": "completed",
  "reason": "Completed"
}

The orders object lists the IDs of all orders created from the link, grouped by order status. In this example, the first attempt failed and the second one succeeded. The completed_order_id is the order that was paid. Retrieve that order for its details.

Link statusMeaning
newThe link was created. Your customer hasn't tried to pay yet.
processingYour customer opened the link and a payment is in progress.
all_unsuccessfulEvery attempt so far failed. The link hasn't expired, so your customer can try again.
completedOne of the attempts succeeded. You've been paid.
expiredThe link expired without a successful payment.

The webhooks you receive are about the orders created from the link, not about the link itself. See Confirm the payment.

Test your integration

Create a link in your test project and open its payment_url:

  • Pay with a test card from Test data: the link status becomes completed, and completed_order_id is the paid order.
  • Let a first attempt fail, then pay: the link status is all_unsuccessful after the failure, and completed after the payment.
  • Your webhook endpoint receives a webhook for each order created from the link.

Go live

Create links in your live project, with its API key. Check that the webhook URL of your live project points at your production server. See the go-live checklist.

Beyond the basics

  • Choose the payment methods: send payment_methods to show only some of the payment methods that are active in your project.
  • Set the expiry: send expiration_period, such as P20D for 20 days.
  • Send your customer back to your website: send a return_url.
  • Create many links: you can't create links in a batch, but there's no limit on the number of links. Send one request per link.

See Create a payment link in the API reference for these fields.