openapi: 3.0.1
info:
  title: Open Fabric APIs
  description: Open Fabric APIs, v1
  version: v1
  contact:
    name: Open Fabric API
    url: https://openfabric.co
    email: api@openfabric.co
tags:
  - name: Authentication
    description: >
      Our APIs use an authentication scheme based on OAuth 2.0. See
      [Authentication](/docs/Getting-Started/Authentication) for more details.
  - name: Transaction orchestration
    description: >
      APIs you use to approve/decline and query transactions during online
      orchestration.


      See [Orchestrated integration
      guide](/docs/OnlineOrchestration/TenantIntegrationGuide-Orchestrated) for
      the end-to-end flow.
  - name: Callback subscriptions
    description: >
      APIs to manage your callback (webhook) subscriptions for
      online-orchestration updates.
  - name: Partner management
    description: >
      APIs to create, update, list, and deactivate merchants/payment gateways
      (“partners”) that integrate with Open Fabric.


      See [Partner onboarding and management
      APIs](/docs/OnlineOrchestration/TenantServicing-PartnerManagementAPIs).
  - name: Partner settings
    description: >
      APIs to manage partner credentials, callback subscriptions, and payment
      gateway credentials used for token handover.


      See [Partner onboarding and management
      APIs](/docs/OnlineOrchestration/TenantServicing-PartnerManagementAPIs).
  - name: Retrieve Card Details
    description: >-
      APIs used to retrieve sensitive virtual card details. See [Display card
      details](/docs/AccountTokenization/VirtualCards/DisplayVirtualCards) for
      more details.
  - name: Provision Account
    description: >-
      API used to provision new accounts. See [Provision
      account](/docs/AccountTokenization/Overview) for more details.
  - name: Merchant / gateway orchestration
    description: >
      APIs that merchants and payment gateways use with the Open Fabric Merchant
      SDK to create and manage transactions.


      See [Merchant / gateway integration
      guides](/docs/OnlineOrchestration/PartnerIntegration-Models).
  - name: Merchant / gateway settings
    description: >
      APIs that merchants and payment gateways use to manage their integration
      settings.


      See [Merchant / gateway integration
      guides](/docs/OnlineOrchestration/PartnerIntegration-Models).
  - name: Manage Virtual Cards
    description: >-
      APIs used to manage virtual cards. See [Manage virtual
      cards](/docs/AccountTokenization/VirtualCards/TokenManagement) for more
      details.
  - name: 3D Secure
    description: >
      APIs and messages used to complete 3D Secure challenges during payment
      processing. 
              
      See [Handle 3D Secure
      Payments](/docs/AccountTokenization/VirtualCards/3DSecure) for more
      details.
  - name: Manage Secure Device Wallets
    description: >-
      APIs used to manage the lifecycle of secure device wallets. See [Lifecycle
      management](/docs/AccountTokenization/OwnAppTokens/LifeCycleManagement)
      for more details.
  - name: Display Virtual Cards
    description: >-
      APIs used to display virtual card details securely. See [Display virtual
      cards](/docs/AccountTokenization/VirtualCards/DisplayVirtualCards) for
      more details.
  - name: Token Update Notifications
    description: >
      Notifications sent to your backend when tokens change state within a
      secure device wallet or when a tokenized transaction authorization occurs
      within the wallet.


      See [Token update
      notifications](/docs/AccountTokenization/OwnAppTokens/LifeCycleManagement)
      for more details.
  - name: Authorization
    description: >
      APIs related to authorization messages. These are messages sent from our
      platform to your backend.


      See [Authorization
      message](/docs/ProcessingPayments/AuthorizationMessages) for more details.
  - name: Ledger Operations
    description: >
      Ledger operations that Open Fabric calls on your backend to apply balance
      changes (debit/credit/hold/release).


      See [Ledger APIs](/docs/ProcessingPayments/LedgerAPIs) for more details.
  - name: Reversal Notifications
    description: >
      Notifications related to reversals. These are messages sent from our
      platform to your backend.


      See [Reversal
      notifications](/docs/ProcessingPayments/ReversalNotifications) for more
      details.
  - name: Clearing
    description: >
      Messages related to clearing. These are messages sent from our platform to
      your backend via notifications and reporting.


      See [Clearing operations](/docs/ProcessingPayments/Clearing) for more
      details.
  - name: Settlement
    description: >
      Messages related to settlement. These are messages sent from our platform
      to your backend via notifications and reporting.


      See [Settlement](/docs/ProcessingPayments/Settlement) for more details.
servers:
  - url: https://api.sandbox.openfabric.co
    description: Sandbox
  - url: https://api.dev.openfabric.co
    description: Development
  - url: https://api.openfabric.co
    description: Production
paths:
  /oauth2/token:
    post:
      servers:
        - url: https://auth.sandbox.openfabric.co
          description: Sandbox
        - url: https://auth.dev.openfabric.co
          description: Development
        - url: https://auth.openfabric.co
          description: Production
      summary: Request access token
      operationId: getAccessToken
      tags:
        - Authentication
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                  id_token:
                    type: string
                  token_type:
                    type: string
                  expires_in:
                    type: number
              example:
                access_token: eyJz9sdfsdfsdfsd
                id_token: dmcxd329ujdmkemkd349r
                token_type: Bearer
                expires_in: 3600
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - grant_type
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
                scope:
                  type: string
                  description: >
                    Requested scopes for this access token, separated by
                    whitespace. If not provided, all available scopes of the
                    client will be requested.

                    For the list of available scopes, please refer to the `API
                    Access Scopes` document.
            example:
              grant_type: client_credentials
              scope: resources/transactions.create resources/transactions.read
      x-publishable: true
  /v1/tenants/subscriptions:
    get:
      tags:
        - Callback subscriptions
      summary: List all webhook subscriptions
      description: List all webhook subscriptions for Tenant
      operationId: getAccountNotificationSubscriptions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountNotificationSubscriptionResponse'
              example:
                value: &ref_1
                  id: cd992711-498f-47be-b636-cf2e3eaad935
                  tenant_id: 00fcf093-71fb-4349-8c0b-de810480d6b1
                  type: webhook
                  subscribed_events:
                    - '*'
                  config:
                    url: https://sample-bnpl
                    authConfig:
                      header: X-API-Key
                      value: HxMrzQBFbaDeLkUar87nczWNi
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
    post:
      tags:
        - Callback subscriptions
      summary: Create a webhook subscription
      description: Create a webhook subscription for Tenant
      operationId: createAccountNotificationSubscription
      parameters:
        - name: webhook_type
          in: query
          description: Webhook type
          schema:
            $ref: '#/components/schemas/WebhookType'
      requestBody:
        description: Notification subscription object to init
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountNotificationSubscriptionRequest'
            examples:
              AccountNotificationSubscription:
                $ref: >-
                  #/components/examples/AccountNotificationSubscriptionRequestExample
      responses:
        '201':
          description: Create Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountNotificationSubscriptionResponse'
              examples:
                Created:
                  $ref: '#/components/examples/AccountNotificationSubscriptionExample'
        '500':
          description: Create Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                failed:
                  value:
                    message: Error happen. Schema is not valid
                    error_code: VALIDATION_ERROR
      x-publishable: true
  /v1/tenants/subscriptions/{id}:
    put:
      tags:
        - Callback subscriptions
      summary: Update a subscription
      description: Update an existing webhook subscription for Tenant
      operationId: updateAccountNotificationSubscription
      parameters:
        - name: id
          in: path
          description: ID of an existing notification subscription
          required: true
          schema:
            type: string
            format: uuid
        - name: webhook_type
          in: query
          description: Webhook type
          schema:
            $ref: '#/components/schemas/WebhookType'
      requestBody:
        description: Notification subscription object to update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountNotificationSubscriptionRequest'
            examples:
              AccountNotificationSubscription:
                $ref: >-
                  #/components/examples/AccountNotificationSubscriptionRequestExample
      responses:
        '200':
          description: Update Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountNotificationSubscriptionResponse'
              examples:
                OK:
                  $ref: '#/components/examples/AccountNotificationSubscriptionExample'
        '500':
          description: Create Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                failed:
                  value:
                    message: Error happen. Schema is not valid
                    error_code: VALIDATION_ERROR
      x-publishable: true
  /v1/tenants/partners:
    parameters: []
    get:
      summary: List all Partners
      description: Get all Partners associated with current Tenant
      tags:
        - Partner management
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantsResponse'
              examples:
                success:
                  $ref: '#/components/examples/MerchantListExample'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
      operationId: getAccountMerchants
      parameters:
        - schema:
            type: string
            example: name,+tenant_partner_id
          in: query
          name: sort
          description: Multiple sorting conditions
        - schema:
            type: string
          in: query
          name: name
          description: Filter by name
        - schema:
            type: string
          in: query
          name: tenant_partner_id
          description: Filter by Tenant Partner id
        - schema:
            type: string
          in: query
          name: slug
          description: Filter by slug
        - schema:
            type: string
          in: query
          name: country
          description: Filter by country
        - schema:
            type: string
          in: query
          name: website_url
          description: Filter by website
        - schema:
            type: string
          in: query
          name: category
          description: Filter by category
        - schema:
            type: integer
          in: query
          name: page
          description: Current page
        - schema:
            type: integer
          in: query
          name: limit
          description: Number of records
          deprecated: true
        - schema:
            type: integer
          in: query
          name: page_size
          description: Number of records
        - schema:
            type: string
            example: labels=qrph,nfc
          in: query
          name: labels
          description: Filter by Labels
      x-publishable: true
    post:
      summary: Create a Partner
      tags:
        - Partner management
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Merchant'
              examples:
                success:
                  $ref: '#/components/examples/CreatedMerchantsExample'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
      operationId: createAccountMerchant
      description: Create a Partner
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMerchantRequest'
      x-publishable: true
  /v1/tenants/partners/{partner_id}:
    parameters:
      - schema:
          type: string
        name: partner_id
        in: path
        required: true
    get:
      summary: Get a Partner details
      description: Get a Partner details
      tags:
        - Partner management
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Merchant'
              examples:
                success:
                  $ref: '#/components/examples/MerchantExample'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      operationId: getAccountMerchant
      x-publishable: true
    patch:
      summary: Update a Partner
      tags:
        - Partner management
      requestBody:
        description: Body request to update Partner for Tenant
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMerchantRequest'
            examples:
              UpdateMerchantRequest:
                $ref: '#/components/examples/UpdateMerchantRequestExample'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Merchant'
              examples:
                success:
                  $ref: '#/components/examples/MerchantExample'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      operationId: updateAccountMerchant
      description: Update a Partner with the current Tenant
      x-publishable: true
    delete:
      summary: Deactivate a Partner
      tags:
        - Partner management
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
              examples:
                success:
                  $ref: '#/components/examples/SuccessMessage'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      operationId: deleteAccountMerchant
      description: Delete Partner association with the current Tenant
      x-publishable: true
  /v1/tenants/partners/{partner_id}/api_credentials/{alias}:
    get:
      summary: 'Credential: Retrieve API credentials'
      description: Retrieve API credentials of a Partner
      tags:
        - Partner settings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantCredential'
              examples:
                success:
                  $ref: '#/components/examples/MerchantCredentialExample'
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      operationId: getMerchantsApiCredential
      parameters:
        - name: partner_id
          in: path
          description: Partner ID
          required: true
          schema:
            type: string
            format: uuid
        - name: alias
          in: path
          description: Alias for the credentials
          required: true
          schema:
            type: string
            pattern: ^[\S]+$
      x-publishable: true
    put:
      summary: 'Credential: Renew API credentials'
      description: Revoke and request new API credentials of a Partner
      tags:
        - Partner settings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantCredential'
              examples:
                success:
                  $ref: '#/components/examples/MerchantCredentialExample'
        '500':
          description: Internal Server Error
      operationId: updateMerchantsApiCredential
      parameters:
        - name: partner_id
          in: path
          description: Partner ID
          required: true
          schema:
            type: string
            format: uuid
        - name: alias
          in: path
          description: Alias for the credentials
          required: true
          schema:
            type: string
            pattern: ^[\S]+$
      x-publishable: true
  /v1/tenants/partners/{partner_id}/subscriptions:
    post:
      tags:
        - Partner settings
      summary: 'Webhook: Create a webhook subscription'
      description: Create a webhook subscription for a Partner
      operationId: createMerchantNotificationSubscription
      parameters:
        - name: partner_id
          in: path
          description: Partner ID
          required: true
          schema:
            type: string
            format: uuid
        - name: webhook_type
          in: query
          description: Webhook type
          schema:
            $ref: '#/components/schemas/WebhookType'
      requestBody:
        description: Notification subscription object to init
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantNotificationSubscriptionRequest'
            examples:
              MerchantNotificationSubscription:
                $ref: >-
                  #/components/examples/MerchantNotificationSubscriptionRequestExample
      responses:
        '201':
          description: Create Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantNotificationSubscriptionResponse'
              examples:
                Created:
                  $ref: >-
                    #/components/examples/MerchantNotificationSubscriptionExample
        '500':
          description: Create Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                failed:
                  value:
                    message: Error happen. Schema is not valid
                    error_code: VALIDATION_ERROR
      x-publishable: true
  /v1/tenants/partners/{partner_id}/subscriptions/{id}:
    put:
      tags:
        - Partner settings
      summary: 'Webhook: Update a subscription'
      description: Update a webhook subscription of a Partner
      operationId: updateMerchantNotificationSubscription
      parameters:
        - name: partner_id
          in: path
          description: Partner ID
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          description: ID of an existing notification subscription
          required: true
          schema:
            type: string
            format: uuid
        - name: webhook_type
          in: query
          description: Webhook type
          schema:
            $ref: '#/components/schemas/WebhookType'
      requestBody:
        description: Notification subscription object to update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantNotificationSubscriptionRequest'
            examples:
              MerchantNotificationSubscription:
                $ref: >-
                  #/components/examples/MerchantNotificationSubscriptionRequestExample
      responses:
        '200':
          description: Update Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantNotificationSubscriptionResponse'
              examples:
                OK:
                  $ref: >-
                    #/components/examples/MerchantNotificationSubscriptionExample
        '500':
          description: Create Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                failed:
                  value:
                    message: Error happen. Schema is not valid
                    error_code: VALIDATION_ERROR
      x-publishable: true
  /v1/tenants/partners/{partner_id}/pg_credentials:
    get:
      operationId: getMerchantPGCredentials
      summary: 'PG: List all PG credentials'
      description: List all PG credentials of a Partner
      tags:
        - Partner settings
      parameters:
        - name: partner_id
          in: path
          description: Partner ID
          required: true
          schema:
            type: string
            format: uuid
        - schema:
            type: string
            pattern: ^[\S]+$
          in: query
          name: pg_name
          description: pg name
      responses:
        '200':
          description: Partner pg credential settings
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PGCredentialsResponse'
              example:
                value: &ref_2
                  id: 143334c3-1b7d-433a-939a-f63c9022f800
                  tenant_id: a6dbbdab-1b7d-433a-939a-f63c9022f833
                  partner_id: 27666828-57f9-4709-a9a9-84167e091f5f
                  pg_name: xendit
                  credential_format: api_key_pair
                  redacted_credentials:
                    api_key_pair:
                      public_api_key: aDSlnuizcvjsdl89ucIOasdzxczxczxckjzxkcjzsODMz
                      private_api_key: aDSlnuizcvjsdl89ucIOasdzxczxczxckjzxkcjzsODMz
                  additional_params:
                    processing_channel_id: aDSlnuizcvjsdl89ucIOasdzxczxczxckjzxkcjzsODMz
                  charge_config:
                    request_pg_3ds: true
                    headless_3ds: false
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/tenants/partners/{partner_id}/pg_credentials/{pg_name}:
    put:
      operationId: updateMerchantPGCredentials
      summary: 'PG: Create/Update credentials for a PG'
      description: Update a PG credential for a PG of a Partner
      tags:
        - Partner settings
      parameters:
        - name: partner_id
          in: path
          description: Partner ID
          required: true
          schema:
            type: string
            format: uuid
        - name: pg_name
          in: path
          description: PG name
          required: true
          schema:
            type: string
            pattern: ^[\S]+$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PGCredentialsRequest'
            example:
              value:
                credential_format: api_key_pair
                credentials:
                  api_key_pair:
                    public_api_key: aDSlnuizcvjsdl89ucIOasdzxczxczxckjzxkcjzsODMz
                    private_api_key: aDSlnuizcvjsdl89ucIOasdzxczxczxckjzxkcjzsODMz
                additional_params:
                  processing_channel_id: aDSlnuizcvjsdl89ucIOasdzxczxczxckjzxkcjzsODMz
                charge_config:
                  request_pg_3ds: true
                  headless_3ds: false
      responses:
        '200':
          description: Partner pg credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PGCredentialsResponse'
              examples:
                PGCredentials:
                  $ref: '#/components/examples/PGCredentialsExample'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
    get:
      operationId: getMerchantPGCredential
      summary: 'PG: Get credentials for a PG'
      description: Get a PG credential for a PG of Partner
      tags:
        - Partner settings
      parameters:
        - name: partner_id
          in: path
          description: Partner ID
          required: true
          schema:
            type: string
            format: uuid
        - name: pg_name
          in: path
          description: PG name
          required: true
          schema:
            type: string
            pattern: ^[\S]+$
      responses:
        '200':
          description: Partner pg credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PGCredentialsResponse'
              examples:
                PGCredentials:
                  $ref: '#/components/examples/PGCredentialsExample'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
    delete:
      operationId: deleteMerchantPGCredentials
      summary: 'PG: Delete credentials for a PG'
      description: Delete credentials for a PG of a Partner
      tags:
        - Partner settings
      parameters:
        - name: partner_id
          in: path
          description: Partner ID
          required: true
          schema:
            type: string
            format: uuid
        - name: pg_name
          in: path
          description: PG name
          required: true
          schema:
            type: string
            pattern: ^[\S]+$
      responses:
        '204':
          description: no content
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/tenants/partners/{partner_id}/whitelabel/config:
    parameters:
      - schema:
          type: string
          format: uuid
        name: partner_id
        description: Partner ID
        in: path
        required: true
    get:
      summary: 'Whitelable: Get config'
      description: Get whitelabel config of a Partner
      tags:
        - Partner settings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhiteLabelFeatures'
        '404':
          description: Not Found
      operationId: getWhiteLabelConfig
      x-publishable: true
    put:
      summary: 'Whitelabel: Update config'
      description: Update whitelabel config of a Partner
      tags:
        - Partner settings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhiteLabelFeatures'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhiteLabelFeatures'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
      operationId: updateWhiteLabelConfig
      x-publishable: true
  /v1/tenants/partners/whitelabel/widget:
    post:
      summary: 'Whitelabel: Retrieve widget'
      description: QuerRetrievey widget info to display for a Partner
      tags:
        - Partner settings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WidgetMetadata'
              examples:
                success:
                  $ref: '#/components/examples/WidgetMetadataExample'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getWidgetData
      x-publishable: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WidgetQueryRequest'
  /v1/tenants/partners/transactions:
    post:
      summary: Create a transaction
      description: >-
        This will be called by Partner to initialize a transaction before
        interacting with payment methods
      operationId: createMerchantTransaction
      tags:
        - Merchant / gateway orchestration
      parameters:
        - in: header
          name: Idempotency-Key
          description: >-
            Unique value submitted by the client to ensure idempotent request
            when creating transaction.
          schema:
            type: string
        - name: txn_trace_id
          in: query
          description: Trace UUID (v4) to follow payment sessions
          schema:
            type: string
            format: uuid
      requestBody:
        description: Transaction object to init
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerTransactionRequest'
            examples:
              MerchantCreateTransaction:
                $ref: '#/components/examples/ClientTransactionRequestExample'
      responses:
        '201':
          description: Create Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientTransactionResponse'
              examples:
                Created:
                  $ref: '#/components/examples/ClientTransactionResponseExample'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/tenants/partners/transactions/{id}:
    get:
      summary: Get transaction details
      description: This will return Detailed Transaction by Open Fabric Reference ID
      operationId: getMerchantTransactionById
      tags:
        - Merchant / gateway orchestration
      parameters:
        - name: txn_trace_id
          in: query
          description: Trace UUID (v4) to follow payment sessions
          schema:
            type: string
            format: uuid
        - schema:
            type: string
            format: uuid
          name: id
          in: path
          required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ClientTransactionResponse'
              example:
                value: &ref_0
                  id: ff0398e5-d045-441f-b130-bcd517964775
                  partner_reference_id: P1293201980299030
                  tenant_reference_id: Tenant-cd992711-498f-47be-b636-cf2e3eaad935
                  tenant_id: 00fcf093-71fb-4349-8c0b-de810480d6b1
                  partner_id: 9bde4fbf-893b-49f9-b7b3-4079a76bb362
                  tenant_partner_id: 27666828-57f9-4709-a9a9-84167e091f5f
                  partner_redirect_success_url: >-
                    https://sample-merchant-flow.dev.openfabric.co??id=f0398e5-d045-441f-b130-bcd517964775&state=PAID
                  partner_redirect_fail_url: >-
                    https://sample-merchant-flow.dev.openfabric.co?id=f0398e5-d045-441f-b130-bcd517964775&state=CANCELLED
                  payment_redirect_web_url: https://sample-bnpl-web.dev.openfabric.co
                  customer_id: 88db7aa7-2cdd-42cc-9827-8d46f936ef79
                  customer_info:
                    mobile_number: '+6587654321'
                    first_name: postpebnpl
                    last_name: developer
                    country: Singapore
                    country_code: SG
                    email: developer@bnpl1.com
                  amount: 120.1
                  currency: SGD
                  status: in_progress
                  created_at: '2021-11-06T04:26:47.450Z'
                  updated_at: '2021-11-06T04:26:47.450Z'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/tenants/partners/transactions/{id}/refunds:
    post:
      summary: Refund a transaction
      description: >-
        This will refund a transaction that was charged by Open Fabric on behalf
        of Partner
      operationId: refundTransaction
      tags:
        - Merchant / gateway orchestration
      parameters:
        - in: header
          name: Idempotency-Key
          description: >-
            Unique value submitted by the partner to ensure idempotent request
            when refunding transaction.
          schema:
            type: string
        - schema:
            type: string
            format: uuid
          name: id
          in: path
          required: true
      requestBody:
        description: Refund request body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRefundRequest'
            examples:
              TransactionRefundRequest:
                $ref: '#/components/examples/TransactionRefundRequestExample'
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TransactionRefundResponse'
              example:
                value:
                  id: 00fcf093-71fb-4349-8c0b-de810480d6b1
                  pg_refund_id: 00fcfasfas24r234saf
                  data:
                    id: 00fcfasfas24r234saf
                    external_id: 00fcf0sf-71fb-4349-8c0b-213412349840
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/tenants/partners/transaction:
    get:
      summary: Get transaction by partner reference id
      description: This will fetch the transaction by partner reference id
      operationId: getTransactionByPartnerReferenceId
      tags:
        - Merchant / gateway orchestration
      parameters:
        - schema:
            type: string
          name: partner_reference_id
          in: query
          required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientTransactionResponse'
              example:
                value: *ref_0
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/tenants/partners/metadata:
    get:
      summary: Get payment method metadata
      description: >-
        With the payment methods input, we identify Partner by access_token,
        only payment methods available with this Partner will be returned
      operationId: getMerchantPaymentMethodMetadata
      tags:
        - Merchant / gateway orchestration
      parameters:
        - name: txn_trace_id
          in: query
          description: Trace UUID (v4) to follow payment sessions
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PaymentMethodMetadata'
              example:
                value:
                  - tenant_id: 00fcf093-71fb-4349-8c0b-de810480d6b1
                    name: Sample BNPL
                    slug: sample-bnpl
                    tenant_partner_id: 27666828-57f9-4709-a9a9-84167e091f5f
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/tenants/partners/config:
    put:
      summary: Update settings
      description: Update webhook subscription and PG credentials settings of a Partner
      operationId: updateMerchantConfig
      tags:
        - Merchant / gateway settings
      requestBody:
        description: Webhook and PG credentials details request for Partner
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantConfigUpdateRequest'
            example:
              value:
                webhook:
                  type: webhook
                  subscribed_events:
                    - '*'
                  config:
                    url: https://sample-merchant
                    authConfig:
                      header: X-API-Key
                      value: HxMrzQBFbaDeLkUar87nczWNi
                payment_gateway:
                  pg_name: xendit
                  credential_format: api_key_pair
                  credentials:
                    api_key_pair:
                      public_api_key: pk-rdjftkyghjl9876543210
                      private_api_key: sk-rdjftkyghjl9876543210
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantConfigUpdateResponse'
              examples:
                Created:
                  $ref: '#/components/examples/MerchantConfigUpdateResponseExample'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/pg_configuration_metadata:
    get:
      operationId: getPgConfigurationMetadata
      summary: Get configurations metadata for PG
      description: Get configuration metadata for PG
      tags:
        - Partner settings
      responses:
        '200':
          description: PG configuration schema
          content:
            application/json:
              schema:
                type: object
      x-publishable: true
  /v1/pba/static:
    get:
      operationId: GetStaticTokens
      summary: List virtual cards
      description: >
        This API can be used to list all virtual cards belonging to a customer.


        **Warning**

        This API can also be used to list all virtual cards of all customers (by
        omitting both `tenant_customer_ref` and `tenant_account_ref` in the
        request parameters). This kind of query should only be used in extreme
        scenarios.
      tags:
        - Manage Virtual Cards
      parameters:
        - schema:
            type: string
          in: query
          name: tenant_customer_ref
          description: Filter by tenant customer ref
        - schema:
            type: string
          in: query
          name: tenant_account_ref
          description: Filter by tenant account ref
        - schema:
            $ref: '#/components/schemas/RoutingDataInitializingInstrument'
          in: query
          name: instrument
          description: Filter by instrument
        - schema:
            $ref: '#/components/schemas/StaticTokenStatus'
          in: query
          name: status
          description: Filter by status
        - schema:
            type: boolean
          in: query
          name: locked
          description: Filter by lock status
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStaticTokensMinimalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/pba/static/{id}:
    parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
        description: Static token id
    get:
      operationId: GetStaticToken
      summary: Get virtual card
      description: This API can be used to get details of a specific virtual card.
      tags:
        - Manage Virtual Cards
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaticTokenMinimalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
    patch:
      operationId: updateStaticToken
      summary: Update virtual card
      description: This API can be used to lock or unlock a specific virtual card.
      tags:
        - Manage Virtual Cards
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStaticTokenRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaticTokenMinimalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
    delete:
      operationId: deleteStaticToken
      summary: Delete virtual card
      description: >
        This API can be used to deactivate a specific virtual card. 


        **Warning**

        This action is permanent (cannot be undone) and requires the virtual
        card to be locked first before deleting.
      tags:
        - Manage Virtual Cards
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteStaticTokenRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaticTokenMinimalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/cards/widget:
    post:
      servers:
        - url: https://issuer.sandbox.openfabric.co
          description: Sandbox
        - url: https://issuer.dev.openfabric.co
          description: Development
        - url: https://issuer.openfabric.co
          description: Production
      operationId: createCardWidget
      tags:
        - Display Virtual Cards
      summary: Create card details widget
      description: >-
        Generates a short-lived widget URL for displaying card details (PAN,
        expiry, CVV) in an iframe or webview. The widget URL is time-limited and
        single-use.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCardWidgetRequest'
            examples:
              WithCardFetchToken:
                value:
                  card_fetch_token: eyJhbGciOiJIUzI1...
                  card_art_asset_id: 7f3a2b1c-9d4e-5f6a-8b7c-0d1e2f3a4b5c
              WithStaticTokenAndBase64Art:
                value:
                  static_token_id: 6f3a2b1c-9d4e-5f6a-8b7c-0d1e2f3a4b5c
                  card_art_base64: iVBORw0KGgoAAAANSUhEUgAAAVQAAADW...
                  card_art_content_type: image/png
      responses:
        '200':
          description: Widget URL created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCardWidgetResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/cards/assets:
    post:
      servers:
        - url: https://issuer.sandbox.openfabric.co
          description: Sandbox
        - url: https://issuer.dev.openfabric.co
          description: Development
        - url: https://issuer.openfabric.co
          description: Production
      operationId: uploadCardArtAsset
      tags:
        - Display Virtual Cards
      summary: Upload card art asset
      description: >-
        Uploads a card art image for reuse across multiple widget sessions.
        Returns an asset_id that can be referenced in the widget creation API.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadCardArtAssetRequest'
      responses:
        '201':
          description: Card art asset uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardArtAssetResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
    get:
      servers:
        - url: https://issuer.sandbox.openfabric.co
          description: Sandbox
        - url: https://issuer.dev.openfabric.co
          description: Development
        - url: https://issuer.openfabric.co
          description: Production
      operationId: listCardArtAssets
      tags:
        - Display Virtual Cards
      summary: List card art assets
      description: Returns all card art assets uploaded by the tenant.
      responses:
        '200':
          description: List of card art assets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCardArtAssetsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/cards/assets/{asset_id}:
    delete:
      servers:
        - url: https://issuer.sandbox.openfabric.co
          description: Sandbox
        - url: https://issuer.dev.openfabric.co
          description: Development
        - url: https://issuer.openfabric.co
          description: Production
      operationId: deleteCardArtAsset
      tags:
        - Display Virtual Cards
      summary: Delete card art asset
      description: >-
        Deletes a previously uploaded card art asset. Existing widget sessions
        that already resolved this asset are unaffected.
      parameters:
        - name: asset_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Asset deleted successfully
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Asset not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /as-configured-by-you/authorization-approval:
    post:
      operationId: authorizationMessage
      summary: Authorization message
      description: >
        Real-time authorization messages sent to your backend for an
        approval/decline decision. 

        The same schema is used for final authorizations and
        pre-authorizations. 


        See [Authorization
        message](/docs/ProcessingPayments/AuthorizationMessages) for more
        details.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Authorization
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PbaAskForApprovalOutboundPayload'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PbaAskForApprovalOutboundResponse'
  /as-configured-by-you/ledger/debit-balance:
    post:
      operationId: debitBalance
      summary: Debit balance
      description: |
        `debit_balance`: Deduct funds from a customer’s balance for settlement.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Ledger Operations
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DebitBalanceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DebitBalanceResponse'
  /as-configured-by-you/ledger/credit-balance:
    post:
      operationId: creditBalance
      summary: Credit balance
      description: >
        `credit_balance`: Add funds to a customer’s balance (for refunds or
        adjustments).
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Ledger Operations
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditBalanceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditBalanceResponse'
  /as-configured-by-you/ledger/hold-balance:
    post:
      operationId: holdBalance
      summary: Hold balance
      description: >
        `hold_balance`: Place a hold on funds in a customer’s balance
        (pre-authorization).
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Ledger Operations
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HoldBalanceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HoldBalanceResponse'
  /as-configured-by-you/ledger/restore-balance:
    post:
      operationId: restoreBalance
      summary: Restore balance
      description: >
        `restore_balance`: Release previously held funds back to available
        balance.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Ledger Operations
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestoreBalanceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestoreBalanceResponse'
  /as-configured-by-you/ledger/debit-hold-balance:
    post:
      operationId: debitHoldBalance
      summary: Debit hold balance
      description: >
        `debit_hold_balance`: Deduct an amount from previously held funds
        (created with `hold_balance`).
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Ledger Operations
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DebitHoldBalanceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DebitHoldBalanceResponse'
  /as-configured-by-you/ledger/credit-hold-balance:
    post:
      operationId: creditHoldBalance
      summary: Credit hold balance
      description: >
        `credit_hold_balance`: Add an amount to previously held funds (created
        with `hold_balance`).
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Ledger Operations
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditHoldBalanceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditHoldBalanceResponse'
  /as-configured-by-you/final-auth-reversal:
    post:
      operationId: finalAuthReversalNotification
      summary: Final authorization reversal notification
      description: >
        Notification sent when a previously approved **final authorization** is
        reversed.


        See [Reversal
        notifications](/docs/ProcessingPayments/ReversalNotifications#final-authorization-reversal)
        for more details.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Reversal Notifications
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PbaFinalAuthReversalNotificationEnvelope'
      responses:
        '200':
          description: OK
  /as-configured-by-you/pre-auth-reversal:
    post:
      operationId: preAuthReversalNotification
      summary: Pre-authorization reversal notification
      description: >
        Notification sent when a previously approved **pre-authorization** is
        reversed.


        See [Reversal
        notifications](/docs/ProcessingPayments/ReversalNotifications#pre-authorization-reversal)
        for more details.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Reversal Notifications
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PbaPreAuthReversalNotificationEnvelope'
      responses:
        '200':
          description: OK
  /as-configured-by-you/authorization-failed:
    post:
      operationId: authorizationFailedNotification
      summary: Authorization failed notification
      description: >
        Notification sent when an authorization could not be completed
        successfully (e.g. due to timeout or non-200 from your approval
        endpoint) and was declined on your behalf.


        See [Reversal
        notifications](/docs/ProcessingPayments/ReversalNotifications#authorization-failed-notification)
        for more details.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Reversal Notifications
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PbaAuthorizationFailedNotificationEnvelope'
      responses:
        '200':
          description: OK
  /as-configured-by-you/clearing-file-ready:
    post:
      operationId: clearingFileReadyNotification
      summary: Clearing file ready notification
      description: |
        Notification sent when a clearing file is ready to be processed.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Clearing
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PbaClearingFileReadyNotificationEnvelope'
      responses:
        '200':
          description: OK
  /as-configured-by-you/settlement-file-ready:
    post:
      operationId: settlementFileReadyNotification
      summary: Settlement file ready notification
      description: |
        Notification sent when a settlement file is ready to be processed.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Settlement
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PbaSettlementFileReadyNotificationEnvelope'
      responses:
        '200':
          description: OK
  /as-configured-by-you/token-updates/token-activated:
    post:
      operationId: tokenActivatedNotification
      summary: Token activated notification
      description: >
        This notification is sent when an account or card was successfully
        tokenized and activated in the secure device wallet.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Token Update Notifications
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WalletTokenActivatedNotificationEnvelope'
      responses:
        '200':
          description: OK
  /as-configured-by-you/token-updates/token-suspended:
    post:
      operationId: tokenSuspendedNotification
      summary: Token suspended notification
      description: >
        This notification is sent when the tokenized account or card is
        suspended in the secure device wallet.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Token Update Notifications
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WalletTokenSuspendedNotificationEnvelope'
      responses:
        '200':
          description: OK
  /as-configured-by-you/token-updates/token-deleted:
    post:
      operationId: tokenDeletedNotification
      summary: Token deleted notification
      description: >
        This notification is sent when the tokenized account or card is deleted
        from the secure device wallet.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Token Update Notifications
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WalletTokenDeletedNotificationEnvelope'
      responses:
        '200':
          description: OK
  /as-configured-by-you/token-updates/transaction-authorization:
    post:
      operationId: transactionAuthorizationNotification
      summary: Transaction authorization notification
      description: >
        This notification is sent when a transaction is authorized within the
        secure device wallet.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Token Update Notifications
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/WalletTransactionAuthorizationNotificationEnvelope
      responses:
        '200':
          description: OK
  /as-configured-by-you/online-orchestration/partner/transaction-approved:
    post:
      operationId: partnerTransactionApprovedNotification
      summary: Transaction approved notification
      description: >
        Notification sent to your partner's backend when a transaction is
        approved.
      servers:
        - url: https://{your_partner_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_partner_webhook_host:
              default: api.your-partner.com
      tags:
        - Merchant / gateway orchestration
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantTransactionApprovedNotification'
      responses:
        '200':
          description: OK
  /as-configured-by-you/online-orchestration/partner/transaction-failed:
    post:
      operationId: partnerTransactionFailedNotification
      summary: Transaction failed notification
      description: >
        Notification sent to your partner's backend when a transaction is
        failed.
      servers:
        - url: https://{your_partner_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_partner_webhook_host:
              default: api.your-partner.com
      tags:
        - Merchant / gateway orchestration
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantTransactionFailedNotification'
      responses:
        '200':
          description: OK
  /v1/pba/provision:
    post:
      operationId: PbAProvision
      summary: Provision a new account
      description: >
        This API can be used to provision a new account or virtual card. 


        See [Own App
        Tokens](/docs/AccountTokenization/OwnAppTokens/TokenizeCustomerAccount),
        [Digital Wallet Tokens](/docs/AccountTokenization/DigitalWalletTokens)
        or [Virtual
        Cards](/docs/AccountTokenization/VirtualCards/CreateVirtualCards) for
        more details.
      tags:
        - Provision Account
      parameters:
        - in: header
          name: Idempotency-Key
          description: >-
            Unique value submitted by the partner to ensure idempotent request
            during provisioning.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PbaProvisionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PbaProvisionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/nfc/cards/push_provision:
    post:
      summary: Provision an account for an existing card
      description: >
        This API can be used to provision an account for an existing card.


        See [Own App Tokens - Tokenize an existing
        card](/docs/AccountTokenization/OwnAppTokens/TokenizeExistingCard) for
        more details.
      operationId: pushProvisionCard
      tags:
        - Provision Account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CardPushProvisionRequest'
      responses:
        '200':
          description: Push provision successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardPushProvisionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/nfc/wallets/{id}/lock:
    parameters:
      - schema:
          type: string
          format: uuid
        in: path
        required: true
        name: id
        description: Wallet ID(format UUID)
    post:
      operationId: NfcLockWallet
      summary: Lock a secure device wallet
      description: >
        You can use this API to lock a secure device wallet. This will
        temporarily block payments and other functionalities of the wallet.
      tags:
        - Manage Secure Device Wallets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PbaWalletStatusUpdateRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PbaWalletStatusUpdateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/pba/static/card_fetch_token:
    post:
      operationId: StaticTokenCardFetchToken
      summary: Get card fetch token
      description: >-
        This API can be used to get a card fetch token for a specific virtual
        card.
      tags:
        - Retrieve Card Details
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenProvisioningCardFetchTokenRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenProvisioningCardFetchTokenResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/tenants/cards/details:
    post:
      servers:
        - url: https://issuer.sandbox.openfabric.co
          description: Sandbox
        - url: https://issuer.dev.openfabric.co
          description: Development
        - url: https://issuer.openfabric.co
          description: Production
      operationId: fetchCardDetails
      tags:
        - Retrieve Card Details
      summary: Retrieve card details
      description: >
        This API can be used to retrieve sensitive details of a virtual card.


        **Warning**

        Please be aware that your system might be subject to a higher level of
        PCI DSS certification if you use this API.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchCardRequest'
            example:
              card_fetch_token: YTZkYmJkYWItMWI3ZC00MzNhLTkzOWEtZjYzYzkwMjJmODMz
      responses:
        '200':
          description: Card Cvv Details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FullCardDetails'
              examples:
                FullCardDetails:
                  $ref: '#/components/examples/FullCardDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /as-configured-by-you/3ds/oob-challenge:
    post:
      operationId: threeDsOobChallengeRequest
      summary: Out-of-band (OOB) challenge request
      description: >
        This notification is sent to your backend when a 3D Secure challenge
        requires an out-of-band (OOB) challenge to be completed.


        See [3DS Out of Band (OOB) challenge
        flow](/docs/AccountTokenization/VirtualCards/3DSecure#3ds-out-of-band-oob-challenge-flow)
        for more details.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - 3D Secure
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pba3dsChallengeOutboundPayload'
      responses:
        '202':
          description: Accepted
  /v1/3ds/responses:
    post:
      summary: Out of Band (OOB) challenge response
      description: >
        This API is used for you to update our system with the 3DS challenge
        response in case of the Out of Band (OOB) challenge flow. 


        See [3DS Out of Band (OOB) challenge
        flow](/docs/AccountTokenization/VirtualCards/3DSecure#3ds-out-of-band-oob-challenge-flow)
        for more details.
      tags:
        - 3D Secure
      operationId: Update3dsResponses
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PbaThreeDsResponseRequest'
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /as-configured-by-you/3ds/otp:
    post:
      operationId: threeDsOtpRequest
      summary: Send OTP request
      description: >
        This notification is sent to your backend when a 3D Secure challenge
        requires an OTP to be sent to the cardholder.


        See [3DS OTP
        flow](/docs/AccountTokenization/VirtualCards/3DSecure#3ds-otp-flow) for
        more details.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - 3D Secure
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pba3dsOtpOutboundPayload'
      responses:
        '200':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pba3dsOtpOutboundResponse'
  /as-configured-by-you/online-orchestration/transaction-request:
    post:
      operationId: onlineOrchestrationTransactionRequest
      summary: Transaction request
      description: >
        Open Fabric calls your backend to create a transaction request after a
        customer selects your payment method at checkout.


        You return a response containing a `redirect_url` to your approval flow
        and gateway URLs used to redirect the customer back to checkout.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Transaction orchestration
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantTransactionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantTransactionResponse'
  /v1/tenants/transactions:
    patch:
      summary: Approve / Decline a transaction
      description: Tenant can call this API to approve or fail a transaction.
      operationId: updateTransaction
      tags:
        - Transaction orchestration
      requestBody:
        description: >-
          Open Fabric will create a Transaction with the default state
          `created`.  Tenant can update the transaction to `approved` or
          `failed`.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTransactionRequest'
            examples:
              FailedTransactionRequest:
                $ref: '#/components/examples/UpdateTransactionFailedExample'
              ApprovedTransactionRequest:
                $ref: '#/components/examples/UpdateTransactionApprovedExample'
      responses:
        '204':
          description: The transaction is updated successfully
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/tenants/transactions/{id}:
    get:
      summary: Get a transaction data
      tags:
        - Transaction orchestration
      description: This API can be used to fetch a transaction
      operationId: getTransaction
      parameters:
        - schema:
            type: string
            format: uuid
          name: id
          in: path
          required: true
          description: >-
            OpenFabric Generated ID for this Transaction. You will receive this
            part of Update Transaction Response.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
              examples:
                TransactionResponse:
                  $ref: '#/components/examples/TransactionResponseExample'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /v1/tenants/transactions/{id}/details:
    get:
      summary: Get a transaction detailed data
      tags:
        - Transaction orchestration
      description: >-
        This API can be used to fetch transaction with all details including
        card, customer and transaction information submitted by Partner.
      operationId: getTransactionDetails
      parameters:
        - schema:
            type: string
            format: uuid
          name: id
          in: path
          required: true
          description: >-
            OpenFabric Generated ID for this Transaction. You will receive this
            part of Update Transaction Response.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionDetailsResponse'
              examples:
                DetailedTransaction:
                  $ref: '#/components/examples/TransactionDetailsExample'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-publishable: true
  /as-configured-by-you/online-orchestration/transaction-charged:
    post:
      operationId: onlineOrchestrationTransactionCharged
      summary: Transaction charged update
      description: >
        Callback sent to your backend after a one-time payment credential is
        charged successfully.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Transaction orchestration
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionChargedNotification'
      responses:
        '200':
          description: OK
  /as-configured-by-you/online-orchestration/transaction-reversed:
    post:
      operationId: onlineOrchestrationTransactionReversed
      summary: Transaction reversed update
      description: >
        Callback sent to your backend when a reversal or refund is issued
        against a one-time payment credential.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Transaction orchestration
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionReversedNotification'
      responses:
        '200':
          description: OK
  /as-configured-by-you/online-orchestration/transaction-credited:
    post:
      operationId: onlineOrchestrationTransactionCredited
      summary: Transaction credited update
      description: |
        Callback sent to your backend when a transaction is credited.
      servers:
        - url: https://{your_webhook_host}
          description: Your backend endpoint (not Open Fabric).
          variables:
            your_webhook_host:
              default: api.your-company.com
      tags:
        - Transaction orchestration
      x-badges:
        - name: Out
          position: before
          color: '#2563eb'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionCreditedNotification'
      responses:
        '200':
          description: OK
x-tagGroups:
  - name: Getting Started
    tags:
      - Authentication
  - name: Account Tokenization
    tags:
      - Provision Account
      - Manage Secure Device Wallets
      - Retrieve Card Details
      - Display Virtual Cards
      - Manage Virtual Cards
      - Token Update Notifications
  - name: Payment Processing
    tags:
      - Authorization
      - Ledger Operations
      - Reversal Notifications
      - 3D Secure
      - Clearing
      - Settlement
  - name: Online Orchestration
    tags:
      - Transaction orchestration
      - Callback subscriptions
      - Partner management
      - Partner settings
      - Merchant / gateway orchestration
      - Merchant / gateway settings
components:
  schemas:
    DebitBalanceRequest:
      allOf:
        - $ref: '#/components/schemas/schemas-DebitBalanceRequest'
    DebitBalanceResponse:
      allOf:
        - $ref: '#/components/schemas/schemas-DebitBalanceResponse'
    CreditBalanceRequest:
      allOf:
        - $ref: '#/components/schemas/schemas-CreditBalanceRequest'
    CreditBalanceResponse:
      allOf:
        - $ref: '#/components/schemas/schemas-CreditBalanceResponse'
    HoldBalanceRequest:
      allOf:
        - $ref: '#/components/schemas/schemas-HoldBalanceRequest'
    HoldBalanceResponse:
      allOf:
        - $ref: '#/components/schemas/schemas-HoldBalanceResponse'
    RestoreBalanceRequest:
      allOf:
        - $ref: '#/components/schemas/schemas-RestoreBalanceRequest'
    RestoreBalanceResponse:
      allOf:
        - $ref: '#/components/schemas/schemas-RestoreBalanceResponse'
    DebitHoldBalanceRequest:
      allOf:
        - $ref: '#/components/schemas/schemas-DebitHoldBalanceRequest'
    DebitHoldBalanceResponse:
      allOf:
        - $ref: '#/components/schemas/schemas-DebitHoldBalanceResponse'
    CreditHoldBalanceRequest:
      allOf:
        - $ref: '#/components/schemas/schemas-CreditHoldBalanceRequest'
    CreditHoldBalanceResponse:
      allOf:
        - $ref: '#/components/schemas/schemas-CreditHoldBalanceResponse'
    PbaFinalAuthReversalNotificationEnvelope:
      type: object
      required:
        - notification_id
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - v1:pba:transaction:final_auth_reversed
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/FinalAuthReversalNotification'
    PbaPreAuthReversalNotificationEnvelope:
      type: object
      required:
        - notification_id
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - v1:pba:transaction:pre_auth_reversed
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/PreAuthReversalNotification'
    PbaAuthorizationFailedNotificationEnvelope:
      type: object
      required:
        - notification_id
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - v1:pba:transaction:authorization_failed
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/PbaAuthorizationFailedNotification'
      example:
        notification_id: 3e6dd7ab-3360-4269-821e-a591bc94232c
        type: v1:pba:transaction:authorization_failed
        created_at: '2024-06-06T18:47:21.175Z'
        data:
          notification_id: 3e6dd7ab-3360-4269-821e-a591bc94232c
          transaction_id: 2f8b3dd0-dc7a-4f93-96bf-0042d3ce697e
          transaction_type: final_auth
          network_transaction_ref: MCC0377270606
          network_message_ref: '439951'
          amount: 30
          currency: PHP
          billing_amount: 30
          billing_currency_code: PHP
          billing_exchange_rate: 1
          transaction_status: declined
          reason: 'Tenant Service Error: no response from tenant, undefined'
          advised_action: reverse_transaction
    PbaClearingFileReadyNotificationEnvelope:
      type: object
      required:
        - notification_id
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - v1:pba:eoc:clearing_file_ready
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/EOCFileProcessedNotification'
    ClearingRecord:
      title: Clearing record
      description: JSON schema for one record in a clearing file.
      allOf:
        - $ref: '#/components/schemas/schemas-ClearingRecord'
      x-tags:
        - Clearing
    PbaSettlementFileReadyNotificationEnvelope:
      type: object
      required:
        - notification_id
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - v1:pba:eos:net_settlement_file_ready
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/EOSNetSettlementNotification'
    SettlementRecord:
      title: Settlement Report
      description: JSON schema for one record in a settlement report.
      allOf:
        - $ref: '#/components/schemas/SettlementRecords'
      x-tags:
        - Settlement
    WalletTokenActivatedNotificationEnvelope:
      type: object
      required:
        - notification_id
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - v1:wallet:token:activated
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/WalletTokenActivatedEventNotificationPayload'
    WalletTokenSuspendedNotificationEnvelope:
      type: object
      required:
        - notification_id
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - v1:wallet:token:suspended
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/WalletTokenSuspendedEventNotificationPayload'
    WalletTokenDeletedNotificationEnvelope:
      type: object
      required:
        - notification_id
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - v1:wallet:token:deleted
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/WalletTokenDeletedEventNotificationPayload'
    WalletTransactionAuthorizationNotificationEnvelope:
      type: object
      required:
        - notification_id
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - v1:wallet:transaction:authorization
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/PbaWalletTransactionAuthorizedNotification'
    TenantTransactionRequest:
      x-tags:
        - 'Schema: Tenant Online Transaction Orchestration'
      title: Tenant Create Transaction Request (reference)
      description: >-
        This object will be sent to Tenants by Open Fabric during transaction
        orchestration.
      oneOf:
        - $ref: '#/components/schemas/AccountTransactionIntegrationRequest'
      example:
        tenant_partner_id: 27666828-57f9-4709-a9a9-84167e091f5f
        fabric_reference_id: ff0398e5-d045-441f-b130-bcd517964775
        partner_reference_id: P1293201980299030
        tenant_id: 00fcf093-71fb-4349-8c0b-de810480d6b1
        gateway_fail_url: https://gateway.dev.openfabric.co
        gateway_success_url: https://gateway.dev.openfabric.co
        customer_info:
          mobile_number: '+6587654321'
          first_name: BNPL
          last_name: Developer
          email: developer@bnpl1.com
          partner_reference_id: cd992711-498f-47be-b636-cf2e3eaad935
        amount: 120.1
        currency: SGD
        transaction_details:
          shipping_address:
            country: Singapore
            country_code: SG
            address_line_1: 80 Robinson Road
            address_line_2: '#09-01'
            address_line_3: '#09-01'
            post_code: '068898'
          billing_address:
            country: Singapore
            country_code: SG
            address_line_1: 80 Robinson Road
            address_line_2: '#09-01'
            address_line_3: '#09-01'
            post_code: '068898'
          items:
            - item_id: P100
              name: iPhone
              price: 11020
              quantity: 1
              variation_name: Black, 128GB
              original_price: 12020
              categories:
                - Electronics
            - item_id: P101
              name: iPhone SE case
              price: 1000
              quantity: 1
              variation_name: White
              categories:
                - Accessories
          tax_amount: 390.6
          shipping_amount: 1020
          original_amount: 13020
    TenantTransactionResponse:
      x-tags:
        - 'Schema: Tenant Online Transaction Orchestration'
      title: Tenant Create Transaction Response (reference)
      description: >-
        Transaction Response Object to be returned by Tenants on succesful
        creation.
      oneOf:
        - $ref: '#/components/schemas/AccountTransactionIntegrationResponse'
      example:
        tenant_reference_id: cd992711-498f-47be-b636-cf2e3eaad935
        payment_redirect_web_url: https://sample-bnpl-web.openfabric.co
    TransactionChargedNotification:
      x-tags:
        - 'Schema: Tenant Online Transaction Notification'
      title: Tenant Online Transaction Charged Notification
      description: >-
        The array of transaction charged notifications that will be sent to
        Tenants by Open Fabric.
      type: array
      items:
        type: object
        required:
          - type
          - created_at
          - data
        properties:
          notification_id:
            type: string
            format: uuid
            description: ID of the notification
          type:
            type: string
            description: type of notification
            enum:
              - transaction:charged
          created_at:
            type: string
            format: date-time
          data:
            $ref: '#/components/schemas/schemas-AccountTransactionChargedNotification'
    TransactionReversedNotification:
      x-tags:
        - 'Schema: Tenant Online Transaction Notification'
      title: Tenant Online Transaction Reversed Notification
      description: >-
        The array of transaction reversed notifications that will be sent to
        Tenants by Open Fabric.
      type: array
      items:
        type: object
        required:
          - type
          - created_at
          - data
        properties:
          notification_id:
            type: string
            format: uuid
            description: ID of the notification
          type:
            type: string
            description: type of notification
            enum:
              - transaction:reversed
          created_at:
            type: string
            format: date-time
          data:
            $ref: >-
              #/components/schemas/schemas-AccountTransactionReversedNotification
    TransactionCreditedNotification:
      x-tags:
        - 'Schema: Tenant Online Transaction Notification'
      title: Tenant Online Transaction Credited Notification
      description: >-
        The array of transaction credited notifications that will be sent to
        Tenants by Open Fabric whenever an unlined refund is recorded.
      type: array
      items:
        type: object
        required:
          - type
          - created_at
          - data
        properties:
          notification_id:
            type: string
            format: uuid
            description: ID of the notification
          type:
            type: string
            description: type of notification
            enum:
              - transaction:credited
          created_at:
            type: string
            format: date-time
          data:
            $ref: >-
              #/components/schemas/schemas-AccountTransactionCreditedNotification
    TransactionApprovedNotification:
      x-tags:
        - 'Schema: Partner Online Transaction Notification'
      title: Partner Online Transaction Approved Notification
      description: >-
        The transaction approved notification that will be sent to Partners by
        Open Fabric.
      type: object
      required:
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
          description: ID of the notification
        type:
          type: string
          description: type of notification
          enum:
            - transaction:approved
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/MerchantTransactionApprovedNotification'
    TransactionFailedNotification:
      x-tags:
        - 'Schema: Partner Online Transaction Notification'
      title: Partner Online Transaction Failed Notification
      description: >-
        The transaction failed notification that will be sent to Partners by
        Open Fabric.
      type: object
      required:
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
          description: ID of the notification
        type:
          type: string
          description: type of notification
          enum:
            - transaction:failed
        created_at:
          type: string
          format: date-time
        data:
          $ref: '#/components/schemas/MerchantTransactionFailedNotification'
    PatLinkApproved:
      x-tags:
        - 'Schema: Tenant Pre-approved Transaction Link Notification'
      title: Pre-approved Transaction Link Approved Notification
      description: >-
        The pre-approved transaction link approved notification that will be
        sent to Tenants and Partners by Open Fabric.
      type: object
      required:
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
          description: ID of the notification
        type:
          type: string
          description: type of notification
          enum:
            - v1:provision:pat_link:approved
        created_at:
          type: string
          format: date-time
        data:
          $ref: >-
            #/components/schemas/schemas-PreApprovedTransactionLinkApprovedNotification
    PatLinkFailed:
      x-tags:
        - 'Schema: Tenant Pre-approved Transaction Link Notification'
      title: Pre-approved Transaction Link Failed Notification
      description: >-
        The pre-approved transaction link failed notification that will be sent
        to Tenants and Partners by Open Fabric.
      type: object
      required:
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
          description: ID of the notification
        type:
          type: string
          description: type of notification
          enum:
            - v1:provision:pat_link:failed
        created_at:
          type: string
          format: date-time
        data:
          $ref: >-
            #/components/schemas/schemas-PreApprovedTransactionLinkFailedNotification
    PatLinkRevoked:
      x-tags:
        - 'Schema: Tenant Pre-approved Transaction Link Notification'
      title: Pre-approved Transaction Link Revoked Notification
      description: >-
        The pre-approved transaction link revoked notification that will be sent
        to Tenants and Partners by Open Fabric.
      type: object
      required:
        - type
        - created_at
        - data
      properties:
        notification_id:
          type: string
          format: uuid
          description: ID of the notification
        type:
          type: string
          description: type of notification
          enum:
            - v1:provision:pat_link:revoked
        created_at:
          type: string
          format: date-time
        data:
          $ref: >-
            #/components/schemas/schemas-PreApprovedTransactionLinkRevokedNotification
    PbaAskForApprovalProvisionType:
      type: string
      enum:
        - customer_account_device
        - static_token
        - google_pay
        - samsung_pay
        - apple_pay
        - unknown
    PbaAskForApprovalAuthIndicator:
      required:
        - is_pre_authorization
        - is_converted_pre_auth
      properties:
        is_pre_authorization:
          type: boolean
        is_converted_pre_auth:
          type: boolean
        is_partial_approval:
          type: boolean
        is_incremental_approval:
          type: boolean
        is_undefined_authorization:
          type: boolean
        is_potential_cross_border:
          type: boolean
          description: >-
            True indicate this authorization can potentially be for a
            cross-border transaction
        linked_transaction_id:
          type: string
          format: uuid
          description: >-
            Transaction ID of the linked transaction (e.g., for refunds linking
            to original auth)
        is_refund:
          type: boolean
          description: True indicates this is a refund transaction
        is_incremental_refund:
          type: boolean
          description: >-
            True indicates this is an incremental refund (additional refund on
            existing refund transaction)
    PbaAskForApprovalVerificationData:
      properties:
        transit_transaction_type:
          $ref: '#/components/schemas/PbaTransitTransactionType'
        cvm_limit:
          type: number
          description: CVM limit amount in base unit
        cvm_limit_currency_code:
          type: string
          description: Currency code of CVM limit (ISO 4217)
        cscv:
          type: string
          description: >-
            The Transaction Verification Result for CVC2 verification (Static
            Token). value: SUCC, FAIL, ERRR, MISS
    PbaAskForApprovalOutboundPayload:
      required:
        - transaction_id
        - network_transaction_ref
        - customer_id
        - tenant_customer_ref
        - account_id
        - tenant_account_ref
        - provision_id
        - provision_type
        - network_message_ref
        - network_merchant_name
        - network_merchant_outlet_address
        - network_merchant_id
        - network_merchant_category_code
        - auth_indicator
        - amount
        - currency
        - billing_amount
        - billing_currency_code
        - billing_exchange_rate
        - transaction_source
        - transaction_category
        - partner_country_code
        - payment_network
      properties:
        transaction_id:
          type: string
          format: uuid
        network_transaction_ref:
          type: string
        customer_id:
          type: string
          format: uuid
        tenant_customer_ref:
          type: string
        tenant_account_ref:
          type: string
        account_id:
          type: string
          format: uuid
        provision_id:
          type: string
          format: uuid
        provision_type:
          $ref: '#/components/schemas/PbaAskForApprovalProvisionType'
        device_id:
          type: string
          format: uuid
        static_token_id:
          type: string
        network_message_ref:
          type: string
        network_merchant_name:
          type: string
        network_merchant_outlet_address:
          type: string
        network_merchant_id:
          type: string
        network_merchant_category_code:
          type: string
        network_acquirer_id:
          type: string
          description: ID of the Merchant Acquirer on Mastercard Network
        auth_indicator:
          $ref: '#/components/schemas/PbaAskForApprovalAuthIndicator'
        amount:
          type: number
          description: Amount in base unit
        currency:
          type: string
          description: Currency code (ISO 4217)
        billing_amount:
          type: number
          description: Billing amount in base unit
        billing_currency_code:
          type: string
          description: Billing currency code (ISO 4217)
        billing_exchange_rate:
          type: number
          description: Exchange rate when calculating billing amount
        settlement_amount:
          type: number
          description: Settlement amount in base unit
        settlement_currency_code:
          type: string
          description: Settlement currency code (ISO 4217)
        settlement_exchange_rate:
          type: number
          description: Exchange rate when calculating settlement amount
        transaction_source:
          $ref: '#/components/schemas/PbaTransactionSource'
        transaction_category:
          $ref: '#/components/schemas/PbaTransactionCategory'
        verification_data:
          $ref: '#/components/schemas/PbaAskForApprovalVerificationData'
        card_on_file:
          type: boolean
        partner_country_code:
          type: string
          minLength: 2
          maxLength: 2
          description: Country Code - ISO 3166 Alpha-2
        payment_network:
          $ref: '#/components/schemas/PbaPaymentNetwork'
        network_merchant_terminal_id:
          type: string
          description: ID of the Merchant Terminal
        network_merchant_city:
          type: string
          maxLength: 40
          description: City of the Merchant Terminal
        token_requestor_id:
          type: string
          description: >-
            Indicates whether the transaction originated from the tenant's own
            app or a third-party wallet (e.g., Google Pay, Samsung Pay, Apple
            Pay).
        auth_policy_evaluation_result:
          $ref: '#/components/schemas/AuthPolicyEvaluateResponse'
      x-publishable: true
      example:
        transaction_id: 6182bde8-ee3e-4bd5-935e-e56507e0f808
        network_transaction_ref: awqcB1rPDuJIm4yKOQbqJUj5MvpdcH6D
        customer_id: 8e64c3c2-f409-4e0b-afb7-05cce88d26d7
        tenant_customer_ref: 01HG04B4NDBB7XT9JY6H1Y2B3A
        device_id: f4e52b39-3664-48ce-844c-7a92772b1f2e
        network_message_ref: CZLIzgNfeyMCabcsXp3liJPgSVGyQypHI2A
        network_merchant_name: Merchant123456
        network_merchant_id: '6000123456'
        network_merchant_outlet_address: Central, Singapore
        network_merchant_category_code: '1234'
        network_merchant_terminal_id: '4000123456'
        network_merchant_city: Singapore
        auth_indicator:
          is_partial_approval: false
          is_incremental_approval: false
          is_undefined_authorization: false
        amount: 0.1
        currency: SGD
        billing_amount: 0.1
        billing_currency_code: SGD
        billing_exchange_rate: 1
        settlement_amount: 0.1
        settlement_currency_code: SGD
        settlement_exchange_rate: 1
        transaction_source: terminal
        transaction_category: transit
        verification_data:
          transit_transaction_type: post-authorized-aggregated
          cvm_limit: 15
          cvm_limit_currency_code: SGD
        partner_country_code: SG
    PbaAskForApprovalOutboundResponse:
      required:
        - tenant_reference_id
        - approved_amount
        - status
      properties:
        tenant_reference_id:
          type: string
          description: The transaction reference id generated by Tenant
        approved_amount:
          type: number
          description: Approved amount in base unit, set to 0 when declined
        authorization_code:
          type: string
          pattern: ^[a-zA-Z0-9]{6,8}$
          description: >-
            The authorization code that is going to be forward to Network and
            will be printed on the receipt
        status:
          type: string
          enum:
            - approved
            - declined
          description: If success approval set to “approved” else “declined”
        reason:
          type: string
          description: Required a non empty string when declined
      x-publishable: true
      example:
        tenant_reference_id: 31XXXX6723173605
        approved_amount: 20
        authorization_code: 8ABJ6S
        status: approved
        reason: null
    Pba3dsChallengeOutboundPayload:
      type: object
      required:
        - three_ds_challenge_id
        - tenant_customer_ref
        - customer_id
        - tenant_account_ref
        - account_id
        - static_token_id
        - merchant_name
        - transaction_amount
        - transaction_currency
        - creation_time
      properties:
        three_ds_challenge_id:
          type: string
          description: three_ds_logs.id
        tenant_customer_ref:
          type: string
        customer_id:
          type: string
        tenant_account_ref:
          type: string
        account_id:
          type: string
        static_token_id:
          type: string
        merchant_name:
          type: string
        transaction_amount:
          type: number
        transaction_currency:
          type: string
        creation_time:
          type: string
          format: date-time
    Pba3dsOtpOutboundPayload:
      allOf:
        - $ref: '#/components/schemas/Pba3dsChallengeOutboundPayload'
        - type: object
          properties:
            authentication_credential:
              type: string
            encrypted_authentication_credential:
              type: string
    Pba3dsOtpOutboundResponse:
      type: object
      required:
        - three_ds_challenge_id
      properties:
        three_ds_challenge_id:
          type: string
        masked_email:
          type: string
        masked_phone_number:
          type: string
    TenantOnlineTxnNotificationSubscribedEvent:
      type: string
      enum:
        - transaction:charged
        - transaction:credited
        - transaction:reversed
    PartnerOnlineTxnNotificationSubscribedEvent:
      type: string
      enum:
        - transaction:approved
        - transaction:failed
    PatNotificationSubscribedEvent:
      type: string
      enum:
        - v1:provision:pat_link:approved
        - v1:provision:pat_link:failed
        - v1:provision:pat_link:revoked
    TenantPbaNotificationSubscribedEvent:
      type: string
      enum:
        - v1:pba:transaction:final_auth_reversed
        - v1:pba:transaction:pre_auth_reversed
        - v1:pba:eoc:clearing_file_ready
        - v1:pba:eos:net_settlement_file_ready
        - v1:pba:transaction:authorization_failed
        - v1:pba:transaction:authorization_processed
        - v1:pba:transaction:policy_declined
        - v1:wallet:token:activated
        - v1:wallet:token:suspended
        - v1:wallet:token:deleted
        - v1:wallet:transaction:authorization
    AccountTransactionChargedNotification:
      description: Notification for transaction charge
      type: object
      required:
        - transaction_id
      properties:
        transaction_id:
          type: string
          format: uuid
          description: OF Transaction ID
        tenant_reference_id:
          type: string
          description: Transaction reference ID provided by Tenant
        charged_at:
          type: string
          format: date-time
          description: Time stamp of transaction charge
        status:
          $ref: '#/components/schemas/TransactionStatus'
        card_network_transaction_details:
          $ref: '#/components/schemas/CardNetworkTransactionDetails'
      x-publishable: true
      example:
        transaction_id: cd992711-498f-47be-b636-cf2e3eaad936
        tenant_reference_id: BNPL123456890
        status: charged
        charged_at: '2021-11-06T04:26:47.450Z'
    AccountTransactionReversedNotification:
      required:
        - transaction_id
        - tenant_reference_id
        - status
        - reversed_amount
      properties:
        transaction_id:
          type: string
          format: uuid
          description: Transaction ID
        tenant_reference_id:
          type: string
          description: Transaction reference ID provided by Tenant
        status:
          $ref: '#/components/schemas/TransactionStatus'
        reversed_at:
          type: string
          format: date-time
          description: Time stamp of transaction reverse
        reversed_amount:
          type: number
          description: Accumulated reversed amount
        billing_reversed_amount:
          type: number
          description: Accumulated reversed amount in billing currency
        reason:
          type: string
          description: Reason for reversal
        action_type:
          $ref: '#/components/schemas/ReverseActionType'
      x-publishable: true
      example:
        transaction_id: cd992711-498f-47be-b636-cf2e3eaad936
        tenant_reference_id: BNPL123456890
        status: reversed
        reversed_at: '2021-11-06T04:26:47.450Z'
        reversed_amount: 7500
        action_type: reversal
    AccountTransactionCreditedNotification:
      required:
        - transaction_id
        - status
        - credited_at
        - credited_amount
        - currency
        - billing_credited_amount
        - billing_currency
        - network_transaction_time
        - network_merchant_category_code
        - network_merchant_id
        - network_merchant_name
        - network_merchant_outlet_address
      properties:
        transaction_id:
          type: string
          format: uuid
          description: Transaction ID
        tenant_customer_ref:
          type: string
          description: Tenant customer ID
        tenant_link_ref:
          type: string
          description: Tenant link ID
        status:
          $ref: '#/components/schemas/TransactionStatus'
        credited_at:
          type: string
          format: date-time
          description: Time stamp of transaction credit
        credited_amount:
          type: number
          description: Accumulated credited amount
        currency:
          type: string
          description: Transaction currency
        billing_credited_amount:
          type: number
          description: Accumulated credited amount
        billing_currency:
          type: string
          description: Billing currency
        network_transaction_time:
          type: string
          format: date-time
        network_merchant_category_code:
          type: string
        network_merchant_id:
          type: string
        network_merchant_name:
          type: string
        network_merchant_outlet_address:
          type: string
      x-publishable: true
      example:
        transaction_id: cd992711-498f-47be-b636-cf2e3eaad936
        tenant_customer_ref: CUS23432898
        tenant_link_ref: PM-1293201980299030
        status: credited
        credited_at: '2021-11-06T04:26:47.450Z'
        credited_amount: 7500
        currency: PHP
        billing_credited_amount: 134.75
        billing_currency: USD
        network_transaction_time: '2021-11-04T00:00:00Z'
        network_merchant_category_code: '5812'
        network_merchant_id: W2E7JYS5UGIYXN1
        network_merchant_name: WWW.EMBARKLABS.ORG
        network_merchant_outlet_address: +6586866171 SG
    PartnerTransactionNotification:
      type: object
      required:
        - type
        - created_at
        - data
      properties:
        type:
          type: string
          description: type of notification
          enum:
            - transaction:approved
            - transaction:failed
        created_at:
          type: string
          format: date-time
        data:
          anyOf:
            - $ref: '#/components/schemas/MerchantTransactionApprovedNotification'
            - $ref: '#/components/schemas/MerchantTransactionFailedNotification'
    MerchantTransactionApprovedNotification:
      required:
        - txn_id
        - txn_ref_id
        - txn_state
        - txn_amt
        - txn_ccy
        - txn_app_amt
        - txn_app_ccy
        - txn_created_at
        - txn_updated_at
      properties:
        txn_id:
          type: string
          format: uuid
          description: OpenFabric Transaction ID
        txn_ref_id:
          type: string
          format: uuid
          description: >-
            Transaction reference ID. Internally it is the equivalent of
            `partner_reference_id`
        txn_state:
          $ref: '#/components/schemas/MerchantTransactionStatus'
        txn_amt:
          type: number
          description: Transaction amount
        txn_ccy:
          type: string
          description: Transaction currency
        txn_app_amt:
          type: number
          description: Transaction approved amount
        txn_app_ccy:
          type: string
          description: Transaction approved currency
        txn_created_at:
          type: string
          format: date-time
        txn_updated_at:
          type: string
          format: date-time
        txn_tenant_id:
          type: string
        txn_card_token:
          type: string
          description: |
            Short-lived token to access the VCN details generated for the
            transaction. Internally it is the equivalent of `card_fetch_token`
        txn_pg:
          type: string
          description: Payment gateway name. Used for PG integrated flow
        txn_pg_token:
          type: string
          description: Payment gateway token. Used for PG integrated flow
        txn_pg_charge_id:
          type: string
          description: id of the charge transaction sent back from pg
        txn_pg_response:
          type: object
      x-publishable: true
      example:
        txn_id: ff0398e5-d045-441f-b130-bcd517964775
        txn_ref_id: P1293201980299030
        txn_state: approved
        txn_amt: 120.1
        txn_ccy: SGD
        txn_app_amt: 120.1
        txn_app_ccy: SGD
        txn_created_at: '2021-11-06T04:26:47.450Z'
        txn_updated_at: '2021-11-06T04:26:47.450Z'
        txn_pg: stripe
        txn_pg_token: YTZkYmJkYWItMWI3ZC00MzNhLTkzOWEtZjYzYzkwMjJmODMz
    MerchantTransactionFailedNotification:
      required:
        - txn_id
        - txn_ref_id
        - txn_state
        - txn_created_at
        - txn_updated_at
      properties:
        txn_id:
          type: string
          format: uuid
          description: OpenFabric Transaction ID
        txn_ref_id:
          type: string
          format: uuid
          description: >-
            Transaction reference ID. Internally it is the equivalent of
            `partner_reference_id`
        txn_state:
          $ref: '#/components/schemas/MerchantTransactionStatus'
        txn_created_at:
          type: string
          format: date-time
        txn_updated_at:
          type: string
          format: date-time
        txn_tenant_id:
          type: string
        txn_reason:
          type: string
          description: Reason to decline the transaction, submitted by Tenant.
      x-publishable: true
      example:
        txn_id: ff0398e5-d045-441f-b130-bcd517964775
        txn_ref_id: P1293201980299030
        txn_state: failed
        txn_created_at: '2021-11-06T04:26:47.450Z'
        txn_updated_at: '2021-11-06T04:26:47.450Z'
        txn_reason: Insufficient amount
    PreApprovedTransactionLinkApprovedNotification:
      required:
        - link_id
        - status
      properties:
        link_id:
          type: string
          format: uuid
        partner_link_ref:
          type: string
        tenant_link_ref:
          type: string
        status:
          $ref: '#/components/schemas/PatStatus'
        description:
          type: string
          description: Note about this PAT approval
        approved_at:
          type: string
          format: date-time
        card_fetch_token:
          type: string
      x-publishable: true
      example:
        link_id: 033ef8cb-b5f0-49d6-a10d-cfcff137207a
        partner_link_ref: CC-A3FNGL4B8PY32
        tenant_link_ref: PM-1293201980299030
        status: approved
        description: Monthly subscription for Netflix
        approved_at: '2023-02-06T04:26:47.450Z'
    PreApprovedTransactionLinkFailedNotification:
      required:
        - link_id
        - status
      properties:
        link_id:
          type: string
          format: uuid
        partner_link_ref:
          type: string
        tenant_link_ref:
          type: string
        status:
          $ref: '#/components/schemas/PatStatus'
        reason:
          type: string
          description: Detail about why this PAT failed
        failed_at:
          type: string
          format: date-time
      x-publishable: true
      example:
        link_id: 033ef8cb-b5f0-49d6-a10d-cfcff137207a
        partner_link_ref: CC-A3FNGL4B8PY32
        tenant_link_ref: PM-1293201980299030
        status: failed
        reason: consent not given
        failed_at: '2023-02-06T04:26:47.450Z'
    PreApprovedTransactionLinkRevokedNotification:
      required:
        - link_id
        - status
      properties:
        link_id:
          type: string
          format: uuid
        reason:
          type: string
        partner_link_ref:
          type: string
        tenant_link_ref:
          type: string
        status:
          $ref: '#/components/schemas/PatStatus'
        revoked_at:
          type: string
          format: date-time
      x-publishable: true
      example:
        link_id: 033ef8cb-b5f0-49d6-a10d-cfcff137207a
        partner_link_ref: CC-A3FNGL4B8PY32
        tenant_link_ref: PM-1293201980299030
        reason: customer removed consent
        revoked_at: '2023-02-06T04:26:47.450Z'
    EOCFileProcessedNotification:
      description: v1:pba:eoc:clearing_file_ready
      required:
        - notification_id
        - file_name
        - file_ref
        - file_checksum
        - network_file_id
        - network_timestamp
        - number_of_instructions
      properties:
        notification_id:
          type: string
          format: uuid
        file_name:
          type: string
        file_ref:
          type: string
        file_checksum:
          type: string
        network_file_id:
          type: string
        network_timestamp:
          type: string
          format: date-time
        number_of_instructions:
          type: integer
    EOSNetSettlementNotification:
      description: v1:pba:eos:net_settlement_file_ready
      required:
        - notification_id
        - file_name
        - file_ref
        - file_checksum
        - network_file_id
        - network_timestamp
        - reconciliation_date
        - interbank_settlement_date
        - settlement_currency_code
        - total_net_recon_amount
        - total_credit_txn_amount
        - total_credit_number_of_txn
        - total_credit_chargeback_amount
        - total_credit_number_of_chargeback
        - total_credit_reversal_amount
        - total_credit_number_of_reversal
        - total_credit_interchange_fee_amount
        - total_debit_txn_amount
        - total_debit_number_of_txn
        - total_debit_chargeback_amount
        - total_debit_number_of_chargeback
        - total_debit_reversal_amount
        - total_debit_number_of_reversal
        - total_debit_interchange_fee_amount
      properties:
        notification_id:
          type: string
          format: uuid
        file_name:
          type: string
        file_ref:
          type: string
        file_checksum:
          type: string
        network_file_id:
          type: string
        network_timestamp:
          type: string
          format: date-time
        reconciliation_date:
          type: string
          description: date of reconciliation (YYYY-MM-DD)
        interbank_settlement_date:
          type: string
          description: date of interbank settlement (YYYY-MM-DD)
        settlement_currency_code:
          type: string
          description: settlement currency code (ISO 4217)
        total_net_recon_amount:
          type: number
          description: total debit minus total credit (in base unit, can be negative)
        total_credit_txn_amount:
          type: number
          description: total credit transaction amount (in base unit)
        total_credit_number_of_txn:
          type: integer
        total_credit_chargeback_amount:
          type: number
          description: total credit chargeback amount (in base unit)
        total_credit_number_of_chargeback:
          type: integer
        total_credit_reversal_amount:
          type: number
          description: total credit reversal amount (in base unit)
        total_credit_number_of_reversal:
          type: integer
        total_credit_interchange_fee_amount:
          type: number
          description: total credit interchange fee amount (in base unit)
        total_debit_txn_amount:
          type: number
          description: total debit transaction amount (in base unit)
        total_debit_number_of_txn:
          type: integer
        total_debit_chargeback_amount:
          type: number
          description: total debit chargeback amount (in base unit)
        total_debit_number_of_chargeback:
          type: integer
        total_debit_reversal_amount:
          type: number
          description: total debit reversal amount (in base unit)
        total_debit_number_of_reversal:
          type: integer
        total_debit_interchange_fee_amount:
          type: number
          description: total debit interchange fee amount (in base unit)
        total_number_of_auth:
          type: integer
          description: sum number of all authorization transactions
        total_number_of_auth_reversal:
          type: integer
          description: sum number of all authorization reversal transactions
    FinalAuthReversalNotification:
      description: v1:pba:transaction:final_auth_reversed
      required:
        - notification_id
        - transaction_id
        - tenant_reference_id
        - network_transaction_ref
        - network_message_ref
        - amount
        - currency
        - billing_amount
        - billing_currency_code
        - billing_exchange_rate
        - is_converted_pre_auth
      properties:
        notification_id:
          type: string
          format: uuid
        transaction_id:
          type: string
          format: uuid
        tenant_reference_id:
          type: string
        network_transaction_ref:
          type: string
        network_message_ref:
          type: string
        amount:
          type: number
          description: Amount in base unit
        currency:
          type: string
          description: Currency code (ISO 4217)
        billing_amount:
          type: number
          description: Billing amount in base unit
        billing_currency_code:
          type: string
          description: Billing currency code (ISO 4217)
        billing_exchange_rate:
          type: number
          description: Exchange rate when calculating billing amount
        settlement_amount:
          type: number
          description: Settlement amount in base unit
        settlement_currency_code:
          type: string
          description: Settlement currency code (ISO 4217)
        settlement_exchange_rate:
          type: number
          description: Exchange rate when calculating settlement amount
        network_merchant_country_code:
          type: string
          minLength: 2
          maxLength: 2
          description: Country Code - ISO 3166 Alpha-2
        is_converted_pre_auth:
          type: boolean
          description: Indicates if this is a converted pre-authorization transaction
    PreAuthReversalNotification:
      description: v1:pba:transaction:pre_auth_reversed
      required:
        - notification_id
        - transaction_id
        - tenant_reference_id
        - network_transaction_ref
        - network_message_ref
        - amount
        - currency
        - billing_amount
        - billing_currency_code
        - billing_exchange_rate
      properties:
        notification_id:
          type: string
          format: uuid
        transaction_id:
          type: string
          format: uuid
        tenant_reference_id:
          type: string
        network_transaction_ref:
          type: string
        network_message_ref:
          type: string
        amount:
          type: number
          description: Amount in base unit
        currency:
          type: string
          description: Currency code (ISO 4217)
        billing_amount:
          type: number
          description: Billing amount in base unit
        billing_currency_code:
          type: string
          description: Billing currency code (ISO 4217)
        billing_exchange_rate:
          type: number
          description: Exchange rate when calculating billing amount
        settlement_amount:
          type: number
          description: Settlement amount in base unit
        settlement_currency_code:
          type: string
          description: Settlement currency code (ISO 4217)
        settlement_exchange_rate:
          type: number
          description: Exchange rate when calculating settlement amount
        network_merchant_country_code:
          type: string
          minLength: 2
          maxLength: 2
          description: Country Code - ISO 3166 Alpha-2
    PbaAuthorizationFailedNotification:
      description: v1:pba:transaction:authorization_failed
      required:
        - notification_id
        - transaction_id
        - transaction_type
        - tenant_reference_id
        - network_transaction_ref
        - network_message_ref
        - amount
        - currency
        - billing_amount
        - billing_currency_code
        - billing_exchange_rate
        - transaction_source
      properties:
        notification_id:
          type: string
          format: uuid
        transaction_id:
          type: string
          format: uuid
        transaction_type:
          $ref: '#/components/schemas/PbaAuthTypeFlagValues'
        tenant_reference_id:
          type: string
        network_transaction_ref:
          type: string
        network_message_ref:
          type: string
        amount:
          type: number
          description: Amount in base unit
        currency:
          type: string
          description: Currency code (ISO 4217)
        billing_amount:
          type: number
          description: Billing amount in base unit
        billing_currency_code:
          type: string
          description: Billing currency code (ISO 4217)
        billing_exchange_rate:
          type: number
          description: Exchange rate when calculating billing amount
        transaction_status:
          $ref: '#/components/schemas/PbaTransactionStatus'
        reason:
          type: string
          description: Reason for failure
        advised_action:
          $ref: '#/components/schemas/PbaAuthorizationFailedAdvisedAction'
        network_merchant_country_code:
          type: string
          minLength: 2
          maxLength: 2
          description: Country Code - ISO 3166 Alpha-2
        transaction_source:
          $ref: '#/components/schemas/PbaTransactionSource'
    PbaAuthorizationProcessedNotification:
      description: v1:pba:transaction:authorization_processed
      type: object
      required:
        - notification_id
        - transaction_id
        - network_message_timestamp
        - network_transaction_ref
        - network_message_ref
        - transaction_type
        - tenant_reference_id
        - amount
        - currency
        - billing_amount
        - billing_currency_code
        - billing_exchange_rate
        - transaction_source
        - customer_id
        - authorization_code
      properties:
        notification_id:
          type: string
          format: uuid
          description: Unique notification identifier
        transaction_id:
          type: string
          format: uuid
          description: Transaction identifier (used for idempotency)
        network_message_timestamp:
          type: string
          format: date-time
          description: Timestamp of the authorization message from the network
        transaction_type:
          $ref: '#/components/schemas/PbaAuthTypeFlagValues'
        tenant_reference_id:
          type: string
          description: Tenant reference ID for the transaction
        network_transaction_ref:
          type: string
          description: Network transaction reference
        network_message_ref:
          type: string
          description: Network message reference
        amount:
          type: number
          description: Transaction amount in base unit
        currency:
          type: string
          description: Transaction currency code (ISO 4217)
        billing_amount:
          type: number
          description: Billing amount in base unit (used for velocity amount tracking)
        billing_currency_code:
          type: string
          description: Billing currency code (ISO 4217)
        billing_exchange_rate:
          type: number
          description: Exchange rate when calculating billing amount
        network_merchant_country_code:
          type: string
          minLength: 2
          maxLength: 2
          description: Merchant country code (ISO 3166-1 alpha-2)
        network_merchant_mid:
          type: string
          description: Network provided Merchant ID (Mastercard/Visa)
        network_merchant_name:
          type: string
        network_merchant_mcc:
          type: string
          description: Network provided Merchant Category Code (Mastercard/Visa)
        transaction_source:
          $ref: '#/components/schemas/PbaTransactionSource'
        customer_id:
          type: string
          format: uuid
        authorization_code:
          type: string
          minLength: 6
          maxLength: 6
        settlement_amount:
          type: number
          description: Settlement amount in base unit
        settlement_currency_code:
          type: string
          description: Settlement currency code (ISO 4217)
        settlement_exchange_rate:
          type: number
          description: Exchange rate when calculating settlement amount
    PbaWalletTransactionAuthorizedNotification:
      description: v1:wallet:transaction:authorization
      type: object
      allOf:
        - $ref: '#/components/schemas/WalletTokenTransactionLogsData'
    BaseTokenStatusNotificationEvent:
      type: object
      description: Base schema for wallet token status change notifications data
      required:
        - token_unique_reference
        - wallet_id
        - token_source
      properties:
        token_unique_reference:
          type: string
          description: Identifier of the tokenized card inside the secure wallet
        wallet_id:
          type: string
          description: Secure Wallet ID
        token_source:
          $ref: '#/components/schemas/PbaTokenSource'
    WalletTokenActivatedEventNotificationPayload:
      allOf:
        - $ref: '#/components/schemas/BaseTokenStatusNotificationEvent'
        - type: object
          required:
            - activated_at
          properties:
            activated_at:
              type: string
              format: date-time
              description: Token activation timestamp
    WalletTokenSuspendedEventNotificationPayload:
      allOf:
        - $ref: '#/components/schemas/BaseTokenStatusNotificationEvent'
        - type: object
          required:
            - reason_code
            - reason
            - suspended_at
          properties:
            reason_code:
              type: string
              description: Reason code for the suspension
            reason:
              type: string
              description: Reason for the suspension
            suspended_at:
              type: string
              format: date-time
              description: Token suspension timestamp
    WalletTokenDeletedEventNotificationPayload:
      allOf:
        - $ref: '#/components/schemas/BaseTokenStatusNotificationEvent'
        - type: object
          required:
            - reason_code
            - reason
            - deleted_at
          properties:
            reason_code:
              type: string
              description: Reason code for the deletion
            reason:
              type: string
              description: Reason for the deletion
            deleted_at:
              type: string
              format: date-time
              description: Token deletion timestamp
    WebhookType:
      type: string
      enum:
        - online
        - pat_provision
    AccountNotificationSubscriptionResponse:
      title: AccountNotificationSubscriptionResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Notification Subscription ID in OpenFabric system
        tenant_id:
          type: string
          format: uuid
          description: Tenant ID in OpenFabric system
        config:
          type: object
          description: Configuration options for the subscription
        subscribed_events:
          type: array
          items:
            type: string
        webhook_type:
          $ref: '#/components/schemas/WebhookType'
      x-publishable: true
    ErrorResponseDetails:
      type: object
      required:
        - message
      properties:
        error_code:
          type: string
        message:
          type: string
        param:
          type: string
      x-publishable: true
    ErrorResponse:
      type: object
      required:
        - error_code
        - message
      properties:
        error_code:
          type: string
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorResponseDetails'
      x-publishable: true
    AccountNotificationSubscriptionRequest:
      title: AccountNotificationSubscriptionRequest
      type: object
      required:
        - config
        - subscribed_events
      properties:
        config:
          type: object
          description: Configuration options for the subscription
        subscribed_events:
          type: array
          items:
            type: string
      x-publishable: true
    Merchant:
      title: Partner
      type: object
      properties:
        id:
          type: string
          format: uuid
        tenant_partner_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          maxLength: 36
        name:
          type: string
        slug:
          type: string
          minLength: 4
          maxLength: 30
          pattern: ^[a-z0-9][a-z0-9\-]*[a-z0-9]$
        website_url:
          type: string
          format: uri
        category:
          type: string
        country:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        email:
          type: string
          format: email
        labels:
          type: array
          items:
            type: string
      required:
        - tenant_partner_id
        - website_url
      x-publishable: true
    Metadata:
      title: Metadata
      type: object
      properties:
        limit:
          type: integer
          deprecated: true
        page_size:
          type: integer
          maximum: 100
          minimum: 10
        page:
          type: integer
        total_pages:
          type: integer
        total:
          type: integer
      x-publishable: true
    MerchantsResponse:
      title: MerchantsResponse
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Merchant'
        metadata:
          $ref: '#/components/schemas/Metadata'
      description: Partner list with pagination
      x-publishable: true
    CreateMerchantRequest:
      title: Create Partner Request
      type: object
      properties:
        name:
          type: string
        tenant_partner_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          maxLength: 36
        slug:
          type: string
          minLength: 4
          maxLength: 30
          pattern: ^[a-z0-9][a-z0-9\-]*[a-z0-9]$
        email:
          type: string
          format: email
        website_url:
          type: string
          format: uri
        category:
          type: string
        country:
          type: string
      required:
        - name
        - tenant_partner_id
        - slug
        - website_url
      x-publishable: true
    SimpleResponse:
      title: SimpleResponse
      type: object
      properties:
        message:
          type: string
      x-publishable: true
    UpdateMerchantRequest:
      title: UpdateMerchantRequest
      type: object
      properties:
        name:
          type: string
        website_url:
          type: string
          format: uri
        category:
          type: string
        country:
          type: string
        email:
          type: string
          format: email
        tenant_partner_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          maxLength: 36
      x-publishable: true
    MerchantCredential:
      title: MerchantCredential
      type: object
      properties:
        alias:
          type: string
        client_id:
          type: string
          minLength: 4
        client_secret:
          type: string
          minLength: 4
      required:
        - client_id
        - client_secret
      x-publishable: true
    MerchantNotificationSubscriptionRequest:
      title: AccountNotificationSubscriptionRequest
      type: object
      required:
        - config
        - subscribed_events
      properties:
        config:
          type: object
          description: Configuration options for the subscription
        subscribed_events:
          type: array
          items:
            type: string
      x-publishable: true
    MerchantNotificationSubscriptionResponse:
      title: MerchantNotificationSubscriptionResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Notification Subscription ID in OpenFabric system
        tenant_id:
          type: string
          format: uuid
          description: Tenant ID in OpenFabric system
        partner_id:
          type: string
          format: uuid
          description: Specific Partner of the subscription
        config:
          type: object
          description: Configuration options for the subscription
        subscribed_events:
          type: array
          items:
            type: string
        webhook_type:
          $ref: '#/components/schemas/WebhookType'
      x-publishable: true
    CredentialFormat:
      type: string
      enum:
        - api_key_pair
      x-publishable: true
    ApiKeyPair:
      type: object
      properties:
        public_api_key:
          type: string
        private_api_key:
          type: string
      x-publishable: true
    ApiKeyPGCredential:
      type: object
      properties:
        api_key_pair:
          $ref: '#/components/schemas/ApiKeyPair'
      x-publishable: true
    PGCredentialData:
      anyOf:
        - $ref: '#/components/schemas/ApiKeyPGCredential'
      x-publishable: true
    ChargeConfig:
      type: object
      properties:
        headless_3ds:
          type: boolean
        request_pg_3ds:
          type: boolean
      x-publishable: true
    PGCredentialsResponse:
      type: object
      required:
        - id
        - tenant_id
        - partner_id
        - pg_name
        - credential_format
        - redacted_credentials
      properties:
        id:
          type: string
          format: uuid
          description: ID of the PG Credentials record
        tenant_id:
          type: string
          format: uuid
          description: OF Tenant id
        partner_id:
          type: string
          format: uuid
          description: OF Partner id
        pg_name:
          type: string
          pattern: ^[\S]+$
        credential_format:
          $ref: '#/components/schemas/CredentialFormat'
        redacted_credentials:
          $ref: '#/components/schemas/PGCredentialData'
        additional_params:
          type: object
          additionalProperties:
            type: string
        charge_config:
          $ref: '#/components/schemas/ChargeConfig'
      x-publishable: true
    PGCredentialsRequest:
      type: object
      required:
        - credential_format
      properties:
        credential_format:
          $ref: '#/components/schemas/CredentialFormat'
        credentials:
          $ref: '#/components/schemas/PGCredentialData'
        additional_params:
          type: object
          additionalProperties:
            type: string
        charge_config:
          $ref: '#/components/schemas/ChargeConfig'
      x-publishable: true
    WhiteLabelFeatures:
      title: WhiteLabelFeatures
      type: object
      properties:
        features:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      x-publishable: true
    WidgetQueryRequestType:
      type: string
      enum:
        - whitelabel
        - net_settlement
      x-publishable: true
    WidgetQueryRequest:
      title: WidgetQueryRequest
      type: object
      properties:
        tenant_partner_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          maxLength: 36
        types:
          type: array
          items:
            $ref: '#/components/schemas/WidgetQueryRequestType'
      required:
        - tenant_partner_id
      x-publishable: true
    WidgetMetadata:
      title: WidgetMetadata
      type: object
      properties:
        iframe_url:
          type: string
          format: uri
          minLength: 4
        widget_access_token:
          type: string
          minLength: 4
          maxLength: 200
        code_snippet:
          type: string
        type:
          type: string
      required:
        - iframe_url
        - widget_access_token
      x-publishable: true
    CustomerInfo:
      type: object
      description: >-
        OpenFabric collects the below customer Info Collection from merchants.
        We will pass-through the collected info to Tenant
      required:
        - first_name
      properties:
        mobile_number:
          type: string
          pattern: ^[()\d\-\+\s]*$
          description: 'Mobile # of the customer - as set by Partner'
        email:
          type: string
          format: email
          description: Email address of the customer - as set by Partner
        first_name:
          type: string
          description: First Name of the Customer - as set by Partner
        middle_name:
          type: string
          description: Middle Name of the Customer - as set by Partner
        last_name:
          type: string
          description: Last Name of the Customer - as set by Partner
        country:
          type: string
          minLength: 2
          description: Country of the Customer - as set by Partner
        country_code:
          type: string
          minLength: 2
          maxLength: 2
          description: Country Code - ISO 3166 Alpha-2
        partner_reference_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          description: Partner's Customer ID - as set by Partner
      x-publishable: true
    Address:
      type: object
      required:
        - address_line_1
      properties:
        address_line_1:
          type: string
          minLength: 4
          description: Address Line 1
        address_line_2:
          type: string
          description: Address Line 2
        address_line_3:
          type: string
          description: Address Line 3
        district:
          type: string
          minLength: 3
          maxLength: 20
          description: District / Province / Prefecture
        city:
          type: string
          minLength: 3
        state:
          type: string
          minLength: 3
          maxLength: 20
          description: State
        post_code:
          type: string
          description: Postal Code
        country:
          type: string
          minLength: 2
          description: Country of the Customer - as set by Partner
        country_code:
          type: string
          minLength: 2
          maxLength: 2
          description: Country Code - ISO 3166 Alpha-2
        phone_number:
          type: string
          pattern: ^[()\d\-\+\s]*$
          minLength: 3
          maxLength: 20
          description: Phone Number
        self_pickup:
          type: boolean
          description: Is this item marked for self-pickup
      x-publishable: true
    Seller:
      type: object
      required:
        - seller_id
        - seller_name
      properties:
        seller_id:
          type: string
        seller_name:
          type: string
        email:
          type: string
        phone:
          type: string
        url:
          type: string
        seller_address:
          type: string
    Item:
      type: object
      description: Line Item details in Client Transaction Request.
      required:
        - item_id
        - name
        - quantity
        - price
      properties:
        item_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          description: Unique ID of the Item on Partner's system
        name:
          type: string
          description: Item Name. E.g. Floral Pattern Shirt
        variation_name:
          type: string
          description: 'Variation details of the item. E.g. Size: S, Color: Blue'
        description:
          type: string
          description: Description for the item
        quantity:
          type: number
          description: Quantity in cart
        price:
          type: number
          description: Unit Price of the Item
        original_price:
          type: number
          description: Unit Price of the item, before discounts
        discount_amount:
          type: number
          description: Discount per unit
        amount:
          type: number
          description: Final amount of the item (post discounts)
        tax_amount:
          type: number
          description: Total of all tax amounts from each line_items6
        tax_code:
          type: string
          pattern: ^[A-Z]*$
          description: Tax Code
        categories:
          type: array
          description: Item Categories. E.g. Electronics, Mobile Phone
          items:
            type: string
        item_url:
          type: string
          description: URL to where the item is purchased from
        item_image_url:
          type: string
          description: URL to the image of the item
        seller_info:
          $ref: '#/components/schemas/Seller'
      x-publishable: true
    TransactionDetails:
      type: object
      description: Transaction Details sent by Partner.
      properties:
        shipping_address:
          $ref: '#/components/schemas/Address'
        billing_address:
          $ref: '#/components/schemas/Address'
        items:
          type: array
          items:
            $ref: '#/components/schemas/Item'
        original_amount:
          type: number
          description: Total of all amounts from each line_items
        tax_amount:
          type: number
          description: Total of all tax amounts from each line_items
        shipping_amount:
          type: number
          description: Shipping Cost/Amount
        voucher_code:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          description: Voucher Code applied to this transaction with description
        fees:
          type: object
          description: List of fees that were added to this transaction
          properties:
            description:
              type: string
              description: Fee Name
            amount:
              type: number
              description: Fee Amount
        refundable_amount:
          type: number
        additional_info:
          type: object
          additionalProperties: true
        expiry_date:
          type: string
          format: date-time
      x-publishable: true
    PGFlow:
      type: string
      enum:
        - tokenization
        - charge
      description: >-
        for which flow that Partner would like OF to execute. If it is not set,
        default to Tokenization
      x-publishable: true
    ClientTransactionRequest:
      type: object
      required:
        - partner_redirect_success_url
        - partner_redirect_fail_url
        - partner_reference_id
        - currency
        - customer_info
        - amount
        - transaction_details
      properties:
        instrument:
          type: string
          default: web_checkout
          x-discriminator-values:
            - web_checkout
          description: >-
            Instrument of the transaction request. Can be omitted for the
            `web_checkout` transaction request.
        tenant_id:
          type: string
          format: uuid
          description: >-
            OpenFabric Generated ID for the Tenant of the payment method, only
            for backward-compatibility. If not provided, it will use the ID of
            the Tenant linked with Partner.
        partner_redirect_success_url:
          type: string
          format: uri
          description: >-
            Redirect URL Configured by Partner - when transaction is approved by
            Tenant
        partner_redirect_fail_url:
          type: string
          format: uri
          description: >-
            Redirect URL Configured by Partner - when transaction is denied by
            Tenant
        partner_reference_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          description: Transaction ID set by Partner and sent to OpenFabric
        customer_info:
          $ref: '#/components/schemas/CustomerInfo'
        amount:
          type: number
          description: Transaction amount for which Tenant's authorization is requested
          minimum: 0.01
        currency:
          type: string
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]*$
          description: >-
            Transaction Currency for which Tenant's authorization is requested
            (ISO 4217 Alpha-3 currency codes)
        transaction_details:
          $ref: '#/components/schemas/TransactionDetails'
        pg_name:
          type: string
          description: Payment Gateway name
        pg_publishable_key:
          type: string
          description: Payment Gateway's publishable_key
        pg_flow:
          $ref: '#/components/schemas/PGFlow'
        pg_additional_params:
          type: object
          description: >-
            Additional parameters required in the card tokenization/charge
            request for the given Payment Gateway
      x-publishable: true
    CardEncryptionAlgo:
      type: string
      enum:
        - rsa_oaep
        - ecc_ecies
    UnilateralTransactionRequest:
      type: object
      required:
        - partner_reference_id
        - currency
        - customer_info
        - amount
        - transaction_details
        - card_encryption_key
      properties:
        instrument:
          type: string
          default: unilateral_checkout
          x-discriminator-values:
            - unilateral_checkout
          description: >-
            Instrument of the transaction request. Can be omitted for the
            `web_checkout` transaction request.
        partner_reference_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          description: Transaction ID set by Partner and sent to OpenFabric
        customer_info:
          $ref: '#/components/schemas/CustomerInfo'
        amount:
          type: number
          description: Transaction amount for which Tenant's authorization is requested
          minimum: 0.01
        currency:
          type: string
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]*$
          description: >-
            Transaction Currency for which Tenant's authorization is requested
            (ISO 4217 Alpha-3 currency codes)
        transaction_details:
          $ref: '#/components/schemas/TransactionDetails'
        card_encryption_key:
          type: string
          description: Card Encryption Key for the Payment Gateway
        card_encryption_algo:
          type: string
          $ref: '#/components/schemas/CardEncryptionAlgo'
        tenant_reference_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          description: Tenant reference ID set by Partner and sent to OpenFabric
      x-publishable: true
    PatLinkInfo:
      type: object
      properties:
        link_id:
          type: string
          description: pre approved transaction link id
          format: uuid
        tenant_link_ref:
          type: string
          description: pre approved transaction link tenant id
        partner_link_ref:
          type: string
          description: pre approved transaction link partner id
    PatTransactionRequest:
      type: object
      required:
        - instrument
        - partner_reference_id
        - currency
        - amount
        - transaction_details
      properties:
        instrument:
          type: string
          default: recurring
          x-discriminator-values:
            - one_click_checkout
            - recurring
          description: >-
            Instrument of the transaction request. Can be omitted for the
            `web_checkout` transaction request.
        partner_reference_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          description: Transaction ID set by Partner and sent to OpenFabric
        pat_link:
          $ref: '#/components/schemas/PatLinkInfo'
        amount:
          type: number
          description: Transaction amount for which Tenant's authorization is requested
          minimum: 0.01
        currency:
          type: string
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]*$
          description: >-
            Transaction Currency for which Tenant's authorization is requested
            (ISO 4217 Alpha-3 currency codes)
        transaction_details:
          $ref: '#/components/schemas/TransactionDetails'
        pg_name:
          type: string
          description: Payment Gateway name
        pg_flow:
          $ref: '#/components/schemas/PGFlow'
      x-publishable: true
    PartnerTransactionRequest:
      type: object
      oneOf:
        - $ref: '#/components/schemas/ClientTransactionRequest'
        - $ref: '#/components/schemas/UnilateralTransactionRequest'
        - $ref: '#/components/schemas/PatTransactionRequest'
      discriminator:
        propertyName: instrument
        x-default: web_checkout
        mapping:
          web_checkout: '#/components/schemas/ClientTransactionRequest'
          unilateral_checkout: '#/components/schemas/UnilateralTransactionRequest'
          one_click_checkout: '#/components/schemas/PatTransactionRequest'
          recurring: '#/components/schemas/PatTransactionRequest'
    MerchantTransactionStatus:
      type: string
      enum:
        - in_progress
        - approved
        - failed
        - reversed
      description: Transaction status for Partner
      x-publishable: true
    PGChargeStatus:
      type: string
      enum:
        - success
        - failed
        - in_progress
        - waiting_for_authentication
      description: Pg Charge status
      x-publishable: true
    InStoreDetails:
      type: object
      properties:
        channel:
          type: string
        channel_raw_transaction:
          type: object
        qr_url:
          type: string
        qr_display_type:
          type: string
        qr_expire_time:
          type: string
          format: date-time
    FundsTransferDetailsStatus:
      type: string
      enum:
        - pending
        - success
        - failed
    FundsTransferDetails:
      type: object
      required:
        - status
      properties:
        status:
          $ref: '#/components/schemas/FundsTransferDetailsStatus'
        transfer_ref:
          type: string
          description: Transaction ID provided by the banking API
        transfer_raw_response:
          type: object
          description: Transaction Detail Response received from the 3rd party banking API
        message:
          type: string
    CardNetworkAuthorizationDetails:
      type: object
      properties:
        raw_authorization_body:
          type: object
        authorization_date:
          type: string
          format: date-time
        authorization_amount:
          type: string
        authorization_currency:
          type: string
    PgIntegrationDetails:
      type: object
      properties:
        pg_name:
          type: string
        pg_flow:
          type: string
        pg_token:
          type: string
        pg_charge_id:
          type: string
        pg_charge_status:
          type: string
        pg_charge_authentication_url:
          type: string
        pg_charge_raw_response:
          type: object
        pg_config_publishable_key:
          type: string
        pg_config_additional_params:
          type: object
    DualAuthDetails:
      type: object
      properties:
        raw_message_payload:
          type: object
          description: Message payload received from Citi DualAuth message/notification API
        billing_amount:
          type: number
        billing_currency:
          type: string
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]*$
          description: ISO 4217 Alpha-3 currency codes
        network_transaction_ref:
          type: string
          description: RetrievalReferenceNumber from Citi DualAuth message/notification API
        network_transaction_time:
          type: string
          description: >-
            TransactionDateTime (MMDDHHMMSS) from Citi DualAuth
            message/notification API
        issuer_authorization_ref:
          type: string
          description: AuthIDCode from Citi DualAuth notification API
        issuer_authorization_result:
          type: string
          description: ResponseCode from Citi DualAuth notification API
    TransactionMetadata:
      description: transaction metadata
      type: object
      properties:
        pat_constraints_valid:
          type: boolean
        in_store_details:
          $ref: '#/components/schemas/InStoreDetails'
        funds_transfer_details:
          $ref: '#/components/schemas/FundsTransferDetails'
        card_network_authorization_details:
          $ref: '#/components/schemas/CardNetworkAuthorizationDetails'
        transaction_details:
          $ref: '#/components/schemas/TransactionDetails'
        pg_integration_details:
          $ref: '#/components/schemas/PgIntegrationDetails'
        dual_auth_details:
          $ref: '#/components/schemas/DualAuthDetails'
    ClientTransactionResponse:
      type: object
      description: Transaction Response for Partner.
      required:
        - id
        - tenant_id
        - partner_id
        - partner_reference_id
        - tenant_reference_id
        - amount
        - currency
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: Transaction ID in OpenFabric system
        partner_reference_id:
          type: string
          description: Transaction ID set by Partner and sent to OpenFabric
        tenant_reference_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          description: >-
            Transaction ID in Tenant's system. This is what we received back
            from the Tenant when we made TransactionRequest above
        tenant_partner_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          description: >-
            This is the Partner ID that you set for this Partner in your Tenant
            Servicing Poratl as part of this Partner's setup.
        tenant_id:
          type: string
          format: uuid
          description: OpenFabric Generated ID for your Tenant account - UUID
        partner_id:
          type: string
          format: uuid
          description: OpenFabric Generated ID for this Partner - UUID
        partner_name:
          type: string
          description: Partner name
        payment_redirect_web_url:
          type: string
          format: uri
          description: >-
            Redirect URL from Tenant. This is the URL to which we will redirect
            customers for transaction approval
        payment_redirect_app_url:
          type: string
          format: uri
          description: >-
            Redirect URL from Tenant for redirect to APP. May be utilized if we
            determine this to be mobile device
        partner_redirect_success_url:
          type: string
          format: uri
          description: >-
            Redirect URL Configured by Partner - when transaction is approved by
            Tenant
        partner_redirect_fail_url:
          type: string
          format: uri
          description: >-
            Redirect URL Configured by Partner - when transaction is approved by
            Tenant
        customer_info:
          $ref: '#/components/schemas/CustomerInfo'
        amount:
          type: number
        currency:
          type: string
          minLength: 3
          maxLength: 3
        approved_amount:
          type: number
        approved_currency:
          type: string
          minLength: 3
          maxLength: 3
        status:
          $ref: '#/components/schemas/MerchantTransactionStatus'
        reason:
          type: string
        card_fetch_token:
          type: string
          pattern: ^[\S]+$
          description: >-
            OpenFabric generated Token to fetch virtual card details issued
            against this transaction
        pg_name:
          type: string
          maxLength: 32
        pg_flow:
          $ref: '#/components/schemas/PGFlow'
        pg_charge_id:
          type: string
        pg_charge_status:
          $ref: '#/components/schemas/PGChargeStatus'
        pg_card_token:
          type: string
        of_channel_partner_reference:
          type: string
          description: >
            Reference ID to the transaction which is assigned by the Channel
            Partner that submit the transaction.
        transaction_metadata:
          $ref: '#/components/schemas/TransactionMetadata'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      x-publishable: true
    TransactionRefundRequest:
      type: object
      required:
        - amount
      properties:
        amount:
          type: number
          description: Refund amount
          minimum: 0.001
        additional_properties:
          type: object
        reason:
          type: string
      x-publishable: true
    TransactionRefundResponse:
      type: object
      required:
        - id
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Open Fabric refund id
        pg_refund_id:
          type: string
          description: refund id sent back from payment gateways
        data:
          type: object
          description: refund response body from payment gateways
      x-publishable: true
    PaymentMethodMetadata:
      type: object
      required:
        - tenant_id
        - tenant_partner_id
      properties:
        tenant_id:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
          minLength: 4
          pattern: ^[a-z0-9][a-z0-9\-]*[a-z0-9]$
        website_url:
          type: string
          format: uri
        tenant_partner_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
        schema:
          type: string
      x-publishable: true
    MerchantConfigUpdateRequest:
      type: object
      description: Webhook and PG credentials request details for Partner.
      properties:
        webhook:
          $ref: '#/components/schemas/MerchantNotificationSubscriptionRequest'
        payment_gateway:
          allOf:
            - $ref: '#/components/schemas/PGCredentialsRequest'
            - type: object
              properties:
                pg_name:
                  type: string
      x-publishable: true
    MerchantConfigUpdateResponse:
      type: object
      description: Webhook and PG credentials response details for Partner.
      properties:
        webhook:
          $ref: '#/components/schemas/MerchantNotificationSubscriptionResponse'
        payment_gateway:
          $ref: '#/components/schemas/PGCredentialsResponse'
      x-publishable: true
    RoutingDataInitializingInstrument:
      description: Instrument used to initialize the transaction
      type: string
      enum:
        - web_checkout
        - unilateral_checkout
        - one_click_checkout
        - recurring
        - tenant_recurring
        - pba_static_token
        - qrph
        - sgqr
        - vietqr
        - tap_and_pay
        - manual_card_entry
        - google_pay
        - samsung_pay
    StaticTokenStatus:
      type: string
      enum:
        - active
        - inactive
        - deactivated
    PanExpiry:
      type: object
      required:
        - month
        - year
      properties:
        month:
          type: string
          pattern: ^\d{2}$
          description: expiry month
        year:
          type: string
          pattern: ^\d{2}$
          description: expiry year
    StaticTokenMinimalResponse:
      type: object
      required:
        - id
        - tenant_account_ref
        - tenant_customer_ref
        - account_id
        - customer_id
        - instrument
        - status
        - locked
        - created_at
        - updated_at
      properties:
        id:
          type: string
        tenant_account_ref:
          type: string
        tenant_customer_ref:
          type: string
        tenant_token_ref:
          type: string
        tsp_token_ref:
          type: string
        account_id:
          type: string
          format: uuid
        customer_id:
          type: string
          format: uuid
        dpan_redacted_number:
          type: string
        dpan_expiry:
          $ref: '#/components/schemas/PanExpiry'
        fpan_redacted_number:
          type: string
        fpan_expiry:
          $ref: '#/components/schemas/PanExpiry'
        instrument:
          $ref: '#/components/schemas/RoutingDataInitializingInstrument'
        status:
          $ref: '#/components/schemas/StaticTokenStatus'
        locked:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    GetStaticTokensMinimalResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/StaticTokenMinimalResponse'
    PbaCustomerDpanSuspendReasonCode:
      type: string
      enum:
        - device_lost
        - device_stolen
        - suspected_fraud
        - other
    DeleteStaticTokenRequest:
      type: object
      properties:
        reason_text:
          type: string
        reason_code:
          $ref: '#/components/schemas/PbaCustomerDpanSuspendReasonCode'
    StaticTokenLockStatus:
      type: string
      enum:
        - locked
        - unlocked
    UpdateStaticTokenRequest:
      type: object
      required:
        - lock_status
      properties:
        lock_status:
          $ref: '#/components/schemas/StaticTokenLockStatus'
    CardArtContentType:
      type: string
      description: MIME type of the card art image
      enum:
        - image/png
        - image/jpeg
        - image/webp
      x-publishable: true
    CreateCardWidgetRequest:
      type: object
      properties:
        static_token_id:
          type: string
          description: Either `static_token_id` or `card_fetch_token` must be provided.
        card_fetch_token:
          type: string
          description: Either `static_token_id` or `card_fetch_token` must be provided.
        card_art_asset_id:
          type: string
          format: uuid
          description: >-
            Identifier of a pre-uploaded card art asset. Obtained from the asset
            upload API. Mutually exclusive with `card_art_base64`.
        card_art_base64:
          type: string
          maxLength: 204800
          description: >
            Base64 encoded card art image. 


            Max 150KB decoded. Recommended dimensions: 340x214px (or 1.586:1
            aspect ratio). 


            Mutually exclusive with `card_art_asset_id`.
        card_art_content_type:
          $ref: '#/components/schemas/CardArtContentType'
      x-publishable: true
    CreateCardWidgetResponse:
      type: object
      required:
        - card_widget_url
        - expired_at
      properties:
        card_widget_url:
          type: string
          format: uri
          description: >-
            URL of the card widget. The widget is a short-lived URL that can be
            used to display the card details in an iframe or webview.
        expired_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the widget URL expires.
      x-publishable: true
    CardArtAssetResponse:
      type: object
      required:
        - card_art_asset_id
        - card_art_content_type
        - size_bytes
        - created_at
      properties:
        card_art_asset_id:
          type: string
          format: uuid
          description: >-
            Unique identifier for the uploaded asset. Use this as
            `card_art_asset_id` in the widget creation API.
        card_art_asset_name:
          type: string
          description: >-
            Optional human-readable label for the asset (e.g., "Premium Black",
            "Student Card").
        card_art_content_type:
          $ref: '#/components/schemas/CardArtContentType'
        size_bytes:
          type: integer
          description: Size of the decoded image in bytes.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the asset was created.
      x-publishable: true
    ListCardArtAssetsResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CardArtAssetResponse'
      x-publishable: true
    UploadCardArtAssetRequest:
      type: object
      required:
        - card_art_base64
        - card_art_content_type
      properties:
        card_art_base64:
          type: string
          maxLength: 204800
          description: >
            Base64 encoded card art image. 


            Max 150KB decoded. Recommended dimensions: 340x214px (or 1.586:1
            aspect ratio). 
        card_art_content_type:
          $ref: '#/components/schemas/CardArtContentType'
        card_art_asset_name:
          type: string
          description: >-
            Optional human-readable label for the asset (e.g., "Premium Black",
            "Student Card").
      x-publishable: true
    PbaTransactionSource:
      type: string
      enum:
        - ecommerce
        - terminal
        - unsupported_dfle
        - unsupported_tagc
        - unsupported_brcd
        - unsupported_mgst
        - unsupported_unkw
        - unsupported_mail
        - unsupported_tlph
        - unsupported_tvpy
        - unsupported_mobl
    PbaTransactionCategory:
      type: string
      enum:
        - high_risk_purchase
        - recurring_payment
        - transit
        - automated_fuel_dispenser
        - dynamic_currency_conversion
        - cardholder_activated_terminal
        - other
    PbaTransitTransactionType:
      type: string
      enum:
        - prefunded
        - realtime
        - post-authorized-aggregated
        - authorized-aggregated-split-clearing
        - other
        - debt-recovery
    PbaPaymentNetwork:
      type: string
      enum:
        - mastercard
        - visa
    AuthPolicyDecision:
      type: string
      description: Policy evaluation decision
      enum:
        - proceed
        - decline
        - review
    AuthPolicyRuleTemplateCode:
      type: string
      description: Available rule template codes for Auth Policy
      enum:
        - account_billing_amount_limit
        - account_transaction_count_limit
        - transaction_amount_limit
        - transaction_billing_limit
        - mcc_whitelist
        - mcc_blacklist
        - mid_whitelist
        - mid_blacklist
        - merchant_country_whitelist
        - merchant_country_blacklist
        - currency_whitelist
        - currency_blacklist
        - transaction_time_whitelist
        - transaction_time_blacklist
    AuthPolicyViolationPolicy:
      type: string
      description: Action to take when rule is violated
      enum:
        - decline
        - review
    AuthPolicyViolationType:
      type: string
      description: Generic violation type for policy evaluation
      enum:
        - limit_exceeded
        - not_allowed
        - blocked
        - time_restricted
    AuthPolicyViolation:
      type: object
      description: Details of a policy violation
      required:
        - rule_id
        - rule_name
        - template_code
        - violation_policy
        - violation_type
        - violation_message
        - violation_context
      properties:
        rule_id:
          type: string
          format: uuid
          description: Rule identifier
        rule_name:
          type: string
          description: Rule name
        template_code:
          $ref: '#/components/schemas/AuthPolicyRuleTemplateCode'
        violation_policy:
          $ref: '#/components/schemas/AuthPolicyViolationPolicy'
        violation_type:
          $ref: '#/components/schemas/AuthPolicyViolationType'
        violation_message:
          type: string
          description: Human-readable violation message
        violation_context:
          type: object
          description: Context data for the violation
          additionalProperties: true
    AuthPolicyEvaluateResponse:
      type: object
      description: Response from policy evaluation
      required:
        - decision
        - violations
      properties:
        decision:
          $ref: '#/components/schemas/AuthPolicyDecision'
        violations:
          type: array
          description: List of rule violations (empty if decision is proceed)
          items:
            $ref: '#/components/schemas/AuthPolicyViolation'
    BalanceAmount:
      type: object
      description: Amount object used in balance operations
      required:
        - value
        - currency
      properties:
        value:
          type: number
          description: The amount value in minor units (e.g., cents)
        currency:
          type: string
          minLength: 3
          maxLength: 3
          description: ISO 4217 Alpha-3 currency code
    schemas-DebitBalanceRequest:
      type: object
      description: Request for debiting from a customer's balance
      required:
        - transaction_id
        - tenant_account_ref
        - idempotency_key
        - of_action_ref
      properties:
        transaction_id:
          type: string
          description: Unique identifier for the transaction
        tenant_account_ref:
          type: string
          description: Identifier of the tenant account
        idempotency_key:
          type: string
          description: Unique identifier to prevent duplicate operations
        amount:
          $ref: '#/components/schemas/BalanceAmount'
        of_action_ref:
          type: string
          description: OpenFabric reference identifier for the operation
        tenant_balance_ref:
          type: string
          description: >-
            Reference of the exact balance to be debited (used in refund
            reversal)
    BalanceOperationError:
      type: object
      description: Error details returned on balance operation failure
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Error code (e.g., INSUFFICIENT_FUNDS, ACCOUNT_NOT_FOUND)
        message:
          type: string
          description: Human-readable error message
    schemas-DebitBalanceResponse:
      type: object
      description: Response for debit_balance operation
      required:
        - success
      properties:
        success:
          type: boolean
          description: Indicates if the debit operation was successful
        tenant_balance_ref:
          type: string
          description: Reference of the balance record that was debited
        available_balance:
          $ref: '#/components/schemas/BalanceAmount'
        tenant_action_ref:
          type: string
          description: Tenant's internal reference for this operation
        error:
          $ref: '#/components/schemas/BalanceOperationError'
    schemas-CreditBalanceRequest:
      type: object
      description: Request for crediting to a customer's balance
      required:
        - transaction_id
        - tenant_account_ref
        - idempotency_key
        - of_action_ref
      properties:
        transaction_id:
          type: string
          description: Unique identifier for the transaction
        tenant_account_ref:
          type: string
          description: Identifier of the tenant account
        idempotency_key:
          type: string
          description: Unique identifier to prevent duplicate operations
        amount:
          $ref: '#/components/schemas/BalanceAmount'
        of_action_ref:
          type: string
          description: OpenFabric reference identifier for the operation
        tenant_balance_ref:
          type: string
          description: >-
            Reference of the exact balance to be credited (used in auth
            reversal)
    schemas-CreditBalanceResponse:
      type: object
      description: Response for credit_balance operation
      required:
        - success
      properties:
        success:
          type: boolean
          description: Indicates if the credit operation was successful
        tenant_balance_ref:
          type: string
          description: Reference of the balance record that was credited
        available_balance:
          $ref: '#/components/schemas/BalanceAmount'
        tenant_action_ref:
          type: string
          description: Tenant's internal reference for this operation
        error:
          $ref: '#/components/schemas/BalanceOperationError'
    schemas-HoldBalanceRequest:
      type: object
      description: Request for placing a hold on funds (pre-authorization)
      required:
        - transaction_id
        - tenant_account_ref
        - idempotency_key
        - of_action_ref
      properties:
        transaction_id:
          type: string
          description: Unique identifier for the transaction
        tenant_account_ref:
          type: string
          description: Identifier of the tenant account
        idempotency_key:
          type: string
          description: Unique identifier to prevent duplicate operations
        amount:
          $ref: '#/components/schemas/BalanceAmount'
        of_action_ref:
          type: string
          description: OpenFabric reference identifier for the operation
        tenant_hold_balance_ref:
          type: string
          description: >-
            Reference of the hold funds balance to be increased (used in
            pre-auth incremental)
    schemas-HoldBalanceResponse:
      type: object
      description: Response for hold_balance operation
      required:
        - success
      properties:
        success:
          type: boolean
          description: Indicates if the hold operation was successful
        tenant_hold_balance_ref:
          type: string
          description: Reference of the hold funds balance
        available_balance:
          $ref: '#/components/schemas/BalanceAmount'
        tenant_action_ref:
          type: string
          description: Tenant's internal reference for this operation
        error:
          $ref: '#/components/schemas/BalanceOperationError'
    schemas-RestoreBalanceRequest:
      type: object
      description: Request for releasing previously held funds
      required:
        - transaction_id
        - tenant_account_ref
        - idempotency_key
        - of_action_ref
        - tenant_hold_balance_ref
      properties:
        transaction_id:
          type: string
          description: Unique identifier for the transaction
        tenant_account_ref:
          type: string
          description: Identifier of the tenant account
        idempotency_key:
          type: string
          description: Unique identifier to prevent duplicate operations
        amount:
          $ref: '#/components/schemas/BalanceAmount'
        of_action_ref:
          type: string
          description: OpenFabric reference identifier for the operation
        tenant_hold_balance_ref:
          type: string
          description: Reference of the hold funds balance to be released (required)
    schemas-RestoreBalanceResponse:
      type: object
      description: Response for restore_balance operation
      required:
        - success
      properties:
        success:
          type: boolean
          description: Indicates if the restore operation was successful
        tenant_balance_ref:
          type: string
          description: Reference of the balance that hold funds were restored to
        available_balance:
          $ref: '#/components/schemas/BalanceAmount'
        tenant_action_ref:
          type: string
          description: Tenant's internal reference for this operation
        error:
          $ref: '#/components/schemas/BalanceOperationError'
    schemas-DebitHoldBalanceRequest:
      type: object
      description: Request for debiting from a hold balance
      required:
        - transaction_id
        - tenant_account_ref
        - idempotency_key
        - of_action_ref
        - tenant_hold_balance_ref
      properties:
        transaction_id:
          type: string
          description: Unique identifier for the transaction
        tenant_account_ref:
          type: string
          description: Identifier of the tenant account
        idempotency_key:
          type: string
          description: Unique identifier to prevent duplicate operations
        amount:
          $ref: '#/components/schemas/BalanceAmount'
        of_action_ref:
          type: string
          description: OpenFabric reference identifier for the operation
        tenant_hold_balance_ref:
          type: string
          description: Reference of the hold funds balance to be debited (required)
    schemas-DebitHoldBalanceResponse:
      type: object
      description: Response for debit_hold_balance operation
      required:
        - success
      properties:
        success:
          type: boolean
          description: Indicates if the debit hold operation was successful
        tenant_hold_balance_ref:
          type: string
          description: Reference of the hold balance that was debited
        hold_balance:
          $ref: '#/components/schemas/BalanceAmount'
        tenant_action_ref:
          type: string
          description: Tenant's internal reference for this operation
        error:
          $ref: '#/components/schemas/BalanceOperationError'
    schemas-CreditHoldBalanceRequest:
      type: object
      description: Request for crediting to a hold balance
      required:
        - transaction_id
        - tenant_account_ref
        - idempotency_key
        - of_action_ref
        - tenant_hold_balance_ref
      properties:
        transaction_id:
          type: string
          description: Unique identifier for the transaction
        tenant_account_ref:
          type: string
          description: Identifier of the tenant account
        idempotency_key:
          type: string
          description: Unique identifier to prevent duplicate operations
        amount:
          $ref: '#/components/schemas/BalanceAmount'
        of_action_ref:
          type: string
          description: OpenFabric reference identifier for the operation
        tenant_hold_balance_ref:
          type: string
          description: Reference of the hold funds balance to be credited (required)
    schemas-CreditHoldBalanceResponse:
      type: object
      description: Response for credit_hold_balance operation
      required:
        - success
      properties:
        success:
          type: boolean
          description: Indicates if the credit hold operation was successful
        tenant_hold_balance_ref:
          type: string
          description: Reference of the hold balance that was credited
        hold_balance:
          $ref: '#/components/schemas/BalanceAmount'
        tenant_action_ref:
          type: string
          description: Tenant's internal reference for this operation
        error:
          $ref: '#/components/schemas/BalanceOperationError'
    PbaAuthTypeFlagValues:
      type: string
      enum:
        - final_auth
        - pre_auth
        - refund_online
        - refund_offline
        - chargeback
        - unlinked_auth
    PbaTransactionStatus:
      type: string
      enum:
        - initiated
        - approved
        - declined
        - created
        - processed
        - reversed
        - unknown
        - expired
    PbaAuthorizationFailedAdvisedAction:
      type: string
      description: Action advised to Tenant
      enum:
        - reverse_transaction
        - reverse_incremental
    PbaTokenSource:
      type: string
      description: >
        * financial_account - Tokens that are from financial accounts

        * card_added_by_user - Tokens that are from cards added by users
        manually inputting card details

        * card_added_by_application - Tokens that are from cards added by
        applications like GooglePay
      enum:
        - financial_account
        - card_added_by_user
        - card_added_by_application
    TokenTransactionAuthorizationStatus:
      type: string
      enum:
        - authorized
        - cleared
        - declined
        - reversed
    TokenTransactionType:
      type: string
      enum:
        - purchase
        - refund
        - payment
        - atm_withdrawal
        - cash_disbursement
        - atm_deposit
        - atm_transfer
    WalletTokenTransactionLogsData:
      type: object
      required:
        - id
        - tenant_id
        - wallet_id
        - token_unique_reference
        - currency
        - transaction_type
        - authorization_status
        - created_at
        - updated_at
      properties:
        id:
          type: string
        tenant_id:
          type: string
        wallet_id:
          type: string
        token_unique_reference:
          type: string
        tsp_transaction_ref:
          type: string
        amount:
          type: number
        currency:
          type: string
        authorization_status:
          $ref: '#/components/schemas/TokenTransactionAuthorizationStatus'
        transaction_type:
          $ref: '#/components/schemas/TokenTransactionType'
        merchant_name:
          type: string
        merchant_category_code:
          type: string
        merchant_outlet_address:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PbaProvisionType:
      type: string
      enum:
        - nfc_device_token
        - static_token
        - push_provision
    PbaProvisionInstrument:
      type: string
      enum:
        - manual_card_entry
        - google_pay
        - samsung_pay
    PbaProvisionRequest:
      type: object
      required:
        - tenant_customer_ref
        - tenant_account_ref
      properties:
        type:
          $ref: '#/components/schemas/PbaProvisionType'
        payment_network:
          $ref: '#/components/schemas/PbaPaymentNetwork'
          description: >-
            the payment_network field is used to identify the entity that
            provisioned the data. default value is 'mastercard'. Required for
            visa provisioning
        tenant_customer_ref:
          type: string
        tenant_account_ref:
          type: string
          maxLength: 64
        tenant_token_ref:
          type: string
        wallet_id:
          type: string
        device_name:
          type: string
        tenant_account_device_ref:
          type: string
          maxLength: 32
        billing_currency:
          type: string
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]*$
        billing_address:
          $ref: '#/components/schemas/Address'
        instrument:
          $ref: '#/components/schemas/PbaProvisionInstrument'
        card_name:
          type: string
          description: Name of the card
    PbaProvisionResponse:
      type: object
      required:
        - tenant_account_ref
        - customer_id
        - account_id
      properties:
        tenant_account_ref:
          type: string
        tenant_customer_ref:
          type: string
        tenant_account_device_ref:
          type: string
        tenant_token_ref:
          type: string
        sdk_tokenize_account_device_data:
          type: string
        of_customer_id:
          type: string
          format: uuid
        of_account_id:
          type: string
          format: uuid
        of_device_id:
          type: string
          format: uuid
        customer_id:
          type: string
          format: uuid
        account_id:
          type: string
          format: uuid
        device_id:
          type: string
          format: uuid
        static_token_id:
          type: string
          format: uuid
        digital_token_id:
          type: string
        instrument:
          $ref: '#/components/schemas/PbaProvisionInstrument'
        locked:
          type: boolean
        status:
          type: string
        provision_token:
          type: string
          description: >-
            One-time access token to be used for provisioning the account to
            Wallet Providers (Apple Pay, Google Pay, Samsung Pay).
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    DigitalWallet:
      type: string
      enum:
        - issuer
        - google_pay
        - apple_pay
        - samsung_pay
    CardPushProvisionRequest:
      type: object
      required:
        - digital_wallet
        - tenant_customer_ref
        - issuer_card_id
        - wallet_id
        - encrypted_card_data
      properties:
        digital_wallet:
          $ref: '#/components/schemas/DigitalWallet'
        tenant_customer_ref:
          type: string
        issuer_card_id:
          type: string
        wallet_id:
          type: string
        issuer_authentication_data:
          type: string
        encrypted_card_data:
          type: string
        billing_address:
          $ref: '#/components/schemas/Address'
    CardPushProvisionResponse:
      type: object
      required:
        - wallet_id
        - provisioning_data
      properties:
        wallet_id:
          type: string
        provisioning_data:
          type: object
    PbaLockWalletReasonCode:
      type: string
      enum:
        - device_stolen
        - device_lost
        - suspected_fraud
        - other
    PbaWalletStatusUpdateRequest:
      type: object
      required:
        - reason_code
        - reason
      properties:
        reason_code:
          $ref: '#/components/schemas/PbaLockWalletReasonCode'
        reason:
          type: string
    PbASdkWalletStatus:
      type: string
      enum:
        - active
        - inactive
        - suspended
        - deactivated
    PbaWalletStatusUpdateResponse:
      type: object
      required:
        - wallet_id
        - status
        - status_timestamp
        - suspended_by
      properties:
        wallet_id:
          type: string
        status:
          $ref: '#/components/schemas/PbASdkWalletStatus'
        status_timestamp:
          type: string
          format: date-time
        suspended_by:
          type: array
          items:
            type: string
    TokenProvisioningCardFetchTokenRequest:
      type: object
      required:
        - static_token_id
        - account_id
      properties:
        static_token_id:
          type: string
          format: uuid
          description: OF static token id
        account_id:
          type: string
          description: financial account id
        card_encryption_key:
          type: string
          description: Card Encryption Key for card handover
        card_encryption_algo:
          type: string
          $ref: '#/components/schemas/CardEncryptionAlgo'
    TokenProvisioningCardFetchTokenResponse:
      type: object
      required:
        - card_fetch_token
      properties:
        card_fetch_token:
          type: string
          description: card token used to fetch card info
    FetchCardRequest:
      type: object
      required:
        - card_fetch_token
      properties:
        card_fetch_token:
          type: string
        fetch_cvv:
          type: boolean
          default: true
          description: >-
            It will be used to return cvv in response or not. By default its
            true
      x-publishable: true
    Provider:
      type: string
      enum:
        - mastercard
        - visa
      x-publishable: true
    FullCardDetails:
      type: object
      required:
        - provider
        - card_reference_id
        - redacted_number
        - expiry_month
        - expiry_year
        - message
      properties:
        provider:
          $ref: '#/components/schemas/Provider'
        card_reference_id:
          type: string
          pattern: ^[\S]+$
        card_number:
          type: string
          minLength: 9
          maxLength: 19
          pattern: ^[\S]*$
        redacted_number:
          type: string
          pattern: ^[\S]*$
        cvv:
          type: string
          pattern: ^[\S]*$
          minLength: 3
          maxLength: 4
        expiry_month:
          type: string
          pattern: ^\d{2}$
          description: expiry month
        expiry_year:
          type: string
          pattern: ^\d{2}$
          description: expiry year
        message:
          type: string
        encrypted_card_number:
          type: string
        encrypted_cvv:
          type: string
      x-publishable: true
    ThreeDsActionResult:
      type: string
      enum:
        - pending
        - approved
        - declined
        - cancelled
    PbaThreeDsResponseRequest:
      type: object
      required:
        - three_ds_challenge_id
        - static_token_id
        - tenant_customer_ref
        - tenant_account_ref
        - challenge_result
        - creation_time
      properties:
        three_ds_challenge_id:
          type: string
        static_token_id:
          type: string
        tenant_customer_ref:
          type: string
        tenant_account_ref:
          type: string
        challenge_result:
          $ref: '#/components/schemas/ThreeDsActionResult'
        reason:
          type: string
        creation_time:
          type: string
          format: date-time
    AccountTransactionIntegrationRequest:
      type: object
      required:
        - tenant_partner_id
        - fabric_reference_id
        - partner_reference_id
        - tenant_id
        - gateway_success_url
        - gateway_fail_url
        - currency
        - amount
        - transaction_details
      properties:
        tenant_partner_id:
          type: string
          description: Reference ID to identify Partner on Tenant system
        fabric_reference_id:
          type: string
          description: OpenFabric Generated ID for this Transaction - UUID
        partner_reference_id:
          type: string
          description: Transaction ID set by Partner and sent to OpenFabric
        tenant_id:
          type: string
          format: uuid
          description: OpenFabric Generated ID for your Tenant account - UUID
        gateway_success_url:
          type: string
          format: uri
          description: >-
            This is the URL Tenant should redirect customers to when the
            transaction is successfully approved by Tenant
        gateway_fail_url:
          type: string
          format: uri
          description: >-
            This is the URL Tenant should redirect Customers to when the
            transaction is declined by Tenant. The transaction could be
            declined, because the customer cancelled the transaction on Tenant's
            payment flow or the Tenant simply declined to approve this
            transaction
        customer_info:
          $ref: '#/components/schemas/CustomerInfo'
        amount:
          type: number
          description: Transaction amount for which Tenant's authorization is requested
        currency:
          type: string
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]*$
          description: >-
            Transaction Currency for which Tenant's authorization is requested
            (ISO 4217 Alpha-3 currency codes)
        transaction_details:
          $ref: '#/components/schemas/TransactionDetails'
        pat_link:
          $ref: '#/components/schemas/PatLinkInfo'
        partner_name:
          type: string
          description: Partner name
        source:
          type: string
          description: Source of transaction request
      x-publishable: true
    TransactionApprovalStatus:
      type: string
      description: >-
        Tenant can either Approve or Fail a transaction. In case of Failed,
        reason is mandatory.
      enum:
        - approved
        - failed
    AccountTransactionIntegrationResponse:
      title: Tenant Transaction Response
      description: >-
        Transaction Response Object to be returned by Tenant on succesful
        creation.
      type: object
      required:
        - tenant_reference_id
        - payment_redirect_web_url
      properties:
        tenant_reference_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          description: Transaction ID in Tenant system
        payment_redirect_web_url:
          type: string
          format: uri
          description: >-
            Redirect URL from Tenant. This is the URL to which we will redirect
            customers for transaction approval
        payment_redirect_app_url:
          type: string
          format: uri
          description: Redirect URL from Tenant APP
        status:
          $ref: '#/components/schemas/TransactionApprovalStatus'
        reason:
          type: string
          description: Reason for declining transaction
      x-publishable: true
    UpdateTransactionRequest:
      type: object
      description: Update Transaction Request.
      required:
        - tenant_reference_id
        - status
      properties:
        tenant_reference_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          description: >-
            Transaction ID in Tenant system. This is the same transaction ID
            that Tenant shared as part of the above step
        status:
          $ref: '#/components/schemas/TransactionApprovalStatus'
        approved_amount:
          type: number
          description: Approved transaction amount
        approved_currency:
          type: string
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]*$
          description: Approved transaction Currency (ISO 4217 Alpha-3 currency codes)
        reason:
          type: string
      x-publishable: true
    TransactionStatus:
      type: string
      enum:
        - initiated
        - created
        - approved
        - charged
        - credited
        - reversed
        - failed
        - pending
      description: >-
        External Status of a transaction, pending is used for create transaction
        with pat
      x-publishable: true
    TransactionResponse:
      type: object
      description: Transaction Response.
      required:
        - id
        - tenant_id
        - amount
        - currency
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: Transaction ID in OpenFabric system
        link_id:
          type: string
          format: uuid
          description: Transaction Link ID in OpenFabric system
        partner_reference_id:
          type: string
          description: Transaction ID set by Partner and sent to OpenFabric
        tenant_reference_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          description: >-
            Transaction ID in Tenant's system. This is what we received back
            from the Tenant when we made TransactionRequest above
        tenant_partner_id:
          type: string
          pattern: ^[a-zA-Z0-9\-_@\.]*$
          minLength: 4
          description: >-
            This is the Partner ID that you set for this Partner in your Tenant
            Servicing Poratl as part of this Partner's setup.
        tenant_id:
          type: string
          format: uuid
          description: OpenFabric Generated ID for your Tenant Tenant - UUID
        partner_id:
          type: string
          format: uuid
          description: OpenFabric Generated ID for this Partner - UUID
        partner_name:
          type: string
          description: Partner name
        payment_redirect_web_url:
          type: string
          format: uri
          description: >-
            Redirect URL from Tenant. This is the URL to which we will redirect
            customers for transaction approval
        payment_redirect_app_url:
          type: string
          format: uri
          description: >-
            Redirect URL from Tenant for redirect to APP. May be utilized if we
            determine this to be mobile device
        gateway_success_url:
          type: string
          format: uri
          description: >-
            This is the URL Tenant should redirect customers to when the
            transaction is successfully approved by Tenant
        gateway_fail_url:
          type: string
          format: uri
          description: >-
            This is the URL Tenant should redirect Customers to when the
            transaction is declined by Tenant. The transaction could be
            declined, because the customer cancelled the transaction on Tenant's
            payment flow or the Tenant simply declined to approve this
            transaction
        partner_redirect_success_url:
          type: string
          format: uri
          description: >-
            Redirect URL Configured by Partner - when transaction is approved by
            Tenant
        partner_redirect_fail_url:
          type: string
          format: uri
          description: >-
            Redirect URL Configured by Partner - when transaction is approved by
            Tenant
        customer_id:
          type: string
          format: uuid
          description: OpenFabric Generated ID for this customer - UUID
        card_id:
          type: string
          format: uuid
          description: >-
            OpenFabric Genarated ID for the virtual card we will generate for
            this transaction - UUID
        customer_info:
          $ref: '#/components/schemas/CustomerInfo'
        amount:
          type: number
        currency:
          type: string
          minLength: 3
          maxLength: 3
        approved_amount:
          type: number
        approved_currency:
          type: string
          minLength: 3
          maxLength: 3
        reversed_amount:
          type: number
        flow:
          type: string
        status:
          $ref: '#/components/schemas/TransactionStatus'
        reason:
          type: string
        pg_name:
          type: string
          maxLength: 32
        pg_flow:
          $ref: '#/components/schemas/PGFlow'
        pg_charge_id:
          type: string
        pg_charge_status:
          $ref: '#/components/schemas/PGChargeStatus'
        pg_authentication_url:
          type: string
          format: uri
          description: Redirect URL Configured by PG
        pg_card_token:
          type: string
        of_channel_partner_reference:
          type: string
          description: >
            Reference ID to the transaction which is assigned by the Channel
            Partner that submit the transaction.
        payment_experience:
          type: string
          description: Payment experience of the instrument of the transaction
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      x-publishable: true
    CardResponse:
      type: object
      required:
        - id
        - redacted_number
      properties:
        id:
          type: string
          format: uuid
        customer_id:
          type: string
          format: uuid
        redacted_number:
          type: string
          minLength: 4
          maxLength: 16
        currency:
          type: string
        card_reference_id:
          type: string
        country:
          type: string
          minLength: 2
          description: Country of the Customer
        country_code:
          type: string
          minLength: 2
          maxLength: 2
          description: Country Code - ISO 3166 Alpha-2
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      x-publishable: true
    TransactionDetailsResponse:
      allOf:
        - $ref: '#/components/schemas/TransactionResponse'
        - type: object
          properties:
            transaction_details:
              $ref: '#/components/schemas/TransactionDetails'
            card:
              $ref: '#/components/schemas/CardResponse'
            raw_card_authorization_body:
              type: object
              description: Payment authorization data coming from Card Issuing Networks.
            pg_charge_response_body:
              type: object
              description: response body after a transaction charge by pg.
            transaction_metadata:
              $ref: '#/components/schemas/TransactionMetadata'
      x-publishable: true
    CardNetworkMerchantDetails:
      title: CardNetworkMerchantDetails
      type: object
      properties:
        merchant_id:
          type: string
          description: >-
            (Card Acceptor ID Code) identifies the card acceptor that defines
            the point of the transaction in both local and interchange
            environments. DE 42 is used as a merchant ID to uniquely identify
            the merchant in a POS transaction.
        category:
          type: string
          description: >-
            (Merchant Type) is the classification (card acceptor business
            code/merchant category code [MCC]) of the merchant’s type of
            business or service.
        name:
          type: string
          description: (Card Acceptor Name) is the merchant “doing business as” name.
        city:
          type: string
          description: (Card Acceptor City) indicates the city of the merchant.
        state:
          type: string
          description: >-
            (Card Acceptor State or Country Code) indicates the state or country
            code (if not U.S) of the merchant.
      x-publishable: true
    CardNetworkTransactionDetails:
      title: CardNetworkTransactionDetails
      type: object
      properties:
        card_reference_id:
          type: string
          description: Reference ID of the card network transaction
        system_trace_audit_number:
          type: string
          description: >-
            Systems Trace Audit Number (STAN) is a number a message initiator
            assigns to uniquely identify a transaction.
        approval_code:
          type: string
          description: Issuer bank approval code for the authorization
        transmission_at:
          type: string
          format: date-time
          description: Time that the transaction was entered into the Card Network.
        financial_network_code:
          type: string
          description: >-
            Identifies the specific program or service (for example, the
            financial network, financial program, or card program) with which
            the transaction is associated.
        banknet_reference:
          type: string
          description: >-
            Banknet Reference Number is generated by the Authorization Platform
            for each originating message it routes. Guaranteed to be a unique
            value for any transaction within the specified financial network on
            any processing day.
        transaction_amount:
          type: number
          description: The transaction amount in the Partner currency.
        billing_amount:
          type: number
          description: >-
            Cardholder billing amount indicates the transaction amount in the
            issuer's currency.
        billing_currency_code:
          type: string
          description: The currency code of the cardholder billing.
        merchant_details:
          $ref: '#/components/schemas/CardNetworkMerchantDetails'
        settlement_date:
          type: string
          format: date
          description: >-
            The reporting date to which a transaction applies. This is the UTC
            date that the authorization is processed, not the date on which
            settlement will occur.
        redacted_number:
          type: string
          pattern: ^[\S]*$
      x-publishable: true
    schemas-AccountTransactionChargedNotification:
      description: Notification for transaction charge
      type: object
      required:
        - transaction_id
      properties:
        transaction_id:
          type: string
          format: uuid
          description: OF Transaction ID
        tenant_reference_id:
          type: string
          description: Transaction reference ID provided by Tenant
        charged_at:
          type: string
          format: date-time
          description: Time stamp of transaction charge
        status:
          $ref: '#/components/schemas/TransactionStatus'
        card_network_transaction_details:
          $ref: '#/components/schemas/CardNetworkTransactionDetails'
      x-publishable: true
      example:
        transaction_id: cd992711-498f-47be-b636-cf2e3eaad936
        tenant_reference_id: BNPL123456890
        status: charged
        charged_at: '2021-11-06T04:26:47.450Z'
    ReverseActionType:
      type: string
      enum:
        - reversal
        - refund
    schemas-AccountTransactionReversedNotification:
      required:
        - transaction_id
        - tenant_reference_id
        - status
        - reversed_amount
      properties:
        transaction_id:
          type: string
          format: uuid
          description: Transaction ID
        tenant_reference_id:
          type: string
          description: Transaction reference ID provided by Tenant
        status:
          $ref: '#/components/schemas/TransactionStatus'
        reversed_at:
          type: string
          format: date-time
          description: Time stamp of transaction reverse
        reversed_amount:
          type: number
          description: Accumulated reversed amount
        billing_reversed_amount:
          type: number
          description: Accumulated reversed amount in billing currency
        reason:
          type: string
          description: Reason for reversal
        action_type:
          $ref: '#/components/schemas/ReverseActionType'
      x-publishable: true
      example:
        transaction_id: cd992711-498f-47be-b636-cf2e3eaad936
        tenant_reference_id: BNPL123456890
        status: reversed
        reversed_at: '2021-11-06T04:26:47.450Z'
        reversed_amount: 7500
        action_type: reversal
    schemas-AccountTransactionCreditedNotification:
      required:
        - transaction_id
        - status
        - credited_at
        - credited_amount
        - currency
        - billing_credited_amount
        - billing_currency
        - network_transaction_time
        - network_merchant_category_code
        - network_merchant_id
        - network_merchant_name
        - network_merchant_outlet_address
      properties:
        transaction_id:
          type: string
          format: uuid
          description: Transaction ID
        tenant_customer_ref:
          type: string
          description: Tenant customer ID
        tenant_link_ref:
          type: string
          description: Tenant link ID
        status:
          $ref: '#/components/schemas/TransactionStatus'
        credited_at:
          type: string
          format: date-time
          description: Time stamp of transaction credit
        credited_amount:
          type: number
          description: Accumulated credited amount
        currency:
          type: string
          description: Transaction currency
        billing_credited_amount:
          type: number
          description: Accumulated credited amount
        billing_currency:
          type: string
          description: Billing currency
        network_transaction_time:
          type: string
          format: date-time
        network_merchant_category_code:
          type: string
        network_merchant_id:
          type: string
        network_merchant_name:
          type: string
        network_merchant_outlet_address:
          type: string
      x-publishable: true
      example:
        transaction_id: cd992711-498f-47be-b636-cf2e3eaad936
        tenant_customer_ref: CUS23432898
        tenant_link_ref: PM-1293201980299030
        status: credited
        credited_at: '2021-11-06T04:26:47.450Z'
        credited_amount: 7500
        currency: PHP
        billing_credited_amount: 134.75
        billing_currency: USD
        network_transaction_time: '2021-11-04T00:00:00Z'
        network_merchant_category_code: '5812'
        network_merchant_id: W2E7JYS5UGIYXN1
        network_merchant_name: WWW.EMBARKLABS.ORG
        network_merchant_outlet_address: +6586866171 SG
    PbaClearingType:
      type: string
      enum:
        - final_auth
        - final_auth_reversal
        - final_auth_partial
        - final_auth_partial_reversal
        - pre_auth_partial
        - pre_auth_partial_reversal
        - pre_auth_final
        - pre_auth_final_reversal
        - final_auth_expiry
        - pre_auth_expiry
        - refund
        - refund_reversal
        - refund_expiry
        - chargeback_challenge
        - chargeback_challenge_reversal
        - chargeback
        - chargeback_reversal
        - fee_collection_credit
        - fee_collection_credit_reversal
        - fee_collection_debit
        - fee_collection_debit_reversal
        - unlinked_auth_partial
        - unlinked_auth_final
        - unlinked_auth_partial_reversal
        - unlinked_auth_final_reversal
        - unlinked_refund
        - unlinked_refund_reversal
        - unlinked_chargeback
    PbaTransferType:
      type: string
      enum:
        - consumer_debit
        - consumer_credit
        - ahi_debit
        - ahi_credit
    schemas-ClearingRecord:
      type: object
      required:
        - network_clearing_ref
        - type
        - transfer_type
        - is_potential_chargeback
        - network_merchant_name
        - network_merchant_outlet_address
        - network_merchant_id
        - amount
        - currency
        - billing_amount
        - billing_currency_code
        - billing_exchange_rate
        - settlement_amount
        - settlement_currency_code
        - settlement_exchange_rate
        - interchange_fee_amount
        - interchange_fee_currency_code
        - network_clearing_file_ref
        - network_clearing_file_name
        - network_clearing_timestamp
        - transaction_source
        - network_posting_file_id
        - network_acquirer_id
        - is_converted_pre_auth
      properties:
        network_clearing_ref:
          type: string
        type:
          $ref: '#/components/schemas/PbaClearingType'
        transfer_type:
          $ref: '#/components/schemas/PbaTransferType'
        is_potential_chargeback:
          type: boolean
        original_transaction_id:
          type: string
        transaction_id:
          type: string
          description: >-
            Transaction ID of this transaction itself. Used for action mapping
            workflow dispatch.
        network_transaction_ref:
          type: string
        network_acquirer_transaction_ref:
          type: string
        original_tenant_transaction_ref:
          type: string
        customer_id:
          type: string
        tenant_account_ref:
          type: string
        tenant_customer_ref:
          type: string
        network_merchant_name:
          type: string
        network_merchant_outlet_address:
          type: string
        network_merchant_id:
          type: string
        amount:
          type: number
        currency:
          type: string
        billing_amount:
          type: number
        billing_currency_code:
          type: string
        billing_exchange_rate:
          type: number
        settlement_amount:
          type: number
        settlement_currency_code:
          type: string
        settlement_exchange_rate:
          type: number
        interchange_fee_amount:
          type: number
        interchange_fee_currency_code:
          type: string
        network_clearing_file_ref:
          type: string
        network_clearing_file_name:
          type: string
        network_clearing_timestamp:
          type: string
        transaction_source:
          $ref: '#/components/schemas/PbaTransactionSource'
        network_posting_file_id:
          description: >-
            Mastercard's identifier of the GCMS file in which the transaction
            appeared
          type: string
        network_merchant_category_code:
          description: Type of services or goods the Merchant provides for the transaction
          type: string
        network_acquirer_id:
          description: Acquirer identification of the transaction
          type: string
        network_merchant_country_code:
          description: Country Code - ISO 3166 Alpha-2
          type: string
        is_converted_pre_auth:
          type: boolean
          description: Indicates if this is a converted pre-authorization transaction
        network_merchant_terminal_id:
          type: string
          description: ID of the Merchant Terminal
        network_merchant_city:
          type: string
          description: City of the Merchant Terminal
    ReconciliationAndNetSettlementSummary:
      type: object
      required:
        - network_settlement_file_ref
        - network_settlement_file_name
        - network_reconciliation_date
        - network_reconciliation_timestamp
        - interbank_settlement_date
        - transfer_currency_code
        - transfer_amount
        - transfer_type
        - transfer_payment_message_ref
        - transfer_end_to_end_ref
        - transfer_requested_exec_date
        - settlement_currency_code
        - total_net_recon_amount
        - total_credit_txn_amount
        - total_credit_number_of_txn
        - total_credit_chargeback_amount
        - total_credit_number_of_chargeback
        - total_credit_reversal_amount
        - total_credit_number_of_reversal
        - total_credit_interchange_fee_amount
        - total_debit_txn_amount
        - total_debit_number_of_txn
        - total_debit_chargeback_amount
        - total_debit_number_of_chargeback
        - total_debit_reversal_amount
        - total_debit_number_of_reversal
        - total_debit_interchange_fee_amount
        - network_settlement_timestamp
      properties:
        network_settlement_file_ref:
          type: string
        network_settlement_file_name:
          type: string
        network_reconciliation_date:
          type: string
        network_reconciliation_timestamp:
          type: string
        interbank_settlement_date:
          type: string
        transfer_currency_code:
          type: string
        transfer_amount:
          type: number
        transfer_type:
          $ref: '#/components/schemas/PbaTransferType'
        transfer_payment_message_ref:
          type: string
        transfer_end_to_end_ref:
          type: string
        transfer_requested_exec_date:
          type: string
        settlement_currency_code:
          type: string
        total_net_recon_amount:
          type: number
        total_credit_txn_amount:
          type: number
        total_credit_number_of_txn:
          type: number
        total_credit_chargeback_amount:
          type: number
        total_credit_number_of_chargeback:
          type: number
        total_credit_reversal_amount:
          type: number
        total_credit_number_of_reversal:
          type: number
        total_credit_interchange_fee_amount:
          type: number
        total_debit_txn_amount:
          type: number
        total_debit_number_of_txn:
          type: number
        total_debit_chargeback_amount:
          type: number
        total_debit_number_of_chargeback:
          type: number
        total_debit_reversal_amount:
          type: number
        total_debit_number_of_reversal:
          type: number
        total_debit_interchange_fee_amount:
          type: number
        total_number_of_auth:
          type: number
        total_number_of_auth_reversal:
          type: number
        network_settlement_timestamp:
          type: string
    SettlementRecordDetail:
      type: object
      required:
        - network_settlement_ref
        - type
        - transfer_type
        - is_potential_chargeback
        - network_merchant_name
        - network_merchant_outlet_address
        - network_merchant_id
        - network_settlement_file_ref
        - network_settlement_file_name
        - amount
        - currency
        - billing_amount
        - billing_currency_code
        - billing_exchange_rate
        - settlement_amount
        - settlement_currency_code
        - settlement_exchange_rate
        - interchange_fee_amount
        - interchange_fee_currency_code
        - network_settlement_timestamp
        - transaction_source
        - network_posting_file_id
        - network_acquirer_id
        - is_converted_pre_auth
      properties:
        network_settlement_ref:
          type: string
        type:
          $ref: '#/components/schemas/PbaClearingType'
        transfer_type:
          $ref: '#/components/schemas/PbaTransferType'
        is_potential_chargeback:
          type: boolean
        network_settlement_file_ref:
          type: string
        network_settlement_file_name:
          type: string
        original_transaction_id:
          type: string
        transaction_id:
          type: string
          description: >-
            Transaction ID of this transaction itself. Used for action mapping
            workflow dispatch.
        network_transaction_ref:
          type: string
        network_acquirer_transaction_ref:
          type: string
        original_tenant_transaction_ref:
          type: string
        customer_id:
          type: string
        tenant_customer_ref:
          type: string
        tenant_account_ref:
          type: string
        network_merchant_name:
          type: string
        network_merchant_outlet_address:
          type: string
        network_merchant_id:
          type: string
        amount:
          type: number
        currency:
          type: string
        billing_amount:
          type: number
        billing_currency_code:
          type: string
        billing_exchange_rate:
          type: number
        settlement_amount:
          type: number
        settlement_currency_code:
          type: string
        settlement_exchange_rate:
          type: number
        interchange_fee_amount:
          type: number
        interchange_fee_currency_code:
          type: string
        network_settlement_timestamp:
          type: string
        transaction_source:
          $ref: '#/components/schemas/PbaTransactionSource'
        network_posting_file_id:
          description: >-
            Mastercard's identifier of the GCMS file in which the transaction
            appeared
          type: string
        network_merchant_category_code:
          description: Type of services or goods the Merchant provides for the transaction
          type: string
        network_acquirer_id:
          description: Acquirer identification of the transaction
          type: string
        network_merchant_country_code:
          description: Country Code - ISO 3166 Alpha-2
          type: string
        is_converted_pre_auth:
          type: boolean
          description: Indicates if this is a converted pre-authorization transaction
        network_merchant_terminal_id:
          type: string
          description: ID of the Merchant Terminal
        network_merchant_city:
          type: string
          description: City of the Merchant Terminal
    SettlementRecords:
      type: object
      required:
        - reconciliationAndNetSettlementSummary
        - settlementRecordDetails
      properties:
        reconciliationAndNetSettlementSummary:
          $ref: '#/components/schemas/ReconciliationAndNetSettlementSummary'
        settlementRecordDetails:
          type: array
          items:
            $ref: '#/components/schemas/SettlementRecordDetail'
    PatStatus:
      type: string
      enum:
        - approved
        - failed
        - pending
        - revoked
    schemas-PreApprovedTransactionLinkApprovedNotification:
      required:
        - link_id
        - status
      properties:
        link_id:
          type: string
          format: uuid
        partner_link_ref:
          type: string
        tenant_link_ref:
          type: string
        status:
          $ref: '#/components/schemas/PatStatus'
        description:
          type: string
          description: Note about this PAT approval
        approved_at:
          type: string
          format: date-time
        card_fetch_token:
          type: string
      x-publishable: true
      example:
        link_id: 033ef8cb-b5f0-49d6-a10d-cfcff137207a
        partner_link_ref: CC-A3FNGL4B8PY32
        tenant_link_ref: PM-1293201980299030
        status: approved
        description: Monthly subscription for Netflix
        approved_at: '2023-02-06T04:26:47.450Z'
    schemas-PreApprovedTransactionLinkFailedNotification:
      required:
        - link_id
        - status
      properties:
        link_id:
          type: string
          format: uuid
        partner_link_ref:
          type: string
        tenant_link_ref:
          type: string
        status:
          $ref: '#/components/schemas/PatStatus'
        reason:
          type: string
          description: Detail about why this PAT failed
        failed_at:
          type: string
          format: date-time
      x-publishable: true
      example:
        link_id: 033ef8cb-b5f0-49d6-a10d-cfcff137207a
        partner_link_ref: CC-A3FNGL4B8PY32
        tenant_link_ref: PM-1293201980299030
        status: failed
        reason: consent not given
        failed_at: '2023-02-06T04:26:47.450Z'
    schemas-PreApprovedTransactionLinkRevokedNotification:
      required:
        - link_id
        - status
      properties:
        link_id:
          type: string
          format: uuid
        reason:
          type: string
        partner_link_ref:
          type: string
        tenant_link_ref:
          type: string
        status:
          $ref: '#/components/schemas/PatStatus'
        revoked_at:
          type: string
          format: date-time
      x-publishable: true
      example:
        link_id: 033ef8cb-b5f0-49d6-a10d-cfcff137207a
        partner_link_ref: CC-A3FNGL4B8PY32
        tenant_link_ref: PM-1293201980299030
        reason: customer removed consent
        revoked_at: '2023-02-06T04:26:47.450Z'
  examples:
    AccountNotificationSubscriptionRequestExample:
      value:
        type: webhook
        subscribed_events:
          - '*'
        config:
          url: https://sample-bnpl
          authConfig:
            header: X-API-Key
            value: HxMrzQBFbaDeLkUar87nczWNi
    AccountNotificationSubscriptionExample:
      value: *ref_1
    MerchantListExample:
      value:
        data:
          - id: 4fde45e1-6e4f-4039-a8de-bb316a4adeb8
            name: Lazada
            slug: lazada
            tenant_partner_id: 4fde45e1-6e4f-4039-a8de-bb316a4adeb8
            website_url: https://www.lazada.co.th/
            email: admin@lazada.co.th
          - id: 9c9a3084-772b-4ef9-9b7a-46ea5d9d33a1
            name: Airpay
            slug: airpay
            tenant_partner_id: 4fde45e1-6e4f-4039-a8de-bb316a4adeb8
            website_url: https://www.airpay.com/
            email: admin@airpay.com
          - id: 96a0c342-88b5-4fb2-98e7-f5b217f2f14b
            name: Grab
            slug: grab
            tenant_partner_id: 4fde45e1-6e4f-4039-a8de-bb316a4adeb8
            website_url: https://www.grab.com/
            email: admin@grab.com
        metadata:
          page_size: 10
          page: 1
          total_pages: 1
          total: 3
    CreatedMerchantsExample:
      value:
        id: 4fde45e1-6e4f-4039-a8de-bb316a4adeb8
        name: Lazada
        tenant_partner_id: 4fde45e1-6e4f-4039-a8de-bb316a4adeb8
        slug: lazada
        website_url: https://www.lazada.co.th/
    MerchantExample:
      value:
        id: 4fde45e1-6e4f-4039-a8de-bb316a4adeb8
        tenant_partner_id: 4fde45e1-6e4f-4039-a8de-bb316a4adeb8
        name: Lazada
        slug: lazada
        website_url: https://www.lazada.co.th/
        email: admin@lazada.co.th
    SuccessMessage:
      value:
        message: ok
    UpdateMerchantRequestExample:
      value:
        tenant_partner_id: 4fde45e1-6e4f-4039-a8de-bb316a4adeb8
        name: Lazada
        website_url: https://www.lazada.co.th/
        email: admin@lazada.co.th
    MerchantCredentialExample:
      value:
        alias: default
        client_id: id119i9d8ekasjc9x
        client_secret: secret3jjsj3jdjk2jkesk
    MerchantNotificationSubscriptionRequestExample:
      value:
        type: webhook
        subscribed_events:
          - '*'
        config:
          url: https://sample-merchant
          authConfig:
            header: X-API-Key
            value: HxMrzQBFbaDeLkUar87nczWNi
    MerchantNotificationSubscriptionExample:
      value:
        id: cd992711-498f-47be-b636-cf2e3eaad935
        tenant_id: 00fcf093-71fb-4349-8c0b-de810480d6b1
        partner_id: 00fcf093-71fb-4349-8c0b-de810480d6b2
        type: webhook
        subscribed_events:
          - '*'
        config:
          url: https://sample-merchant
          authConfig:
            header: X-API-Key
            value: HxMrzQBFbaDeLkUar87nczWNi
    PGCredentialsExample:
      value: *ref_2
    WidgetMetadataExample:
      value:
        - iframe_url: https://of-test-1.sp.dev.openfabric.co/iw
          widget_access_token: accessToken
          code_snippet: <iframe/>
          type: whitelabel
        - iframe_url: https://of-test-1.sp.dev.openfabric.co/iw2
          widget_access_token: accessToken2
          code_snippet: <iframe/>
          type: net-settlement
    ClientTransactionRequestExample:
      value:
        partner_reference_id: P1293201980299030
        tenant_id: 00fcf093-71fb-4349-8c0b-de810480d6b1
        partner_redirect_success_url: >-
          https://sample-merchant-flow.dev.openfabric.co?id=f0398e5-d045-441f-b130-bcd517964775&state=PAID
        partner_redirect_fail_url: >-
          https://sample-merchant-flow.dev.openfabric.co?id=f0398e5-d045-441f-b130-bcd517964775&state=CANCELLED
        customer_info:
          mobile_number: '+6587654321'
          first_name: BNPL
          last_name: Developer
          email: developer@bnpl1.com
          partner_reference_id: cd992711-498f-47be-b636-cf2e3eaad935
        amount: 120.1
        currency: SGD
        transaction_details:
          shipping_address:
            country: Singapore
            country_code: SG
            address_line_1: 80 Robinson Road
            address_line_2: '#09-01'
            address_line_3: '#09-01'
            post_code: '068898'
          billing_address:
            country: Singapore
            country_code: SG
            address_line_1: 80 Robinson Road
            address_line_2: '#09-01'
            address_line_3: '#09-01'
            post_code: '068898'
          items:
            - item_id: P100
              name: iPhone
              price: 11020
              quantity: 1
              variation_name: Black, 128GB
              original_price: 12020
              categories:
                - Electronics
            - item_id: P101
              name: iPhone SE case
              price: 1000
              quantity: 1
              variation_name: White
              categories:
                - Accessories
          tax_amount: 390.6
          shipping_amount: 1020
          original_amount: 13020
    ClientTransactionResponseExample:
      value: *ref_0
    TransactionRefundRequestExample:
      value:
        amount: 10.1
        reason: Out of goods
    MerchantConfigUpdateResponseExample:
      value:
        webhook:
          id: cd992711-498f-47be-b636-cf2e3eaad935
          tenant_id: 00fcf093-71fb-4349-8c0b-de810480d6b1
          partner_id: 00fcf093-71fb-4349-8c0b-de810480d6b2
          type: webhook
          subscribed_events:
            - '*'
          config:
            url: https://sample-merchant
            authConfig:
              header: X-API-Key
              value: HxMrzQBFbaDeLkUar87nczWNi
        payment_gateway:
          id: 143334c3-1b7d-433a-939a-f63c9022f800
          tenant_id: 00fcf093-71fb-4349-8c0b-de810480d6b1
          partner_id: 00fcf093-71fb-4349-8c0b-de810480d6b2
          pg_name: xendit
          credential_format: api_key_pair
          redacted_credentials:
            api_key_pair:
              public_api_key: aDSlnuizcvjsdl89ucIOasdzxczxczxckjzxkcjzsODMz
              private_api_key: aDSlnuizcvjsdl89ucIOasdzxczxczxckjzxkcjzsODMz
    FullCardDetails:
      value:
        provider: mastercard
        card_reference_id: '7743087'
        card_number: '5281724086788282'
        redacted_number: XXXXXXXXXXXX8282
        cvv: '1111'
        expiry_month: '12'
        expiry_year: '25'
        message: S
    UpdateTransactionFailedExample:
      value:
        tenant_reference_id: cd992711-498f-47be-b636-cf2e3eaad935
        status: approved
    UpdateTransactionApprovedExample:
      value:
        tenant_reference_id: cd992711-498f-47be-b636-cf2e3eaad935
        status: approved
    TransactionResponseExample:
      value:
        id: ff0398e5-d045-441f-b130-bcd517964775
        partner_reference_id: P1293201980299030
        tenant_reference_id: cd992711-498f-47be-b636-cf2e3eaad935
        tenant_partner_id: 27666828-57f9-4709-a9a9-84167e091f5f
        tenant_id: 00fcf093-71fb-4349-8c0b-de810480d6b1
        partner_id: 9bde4fbf-893b-49f9-b7b3-4079a76bb362
        partner_name: Lazada
        customer_id: 88db7aa7-2cdd-42cc-9827-8d46f936ef79
        partner_redirect_success_url: >-
          http://sample-merchant-flow.openfabric.co?id=f0398e5-d045-441f-b130-bcd517964775&state=PAID
        partner_redirect_fail_url: >-
          http://sample-merchant-flow.openfabric.co?id=f0398e5-d045-441f-b130-bcd517964775&state=CANCELLED
        gateway_fail_url: http://of-gateway
        gateway_success_url: >-
          http://of-gateway.s3-website-ap-southeast-1.amazonaws.com?reference_id=P1293201980299030&state=PAID
        customer_info:
          mobile_number: '+6587654321'
          first_name: postpebnpl
          last_name: developer
          country: Singapore
          country_code: SG
          email: developer@bnpl1.com
        amount: 120.1
        currency: SGD
        status: created
        card_reference_id: '7743087'
        created_at: '2021-11-06T04:26:47.450Z'
        updated_at: '2021-11-06T04:26:47.450Z'
    TransactionDetailsExample:
      value:
        id: ff0398e5-d045-441f-b130-bcd517964775
        partner_reference_id: P1293201980299030
        tenant_reference_id: Tenant-cd992711-498f-47be-b636-cf2e3eaad935
        tenant_partner_id: 27666828-57f9-4709-a9a9-84167e091f5f
        tenant_id: 00fcf093-71fb-4349-8c0b-de810480d6b1
        partner_id: 9bde4fbf-893b-49f9-b7b3-4079a76bb362
        partner_name: Lazada
        partner_redirect_success_url: >-
          http://sample-merchant-flow.openfabric.co?id=f0398e5-d045-441f-b130-bcd517964775&state=PAID
        partner_redirect_fail_url: >-
          http://sample-merchant-flow.openfabric.co?id=f0398e5-d045-441f-b130-bcd517964775&state=CANCELLED
        gateway_fail_url: http://of-gateway
        gateway_success_url: >-
          http://of-gateway.s3-website-ap-southeast-1.amazonaws.com?reference_id=P1293201980299030&state=PAID
        payment_redirect_web_url: http://sample-bnpl-web.openfabric.co
        card:
          id: 62f321a3-7f34-4a18-a556-9e00fdc22467
          customer_id: 62f321a3-7f34-4a18-a556-9e00fdc22467
          redacted_number: '1111'
          country: USA
          country_code: US
        customer_id: 88db7aa7-2cdd-42cc-9827-8d46f936ef79
        customer_info:
          mobile_number: '+6587654321'
          first_name: postpebnpl
          last_name: developer
          country: Singapore
          country_code: SG
          email: developer@bnpl1.com
        amount: 120.1
        currency: SGD
        status: failed
        card_reference_id: '7743087'
        created_at: '2021-11-06T04:26:47.450Z'
        updated_at: '2021-11-06T04:26:47.450Z'
        transaction_details:
          shipping_address:
            country: Singapore
            country_code: SG
            address_line_1: 80 Robinson Road
            address_line_2: '#09-01'
            address_line_3: '#09-01'
            post_code: '068898'
          billing_address:
            country: Singapore
            country_code: SG
            address_line_1: 80 Robinson Road
            address_line_2: '#09-01'
            address_line_3: '#09-01'
            post_code: '068898'
          items:
            - item_id: P100
              name: iPhone
              price: 11020
              quantity: 1
              variation_name: Black, 128GB
              original_price: 12020
              categories:
                - Electronics
            - item_id: P101
              name: iPhone SE case
              price: 1000
              quantity: 1
              variation_name: White
              categories:
                - Accessories
          tax_amount: 390.6
          shipping_amount: 1020
          original_amount: 13020
