Instore (Order Status using PayBrightReference)

Overview

This API call provides status of a PayBright Order. You will need to use the PayBrightReference code returned as a response to SMS plus Email API to get the status.

If you get a status of "1" as a response to the API, it means that the customer was approved by PayBright and you can complete the purchase. If you receive status of "0" this means that the customer was either not approved or they have not completed the application process yet

Fetching the Order Status

Our In Store APIs use Basic Authorization, You can use create the Authorization Key using the API Key and Token shared with you by PayBright.

🚧

Security Token

Authorization Key will be a Base 64 encoding of APIKey:APIToken string e.g.

If API Key == txtzmjUfVsfEctvnBCjW and API Token == fd5jyxjSLLNwFPZTCfko
Then the formatting will be txtzmjUfVsfEctvnBCjW:fd5jyxjSLLNwFPZTCfko

Use https://www.base64encode.org/ for testing the Base64 encoding you create

In this example, this will result in the Key being:
dHh0em1qVWZWc2ZFY3R2bkJDalc6ZmQ1anl4alNMTE53RlBaVENma28=

This request does not need body as PayBright Reference is passed in the URL

πŸ“˜

v.2 Updated API URL

The new API url for Instore (Order Status using PayBrightReference) is:
Sandbox:
https://sandbox.api.paybright.com/api/v2/instore/{PayBrightReference}/status/
Production:
https://api.paybright.com/api/v2/instore/{PayBrightReference}/status/

curl --location --request POST 'https://sandbox.api.paybright.com/api/v2/instore/354e627d-5bb0-41f1-9ab3-e90db7e8de88/status/' \
--header 'Authorization: Basic dHh0em1qVWZWc2ZFY3R2bkJDalc6ZmQ1anl4alNMTE53RlBaVENma28=' \
--header 'Content-Type: application/json' \
--data-raw ''

You should receive a response containing final status of a customer application as shown below.

  • Status == PENDING means SMS/Email link is sent to the customer and the customer has not yet completed the Application
  • Status == AUTHORIZED means that the customer application was Authorized and you can Capture it.

Following two statuses are only applicable to merchants that are making two different API calls to first Authorize a transaction and then to Capture it once the item is shipped.

  • Status == CAPTURED_FULL means transaction has been fully captured
  • Status == CAPTURED_PARTIAL means transaction has been partially captured (Pin4 only)
{
    "GatewayReference": "67817",
    "PayBrightReference": "354e627d-5bb0-41f1-9ab3-e90db7e8de88",
    "Status": "AUTHORIZED"
}

GatewayReference is a unqiue identified for this order in PayBright. Please save this number as it will be used in Refund API. This will also be used in Capture API for merchants capturing transactions on shipment.