Introduction

This document describes how you can make a request to our endpoint to send us receipt data.

Make a POST request to our endpoint and wait for a positive 200 response.

Endpoint URL

  • Production: https://input.api.getbanyan.com/receipt
  • Development: https://input.api.development.getbanyan.com/receipt

Example Payload

{
    "store": {
        "displayName": "Greensburg Supercenter",
        "phoneNumber": "812-663-3434",
        "address": {
            "country": "us",
            "state": "ca",
            "city": "greensburg",
            "postalCode": "47240",
            "addressLineOne": "790 GREENSBURG COMMONS CTR",
            "addressLineTwo": "GREENSBURG IN 47240"
        }
    },
    "transaction": {
        "datetime": "2020-12-30T23:59:59.000Z",
        "cardType": "visa",
        "last4": "1234",
        "totalAmount": 12.24,
        "subtotal": 11.44,
        "taxAmount": 0.8,
        "changeDue": 0,
        "tipAmount": 0,
        "items": [
            {
                "itemId": "0576407142",
                "upc": "068113124766",
                "description": "Equate Moisturizing Hand Sanitizer with Vitamin E, 34 fl oz - May Ship with a Flip Top Cap",
                "price": 3.97,
                "quantity": 1
            },
            {
                "itemId": "0565760620",
                "upc": "003920822288",
                "description": "Hyper Tough Indoor Analog Timer, Double Grounded Outlet",
                "price": 7.47,
                "quantity": 1
            }
        ]
    }
}

Example Response

{
    "message": "OK"
}

Error Handling

The receipt will be validated upon delivery, and if there is an error, we will report it in our request response

{
    "error": {
        "message": "Error: Payload format incorrect.",
        "code": 404
    }
}

Did this page help you?