Nexi
In this page you will find the required information to perform REST calls related to the Nexi payment provider.
| Payment Method | Payment | Refund | Automatic Subscription | Manual Subscription |
|---|---|---|---|---|
credit-cards | ✓ | ✓ |
| Enabled | |
|---|---|
| Pay By Link | ✗ |
Endpoints
Every Nexi endpoint has this prefix path /v3/nexi
Pay
POST /{payment-method}/pay
This endpoint allows to execute payments via the Nexi payment provider.
You can always define the following optional fields in providerData:
{
[...]
"providerData": {
"language": "string", // ISO 639-2
"expirationDate": "string", // format YYYY-MM-DD
}
}
The payment response can have the following result codes:
- REDIRECT_TO_URL: the payment was successfully submitted
- KO: the payment failed
Refund
POST /refund
This endpoint allows to refund an already executed payment via the Nexi provider.
The request body does not require any provider-specific data.
Status
GET /status?paymentId={paymentId}
This endpoint allows to get the current status of the payment identified by the required query parameter paymentId.
Mapping
The status received by the provider will be mapped according to the following table:
| Provider Status | Plugin Status |
|---|---|
| AUTHORIZED | ACCEPTED |
| EXECUTED | ACCEPTED |
| VOIDED | ACCEPTED |
| REFUNDED | ACCEPTED |
| DECLINED | FAILED |
| DENIED_BY_RISK | FAILED |
| THREEDS_FAILED | FAILED |
| CANCELED | FAILED |
| FAILED | FAILED |
| THREEDS_VALIDATED | PENDING |
| PENDING | PENDING |
Check
GET /check?paymentId={paymentId}
This endpoint allows to get the current status of the payment identified by the required query parameter paymentId and also to send a notification to the external service as specified by PAYMENT_CALLBACK_URL environment variable.
Callback
POST /callback
This endpoint should only be called by Nexi.