2.1 - Purchase Transaction

Purchase Transaction

API: GeneratePurchase

Purchase Transaction: This functionality allows end users to pay for their purchases using their digital account application at any registered store.

This API is responsible for generating a purchase transaction. When triggered, it creates a QR Code or a 6-digit Token that the end user will use to confirm the purchase via their application.

  • JSON REQUEST:

    { 
      "Method": "GeneratePurchaseClosedLoop", 
      "BusinessUnitId": 30420, 
      "PartnerId": 10409, 
      "ContractIdentifier": "CON965569f9-5c93-4335-b09e-29efe32ba292CON", 
      "Value": "2.00", 
      "MerchantAccountKey": "378320-014700-0146333-1", 
      "Identifier": "PurchaseTesteVini1106new4", 
      "InitiationType": 0 
    }
    
  • JSON RESPONSE:

    { 
      "Success": true, 
      "Message": "Purchase generated successfully", 
      "TotalValue": "10.00", 
      "TransactionIdentifier": "TRA3625e252-3a1a-459c-87ca-74134b3ee471TRA", 
      "TransactionCode": "220337" 
    }
    

    or

    { 
      "Success": true, 
      "Message": "Purchase generated successfully", 
      "TotalValue": "10.00", 
      "TransactionIdentifier": "TRAc8bf0cf1-8b95-4030-8c69-8db61c6900b5TRA", 
      "Hash": "2407cd25-01a5-4578-9f51-e538ea143435", 
      "Image": "iVBORw0KGgoAAAANSUhEUgAAAMQAAADEAQAAAADo3bPGAAABvklEQVR4nO2XQW4DMQwD+QP+/5f6gSpSxqYB2psJ5BBnUWc9h1gyLarof0bhSz6DAODMnHmm/cIA4TysatRMJLyQINDKBDf7mHdBpsgsTrizE1SUKJkoR41OET8FKkoF/Jbre0SCeBtv2rlHNCaTHIm08vl+F+6RcpDzkU4crnJ7n7RODLpXBtDRZcimVPF5ed4ThN7DLNVofheLAVLO5chcQoc13wky17eldZ6HLhwBogrhgjdK9FtHSPn4yKMQ360OkFkZ/RXWMbyjShBaIs7qUSE7QhRqyQWlxT1GBsh6n6SolOoyNxLEZ6Wap+KndfthgGCDK5U8BYynhtwlW4RUH+q4YEeIKrePj55mF80AgQWoetdWCF5Oe5Ucz2hZoBsV/nLai8QFYpsUdUT1cvTLZIbKd/V2j7beAFlLt9Tp5qGfjF4lPrb9rp2gbE8J0qdGbFNsYSYI3THUUSRsVAnidsFGDmUXr97yKvHqidORrodcJ/5BuItUUYeNNkC4DTE3leW6FCFwu7XFXCeIp+e7T2wcW/fcCIWIPbws/e3AE2Q9w2Xcf/D0FFeJFcL9pwXbpfzWzjXy9/iSjyA/XqjNviKO4HwAAAAASUVORK5CYII=" 
    }
    

Parameter Descriptions:

ParameterTypeMandatoryDescriptionExample
MethodstringYesMethod name"GeneratePurchaseClosedLoop"
BusinessUnitIdintYesInformation provided by FitBank"234334"
PartnerbigintYesInformation provided by FitBank"847561"
StatustinyintYesTransaction status"Created"
ContractIdentifiervarcharYesIdentifier of the contract (associated company)"CON965569f9-5c93-4335-b09e-29efe32ba292CON"
MerchantAccountKeyvarcharYesMerchant account identifier"378320-014700-0146333-1"
IdentifiervarcharYesTransaction description provided by the client"PurchaseTESTEcloseLOOP"
ValuedecimalYesTransaction value20.00
TotalValuedecimalYesTotal transaction value20.00
InitiationTypetinyintYesUser initiation type: QRCode or Code0 - Code, 1 - QRCode
TransactionIdentifiervarcharYesTransaction identifier"TRA4eb415ef-5c63-4996-8957-e1d2e3a95415TRA"


PurchaseClosedLoopStatus:

{
  "Created": 0,
  "Canceled": 1,
  "Settled": 2,
  "PreSettled": 3,
  "PreCanceled": 4,
  "CanBePreAuthorized": 5,
  "CanBeAuthorized": 6,
  "Authorized": 7,
  "Registered": 8,
  "CanBePreCanceled": 9,
  "PreAuthorized": 10,
  "CanBeSettled": 11,
  "CanBeCanceled": 12,
  "ErrorBalance": 13
}