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 complete the purchase.

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.

Customer SMS and Email

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

632632

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

12721272

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

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

📘

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

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