Praxis Wiki logo

Get Card Details API {card-details}


API call for merchants to retrieve a customer's credit card details along with OCT(Original Credit Transaction) details.

{danger.fa-exclamation} IMPORTANT 1:
The card_network_attributes containing OCT(Original Credit Transaction) will be displayed only for VISA and MasterCard

Endpoints

Name URL
Sandbox https://gateway.cashier-test.com/agent/card-details
Live https://gw.praxisgate.com/agent/card-details

Request Parameters

✓ - required value
? - optional, value or null
✕ - always appears as null

Variable Type Description
merchant_id varchar(50) ✓ Merchant API client account identifier
cid varchar(50) ✓ Unique customer id in Merchant's system. Personally Identifiable Information such as an e-mail address is hashed/encrypted.
application_key varchar(32) ✓ Identifier of your application (website)
card_token varchar(32) ✓ Card Token provided by Praxis after the card is saved
version varchar(3) ✓ API version
timestamp int(11) ✓ Request time (unix timestamp, seconds)

Response Parameters

Variable Type Description
status int ✓ API communication status - for transaction processing status please refer to transaction.transaction.status
- 0 if the request was successful
- Negative integer if internal server/network error occurs
- Positive integer if application/logical error occurs
description varchar(256) ✓ Accurate description of the result. Return the actual error for any exception as it helps to diagnose issues in production.
card_network_attributes <Object> ✓ One of the below values(VISA and MasterCard)
card_token varchar(32) ✓ HASH value of customer's card.
card_number varchar(19) ✓ Customer card number
card_type varchar(10) ✓ Customer card type
card_exp varchar(8) ? Customer card exp
card_issuer_name varchar(255) ? Customer card issuing bank name
card_issuer_country varchar(2) ? Customer card issuing bank country
card_holder varchar(255) ? Cardholder name field
card_funding_source varchar(32) ✓ Funding source (DEBIT, CREDIT).
card_subtype varchar(32) ✓ The card category subtype is CONSUMER or COMMERCIAL.
version varchar(3) ✓ API version
timestamp int(11) ✓ Response time (unix timestamp, seconds)

Signature

The full signature generation algorithm can be found in the Authentication section in headers.

Request signature parameters

  1. merchant_id
  2. application_key
  3. card_token
  4. cid
  5. timestamp

Response signature parameters

  1. status
  2. timestamp

Example

Request

GET /agent/card-details?
card_token=af7d1b07c48fbeff116b2bb3e84fb4c9&
merchant_id=Sandbox-API&
application_key=Sandbox-Application&
cid=1&
version=1.3&
timestamp=1755853580

Response (Success - 200 - VISA)

{
    "status": 0,
    "description": "Ok",
    "version": "1.3",
    "timestamp": 1755853580,
    "card_token": "af7d1b07c48fbeff116b2bb3e84fb4c9",
    "card_number": "491694******1514",
    "card_holder": "John Doe",
    "card_exp": "12/2022",
    "card_type": "VISA",
    "card_issuer_name": "Random Bank, London",
    "card_issuer_country": "GB",
    "card_funding_source": "Credit",
    "card_subtype": "CONSUMER",
    "card_network_attributes": {
        "visa_direct_support": "2"
    }
}

Response (Success - 200 - MasterCard)

{
    "status": 0,
    "description": "Ok",
    "version": "1.3",
    "timestamp": 1755853580,
    "card_token": "af7d1b07c48fbeff116b2bb3e84fb4c9",
    "card_number": "555555******1001",
    "card_holder": "John Doe",
    "card_exp": "12/2022",
    "card_type": "MASTERCARD",
    "card_issuer_name": "Random Bank, London",
    "card_issuer_country": "GB",
    "card_funding_source": "Credit",
    "card_subtype": "CONSUMER",
    "card_network_attributes": {
        "mastercard_direct_support": "3"
    }
}

Response (Success - 200 - Invalid PSP or PSP not eligible)

{
    "status": 0,
    "description": "Ok",
    "version": "1.3",
    "timestamp": 1755853580,
    "card_token": "af7d1b07c48fbeff116b2bb3e84fb4c9",
    "card_number": "491694******1514",
    "card_holder": "John Doe",
    "card_exp": "12/2022",
    "card_type": "VISA",
    "card_issuer_name": "Random Bank, London",
    "card_issuer_country": "GB",
    "card_funding_source": "Credit",
    "card_subtype": "CONSUMER",
    "card_network_attributes": {
        "mastercard_direct_support": null
    }
}