This endpoint returns the latest Payment Request that matches the given short code.
barcodestringScanned Code used to create the Payment Request. Required when the Quick Pay payment flow is used.basketAmountbignumberThe total amount of the transaction including non Centrapay payment methods. Required whenpartialAllowedistrue.CANCELLED_BY_MERCHANTThe merchant cancelled the Payment Request by calling the cancel or void endpoint.CANCELLED_BY_PATRONThe patron cancelled the transaction.DECLINED_BY_MERCHANTThe payment was declined by the merchant during approval steps.DECLINED_BY_PATRONThe payment was declined by the patron during approval steps.INACTIVE_ASSETThe asset used to pay the Payment Request is inactive.NO_AVAILABLE_PAYMENT_OPTIONSNo payment options match the requested payment parameters.PATRON_CODE_EXPIREDThe patron code on the Payment Request has expired.PATRON_CODE_INVALIDThe patron code on the Payment Request was invalid.PAYMENT_DECLINEDThe payment parameters were valid but payment was declined because additional payment restrictions were violated. For example, asset not active, asset overdrawn, quota exceeded or line item category restrictions.PAYMENT_FAILEDThe Payment Request failed for an unknown reason.PAYMENT_REQUEST_EXPIREDThe Payment Request has expired.
lineItemsarray of objectsThe Line Items being paid for. Line Item currency and units are consistent with the Payment Request value, and the sum of Line Item prices should equal the Payment Request value.typeenumThe classification type. See GS1 Global Product Classification. WhenGS1is used as the product classification type then the product code should be the GPC product brick identifier.
discountbignumberDiscount amount in cents (tax exclusive). A discount that applies to multiple Line Items may be represented as a separate Line Item with a negative amount.pricebignumberThe total price in cents for the line item (eg.price = product price * qty - discounts + tax). EitherpriceorunitPriceis required; if both are supplied,pricetakes priority.
merchantConditionsarray of objectsA dynamic list of Payment Conditions that require operator approval to complete a payment. Some Asset Types require conditional approval, such as confirming proof of ID or a promotional item purchase. Conditions are calculated when polling a Payment Request, and can be accepted or declined - a declined condition cancels the Payment Request.paidByobjectShows the Paid By - a summary of the transactions - when a Payment Request is paid for with multiple Assets.typeenumThe classification type. See GS1 Global Product Classification. WhenGS1is used as the product classification type then the product code should be the GPC product brick identifier.
discountbignumberDiscount amount in cents (tax exclusive). A discount that applies to multiple Line Items may be represented as a separate Line Item with a negative amount.pricebignumberThe total price in cents for the line item (eg.price = product price * qty - discounts + tax). EitherpriceorunitPriceis required; if both are supplied,pricetakes priority.
paymentOptionsarray of objectsThe Payment Options, indicating valid asset for payment. ⭐️ For Payment Options which specify an address, a transaction on an external ledger is required - once made, use the transaction id to Pay a Payment Request.acceptedCollectionsarray of objectsAccepted Collections for the Payment Request, when the “assetType” iscentrapay.token.*. They can be used to determine whether a Centrapay Token can be used to pay the Payment Request, and which Line Items can be purchased using the Token.lineItemsarray of objectsThe Line Items that can be purchased by a Centrapay Token with matching collection id.typeenumThe classification type. See GS1 Global Product Classification. WhenGS1is used as the product classification type then the product code should be the GPC product brick identifier.
discountbignumberDiscount amount in cents (tax exclusive). A discount that applies to multiple Line Items may be represented as a separate Line Item with a negative amount.pricebignumberThe total price in cents for the line item (eg.price = product price * qty - discounts + tax). EitherpriceorunitPriceis required; if both are supplied,pricetakes priority.
redirectCancelUrlstringexperimentalURL to redirect the user to after they cancel the Payment Request. Must start with one of the allowedRedirectUrls for the Merchant Config.redirectPaidUrlstringexperimentalURL to redirect the user to after they pay the Payment Request. Must start with one of the allowedRedirectUrls for the Merchant Config.
errorstringThe name of the HTTP status. AlwaysBad Request.messageenumThe error code, or for a 400 a description of what's wrong with the request.Bad RequestThe request is malformed or missing required fields. The message says what's wrong, egamount is required. See 400 Malformed Request.CHECKSUM_FAILEDLuhn checksum digit doesn't pass.
statusCodeintegerThe HTTP status code. Always400.
errorstringThe name of the HTTP status. AlwaysUnauthorized.messageenumThe error code, or for a 400 a description of what's wrong with the request.Missing authenticationAPI key or JWT is missing, expired or invalid. See Auth.
statusCodeintegerThe HTTP status code. Always401.
errorstringThe name of the HTTP status. AlwaysForbidden.messageenumThe error code, or for a 400 a description of what's wrong with the request.ForbiddenThe resource doesn't exist, or your user or API key doesn't have permission to access it. See 403 Forbidden.
statusCodeintegerThe HTTP status code. Always403.
errorstringThe name of the HTTP status. AlwaysNot Found.messageenumThe error code, or for a 400 a description of what's wrong with the request.Not FoundThe route doesn't exist. Check the URL and HTTP method against the examples. See 404 Route Not Found.
statusCodeintegerThe HTTP status code. Always404.
errorstringThe name of the HTTP status. AlwaysToo Many Requests.messageenumThe error code, or for a 400 a description of what's wrong with the request.RATE_LIMIT_EXCEEDEDCentrapay API rate limits have been exceeded. See Rate Limits.
statusCodeintegerThe HTTP status code. Always429.
errorstringThe name of the HTTP status. AlwaysInternal Server Error.messageenumThe error code, or for a 400 a description of what's wrong with the request.An internal server error occurredSomething went wrong on our end. Retrying should solve the issue. See 5xx Server Error.
statusCodeintegerThe HTTP status code. Always500.
curl -X GET https://service.centrapay.com/api/payment-requests/short-code/CP-C7F-ZS5 \-H 'x-api-key: <TOKEN>'{ "barcode": "9990001234567895", "configId": "5efbe2fb96c08357bb2b9242", "connectionId": "cn_9asd9k19", "connectionStatus": "active", "createdAt": "2021-06-08T04:04:27.426Z", "expiresAt": "2021-06-08T04:06:27.426Z", "expirySeconds": 120, "id": "MhocUmpxxmgdHjr7DgKoKw", "liveness": "test", "merchantConditions": [], "merchantId": "26d3Cp3rJmbMHnuNJmks2N", "merchantName": "Centrapay Café", "patronCodeId": "V17FByEP9gm1shSG6a1Zzx", "paymentOptions": [ { "amount": "100", "assetType": "centrapay.nzd.test" } ], "shortCode": "CP-C7F-ZS5", "status": "new", "updatedAt": "2021-06-08T04:04:27.426Z", "url": "https://app.centrapay.com/pay/MhocUmpxxmgdHjr7DgKoKw", "value": { "amount": "100", "currency": "NZD" }}{ "error": "Bad Request", "message": "CHECKSUM_FAILED", "statusCode": 400}{ "error": "Unauthorized", "message": "Missing authentication", "statusCode": 401}{ "error": "Forbidden", "message": "Forbidden", "statusCode": 403}{ "error": "Not Found", "message": "Not Found", "statusCode": 404}{ "error": "Too Many Requests", "message": "RATE_LIMIT_EXCEEDED", "statusCode": 429}{ "error": "Internal Server Error", "message": "An internal server error occurred", "statusCode": 500}