Instore (SMS plus Email to customer)

Overview

This API call sends a text message and an email to the customer with a link to complete the purchase on their mobile device or laptop. The API also responds with a PayBright reference that can be used by your Store Representatives to get the status of Customer Application in order to capture the order.

Customers will click on a link in the SMS or Email which will open a simple PayBright application and guide your customer through the application process. Once the customer finishes the application you can use the PayBright reference to get the status before Capturing the transaction.

Customer SMS and Email

SMS and Email received by the Customer has a shortened URL to the PayBright application as shown below:

Customer will go through the normal E-Commerce application once they click on the PayBright link sent to their phone and email address.

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

🚧

Security Token

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

If API Key == Z9s7Yt0Txsqbbx and API Token == W5wWvctuk3mjs9WW5A4VgW5wrtR

You need to create a Base 64 Encoding of Z9s7Yt0Txsqbbx:W5wWvctuk3mjs9WW5A4VgW5wrtR

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

📘

v.2 Updated API URL

The new API url for Instore (SMS plus Email to customer) is:
Sandbox: https://sandbox.api.paybright.com/api/v2/instore/
Production: https://api.paybright.com/api/v2/instore/

curl --location --request POST 'https://sandbox.api.paybright.com/api/v2/instore/' \
--header 'Authorization: Basic dHh0em1qVWZWc2ZFY3R2bkJDalc6ZmQ1anl4alNMTE53RlBaVENma28=' \
--header 'Content-Type: application/json' \
--data-raw '{
    "AccountID": "WVejbO48xRDKuSEY5fzd7dOtJRpvnzOVGT5fyht4abNUgn8cRQ",
    "MobileNumber": "5196151111",
    "PurchaseAmount": "1417.99",
    "Email": "[email protected]",   // Optional
    "customerFirstName": "Jamie", // Optional
    "customerLastName": "Smith", // Optional
    "customerBilling": {  // Optional
        "customerBillingAddress1": "22 Viewcrest Cir",
        "customerBillingAddress2": "",
        "customerBillingCity": "Etobicoke",
        "customerBillingCompany": "",
        "customerBillingCountry": "CA",
        "customerBillingPhone": "1-647-627-8719",
        "customerBillingState": "ON",
        "customerBillingZip": "V6Z2R9"
    },
    "customerShipping": { // Optional
        "customerShippingAddress1": "",
        "customerShippingAddress2": "",
        "customerShippingCity": "",
        "customerShippingCompany": "",
        "customerShippingCountry": "",
        "customerShippingPhone": "",
        "customerShippingState": "",
        "customerShippingZip": ""
    },
    "product": {
        "amount": "1417.99",
        "currency": "CAD",
        "description": "CUS-171143957", // Optional
        "invoice": "", // Optional
        "planID": "", // Optional
        "platform": "Instore", // Optional
        "reference": "SO-73084385",
        "shopCountry": "CA", // CA-fr for French Application
        "shopName": "PBTestShop" 
    },
    "InstoreDetail": {
        "solutionCode": "IW",
        "posTerminalCode": "",
        "posSoftwareCode": ""
  }
}'

📘

Application Language

shopCountry == "CA-fr" in the API Request will render the PayBright application in French language for the Customer

Response

You should receive a response containing PayBright Reference Code that you can use in the In Store Status by Reference Code API to get a final status of a customer application.

Once your POS receives a successful status, you can call our Capture API to capture the transaction.

{
    "PayBrightReference": "908d499f-44c5-4a29-a064-d6d130fa2c32"
}