POST
/
api
/
v0
/
payment-links
Create a new payment link
curl --request POST \
  --url https://api.devdraft.ai/api/v0/payment-links \
  --header 'Content-Type: application/json' \
  --header 'x-client-secret: <api-key>' \
  --data '{
  "title": "Premium Subscription",
  "url": "premium-subscription",
  "description": "Get access to all premium features with our monthly subscription plan. Includes priority support and advanced analytics.",
  "coverImage": "https://example.com/images/premium-subscription.jpg",
  "linkType": "PRODUCT",
  "amount": 29.99,
  "paymentForId": "sub_123456789",
  "customerId": "123e4567-e89b-12d3-a456-426614174002",
  "paymentLinkProducts": [
    {
      "productId": "123e4567-e89b-12d3-a456-426614174003",
      "quantity": 1
    },
    {
      "productId": "123e4567-e89b-12d3-a456-426614174004",
      "quantity": 2
    }
  ],
  "isForAllProduct": false,
  "allowQuantityAdjustment": true,
  "collectTax": true,
  "taxId": "123e4567-e89b-12d3-a456-426614174005",
  "collectAddress": true,
  "limitPayments": true,
  "maxPayments": 100,
  "customFields": {
    "customField1": "value1",
    "customField2": "value2"
  },
  "allowMobilePayment": true,
  "currency": "usdc",
  "expiration_date": "2024-12-31T23:59:59Z"
}'

Authorizations

x-client-secret
string
header
required

Your secret API key. Keep this secure and never expose it in client-side code.

Body

application/json

Payment link creation data

The body is of type object.

Response

201

The payment link has been successfully created.