Inyo

Get Payment by External ID

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

Endpoint

GET https://sandbox-gw.simpleps.com/payments/{externalPaymentId}

Headers:

HeaderValue
AuthorizationBearer {accessToken}

Example Request

curl -X GET https://sandbox-gw.simpleps.com/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": "[email protected]"
  },
  "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)