Sheeva Credit Cards API

The Credit Cards API from Sheeva — 5 operation(s) for credit cards.

OpenAPI Specification

sheeva-credit-cards-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: SheevaConnect Authentication Credit Cards API
  version: '2.0'
  description: 'This SheevaConnect™ API Specification 2.0 is © 2024 Parkofon Inc. (d/b/a Sheeva.AI) and is proprietary information that may not be duplicated, redistributed, form the basis of derivative works, or publicly performed/displayed without the expressed written permission of Sheeva.AI. If you wish to use the SheevaConnect™ API Specification 2.0 and use the SheevaConnect™ cloud platform, please contact Sheeva.AI for a license.

    SheevaConnect APIs enable connected vehicle payments & last-mile services for various use cases including Fueling, EV Charging, Parking and Retail. This solution allows automated & contactless payment in addition to proactive identification of user needs and last-mile navigation to the nearest Sheeva Pay enabled outlets.

    All APIs follow HTTP status codes, return HTTP 200 OK when successful and following HTTP errors with a message. The message is self explaining to indicate the error in request. The example error codes include :




    Error Code

    Message





    400

    Bad Request : Check the parameter values



    404

    Resource not found



    500

    Internal Server Error




    SheevaConnect creates a session when system detects that vehicle requires a service (FUEL, CHARGING, PARKING). Each session goes through various statuses.

    Session Status Codes




    Status

    Description





    LOW_FUEL_DETECTED

    If vehicle was low on fuel and system has sent the notification to driver for low fuel or if vehicle is not low on fuel but driver clicks on fuel icon to pay.



    LOW_CHARGE_DETECTED

    If vehicle was low on charge and system has sent the notification to driver for low charged or if vehicle is not low on chrage but driver clicks on charge icon to pay.



    AT_SERVICE_HUB

    The driver has reached the fuel station / EV charge station / etc.



    AT_SERVICE_POINT

    The driver is at fuel pump / charging bay.



    SERVICE_POINT_CONFIRMED

    Driver confirms the fuel pump / charging bay.



    SERVICE_IN_PROGRESS

    When driver uses a parking service and vehicle is parked



    SERVICE_COMPLETE

    When user marks the fuel, charging, parking complete



    SERVICE_CANCELLED_BY_DRIVER

    When user cancel the service at the pump/ charging bay



    SERVICE_ABORTED_BY_SYSTEM

    When user does opt for service and move away from fuel pump/ charging bay




    Payment Status Codes




    Status

    Description





    PAYMENT_AUTHORIZED

    When a payment is authorized. Only applicable for Credit Card, Wallet and Rewards.



    PAYMENT_INITIATED

    When a payment is in progress. Only applicable for UPI in India.



    PAYMENT_COMPLETE

    Payment has been processed for a g'
  contact:
    name: Sheeva.AI
    url: https://sheeva.ai/contact-us
  x-company: Parkofon Inc. (d/b/a Sheeva.AI)
servers:
- url: https://us-apis.sheeva.ai
  description: Production (USA)
- url: https://in-apis.sheeva.ai
  description: Production (India)
- url: https://dev-us-apis.sheeva.ai
  description: Sandbox (USA)
- url: https://dev-in-apis.sheeva.ai
  description: Sandbox (India)
security:
- bearerAuth: []
tags:
- name: Credit Cards
paths:
  /v2/partner-apis/wallet:
    get:
      summary: 1 - Get Vehicle Wallet
      operationId: getVehicleWallet
      tags:
      - Credit Cards
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
                walletId: 1bf4de4f-442f-42d6-abc6-86a952ef7895
                driverId: dri_bP2lHCcPFzY6Yd19qvdM
                vin: sheeva_vehicle_id_test
                type: VEHICLE
                cards:
                - id: 4e17a735-9810-4236-8544-790886d53f5f
                  lastFour: '0564'
                  status: ACTIVE
                  brand: VISA
                  default: true
      parameters:
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
  /v2/partner-apis/wallet/public-key:
    post:
      summary: 2 - Generate Public Key To Add Credit Card
      operationId: generatePublicKeyToAddCreditCard
      tags:
      - Credit Cards
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
                key: MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAtVDy2c5oQxndUliND2sQCg0DOBnCdpdHS37UcR1SZYAmkPFNkz//N6+49OFgab+AtOC84aTICo3y6FnDXP0qF2fte1aIesDX2gDUDsfHoVMo7JRNzkRGIe4+t6hxa6Atjclpyb+sLo1tM0p5n1dStE2F44AgiDCbbdIsBfdDta2d4fhgUR8KfT7ZHrqH/ZOzp4BW53sde+FtmnstviVcSxShQNpI1KurfRKT+tgps6JNw/lJE58EnpqTHRIRraMTpWJThSsaiyWdlIhKjO0iq0bo5Gj/he4pHqM4W58mtT3dwhq3t21n28I2/H//2Xcyt2H/LLGeAzdcuAuoJlvKVCtNxO9aJ0lRu/TNvi75moMWXs3Eysbib3PtOCUVeJnj/fABEW4fkAX7c0ceM+dwkQpq8ccsDieywrpaZDgQ8g5toHyJb6Ye7rtsSnGnju6u+Dr1D1Xp7tM1Jilksj/p5s1bmEJMvQ4yxJgXnORhr6nB0rMib8UBT7mMwbyG2VdZAgMBAAE=
      parameters:
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
      requestBody:
        content:
          application/json:
            example:
              walletId: '{{walletId}}'
              driverId: '{{driverId}}'
              vin: '{{vin}}'
  /v2/partner-apis/wallet/cards:
    post:
      summary: 3 - Add Credit Card To A Wallet
      operationId: addCreditCardToAWallet
      tags:
      - Credit Cards
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
                state: Success
                message: Credit card added successfully
      parameters:
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
      requestBody:
        content:
          application/json:
            example:
              driverId: '{{driverId}}'
              vin: '{{vin}}'
              walletId: '{{walletId}}'
              encryptedCreditCard: HrWagujXc4FctJdPBWiLGQjFjfGFwNfR8OpJRzzt9ROxfg6t5NeRPUJ/RwKiUFZdMR5+mKraKOS+u6wHofFeWJ6A0PO4LJZFOgL7Y+5EHIW1wrBrORsjl8hKnEcedx2Cd7aHopVacXgTaMpyEcjY8fZUbdbx3wGaNQfRdlgRwt0Ey58ko8S/HmPR1FYd7C7X0Or2yghg+5lIAz4dply9At9cGDy5LqAhbayUHpZUfTwGY9G+sDiS81KrKG87blSX37jchwSxDFCqz4gqy7avvQqEGLYNuJfXhFu6AvakUGNaQpbQ3wr07ZqYB9UBJFBRv0vrM/G5KMbyMcFPv5SJm6Fgt3MZ+T3VNzwh/+O+1+i+AZrhVTToTqlEEv06d/4vi52/A8DXt0KEeRWVgb8TN67a23zgHvYdW8/jZuPcp+gaPYUatUQMoyJHxn/cuzLFsF9f+Q3eYAL8IjGLC0RpglASHKyspmRUrCFXztx9kpiLb2hoSallC9UqD/U+LL0t
  /v2/partner-apis/wallet/{walletId}/cards:
    get:
      summary: 4 - Get Credit Cards Associated To Wallet
      operationId: getCreditCardsAssociatedToWallet
      tags:
      - Credit Cards
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
              - id: 4e17a735-9810-4236-8544-790886d53f5f
                lastFour: '0564'
                brand: VISA
                default: true
                expired: false
              - id: 90a23da-9810-4236-8544-790886d53f5f
                lastFour: '0564'
                brand: VISA
                default: false
                expired: false
      parameters:
      - name: walletId
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
  /v2/partner-apis/wallet/{walletId}/cards/{cardId}:
    get:
      summary: 5 - Get Credit Card By Id
      operationId: getCreditCardById
      tags:
      - Credit Cards
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
                id: 4e17a735-9810-4236-8544-790886d53f5f
                lastFour: '0564'
                brand: VISA
                default: true
                expired: false
      parameters:
      - name: cardId
        in: path
        required: true
        schema:
          type: string
      - name: walletId
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
    patch:
      summary: 6 - Mark Credit Card As Default
      operationId: markCreditCardAsDefault
      tags:
      - Credit Cards
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
                state: Success
                message: Card set as default
      parameters:
      - name: cardId
        in: path
        required: true
        schema:
          type: string
      - name: walletId
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
    delete:
      summary: 7 - Delete Credit Card
      operationId: deleteCreditCard
      tags:
      - Credit Cards
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
                state: Success
                message: Credit card has been deleted successfully
      parameters:
      - name: cardId
        in: path
        required: true
        schema:
          type: string
      - name: walletId
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token obtained from GET /v2/auth (exchange client-id/client-secret), sent in the Authorization header.
    clientCredentials:
      type: apiKey
      in: header
      name: client-id
      description: client-id + client-secret headers on GET /v2/auth to obtain an access token.