Payment Link Creation API

Last changes: 12-01-2022

The API method Creates a Payment Link and a linked QR code.

API Parameters

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

Example

Request

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
            }
        ]
    }

}

Response

{
    "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"
}

Document version 1.0 - 2022-11-30 - HPP documentation