Payment Orders


A Payment Order is an object representing the intention to process a payment.

Integration mode

You have two possible methods of integration.

1- Hosted Fields (recommended)

This is a mode where the input fields are displayed on your website. These fields are fully customizable and it avoids you to exit the conversion tunnel.

How to use it?
You have to use PayGreen JS (the documentation can be found here). The first step of the payment process is to request our Payment API for the creation of a Payment Order (PO). Then, the Payment Order ID must be set in PGJS attribute paymentOrderID.

2- Hosted Page

This is a classic integration that redirects the end user to a PayGreen secure payment page.

How do you do it?
After making an API server call to create a Payment Order, you just have to redirect the end user to the url you will find in the attribute hosted_payment_url.


Payment Orders with instant mode can have the following status :

pendingSet when the PO is created and waiting for an authorization
authorizedSet when the PO is authorized, or partly authorized if partial_allowed is set to true
successedSet when the PO has been captured, or partly captured
canceledSet when the PO has been canceled
refusedSet when the PO has been refused
errorSet when a technical error has occurred
expiredSet when the PO has reached its Time to live (TTL)