arazzo: 1.0.1
info:
title: Interswitch Link And Check Card Balance
summary: Validate a card PAN, link it to a customer, then read the linked card's balance.
description: >-
Card linking flow on Card 360. The workflow validates a card PAN to confirm
its scheme and issuer, links the validated PAN to a customer profile, and
reads the card balance. Because the validate and balance endpoints key off
different identifiers (PAN vs cardId), the cardId used for the balance lookup
is supplied as an input. All requests are Bearer-authenticated and inline
their bodies.
version: 1.0.0
sourceDescriptions:
- name: balanceApi
url: ../openapi/interswitch-balance-api-openapi.yml
type: openapi
- name: cardsApi
url: ../openapi/interswitch-cards-api-openapi.yml
type: openapi
- name: linkingApi
url: ../openapi/interswitch-linking-api-openapi.yml
type: openapi
workflows:
- workflowId: link-and-check-balance
summary: Validate a card PAN, link it to a customer, and read the card balance.
description: >-
Validates a card PAN, links it to the customer profile, and reads the
balance for the associated card id.
inputs:
type: object
required:
- accessToken
- cardPan
- customerId
- cardId
properties:
accessToken:
type: string
description: Bearer access token from the Passport OAuth token endpoint.
cardPan:
type: string
description: The card PAN to validate and link.
customerId:
type: string
description: Customer profile the card is linked to.
cardId:
type: string
description: Card id used for the balance inquiry once linked.
steps:
- stepId: validateCard
description: >-
Validate the card PAN to confirm its scheme and issuer before linking.
operationId: validateCard
parameters:
- name: Authorization
in: header
value: Bearer $inputs.accessToken
requestBody:
contentType: application/json
payload:
cardPan: $inputs.cardPan
successCriteria:
- condition: $statusCode == 200
- condition: $response.body#/valid == true
outputs:
valid: $response.body#/valid
cardScheme: $response.body#/cardScheme
issuerBank: $response.body#/issuerBank
- stepId: linkCard
description: Link the validated card PAN to the customer profile.
operationId: linkCard
parameters:
- name: Authorization
in: header
value: Bearer $inputs.accessToken
requestBody:
contentType: application/json
payload:
cardPan: $inputs.cardPan
customerId: $inputs.customerId
successCriteria:
- condition: $statusCode == 200
- stepId: checkBalance
description: Read the card balance for the linked card.
operationId: getCardBalance
parameters:
- name: Authorization
in: header
value: Bearer $inputs.accessToken
- name: cardId
in: path
value: $inputs.cardId
successCriteria:
- condition: $statusCode == 200
outputs:
balance: $response.body#/balance
availableBalance: $response.body#/availableBalance
currency: $response.body#/currency
outputs:
cardScheme: $steps.validateCard.outputs.cardScheme
balance: $steps.checkBalance.outputs.balance
availableBalance: $steps.checkBalance.outputs.availableBalance
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.