Create Payment Link

Create a new payment link that customers can use to make payments.

Endpoint

POST /api/payment-links

Request Body

ParameterTypeRequiredDescription
amountnumberYesPayment amount
currencystringYesCurrency code (e.g., USD, EUR)
descriptionstringNoDescription of the payment
expires_atstringNoExpiration date (ISO 8601 format)

Response

Returns the created payment link object.
{
  "id": "pl_123456789",
  "url": "https://checkout.devdraft.ai/pl_123456789",
  "amount": 100.00,
  "currency": "USD",
  "description": "Product purchase",
  "status": "active",
  "created_at": "2023-01-01T00:00:00Z"
}