# GlobalPayments
The merchant can configure in **Carat Portal** how credit card transactions are routed. There are many acquirers and payment methods available, and one of them is **GlobalPayments**.
In this document, the nomenclature **GlobalPaymentsWS** will be used.
Therefore, in **Carat Portal**, the merchant can configure, for example, _VISA_ cards routed to **GlobalPaymentsWS**, and _MASTERCARD_ cards to _CIELO_, and so on.
## Carat Portal supported interfaces for integration
The following interfaces are supported for integration with **GlobalPaymentsWS**:
- REST Payment
- REST Pre-Authorization
- REST Cancel
- HTML Payment
- HTML Pre-Authorization
- Cancel via Carat Portal Merchant's Portal
> **Attention:**
> This integration also allows 3DS authentication data (`eci`, `xid` and `cavv`) to be sent. [Learn more about this service.](pagamento-rest-dopayment.md#request-parameters)
## Allowed Authorizers / Issuers
For more information about authorizers / issuers available to transactions by **GlobalPaymentsWS** routing, please contact GlobalPayments acquirer.
## Required credentials
**The merchant must obtain from GlobalPaymentsWS the credentials listed below** and send them to Software Express or register them as explained in the next item of this document.
[block:parameters]
{
"data": {
"h-0": "Parameter",
"h-1": "Description",
"h-2": "Format",
"0-0": "`terminal`",
"0-1": "Terminal number defined by GlobalPaymentsWS.",
"0-2": "\\< 3 N",
"1-0": "`merchantCode`",
"1-1": "Merchant code defined by GlobalPaymentsWS.",
"1-2": "\\< 15 N",
"2-0": "`secretKey`",
"2-1": "Merchant secret key in GlobalPaymentsWS.",
"2-2": "AN"
},
"cols": 3,
"rows": 3,
"align": [
"center",
"center",
"center"
]
}
[/block]
## Registering information in Carat Portal Merchant's Portal
The merchant itself can register the information obtained from GlobalPaymentsWS on Carat Portal's merchant's portal. It is also possible to change configurations. For this purpose, the merchant must select the desired authorizer and enter the editing screen as in the example below:
[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/d341c80de4f23881d72b80cd63752f5a7e50b065ce724f91ecbe6eefeb4bb9f0-roteamento-globalpaymentsws-portal.png",
null,
null
],
"align": "center"
}
]
}
[/block]
## Transaction Flows
In this section, the GlobalPaymentsWS transactional flow particularities will be presented.
### REST Pre-Authorization
#### Pre-authorization effectuation service
Although Carat Portal allows sending financing data (installments) in the capture step of the Pre-Authorization REST interface, GlobalPaymentsWS requires this information on the pre-authorization effectuation step. [Learn more.](pre-autorizacao-rest-doPreAuthorization#request-parameters)
#### Pre-authorization capture service
In the _capture_ service, the transaction value must be equal or less than the pre-authorized transaction.
GlobalPaymentsWS requires that the installments are sent on the pre-authorization effectuation step. Therefore, the `installments` field value in the _capture_ service is not considered. In addition, GlobalPaymentsWS considers that all installment plans are without interest. So the `installment_type` field value is not considered in _capture_ method.
### REST Payment
This interface supports sending [the recurrency flag, external authentication fields](pagamento-rest-dopayment.md), and the [soft descriptor](soft-descriptor.md#globalpaymentsws).
#### Late confirmation
REST Payment has the `postpone_confirmation` field on the transaction creation service, which indicates whether the payment will be done with automatic or manual confirmation, the latter being done by calling the payment confirmation service. However, due to the GlobalPaymentsWS API, when performing a payment with late confirmation, in practice a **pre-authorization** request is called and the payment confirmation service method generates a **capture** request.
#### Card query service
This service does a query that validates the card used in the payment using the GlobalPaymentsWS API. In order to work properly, the _ZeroDollar_ functionality must be **enabled** on the merchant's registry on GlobalPayments.
### HTML Payment
For HTML payments, during the creation of the transaction in Carat Portal, the _postpone_confirmation_ field allows the payment transaction to become pending at the end of the user interaction with the Carat Portal interface, and later it can be confirmed or undone through the REST Payment Confirmation Interface.
In this case there is also the peculiarity that when the transaction is created with the field `postpone_confirmation = true`, in practice a pre-authorization request is made to the GlobalPaymentsWS API and, consequently, the confirmation made by the REST interface generates a capture request.
#### Cancellation
Cancellation requests only will be accepted during the same day (until 23:59:59) that a transaction is captured or confirmed.
The merchant can request a Cancel transaction using the REST cancel interface or the Carat Portal Merchant's Portal.
GlobalPaymentsWS only allows partial cancellations in pre-authorized transactions. For other transaction types, only the full amount transactions can be cancelled.
### Authentication via HTML
If the **HTML Payment/Pre-Authorization** interface is being used, the following parameter must be sent to perform the authentication:
[block:parameters]
{
"data": {
"h-0": "Parameter",
"h-1": "Description",
"h-2": "Format",
"h-3": "Mandatory",
"0-0": "`authorizer_authentication`",
"0-1": "This field must be sent with value `true` if a payment with authentication is desired. [Learn more about this service.](pagamento-html-begin.md#request-parameters)",
"0-2": "\\< 5 AN",
"0-3": "YES"
},
"cols": 4,
"rows": 1,
"align": [
"center",
"left",
"center",
"center"
]
}
[/block]
## GlobalPaymentsWS Test Cards
GlobalPaymentsWS provide the following test card numbers for using in test environment:
| Option / Result | Credit card number | Expiry Date | Card Security Code |
| :---------------: | :----------------: | :---------: | :----------------: |
| Spot Sale | 4548812049400004 | 12/20 | 123 |
| Installments plan | 4761120000000148 | 12/17 | 111 |
| Deny transaction | 1111111111111117 | 11/20 | - |