> ## Documentation Index
> Fetch the complete documentation index at: https://developers.papelship.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Hosted Checkout Payment Link

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



## OpenAPI

````yaml /api-reference/openapi/api-store.json post /api/api-store/payment-links
openapi: 3.0.3
info:
  title: PapelShip API Gateway
  description: >-
    Official API reference for PapelShip API Store integrations, hosted payment
    links, direct crypto deposit invoices, real-time blockchain status checks,
    and HMAC webhooks.
  version: 1.0.0
  contact:
    name: PapelShip Support
    url: https://app.papelship.com
    email: support@papelship.com
servers:
  - url: https://app.papelship.com
    description: Production API Server
security:
  - BearerAuth: []
  - ApiKeyAuth: []
tags:
  - name: Payment Links
    description: Hosted payment link generation supporting Credit Card, Papara, and Crypto
  - name: Crypto Invoice
    description: Direct cryptocurrency deposit invoice generation with HD wallet derivation
  - name: Payment Status
    description: Real-time payment status and blockchain confirmation check API
  - name: Orders
    description: V1 store order creation API
  - name: Refunds
    description: Invoice refund processing API
paths:
  /api/api-store/payment-links:
    post:
      tags:
        - Payment Links
      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
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: Unique UUID/string to prevent duplicate invoice creation on retries.
          schema:
            type: string
            example: 7b9e8f1a-3c2d-4e5f-6a7b-8c9d0e1f2a3b
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
                - storeHashId
                - apiKeyId
              properties:
                storeHashId:
                  type: string
                  description: Your store 12-char hash ID
                  example: 0bHQn0bU2dei
                apiKeyId:
                  type: integer
                  description: Numeric API Key ID
                  example: 42
                amount:
                  type: number
                  description: Total amount in fiat currency
                  example: 49.99
                currency:
                  type: string
                  description: ISO 4217 Currency (USD, EUR, TRY, GBP)
                  default: USD
                  example: USD
                customer_email:
                  type: string
                  format: email
                  example: buyer@example.com
                description:
                  type: string
                  example: 'API Store Service Order #1042'
                redirect_url:
                  type: string
                  format: uri
                  example: https://yourdomain.com/checkout/success
                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
                    example: true
                  invoice:
                    type: object
                    properties:
                      id:
                        type: string
                        example: aB9xK12Lp9012345678901234
                      amount:
                        type: number
                        example: 49.99
                      currency:
                        type: string
                        example: USD
                      status:
                        type: string
                        example: awaiting_method
                      expires_at:
                        type: string
                        format: date-time
                        example: '2026-08-09T02:18:00.000Z'
                  checkout_url:
                    type: string
                    format: uri
                    example: >-
                      https://app.papelship.com/checkout-gateway/aB9xK12Lp9012345678901234
        '400':
          description: Bad Request / Validation Error
        '401':
          description: Unauthorized / Invalid API Key
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_...`'

````