Links

Create a payment link for your customers. Store must be verified to create links. The referenceId must be unique across all your links.

post/api/v1/links

Request

  • Base URL
    https://api.thewayl.com
  • URL
    https://api.thewayl.com/api/v1/links
  • Auth
    API key in header X-WAYL-AUTHENTICATION

Request body

env'live' | 'test'

The env of the link.

referenceIdstring

A unique identifier for the link on your system (max 255 characters). Must be unique across all your links.

totalnumber

The total amount to be paid in IQD (minimum 1000). Must equal the sum of all line items if line items are provided.

currencystring

The currency of the link. Currently only IQD is supported.

customParameterstring

Optional custom parameter for your internal tracking or display purposes.

webhookUrlstring

The webhook URL to be called when payment status changes. Must be a valid URL.

webhookSecretstring

Secret key used to verify webhook authenticity (10-255 characters). Will be encrypted in our system.

redirectionUrlstring

The URL to redirect customers after successful payment. Will have referenceId and orderid appended as query parameters.

linkExpiresInstring

Optional duration until the payment link expires. Format: number + unit (m, h, or d), e.g. "30m", "1h", "24h", "7d". Must be between 1m and 30d. Defaults to "1h" when omitted.

Example request

{
  "env": "live",
  "referenceId": "dummy-reference-id",
  "total": 10000,
  "currency": "IQD",
  "lineItem": [
    {
      "label": "Basket Value",
      "amount": 10000
    }
  ],
  "webhookUrl": "https://webhook.site/your-webhook-url",
  "webhookSecret": "1234567890",
  "redirectionUrl": "https://www.google.com",
  "linkExpiresIn": "24h"
}

Changes