How the payment flow works
For the integration, you receive a Terminal ID and an API token from Pin Vandaag. The API works with CCV and Worldline terminals; certain functions are brand-specific and are indicated per endpoint.
Supported payment terminals
Transaction statuses
The status values work the same way for Worldline and CCV. Other response fields may differ per route and payment provider.
| Status | Meaning |
|---|---|
started | The transaction has been sent to the terminal. |
pending | The customer is busy at the terminal; the transaction has not yet been completed. |
success | The payment was successful. |
failed | The payment was declined or aborted. |
Available endpoints
/services/iban/name-check
POST/instore/clients/create
GET/transactions_dashboard/search
POST/instore/transactions/start
POST/instore/transactions/status
POST/instore/transactions/stop
POST/instore/transactions/mail
POST/instore/transactions/refund
POST/instore/transactions/ctmp
GET/instore/transactions/{terminal}/{limit}/{page}
POST/instore/transactions/last_transaction
Where can you find the Terminal ID and the API key?
You can find the details of a payment terminal in PinPortal.nl. Log in with your customer or partner account and follow these steps:
- Click the relevant customer.
- Click Bewerk klant (Edit customer).
- Open the Overige (Other) tab.
- Click API Keys.
- The Terminal ID appears in the overview.
- The corresponding API KEY is shown next to the Terminal ID.
Interactive API tester
Run REST API commands from this page. The web page first sends the command to a secure proxy on the same domain; that proxy then calls the Pin Vandaag REST API. Choose an endpoint, enter your API key and the required values and click Run. The HTTP status and response appear directly below the form.
Authentication
Using X-API-KEY
curl --location 'https://rest-api.pinvandaag.com/V2' \
--header 'X-API-KEY: API_TOKEN'<?php
$apiKey = 'API_TOKEN';
$headers = [
'X-API-KEY: ' . $apiKey,
];
$ch = curl_init('https://rest-api.pinvandaag.com/V2');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);Legacy method: Basic Authentication (not recommended for new integrations)
Send an Authorization header with Basic Authentication with every request: Authorization: Basic base64(API_KEY:SECRET). No separate token is issued; the header is sent with every request. For new integrations, we recommend the X-API-KEY header.
<?php
$apiKeyAndSecret = 'sleutel:geheim';
$encoded = base64_encode($apiKeyAndSecret);
$headers = ['Authorization: Basic ' . $encoded];
$ch = curl_init('https://rest-api.pinvandaag.com/V2');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);HTTP status codes
Version 2 returns appropriate HTTP status codes. This allows you to handle errors more reliably and see more quickly whether input is missing, a terminal does not exist or there is a server problem.
IBAN name check
Checks a Dutch IBAN and compares the specified account holder. The function works exclusively for Dutch IBANs.
| Field | Required | Description |
|---|---|---|
name | Yes | Name of the account holder. |
iban | Yes | Dutch IBAN, exactly 18 characters. Pattern: ^NL[0-9]{2}[A-Z]{4}[0-9]{10}$ |
curl --location --request POST \
'https://rest-api.pinvandaag.com/V2/services/iban/name-check' \
--header 'X-API-KEY: API_TOKEN' \
--form 'name="REKENINGHOUDER_NAAM"' \
--form 'iban="NL44ABNA0543946959"'Example response
{
"status": "success",
"message": "IBAN has been checked",
"http_code": 200,
"data": {
"IBANCheckTransactionResponse": {
"IBAN": "NL44ABNA0543946959",
"AssumedName": "Test Holder",
"DebtorReference": "1682765065",
"IBANCheckResult": {
"IBANResult": "SERVICE_TEMPORARILY_NOT_AVAILABLE"
}
}
}
}The exact content of data may differ depending on the information linked to the IBAN.
Create a client in PinPortal
Partners can use this to automatically register a new customer in PinPortal.
Required fields
| Field | Description |
|---|---|
kvk | The customer's Chamber of Commerce (KvK) number. |
iban | The customer's IBAN. |
iban_name | Name of the account holder. |
phone | The customer's phone number. |
email | The customer's email address. |
ubo_sex | UBO gender: f or m. |
ubo_firstname | First name of the UBO. |
ubo_lastname | Surname of the UBO. |
ubo_phone | Phone number of the UBO. |
ubo_email | Email address of the UBO. |
ubo_birthdate | Date of birth in the format dd-mm-YYYY. |
ubo_nationality | Nationality of the UBO. |
ubo_address | Address of the UBO. |
ubo_postcode | Postcode of the UBO. |
ubo_city | Town or city of residence of the UBO. |
ubo_country | Country code of the UBO. |
Show all optional fields
vat (VAT number) and web (website URL) are optional. For a second, third or fourth UBO, you can add the same details with the prefix ubo2_, ubo3_ or ubo4_.
| UBO 2 to 4 | Available suffixes |
|---|---|
ubo2_*, ubo3_*, ubo4_* | sex, firstname, lastname, phone, email, birthdate, nationality, address, postcode, city, country |
curl --location --request POST \
'https://rest-api.pinvandaag.com/V2/instore/clients/create' \
--header 'X-API-KEY: API_TOKEN' \
--form 'kvk="01234567"' \
--form 'iban="NL01BANK0123456789"' \
--form 'iban_name="Bank Account Name"' \
--form 'vat="NL012345678B01"' \
--form 'phone="0612345678"' \
--form 'email="[email protected]"' \
--form 'ubo_sex="f"' \
--form 'ubo_firstname="Voornaam"' \
--form 'ubo_lastname="Achternaam"' \
--form 'ubo_phone="0612345678"' \
--form 'ubo_email="[email protected]"' \
--form 'ubo_birthdate="31-12-1987"' \
--form 'ubo_nationality="Nederlandse"' \
--form 'ubo_address="Straat 1"' \
--form 'ubo_postcode="1234AB"' \
--form 'ubo_city="Amsterdam"' \
--form 'ubo_country="NL"'{
"status": "success",
"message": "Client created with id 50065"
}Search transactions
Retrieves transactions for Worldline, CCV, PIN, iDEAL, Cloud Connect and MultiSafepay.
Optional query parameters
| Parameter | Description |
|---|---|
clients | For partners: comma-separated client IDs. |
terminals | Comma-separated terminal IDs. |
datefrom | Start date as a UNIX timestamp. Default: first day of the current month. |
dateto | End date as a UNIX timestamp. Default: current day. |
amountfrom | Minimum amount in euros. |
amountto | Maximum amount in euros. |
transaction_type | sepay (PIN), pay (iDEAL), cc (Cloud Connect), msp (MultiSafepay) or all. |
show_failed | 1 to show failed transactions; 0 to hide them. |
group_by | customerId or date. |
buckaroo_type | amex, maestro, mastercard, mastercard debit, vpay, visa, visa debit or all. |
curl --location --request GET \
'https://rest-api.pinvandaag.com/V2/instore/transactions_dashboard/search?transaction_type=pay&show_failed=0&datefrom=1664575200&dateto=1664920800&terminals=CT164623,CT236543' \
--header 'X-API-KEY: API_TOKEN'{
"status": "ok",
"data": {
"status": "success",
"message": "Transacties gevonden",
"data": {
"date_from": "2022-09-30T22:00:00.000000Z",
"date_to": "2022-10-04T22:00:00.000000Z",
"amount_from": 0,
"amount_to": 0,
"transactions": [
{"id": 1135554309, "customer_id": 12019, "time": "2022-10-04T21:03:29+00:00", "amount": 45.98, "type": "iDEAL"},
{"id": 1135539732, "customer_id": 12019, "time": "2022-10-04T20:44:23+00:00", "amount": 57.21, "type": "iDEAL"}
]
}
}
}Start transaction
Starts a new payment on the selected terminal. Amounts are always specified in cents.
| Field | Type | Description |
|---|---|---|
terminal_id | Required | Terminal on which the payment is started. |
amount | Required | Amount in cents; € 12.50 becomes 1250. |
callbackUrl | Optional | HTTPS URL at which the webhook is received. |
ownReference | Optional | Your own unique order or payment reference. |
ReturnUrl | Optional | CCV only: URL to which the user returns. |
curl --location --request POST \
'https://rest-api.pinvandaag.com/V2/instore/transactions/start' \
--header 'X-API-KEY: API_TOKEN' \
--form 'terminal_id="TERMINAL_ID"' \
--form 'amount="1250"' \
--form 'callbackUrl="https://uw-app.nl/webhooks/pinvandaag"' \
--form 'ownReference="ORDER-2026-001"'{
"transactionId": "2405102",
"status": "started",
"amount": 1250,
"terminal": "50303253",
"createdAt": "2022-06-25 17:10:36",
"callbackUrl": "https://uw-app.nl/webhooks/pinvandaag",
"ownReference": "ORDER-2026-001"
}Get transaction status
Retrieves the current status of a payment transaction.
| Field | Required | Description |
|---|---|---|
terminal_id | Yes | Terminal on which the transaction took place. |
transaction_id | Yes | ID from the start transaction response. |
curl --location --request POST \
'https://rest-api.pinvandaag.com/V2/instore/transactions/status' \
--header 'X-API-KEY: API_TOKEN' \
--form 'terminal_id="TERMINAL_ID"' \
--form 'transaction_id="TRANSACTION_ID"'CCV · successful
{
"transactionId": "TL220611120248997CB8FB114.1",
"status": "success",
"amount": 1,
"terminal": "706249441",
"createdAt": "2022-06-11 12:01:29",
"callbackUrl": null,
"paymentUrl": null,
"errorMsg": null,
"ownReference": null,
"receipt": "[...]",
"journalReceipt": "[...]"
}CCV · failed
{
"transactionId": "TL220618175406586CB893D27.2",
"status": "failed",
"amount": 1,
"terminal": "706249441",
"createdAt": "2022-06-18 17:53:46",
"callbackUrl": null,
"receipt": null,
"paymentUrl": "https://redirect.jforce.be/terminal/poll?reference=...",
"errorMsg": "processing_error",
"ownReference": null
}Worldline · successful
{
"transactionId": "2340636",
"status": "success",
"amount": 1,
"terminal": "50303253",
"createdAt": "2022-06-18 16:23:45",
"callbackUrl": null,
"incidentCode": null,
"errorMsg": null,
"ownReference": null,
"receipt": "[...]"
}Worldline · failed
{
"transactionId": "2340627",
"status": "failed",
"amount": 1,
"terminal": "50303253",
"createdAt": "2022-06-18 16:22:39",
"callbackUrl": null,
"receipt": null,
"incidentCode": "2628",
"errorMsg": "External Equipment Cancellation",
"ownReference": null
}Cancel transaction
Only cancels a transaction that is being processed by the terminal at that moment. For Worldline and CCV, always use the same request with both terminal_id and transaction_id. This keeps your integration uniform when you switch terminal brands.
| Field | Required | Description |
|---|---|---|
terminal_id | Yes | ID of the terminal on which the transaction is being processed. |
transaction_id | Yes | ID from the start transaction response; always include it for Worldline and CCV. |
curl --location --request POST \
'https://rest-api.pinvandaag.com/V2/instore/transactions/stop' \
--header 'X-API-KEY: API_TOKEN' \
--form 'terminal_id="TERMINAL_ID"' \
--form 'transaction_id="TRANSACTION_ID"'Send receipt by email
Sends the receipt of a successful transaction to the customer.
| Field | Required | Description |
|---|---|---|
terminal_id | Yes | Terminal on which the transaction succeeded. |
transaction_id | Yes | ID of the successful transaction. |
email | Yes | Email address of the recipient. |
curl --location --request POST \
'https://rest-api.pinvandaag.com/V2/instore/transactions/mail' \
--header 'X-API-KEY: API_TOKEN' \
--form 'terminal_id="TERMINAL_ID"' \
--form 'transaction_id="TRANSACTION_ID"' \
--form 'email="[email protected]"'Start refund
Starts a refund on the payment terminal. The customer holds their card to the terminal; the refund then proceeds just like a payment. Amounts are always specified in cents.
| Field | Required | Description |
|---|---|---|
terminal_id | Yes | Terminal on which the refund is carried out. |
amount | Yes | Amount to be refunded in cents; € 12.50 becomes 1250. |
transaction_id | Optional | CCV only: transaction_id of the original payment on this terminal. The refund is then linked to that payment; with a lower amount it is a partial refund. Without this field, it is a standalone refund. |
callbackUrl | Optional | HTTPS URL at which the webhook is received. |
ownReference | Optional | Your own reference, for example the return or order number. |
curl --location --request POST \
'https://rest-api.pinvandaag.com/V2/instore/transactions/refund' \
--header 'X-API-KEY: API_TOKEN' \
--form 'terminal_id="TERMINAL_ID"' \
--form 'amount="1250"' \
--form 'callbackUrl="https://uw-app.nl/webhooks/pinvandaag"' \
--form 'ownReference="RETOUR-2026-001"'curl --location --request POST \
'https://rest-api.pinvandaag.com/V2/instore/transactions/refund' \
--header 'X-API-KEY: API_TOKEN' \
--form 'terminal_id="TERMINAL_ID"' \
--form 'amount="500"' \
--form 'transaction_id="TRANSACTION_ID_VAN_DE_BETALING"'{
"status": "started",
"type": "refund",
"terminal": 706249441,
"amount": 500,
"transaction_id": "TL260611120248997CB8FB114.1",
"original_transaction_id": "TL260610093112412CB8FA201.1",
"payment_url": "https://redirect.jforce.be/terminal/poll?reference=...",
"createdAt": "2026-06-11 12:02:48",
"callbackUrl": "https://uw-app.nl/webhooks/pinvandaag",
"ownReference": "RETOUR-2026-001"
}For Worldline, the response also contains status and transaction_id; the other fields come directly from Worldline.
CTMP request
Makes a Worldline terminal manually retrieve a new configuration from the Worldline server.
| Field | Required | Description |
|---|---|---|
terminal_id | Yes | Terminal to which the CTMP request is sent. |
curl --location --request POST \
'https://rest-api.pinvandaag.com/V2/instore/transactions/ctmp' \
--header 'X-API-KEY: API_TOKEN' \
--form 'terminal_id="TERMINAL_ID"'Transaction list per terminal
| Parameter | Required | Description |
|---|---|---|
TERMINAL_ID | Yes | Terminal whose transactions are retrieved. |
LIMIT | Yes | Maximum number of results, from 1 to 100. |
PAGE | Yes | Page number to retrieve. |
datefrom | Optional | Start date as a UNIX timestamp. |
dateto | Optional | End date as a UNIX timestamp. |
curl --location --request GET \
'https://rest-api.pinvandaag.com/V2/instore/transactions/TERMINAL_ID/LIMIT/PAGE/?datefrom=FROM_TIMESTAMP&dateto=TO_TIMESTAMP' \
--header 'X-API-KEY: API_TOKEN'Get last transaction
| Field | Required | Description |
|---|---|---|
terminal_id | Yes | Terminal whose last transaction is retrieved. |
curl --location --request POST \
'https://rest-api.pinvandaag.com/V2/instore/transactions/last_transaction' \
--header 'X-API-KEY: API_TOKEN' \
--form 'terminal_id="TERMINAL_ID"'Response on 200
{
"id": 1,
"status": "failed",
"terminal": "12345678",
"amount": 1,
"transaction_id": "123456789",
"own_reference": "",
"which_api": "Worldline|CCV",
"created_at": "2024-04-05T00:00:00+00:00",
"updated_at": "2024-04-05T00:00:00+00:00",
"callback_url": "",
"payment_url": null,
"receipt": null,
"incident_code": "1",
"error_msg": "",
"cancel_counter_ccv": null
}Fields such as payment_url and receipt can contain null or a string. cancel_counter_ccv can be null or an integer.
Error statuses
- 400: invalid or missing POST data; the response contains validation_errors.
- 404: terminal not found or there are no transactions.
- 500: internal server error; please contact the Pin Vandaag development team.
{
"status": "error",
"http_code": 400,
"message": {
"error": "Invalid data was provided.",
"validation_errors": {
"terminal_id": {
"integer": "The Terminal id must be integer"
}
}
},
"data": null
}Receiving the webhook
The webhook is only called when the transaction status changes. With /transactions/start, include a publicly accessible HTTPS URL in callbackUrl.
Delivery
The webhook is sent as a POST with a JSON body (Content-Type: application/json) to your callbackUrl.
{
"transactionId": "1234567",
"status": "failed",
"amount": 1,
"terminal": "12345678",
"createdAt": "2022-07-08 18:21:03",
"callbackUrl": "https://uw-app.nl/webhooks/pinvandaag",
"paymentUrl": null,
"receipt": null,
"ownReference": "ORDER-2026-001"
}Recommended processing
- Only accept HTTPS requests on your callback URL.
- Look up the payment via transactionId and/or ownReference.
- Make processing idempotent: the same status must never complete an order twice.
- Process success as successful; treat failed as failed. Any other status is not yet final (see Transaction statuses).
- If in doubt, request the status again via the status endpoint.
- Log the received body securely, without storing your API key.
PHP SDK and support
Pin Vandaag offers a small PHP SDK package for REST API v2. You can use the package directly or take it as an example for your own implementation.
composer require pinvandaag/pin-php-sdk