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

# Create User URL

> Generate a URL for the Push User Widget or Apple Pay SDK.

- If `type` is omitted, generates a widget URL that supports all card processing types enabled for your instance.
- If `type` is `card_only` or `secure_debit`, generates a widget URL restricted to that processing type. These values require the matching processing category to be enabled on your contract.
- If `type` is `apple_pay`, generates a URL for use with the SDK's `ApplePay` launcher.




## OpenAPI

````yaml /openapi.yaml post /user/{id}/url
openapi: 3.0.1
info:
  title: Push API
  version: 0.0.1
servers:
  - url: https://api.pushcash.com
    description: Production API
  - url: https://sandbox.pushcash.com
    description: Sandbox API used for developing an integration with Push
security:
  - bearer: []
tags:
  - name: user
  - name: tokenization
  - name: authorization
  - name: intent
  - name: dispute
  - name: refund
  - name: accounts
  - name: transactions
  - name: transfer
paths:
  /user/{id}/url:
    post:
      tags:
        - user
      summary: Create User URL
      description: >
        Generate a URL for the Push User Widget or Apple Pay SDK.


        - If `type` is omitted, generates a widget URL that supports all card
        processing types enabled for your instance.

        - If `type` is `card_only` or `secure_debit`, generates a widget URL
        restricted to that processing type. These values require the matching
        processing category to be enabled on your contract.

        - If `type` is `apple_pay`, generates a URL for use with the SDK's
        `ApplePay` launcher.
      operationId: createUserURL
      parameters:
        - name: id
          in: path
          description: The identifier for the user
          required: true
          schema:
            type: string
            example: user_28CJjV7P4Go5PNJvfzghiD
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                direction:
                  $ref: '#/components/schemas/Direction'
                type:
                  type: string
                  enum:
                    - apple_pay
                    - card_only
                    - secure_debit
                  description: >
                    Controls which URL is generated and, for widget URLs, which
                    card processing type is offered to the user. If omitted,
                    generates a widget URL that supports all processing types
                    enabled for your instance.

                    - `card_only`: Generate a widget URL restricted to card-only
                    processing. Card-only credentials can be used for deposits
                    but not withdrawals.

                    - `secure_debit`: Generate a widget URL restricted to Push
                    secure debit processing. Secure debit credentials are
                    bank-authenticated and required for withdrawals.

                    - `apple_pay`: Generate a URL for use with the SDK's
                    `ApplePay` launcher.


                    `card_only` and `secure_debit` require the matching
                    processing category to be enabled on your contract.
            examples:
              widget:
                summary: Generate a widget URL (all enabled processing types)
                value:
                  direction: cash_in
              card_only:
                summary: Generate a widget URL restricted to card-only processing
                value:
                  direction: cash_in
                  type: card_only
              secure_debit:
                summary: Generate a widget URL restricted to secure debit processing
                value:
                  direction: cash_in
                  type: secure_debit
              apple_pay:
                summary: Generate an Apple Pay URL
                value:
                  type: apple_pay
      responses:
        '200':
          description: URL created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: >-
                      A widget URL when `type` is omitted, `card_only`, or
                      `secure_debit`; an Apple Pay URL when `type` is
                      `apple_pay`.
              examples:
                widget:
                  summary: Widget URL
                  value:
                    url: https://cdn.pushcash.com/widget/?param=1&param=2&param=3
                apple_pay:
                  summary: Apple Pay URL
                  value:
                    url: https://cdn.pushcash.com/applepay/?param=1&param=2&param=3
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    Direction:
      type: string
      description: |
        Direction of the payment.
        - Submit `cash_in` for deposits
        - Submit `cash_out` for withdrawals
      enum:
        - cash_in
        - cash_out
    error:
      description: Description of the error encountered from the API request
      type: object
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````