Receipt Retrieval API

Post a card transaction to request a receipt retrieval.

Overview

Custodial receivers may post a card transaction to their account to trigger an attempted receipt retrieval.

The receipt retrieval process may take some time to complete. Versa uses card transaction details to identify the merchant and source the receipt either through in-network channels or through an external request flow.

When the receipt retrieval is complete, we will send the receipt data, in the format of valid Versa receipt JSON, to your receiving webhook.

API Request

Request a receipt for a specific card transaction by providing its details.

curl --request POST \
  --url 'https://custodial.versa.org/card_transaction/receipt_retrieval' \
  --header 'Authorization: Basic CLIENT_ID:CLIENT_SECRET' \
  --header 'Content-Type: application/json' \
  --data '{
    "card_transaction": {
      "id": "1234567890",
      "address": {
        "city": "Boston",
        "state": "MA",
        "zip": "02101",
        "country": "US"
      },
      "amount_authorized": 15599,
      "amount_posted": 15599,
      "currency": "USD",
      "date_authorized": "2025-01-01",
      "date_posted": "2025-01-02",
      "description": "ARK HOTELS BOSTON",
      "last_four": "5555",
      "mcc": "3555",
      "cardholder": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "john.doe@versa.org",
        "phone": "1234567890",
        "address": {
          "street": "123 Main St",
          "city": "Anytown",
          "state": "CA",
          "zip": "12345",
          "country": "US"
        }
      }
    }
  }'

While more data can produce better results, a request can be as simple as this:

curl --request POST \
  --url 'https://custodial.versa.org/card_transaction/receipt_retrieval' \
  --header 'Authorization: Basic CLIENT_ID:CLIENT_SECRET' \
  --header 'Content-Type: application/json' \
  --data '{
    "card_transaction": {
      "address": {
        "zip": "02101",
        "country": "US"
      },
      "amount_authorized": 15599,
      "amount_posted": 15599,
      "currency": "USD",
      "date_authorized": "2025-01-01",
      "description": "ARK HOTELS BOSTON",
      "last_four": "5555",
      "mcc": "3555",
      "cardholder": {
        "first_name": "John",
        "last_name": "Doe"
      }
    }
  }'

Request Parameters

FieldTypeDescription
card_transactionobjectCard transaction to request an attempted receipt retrieval.

Card Transaction Object

FieldTypeDescription
idstringUnique identifier for the card transaction.
addressnullable objectMerchant address where the transaction occurred.
amount_authorizedintegerAuthorized amount in minor units (e.g., 15599 for $155.99).
amount_postednullable integerSettled amount in minor units (e.g., 15599 for $155.99).
currencystring3-letter currency code (ISO 4217).
date_authorizedstringTransaction date in YYYY-MM-DD format.
date_postednullable stringSettled date in YYYY-MM-DD format.
descriptionstringMerchant description or transaction name.
last_fourstringLast four digits of the payment card used.
mccstringMerchant Category Code (4 digits).
cardholderobjectCardholder information associated with the transaction.

Cardholder Object

FieldTypeDescription
first_namestringCardholder's given name.
last_namestringCardholder's family name.
emailnullable stringEmail address of the cardholder.
phonenullable stringPhone number of the cardholder.
addressnullable objectCardholder's address.

Address Object

FieldTypeDescription
street_addressnullable stringStreet and building number.
citynullable stringCity or municipality.
regionnullable stringState, province, or region code.
countrystring2-letter country code (ISO 3166-1).
postal_codenullable stringZIP or postal code.
latnullable decimalLatitude coordinate.
lonnullable decimalLongitude coordinate.
tznullable stringIANA timezone ID (e.g., "America/New_York").

Response Format

{
  "card_transaction_id": "ctx_8bfc16eb9d034a009ce3a1d9b445f471",
  "retrieval_id": "ret_8bfc16eb9d034a009ce3a1d9b445f471"
}

When the receipt retrieval is complete, we will post to your receiving webhook with a receipt_retrieval.completed event.

{
  "event": "receipt_retrieval",
  "data": {
    "card_transaction_id": "ctx_8bfc16eb9d034a009ce3a1d9b445f471",
    "retrieval_id": "ret_8bfc16eb9d034a009ce3a1d9b445f471",
    "receipt": { ... }
  }
}