- 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.
Request parameters
| Parameter | Description |
|---|---|
| amount | The amount of the transaction |
| currency | An ISO 4217 three-letter code. |
| method | Fixed value: softpos |
| language | The language of the customer. |
| merchantOrderReference | Custom¹ reference. |
| details.terminalId | The terminal id as assigned by CCV. |
¹Min/MaxLength: 1/100
Allowed character A–Z a–z 0–9 <space> / - ? : ( ) . , ' + & * @ #
Example
{
"amount": 0.01,
"currency": "eur",
"method": "softpos",
"language": "eng",
"merchantOrderReference": "Test1234",
"details": {
"terminalId": "123456"
}
}
Response parameters
| Parameter | Description |
|---|---|
| status | The status of the payment |
| reference | A reference, maximum 255 characters, used to retrieve transaction result |
| method | Fixed value: softpos |
| type | Fixed value: sale |
| language | The language of the customer. |
| currency | An ISO 4217 three-letter code. |
| lastUpdate | The local server datetime the payment was updated, epoch timestamp. |
| created | The local server datetime the payment was created, epoch timestamp. |
| methodTransactionId | A reference used to start the transaction |
| amount | The amount of the transaction |
| merchantOrderReference | Custom reference (if included in the Payment API Request). |
| details.terminalId | The terminal id as assigned by CCV. |
Example
{
"status": "pending",
"reference": "SP123456789ABC123456ABC123.A",
"method": "softpos",
"type": "sale",
"language": "eng",
"currency": "eur",
"lastUpdate": 1761919895087,
"created": 1761919895083,
"methodTransactionId": "SP123456789ABC123456ABC123.A",
"amount": 0.01,
"merchantOrderReference": "Test1234",
"returnUrl": "https://onlinepayments.ccv.eu/payredirect/return?reference=SP123456789ABC123456ABC123.A",
"details": {
"terminalId": "123456"
}
}
public class MainActivity extends Activity {
//The methodTransactionId comes from the response of the previous API request
void startTransaction(String methodTransactionId) {
SoftPosService softPosService = SoftPosService.Companion.getInstance(this.getApplicationContext());
softPosService.startTransaction(this, 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");
}
return Unit.INSTANCE;
}
}
class MainActivity : Activity() {
//The methodTransactionId comes from the response of the previous API request
fun startTransaction(methodTransactionId: String) {
val softPosService = getInstance(this.getApplicationContext())
softPosService.startTransaction(
this,
methodTransactionId
) { ::handleTransactionResult }
}
private fun handleTransactionResult(result: SoftPosTransactionResult) {
if (result is TransactionSucceeded) {
showAlertDialog("SoftPos Transaction", "Transaction succeeded")
} else if (result is TransactionFailed) {
showAlertDialog("SoftPos Transaction", "Transaction failed with error")
}
}
}
SoftPosTransactionResult is either a
TransactionSucceeded in case of successTransactionFailed in case of failureIn case of TransactionFailed, the failures are grouped in 4 categories/subclasses
TransactionFailedError: A device state or timeout caused the transaction to failTransactionFailedCancelled: The transaction was cancelled (potentially by the user)TransactionFailedNotAuthorised: Authorisation failed because of card or host issuesTransactionFailedInternalError: An unexpected error occurred| Field | Java getter | Kotlin field | More details |
|---|---|---|---|
| Reason | getReason() | reason | More detailed error id, indicating the reason for the failure (not present for TransactionFailedInternalError) |
| Internal Error Code | getInternalErrorCode() | internalErrorCode | Internal id of the failure. To be reported to CCV in case of unexpected errors |
Possible values for reason and how to handle these is described here: Transaction errors
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 an 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.
In case of a successful transaction the callback will be followed by a status: {callback}?status=SUCCEEDED
https://ccvposexample.eu/transaction-complete?status=SUCCEEDED
In case of a failed transaction the callback will be followed by a status, a failure and failureCode with an optional internalErrorCode and optional reason: {callback}?status=FAILED&failure={FAILURE}&failureCode={failure_code}&internalErrorCode={internal_error_code}&reason={REASON}
https://ccvposexample.eu/transaction-complete?status=FAILED&failure=TRANSACTION_ERROR&failureCode=13000&internalErrorCode=31001&reason=NETWORK_ERROR
| Callback parameter | Details |
|---|---|
| status | Either SUCCEEDED or FAILED |
| failure | Numeric (int) representation of the failure |
| failureCode | String representation of the failure |
| reason | More detailed error id, indicating the reason for the failure |
| internalErrorCode | Internal id of the failure. To be reported to CCV in case of unexpected errors |
Possible values for failure(Code) and how to handle these is described here: Transaction errors
❗️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 |
| reference | A reference, maximum 255 characters, used to retrieve transaction result |
| merchantOrderReference | Custom reference (if included in the Payment API Request). |
| amount | The amount of the transaction. |
| type | Fixed value: sale. |
| currency | An ISO 4217 three-letter code. |
| language | The language of the customer. |
| method | Fixed value: softpos |
| brand | The brand name of the used card. |
| entryMode | Fixed value: ecom. |
| methodTransactionId | A reference used to start the transaction |
| created | The local server datetime the payment was created, epoch timestamp. |
| lastUpdate | The local server datetime the payment was updated, epoch timestamp. |
| statusFinalDate | The local server datetime the payment reached a final status, epoch timestamp. |
| details.terminalId | The terminal id as assigned by CCV. |
| details.cardCircuit | The Card Circuit for the merchant as an escaped JSON string. |
| details.customerReceipt | The receipt for the customer as an escaped JSON string. The content can be parsed to a JSON array |
| details.journalReceipt | The journal receipt for the merchant as an escaped JSON string. The content can be parsed to a JSON array |
| details.eJournal | The E-Journal for the merchant as an escaped JSON string. The content can be parsed to a XML. |
| details.receiptData | Additional receipt data that can be parsed to JSON Object.. |
Example
{
"reference": "SP123456789ABC123456ABC123.A",
"merchantOrderReference": "Test1234",
"amount": 0.01,
"type": "sale",
"status": "success",
"currency": "eur",
"language": "eng",
"method": "softpos",
"brand": "mastercard",
"entryMode": "ecom",
"returnUrl": "https://onlinepayments.ccv.eu/payredirect/return?reference=SP123456789ABC123456ABC123.A",
"methodTransactionId": "SP123456789ABC123456ABC123.A",
"created": 1761919895083,
"lastUpdate": 1761919905347,
"statusFinalDate": 1761919905347,
"details": {
"terminalId": "123456",
"cardCircuit": "MASTERCARD",
"customerReceipt": "[\"Customer's receipt\",\" \",\"CCV\",\"ARNHEM\",\" \",\"Terminal: ****3456\",\"Merchant: ****3456\",\" \",\"Retrieval reference: 123abc123\",\" \",\"Transaction: bfa7293e-3d9b-f9b3-887e-d37089e1b4d8\",\" \",\"MASTERCARD(a0000000041010)\",\"Card: xxxxxxxxxxxxx1234\",\"Card Sequence Nr: 00\",\" \",\"PAYMENT\",\"Date: 31/10/2025 15:11\",\"Auth. code: 123456\",\"Merchant Ref.: Test1234\",\" \",\"Total: 0.01 EUR\",\"Contactless payment\",\"Verified by consumer device\",\" \",\"ACCEPTED\"]",
"journalReceipt": "[\"Merchant's receipt\",\" \",\"CCV\",\"ARNHEM\",\" \",\"Terminal: CT123456\",\"Merchant: 123456\",\" \",\"Retrieval reference: 123abc123\",\" \",\"Transaction: bfa7293e-3d9b-f9b3-887e-d37089e1b4d8\",\" \",\"MASTERCARD(a0000000041010)\",\"Card: xxxxxxxxxxxxx1234\",\"Card Sequence Nr: 00\",\" \",\"PAYMENT\",\"Date: 31/10/2025 15:11\",\"Auth. code: 123456\",\"Merchant Ref.: Test1234\",\" \",\"Total: 0.01 EUR\",\"Contactless payment\",\"Verified by consumer device\",\" \",\"ACCEPTED\"]",
"eJournal": "<E-Journal><ShopInfo><CardAcceptorName>CCV</CardAcceptorName><CardAcceptorLocation>ARNHEM</CardAcceptorLocation><CardAcceptorIdentifier>123456</CardAcceptorIdentifier><TerminalIdentifier>CT123456</TerminalIdentifier></ShopInfo><TransactionInfo><TransactionIdentifier>bfa7293e-3d9b-f9b3-887e-d37089e1b4d8</TransactionIdentifier><ServiceLabelName>PAYMENT</ServiceLabelName><DateAndTime>31/10/2025 15:11</DateAndTime><AuthorisationCode>123456</AuthorisationCode><MerchantReference>Test1234</MerchantReference><TotalAmount Currency=\"EUR\">0.01</TotalAmount><TransactionResultText>ACCEPTED</TransactionResultText></TransactionInfo><CardInfo><ApplicationIdentifier>DEBIT MASTERCARD</ApplicationIdentifier><CardNumber>xxxxxxxxxxxxx1234</CardNumber><CardSequenceNumber>00</CardSequenceNumber></CardInfo></E-Journal>"
"receiptData": "{\"transactionId\":\"bfa7293e-3d9b-f9b3-887e-d37089e1b4d8\",\"retrievalReferenceNumber\":\"123abc123\",\"merchantOrderReference\":\"Test1234\",\"terminalId\":\"CT123456\",\"merchantId\":\"123456\",\"merchantName\":\"CCV\",\"merchantLocation\":\"ARNHEM\",\"merchantLanguage\":\"eng\",\"aid\":\"a0000000041010\",\"brand\":\"DEBIT MASTERCARD\",\"cardPreferredName\":null,\"maskedCardNumber\":\"xxxxxxxxxxxxx1234\",\"panEnd\":\"1234\",\"cardSequenceNumber\":\"00\",\"transactionType\":\"purchase\",\"timeStampUtc\":\"2025-10-31T14:11:45.213Z\",\"requestDateTimeFormatted\":\"31/10/2025 15:11\",\"amount\":1,\"amountFormatted\":\"0.01\",\"currency\":\"EUR\",\"authorisationCode\":\"123456\",\"acquirerResponse\":\"APPROVED\",\"cardholderVerificationMethod\":\"NONE\",\"posEntryMode\":\"CONTACTLESS\",\"localTransactionDateTimeIso\":\"2025-10-31T15:11:36\",\"localTransactionDateTimeFormatted\":\"31/10/2025 15:11\"}",
}
}