> For the complete documentation index, see [llms.txt](https://docs.papelship.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.papelship.com/api-based-store/payment-links.md).

# Payment Links

Hosted payment link generation supporting Credit Card, Papara, and Crypto

## Generate Hosted Checkout Payment Link

> Creates a custom payment link invoice supporting Credit Card, Papara, Bank Transfer, and Crypto payment methods.

```json
{"openapi":"3.0.3","info":{"title":"PapelShip API Gateway","version":"1.0.0"},"tags":[{"name":"Payment Links","description":"Hosted payment link generation supporting Credit Card, Papara, and Crypto"}],"servers":[{"url":"https://papelship.com","description":"Production API Server"}],"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API-Key","description":"Pass your secret API key formatted as: `Authorization: Bearer psa_...`"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Alternative header format: `X-API-Key: psa_...`"}}},"paths":{"/api/api-store/payment-links":{"post":{"summary":"Generate Hosted Checkout Payment Link","description":"Creates a custom payment link invoice supporting Credit Card, Papara, Bank Transfer, and Crypto payment methods.","operationId":"createPaymentLink","tags":["Payment Links"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique UUID/string to prevent duplicate invoice creation on retries.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount","storeHashId","apiKeyId"],"properties":{"storeHashId":{"type":"string","description":"Your store 12-char hash ID"},"apiKeyId":{"type":"integer","description":"Numeric API Key ID"},"amount":{"type":"number","description":"Total amount in fiat currency"},"currency":{"type":"string","description":"ISO 4217 Currency (USD, EUR, TRY, GBP)","default":"USD"},"customer_email":{"type":"string","format":"email"},"description":{"type":"string"},"redirect_url":{"type":"string","format":"uri"},"expires_in":{"type":"integer","description":"Expiration period in minutes (default 1440)","default":1440}}}}}},"responses":{"200":{"description":"Payment link invoice created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"invoice":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}}},"checkout_url":{"type":"string","format":"uri"}}}}}},"400":{"description":"Bad Request / Validation Error"},"401":{"description":"Unauthorized / Invalid API Key"}}}}}}
```
