Quick Start

This document outlines the essential steps for integrating your e-commerce platform with PollenPay's financing services.

1. Initial Setup

Obtain API Key: You will be provided with a secret API key from PollenPay. This key is crucial for secure backend-to-backend communication and should be kept confidential.

2. Initiating a Financing Session (Your Backend)

When a customer chooses PollenPay as their payment option on your checkout, your backend system needs to:

  • Call PollenPay API: Make a POST request to the PollenPay /v1/sessions endpoint using your secret API key.
  • Provide Details: Include the customer's basket details (products, prices, quantities), any available customer information (email, phone), and the redirectSuccessUrl and redirectFailureUrl for your website.
  • Receive Session ID: PollenPay will respond with a unique sessionId.

3. Redirecting the Customer (Your Frontend)

After your backend successfully initiates the session:

  • Redirect Customer: Your frontend should redirect the customer's browser to the PollenPay application, passing the received sessionId as a URL parameter.

Example:

bash
https://app.pollenpay.com/finance?sessionId={your_session_id}

4. Customer Journey on PollenPay

The customer will interact directly with the PollenPay application to complete their financing application. This includes providing necessary details, undergoing credit checks, and confirming terms.

5. Returning to Your Website

Once the customer completes their journey on the PollenPay app (authorising or cancelling the payment), PollenPay will automatically redirect their browser back to the redirectSuccessUrl or redirectFailureUrl you provided. At this point, the transaction is authorised but not yet complete.

6. Finalising the Order (Your Backend)

This is a critical step. After the customer is redirected back to your success URL, your backend must call the settlement endpoint to finalise the transaction. This allows you to perform last-minute checks (e.g., stock availability, fraud analysis) before committing to the order.

  • Call Settle Endpoint: Make a POST request to the /v1/sessions/{sessionId}/settle endpoint.
  • Provide Final Status: In the request body, send {"status": "approved" } to confirm and create the order, or {"status": "rejected", "reason": "..." } to cancel it if your final checks do not pass.
  • Receive Confirmation: A successful settlement call will trigger the final order creation process in PollenPay.

7. Receiving Final Confirmation (Webhooks)

After you have called the settlement endpoint, PollenPay will send a final OrderEvent webhook to confirm the outcome (e.g., order.created, order.failed). You should rely on this webhook to update the order status in your system, fulfil the order, and confirm the details with your customer.

8. Managing Refunds (Your Backend)

If a customer returns items or cancels an order after it has been completed:

  • Initiate Refund: Your backend should make a POST request to the /v1/orders/{orderId}/refund endpoint.
  • Provide Refund Details: Include the orderId, the totalRefundAmount, a reason, and optionally a list of refundItems for partial refunds.
  • Receive Confirmation: PollenPay will process the refund and send a corresponding OrderEvent webhook to your system.

9. Postman Collection

To help you get started quickly, we provide a ready-to-use Postman collection with all API endpoints pre-configured with demo credentials.

Import this collection into Postman to start making API requests immediately. All endpoints are pre-configured with the demo merchant credentials shown above.