Paylink API
The Checkout Paylink API provides methods for managing Paylink payments and One Page Shop Solution payments.
Please check our Paylink API introduction here.
Base address
The Checkout Paylink REST APIs are collected under the following base address:
https://api.nets-pay.link/v1.0/:object/:id?instance=:instance
These are the basic URL's parameter and values:
- object - Paylink | Transaction
- id - Only used for request types GET, PUT and DELETE where only one entity gets modified.
- instance - The Checkout Paylink account name. If you access your Checkout Paylink payment page with example.nets-pay.link, the name would be example.
The payload data has to be url encoded (http://www.ietf.org/rfc/rfc3986.txt) and spaces will be percent encoded: "%20".
Scroll down for code samples, example requests and responses.
Select a language for code samples from the tabs or the mobile navigation menu.
API Signature
For security reasons we want you to pass an API signature calculated with the API Secret of your instance. The API signature is a HMAC RFC 2104: spaces must be represented as: + .
Check your Instance API secret key.
GET /SignatureCheck/
Use this endpoint to to verify the INSTANCE_API_SECRET
(Instance API secret key) to be correct. In case it is not correct, you get an error status.
Parameters
ApiSignaturestringrequired
Generate the Paylink API Signature by using your Instance API secret key and your Instance name.
instancestringrequired
Your Checkout Paylink account name. If you access your Checkout Paylink payment page with example.nets-pay.link, the name would be example.
Check your Instance API secret key.
- C#
- Shell
using System.Text; using System.Security.Cryptography; string key = "API-SECRET"; string message = "data1=value1&data2=value2"; byte[] keyByte = new UTF8Encoding().GetBytes(key); byte[] messageBytes = new UTF8Encoding().GetBytes(message); byte[] hashmessage = new HMACSHA256(keyByte).ComputeHash(messageBytes); var signature = Convert.ToBase64String(hashmessage);
Responses
200200optional
statusstringoptionalexample: success
dataarrayoptional
idintegeroptionalexample: 1
Raw
{ "status": "success", "data": [ { "id": 1 } ] }
Retrieve a Paylink
GET /Invoice/{id}/
Use this endpoint to verify a webhook you have received: If you get a webhook for a successful payment you can check whether this request has actually been paid.
Parameters
ApiSignaturestringrequired
Generate the Paylink API Signature by using your Instance API secret key and your Instance name.
idinteger (int32)required
The ID of the payment request.
instancestringrequired
Your Checkout Paylink account name. If you access your Checkout Paylink payment page with example.nets-pay.link, the name would be example.
Retrieve a Paylink
apiSignature=`echo -n "" | openssl dgst -sha256 -hmac "INSTANCE_API_SECRET" -binary | openssl enc -base64` curl --request GET "https://api.nets-pay.link/v1.0/Invoice/1/?instance=INSTANCE_NAME" --data-urlencode "ApiSignature=$apiSignature"
Responses
200Successoptional
statusstringoptionalexample: success
dataarrayoptional
idintegeroptionalexample: 1
statusstringoptionalexample: (waiting|confirmed|authorized|reserved)
hashstringoptionalexample: 382c85eab7a86278e3c3b06a23af2358
referenceIdstringoptionalexample: Order number of my online shop application
linkstringoptionalexample: https://demo.nets-pay.link/?payment=382c85eab7a86278e3c3b06a23af2358
invoicesarrayoptional
preAuthorizationintegeroptionalexample: 0
namestringoptionalexample: Online-Shop payment #001
apibooleanoptionalexample: true
fieldsobjectoptional
titleobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
forenameobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
surnameobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
companyobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
streetobjectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
postcodeobjectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
placeobjectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
countryobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
phoneobjectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
emailobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
date_of_birthobjectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
termsobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
custom_field_1objectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
namesobjectoptional
destringoptionalexample: This is a field
enstringoptionalexample: This is a field
frstringoptionalexample: This is a field
itstringoptionalexample: This is a field
custom_field_2objectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
namesobjectoptional
destringoptional
enstringoptional
frstringoptional
itstringoptional
custom_field_3objectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
namesobjectoptional
destringoptional
enstringoptional
frstringoptional
itstringoptional
pspintegeroptionalexample: 1
pmarrayoptional
purposestringoptionalexample: Shop Order #001
amountintegeroptionalexample: 590
vatRatenumberoptionalexample: 7.7
currencystringoptionalexample: CHF
skustringoptionalexample: P01122000
subscriptionStatebooleanoptionalexample: false
subscriptionIntervalstringoptional
subscriptionPeriodstringoptional
subscriptionPeriodMinAmountintegeroptionalexample: 0
subscriptionCancellationIntervalstringoptional
createdAtintegeroptionalexample: 1418392958
- Raw
- Python JSON dict
{ "status": "success", "data": [ { "id": 1, "status": "(waiting|confirmed|authorized|reserved)", "hash": "382c85eab7a86278e3c3b06a23af2358", "referenceId": "Order number of my online shop application", "link": "https://demo.nets-pay.link/?payment=382c85eab7a86278e3c3b06a23af2358", "invoices": [], "preAuthorization": 0, "name": "Online-Shop payment #001", "api": true, "fields": { "title": { "active": true, "mandatory": true }, "forename": { "active": true, "mandatory": true }, "surname": { "active": true, "mandatory": true }, "company": { "active": true, "mandatory": true }, "street": { "active": false, "mandatory": false }, "postcode": { "active": false, "mandatory": false }, "place": { "active": false, "mandatory": false }, "country": { "active": true, "mandatory": true }, "phone": { "active": false, "mandatory": false }, "email": { "active": true, "mandatory": true }, "date_of_birth": { "active": false, "mandatory": false }, "terms": { "active": true, "mandatory": true }, "custom_field_1": { "active": true, "mandatory": true, "names": { "de": "This is a field", "en": "This is a field", "fr": "This is a field", "it": "This is a field" } }, "custom_field_2": { "active": false, "mandatory": false, "names": { "de": "", "en": "", "fr": "", "it": "" } }, "custom_field_3": { "active": false, "mandatory": false, "names": { "de": "", "en": "", "fr": "", "it": "" } } }, "psp": 1, "pm": [], "purpose": "Shop Order #001", "amount": 590, "vatRate": 7.7, "currency": "CHF", "sku": "P01122000", "subscriptionState": false, "subscriptionInterval": "", "subscriptionPeriod": "", "subscriptionPeriodMinAmount": 0, "subscriptionCancellationInterval": "", "createdAt": 1418392958 } ] }
Remove a Paylink
DELETE /Invoice/{id}/
Parameters
idinteger (int32)required
The ID of the payment request (paylink).
ApiSignaturestringoptional
Generate the Paylink API Signature by using your Instance API secret key and your Instance name.
instancestringrequired
Your Paylink instance name. If you access your Checkout Paylink payment page with example.nets-pay.link, the name would be example.
Remove a Paylink
apiSignature=`echo -n "" | openssl dgst -sha256 -hmac "INSTANCE_API_SECRET" -binary | openssl enc -base64` curl --request DELETE "https://api.nets-pay.link/v1.0/Invoice/1/?instance=INSTANCE_NAME" --data-urlencode "ApiSignature=$apiSignature"
Responses
200200optional
statusstringoptionalexample: success
dataarrayoptional
idintegeroptionalexample: 1
Raw
{ "status": "success", "data": [ { "id": 1 } ] }
Create a Paylink
POST /Invoice/
To connect the created Invoice with the payment (Transaction), you must use the link provided in the response from POST as href of your modal box markup or build it yourself from the also provided hash. Using the referenceId
for that purpose will not work as expected, even when the demo results suggest that in some vague way.
If you have set up a webshop and would like to integrate Checkout Paylink as your payment solution then it is necessary for you to create an invoice in the Checkout Paylink system which you can then display as a payment form to the customer. The response generates an Invoice ID
which you can use to identify the successful payment.
Parameters
ApiSignaturestringoptional
Generate the Paylink API Signature by using your Instance API secret key and your Instance name.
instancestringrequired
Your Checkout Paylink account name. If you access your Checkout Paylink payment page with example.nets-pay.link, the name would be example.
Create a Paylink
apiSignature=`echo -n "amount=8925&vatRate=7.7¤cy=CHF&sku=P01122000&pm%5B0%5D=visa&preAuthorization=0&reservation=0&referenceId=975382&title=Test&description=Testdescription&purpose=This+is+a+test&fields%5Bforename%5D%5Bmandatory%5D=1&fields%5Bforename%5D%5BdefaultValue%5D=Max&fields%5Bsurname%5D%5Bmandatory%5D=0&fields%5Bsurname%5D%5BdefaultValue%5D=Muster" | openssl dgst -sha256 -hmac "INSTANCE_API_SECRET" -binary | openssl enc -base64` curl --request POST "https://api.nets-pay.link/v1.0/Invoice/?instance=INSTANCE_NAME" \ --data-urlencode "amount=8925" \ --data-urlencode "vatRate=7.7" \ --data-urlencode "currency=CHF" \ --data-urlencode "sku=P01122000" \ --data-urlencode "pm[0]=visa" \ --data-urlencode "preAuthorization=0" \ --data-urlencode "reservation=0" \ --data-urlencode "referenceId=975382" \ --data-urlencode "title=Test" \ --data-urlencode "description=Testdescription" \ --data-urlencode "purpose=This is a test" \ --data-urlencode "fields[forename][mandatory]=1" \ --data-urlencode "fields[forename][defaultValue]=Max" \ --data-urlencode "fields[surname][mandatory]=0" \ --data-urlencode "fields[surname][defaultValue]=Muster" \ --data-urlencode "ApiSignature=$apiSignature"
Request body
titlestringrequired
This is the page title which will be shown on the payment page.
descriptionstringrequired
This is a description which will be shown on the payment page.
referenceIdstringrequired
An internal reference id used by your system.
purposestringrequired
The purpose of the payment.
amountinteger (int32)required
The amount of the payment in cents.
vatRatenumber (float)optional
VAT rate percentage
currencystringrequired
The currency of the payment.
pspmixed typeoptional
The psp which should be used for the payment. (Can be an array of integers.)
pmarrayoptional
List of payment methods names to display
skustringoptional
Product stock keeping unit
preAuthorizationbooleanoptional
Whether charge payment manually at a later date (type authorization).
reservationbooleanoptional
Whether charge payment manually at a later date (type reservation).
namestringoptional
This is an internal name of the payment page. This name will be displayed to the administrator only.
fieldsarrayoptional
The contact data fields which should be displayed. See fields for more.
hideFieldsbooleanoptional
Hide the whole contact fields section on invoice page
concardisOrderIdstringoptional
Only available for Concardis PSP and if the custom ORDERID option is activated in PSP settings in the Checkout Paylink administration. This ORDERID will be transferred to the Payengine.
buttonTextstringoptional
Custom pay button text.
expirationDatestring (date)optional
Expiration date for link.
successRedirectUrlstringoptional
URL to redirect to after successful payment.
failedRedirectUrlstringoptional
URL to redirect to after failed payment.
subscriptionStatebooleanoptional
Defines whether the payment should be handled as subscription.
subscriptionIntervalstringoptional
Payment interval.
subscriptionPeriodstringoptional
Duration of the subscription.
subscriptionCancellationIntervalstringoptional
Defines the period, in which a subscription can be canceled.
attachmentsstring (binary)optional
Provide your customers file attachments.
Request body
{ "title": "string", "description": "string", "referenceId": "string", "purpose": "string", "amount": 0, "vatRate": null, "currency": "string", "psp": null, "pm": [ "string" ], "sku": "string", "preAuthorization": false, "reservation": false, "name": "string", "fields": [ "string" ], "hideFields": false, "concardisOrderId": "string", "buttonText": "string", "expirationDate": "2019-08-24", "successRedirectUrl": "string", "failedRedirectUrl": "string", "subscriptionState": false, "subscriptionInterval": "string", "subscriptionPeriod": "string", "subscriptionCancellationInterval": "string", "attachments": "string" }
Responses
200200optional
statusstringoptionalexample: success
dataarrayoptional
idintegeroptionalexample: 1
hashstringoptionalexample: 382c85eab7a86278e3c3b06a23af2358
referenceIdstringoptionalexample: Order number of my online shop application
linkstringoptionalexample: https://demo.nets-pay.link/?payment=382c85eab7a86278e3c3b06a23af2358
invoicesarrayoptional
preAuthorizationintegeroptionalexample: 0
reservationintegeroptionalexample: 0
namestringoptionalexample: Online-Shop payment #001
apibooleanoptionalexample: true
fieldsobjectoptional
titleobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
forenameobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
surnameobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
companyobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
streetobjectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
postcodeobjectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
placeobjectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
countryobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
phoneobjectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
emailobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
date_of_birthobjectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
termsobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
privacy_policyobjectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
custom_field_1objectoptional
activebooleanoptionalexample: true
mandatorybooleanoptionalexample: true
namesobjectoptional
destringoptionalexample: This is a field
enstringoptionalexample: This is a field
frstringoptionalexample: This is a field
itstringoptionalexample: This is a field
custom_field_2objectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
namesobjectoptional
destringoptional
enstringoptional
frstringoptional
itstringoptional
custom_field_3objectoptional
activebooleanoptionalexample: false
mandatorybooleanoptionalexample: false
namesobjectoptional
destringoptional
enstringoptional
frstringoptional
itstringoptional
pspintegeroptionalexample: 1
pmarrayoptional
purposestringoptionalexample: Shop Order #001
amountintegeroptionalexample: 590
vatRatenumberoptionalexample: 7.7
currencystringoptionalexample: CHF
skustringoptionalexample: P01122000
subscriptionStatebooleanoptionalexample: false
subscriptionIntervalstringoptional
subscriptionPeriodstringoptional
subscriptionPeriodMinAmountstringoptional
subscriptionCancellationIntervalstringoptional
createdAtintegeroptionalexample: 1418392958
Raw
{ "status": "success", "data": [ { "id": 1, "hash": "382c85eab7a86278e3c3b06a23af2358", "referenceId": "Order number of my online shop application", "link": "https://demo.nets-pay.link/?payment=382c85eab7a86278e3c3b06a23af2358", "invoices": [], "preAuthorization": 0, "reservation": 0, "name": "Online-Shop payment #001", "api": true, "fields": { "title": { "active": true, "mandatory": true }, "forename": { "active": true, "mandatory": true }, "surname": { "active": true, "mandatory": true }, "company": { "active": true, "mandatory": true }, "street": { "active": false, "mandatory": false }, "postcode": { "active": false, "mandatory": false }, "place": { "active": false, "mandatory": false }, "country": { "active": true, "mandatory": true }, "phone": { "active": false, "mandatory": false }, "email": { "active": true, "mandatory": true }, "date_of_birth": { "active": false, "mandatory": false }, "terms": { "active": true, "mandatory": true }, "privacy_policy": { "active": true, "mandatory": true }, "custom_field_1": { "active": true, "mandatory": true, "names": { "de": "This is a field", "en": "This is a field", "fr": "This is a field", "it": "This is a field" } }, "custom_field_2": { "active": false, "mandatory": false, "names": { "de": "", "en": "", "fr": "", "it": "" } }, "custom_field_3": { "active": false, "mandatory": false, "names": { "de": "", "en": "", "fr": "", "it": "" } } }, "psp": 1, "pm": [], "purpose": "Shop Order #001", "amount": 590, "vatRate": 7.7, "currency": "CHF", "sku": "P01122000", "subscriptionState": false, "subscriptionInterval": "", "subscriptionPeriod": "", "subscriptionPeriodMinAmount": "", "subscriptionCancellationInterval": "", "createdAt": 1418392958 } ] }
Charge a Pre-Authorized/Reserved Transaction
POST /Transaction/{id}/
Parameters
idinteger (int32)required
ID of the transacton to charge.
ApiSignaturestringoptional
Calculated Paylink API Signature.
instancestringrequired
Your Checkout Paylink account name (instance).
Charge a Pre-Authorized/Reserved Transaction
apiSignature=`echo -n "amount=8925" | openssl dgst -sha256 -hmac "INSTANCE_API_SECRET" -binary | openssl enc -base64` curl --request POST "https://api.nets-pay.link/v1.0/Transaction/2/?instance=INSTANCE_NAME" \ --data-urlencode "amount=8925" \ --data-urlencode "ApiSignature=$apiSignature"
Request body
amountinteger (int32)optional
Amount for charge in cents.
purposestringoptional
The purpose of the charge.
referenceIdstringoptional
Reference ID for charged transaction. Will be available in transaction webhook.
Request body
{ "amount": 0, "purpose": "string", "referenceId": "string" }
Responses
200200optional
statusstringoptionalexample: success
dataarrayoptional
idintegeroptionalexample: 2
uuidstringoptionalexample: 81d545ca
timestringoptionalexample: 2017-10-16 12:29:12
statusstringoptionalexample: confirmed
langstringoptionalexample: de
pspstringoptionalexample: NETSEasy
Result
{ "status": "success", "data": [ { "id": 2, "uuid": "81d545ca", "time": "2017-10-16 12:29:12", "status": "confirmed", "lang": "de", "psp": "NETSEasy" } ] }
Retrieve a Transaction
GET /Transaction/{id}/
Parameters
ApiSignaturestringrequired
Generate the Paylink API Signature by using your Instance API secret key and your Instance name.
idinteger (int32)required
The ID of the payment request (paylink).
instancestringrequired
Your Checkout Paylink account name. If you access your Checkout Paylink payment page with example.nets-pay.link, the name would be example.
Retrieve a Transaction
apiSignature=`echo -n "" | openssl dgst -sha256 -hmac "INSTANCE_API_SECRET" -binary | openssl enc -base64` curl --request GET "https://api.nets-pay.link/v1.0/Transaction/1/?instance=INSTANCE_NAME" --data-urlencode "ApiSignature=$apiSignature"
Responses
200200optional
Result
{ "status": "success", "data": [ { "id": 1, "uuid": "f384000b", "status": "authorized", "time": "2020-01-20 15:56:02", "lang": "de", "pageUuid": "892dcf5c", "payment": { "brand": "visa" }, "psp": "NETSEasy", "pspId": 49, "mode": "LIVE", "referenceId": "ORDER#321", "invoice": { "currencyAlpha3": "CHF", "products": [ { "quantity": 1, "name": "Hoodie", "amount": 5900 }, { "quantity": 2, "name": "T-Shirt", "amount": 2850 } ], "discount": { "code": "SUPERSALE", "percentage": 33, "amount": 3828 }, "shippingAmount": 150000, "totalAmount": 9272, "customFields": { "20": { "name": "Additional Information", "value": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." } } }, "contact": { "id": 16, "uuid": "9c9c0282", "company": "FeelGood", "title": "mister", "firstname": "Hans", "lastname": "Schmid", "street": "Dorstrasse 11", "zip": "1234", "place": "Habern", "country": "Schweiz", "countryISO": "CH", "date_of_birth": "10.03.1989", "email": "info@example.com", "phone": "+413312345678", "delivery_company": "NewFashion", "delivery_title": "miss", "delivery_firstname": "Fabienne", "delivery_lastname": "Muster", "delivery_street": "Seestrasse 39", "delivery_zip": "4321", "delivery_place": "Nechters", "delivery_country": "Schweiz", "delivery_countryISO": "CH" } } ] }
Delete a Reserved Transaction
DELETE /Transaction/{id}/
Parameters
idinteger (int32)required
The ID of the payment request (paylink) to cancel/delete.
ApiSignaturestringoptional
Generate the Paylink API Signature by using your Instance API secret key and your Instance name.
instancestringrequired
Your Checkout Paylink account name. If you access your Checkout Paylink payment page with example.nets-pay.link, the name would be example.
Delete a Reserved Transaction
apiSignature=`echo -n "" | openssl dgst -sha256 -hmac "INSTANCE_API_SECRET" -binary | openssl enc -base64` curl --request DELETE "https://api.nets-pay.link/v1.0/Transaction/1/?instance=INSTANCE_NAME" --data-urlencode "ApiSignature=$apiSignature"
Responses
200200optional
statusstringoptionalexample: success
dataarrayoptional
idintegeroptionalexample: 1
Result
{ "status": "success", "data": [ { "id": 1 } ] }
Refund a Transaction
POST /Transaction/{id}/refund
Parameters
idinteger (int32)required
The ID of the payment request (paylink) to refund.
ApiSignaturestringoptional
Generate the Paylink API Signature by using your Instance API secret key and your Instance name.
instancestringrequired
Your Checkout Paylink account name. If you access your Checkout Paylink payment page with example.nets-pay.link, the name would be example.
Refund a Transaction
apiSignature=`echo -n "amount=8925" | openssl dgst -sha256 -hmac "INSTANCE_API_SECRET" -binary | openssl enc -base64` curl --request POST "https://api.nets-pay.link/v1.0/Transaction/2/refund/?instance=INSTANCE_NAME" \ --data-urlencode "amount=8925" \ --data-urlencode "ApiSignature=$apiSignature"
Request body
amountinteger (int32)optional
Custom amount to refund in cents. If not set, the whole amount will be refunded.
Request body
{ "amount": 0 }
Responses
200200optional
statusstringoptionalexample: success
dataarrayoptional
idintegeroptionalexample: 2
uuidstringoptionalexample: 81d545ca
timestringoptionalexample: 2020-03-17 12:29:12
statusstringoptionalexample: refunded
langstringoptionalexample: de
pspstringoptionalexample: NETSEasy
Result
{ "status": "success", "data": [ { "id": 2, "uuid": "81d545ca", "time": "2020-03-17 12:29:12", "status": "refunded", "lang": "de", "psp": "NETSEasy" } ] }
Retrieve Transactions
GET /Transaction/
Parameters
ApiSignaturestringrequired
Generate the Paylink API Signature by using your Instance API secret key and your Instance name.
instancestringrequired
Your Checkout Paylink account name. If you access your Checkout Paylink payment page with example.nets-pay.link, the name would be example.
Retrieve Transactions
apiSignature=`echo -n "filterDatetimeUtcGreaterThan=2020-01-20+14%3A55%3A00&filterDatetimeUtcLessThan=2020-01-25+19%3A00%3A50&offset=30&limit=2" | openssl dgst -sha256 -hmac "YOUR_SECRET" -binary | openssl enc -base64` curl --request GET "https://api.nets-pay.link/v1.0/Transaction//?instance=YOUR_INSTANCE_NAME" \--data-urlencode "filterDatetimeUtcGreaterThan=2020-01-20 14:55:00" \--data-urlencode "filterDatetimeUtcLessThan=2020-01-25 19:00:50" \--data-urlencode "offset=30" \--data-urlencode "limit=2" \--data-urlencode "ApiSignature=$apiSignature"
Request body
filterDatetimeUtcGreaterThanstring (date)optional
Lower DateTime limit in the format of YYYY-MM-DD MM:HH:SS
filterDatetimeUtcLessThanstring (date)optional
Upper DateTime limit in the format of YYYY-MM-DD HH:MM:SS
offsetinteger (int32)optional
Row count to be used as offset.
limitinteger (int32)optional
Max row count.
Request body
{ "filterDatetimeUtcGreaterThan": "2019-08-24", "filterDatetimeUtcLessThan": "2019-08-24", "offset": 0, "limit": 0 }
Responses
200200optional
statusstringoptionalexample: success
dataarrayoptional
idintegeroptionalexample: 1
uuidstringoptionalexample: f384000b
statusstringoptionalexample: authorized
timestringoptionalexample: 2020-01-20 15:56:02
langstringoptionalexample: de
pageUuidstringoptionalexample: 892dcf5c
paymentobjectoptional
brandstringoptionalexample: visa
pspstringoptionalexample: NETSEasy
pspIdintegeroptionalexample: 49
modestringoptionalexample: LIVE
referenceIdstringoptionalexample: ORDER#321
invoiceobjectoptional
currencyAlpha3stringoptionalexample: CHF
productsarrayoptional
quantityintegeroptionalexample: 1
namestringoptionalexample: Hoodie
amountintegeroptionalexample: 5900
discountobjectoptional
codestringoptionalexample: SUPERSALE
percentageintegeroptionalexample: 33
amountintegeroptionalexample: 3828
shippingAmountintegeroptionalexample: 150000
totalAmountintegeroptionalexample: 9272
customFieldsobjectoptional
20objectoptional
namestringoptionalexample: Additional Information
valuestringoptionalexample: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
contactobjectoptional
idintegeroptionalexample: 16
uuidstringoptionalexample: 9c9c0282
companystringoptionalexample: FeelGood
titlestringoptionalexample: mister
firstnamestringoptionalexample: Hans
lastnamestringoptionalexample: Schmid
streetstringoptionalexample: Dorstrasse 11
zipstringoptionalexample: 1234
placestringoptionalexample: Habern
countrystringoptionalexample: Schweiz
countryISOstringoptionalexample: CH
date_of_birthstringoptionalexample: 10.03.1989
emailstringoptionalexample: info@example.com
phonestringoptionalexample: +413312345678
delivery_companystringoptionalexample: NewFashion
delivery_titlestringoptionalexample: miss
delivery_firstnamestringoptionalexample: Fabienne
delivery_lastnamestringoptionalexample: Muster
delivery_streetstringoptionalexample: Seestrasse 39
delivery_zipstringoptionalexample: 4321
delivery_placestringoptionalexample: Nechters
delivery_countrystringoptionalexample: Schweiz
delivery_countryISOstringoptionalexample: CH
Result
{ "status": "success", "data": [ { "id": 1, "uuid": "f384000b", "status": "authorized", "time": "2020-01-20 15:56:02", "lang": "de", "pageUuid": "892dcf5c", "payment": { "brand": "visa" }, "psp": "NETSEasy", "pspId": 49, "mode": "LIVE", "referenceId": "ORDER#321", "invoice": { "currencyAlpha3": "CHF", "products": [ { "quantity": 1, "name": "Hoodie", "amount": 5900 }, { "quantity": 2, "name": "T-Shirt", "amount": 2850 } ], "discount": { "code": "SUPERSALE", "percentage": 33, "amount": 3828 }, "shippingAmount": 150000, "totalAmount": 9272, "customFields": { "20": { "name": "Additional Information", "value": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." } } }, "contact": { "id": 16, "uuid": "9c9c0282", "company": "FeelGood", "title": "mister", "firstname": "Hans", "lastname": "Schmid", "street": "Dorstrasse 11", "zip": "1234", "place": "Habern", "country": "Schweiz", "countryISO": "CH", "date_of_birth": "10.03.1989", "email": "info@example.com", "phone": "+413312345678", "delivery_company": "NewFashion", "delivery_title": "miss", "delivery_firstname": "Fabienne", "delivery_lastname": "Muster", "delivery_street": "Seestrasse 39", "delivery_zip": "4321", "delivery_place": "Nechters", "delivery_country": "Schweiz", "delivery_countryISO": "CH" } }, { "id": 223, "uuid": "d2571806", "status": "confirmed", "time": "2020-01-20 16:25:58", "lang": "de", "pageUuid": "892dcf5c", "payment": { "brand": "visa" }, "psp": "NETSEasy", "pspId": 49, "mode": "LIVE", "referenceId": "ORDER#322", "invoice": { "currencyAlpha3": "CHF", "products": [ { "name": "T-Shirt", "quantity": 1, "amount": 2850 } ], "discount": null, "shippingAmount": 150000, "totalAmount": 4350, "customFields": null }, "contact": { "id": 16, "uuid": "9c9c0282", "company": "", "title": "mister", "lastname": "Muster", "firstname": "Hans", "street": "Dorfstrasse 49", "zip": "1234", "place": "Habern", "country": "Schweiz", "countryISO": "CH", "date_of_birth": "10.03.1989", "email": "info@example.com", "phone": "", "delivery_company": "", "delivery_title": "0", "delivery_firstname": "", "delivery_lastname": "", "delivery_street": "", "delivery_zip": "", "delivery_place": "", "delivery_country": "", "delivery_countryISO": "" } } ] }
Capture a Transaction
POST /Transaction/{id}/capture
Parameters
idinteger (int32)required
The ID of the payment request (paylink) to charge.
ApiSignaturestringoptional
Generate the Paylink API Signature by using your Instance API secret key and your Instance name.
instancestringrequired
Your Checkout Paylink account name. If you access your Checkout Paylink payment page with example.nets-pay.link, the name would be example.
Capture a Transaction
apiSignature=`echo -n "" | openssl dgst -sha256 -hmac "INSTANCE_API_SECRET" -binary | openssl enc -base64` curl --request POST "https://api.nets-pay.link/v1.0/Transaction/2/capture/?instance=INSTANCE_NAME" \ --data-urlencode "ApiSignature=$apiSignature"
Responses
200200optional
statusstringoptionalexample: success
dataarrayoptional
idintegeroptionalexample: 2
uuidstringoptionalexample: 81d545ca
timestringoptionalexample: 2017-10-16 12:29:12
statusstringoptionalexample: confirmed
langstringoptionalexample: de
pspstringoptionalexample: NETSEasy
Result
{ "status": "success", "data": [ { "id": 2, "uuid": "81d545ca", "time": "2017-10-16 12:29:12", "status": "confirmed", "lang": "de", "psp": "NETSEasy" } ] }