# Create Payment Link

Create a new payment link for the authenticated business.

## Endpoint

`POST /api/v1/payment-link`

### Send

#### Authorization

**BearerAuth**  
AuthorizationBearer <token>  
In: `header`

### Request Body

**Content-Type:** application/json

| Parameter                | Type                       | Description                      |
|--------------------------|----------------------------|----------------------------------|
| link_name                | string                     | The name for the payment link.  |
| amount?                  | integer|null               | The amount for the payment.      |
| start_date?             | string|null                | The start date for the payment.  |
| end_date?               | string|null                | The end date for the payment.    |
| redirect_link?          | string|null                | The URL to redirect after payment. |
| narration                | string                     | The narration for the payment.    |
| source_reference?        | string                     | Source reference for tracking.    |
| customer_emails?        | array|null                 | List of customer emails.          |
| fee_bearer              | string                     | Who bears the fee for the payment.|

### Response Body

#### Success Response (201)
```json
{
  "requestId": "abcd1234-5678-90ef-ghij-1234567890kl",
  "requestTimestamp": "2026-03-25 09:15:00",
  "message": "Payment link created successfully.",
  "statusCode": 201,
  "data": {
    "linkName": "Invoice payment",
    "linkUrl": "https://app.example.com/pay/PLK_ABC123456",
    "amount": 5000,
    "currency": "NGN",
    "status": "active",
    "reference": "PLK_ABC123456",
    "sourceReference": "SRC_PLK_001"
  }
}
```

#### Error Responses  
- **401**  
- **422**

### Example cURL Request
```bash
curl -X POST "https://atlas.tryduplo.com/api/v1/payment-link" \  
 -H "Authorization: Bearer <token>" \  
 -H "Content-Type: application/json" \  
 -d '{    "link_name": "Invoice payment",    "narration": "Payment for March invoice",    "fee_bearer": "MERCHANT"  }'
```

**Last updated on 5/27/2026**
