Payment Page

A payment page is an interface used to enable customers to pay for orders created by customer support or other instances that are able to create orders on behalf of others.

Create a payment page

  1. Create an order. It is important to add a customer with a valid email-address to contactInfo to the order, because some payment methods will not work if this is missing from the order. It is also important to add a customer with a valid email-address to the list of travellers in the order. This is to enable tickets to be sent. Without any travellers, the tickets will not be sent.

  2. Get valid payment methods by calling GET /v1/payment-methods with the header Entur-Distribution-Channel set to ENT:DistributionChannel:PaymentPage.

  3. Create a payment page by calling POST /v1/payment-page-orchestrator/payment-page. orderId And orderVersion are required fields. expireAt will default to 7 days from now if not set in the request, and paymentMethods will default to all available paymentMethods for DCI=ENT:DistributionChannel:PaymentPage if not set in the request.

  4. Send the link to the customer.

Update a payment page

It is possible to update the expiration date and possible payment-methods using the PATCH /v1/payment-page-orchestrator/payment-page/{id}-endpoint.

<ExpandablePanel title="Example request">
    <pre>
        {`
            {
                "paymentMethods": [
                    {
                        "paymentTypeGroup": "PAYMENTCARD",
                        "paymentType": "MASTERCARD"
                    }
                ],
                "expiraAt": "2021-03-13T08:43:23.114Z"
            }
       `}
       </pre>
</ExpandablePanel>

<ExpandablePanel title="Example response">
    <pre>
        {`
            {
                "url": "https://payment-page.dev.entur.org/ABCD1234/685fe9a1-c1b1-4735-98de-c074dfa99d6d",
            }
       `}
       </pre>
</ExpandablePanel>

Updating the order

If an order that has not been confirmed yet has a payment page, and the order is being updated, payment-page-orchestrator will react to the Kafka-events and update the payment-page accordingly. Per now, this only applies to orders in version 1.

Tickets and receipts

The tickets and receipt will be sent automatically after the payment has been completed, and the order is confirmed.

Payment Page Orchestrator API Reference

See the API reference on the Swagger Petstore