Cycle Logo

Create a Payment

Initiate a payment in the Cycle system using the REST API.

Endpoint

POST /api/v1/payment/submit

The request body must be a valid JSON object containing all required parameters for the payment transaction.

Request Body Definitions

Field NameTypeDescription
BasicTranJsonObjectBase Transaction Object
InputTypeIntegerInput type
CurrencyIDStringCurrency ID
ServiceIDStringIdentifier of the executing service
DescriptionStringTransaction Description
AmountDecimalTransaction amount
ExtIDStringTransaction ID in the external system
AmountCashGotIntegerAmount received
ClientDateTimeStringDate and time on the client
ExtTransDataStringAdditional payment data (JSON as string)
AuxDataInputJsonObjectObject of formation of commodity items
AuxDataJsonObjectProduct Item Object
PurchasesObject ArrayArray of product items
TitleStringName
PriceStringPrice
QuantityStringQuantity
TaxCodeArrayArray of taxes
TagsArrayArray of fiscal tags
IDStringTransaction ID in the Cycle system
CPFDataJsonObjectCustom product object
ProductsCustomFieldsArray of ObjectsArray of custom fields
ProductDescIDIntegerThe product identifier
ProductCodeStringProduct code
FieldsArray of ObjectsProduct Field Array
FieldDescIDIntegerProduct Field ID
FieldCodeStringProduct field code
TextSelectStringProduct field value
OfflineTranJsonObjectOffline transaction object
OfflineModebooleanSign of an offline transaction
InvoiceStringCheck number
PaidStringDate and time of payment
OfflineLocationJsonObjectLocation object
LatitudeIntegerLatitude
LongitudeIntegerLongitude
TerminalGroupIDIntegerID of the terminal group
TerminalGroupCodeStringName of the terminal group
SkipFiscalizationBooleanTrue to skip fiscalization
FiscalRouteProfileCodeStringName of the fiscalization route
AcqTranJsonObjectAcquiring transaction object
AcquirerCodeStringAcquirer code
SingleStepAuthModeBooleanOne-step transaction sign
ExternalTerminalIDStringExternal terminal ID
AllowSwipeOverChipbooleanAllow Swipe for chip cards
ForceSignatureRequirementbooleanSign of unambiguous signature requirement
AdditionalAcquiringFieldsStringAdditional acquiring fields
TaxesModelJsonObjectTax Model Object
TaxesArray of StringsArray of tax codes
CodeStringAccount code
ReceiptJsonObjectCheck sending object
EmailStringemail for the check
EmailsArrayArray of emails
PhoneStringPhone number
PhonesArrayArray of numbers
RetryNumIntegerNumber of sending attempts
CardJsonObjectCard object
CardInputModeIntegerCard entry method
CardDataInputJsonObjectCard data object
EXPStringCard validity period
CVV2StringCVV2
PANStringCard number
ReaderTypeStringThe type of reader
ReaderDataStringReader data package
LinkedCardIdIntegerLinked card ID
FilesArray
FileTypeSignature
FileCodestring
ClientProductCodeStringClient application code
DeviceInfoJsonObjectDevice object
PhoneManufacturerStringManufacturer
PhoneModelStringModel
DeviceIDStringDevice ID
DeviceTypeStringDevice type
AppFrameworkStringFramework applications
OSStringOperating system
OSVersionStringSystem version
AppIDStringApplication ID
BuildNumberStringBuild number
LocationJsonObjectLocation object
LatitudeIntegerLatitude
LongitudeIntegerLongitude
GMTIntegerTime zone
AppFrameworkStringFramework applications
ServerBuildNumberString
UserAgentString
CurrentAccountIDIntegerAgent ID
IPStringIP address
LangStringLanguage
CountryStringCountry
CountryCodeStringCountry code

Example: Create Payment with Linked Card

{
  "Receipt": {
    "Email": "customer@email.com",
    "Phone": "+27 82 123 4567",
    "RetryNum": 1
  },
  "Location": {
    "Latitude": -29.8587,
    "Longitude": 31.0218
  },
  "Country": "South Africa",
  "CountryCode": "ZA",
  "DeviceInfo": {
    "PhoneManufacturer": "Samsung",
    "PhoneModel": "Galaxy A32",
    "DeviceID": "ZA-DEVICE-123456",
    "DeviceType": "1",
    "AppFramework": "java",
    "OS": "Android",
    "OSVersion": "12.0.0",
    "AppID": "za.cyclepay.client.android",
    "BuildNumber": "2.4.390248"
  },
  "GMT": 2,
  "AppFramework": "java",
  "IP": "102.165.44.112",
  "Lang": "en",
  "AcqTran": {
    "AcquirerCode": "ABSA",
    "SingleStepAuthMode": true
  },
  "BasicTran": {
    "InputType": 5,
    "CurrencyID": "ZAR",
    "ServiceID": "CYCLE-SA.ACCEPT-PAYMENT",
    "Description": "POS transaction with linked card",
    "Amount": 5,
    "ID": "123e4567-e89b-12d3-a456-426614174000",
    "AuxDataInput": {
      "AuxData": {
        "Purchases": [
          {
            "Title": "Item A",
            "Price": "10.00",
            "Quantity": "2",
            "TaxCode": ["VAT1500"]
          },
          {
            "Title": "Item B",
            "Price": "15.00",
            "Quantity": "1",
            "TaxCode": ["VAT1500"]
          }
        ]
      }
    }
  },
  "Card": {
    "CardInputMode": 2,
    "LinkedCardID": 7878
  }
}

Example: Create Cash Payment

{
  "Receipt": null,
  "Location": {
    "Latitude": -26.2041,
    "Longitude": 28.0473
  },
  "Country": "South Africa",
  "CountryCode": "ZA",
  "DeviceInfo": {
    "PhoneManufacturer": "Samsung",
    "PhoneModel": "Galaxy Tab A7",
    "DeviceID": "ZA-DEVICE-7890",
    "DeviceType": "1",
    "AppFramework": "java",
    "OS": "Android",
    "OSVersion": "12.0.0",
    "AppID": "za.cyclepay.client.android",
    "BuildNumber": "2.4.390248"
  },
  "GMT": 2,
  "AppFramework": "java",
  "IP": "102.250.11.33",
  "Lang": "en",
  "Card": null,
  "AcqTran": {
    "AcquirerCode": "CASH"
  },
  "BasicTran": {
    "InputType": 10,
    "ExtTranData": "{\"AgreementNumber\":\"SA987654\",\"ReferenceCode\":\"ABC123\"}",
    "CurrencyID": "ZAR",
    "ServiceID": "CYCLE-SA.ACCEPT-PAYMENT",
    "Description": "Cash transaction for retail POS",
    "Amount": 1,
    "CPFData": null,
    "OfflineTran": null,
    "ID": "ab77d014-1b22-4312-8af7-8c10cbbe9fa3"
  }
}

Response Body Definitions

The structure of the response to a payment creation request. The main object is `Transaction`.

The response contains a detailed `Transaction` object. See the example below for the full structure.

Example Response

{
  "TransactionID": "3F57B184-F03D-4006-BBEE-62CA224E6C42",
  "EMVOnlineProcessingResult": "8A023030",
  "AdditionalAcquiringFields": null,
  "AdditionalAcquiringFieldsTitle": null,
  "TerminalName": "01021911",
  "EMVData": {
    "AID": "A0000000031010",
    "APN": "Visa",
    "TSI": "6800",
    "TVR": "8080208000"
  },
  "RequireSignature": false,
  "Transaction": {
    "ID": "3F57B184-F03D-4006-BBEE-62CA224E6C42",
    "Date": "2025-05-28T07:05:09",
    "Deadline": "2025-05-28T07:21:13.14",
    "Description": "correct chip transaction",
    "Invoice": "ZAFPAY001234",
    "MerchantTranID": null,
    "AcquirerID": "ABSA",
    "AcquirerTranID": "3F57B184",
    "AcquirerApprovalCode": "SIMULATION",
    "Status": "IN-TRANSFER",
    "RRN": "879089231166",
    "TerminalName": "01021911",
    "LinkedCard": null,
    "ClientProductCode": null,
    "AmountOrig": 105.00,
    "Amount": 105.00,
    "AmountCashGot": null,
    "FeeTotal": 1.50,
    "AmountNetto": 103.50,
    "Balance": 0.0,
    "AmountEff": 105.00,
    "AmountRvs": 0.00,
    "CountRvs": 0,
    "PartialReverse": false,
    "FeeTotalEff": 1.50,
    "FeeTotalRvs": 0.00,
    "Latitude": -29.8587,
    "Longitude": 31.0218,
    "HasPhoto": false,
    "PhotoUrl": null,
    "HasSignature": false,
    "SignatureUrl": null,
    "SignatureRequired": false,
    "SignatureRequiredEffective": false,
    "PINMode": 31,
    "CurrencySign": "R",
    "CurrencySignSafe": "ZAR",
    "AmountFormat": "#,##0.00 R",
    "AmountFormatWithoutCurrency": "#,##0.00",
    "Format": {
      "CurrencySign": "R",
      "CurrencySignSafe": "ZAR",
      "AmountFormat": "#,##0.00 R",
      "AmountFormatWithoutCurrency": "#,##0.00",
      "CurrencyE": 2
    },
    "CurrencyID": "ZAR",
    "PosID": 11712,
    "StateDisplay": "Successful",
    "Line1": "Payment",
    "Line2": "Successful",
    "DisplayMode": 1,
    "Operation": "Payment",
    "OperationID": 100,
    "State": 400,
    "Substate": 411,
    "SingleStepAuth": true,
    "InputType": 3,
    "Card": {
      "IIN": "quiz",
      "BIN": "417251",
      "EXP": "2806",
      "PANMasked": "*4207",
      "PANEnding": "4207",
      "BankName": "Standard Bank",
      "BankCountryID": "ZA"
    },
    "ExtTranData": "{\"AgreementRef\":\"123456\",\"LicenceNumber\":\"159489\"}",
    "CardholderName": "JOHANNES/MPHO",
    "ReceiptEmail": null,
    "ReceiptPhone": null,
    "CanCancelCNP": true,
    "CanCancelCNPpartial": true,
    "CanReturnCNP": true,
    "CanReturnCNPpartial": true,
    "CanCancel": false,
    "CanCancelPartial": false,
    "CanReturn": false,
    "CanReturnPartial": false,
    "ReverseCPInputTypes": [3, 4],
    "FiscalInfo": {
      "FiscalStatus": 0,
      "FiscalError": 0,
      "FiscalMessage": null
    },
    "IsNotFinished": false,
    "EMVData": {
      "AID": "A0000000031010",
      "APN": "Visa",
      "TSI": "6800",
      "TVR": "8080208000"
    },
    "ExternalPayment": null,
    "Attachments": null,
    "CanServerFiscalizeForCNPReverse": false,
    "CanFiscalRemoteCorrection": true,
    "ExtID": null,
    "Result": {
      "Code": 0,
      "Message": ""
    },
    "OfflineQueueId": null,
    "PANTags": null,
    "TransPos": {
      "ID": 21261,
      "Email": "agent1@cyclepay.africa",
      "Name": "CyclePay Test Agent",
      "Phone": "+27(11)111-1111"
    }
  },
  "ErrorCode": 0,
  "ErrorMessage": null,
  "Validations": null
}