Payment Links API

Create a shareable payment link and invoice from your own platform

Overview

The Payment Links endpoint creates an invoice on Royat Pay and returns a hosted payment page URL you can share with a customer — over your own channel (SMS, email, chat, WhatsApp) — instead of building a checkout page yourself. You can optionally have Royat Pay send the notification for you.

👍 When to use this API
  • You want to bill a customer without a full checkout integration — e.g. a manual invoice, a phone order, a support ticket.
  • You already collect the customer's name/mobile/email in your own system and just need a payable link.
📘 Request Header: Add "Authorization": "Bearer {Token}" to the request header. Your client token can be found in your portal account settings.

API Endpoint

Endpoint Method Description
/api/payment/send-payment POST Create an invoice and payment link, with an optional notification

Request Parameters

Parameter Type Required Description
InvoiceValue number Yes Amount to charge, in SAR (e.g. 25.500)
CustomerName string Yes Customer's name on the invoice
NotificationOption string Yes LNK (just return the link — you deliver it yourself), SMS, EML, or ALL
CustomerEmail string No Required if NotificationOption is EML or ALL
CustomerMobile string No Required if NotificationOption is SMS or ALL. Accepts a Saudi mobile with or without +966/0 — normalized automatically
CustomerReference string No Your own order/reference ID, returned on Payment Status lookups
ExpiryDate date No When the link stops being payable
CallBackUrl / ErrorUrl string (URL) No Where the customer lands after paying / on failure
Language string No ar or en

Example request

POST https://panel.royat.sa/api/payment/send-payment
Authorization: Bearer {Token}
Content-Type: application/json

{
  "InvoiceValue": 25.500,
  "CustomerName": "Ahmed Ali",
  "NotificationOption": "LNK",
  "CustomerReference": "ORDER-778",
  "Language": "ar"
}

Response

{
  "IsSuccess": true,
  "Message": "Invoice Created Successfully!",
  "ValidationErrors": null,
  "Data": {
    "InvoiceId": 927973,
    "InvoiceURL": "https://sa.myfatoorah.com/en/...",
    "CustomerReference": "ORDER-778"
  }
}
❗ Confirm before fulfilling: Creating a link does not mean it was paid. Use Payment Status or your webhook to confirm payment before delivering the order.

Support

For more information and support, please contact the Royat Pay team.