LogoLogo
  • Transaction API
    • Overview
    • Authentication
    • Payment Methods
    • Integrations
      • POS (In-Store)
      • E-commerce
    • Payment Flows
      • Create a transaction
        • Examples for POS (In-Store)
          • Basic Payment Request
          • Payment request with products
          • Payment request with callback
          • Payment request with POS Data
          • SMS Payment Request
          • Email Payment Request
          • Payment request with invoice
          • Payment request with receipt generated by SensePass
          • Payment request with receipt generated by the POS
        • Examples for e-commerce
          • Basic Payment Request
          • iFrame Example
          • Payment request with products
          • Payment request with callback
          • Payment request with website custom data
          • SMS Payment Request
          • Email Payment Request
          • Payment request with invoice
          • Payment request with receipt generated by SensePass
          • Payment request with receipt generated by the e-commerce platform
      • Transaction status
      • Authorization
      • Tokenization
      • Subscription
        • Fetch a subscription
        • Update a subscription
        • Subscription callbacks
      • Cancel a pending transaction
      • Refund a transaction
      • Pay by Credit Card
      • Credit by Credit Card
      • Payment Commit
      • Update a Transaction
    • Other Flows
      • Tags Pairing
      • Receipts
      • Customer Input
      • Token Migration
      • Create Dynamic QR
    • Terminal Agent
      • Installation
      • Pairing
      • Usage
        • Synchronous Payment
        • Real-time product information update
        • Get Last Transaction Status
        • Get Device ID
    • Settlement
    • API Notifications
      • Socket.IO Websockets
      • Callback/Webhook
      • Post Message
    • Flow Charts
      • Payment Flow
      • Transaction Status Flow
    • SDK & iFrames
      • JavaScript UI SDK
        • API
        • Commit Transaction
        • Custom SDK Style
        • Simulator
        • Manual Capture (deprecated)
      • E-commerce iFrame
      • POS iFrame
      • Credit Card iFrame
    • Models
      • Receipts Model
      • Metadata Model
      • SDK Theme Config Model
      • SDK Credit Card Field Model
      • Invoice Model
      • Product Model
      • Payment Details Model
      • Receipt Notifications Model
      • Payment Commit Model
      • Confirmation Model
      • Settlement Model
      • Subscription Model
      • Transaction Page Model
      • Transaction Model
      • Customer Input Model
      • Settlement Report Model
      • Customer Shipping/Billing Details Model
      • Additional Data Model
    • SOAP and XML
      • SOAP
      • XML
    • Testing
    • Postman
  • Partner API
    • Models
      • Onboarding Model
      • Onboarding Configuration Pages
      • Onboarding Status Model
    • SDK & iFrames
      • Onboarding iFrame
    • Flows
      • Create onboarding
      • Get Onboarding Configuration Page
      • Onboarding status
Powered by GitBook
On this page
  • Usage Flow:
  • Example

Was this helpful?

Export as PDF
  1. Transaction API
  2. Terminal Agent
  3. Usage

Synchronous Payment

Last updated 1 year ago

Was this helpful?

Terminal Agent expose synchronous payment request call that reduce the integration time and logics.

Usage Flow:

  1. Call POST request to: Use the same schema as -

  2. DeviceId field is not required - Terminal agent will append it automatically

  3. Cancelling the payment request can be done using cancelling the HTTP request from #1

  4. On final result (Approve, timeout or Cancel) - you will get response to this request

Example

URL: http://localhost:8003/api/transactions/init/sync

Request Body:

{
    "amount": 100,
    "timeOut": 500,
    "currency": "USD",
    "isCent": true
} 

Response body:

{
    "TransactionNumber": "1dde6de24cb4b96678517350c075a3e89a4103ed3132b3444ee055ed",
    "date": "2024-04-17T19:50:33.588Z",
    "amount": "1",
    "baseAmount": "1",
    "currency": "USD",
    "status": 5,
    "statusName": "Transaction Approved",
    "timeoutDate": "2024-04-17T19:58:53.820Z",
    "maxInstallments": 1,
    "reason": null,
    "paymentCommit": {
        "messsage": "Please Commit this payment in 7200 seconds",
        "secondsToCommit": 7200,
        "commitLink": "https://api.sandbox.sensepass.com/api/transactions/commitPayment/1dde6de24cb4b96678517350c075a3e89a4103ed3132b3444ee055ed"
    },
    "methodType": 0,
    "businessId": "91878198955101",
    "businessName": "SensePass",
    "pos": "SensePass",
    "businessOwnerPhone": "113654",
    "businessCountry": "USA",
    "businessCity": "A",
    "businessState": "B",
    "businessStreet": "NY",
    "businessAddress": "NY",
    "locale": {
        "language": "en"
    },
    "products": [],
    "productsSum": {
        "allAmountSum": "0.00",
        "allTipSum": "NaN",
        "allVatSum": "0.00",
        "allTotalSum": "0.00",
        "allDiscountSum": "0.00",
        "allDiscountedAmountSum": "0.00"
    },
    "paymentProcessRequestID": "5330731519",
    "confirmation": {
        "approvedBy": "Shift4 Sandbox",
        "dateApproval": "2024-04-17T19:50:44.964Z",
        "approvalDate": "2024-04-17T19:50:44.964Z",
        "paymentType": "Regular",
        "sensePassReferenceId": "d4t9xyubad5geoj1c2yc",
        "paymentMethodName": "Credit Card (Sensepass PCI)",
        "providerId": "bmU4Ip5koVvi8harpkh5WW50BEQj7FpdNJhWkTMEbqQ=",
        "authNumber": null,
        "acquirer": null,
        "voucher": null,
        "referenceNumber": null,
        "requestID": "5330731519",
        "amount": 1,
        "confirmationNumber": "297-OK522Z",
        "fullConfirmationCode": "297-OK522Z",
        "providerName": "Shift4 Sandbox",
        "cardType": "VISA",
        "lastFourDigits": "1111",
        "cardMask": "411111******1111",
        "expiration": "1234",
        "cardExpiration": "1234",
        "installments": 1,
        "paymentMethod": "Credit Card",
        "Credit Card": {
            "cardType": "VISA",
            "lastFourDigits": "1111",
            "mask": "411111******1111",
            "expiration": "1234"
        },
        "extraDetails": {
            "email": null
        }
    },
    "confirmationNumber": "297-OK522Z",
    "confirmations": [
        {
            "approvedBy": "Shift4 Sandbox",
            "dateApproval": "2024-04-17T19:50:44.964Z",
            "approvalDate": "2024-04-17T19:50:44.964Z",
            "paymentType": "Regular",
            "sensePassReferenceId": "d4t9xyubad5geoj1c2yc",
            "paymentMethodName": "Credit Card (Sensepass PCI)",
            "providerId": "bmU4Ip5koVvi8harpkh5WW50BEQj7FpdNJhWkTMEbqQ=",
            "authNumber": null,
            "acquirer": null,
            "voucher": null,
            "referenceNumber": null,
            "requestID": "5330731519",
            "amount": 1,
            "confirmationNumber": "297-OK522Z",
            "fullConfirmationCode": "297-OK522Z",
            "providerName": "Shift4 Sandbox",
            "cardType": "VISA",
            "lastFourDigits": "1111",
            "cardMask": "411111******1111",
            "expiration": "1234",
            "cardExpiration": "1234",
            "installments": 1,
            "paymentMethod": "Credit Card",
            "Credit Card": {
                "cardType": "VISA",
                "lastFourDigits": "1111",
                "mask": "411111******1111",
                "expiration": "1234"
            },
            "extraDetails": {
                "email": null
            }
        }
    ],
    "balance": 1,
    "paymentMethodImages": {},
    "clientPhoneNumber": null,
    "clientEmail": null
}

http://localhost:8003/api/transactions/init/sync
Create a transaction