Postman collection
Payments Read

pixiGetCreditCardInfo

Returns the credit card data and the credit card processor authorization ID stored for an order.

Looks up the order with the given OrderNr in OrderHeader and joins its address record (OrderHeader.AddrRef = Addresses.AddrKey). The credit card fields are read from that address record.

The returned row contains:

  • the card type text, resolved from Creditcards.CardText via Addresses.ACardType
  • card holder, card number, expiry date and CVC
  • the authorization ID of the credit card processor (OrderHeader.ccpPayID)
  • the flag CCPIDUsedBefore. It is 1 if another order of the same customer (CustRef) with a lower order number already has the same ccpPayID, otherwise 0.

If no order with this number exists, or the order has no matching address record, the result set is empty.

Notes

  • All tables are read with NOLOCK, so uncommitted data may be returned.
  • The call returns sensitive payment data (full card number and CVC) exactly as stored. Access to this call should be restricted.
  • If ccpPayID is NULL, the comparison with earlier orders never matches and CCPIDUsedBefore is 0.
  • The card type is resolved with a scalar subquery. If Creditcards contains more than one row for the same CardType, SQL Server raises an error (subquery returned more than one value). If there is no matching row, CreditCardType is NULL.
  • The column data types depend on the table definitions, which are not part of the code.

Tables used

Addresses · Read OrderHeader · Read Creditcards · Read
SQL object:
dbo.pipiGetCreditCardInfo
Updated at 2026-10-30