---
swagger: "2.0"
info:
description: This Microservice is intended to validate credit card details for which
the dynamic CVV2 and 2FA is generated to support online shopping and non-present
card transactions
version: 1.0.2
title: CRDS-CCC-D-CardInf
x-ibm-name: crds-ccc-d-cardinf
host: 127.0.0.1
basePath: /api
schemes:
- https
produces:
- application/json
paths:
/v1/cards/credit-cards/retrieve:
post:
tags:
- credit-card-detail
operationId: credit-card-detail
summary: LOB:Cards; Feature:Credit-Cards-Management; Functionality:Card-Details
description: This API is used to retrieve the credit card information for the
customer.
consumes:
- application/json
produces:
- application/json
parameters:
- name: client_id
in: header
description: Client ID generated during application registration
required: false
type: string
- name: Authorization
in: header
description: The Authorization Token received during login
required: false
type: string
- name: uuid
in: header
description: 128 bit UUID that you generate for every request
required: true
type: string
- name: Accept
in: header
required: true
type: string
description: Content-Types that are acceptable for the response
- name: Accept-Language
in: header
description: List of acceptable human languages for response
required: false
type: string
default: es
- name: ChannelId
in: header
description: Channel where request originated
required: true
type: string
- name: Content-Type
in: header
description: Content-Types that are sent in the request
required: true
type: string
default: application/json
- name: countryCode
in: header
description: Country code in 2 character ISO 3166 format
required: true
type: string
default: MX
- name: businessCode
in: header
description: Business code identified during application registration
required: true
type: string
default: GCB
- name: sid
in: header
description: SessionId sent by Consumer
required: true
type: string
- in: body
name: retrieveCreditCardRequest
required: true
schema:
$ref: '#/definitions/RetrieveCreditCardRequest'
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/RetrieveCreditCardResponse'
400:
description:
Type | Code | Details |
error | invalidRequest | Missing or invalid Parameters |
error | cannotDecryptData | 620-Cannot decrypt, please
re-check the encrypted value |
schema:
$ref: '#/definitions/ErrorResponse'
401:
description: Type | Code | Details |
error | unAuthorized | Authorization
credentials are missing or invalid |
schema:
$ref: '#/definitions/ErrorResponse'
403:
description: Type | Code | Details |
error | accessNotConfigured | The request operation
is not configured to access this resource |
error | productNotAllowed | The
card is not allowed to issue CVV2 and 2FA. |
schema:
$ref: '#/definitions/ErrorResponse'
404:
description: Type | Code | Details | More
Info |
error | resourceNotFound | The requested
resource was not found | Empty resource/resource not found |
schema:
$ref: '#/definitions/ErrorResponse'
422:
description: Type | Code | Details |
error | businessValidationFailed | Business
validation error occured on one or more parameters |
schema:
$ref: '#/definitions/ErrorResponse'
500:
description: |-
Type | Code | Details |
error | backendError | Failed
during a call to backend service |
error | timeoutError | Time to complete a transaction is over |
fatal | serverUnavailable | The
request failed due to an internal error/server unavailability |
schema:
$ref: '#/definitions/ErrorResponse'
definitions:
RetrieveCreditCardRequest:
type: object
properties:
customerId:
description: Unique identifier of the customer.
type: string
example: "123456789012"
pattern: ^[0-9]*$
maxLength: 12
cardNumber:
description: Number Embossed/ Printed on the Card
type: string
example: "1234567890123456"
pattern: ^[0-9]*$
maxLength: 16
expiryDateValidationFlag:
description: Flag that indicates if the API will retrieve the valid expiry
date or not
type: boolean
example: true
required:
- customerId
RetrieveCreditCardResponse:
type: object
properties:
cardPlastic:
type: array
items:
$ref: '#/definitions/CardPlastic'
required:
- cardPlastic
CardPlastic:
type: object
properties:
activationDate:
description: The date when the card plastic is activated. Tdahe date is captured
in ISO 8601, YYYY-MM-DD format.
type: string
format: date
example: "2020-04-14"
activationIndicator:
description: 'Indicator of the activation status of the physical plastic card
(N: Not Active, Y: Active, D: Dormand, B:Blocked).'
type: string
example: "Y"
cardBlockCode:
description: The block code used to block a particular card.
type: string
example: Blocked
cardNickName:
description: Nick name of the card.
type: string
example: Card
cardNumber:
description: Number Embossed/ Printed on the Card.
type: string
example: "1234567890123456"
cardStatus:
description: Status of the Card.
type: string
example: Active
expiryDate:
description: The date on which the card becomes invalid/expired.
type: string
format: date
example: "2020-09-22"
previousActivationIndicator:
description: 'Indicator of the activation status of the previous physical
plastic card (N: Not Active, Y: Active, D: Dormand, B:Blocked).'
type: string
example: "Y"
previousExpiryDate:
description: The date of previous card when it becomes invalid/expired.
type: string
format: date
example: "2017-09-22"
validExpiryDate:
description: expiry date identified as valid at the moment of the request
that should be used for purchasing (considering a possible replacement process)
type: string
format: date
example: "2017-09-22"
newCardNumber:
description: Number Embossed/ Printed on the new replaced Card (either theft,
loss or fraud report).
type: string
example: "9984567890123456"
cardHolderType:
description: Identifies the type of card user such as Primary, Secondary,
Owner, Employee
type: string
example: P
lastPurchaseAuthorizationDate:
description: Date of the last purchase or transaction authorized for this
card. Date in ISO 8601, YYYY-MM-DD format
type: string
format: date
example: "2017-09-22"
lastTransactionPostingDate:
description: Refers to the date on which last transaction has been posted
for this card. Date in ISO 8601, YYYY-MM-DD format
type: string
format: date
example: "2017-09-22"
availableBalanceAmount:
description: Sum of all debit and credit transactions (amount) in cycle for
this card
type: number
format: double
example: 2500.220000
cardPlasticId:
description: Unique Identifier of the plastic card
type: string
example: "234"
account:
$ref: '#/definitions/Account'
required:
- account
Account:
type: object
properties:
customerId:
description: Unique identifier of the customer.
type: string
example: "123456789012"
accountNumber:
description: Customer's Account Number with the Bank.
type: string
example: "123456789012"
accountStatus:
description: Status of the Account.
type: string
example: Active
blockCode:
description: Block code specifies the scenario on which the account is blocked.
type: string
example: "1234"
additionalBlockCode:
description: Block code specifies the additional scenario on which the account
is blocked.
type: string
example: "1234"
creditLimitAmount:
description: It represents Credit limit amount on the card account.
type: number
format: double
example: 5500.550000
currencyCode:
description: The currency code identifier of the account
type: string
example: MXN
lastStatementBalanceAmount:
description: Last statement closing balance. Indicates the amount owed at
the time of statement generation.
type: number
format: double
example: 4500.550000
outstandingBalanceAmount:
description: Total outstanding balance amount to be repaid. This is the amount
that card holder needs to pay every month as against his loan taken on credit
card.
type: number
format: double
example: 3500.550000
paymentDueDate:
description: Date on which the payment is due.
type: string
format: date
example: "2020-07-25"
productCode:
description: Unique code that identifies the product.
type: string
example: "1234"
productName:
description: Name of the product.
type: string
example: Credit Card
currentStatementBalanceAmount:
description: Current statement closing balance. Indicates the amount owed
at the time of statement generation.
type: number
format: double
example: 5000.550000
lastPaymentDate:
description: The date of most recent payment on the account.
type: string
format: date
example: "2020-05-23"
ErrorResponse:
required:
- code
- details
- location
- moreInfo
- timestamp
- type
properties:
type:
type: string
description: Invalid - Request did not confirm to the specification and was
unprocessed and rejected. Please fix the value and try again
enum:
- error
- warn
- invalid
- fatal
code:
type: string
description: Error code which qualifies the error
details:
type: string
description: Human readable explanation specific to the occurrence of the
problem
location:
type: string
description: The name of the field that resulted in the error
moreInfo:
type: string
description: URI to human readable documentation of the error
timestamp:
type: string
description: Timestamp of the error
x-ibm-configuration:
enforced: true
testable: true
phase: realized
securityDefinitions:
OAuth2 Application Flow:
type: oauth2
description: ""
flow: application
scopes:
/api/v1: ""
tokenUrl: https://perf.api.externalapib2b.wlb.lac.nsroot.net:7100/mx-gcgapi/perfext/api/v1/oauth/token
Client ID:
type: apiKey
description: ""
in: header
name: X-IBM-Client-Id
security:
- OAuth2 Application Flow:
- /api/v1
Client ID: []
x-ibm-endpoints:
- endpointUrl: https://perf.api.externalapib2b.wlb.lac.nsroot.net:7100/mx-gcgapi/perfext
type:
- production
- development
...