Inyo

Get Payment by External ID

Query the full details of a payment including its lifecycle history, fees, and card information.

Endpoint

GET https://{FQDN}/payments/{externalPaymentId}

Headers:

HeaderValue
AuthorizationBearer {accessToken}

Example Request

curl -X GET https://{FQDN}/payments/order-12345 \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs...'

Response (200)

{
  "parentPaymentId": "9a8dd6f3-105c-40a9-be13-ed95b2b2274b",
  "externalId": "order-12345",
  "requestedOn": "2025-01-21 17:15:14",
  "capturedOn": "2025-01-18 14:59:53",
  "refundedOn": "2025-01-21 17:15:14",
  "amount": 57.00,
  "capturedAmount": 57.00,
  "refundedAmount": 57.00,
  "amountRequested": 57.00,
  "currency": "USD",
  "status": "REFUNDED",
  "approved": true,
  "billing": {
    "stateCode": "FL",
    "city": "Orlando",
    "line1": "12516 Britwell Ct",
    "state": "FL",
    "zipCode": "32837"
  },
  "ipAddress": "203.0.113.42",
  "customer": {
    "firstName": "MIKE",
    "lastName": "JOSEPH",
    "phoneNumber": "+1231232123",
    "email": "mike.joseph@example.com"
  },
  "transactionFees": [
    {
      "sourceId": "9a8dd6f3-...",
      "source": "PAYMENT",
      "eventId": "PRE_AUTH",
      "dtCreated": "2025-01-18 14:59:48",
      "amount": 0.57
    },
    {
      "sourceId": "0e444b74-...",
      "source": "PAYMENT",
      "eventId": "CAPTURE",
      "dtCreated": "2025-01-18 14:59:53",
      "amount": 0.00
    },
    {
      "sourceId": "9989afba-...",
      "source": "PAYMENT",
      "eventId": "REFUND",
      "dtCreated": "2025-01-21 17:15:14",
      "amount": 0.00
    }
  ],
  "history": [
    {
      "paymentId": "9a8dd6f3-...",
      "requestedOn": "2025-01-18 14:59:47",
      "code": "PAYMENT",
      "status": "AUTHORIZED",
      "description": "Payment Approved",
      "requestedAmount": 57.00
    },
    {
      "paymentId": "0e444b74-...",
      "requestedOn": "2025-01-18 14:59:53",
      "code": "CAPTURE",
      "status": "CAPTURED",
      "description": "Payment Approved",
      "requestedAmount": 57.00
    },
    {
      "paymentId": "9989afba-...",
      "requestedOn": "2025-01-21 17:15:14",
      "code": "REFUND",
      "status": "REFUNDED",
      "description": "Payment Approved",
      "requestedAmount": 57.00
    }
  ],
  "card": {
    "lastFourDigits": "2929",
    "bin": "479213",
    "schemeId": "VISA",
    "issuer": "TD BANK, NATIONAL ASSOCIATION",
    "country": "UNITED STATES",
    "countryCode": "US",
    "cardType": "DEBIT",
    "cardCategory": "CLASSIC",
    "currencyCode": "USD"
  }
}

Response Fields

Root

FieldTypeDescription
parentPaymentIdstringRoot payment ID
externalIdstringYour external payment ID
requestedOnstringTimestamp of the most recent operation
capturedOnstringCapture timestamp (null if not captured)
refundedOnstringRefund timestamp (null if not refunded)
amountnumberOriginal authorized amount
capturedAmountnumberAmount that was captured
refundedAmountnumberAmount that was refunded
currencystringISO 4217 currency code
statusstringCurrent payment status
approvedbooleanWhether the payment was approved

transactionFees[]

FieldDescription
eventIdFee event: PRE_AUTH, CAPTURE, REFUND
amountFee amount for this event
dtCreatedWhen the fee was incurred

history[]

FieldDescription
paymentIdID of the specific operation
codeOperation type: PAYMENT, CAPTURE, REFUND
statusStatus after this operation
requestedAmountAmount for this operation

card

FieldDescription
lastFourDigitsLast 4 digits of the card
binBank Identification Number (first 6 digits)
schemeIdCard network: VISA, MASTERCARD, etc.
issuerIssuing bank name
cardTypeDEBIT or CREDIT
cardCategoryCard tier (e.g., CLASSIC, GOLD, PLATINUM)

v2 — Enriched Payment Lookup

The v2 endpoint returns the same payment object as v1, plus additional card metadata and billing detail useful for fraud review and reconciliation. Prefer v2 when you need the AVS/CVC outcome or the full BIN-level card profile alongside the payment.

GET https://{FQDN}/v2/payment/{externalId}

Headers:

HeaderValue
AuthorizationBearer {accessToken}

Example Request

curl -X GET https://{FQDN}/v2/payment/order-12345 \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs...'

Additional Fields in v2

The root object, transactionFees[], history[], and customer are identical to v1. The differences are:

billing — adds countryCode (ISO country code) alongside the existing stateCode, city, line1, line2, state, and zipCode.

card — adds the following fields on top of the v1 set:

FieldDescription
binNumberFull BIN range identifier (extended bin)
countryIssuing country name
countryCodeIssuing country (ISO Alpha-2)
countryCode3Issuing country (ISO Alpha-3)
currencyCodeCard's native currency
avsStatusAddress Verification result recorded for the payment (APPROVED, FAILED, NOT_SENT, N/A)
cvcStatusCard Verification result recorded for the payment (APPROVED, FAILED, NOT_SENT, N/A)
{
  "card": {
    "lastFourDigits": "2929",
    "bin": "479213",
    "binNumber": "47921300",
    "schemeId": "VISA",
    "issuer": "TD BANK, NATIONAL ASSOCIATION",
    "country": "UNITED STATES",
    "countryCode": "US",
    "countryCode3": "USA",
    "cardType": "DEBIT",
    "cardCategory": "CLASSIC",
    "currencyCode": "USD",
    "avsStatus": "APPROVED",
    "cvcStatus": "APPROVED"
  }
}

Migration note: v2 is additive — every field present in the v1 response is still returned with the same name and type, so an existing v1 integration can switch to v2 without breaking.