API Reference
Complete reference for PollenPay REST API. All requests require authentication.
/v1/sessionsParameters
totalAmountTotal amount to be billed the customer provided as integer in the minor currency unit (pence, cents, etc). If ommited will be automatically calcualated based on he basket.
basketDetails of the customer's basket.
Array items contain:
basket[].nameName of the product.
basket[].referenceIdID or reference of the product used internally.
basket[].priceInteger price of the product in the minor currency unit (pence, cents, etc).
basket[].currencyCurrency of the price (e.g., 'GBP', 'USD').
basket[].vatValue Added Tax percentage.
basket[].qtyQuantity of the product.
basket[].discountDiscount applied to the product, percentage value (e.g., '10' for 10%).
otherBilledItemsDetails of non product-related cost items, like shipping, discounts, fees, etc.
Array items contain:
otherBilledItems[].typeType of additional billable item: 'tax', 'discount', or 'fee'.
otherBilledItems[].nameName of the item.
otherBilledItems[].priceInteger price of the product in the minor currency unit (pence, cents, etc).
otherBilledItems[].currencyCurrency of the price (e.g., 'GBP', 'USD').
customerInfoOptional basic customer information.
Object properties:
customerInfo.referenceIdCustomer's ID or reference used internally.
customerInfo.emailCustomer's email address.
customerInfo.phoneCustomer's phone number.
customerInfo.nameCustomer's full name.
redirectSuccessUrlThe URL on the merchant's site to redirect to upon successful financing.
redirectFailureUrlThe URL on the merchant's site to redirect to upon financing failure or cancellation.
Responses
Request
{
"basket": [
{
"referenceId": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"name": "Fancy Shoes",
"price": 7500,
"currency": "GBP",
"qty": 1,
"vat": 20
}
],
"otherBilledItems": [
{
"type": "fee",
"name": "Shipping",
"price": 999,
"currency": "GBP"
}
],
"customerInfo": {
"email": "customer@example.com",
"phone": "+447123456789"
},
"redirectSuccessUrl": "https://merchant.com/order-success",
"redirectFailureUrl": "https://merchant.com/order-fail"
}Response Examples
/v1/sessions/{sessionId}/statusParameters
sessionIdThe ID of the financing session.
Responses
Returns the current status of the session.
Response Examples
{
"sessionId": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"basketId": "b1c2d3e4-f5a6-7890-1234-567890abcdef",
"status": "customer_actions_pending",
"redirectSuccessUrl": "https://merchant.com/order-success",
"redirectFailureUrl": "https://merchant.com/order-fail",
"orderId": "o1r2d3e4-f5g6-7890-1234-567890abcdef"
}/v1/sessions/{sessionId}/settleParameters
sessionIdThe ID of the financing session to settle.
statusThe final status of the order from the merchant's perspective. 'approved' will create the order, 'rejected' will terminate the session.
reasonA reason for the rejection. Required if the status is 'rejected'.
withOrderIf true, the response will include the full order object.
Responses
The settlement was processed successfully. Returns the final order details if successful, or a confirmation of failure. If withOrder is true, the full order object is returned.
Request
{
"status": "approved"
}Response Examples
{
"orderId": "o1r2d3e4-f5g6-7890-1234-567890abcdef",
"status": "completed",
"message": "Order successfully created.",
"order": {
"id": "o1r2d3e4-f5g6-7890-1234-567890abcdef",
"shortReference": "ABCDEF12",
"buyer": {
"referenceId": "eb56e3c4-08c8-45b1-819a-eb0b5ebed50c",
"email": "customer@example.com",
"phone": "+447123456789"
},
"receipt": {
"basket": [
{
"referenceId": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"name": "Fancy Shoes",
"price": 7500,
"currency": "GBP",
"qty": 1,
"vat": 20
}
],
"otherBilledItems": [
{
"type": "fee",
"name": "Shipping",
"price": 999,
"currency": "GBP"
}
]
},
"total": 8500,
"outstanding": 6375,
"paid": 2125,
"currency": "GBP",
"purchaseDate": 1678886400,
"paymentMethod": {
"type": "visa",
"last4": "4242"
}
}
}/v1/eventsParameters
orderOptional order ID to filter events for a specific order.
Responses
Returns the latest order events.
Response Examples
[
{
"orderId": "o1r2d3e4-f5g6-7890-1234-567890abcdef",
"iteration": 2,
"createdAt": 1678972800,
"type": "payment_success",
"outstanding": "6375",
"paymentId": "p1a2y3m4-e5n6-7890-1234-567890abcdef",
"extras": {}
},
{
"orderId": "o1r2d3e4-f5g6-7890-1234-567890abcdef",
"iteration": 1,
"createdAt": 1678886400,
"type": "order_creation",
"outstanding": "8500",
"paymentId": null,
"extras": {}
}
]/v1/ordersResponses
A list of orders.
Response Examples
[
{
"id": "o1r2d3e4-f5g6-7890-1234-567890abcdef",
"shortReference": "ABCDEF12",
"buyer": {
"referenceId": "eb56e3c4-08c8-45b1-819a-eb0b5ebed50c",
"email": "customer@example.com",
"phone": "+447123456789"
},
"receipt": {
"basket": [
{
"referenceId": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"name": "Fancy Shoes",
"price": 7500,
"currency": "GBP",
"qty": 1,
"vat": 20
}
],
"otherBilledItems": [
{
"type": "fee",
"name": "Shipping",
"price": 999,
"currency": "GBP"
}
]
},
"total": 8500,
"outstanding": 6375,
"paid": 2125,
"currency": "GBP",
"purchaseDate": 1678886400,
"paymentMethod": {
"type": "visa",
"last4": "4242"
}
}
]/v1/orders/{orderId}Parameters
orderIdID of the order to retrieve.
Responses
A single order.
Response Examples
{
"id": "o1r2d3e4-f5g6-7890-1234-567890abcdef",
"shortReference": "ABCDEF12",
"buyer": {
"referenceId": "eb56e3c4-08c8-45b1-819a-eb0b5ebed50c",
"email": "customer@example.com",
"phone": "+447123456789"
},
"receipt": {
"basket": [
{
"referenceId": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"name": "Fancy Shoes",
"price": 7500,
"currency": "GBP",
"qty": 1,
"vat": 20
}
],
"otherBilledItems": [
{
"type": "fee",
"name": "Shipping",
"price": 999,
"currency": "GBP"
}
]
},
"total": 8500,
"outstanding": 6375,
"paid": 2125,
"currency": "GBP",
"purchaseDate": 1678886400,
"paymentMethod": {
"type": "visa",
"last4": "4242"
}
}/v1/orders/{orderId}/refundParameters
orderIdThe ID of the order to refund.
refundItemsList of items to be refunded.
Array items contain:
refundItems[].productIdThe ID of the product being refunded (if applicable).
refundItems[].nameThe name of the product being refunded.
refundItems[].qtyThe quantity to refund.
refundItems[].amountThe amount to refund for this item in pence.
totalRefundAmountThe total amount to be refunded for the order in pence.
reasonReason for the refund.
Responses
Refund initiated successfully. Returns the created order event.
Request
{
"refundItems": [
{
"name": "Fancy Shoes",
"qty": 1,
"amount": 7500
}
],
"totalRefundAmount": 7500,
"reason": "Customer returned one item."
}Response Examples
{
"orderId": "e1f2g3h4-i5j6-7890-1234-567890abcdef",
"iteration": 2,
"createdAt": 1678972800,
"type": "refund",
"outstanding": "5000",
"paymentId": null,
"revisedReceipt": {},
"supportTicketId": null
}