Generate a Sale

This method provides the functionality to process charges to credit cards and debit cards.

Sale request types

Our API offers three different methods for processing payments with debit and credit cards:

  • Simple sale: Charges the customer's debit or credit card directly.
  • Card Tokenization and Charge via Token: Tokenizes the customer's card information and processes the charge using the generated token.
  • Charge with 3DS (3D Secure): Processes payments using the 3D Secure protocol to enhance transaction security.

3DS Process

The transaction result will be returned in the "result" query parameter, encoded in base64 and hosted in the URL send when initialize the transaction. You will need to decode this value to access the transaction response object.



Recurrence charges

To indicate the frequency of charges you have to send any of these values in the recurrence field:

  • daily : every 1 day.
  • weekly: every 7 days.
  • biweekly: every 15 days.
  • monthly: every 30 days.
  • threefortnights: every six weeks or 42 days.
  • bimonthly: every 60 days.
  • quarterly: every 90 days.
  • fourmonths: every 120 days.
  • halfyearly: every 180 days
  • yearly: every 360 days.

Sale parameters

ParameterTypeDescription
amountNumberAmount of transaction
currencyString"484" all transactions must be in Mexican pesos
referenceStringE-commerce external identifier
customerInformationObjectCustomer information
customerInformation.firstNameStringCustomer firstname
customerInformation.lastNameStringCustomer lastname
micustomerInformation.middleNameStringCustomer middlename
customerInformation.phone1StringCustomer phone
customerInformation.emailStringCustomer email
customerInformation.cityStringCustomer city
customerInformation.address1StringCustomer address
customerInformation.postalCodeStringCustomer postalcode
customerInformation.stateStringCustomer state
customerInformation.countryStringCustomer country ISO in 2 characters
customerInformation.ipStringCustomer IP
cardDataObjectCard information
cardData.cardholderNameStringCard owner name
cardData.cardNumberStringCard number
cardData.expirationMonthStringCard expiration month
cardData.expirationYearStringCard expiration year
cardData.cvvStringCard CVV or CVC

Accounts in El Salvador

For accounts in El Salvador only, the following parameters must be changed:

ASCIIHTML
currencyString"840" all transactions must be in USD
redirectUrlStringRedirect URL with response 3DS

Transactions

Each method has its own benefits and can be used in different scenarios based on your business needs. The following sections provide examples of each method:

Language
Credentials
Bearer
Click Try It! to start a request and see the response here!