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

# Check Saved Payment

> Payment gateway check existing saved payment status. (Only for TNG)



## OpenAPI

````yaml /openapi.json post /api/services/app/PaymentGateway/CheckSavedPayment
openapi: 3.0.1
info:
  title: CommercePay API
  version: v1
  description: >
    ---

    **Credentials Accounts**


    Every account is provided with separate keys for testing and for running
    live transactions. Once the merchant application has been approved,
    developers can begin the process of integrating the CommercePay API. The
    following details will be provided to get started with the integration. 


    <a href="https://docs.commercepay.asia/docs/api/d19b0f3289ae0-get-started"
    target="_blank">Get Started</a>
  contact: {}
servers:
  - description: Staging
    url: https://staging-payments.commerce.asia
  - url: https://payments.commerce.asia
    description: Production
security: []
paths:
  /api/services/app/PaymentGateway/CheckSavedPayment:
    post:
      tags:
        - PaymentGateway
      summary: Check Saved Payment
      description: Payment gateway check existing saved payment status. (Only for TNG)
      operationId: ApiServicesAppPaymentgatewayChecksavedpaymentPost
      parameters:
        - $ref: '#/components/parameters/AbpTenantId'
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/CapSignature'
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/CheckSavedPaymentInputDto'
          application/json:
            schema:
              $ref: '#/components/schemas/CheckSavedPaymentInputDto'
          text/json:
            schema:
              $ref: '#/components/schemas/CheckSavedPaymentInputDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CheckSavedPaymentInputDto'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckSavedPaymentOutputDto'
              examples:
                Example 1:
                  value:
                    isSavedPayment: true
                    maskedAccountNumber: string
            text/json:
              schema:
                $ref: '#/components/schemas/CheckSavedPaymentOutputDto'
            text/plain:
              schema:
                $ref: '#/components/schemas/CheckSavedPaymentOutputDto'
components:
  parameters:
    AbpTenantId:
      schema:
        type: string
      in: header
      name: Abp-TenantId
      required: true
      description: Your unique Merchant ID assigned by CommercePay.
    Authorization:
      schema:
        type: string
      in: header
      name: Authorization
      required: true
      description: Your API credentials used for authentication (typically a Bearer token).
    CapSignature:
      schema:
        type: string
      in: header
      name: cap-signature
      required: true
      description: >-
        A unique security hash used to verify the integrity of the request body.
        See [Generate Signature](/docs/generate-signature) for how to generate
        this.
  schemas:
    CheckSavedPaymentInputDto:
      type: object
      additionalProperties: false
      required:
        - uniqueAccountId
      properties:
        uniqueAccountId:
          type: string
          description: Transaction Username
        channelId:
          type: integer
          format: int32
          description: >-
            An identifier that represents a CommercePay payments channel Refer
            id on response end points [Get Channel
            List](/api-reference/get-tenant-channels-by-country)
        tenantId:
          type: integer
          format: int32
          description: Fill in provided Tenant Id
          nullable: true
        timestamp:
          type: integer
          format: int64
          description: new Date().getTime()
          example: 1621851652617
    CheckSavedPaymentOutputDto:
      type: object
      additionalProperties: false
      properties:
        isSavedPayment:
          type: boolean
          description: Saved user info for subsequent payment.
        maskedAccountNumber:
          type: string
          description: >-
            Masked account number.

            Example: (Phone Number: 60XXXXX123), (Credit Card
            Number:43******1234) 
          nullable: true

````