Payment Links
Create payment link
You can use the following endpoint to create a payment link that redirects your customer to the Checkout solution.
Please refer to https://docs.fiserv.dev/public/reference/postpaymentlinks
In order to configure the checkout session, you can use the following elements under the object checkoutSettings
:
Field name | Description |
---|---|
locale | Use this parameter to specify the language of the payment page. Currently supported languages are English (en_US), German( de_DE) etc. |
preSelectedPaymentMethod | You can use this parameter to specify the preferred payment method. For example, if you pass cards as the preferred payment method, only Cards as a payment method will be displayed. If this parameter is not defined, we will display all the available payment methods for the store. |
webHooksUrl | The URL endpoint to post the real time notifcation in the form of JSON payload. This url is provided by receiver application. |
redirectBackUrls | Object contains redirect URL details for successUrl and failureUrl |
Webhooks notification
You can receive webhook notifications when a transaction is performed with all the information related to the event.
Following is the sample webhook notification for a card payment _(Please note that based on the payment method used, webhook notification might differ).
Example:
[
{
"id": "31311b20-5312-426f-a17a-bca009e105a8",
"retryNumber": 0,
"type": "hpp.transaction.success",
"storeId": "1109950006",
"merchantTransactionId": "merchant1",
"hppTransactionId": "8dfdc537-4475-4db8-a1eb-88cc710f8a56",
"ipgTransactionId": "84404678970",
"ipgTransactionStatus": "APPROVED",
"transactionType": "SALE",
"paymentMethod": "card",
"approvedAmount": "1828.00",
"approvedAmountCurrency": "EUR",
"dccAccepted": false,
"tokenId": "11B849FB-3FCC-4B5B-926E-9CA926653115",
"tokenReusable": true,
"declineDuplicateToken": false
}
]
Open question: is the notification sent to the webHooksUrl?
If you want to capture on your own web site, then you can use the paymentMethodDetails
object to pass specific details for a credit/debit card, a SEPA direct debit or PayPal payment.
By using the paymentLinkDetails
you can set the expiry date of the generated payment link.
In the response to the POST request you will receive the checkoutId
Get the details of a payment link
To retrieve the details of payment link that has been previously created, you can use the endpoint https://docs.fiserv.dev/public/reference/getpaymentlinks.
Example response:
{ "paymentLink": { "active": true, "paymentLinkId": "pPhaKh", "expiryDateTime": "2023-01-05T08:21:35.625533Z" }, "checkoutId": "7ce2e740-fe99-4a0d-9956-7d6d9a6ffdb6", "storeId": "1109950006", "orderId": "PL-da502b8a-8e45-4ec4-b0bf-1b53f492cf78" }
Updated about 2 months ago