REST API

REST Example: Processing an Incremental Authorization

Request
{ "serialNumber": "1850000000", "request": { "type": "IncrementalAuthorizationRequest", "transactionId": "e43069fbf85543659e478edd8d50f244", "amountDetails": { "amount": "2.00", "currency": "GBP" } } }
Response to a Successful Request
The response includes the data that is required to generate and print a receipt. The receipt data is located in the receipts section of the response and contains a pre-formatted, compliant receipt that is ready to use. The receipt data also includes the individual receipt line items that are required to build your own receipt. Find merchant- and customer-specific data here:
  • Merchant-specific receipt data is located under
    merchantReceipt
    .
  • Customer-specific receipt data is located under
    customerReceipt
    .
{ "type" : "IncrementalAuthorizationResponse", "message" : "Payment approved", "transactionDetails" : { "id" : "6da4aff381e8483ebc65ebf4fbb27ec8", "merchantReferenceCode" : "47bd9ed54f3f4bfabb9d3ee94cfa3008", "submitTimeUtc" : "2023-12-01T20:39:43+0000", "captured" : false, "amountDetails" : { "currency" : "GBP", "amount" : "2.00", "capturedAmount" : "0.00", "refundableAmount" : "0.00" } }, "processingDetails" : { "status" : "APPROVED", "verificationMethod" : "NONE", "entryMode" : "MANUAL", "card" : { "expirationMonth" : "00", "expirationYear" : "00", "type" : "VISA", "maskedPan" : "476173XXXXXX0119" } }, "additionalInformation" : { "requestId" : "7014631843806649604009" }, "linkedOperations" : [ ], "receipts" : { "merchantReceipt" : { "preformattedReceipt" : "Merchant Receipt\nCP Test\nSample Street\nUB3 2EA London\nUnited Kingdom\n1234567\n\nTop-up\n£2.00\n\n\nPlease retain receipt!\n\n\nCard: Payworks VISA\nAccount: **** **** **** 0119\nEntry Mode: Keyed\nVerification: None\n\nAuthorization: 938243\nMerchant ID: **37599\nTerminal ID: ****0063\n\n6da4aff381e8483ebc65ebf4fbb27ec8\n21:39:45: 01/12/2023\n\n\n", "receiptData" : { "lines" : { "MERCHANT_DETAILS_PUBLIC_NAME" : { "label" : "Name", "value" : "CP Test" }, "MERCHANT_DETAILS_ADDRESS" : { "label" : "Address", "value" : "Sample Street" }, "MERCHANT_DETAILS_ZIP" : { "label" : "Zip", "value" : "UB3 2EA" }, "MERCHANT_DETAILS_CITY" : { "label" : "City", "value" : "London" }, "MERCHANT_DETAILS_COUNTRY" : { "label" : "Country", "value" : "United Kingdom" }, "MERCHANT_DETAILS_CONTACT" : { "label" : "Contact", "value" : "1234567" }, "MERCHANT_DETAILS_ADDITIONAL_INFORMATION" : { "label" : "Additional Information", "value" : "" }, "PAYMENT_DETAILS_SCHEME_OR_LABEL" : { "label" : "Card", "value" : "Payworks VISA" }, "PAYMENT_DETAILS_MASKED_ACCOUNT" : { "label" : "Account", "value" : "**** **** **** 0119" }, "PAYMENT_DETAILS_SOURCE" : { "label" : "Entry Mode", "value" : "Keyed" }, "PAYMENT_DETAILS_CUSTOMER_VERIFICATION" : { "label" : "Verification", "value" : "None" }, "CLEARING_DETAILS_AUTHORIZATION_CODE" : { "label" : "Authorization", "value" : "938243" }, "CLEARING_DETAILS_MERCHANT_IDENTIFIER" : { "label" : "Merchant ID", "value" : "**37599" }, "CLEARING_DETAILS_TERMINAL_ID" : { "label" : "Terminal ID", "value" : "****0063" }, "RECEIPT_TYPE" : { "label" : "Receipt Type", "value" : "Merchant Receipt" }, "TRANSACTION_TYPE" : { "label" : "Type", "value" : "Top-up" }, "SUBJECT" : { "label" : "Description", "value" : "" }, "IDENTIFIER" : { "label" : "PWID", "value" : "6da4aff381e8483ebc65ebf4fbb27ec8" }, "AMOUNT_AND_CURRENCY" : { "label" : "Amount", "value" : "£2.00" }, "DATE" : { "label" : "Date", "value" : "01/12/2023" }, "TIME" : { "label" : "Time", "value" : "21:39:45" }, "STATUS_TEXT" : { "label" : "Information", "value" : "Please retain receipt!" } }, "signatureLineRequired" : false } }, "customerReceipt" : { "preformattedReceipt" : "Cardholder Receipt\nCP Test\nSample Street\nUB3 2EA London\nUnited Kingdom\n1234567\n\nTop-up\n£2.00\n\n\nPlease retain receipt!\n\n\nCard: Payworks VISA\nAccount: **** **** **** 0119\nEntry Mode: Keyed\nVerification: None\n\nAuthorization: 938243\nMerchant ID: **37599\nTerminal ID: ****0063\n\n6da4aff381e8483ebc65ebf4fbb27ec8\n21:39:45: 01/12/2023\n\n\n", "receiptData" : { "lines" : { "MERCHANT_DETAILS_PUBLIC_NAME" : { "label" : "Name", "value" : "CP Test" }, "MERCHANT_DETAILS_ADDRESS" : { "label" : "Address", "value" : "Sample Street" }, "MERCHANT_DETAILS_ZIP" : { "label" : "Zip", "value" : "UB3 2EA" }, "MERCHANT_DETAILS_CITY" : { "label" : "City", "value" : "London" }, "MERCHANT_DETAILS_COUNTRY" : { "label" : "Country", "value" : "United Kingdom" }, "MERCHANT_DETAILS_CONTACT" : { "label" : "Contact", "value" : "1234567" }, "MERCHANT_DETAILS_ADDITIONAL_INFORMATION" : { "label" : "Additional Information", "value" : "" }, "PAYMENT_DETAILS_SCHEME_OR_LABEL" : { "label" : "Card", "value" : "Payworks VISA" }, "PAYMENT_DETAILS_MASKED_ACCOUNT" : { "label" : "Account", "value" : "**** **** **** 0119" }, "PAYMENT_DETAILS_SOURCE" : { "label" : "Entry Mode", "value" : "Keyed" }, "PAYMENT_DETAILS_CUSTOMER_VERIFICATION" : { "label" : "Verification", "value" : "None" }, "CLEARING_DETAILS_AUTHORIZATION_CODE" : { "label" : "Authorization", "value" : "938243" }, "CLEARING_DETAILS_MERCHANT_IDENTIFIER" : { "label" : "Merchant ID", "value" : "**37599" }, "CLEARING_DETAILS_TERMINAL_ID" : { "label" : "Terminal ID", "value" : "****0063" }, "RECEIPT_TYPE" : { "label" : "Receipt Type", "value" : "Cardholder Receipt" }, "TRANSACTION_TYPE" : { "label" : "Type", "value" : "Top-up" }, "SUBJECT" : { "label" : "Description", "value" : "" }, "IDENTIFIER" : { "label" : "PWID", "value" : "6da4aff381e8483ebc65ebf4fbb27ec8" }, "AMOUNT_AND_CURRENCY" : { "label" : "Amount", "value" : "£2.00" }, "DATE" : { "label" : "Date", "value" : "01/12/2023" }, "TIME" : { "label" : "Time", "value" : "21:39:45" }, "STATUS_TEXT" : { "label" : "Information", "value" : "Please retain receipt!" } }, "signatureLineRequired" : false } } } }
Response to an Unsuccessful Request
If the request is unsuccessful, you will receive an error response with details.
{ "type": "ErrorResponse", "message": "Error message to display.", "developerDescription": "Detailed description of error." }