- You have a SoftPos terminal with an successful installation
More info can be found at Install a terminal
Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesThis guide will walk you through the process to do a payment with CCV SoftPOS.
Prerequisites
When making a payment the CCV SoftPOS app will need to start a transaction session that will be used for making a payment. Creating this transaction session takes some time thus increasing the total time it takes to make a payment. Optionally you can start this transaction session yourself before making a payment. This can be done in the background and this will make for a faster transaction startup.
For example you can start this transaction session in the background when the transaction amount is being entered by the user. Once the user starts the transaction the session will already be created and the payment will go smoother.
Start a transaction session (Java)
SoftPosService softPosService = SoftPosService.getInstance(this.applicationContext); //This method will return immediately and will continue in the background asynchronously. softPosService.initTransactionSession();
CCV has a single Payment API that support multiple payment solutions.
The following request starts a SoftPOS payment.
Response parameters
Parameter | Description |
---|---|
type | Fixed value: sale |
amount | The amount of the transaction |
currency | An ISO 4217 three-letter code. |
method | The payment method that the customer chooses. |
language | The language of the customer. |
details.terminalId | The terminal id as assigned by CCV. |
merchantOrderReference | Own reference, maximum 255 characters, of the order associated with this payment |
Example
{ "type": "sale", "amount": 5, "currency": "eur", "method": "softpos", "language": "eng", "details": { "terminalId": "SP001" } }
Response parameters
Parameter | Description |
---|---|
status | The status of the payment |
type | Fixed value: sale |
amount | The amount of the transaction |
currency | An ISO 4217 three-letter code. |
method | The payment method that the customer chooses. |
language | The language of the customer. |
reference | A reference, maximum 255 characters, of the order associated with this payment |
created | The local server datetime the payment was created, epoch timestamp. |
lastUpdate | The local server datetime the payment was updated, epoch timestamp. |
methodTransactionId | A third party transaction ID which identifies the payment transaction in external systems. If empty no such id was available or no third party was employed. |
details.terminalId | The terminal id as assigned by CCV. |
Example
{ "status": "pending", "type": "sale", "amount": 5, "currency": "eur", "method": "softpos", "language": "eng", "reference": "TL220621151342826CB87E2F6.0", "created": 1655817222828, "lastUpdate": 1655817222828, "methodTransactionId": "665b139a-ff38-44ed-be78-4ff010cbd31b", "details": { "terminalId": "SP001" } }
Start the transaction (Java)
SoftPosService softPosService = SoftPosService.getInstance(this.applicationContext); //The methodTransactionId comes from the response of the previous API request softPosService.startTransaction(activity, methodTransactionId, this::handleTransactionResult); private Unit handleTransactionResult(SoftPosTransactionResult result) { if(result instanceof TransactionSucceeded) { showAlertDialog("SoftPos Transaction", "Transaction succeeded"); } else if (result instanceof TransactionFailed) { showAlertDialog("SoftPos Transaction", "Transaction failed with error: " + ((TransactionFailed) result).getError()); } return Unit.INSTANCE; }
Deeplink url on development
ccvsoftpos-demo://transaction?methodTransactionId={methodTransactionId}&callback={callback}
ccvsoftpos-demo://transaction?methodTransactionId=myMethodTransactionId&callback=https%3A%2F%2Fccvposexample.eu%2Ftransaction-complete
Deeplink url on production
ccvsoftpos://transaction?methodTransactionId={methodTransactionId}&callback={callback}
ccvsoftpos://transaction?methodTransactionId=myMethodTransactionId&callback=https%3A%2F%2Fccvposexample.eu%2Ftransaction-complete
❗️The callback url needs to be URL encoded❗️
The callback should be a url scheme that will redirect to the webpage of the integrator. When the transaction completes the CCV SoftPOS app will redirect back to the callback url. Launching the callback url is a best effort from the CCV SoftPOS app. If the callback url is not url encoded or overal an invalid url, the CCV SoftPOS app will continue with the transaction but not launch the callback url on transaction completion.
https://ccvposexample.eu/transaction-complete?status=SUCCEEDED
https://ccvposexample.eu/transaction-complete?status=FAILED&failure=TRANSACTION_ERROR&failureCode=NETWORK_ERROR&internalErrorCode=31001&reason=NETWORK_CONNECTION_ERROR
❗️When launching the “ccvsoftpos://” deeplink with a path other then (installation or transaction) the transaction will fail with an INVALID_URL_SCHEME (11010) failure, only if a callback url is provided. If no callback url is provided, the CCV SoftPOS app will just close❗️
In the example above you saw that you receive a SoftPosTransactionResult from the SDK once the payment has completed. This result will be mainly used for error handling and collecting info in case of an issue. For receiving the status of the transaction with transaction receipts you will need to get the transaction info from our Payment API.
Response parameters
Parameter | Description |
---|---|
status | The status of the payment |
type | Fixed value: sale |
amount | The amount of the transaction |
currency | An ISO 4217 three-letter code. Fixed value: eur |
method | The payment method that the customer chooses. |
language | The language of the customer. |
merchantOrderReference | Own reference, maximum 255 characters, of the order associated with this payment |
reference | A reference, maximum 255 characters, of the order associated with this payment |
created | The local server datetime the payment was created, epoch timestamp. |
lastUpdate | The local server datetime the payment was updated, epoch timestamp. |
details.terminalId | The terminal id as assigned by CCV. |
Example
{ "type":"sale", "amount":5.00, "currency":"eur", "method":"softpos", "brand":"maestro", "language":"nld", "reference":"TL220621152314122CB87E2F4.0", "lastUpdate":1655817804294, "created":1655817794124, "status":"success", "details":{ "terminalId":"SP001", "customerReceipt":"[\" Kopie Kaarthouder\",\" \",\"********* PAS OP: TEST SYSTEEM *********\",\" \",\" \",\"Terminal: 20000002 Merchant: 1234 \",\"Periode: 2172 Transactie: 00003324\",\"Contactloze betaling\",\" (A0000000043060)\",\"Kaart: 67340xxxxxxxxxxxxxx\",\"Kaartnr: 01 Exp. Datum: 31/03/23\",\" \",\"BETALING\",\"21/06/2022 15:23 Auth. code: n0SG25\",\" \",\"Totaal: 5,00 EUR\",\" \",\" AKKOORD\"]", "journalReceipt":"[\" JOURNAAL\",\" \",\"********* PAS OP: TEST SYSTEEM *********\",\" \",\" \",\"Terminal: 20000002 Merchant: 1234 \",\"Periode: 2172 Transactie: 00003324\",\" (A0000000043060)\",\"Kaart: 67340xxxxxxxxxxxxxx\",\"Kaartnr: 01 Exp. Datum: 31/03/23\",\" \",\"BETALING\",\"21/06/2022 15:23 Auth. code: n0SG25\",\" \",\"Totaal: 5,00 EUR\",\" AKKOORD\",\"ACQUIRER ID: 00000002\",\"TRANSACTION TREATMENT RES. 0000\",\" ================\"]", "eJournal":"\r\n \r\n \r\n 20000002\r\n 1234\r\n \r\n \r\n 2172\r\n 00003324\r\n BETALING (Contactloze betaling)\r\n 2022-06-21T15:23\r\n n0SG25\r\n 5,00\r\n 5,00\r\n AKKOORD\r\n 00000002\r\n 0000\r\n \r\n \r\n Maestro\r\n \r\n \r\n 67340xxxxxxxxxxxxxx\r\n 01\r\n 31/03/23\r\n \r\n \r\n \r\n" } }