Synchronous Payment

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

Usage Flow:

  1. Call POST request to: http://localhost:8003/api/transactions/init/sync Use the same schema as - Create a transaction

  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
}

Last updated