PayNow API Reference
website·Indexed 35 days ago
https://docs.paynow.plDocumentation for the PayNow payment gateway, featuring API version 3.0.5 and legacy version 1. Includes guides and endpoints for creating payments, managing refunds, card tokenization, white label payments, payment links, and GDPR clause retrieval.
What's inside PayNow
- Paynow Marketplace allows platforms (partners) to process single transactions involving multiple sellers. The system automatically splits funds based on defined transfers to each participating seller.
Overview of Paynow Card Tokenization
v3Card tokenization allows merchants to save card data as a unique token, enabling customers with shop accounts to process subsequent payments without re-entering card details. Tokenization occurs on the Paynow page after redirection. Payments with saved cards can be handled via the Paynow paywall or via a 'White Label' model where the card is selected directly in the shop checkout.Get started with Paynow API integration
Paynow (part of the mBank Group) provides secure payment services for e-commerce. Developers can access the following resources to begin integration:
- API Documentation: General integration and usage descriptions.
- API Reference: Detailed descriptions of Paynow API endpoints.
- Postman Workspace: A repository of Postman collections containing API usage examples.
- Business FAQ: Information regarding payments for business operations.
For technical support, contact support@paynow.pl.
Understand the Paynow Multi-payouts model
v3Multi-payouts is a payment model for a closed group of sellers operating under one shared URL. It allows a customer to make a single payment that is automatically split between multiple legal entities (each with their own seller accounts) or distributed across multiple payout accounts for a single merchant.
Key characteristics include:
- Hierarchy: Consists of one Lead entity and one or more Additional entities.
- Customer Experience: The buyer sees a single checkout and is unaware of the internal payment split.
- Fund Distribution: Paynow performs the split based on instructions from the lead entity.
- Commissions: Paynow can deduct and pass a commission from additional entities to the lead entity for platform maintenance.
- Refunds: All refunds are initiated via the lead entity's API access.
Understand PayNow Payments API architecture
The PayNow Payments API follows the REST architectural pattern. All communication between the server and clients is conducted via JSON messages. Request data must be included within the body of the HTTP requests.Handle GDPR compliance for White Label payments
v1Because White Label payments bypass the Paynow payment page, the merchant is responsible for displaying legally required GDPR information about the payment operator.
- Retrieve the GDPR clauses from the Notices endpoint. This content can be cached but should not be hardcoded.
- Display the
titleandcontentof the notice to the buyer on the store's website. - Send a link to the store and a screenshot of the embedded GDPR clauses to support@paynow.pl for verification.
Failure to complete this verification will result in the White Label feature being disabled. In that case, providing an
authorizationCodefor BLIK payments will trigger aBAD_REQUESTerror.{ "title": "mElements S.A. with its registered office in Warsaw, 00-850 at ul. Prosta 18 is the controller of your personal data.", "content": "The personal data provided by the Buyer will be used by mElements S.A. to execute the payment transaction...", "locale": "en-GB" }Set up and integrate Multi-payouts
v3To integrate Multi-payouts, follow these steps:
- Create a sandbox account at
https://panel.sandbox.paynow.pl/auth/register. - Contact Paynow support via email (
support@paynow.pl) to activate the Multi-payouts feature. - Confirm the shared URL used by the cooperating entities.
- Specify the number of additional entities required.
- Retrieve your API credentials.
- Integrate with the Paynow API.
- Test both positive and negative payment paths.
- Test the refund process on your platform.
- Create a sandbox account at
Implement White Label Pay-by-Link (PBL) and PayPo payments
v3To use White Label for PBL and PayPo methods, create a payment using a predefined payment method following the standard process for predefined payment methods.Implement White Label BLIK payments
v3White Label integration for BLIK allows buyers to enter their authorization code directly on the store's website instead of being redirected to a payment gateway. To implement this, you must first retrieve the list of payment methods to identify the BLIK method whereauthorizationTypeis equal toCODE. When creating the payment request, you must include theauthorizationCodefield.{ "amount": "409272", "externalId": "c7b55386-ba45-4537-96a5-bb77c6910418", "paymentMethodId": 2007, "currency": "PLN", "description": "Testowa transakcja", "continueUrl": "https://melements.pl", "buyer": { "email": "jan.kowalski@melements.pl", "firstName": "Jan", "lastName": "Kowalski", "locale": "pl-PL", "phone": { "prefix": "+48", "number": "120932212" } }, "authorizationCode": "123456" }Process payments and refunds with Multi-payouts
v3Multi-payouts uses the same logic and request structure as the Paynow Marketplace integration. To process a payment or refund, use the Marketplace API structures where each
sellerIdin the request is assigned to a specific Additional entity.Important Considerations for Refunds:
- It is recommended to check seller balances before initiating a refund.
- You can enable 'Awaiting refunds' in the shop settings via the Paynow Merchant Panel.
Update Paynow plugins for saved card payments
v3To support saved card payments, ensure your Paynow plugin is updated to at least the following versions (latest versions are recommended):
- Prestashop: 1.7.1 or higher
- Woocommerce: 2.5.1 or higher
- Magento: 1.5.0 or higher
Handle asynchronous payment status notifications
v3Paynow sends asynchronous notifications via HTTP POST requests to a configurednotification URLwhenever a payment status changes. To ensure security and message integrity, your system must validate theSignatureheader of every incoming notification; if the calculated signature does not match the header value, the message should be ignored.# Example of a notification message received by your server curl -X POST \ <notification URL> \ -H 'Signature: F69sbjUxBX4eFjfUal/Y9XGREbfaRjh/zdq9j4MWeHM=' \ -H 'Content-Type: application/json' \ -d \ '{ "paymentId": "NOLV-8F9-08K-WGD", "externalId": "9fea23c7-cd5c-4884-9842-6f8592be65df", "status": "CONFIRMED", "modifiedAt": "2024--06-01T13:24:52" }'