The request must have the following headers:
Content-Type: application/json
Accept-Language: en-US
Origin: { Origin }
We use cookies (our own and those of third parties) to make our websites easier for you to use in accordance with your browser settings. By continuing to use our websites, you consent to the use of cookies. Please see our Cookie Policy for more information on cookies and information on how you can change your browser's cookie settings: Cookie Policy.
Last changes: 12-01-2022
The API method Creates a Payment Link and a linked QR code.
The request must have the following headers:
Content-Type: application/json
Accept-Language: en-US
Origin: { Origin }
Field | Mandatory | Description | Type | Length |
instantPayment | Yes | A flag, which represents if the order confirmation is required, before continuing with the payment processing. | Boolean | 5 |
successUrl | Yes | URL that will be used to redirect the consumer in case the payment is processed successfully | String | 255 |
failureUrl | Yes | URL that will be used to redirect the consumer in case the payment fails | String | 255 |
customerAccountId | No |
Customer Account ID – A unique identifier provided by the integrating merchant by which the user’s account can be identified e.g. customer number. If provided, SmartPay checks if an account exists, if it does it processes the transaction using the account or alternatively it creates a new account using the identifier. If this parameter is omitted the transaction is processed as a guest payment; without the option to persists the payment option for future payments. | String | 255 |
payment | Yes | The payment amount to be charged against the payment option. | Payment | Object |
billingAddress | Yes | Billing address of the consumer. | Address | Object |
shippingAddress | No | Shipping address of the consumer. | Address | Object |
consumer | Yes | Consumer's personal information. | Person | Object |
orderDetails | No | Order details for the payment transaction. | Order details | Object |
Financial institution's risk management is applicable on storing and verifying payment options, even though no charge is made at that point in time. Therefore, your consumer's personal information is already required within this initialization request.
Please refer to our data model for details regarding the referenced objects.
Path:
POST {Base URL}/payment-links/
Header:
Content-Type:
application/json
Accept-Language:
en-US
{
"instantPayment": false,
"successUrl": "https://google.com/",
"failureUrl": "https://yahoo.com/",
"payment": {
"currencyCode": "EUR",
"amount": 800.2,
"description": "VWFS*SMARTPAY*01BA"
},
"billingAddress": {
"addressLine1": "Leopoldstrasse",
"addressLine2": "line 2",
"addressLine3": "line 3",
"number": "244",
"city": "Munich",
"postCode": "80807",
"countryCode": "DE"
},
"customerAccountId":"test6gN4aJIR7B",
"consumer": {
"lastName": "Johny",
"firstName": "Doe",
"emailAddress": "test6gN4aJIR7B@mail.com",
"dateOfBirth":"1980-10-19"
},
"orderDetails": {
"externalOrderReference": "Test 123",
"orderPositions": [
{
"positionNumber": 1,
"positionType": "Physical",
"articleId": "321456",
"articleName": "tire 1",
"quantity": 4,
"netAmount": 384,
"taxAmount": 16,
"grossAmount": 400.1,
"taxRatePercent": 4,
"netPrice": 1536,
"taxPrice": 64,
"grossPrice": 1600
},
{
"positionNumber": 2,
"positionType": "Physical",
"articleId": "321456",
"articleName": "tire 2",
"quantity": 4,
"netAmount": 384,
"taxAmount": 16,
"grossAmount": 400.1,
"taxRatePercent": 4,
"netPrice": 1536,
"taxPrice": 64,
"grossPrice": 1600
}
]
}
}
The Payment Link Creation response includes the Payment URL and the QR code URL, pointing to the QR code as a PNG image.
{
"id": "1fae0965-1ad3-4a4e-ac12-bcda333cef2a",
"creationDate": "2022-11-30T18:14:51.227Z",
"paymentUrl": "https://hpp.cons.smartpay.vwfs.io/1fae0965-1ad3-4a4e-ac12-bcda333cef2a",
"qrCodeUrl": "https://hpp.cons.smartpay.vwfs.io/assets/359a5691-dcdd-4a12-87e6-458630e3ce46/qrCodes/1fae0965-1ad3-4a4e-ac12-bcda333cef2a.png"
}
If you receive an HTTP status other then 2xx, the request failed. Please try to interpret the response message to correct your request and contact customer support in case of further questions.
Document version 1.0 - 2022-11-30 - HPP documentation