Follow

GET /smartterminals/requests/{requestPaymentId}

BETA:

The following API is still in beta. PayJunction is actively seeking integration partners whom need to use this API to support native applications. If you would like to participate please open a developer support ticket and let us know.

Gets the status of a Smart Terminal payment request by querying the requestPaymentId returned by POST /smartterminals/{smartterminalId}/request-payment

Query Limits

The status of a payment request can be queried up to 1 day after the Smart Terminal payment request has been completed. After this cut off the requestPaymentId is purged and will return a 404 Not Found when queried. 

In order to discourage busy polling, requests to this endpoint are rate limited to 1 request every 2 seconds per request

Example Request

curl -H "X-PJ-Application-Key:88888888-4444-4444-4444-cccccccccccc" \
-u "login:password" \
"http://www.payjunctionlabs.com/trinity/api/smartterminals/requests/b58cb128-2e99-4da8-b93e-711f1fc7d5db"

Example Responses

Pending Example

{
    "status" : "PENDING"
}

Note that we do not have a transactionId yet because the payment is still pending.

Complete Example

{
    "status" : "COMPLETE",
    "transactionId" : 349
}

Purged or Invalid requestPaymentId Example

HTTP Response Code: 404

{
    "errors" : [{
        "message" : "404 Not Found"
    }]
}

Rate Limit Example

HTTP Response Code: 429

{
    "errors" : [{
        "message" : "Your request has been rate limited. Please wait longer between subsequent requests."
    }]
}