---
title: "Webpay"
canonical_url: https://docs.connect.worldline-solutions.com/payment-product/webpay/integration/globalcollect
---

* [Overview](https://docs.connect.worldline-solutions.com/payment-product/webpay/overview.md)
* [Countries \& currencies](https://docs.connect.worldline-solutions.com/payment-product/webpay/countries-and-currencies.md)
* [Integration](https://docs.connect.worldline-solutions.com/payment-product/webpay/integration.md)
* [Process flows](https://docs.connect.worldline-solutions.com/payment-product/webpay/process-flows.md)
* [Testing](https://docs.connect.worldline-solutions.com/payment-product/webpay/testing.md)
* [Consumer experience](https://docs.connect.worldline-solutions.com/payment-product/webpay/consumer-experience.md)
* [Reporting](https://docs.connect.worldline-solutions.com/payment-product/webpay/reporting.md)
* [FAQ](https://docs.connect.worldline-solutions.com/payment-product/webpay/faqs.md)

# Integration

## Before you begin

To follow along with this guide, ensure that you have the following ready:

* The correct [API endpoint](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/json/endpoints.html?paymentPlatform=ALL)
* A way to construct the [authorization header](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/json/authentication.html?paymentPlatform=ALL) (API Explorer, [SDKs](https://docs.connect.worldline-solutions.com/documentation/sdk/.md), etc.)
* A way to send REST API calls (API Explorer, [SDKs](https://docs.connect.worldline-solutions.com/documentation/sdk/.md), etc.)

# Using MyCheckout hosted payment pages

If you're looking for the quickest way to accept payments, [MyCheckout hosted payment pages](https://epayments.developer-ingenico.com/documentation/hosted-payment-pages/) are the optimal solution for a hassle-free payment experience.

1. Make a [POST /v1/{merchantId}/hostedcheckouts](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/java/hostedcheckouts/create.html?paymentPlatform=ALL) API call.
2. Add the **order** object containing the required properties.

Additionally, you can add **hostedCheckoutSpecificInput** object, featuring the followingstrings:

* **returnUrl** -the URL that the consumer is redirect to after the payment flow has finished.
* **variant**- the created styling of the checkout page tailored to your consumer's preferences.
* **locale**- the language, that will be used for your hosted checkout page.

|    Property     | Data type | Required |
|-----------------|-----------|----------|
| order           | object    | yes      |
| amountOfMoney   | object    | yes      |
| currencyCode    | string    | yes      |
| amount          | integer   | yes      |
| customer        | object    | yes      |
| billdingAddress | object    | yes      |
| countryCode     | string    | yes      |

Below, you'll find an example request containing the essential data. For more information, please refer to our API Reference.  
POST HOSTEDCHECKOUTS REQUESTCopy code

```hljs javascript language-javascript

 {
  "order": {
    "amountOfMoney": {
      "currencyCode": "CLP",
      "amount": 50000
    },
    "customer": {
      "billingAddress": {
        "countryCode": "CL"
      }
    }
  }
}
```

POST HOSTEDCHECKOUTS RESPONSECopy code

```hljs javascript language-javascript

{
  "RETURNMAC": "bd0a425f-ed16-4a66-a30b-fb250f9a860b",
  "hostedCheckoutId": "0682b5e0-9e75-71ff-a892-f0f147c150f2",
  "partialRedirectUrl": "pay1.preprod.checkout.worldline-solutions.com/checkout/3010202402-37efb01130eb4439b55040ef56feedba:0682b5e0-9e75-71ff-a892-f0f147c150f2:aec83ce8cde9491ba528360c30a9dbd0"
}
```

From the response, the important properties are:

* hostedCheckoutId -- can be used in subsequent API calls to retrieve the transaction details, such as GET/v1/{merchantId}/hostedcheckouts/{hostedCheckoutId}
* partialRedirectUrl -- is used to create the URL to which the customer needs to be redirected.

By default, we configure every account with the subdomain payment, so you can always connect https://payment/.with the partialRedirectUrl, for example:

```
https://payment.pay1.preprod.checkout.worldline-solutions.com/checkout/9992-6ce05357a9534440ace5e07a6081d861:066a8b04-1cd7-71ff-86e7-6e4780176698:70b22da3d59e4121936c4499fddffacf
```

For more information on customizing the checkout page, please refer to our detailed guide on [MyCheckout hosted payment pages](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/.md).  
The **hostedCheckoutId** is only valid for 2 hours, please ensure to store the **createdPaymentOutput.payment.id** from the [GET /v1/{merchantId}/hostedcheckouts/{hostedCheckoutId}](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/java/hostedcheckouts/get.html?paymentPlatform=ALL) response to be able to retrieve data after 2 hours have elapsed via the [GET /v1/{merchantId}/payments/{paymentId}](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/json/payments/get.html?paymentPlatform=ALL) API call. Alternatively, we can also send a [webhook event](https://docs.connect.worldline-solutions.com/documentation/webhooks/.md) that will contain it.

# Using your own checkout page

You can build a direct integration using our SDKs (or integrate our API from scratch). Depending on your integration needs, there are several options available.

## Client encryption

Our [Client API](https://apireference.connect.worldline-solutions.com/c2sapi/v1/en_US/index.html?paymentPlatform=ALL) allows you to perform various actions. All you need is to be able to create a session via the [POST/v1/{merchantId}/sessions](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/json/sessions/create.html?paymentPlatform=ALL) API call, which will grant you access to the Client API. It's highly recommended that you use our [Client SDKs](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/.md), provided for the following programming languages:

* [JavaScript](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/javascript/.md)
* [Java](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/android/.md)
* [Swift](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/swift/.md)
* [Objective-C](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/ios/.md)
* [Flutter](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/flutter/.md)

We also have reference implementations showing how to use these SDKs on [GitHub](https://github.com/worldline-global-collect).

## Non-encrypted data

If you wish to do a direct server-to-server API call, go for this option. The difference with the other options mentioned before is that you don't need to submit the **encryptedCustomerInput** property. After the consumer selects the payment product, you need to perform the following:

1. Make a [POST /v1/{merchantId}/payments](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/json/payments/create.html?paymentPlatform=ALL) API call.
2. Add the **order** object containing the required properties.
3. Add the redirectPaymentMethodSpecificInput object containing the required properties.
4. Add the **redirectionData** object containing the **returnUrl** property.

|              Property              | Data type | Required |
|------------------------------------|-----------|----------|
| order                              | object    | yes      |
| amountOfMoney                      | object    | yes      |
| amount                             | integer   | yes      |
| currencyCode                       | string    | yes      |
| customer                           | object    | yes      |
| billdingAddress                    | object    | yes      |
| countryCode                        | string    | yes      |
| contactDetails                     | object    | yes      |
| emailAddress                       | string    | yes      |
| merchantCustomerId                 | string    | yes      |
| personalInformation                | object    | yes      |
| name                               | object    | yes      |
| firstName                          | string    | yes      |
| surname                            | string    | yes      |
| references                         | object    | yes      |
| merchantReference                  | string    | yes      |
| redirectPaymentMethodSpecificInput | object    | yes      |
| paymentProductId                   | string    | yes      |
| redirectionData                    | object    | yes      |
| returnUrl                          | string    | yes      |

Below, you'll find an example request containing the essential data. For more information, please refer to our API Reference.  
POST PAYMENTS REQUESTCopy code

```hljs javascript language-javascript

{
    "order": {
        "amountOfMoney": {
            "amount": 35000,
            "currencyCode": "CLP"
        },
        "customer": {
            "billingAddress": {
                "countryCode": "CL"
            },
            "contactDetails": {
                "emailAddress": "Preston42@yahoo.com"
            },
            "merchantCustomerId": "1337170795",
            "personalInformation": {
                "name": {
                    "firstName": "Josefina",
                    "surname": "Kuhlman"
                }
            }
        },
        "references": {
            "merchantReference": "2025070113"
        }
    },
    "redirectPaymentMethodSpecificInput": {
        "paymentProductId": 8598,
        "redirectionData": {
            "returnUrl": "https://epayments.developer-ingenico.com"
        }
    }
}
```

POST PAYMENTS RESPONSECopy code

```hljs javascript language-javascript

{
  "creationOutput": {},
  "merchantAction": {
    "actionType": "REDIRECT",
    "redirectData": {
      "RETURNMAC": "60bb4bd6-8954-4035-b9c7-ce66d885b022",
      "redirectURL": "https://api.ebanx.com/ws/redirect/execute?hash=68643ffbb9e4256f1cb74d5981e391c98c251ab1482a5b76"
    }
  },
  "payment": {
    "id": "9508181291",
    "paymentOutput": {
      "amountOfMoney": {
        "amount": 35000,
        "currencyCode": "CLP"
      },
      "references": {
        "merchantReference": "2025070113",
        "providerId": "238",
        "providerMerchantId": "0"
      },
      "amountPaid": 0,
      "paymentMethod": "redirect",
      "redirectPaymentMethodSpecificOutput": {
        "paymentProductId": 8598
      }
    },
    "status": "REDIRECTED",
    "statusOutput": {
      "isCancellable": false,
      "isRefundable": false
    }
  }
}
```

[Next Process flows](https://docs.connect.worldline-solutions.com/payment-product/webpay/process-flows.md)
