Payment Link Creation API

Last changes: 03-13-2024

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

API Parameters

Field Description Type Length Mandatory
instantPayment A flag, which represents if the order confirmation is required, before continuing with the payment processing. Boolean 5 Yes
successUrl URL that will be used to redirect the consumer in case the payment is processed successfully. If not provided, the end consumer would be redirected to the SmartPay default success page. String 255 No
failureUrl URL that will be used to redirect the consumer in case the payment fails. If not provided, the end consumer would be redirected to the SmartPay default failure page. String 255 No
customerAccountId 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 No
payment The payment amount to be charged against the payment option. Payment Object Yes
billingAddress Billing address of the consumer. Address Object Yes
shippingAddress Shipping address of the consumer. Address Object No
consumer Consumer's personal information. Person Object Conditional. Mandatory if "businessConsumer" object is not provided.
businessConsumer Business/Company information. businessConsumer Object Conditional. Mandatory if "consumer" object is not provided.
order Order details for the payment transaction. Order Object No

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"
    },
    "order": {
        "externalOrderReference": "123-333",    
        "lines":[
            {
                "lineNumber": 1,
                "itemArticleId":"321456",
                "itemName":"tires A",
                "quantity":2,
                "unitPrice":125,
                "unitVatPrice":0,
                "unitGrossPrice":125,
                "vatPercent":0,
                "netAmount":250,
                "vatAmount":0,
                "grossAmount":250
            },
            {
                "lineNumber": 1,
                "itemArticleId":"321456",
                "itemName":"tires B",
                "quantity":2,
                "unitPrice":125,
                "unitVatPrice":0,
                "unitGrossPrice":125,
                "vatPercent":0,
                "netAmount":250,
                "vatAmount":0,
                "grossAmount":250
            }
        ]
    }

}

Response

{
    "id": "f69e6ca5bbdc19d23537c7323ddda81ea7bbb74113d1cd27fbd842cf2c6a6f2f",
    "creationDate": "2023-04-17T10:14:59.742Z",
    "paymentUrl": "https://hpp.int.smartpay.vwfs.io/f69e6ca5bbdc19d23537c7323ddda81ea7bbb74113d1cd27fbd842cf2c6a6f2f",
    "qrCodeUrl": "https://hpp.int.smartpay.vwfs.io/assets/eef298c1-6ed3-4bf3-a9c0-31e5d96182c7/qrCodes/f69e6ca5bbdc19d23537c7323ddda81ea7bbb74113d1cd27fbd842cf2c6a6f2f.png"
}

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