Paynet integration guide

PaynetPaynet Paynet through Openpay is a payment provider allowing customers to pay using payment methods saved to their Paynet account. This section is intended to help you implement Paynet based on your preferred integration workflow.

Services and compatibility

Payment method gateway nameOpenpay
Supported transaction types
Supported integration methods
Supported processing currenciesMXN
Webhook event types
  • TRANSACTION_PENDING
  • TRANSACTION_SETTLED

Gateway-specific information

Work with Integrations Support to configure your Openpay gateway credentials in Nexio for the Extract-Transform-Load (ETL) process, which is important for keeping the transaction statuses in sync with Openpay.

The source ID (Openpay token) is auto-assigned through Nexio. This is only supported if the TokenEx account is owned by Nexio.

Configuring and utilizing webhooks is necessary as part of the Paynet workflow. For information about webhooks, see Webhooks and event types.

The following are not supported with Openpay:

  • Kount

Configuration

Apart from working with Integrations to add Paynet as a payment method, you do not need to do any other configuration steps.

Required fields

The following table shows the required and conditional fields for Paynet transactions in the Create APM one-time-use token request.

FieldRequired?Description
data.amountYesThe transaction amount.
data.currencyYesThe three-character ISO currency code for the transaction. Paynet only supports MXN for the processing currency,
data.customer.orderNumberYesThe order number.
data.customer.firstNameYesThe customer's first name, as it is set for the payment method.
data.customer.lastNameYesThe customer's last name, as it is set for the payment method.
data.customer.emailYesThe customer's email address.
customerRedirectUrlNoThe URL to which the customer will be redirected after completing their payment. The customer will be sent here upon successful or failed payment. This URL must use the HTTPS protocol.
data.cart.items[n].itemNoItem number or code.
data.cart.items[n].descriptionNoA description of the item.
data.cart.items[n].quantityNoThe quantity sold.
data.cart.items[n].priceNoThe price per item.
data.cart.items[n].typeNoThe transaction type.
data.customer.billToAddressOneNoThe street address for the customer.
data.customer.billToAddressTwoNoAdditional street address information, if required.
data.customer.billToCityNoThe city for the address record.
data.customer.billToStateNoThe state or province on file with the payment provider. (If in the US, this must be the two-character state abbreviation).
data.customer.billToPostalNoThe postal code on file.
data.customer.billToCountryNoThe two-character (Alpha-2) ISO country code.
data.customer.billToPhoneNoThe billing phone number.
data.customer.birthDateNoThe customer's date of birth. For specific details related to this parameter, see the Create APM one-time-use token endpoint. This parameter only applies for the Paynet and SPEI alternative payment methods.
data.customer.invoiceNoThe invoice number.
data.customer.orderDateNoThe date of the customer's order. For specific details related to this parameter, see the Create APM one-time-use token endpoint.
data.customer.shipToAddressOneNoThe shipping address, if different from the billing address.
data.customer.shipToAddressTwoNoAdditional shipping address information, if required.
data.customer.shipToCityNoThe shipping city.
data.customer.shipToStateNoThe shipping state or province. (If in the US, this must be the two-character state abbreviation).
data.customer.shipToPostalNoThe shipping postal code.
data.customer.shipToCountryNoThe two-character (Alpha-2) ISO shipping country code.
data.customer.shipToPhoneNoThe shipping phone number.
data.customerRefNoCustomer identifier. You can use this field to pass a customer ID to the APM or to manage user subscriptions.
data.customFieldsNoNexio stores information in custom fields and passes custom fields to the gateway.
data.descriptionNoA description of the transaction.
data.descriptorNoInclude this parameter to dynamically change the descriptor on the customer's statement.
data.dueDateNoThe date by which the customer must complete the payment. If the transaction is not settled before this date, it will be voided. If you do not provide a value, the system automatically sets the date to be 30 days from the current date.

This parameter only applies for the Paynet and SPEI alternative payment methods.
data.paymentMethodNoThe identifier for the alternative payment method. Use this parameter when you want to only return the Paynet iframe button URL or the Paynet redirect URL (rather than data for all payment methods associated with the account).

The value to use is paynet.
data.totalTaxAmountNoTotal tax amount.
processingOptions.merchantIdNoThe Nexio merchant ID (MID).
processingOptions.paymentOptionTagNoA custom value used to route transactions to a specific gateway or merchant account.
uiOptions.displaySubmitButtonNoSet to true to include a submit button in the iframe.
uiOptions.cssNoThe URL where your custom CSS file is hosted.

Example requests

The following is an example one-time-use token request for Paynet.

Example Request for Paynet
curl -X POST https://api.nexiopaysandbox.com/apm/v3/token \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic [Base64_encoded_login]'
  -d '{
  "data": {
    "amount": 4.00,
    "currency": "MXN",
    "paymentMethod": "paynet",
    "customer": {
      "orderNumber": "12345678",
      "firstName": "John",
      "lastName": "Doe",
      "email": "[email protected]"
    }
  }
}'

A successful request returns a response similar to the following:
Example 200 Response with several payment methods
{
  "expiration": "2018-09-18T15:43:05.664Z",
  "token": "830d36f6-a5e3-4455-9600-3a55b63e2fc2",
  "scriptUrl": "https://api.nexiopaysandbox.com/apm/v3/script?token=b61ca2a9-b804-4a28-a00e-b794c8975dee",
  "expressIFrameUrl": "https://www.api.nexiopaysandbox.com/v3?token=79001ef6-fb40-4917-b8ae-2294fdfe1cf2",
  "redirectUrls": [...],
  "buttonIFrameUrls": [
    {
      "paymentMethod": "paynet",
      "url": "https://api.nexiopaysandbox.com/apm/v3?token=b61ca2a9-b804-4a28-a00e-b794c8975dee&paymentMethod=paynet"
    },                   
    {
      "paymentMethod": "payPal",
      "url": "https://api.nexiopaysandbox.com/apm/v3?token=b61ca2a9-b804-4a28-a00e-b794c8975dee&paymentMethod=payPal"
    }
  ]
}

For the multi iframe integration method: You use the expressIFrameUrl value in the steps for the transaction.

For the individual iframe option: You use the buttonIFrameUrls.url of the paynet APM for the transaction.

For the custom redirect option: You use the redirectUrls.url of the paynet APM for the transaction.

Transaction types and integration methods

Regardless of the integration method workflow you implement, consumers are redirected to Paynet to complete their transactions.

Nexio supports the following transaction types for Paynet:

A page similar to the following displays when a user clicks the Paynet payment option. It contains instructions (in the user's default browser language) for how to use the voucher. The consumer can click the "Ver todas las tiendas afiliadas" button to see a list of participating stores. Or, click the "Localiza tu punto de pago más cercano" button to open a Paynet map site for their area to see payment sites close to them.

Paynet payment screenPaynet payment screen

Testing data

For testing data, see Openpay's Pruebas [Tests] page.

Response handling

In the one-time-use token request, Paynet gets returned in the paymentMethod parameter as paynet.

Nexio responds with transaction results in one of the following ways, depending on your integration workflow:

  • Event messages: This applies to integrations that do not pass a customerRedirectUrl in the request.
  • Response fields in the URL: This applies to integrations that do provide a customerRedirectUrl in the request.

In addition to one of the above, if your merchant account is configured to receive webhooks, Nexio provides responses to the webhook URLs that have been registered. For further explanation of the webhook event types, see the webhook Event types table.

For Paynet, these are the possible webhook event types:

  • TRANSACTION_PENDING
  • TRANSACTION_SETTLED

For information about how to run each of the integration workflows, see Transaction types and integration methods above.

Status workflows

The status of a successful transaction with Paynet varies, depending on the options you choose.

SaleSuccessful sale transactions have the following statuses:
  • pending*
  • settled

*Pending status displays as "authorized" or "AUTHORIZED" in the Nexio Dashboard; it displays as 10, meaning "authorized", in the response when querying transactions (for more information about transactionStatus, see the table).

Next steps

Now, you are ready to get started with running transactions:

If you have any additional questions or feedback, see Contact us.


Did this page help you?