Alternative payments
Introduction
The system will allow you to launch a payment by a specific payment method or allow the customer to choose between the payment methods activated for your business, with the possibility of making a selection on them for a specific payment.
Authentication
The REST integration uses an authentication service with APIKEYS, which is generated in the control panel and must be included in a request header. For more details, go to the APIKEYS management page.
Operational
The operation related to alternative payments allows direct payments to a specific method or generate a form with a template, in which the user can select the payment method with which to make the payment among those enabled on the platform.
At the moment, with alternative payment methods, authorizations can only be made on payments that the merchant has enabled in PAYCOMET. The merchant can check what methods they have enabled in their product (function /methods).
On the other hand, the REST operation incorporates the changes related to the PSD2 regulations (parámetro 'merchantData'), which will need to be completed in some of the alternative payments and, in all cases, will serve to facilitate the conversion of the operation. You can check these parameters in the PSD2 Parameters resource.
Direct payments
Direct payment (function /payments) allows merchants to launch a payment using a specific method. If there is no error, PAYCOMET will respond with the URL to which the merchant must redirect the client, in case a subsequent authentication is necessary. If the operation does not require SCA, the payment will have been successfully completed.
This integration allows the payment to be configured with a user present (parameter 'userInteraction ') and in a secure environment (parameter 'secure ') to be able to carry out operations in cases where said conditions are met.
Example of direct payment
Petition:
{
"payment": {
"terminal": 999,
"order": "PAY17123301",
"amount": "202",
"currency": "EUR",
"originalIp": "127.0.0.1",
"methodId": 11,
"secure": 1,
"userInteraction": 1,
"productDescription": "prueba docs.paycomet.com",
"merchantData": {
"customer": {
"email": "jnadie@paycomet.com"
}
}
}
}
Reply:
{
"errorCode": 0,
"amount": "202",
"currency": "EUR",
"methodId": 11,
"order": "PAY17123301",
"challengeUrl": "https://challenge.paycomet.com/challenge/WSsjX1htJEtuLXdXUikq"
}
Capture form
The capture form (function /form) allows the merchant to launch a payment to allow the user to select the payment method with which they want to pay. This operation is allowed for authorizations (in all methods), pre-authorizations, subscriptions, user registration -tokenization-, authorizations by reference and authorization with DCC (card only).
The system will allow choosing between the methods enabled for the product, allowing flexibility of the options in the request, through various parameters:
- In the methods parameter, the list of methods available to the client must be supplied
- In the excludedMethods parameter you will receive the excluded methods, if they do not appear explicitly in ‘methods’
- By default, the system will display the methods enabled for trading.
For example, a merchant with four payment methods enabled (1 - Card, 10 - Bizum, 12 - iDEAL, 13 - Klarna Payments), wants to personalize their requests.
Option | Parameters | Methods available to the client |
---|---|---|
Show all methods, default | methods: [], excludedMethods = [] |
Card, Bizum, iDEAL, Klarna Paynow |
Include several specifically | methods: [10,12] | Bizum, iDEAL |
Exclusion of a method | methods: [], excludedMethods = [1] |
Bizum, iDEAL, Klarna Paynow |
If there is no error, PAYCOMET will respond with the URL to which the merchant must redirect the customer, where the customer will select the payment among those available. In case card is included among the methods, it is allowed to include the parameters related to the card (idUser and tokenUser) allowing the client not to need to introduce the card again.
Form creation example
Petition:
{
"operationType": 1,
"language": "es",
"payment": {
"terminal": 999,
"order": "FORM121286",
"amount": "707",
"currency": "EUR",
"secure": 1,
"userInteraction": 1,
"methods": [10,11],
"excludedMethods": [],
"originalIp": "127.0.0.1"
}
}
Reply:
{
"errorCode": 0,
"challengeUrl": "https://api.paycomet.com/gateway/restgateway/WSsjX1htJEtuLXdXUikq/es"
}
Documentation
Full documentation
For other operations, including returns for alternative payment methods, you must review the standard integration or the full documentation of the REST service, in case you want to consult the full detail of the service.
Payment method specifications
To know the specifications of each payment method, you should consult the list of available payment methods..