Skip to main content

Payment links

You can generate payment links and provide them to Buyers yourself (e.g. by e-mail or SMS) so that they can complete a payment themselves using their chosen payment method.

Step 1: Send a POST request with the prepared message to the payment link request endpoint:

curl --request POST 'https://api.sandbox.paynow.pl/v3/payments/links' \
-H 'Content-Type: application/json' \
-H 'Api-Key: 97a55694-5478-43b5-b406-fb49ebfdd2b5' \
-H 'Signature: lGOrwYvoRYwWcKSEtE/YDn8go1w/i5dj8Rv/ytIvXVE=' \
-H 'Idempotency-Key: 59c6dd26-f905-487b-96c9-fd1d2bd76885' \
--data-raw '{
"amount": 45671,
"externalId": "234567898654",
"description": "Test transaction",
"buyer": {
"email": "jan.kowalski@melements.pl"
}
}'
Notice

Remember that the request must include the Host and Accept headers as described here. They are not listed above because the curl command includes them by default.

Step 2: Handle the returned response:

{
"url": "https://paywall.sandbox.paynow.pl/NOLV-8F9-08K-WGD?token=******",
"paymentId": "NOLV-8F9-08K-WGD",
"status": "NEW"
}

The response contains:

  • url - the address that should be provided to the Buyer,
  • paymentId - the payment identifier generated by Paynow,
  • status - the current payment status.

The returned paymentId should be stored by the Merchant for further use.

Next steps​

The subsequent steps of the process (handling statuses, notifications, etc.) are the same as described in the Make a payment section.