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

# Create Payment

> Allows to create a payment order



## OpenAPI

````yaml POST /payments
openapi: 3.0.0
info:
  title: Ebioro Merchant API
  description: >-
    API for merchant payment processing on Stellar. Supports direct USDC
    payments and cross-chain deposits from multiple blockchains.
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /payments:
    post:
      tags:
        - Payments
      summary: Creates a payment. This is where most implementations start.
      description: Allows to create a payment order
      operationId: createPayment
      parameters:
        - name: x-digest-timestamp
          in: header
          description: Current Unix timestamp
          required: true
          schema:
            type: string
        - name: x-digest-key
          in: header
          description: Your public api key
          required: true
          schema:
            type: string
        - name: x-digest-signature
          in: header
          description: Digest Auth Signature
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            maxLength: 255
          description: >-
            Optional. A unique string (max 255 chars) that makes payment
            creation idempotent: replaying a request with the same key returns
            the original response instead of creating a duplicate payment.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentDto'
      responses:
        '200':
          description: >-
            On success the endpoint will return a JSON object with detailed
            payment information.
          content:
            application/json:
              example:
                id: pt_AEtKAcN9d-
                createdAt: '2023-11-18T20:46:15.652Z'
                updatedAt: '2023-11-18T20:46:15.652Z'
                expiresAt: '2023-11-18T21:16:15.649Z'
                mode: test
                amount:
                  value: 200
                  currency: USD
                description: Buying phone
                status: open
                settlement_status: open
                redirectUrl: https://example.com
                checkout_id: pt_AEtKAcN9d-
                webhookUrl: https://example.com/webhook
                hostedUrl: >-
                  https://sandbox-pay.ebioro.com/payments?paymentId=pt_QKTDINJ662&auth_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0LmViaW9yby5jb20iLCJhdWQiOiJodHRwczovL3Rlc3QtZWJpb3JvLW1lcmNoYW50LXNlcnZpY2UtMzgxNTIyNmU5MmE4Lmhlcm9rdWFwcC5jb20iLCJzdWIiOiJjMzMyZTlkYi1kYjQ1LTQ1ZmQtOTFmMy03NGNiNWU5NTQzYzQiLCJpYXQiOjE3MTQwNjcxOTIsImV4cCI6MTcxNDA3MDc5Mn0.EY5xyWptYzD1HgJPUev6LGMRFFZ8HDZOsE2Vk35OASk&lang=es
                shortUrl: https://sandbox-pay.ebioro.com/iqtRR_42J4TAIFbciUUlV
                qrCode: >-
                  web+stellar:pay?destination=GAPU7KB2B2USVSWBFJRHGX7AYIWYKF2W44WWDCYEJTEER5D2QYEGD5GM&amount=2.68&asset_code=USDC&asset_issuer=GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5&memo=pt_AEtKAcN9d-&memo_type=text&msg=Buying+phone
                merchantName: Test Store
                cancelUrl: https://example.com/cancel
                locale: es
                metadata: {}
                stellarTxId: >-
                  1b680e9577572a0c3e648dcc1686373c87417d9ec17614d0ed5bf0ca397f8fcd
                settlement_stellarTxId: >-
                  1b680e9577572a0c3e648dcc1686373c87417d9ec17614d0ed5bf0ca397f8fcd
                settlement_currency: USDC
                settlement_amount: 2663
                settlement_fee: 66.575
                amount_paid: 0
                history:
                  - time: 1714124827333
                    status: success
                    description: Payment created
                sender_account: GDFJ7PTIJGDINCLD7ZWZMYURELPMP6JZ6NMJBDBHKDXBFFWBC4SUFA4F
                asset_id: USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
                refunded: false
                type: order
                partner_id: 4f56c1ff-837c-4a1c-b372-1ddf840f252c
              schema:
                type: object
                properties:
                  id:
                    type: string
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  expiresAt:
                    type: string
                  mode:
                    type: string
                  amount:
                    type: object
                    properties:
                      value:
                        type: number
                      currency:
                        type: string
                  description:
                    type: string
                  status:
                    type: string
                  settlement_status:
                    type: string
                  redirectUrl:
                    type: string
                  checkout_id:
                    type: string
                  webhookUrl:
                    type: string
                  hostedUrl:
                    type: string
                  qrCode:
                    type: string
                  merchantName:
                    type: string
                  cancelUrl:
                    type: string
                  locale:
                    type: string
                  metadata:
                    type: object
                  stellarTxId:
                    type: string
                  settlement_stellarTxId:
                    type: string
                  settlement_currency:
                    type: string
                  settlement_amount:
                    type: number
                  settlement_fee:
                    type: number
                  amount_paid:
                    type: number
                  history:
                    type: array
                    items:
                      type: object
                      properties:
                        time:
                          type: number
                        status:
                          type: string
                        description:
                          type: string
                  sender_account:
                    type: string
                  asset_id:
                    type: string
                  refunded:
                    type: boolean
                  type:
                    type: string
                  partner_id:
                    type: string
                  escrow_status:
                    type: string
                    description: >-
                      Current escrow status. Only present for merchants with
                      settlement_mode = escrow. Possible values: created,
                      funded, failed.
                  escrow_order_id:
                    type: string
                    description: >-
                      The on-chain escrow order ID. Only present for merchants
                      with settlement_mode = escrow.
                  escrow_contract_address:
                    type: string
                    description: >-
                      The Soroban escrow contract address. Only present for
                      merchants with settlement_mode = escrow.
                  escrow_platform_fee_bps:
                    type: integer
                    description: >-
                      Platform fee in basis points (1% = 100 bps) to be deducted
                      at release time. Only present for merchants with
                      settlement_mode = escrow.
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                reason: Bad Request
                statusCode: 400
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                  reason:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                reason: Unauthorized
                statusCode: 401
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                  reason:
                    type: string
        '409':
          description: >-
            A request with this Idempotency-Key is already being processed.
            Retry after a short delay.
          content:
            application/json:
              example:
                reason: A request with this Idempotency-Key is already being processed
                statusCode: 409
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                  reason:
                    type: string
        '422':
          description: The Idempotency-Key was reused with a different request body.
          content:
            application/json:
              example:
                reason: Idempotency-Key reused for a different request
                statusCode: 422
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                  reason:
                    type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                reason: Internal Server Error
                statusCode: 500
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                  reason:
                    type: string
      security:
        - customHeader: []
components:
  schemas:
    CreatePaymentDto:
      type: object
      properties:
        amount:
          type: object
          description: >-
            The amount to be charged, expressed in the smallest unit of the
            currency (e.g., cents for USD).
          example:
            currency: USD
            value: 1000
        description:
          type: string
          example: Payment for order 12345
          description: >-
            A description of the payment. This will be displayed to the
            customer.
        redirectUrl:
          type: string
          example: https://example.com/redirect
          description: >-
            URL to redirect the customer after a successful payment. Optional:
            omit it for a payment link — the customer then sees an Ebioro-hosted
            confirmation screen.
        name:
          type: string
          example: Example Store
          description: >-
            The name of your store, shown to the customer during payment.
            Defaults to the merchant name if not provided.
        cancelUrl:
          type: string
          example: https://example.com/cancel
          description: >-
            URL where the customer is redirected if they cancel the payment.
            Defaults to `redirectUrl` if not provided.
        webhookUrl:
          type: string
          example: https://example.com/webhook
          description: Server URL to receive payment status updates via webhook.
        locale:
          type: string
          example: en
          description: >-
            Locale setting for the payment page, used to preset the language
            shown to the customer. Supported locales include [en, es].
        metadata:
          type: object
          example:
            orderId: 12345
          description: >-
            Custom metadata to be associated with the payment. This can be any
            structured data relevant to the payment.
        partnerId:
          type: string
          example: 4cfad08e-1b41-4283-b4cc-f916cd4beba0
          description: For integrations done via an ebioro partner
        escrowPayee:
          type: string
          example: GBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
          description: >-
            Stellar address of the fund recipient for escrow payments. Use this
            when the payee is a different party from the merchant — i.e., the
            driver in a ride-hailing app (Uber), the host in a rental platform
            (Airbnb), or the freelancer in a services marketplace (Upwork). If
            omitted, defaults to the merchant's Stellar account (common for
            remittances and POS use cases). Only applicable for merchants with
            settlement_mode = escrow.
        escrowPlatformFee:
          type: integer
          example: 500
          description: >-
            Platform fee in basis points (1% = 100 bps) to be deducted from the
            escrowed amount at release time. If omitted, defaults to the
            merchant's configured platform fee. Only applicable for merchants
            with settlement_mode = escrow.
        expiresInHours:
          type: number
          example: 168
          description: >-
            Number of hours until this payment expires. If omitted, defaults to
            30 minutes (suitable for a checkout). Set a longer window (e.g. 168
            = 7 days) for a payment link shared with a payer.
        storeId:
          type: string
          example: store_8821
          description: >-
            Optional store identifier for merchants operating multiple stores.
            Returned on the payment and usable as a filter on GET /payments.
        escrowExpiresAt:
          type: string
          format: date-time
          example: '2026-12-31T23:59:59Z'
          description: >-
            Expiration time for the escrow order (ISO 8601). Defaults to 7 days
            from payment creation. Only applicable for merchants with
            settlement_mode = escrow.
      required:
        - amount
        - description
  securitySchemes:
    customHeader:
      type: apiKey
      in: header
      name: x-digest-key
      description: Your public API key

````