### Display Nexio Getting Started Content (HTML)
Source: https://docs.nexiopay.com/docs
This snippet displays introductory content for Nexio products and features using HTML. It includes an image, introductory paragraphs, and links to the Developer Portal and Changelog.
```html
These guides and tutorials walk you through each step for Nexio products and features.
This Getting Started section contains basic information about getting started with using the Nexio documentation and APIs.
```
--------------------------------
### NexioPay Recipes
Source: https://docs.nexiopay.com/docs/next-tasks
Recipes offer step-by-step code samples to help developers get started quickly with NexioPay APIs, including examples for creating backend servers and frontend web pages.
```APIDOC
## Recipes
### Description
Step-by-step code samples designed to accelerate your integration with NexioPay APIs. Includes examples for backend and frontend development.
### Method
N/A (Conceptual guides)
### Endpoint
N/A
### Parameters
N/A
### Request Example
N/A
### Response
N/A
```
--------------------------------
### cURL GET Request Example
Source: https://docs.nexiopay.com/reference/viewchargeback
Example of a cURL GET request to the Nexiopay API. This example demonstrates how to make a request to the chargeback endpoint with specified headers.
```Shell
curl --request GET \
--url https://api.nexiopaysandbox.com/chargeback/v3/id \
--header 'accept: application/json'
```
--------------------------------
### cURL GET Request Example
Source: https://docs.nexiopay.com/reference/viewsubscription
A cURL command to make a GET request to the Nexio API. It demonstrates setting the request URL and the 'accept' header for JSON responses.
```shell
curl --request GET \
--url https://api.nexiopaysandbox.com/subscription/v3/id \
--header 'accept: application/json'
```
--------------------------------
### Nexiopay API Success Response Example
Source: https://docs.nexiopay.com/docs/apple-pay-integration-guide
Example of a successful 200 response from the Nexiopay API, detailing token generation and iframe URLs for various payment methods, including Apple Pay.
```json
{
"expiration": "2018-09-18T15:43:05.664Z",
"token": "830d36f6-a5e3-4455-9600-3a55b63e2fc2",
"asyncTraceId": "830d36f6-a5e3-4455-9600-3a55b63e2fc2",
"expressIFrameUrl": "https://www.api.nexiopaysandbox.com/v3?token=830d36f6-a5e3-4455-9600-3a55b63e2fc2",
"redirectUrls": [],
"buttonIFrameUrls": [
{
"paymentMethod": "payPal",
"url": "https://api.nexiopaysandbox.com/apm/v3?token=830d36f6-a5e3-4455-9600-3a55b63e2fc2&paymentMethod=payPal"
},
{
"paymentMethod": "applePayAuthNet",
"url": "https://api.nexiopaysandbox.com/apm/v3?token=830d36f6-a5e3-4455-9600-3a55b63e2fc2&paymentMethod=applePayAuthNet"
},
{
"paymentMethod": "applePayCyberSource",
"url": "https://api.nexiopaysandbox.com/apm/v3?token=830d36f6-a5e3-4455-9600-3a55b63e2fc2&paymentMethod=applePayCyberSource"
}
]
}
```
--------------------------------
### View Disputes - Python Example
Source: https://docs.nexiopay.com/reference/viewdisputes
Provides a Python example using the 'requests' library to call the NexioPay API for retrieving disputes. It illustrates how to configure the GET request with parameters and headers.
```python
import requests
url = "https://api.nexiopaysandbox.com/chargeback/v3/dispute"
params = {
"limit": "10",
"offset": "0"
}
headers = {
"accept": "application/json"
}
response = requests.get(url, params=params, headers=headers)
print(response.text)
```
--------------------------------
### Nexiopay Transaction Data Example
Source: https://docs.nexiopay.com/docs/setting-up-installments-for-a-bank-to-handle-the-subscription
This snippet demonstrates the complete data structure for a transaction within the Nexiopay system. It includes merchant details, transaction status, amounts, currency, customer information, card details, installment plan, and responses from external services.
```json
{
"merchantId": "301525",
"transactionDate": "2023-07-31T22:24:56.641Z",
"authCode": "[auth_code]",
"transactionStatus": "authorized",
"amount": 50,
"transactionType": "sale",
"currency": "USD",
"gatewayResponse": {
...
},
"data": {
"amount": 50,
"currency": "USD",
"settlementCurrency": "USD",
"customer": {
"email": "jdoe@example.com",
"billToAddressOne": "2147 West Silverlake Drive",
"billToCity": "Scranton",
"billToState": "PA",
"billToPostal": "18503",
"billToCountry": "US"
}
},
"card": {
"cardNumber": "411111******1111",
"expirationYear": "28",
"expirationMonth": "12",
"cardHolder": "John H Doe"
},
"installment": {
"period": 12
},
"kountResponse": {
"status": "success",
"rules": "[response]"
},
"token": {
"firstSix": "411111",
"lastFour": "1111",
"token": "146ae124-1022-4dad-937e-feb339f35382"
}
}
```
--------------------------------
### API Request Examples (cURL)
Source: https://docs.nexiopay.com/reference/viewcardtokens
Provides examples of how to make GET requests to the Nexiopay API using cURL. It includes setting the URL with query parameters like limit and offset, and specifying the 'accept' header.
```shell
curl --request GET \
--url 'https://api.nexiopaysandbox.com/card/v3?limit=10&offset=0' \
--header 'accept: application/json'
```
--------------------------------
### Example Nexio API Response
Source: https://docs.nexiopay.com/docs/klarna-integration-guide
A sample successful response from the Nexio API after a token request. It includes expiration time, a token, async trace ID, and URLs for different iframe integrations.
```json
{
"expiration": "2018-09-18T15:43:05.664Z",
"token": "830d36f6-a5e3-4455-9600-3a55b63e2fc2",
"asyncTraceId": "830d36f6-a5e3-4455-9600-3a55b63e2fc2",
"expressIFrameUrl": "https://www.api.nexiopaysandbox.com/v3?token=830d36f6-a5e3-4455-9600-3a55b63e2fc2",
"redirectUrls": [],
"buttonIFrameUrls": [
{
"paymentMethod": "klarnaCheckout",
"url": "https://api.nexiopaysandbox.com/apm/v3?token=830d36f6-a5e3-4455-9600-3a55b63e2fc2&paymentMethod=klarnaCheckout"
},
{
"paymentMethod": "braintreePayPal",
"url": "https://api.nexiopaysandbox.com/apm/v3?token=830d36f6-a5e3-4455-9600-3a55b63e2fc2&paymentMethod=braintreePayPal"
}
]
}
```
--------------------------------
### cURL Request Example for Nexiopay API
Source: https://docs.nexiopay.com/reference/viewcustomersubscriptions
This code snippet provides an example of how to make a GET request to the Nexiopay API using cURL. It demonstrates setting the request method, URL, and headers, including the 'accept' header for JSON responses.
```bash
curl --request GET \
--url https://api.nexiopaysandbox.com/subscription/v3/customerRef/customerRef \
--header 'accept: application/json'
```
--------------------------------
### Run Nexio API requests with Postman
Source: https://docs.nexiopay.com/docs/overview
This snippet shows how to integrate Nexio API requests using a Postman collection. It provides a button to directly fork the collection into a Postman workspace, facilitating quick testing and exploration of API functionalities without immediate code implementation.
```markdown
To start sending test requests without writing any code, download and explore our Postman collection using the following button: [](https://app.getpostman.com/run-collection/3652423-f144cea2-ad12-4ce5-83db-b959589d267f?action=collection%2Ffork&collection-url=entityId%3D3652423-f144cea2-ad12-4ce5-83db-b959589d267f%26entityType%3Dcollection%26workspaceId%3Db67b62b5-bf41-45a4-8eda-6431ce614879)
```
--------------------------------
### Get Transaction Count (Node.js)
Source: https://docs.nexiopay.com/reference/viewtransactioncount
Example of how to get the transaction count using Node.js with the 'axios' library. It demonstrates making a GET request to the Nexio API.
```Node.js
const axios = require('axios');
const options = {
method: 'GET',
url: 'https://api.nexiopaysandbox.com/transaction/v3/count',
headers: {
'accept': 'application/json'
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
```
--------------------------------
### C# Code Examples for Nexio
Source: https://docs.nexiopay.com/docs/next-tasks
Includes C# code examples for integrating with Nexio, catering to .NET developers.
```csharp
// Example C# code for Nexio integration
// More details can be found on GitHub.
```
--------------------------------
### Get Transaction Count (PHP)
Source: https://docs.nexiopay.com/reference/viewtransactioncount
Example of how to get the transaction count using PHP with cURL. This script sends a GET request to the Nexio API and outputs the response.
```PHP
"https://api.nexiopaysandbox.com/transaction/v3/count",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #" . $err;
} else {
echo $response;
}
?>
```
--------------------------------
### Create Subscription with Initial Billing Period
Source: https://docs.nexiopay.com/docs/creating-a-pay-plan
Sets up a subscription that includes an initial billing period with a specific amount and end date, followed by recurring charges. It requires parameters like amount, currency, customer reference, payment type, token, interval, interval count, initial billing end date, initial billing amount, and balance.
```shell
curl -X POST https://api.nexiopaysandbox.com/subscription/v3 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic [Base64_encoded_login]' \
-d '{ \
"payment": { \
"data": { \
"amount": 25, \
"currency": "USD", \
"customer": { \
"customerRef": "RP006" \
} \
}, \
"processingOptions": { \
"paymentType": "initialScheduled" \
}, \
"tokenex": { \
"token": "6ee140a0-05d1-4958-8325-b38a690dbb9d" \
} \
}, \
"schedule": { \
"interval": "month", \
"intervalCount": 1, \
"dateInitialBillingEnd": "2023-10-05", \
"initialBillingAmount": 15, \
"balance": 500 \
} \
}'
```
--------------------------------
### Get Transaction Count (Python)
Source: https://docs.nexiopay.com/reference/viewtransactioncount
Example of how to get the transaction count using Python with the 'requests' library. This code snippet shows how to send a GET request to the Nexio API.
```Python
import requests
url = "https://api.nexiopaysandbox.com/transaction/v3/count"
headers = {
"accept": "application/json"
}
response = requests.get(url, headers=headers)
print(response.text)
```
--------------------------------
### PHP Code Examples for Nexio
Source: https://docs.nexiopay.com/docs/next-tasks
Provides PHP code samples for integration with Nexio APIs, including examples for platforms like WooCommerce.
```php
'application/json'
}
response = HTTParty.get(url, headers: headers)
puts response.body
```
--------------------------------
### WooCommerce Plugin Examples for Nexio
Source: https://docs.nexiopay.com/docs/next-tasks
Provides code examples specifically for integrating Nexio with WooCommerce plugins.
```php
// Example code for Nexio integration with WooCommerce plugins
// More details can be found on GitHub.
```
--------------------------------
### PayU iyzico 3D Secure and Installments Support
Source: https://docs.nexiopay.com/docs/payu-iyzico-via-paymentsos-integration-guide
Outlines the 3D Secure and Installments support for PayU iyzico. It specifies that 3D Secure 1.x is supported, while 2.x and External 3D Secure are not. Installments are supported.
```html
**3D Secure 1.x supported**
Yes
**3D Secure 2.x supported**
No
**External 3D Secure supported**
No
**Installments supported**
Yes
```
--------------------------------
### Create Subscription Request Example
Source: https://docs.nexiopay.com/reference/subscriptions
This example demonstrates the structure of a POST request to create a subscription. It includes essential fields for transaction details, scheduling, and customer information. Ensure to replace placeholders with actual values and use a valid card token.
```http
POST https://api.nexiopaysandbox.com/subscription/v3
Content-Type: application/json
Authorization: Basic YOUR_API_KEY
{
"tokenex": {
"token": "YOUR_SAVED_CARD_TOKEN"
},
"payment": {
"amount": 100.00,
"currency": "USD",
"paymentType": "scheduled"
},
"customer": {
"reference": "CUST-12345"
},
"schedule": {
"interval": "monthly",
"dateInitialBillingEnd": "2024-12-31"
}
}
```
--------------------------------
### Get Spendback Records (cURL)
Source: https://docs.nexiopay.com/reference/viewspendbacks
Retrieves a list of spendback records with specified limit and offset. This example demonstrates a GET request to the Nexiopay API endpoint.
```shell
curl --request GET \
--url 'https://api.nexiopaysandbox.com/payout/v3/spendback?limit=10&offset=0' \
--header 'accept: application/json'
```
--------------------------------
### Node.js Code Examples for Nexio
Source: https://docs.nexiopay.com/docs/next-tasks
Offers Node.js code samples for interacting with Nexio APIs, useful for backend development.
```javascript
// Example Node.js code for Nexio integration
// More details can be found on GitHub.
```
--------------------------------
### GET /chargeback/v3/id
Source: https://docs.nexiopay.com/reference/viewchargeback
This endpoint likely retrieves chargeback information by a specific ID. The example provided shows a GET request with an 'accept' header set to 'application/json'.
```APIDOC
## GET /chargeback/v3/id
### Description
Retrieves chargeback information using a specific identifier.
### Method
GET
### Endpoint
https://api.nexiopaysandbox.com/chargeback/v3/id
### Parameters
#### Headers
- **accept** (string) - Required - Specifies the desired response format, typically 'application/json'.
### Request Example
```bash
curl --request GET \
--url https://api.nexiopaysandbox.com/chargeback/v3/id \
--header 'accept: application/json'
```
### Response
#### Success Response (200)
```json
{
"message": "string"
}
```
#### Error Response (401)
```json
{
"message": "Unauthorized."
}
```
### Common Errors
- **401 Unauthorized**: Indicates missing or invalid credentials. Refer to the Guides area for more information on error codes.
```
--------------------------------
### Magento Plugin Examples for Nexio
Source: https://docs.nexiopay.com/docs/next-tasks
Offers code examples for integrating Nexio with Magento plugins.
```php
// Example code for Nexio integration with Magento plugins
// More details can be found on GitHub.
```
--------------------------------
### View terminal list (PHP)
Source: https://docs.nexiopay.com/reference/viewterminallist
Illustrates how to get a list of terminals using PHP. This example uses cURL functions to perform the GET request to the Nexio API.
```php
```
--------------------------------
### NexioPay API Reference - Try It
Source: https://docs.nexiopay.com/docs/next-tasks
The API Reference allows developers to try out API requests directly. You can provide the necessary content through the request body or use the examples in the 'Try It' area to test endpoints.
```APIDOC
## API Reference
### Description
Access and test API requests directly from the API Reference. Utilize the endpoint descriptions and 'Try It' areas for request body input and examples.
### Method
GET, POST, PUT, DELETE (Varies by endpoint)
### Endpoint
/api/[endpoint]
### Parameters
(Specific parameters depend on the individual API endpoint being tested)
### Request Example
(Varies based on the specific API endpoint and intended request)
### Response
#### Success Response (200)
(Varies based on the specific API endpoint)
#### Response Example
(Varies based on the specific API endpoint)
```
--------------------------------
### Run Postman Collection (Button)
Source: https://docs.nexiopay.com/docs
This snippet provides an HTML button to run a Nexio Postman collection. Clicking the button allows users to fork and run the collection within their Postman environment without writing code.
```html
[](https://app.getpostman.com/run-collection/3652423-f144cea2-ad12-4ce5-83db-b959589d267f?action=collection%2Ffork&collection-url=entityId%3D3652423-f144cea2-ad12-4ce5-83db-b959589d267f%26entityType%3Dcollection%26workspaceId%3Db67b62b5-bf41-45a4-8eda-6431ce614879)
```
--------------------------------
### Apple Pay Configuration Tasks
Source: https://docs.nexiopay.com/docs/apple-pay-integration-guide
Guides through the essential tasks required to configure Apple Pay, including creating a merchant ID, certificates, and verifying domains.
```APIDOC
## Apple Pay Configuration Tasks
### Description
Outlines the steps to configure your account for Apple Pay after meeting the prerequisites. Tasks include creating a Merchant ID, a payment processing certificate, a merchant identity certificate, verifying your domain, and providing settings to Integrations Support.
### Tasks
1. Create an Apple Pay merchant ID
2. Create a payment processing certificate
3. Create a merchant identity certificate
4. Verify your domain
5. Provide your configuration settings to Integrations Support
**Note**: Domain verification is required for each environment when integrating Apple Pay into multiple environments. The first three tasks only need to be completed once.
```
--------------------------------
### ACI Specific Processor Requirements Example
Source: https://docs.nexiopay.com/docs/aci-integration-guide
Highlights that certain ACI processors might require additional parameters beyond the standard set. An example is given for a Brazilian processor needing `data.customer.nationalIdentificationNumber`.
```text
Some ACI processors may require additional parameters. For example, a Brazilian one requires `data.customer.nationalIdentificationNumber`. Check with ACI for more information, and check the error response (HTTP error 400 with Nexio error code 436--See Common errors) that lists any missing required fields.
```
--------------------------------
### HTML and Javascript for Simple Login Frontend
Source: https://docs.nexiopay.com/docs/using-simple-login-for-authentication
This snippet demonstrates the frontend implementation using HTML and Javascript. It fetches a simple login key from a backend server via a GET request and uses this key to set the source of an iframe, directing the user to the Nexio retail environment.
```html
Retail Testing
Retail Processing
Provide transaction information below:
```
--------------------------------
### View Disputes - Ruby Example
Source: https://docs.nexiopay.com/reference/viewdisputes
A Ruby example demonstrating how to interact with the NexioPay API to view disputes. It uses the 'httparty' gem to make the GET request, including query parameters and headers.
```ruby
require 'httparty'
response = HTTParty.get(
'https://api.nexiopaysandbox.com/chargeback/v3/dispute',
query: {
limit: '10',
offset: '0'
},
headers: {
'accept' => 'application/json'
}
)
puts response.body
```
--------------------------------
### Get Transaction Total (cURL)
Source: https://docs.nexiopay.com/reference/viewtransactiontotal
This snippet shows how to make a GET request to the Nexio API to retrieve transaction totals between specified dates. It requires start and end dates as query parameters.
```Shell
curl --request GET \
--url https://api.nexiopaysandbox.com/transaction/v3/total \
--header 'accept: application/json'
```
--------------------------------
### cURL GET Request Example
Source: https://docs.nexiopay.com/reference/viewmerchantwebhookconfiguration
This snippet demonstrates how to make a GET request to the Nexio API webhook configuration endpoint using cURL. It includes the necessary URL and headers for a successful request.
```Shell
curl --request GET \
--url https://api.nexiopaysandbox.com/webhook/v3/config/id \
--header 'accept: application/json'
```
--------------------------------
### Example MID and Currency Mapping (Conceptual)
Source: https://docs.nexiopay.com/docs/how-do-i-send-a-transaction-to-a-specific-mid-based-on-transaction-currency
This example illustrates how different Merchant IDs (MIDs) can be associated with specific currencies in various countries. It serves as a conceptual guide for setting up payment routing.
```plaintext
MID #1
- merchantId is 100000000039
- USD currency for United States: usa
- USD currency for Puerto Rico: pri
- USD currency for Ecuador: ecu
MID #2
- merchantId is 100000000041
- USD currency for Ecuador: ecu
```
--------------------------------
### View Webhook URLs by ID and Type (Ruby)
Source: https://docs.nexiopay.com/reference/viewwebhookurlsbyidandtype
Demonstrates how to get webhook URLs using Ruby's 'httparty' gem. This example sends a GET request to the API endpoint with the specified headers.
```ruby
require 'httparty'
response = HTTParty.get('https://api.nexiopaysandbox.com/webhook/v3/webhookUrls/id/webhook_type',
headers: {'accept': 'application/json'})
puts response.body
```
--------------------------------
### POST Spendback Refund Request Example
Source: https://docs.nexiopay.com/reference/spendbackrefund
This example demonstrates a typical POST request to the Spendback Refund API endpoint. It includes essential parameters like `spendbackId` and `amount`, along with optional fields for enhanced refund tracking.
```http
POST https://api.nexiopaysandbox.com/payout/v3/spendbackRefund
Content-Type: application/json
{
"spendbackId": 12345,
"amount": 50.75,
"currency": "USD",
"recipientId": 67890,
"payoutAccountId": 11223,
"spendbackRef": "SPDBK-REF-XYZ-789"
}
```
--------------------------------
### GET /transaction/v3/total
Source: https://docs.nexiopay.com/reference/viewtransactiontotal
Retrieves the sum of transaction amounts between the specified start and end dates.
```APIDOC
## GET /transaction/v3/total
### Description
Returns a sum of the transaction amounts between the given dates.
### Method
GET
### Endpoint
https://api.nexiopaysandbox.com/transaction/v3/total
### Parameters
#### Query Parameters
- **startDate** (string) - Required - The date to begin counting transaction totals. Format: YYYY-MM-DD
- **endDate** (string) - Required - The last date for counting transaction totals. Format: YYYY-MM-DD
### Response
#### Success Response (200)
- **number** (number) - The sum of transaction amounts.
#### Error Response (401)
- **object**
- **message** (string) - A message from Nexio about the state of the request.
### Request Example
```curl
curl --request GET \
--url "https://api.nexiopaysandbox.com/transaction/v3/total?startDate=2023-01-01&endDate=2023-01-31" \
--header 'accept: application/json'
```
### Response Example
```json
{
"number": 1500.75
}
```
```
--------------------------------
### Set up Express Server and Import Modules (Node.js)
Source: https://docs.nexiopay.com/recipes
This snippet demonstrates the basic setup for an Express.js server in Node.js, including importing necessary modules like express, cors, node-fetch, and fs. It also defines the port and a placeholder for base64 encoded login credentials.
```javascript
import express from 'express';
const app = express();
import cors from 'cors';
import fetch from 'node-fetch';
import fs from 'fs/promises';
const port = 3000;
const encodedLogin = '[Base64_encoded_login]';
```