The
Nuvei
API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. JSON is returned by all API responses, including errors, although our API libraries convert responses to appropriate language-specific objects.
You should never expose your Server Credentials in any public website's client-side code.
To start the integration you will need to request to
Nuvei Team integrations@paymentez.com
for a Development/Sandbox account. Please send us your e-mail to identify you as a developer and the name of your company.
We will create an Application and give you the application code. From now this will be the identifier for your Application in the whole integration. We also give you a developer account based on the e-mail you provided. We will send you the password via e-mail to access to your developer account. You can access to this configuration here:
Environment
URL
development
https://dashboard-stg.paymentez.com
production
https://dashboard.paymentez.com
You can change you account password or if you forget it you can always use the forgot password option to recover it. In the
Nuvei
admin system you will see your transactions, application settings (including application URLs and application key) and so more.
Configurations have to be done for the application in development environment and production environment, URLs and application key are different for every environment. Development environment will be always available for tests even after launching your application to production.
Environments
In order to use the API, you need to use one of the following base URLs depending of the environment:
Cards payment method
Environment
URL
development
https://ccapi-stg.paymentez.com
production
https://ccapi.paymentez.com
Cash / Bank Transfer / Wallets / Link To Pay payment methods
All the requests must have the header Auth-Token: . This is a base64 encoded string, the string should be created as follows(consider the ; between each one):
APPLICATION-CODE;UNIXTIMESTAMP;UNIQ-TOKEN
Element
Description
APPLICATION-CODE
Ask the Nuvei team for it.
UNIXTIMESTAMP
This must be created at the same time as the request, be aware that the time is in UTC and in SECONDS, you will have 15 seconds before you need to create a new one, or your request will be rejected (error.type: Invalid timestamp).
UNIQ-TOKEN
Is the hexa representation of a hash sha256 generate from the string “secret-key”+”timestamp”, the secret-key is given by Nuvei team.
Once you have the UNIQ-TOKEN you need to apply the sha256 and the hexa convertion, you can use the next python example, just add your server_application_code and server_app_key:
Payment Methods
Cash
In this platform we can generate a reference to pay with cash.
The above request returns JSON structured like this:
{"application":{"code":"AbiColApp"},"commerce":{"merchant_id":"example"},"user":{"email":"user@example.com","id":"sadfasdf"},"transaction":{"currency":"COP","country":"COL","dev_reference":"prueba_stg_2","amount":50001.0,"expiration_date":"2018-07-01","recurrent":false,"description":"Esto es una prueba desde rest client","reference":"69193","agreement":{"baloto":95715,"efecty":110342,"dimonex":110342,"puntored":113042,"redservi":761},"status":"pending","id":"PV-0000000000021"}}
Cash transactions generates a payment reference through a carrier
HTTP Request
POST https://noccapi-stg.paymentez.com/order/
URL Parameters
Parameter
Type
Required
Description
carrier.id
String
Yes
Indicates the method by which the reference will be created. See carrier list
carrier.extra_params.user.name
String
Yes (*)
User name.
carrier.extra_params.user.last_name
String
Yes (*)
User last name.
carrier.extra_params.user.phone
String
Yes (*)
User phone.
carrier.extra_params.user.fiscal_number
String
Yes (*)
The fiscal number (identification number) given by the user.
Total amount to pay. Format: Decimal with two fraction digits.
order.expiration_days
Number
No
Number of days in which the payment reference expires. Default 2.
order.recurrent
Boolean
No
To indicate if the pay is recurrent or not.
order.description
String
Yes
The order description.
order.hours
Number
No
Optional. If there is value, the reference will last hours.
order.country
String
Optional
Country where payment will be made. By default the credential settings will be used.
order.currency
String
Optional
Currency to be used for payment. By default the credential settings will be used.
Response
Parameter
Description
application.code
Identifier of the application.
commerce.merchant_id
Identifier of the commerce.
user.email
Buyer email registered to order.
user.id
Buyer identifier.
transaction.currency
Currency of the transaction.
transaction.country
Country where the transaction has made.
transaction.dev_reference
Reference from commerce.
transaction.amount
Total amount to pay.
transaction.expiration
Limit date to pay the reference.
transaction.recurrent
Show if the transaction will be recurrent.
transaction.reference
Reference to make the pay in a store.
transaction.agreement
Json object with all agreements to pay (For payvalida).
transaction.status
The status of payment (pending, approved, cancelled).
transaction.id
Id generated by Nuvei
transaction.url_reference
Detailed printable view of the transaction.reference.
Carriers
Carrier
Response fields needed to pay
payvalida
transaction.amount, transaction.agreement and transaction.reference
PagoEfectivo
transaction.url_reference (the printable view) or transaction.amount and transaction.reference (*).
oxxo
transaction.reference that must be converted in a barcode.
bradesco
transaction.url_reference this send the printable view
Fields needed for every cash carrier
Carrier
Fields needed in extra_params
PagoEfectivo
user.name, user.last_name, user.phone (format country code + number eg. +52111111111111) order.hours (optional if there is value the reference will last hours)
The zip or postal code. Max length allowed of 30 characters.
street
String
No
The name of the street.
house_number
String
No
The house number
district
String
No
The district.
additional_address_info
String
No
Additional address info, without format.
Bank transfer
Users make a wire transfer from their bank account. Approval may take up to 72 hours.
To make a bank transfer first you need to get the list of all the banks, then create the transfer reference.
Get Banks
curl --request GET \--url https://noccapi-stg.paymentez.com/banks/PSE/ \--header'auth-token: auth-token'\--header'content-type: application/json'
The above request returns JSON structured like this:
{"banks":[{"name":"BANCO AV VILLAS","code":"1052"},{"name":"BANCO CAJA SOCIAL","code":"1032"},{"name":"BANCO COLPATRIA","code":"1019"},{"name":"BANCO CORPBANCA S.A","code":"1006"},{"name":"BANCO DAVIVIENDA","code":"1051"},{"name":"BANCO DE BOGOTA","code":"1001"},{"name":"BANCO DE OCCIDENTE","code":"1023"},{"name":"BANCO FALABELLA ","code":"1062"},{"name":"BANCO GNB SUDAMERIS","code":"1012"},{"name":"BANCO PICHINCHA S.A.","code":"1060"},{"name":"BANCO POPULAR","code":"1002"},{"name":"BANCO PROCREDIT","code":"1058"},{"name":"BANCOLOMBIA","code":"1007"},{"name":"BANCOOMEVA S.A.","code":"1061"},{"name":"BBVA COLOMBIA S.A.","code":"1013"},{"name":"CITIBANK ","code":"1009"},{"name":"HELM BANK S.A.","code":"1014"},{"name":"HSBC COLOMBIA ","code":"1010"}]}
For bank transfer you will need to list the available banks, in order to show them to the payer and allow him to select the bank where the money will be debited.
HTTP Request
GET https://noccapi-stg.paymentez.com/banks/<carrier>/
URL Parameters
Parameter
Type
Required
Description
carrier_id
String
Yes
Indicates the carrier from where the list will be obtained. See carrier list
The above request returns JSON structured like this:
{"application":{"code":"AbiColApp"},"commerce":{"merchant_id":"example"},"user":{"name":"User full name","email":"test@example.com","id":"sdf"},"transaction":{"currency":"COP","country":"COL","dev_reference":"1","amount":5001.0,"paid_date":null,"description":"description","status":"pending","id":"PSE-10","bank_url":"https://noccapi-stg.paymentez.com/pse/order-pay/PSE-10/","status_bank":"PENDING","trazability_code":7501,"ticket_id":10,"pse_cycle":"3"}}
This is an example of a request for Split Bank Transfer:
This is an example of response obtained from a Split Bank Transfer:
{"application":{"code":"AbiColApp"},"commerce":{"merchant_id":"example"},"user":{"name":"User full name","email":"test@example.com","id":"sdf"},"transaction":{"currency":"COP","country":"COL","dev_reference":"1","amount":5001.0,"paid_date":null,"description":"description","status":"pending","id":"PSE-10","bank_url":"https://noccapi-stg.paymentez.com/pse/order-pay/PSE-10/","status_bank":"PENDING","trazability_code":7501,"ticket_id":10,"pse_cycle":"3"}}
This is an example of response obtained from a H2H:
{"application":{"code":"GaboColApp"},"commerce":{"merchant_id":"1234567"},"user":{"email":"gcruz@test.com","id":"117"},"transaction":{"id":"H2H-83","status":"pending","dev_reference":"117","total_amount":600.0,"description":"Pago de Davivienda CC a Bancolombia","currency":"COP","country":"COL","paid_date":null,"authorization_code":null}}
{"application":{"code":"PM-BRA"},"user":{"email":"lcruz@mail.com","id":"007","name":"Leidy Cruz"},"commerce":{"merchant_id":"example"},"transaction":{"id":"KOI-10","status":"pending","status_detail":0,"dev_reference":"#TESTPAY-2","amount":5.0,"description":"Test pix expiration","currency":"BRL","country":"BRA","bank_url":"https://noccapi-stg.paymentez.com/qr/render/UE0tQ08tUUE7S09JLTEwOzlkN2I4NDU3M2E0M2QxOGMzYjc0NmQ2MjUxMmI1OTYzNTgzMzkzZGRkNDQxMjZlOGE3YTI5NWRiNDgzNTU2NWE=","qr":{"code":"iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AQAAAACgl2eQAAADCUlEQVR4Xu2XUW4cIRBE6YvA/W+Ro8BFIPWKsWU5kpWPbOVn8SaZhWep1F1dTNr5ef1q33e+rTdw1xu466+A2VqtXbuP3etMPY9zlrdjwPLnrNm1NceaNXtv426nAOliqw5K+1io3IBhoFyZsWuaE/UfgM1h0xpzTMqUBfRxXZB2ONylhy/Nej0wMe2fi+0Y4KUend1omcZHR7vufgigNMzLEDXFbL63Pj6bFQBkld57MS0KkEWfdhOg3sWAI0mYRUIJMkvGwq5VCJhWtwkwAWoXIcJvjRxw9WnL/YKQWxejPGKAxvZgEHWoBKlhErztmBhgafaMXCtqWKVDJQYc2oNndY5llncEspUDlOFFrXRA23QiUl9jwB7aPvhkoE5UGeQxBlyFLEaXCbrW+XT16wGe9Kcsk25JsH/oWgjw9PbGge+ysdAtgRAhwNm1iW+rXN5pV2oMuEaVTHlXL30iFaySXU+hAsBGpJulzAAclE3geEQGAIzCfcKrFv7VEVna3LAQMIcNyiue7lKSg1ppQ0OcAshPWWT4amNtarb4GgN8qcmwvlAk8qNRtC4GuEVKLn13fKlUUuxepQC+C9NWJ9ZlHRu5iLMUMPGrdhkZLKwLpvQfoXvXhoCDzsZP0beFgagefgkC0yWiVbxqFBmmn/Xh6tcDyxnGtUpskJ/Mb0dpDGBQnSJSJ7NKHYahaR+Fej3wWMSqMI/+Utmkmm6lgCewfICwmyPdHg4BGtRBkHp+m29VqbPyHCCPKL+pFzpJUiZIep9CBQAnOZ+nQwu3TP8bAybjqvJgkyI+DjLF07gQ4M5wXEibvtod5u0RGQDYKhhZFX3ca9hYuRID9GbDidql+kgt/eKCpYMpwGaVIAZGAaKObZyL1BygxTMgMUKXuOEXbQwBFEWaOt4tusQW/eKXQsDic0vE+17njA4SrjFg8n43XCwbZQsdfooCC4eSJJoXJVkRYJ/NSgHEOBIJ8wtYeAzQh0HpCjLop3GDeU4BtEU2kUpXR1YhQqlXDvhxvYG73sBd/wD4Df7+v4eqIoYgAAAAAElFTkSuQmCC","content":"00020101021126950014BR.GOV.BCB.PIX2573spi.dev.cloud.itau.com.br/documentos/198e49c5-2330-4ad7-9d0b-967c7b5371225204000053039865802BR5923PMD Gotham NegA cios ME6009SAO PAULO62410503***50300017BR.GOV.BCB.BRCODE01051.0.063040866"},"paid_date":null,"instructions":[{"step_number":1,"step_instruction":"Ingrese a la Banca por Internet de su banco preferido y seleccione la opción PIX."},{"step_number":2,"step_instruction":"Seleccione la opción de Códigos QR y con la cámara de su celular escanee el código para realizar el pago."},{"step_number":3,"step_instruction":"Finalmente, click en confirmar pago."}]}}
This is an example of a request for Transbank Webpay:
Once the client finishes the payment, response_url will be the URL where the client is expected to arrive, there the transaction status query should be triggered and the final transaction status should be shown to the client.
Id from commerce to identify the order. Format: String. For PSE in environment staging could use the next values, pending, rejected, failure, approved, with these values the transactions will have the indicated status
order.amount
Number
Yes
Total amount to pay. Format: Decimal with two fraction digits.
order.vat
Number
No
Sales tax amount, included in order amount. If not sent default 0. Format: Decimal with two fraction digits.
order.description
String
Yes
The order description. Format: (100 characters max)
order.country
String
Optional
Country where payment will be made. By default the credential settings will be used.
order.currency
String
Optional
Currency to be used for payment. By default the credential settings will be used.
Response
Parameter
Description
application.code
Identifier of the application.
commerce.merchant_id
Identifier of the commerce.
user.email
Buyer email registered to order.
user.id
Buyer identifier.
transaction.currency
Currency of the transaction.
transaction.country
Country where the transaction has made.
transaction.dev_reference
Reference from commerce.
transaction.amount
Total amount to pay.
transaction.paid_date
Payment date of the transaction.
transaction.description
Transaction description.
transaction.status
The status of payment (pending, approved, cancelled, failure).
transaction.id
Id generated by Nuvei
transaction.bank_url
The URL where you have to redirect the customer. Note: The url returned in staging environment is a mock.
transaction.status_bank
The status of transaction in the bank.
transaction.trazability_code
Reference number.
transaction.pse_cycle
Cycle number where the transaction was created (only for PSE).
transaction.ticket_id
Id transaction with PSE.
transaction.qr.code
Base64 code for render (only for pix carrier).
transaction.qr.content
plain text content in code (only for pix carrier).
Get status transfer
curl --request GET \--url https://noccapi-stg.paymentez.com/pse/order/<transaction_id>/ \--header'auth-token: auth-token'\--header'content-type: application/json'
The above request returns JSON structured like this:
{"status":"failure","detail":"Refund could not be process status transaction: cancelled","transaction":{"id":"KOI-684","status":"cancelled","status_detail":7,"dev_reference":"#TEST-SOFT","amount":10.0,"description":"Prueba de test","currency":"BRL","country":"BRA","bank_url":"https://noccapi-stg.paymentez.com/qr/render/TGVpZHlCcmFBcHA7S09JLTY4NDtmZWU0MTcwNmU1OTRhMjM2Y2MzYzE4MDYzMmJjNDg5NmNkNWY4N2VjMDQ4NWE5MzJlYTBhMDcwOGY4MmEwOTdm","qr":{"code":"iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AQAAAACgl2eQAAADCUlEQVR4Xu2XUW4cIRBE6YvA/W+Ro8BFIPWKsWU5kpWPbOVn8SaZhWep1F1dTNr5ef1q33e+rTdw1xu466+A2VqtXbuP3etMPY9zlrdjwPLnrNm1NceaNXtv426nAOliqw5K+1io3IBhoFyZsWuaE/UfgM1h0xpzTMqUBfRxXZB2ONylhy/Nej0wMe2fi+0Y4KUend1omcZHR7vufgigNMzLEDXFbL63Pj6bFQBkld57MS0KkEWfdhOg3sWAI0mYRUIJMkvGwq5VCJhWtwkwAWoXIcJvjRxw9WnL/YKQWxejPGKAxvZgEHWoBKlhErztmBhgafaMXCtqWKVDJQYc2oNndY5llncEspUDlOFFrXRA23QiUl9jwB7aPvhkoE5UGeQxBlyFLEaXCbrW+XT16wGe9Kcsk25JsH/oWgjw9PbGge+ysdAtgRAhwNm1iW+rXN5pV2oMuEaVTHlXL30iFaySXU+hAsBGpJulzAAclE3geEQGAIzCfcKrFv7VEVna3LAQMIcNyiue7lKSg1ppQ0OcAshPWWT4amNtarb4GgN8qcmwvlAk8qNRtC4GuEVKLn13fKlUUuxepQC+C9NWJ9ZlHRu5iLMUMPGrdhkZLKwLpvQfoXvXhoCDzsZP0beFgagefgkC0yWiVbxqFBmmn/Xh6tcDyxnGtUpskJ/Mb0dpDGBQnSJSJ7NKHYahaR+Fej3wWMSqMI/+Utmkmm6lgCewfICwmyPdHg4BGtRBkHp+m29VqbPyHCCPKL+pFzpJUiZIep9CBQAnOZ+nQwu3TP8bAybjqvJgkyI+DjLF07gQ4M5wXEibvtod5u0RGQDYKhhZFX3ca9hYuRID9GbDidql+kgt/eKCpYMpwGaVIAZGAaKObZyL1BygxTMgMUKXuOEXbQwBFEWaOt4tusQW/eKXQsDic0vE+17njA4SrjFg8n43XCwbZQsdfooCC4eSJJoXJVkRYJ/NSgHEOBIJ8wtYeAzQh0HpCjLop3GDeU4BtEU2kUpXR1YhQqlXDvhxvYG73sBd/wD4Df7+v4eqIoYgAAAAAElFTkSuQmCC","content":"00020101021126950014BR.GOV.BCB.PIX2573spi.dev.cloud.itau.com.br/documentos/198e49c5-2330-4ad7-9d0b-967c7b5371225204000053039865802BR5923PMD Gotham NegA cios ME6009SAO PAULO62410503***50300017BR.GOV.BCB.BRCODE01051.0.063040866"},"paid_date":"2022-06-01 16:15:04"}}
This endpoint is used to refund a transaction
HTTP Request
POST https://noccapi-stg.paymentez.com/order/refund/
URL Parameters
Parameter
Type
Required
Description
transaction.id
String
Yes (*)
Transaction identifier. This code is unique among all transactions.
order.amount
Number
No
The order amount to refund. Format: Decimal with two fraction digits. If not provided, get the full amount of the transaction. Works with pix-koin
Response
Parameter
Description
status
Could be success or failure
detail
If success could be Completed If failure could be Refund could not be process
transaction.id
Id generated by Nuvei
transaction.status
The status of payment (pending, approved, cancelled, failure).
transaction.status_detail
The status detail of the transaction, for more information status detail
transaction.dev_reference
Reference from commerce.
transaction.amount
Total amount to pay.
transaction.refund_amount
Total refund amount
transaction.currency
Currency of the transaction.
transaction.country
Country where the transaction has made.
transaction.paid_date
Payment date of the transaction.
Cancel
Example of cancel
curl -k-L-X PUT -H'Content-Type: application/json'-H'Auth-Token: auth_token'-d'''https://noccapi-stg.paymentez.com/order/cancel/KOI-90'
Example of cancel response
{"status":"success","detail":"Completed","transaction":{"id":"KOI-687","status":"cancelled","status_detail":29,"dev_reference":"#TEST-SOFT","amount":10.0,"description":"Prueba de test","currency":"BRL","country":"BRA","bank_url":"https://noccapi-stg.paymentez.com/qr/render/TGVpZHlCcmFBcHA7S09JLTY4NztmMTA3OWE4MTRlMGNkODk0NmJiMjgzNjRhZWYyYmFlMjBlYzVlZjgyMWE1NjI5Mjg4YTg3ZDYyNzIyMDQ3M2Y5","qr":{"code":"iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AQAAAACgl2eQAAADCUlEQVR4Xu2XUW4cIRBE6YvA/W+Ro8BFIPWKsWU5kpWPbOVn8SaZhWep1F1dTNr5ef1q33e+rTdw1xu466+A2VqtXbuP3etMPY9zlrdjwPLnrNm1NceaNXtv426nAOliqw5K+1io3IBhoFyZsWuaE/UfgM1h0xpzTMqUBfRxXZB2ONylhy/Nej0wMe2fi+0Y4KUend1omcZHR7vufgigNMzLEDXFbL63Pj6bFQBkld57MS0KkEWfdhOg3sWAI0mYRUIJMkvGwq5VCJhWtwkwAWoXIcJvjRxw9WnL/YKQWxejPGKAxvZgEHWoBKlhErztmBhgafaMXCtqWKVDJQYc2oNndY5llncEspUDlOFFrXRA23QiUl9jwB7aPvhkoE5UGeQxBlyFLEaXCbrW+XT16wGe9Kcsk25JsH/oWgjw9PbGge+ysdAtgRAhwNm1iW+rXN5pV2oMuEaVTHlXL30iFaySXU+hAsBGpJulzAAclE3geEQGAIzCfcKrFv7VEVna3LAQMIcNyiue7lKSg1ppQ0OcAshPWWT4amNtarb4GgN8qcmwvlAk8qNRtC4GuEVKLn13fKlUUuxepQC+C9NWJ9ZlHRu5iLMUMPGrdhkZLKwLpvQfoXvXhoCDzsZP0beFgagefgkC0yWiVbxqFBmmn/Xh6tcDyxnGtUpskJ/Mb0dpDGBQnSJSJ7NKHYahaR+Fej3wWMSqMI/+Utmkmm6lgCewfICwmyPdHg4BGtRBkHp+m29VqbPyHCCPKL+pFzpJUiZIep9CBQAnOZ+nQwu3TP8bAybjqvJgkyI+DjLF07gQ4M5wXEibvtod5u0RGQDYKhhZFX3ca9hYuRID9GbDidql+kgt/eKCpYMpwGaVIAZGAaKObZyL1BygxTMgMUKXuOEXbQwBFEWaOt4tusQW/eKXQsDic0vE+17njA4SrjFg8n43XCwbZQsdfooCC4eSJJoXJVkRYJ/NSgHEOBIJ8wtYeAzQh0HpCjLop3GDeU4BtEU2kUpXR1YhQqlXDvhxvYG73sBd/wD4Df7+v4eqIoYgAAAAAElFTkSuQmCC","content":"00020101021126950014BR.GOV.BCB.PIX2573spi.dev.cloud.itau.com.br/documentos/198e49c5-2330-4ad7-9d0b-967c7b5371225204000053039865802BR5923PMD Gotham NegA cios ME6009SAO PAULO62410503***50300017BR.GOV.BCB.BRCODE01051.0.063040866"},"paid_date":null}}
Example of fail cancel response
{"status":"failure","detail":"Cancellation could not be applied, status is cancelled","transaction":{"id":"KOI-685","status":"cancelled","status_detail":34,"dev_reference":"#TEST-SOFT","amount":10.0,"description":"Prueba de test","currency":"BRL","country":"BRA","bank_url":"https://noccapi-stg.paymentez.com/qr/render/TGVpZHlCcmFBcHA7S09JLTY4NTtkYzE5OTFiNzdmY2Y0Y2FjYWU0Mzg0ZTBkZDdjOTg2MmQxN2QzMDFjNTU1M2JiODY4Mzc4ZDNiN2JjN2I1NDg2","qr":{"code":"iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AQAAAACgl2eQAAADCUlEQVR4Xu2XUW4cIRBE6YvA/W+Ro8BFIPWKsWU5kpWPbOVn8SaZhWep1F1dTNr5ef1q33e+rTdw1xu466+A2VqtXbuP3etMPY9zlrdjwPLnrNm1NceaNXtv426nAOliqw5K+1io3IBhoFyZsWuaE/UfgM1h0xpzTMqUBfRxXZB2ONylhy/Nej0wMe2fi+0Y4KUend1omcZHR7vufgigNMzLEDXFbL63Pj6bFQBkld57MS0KkEWfdhOg3sWAI0mYRUIJMkvGwq5VCJhWtwkwAWoXIcJvjRxw9WnL/YKQWxejPGKAxvZgEHWoBKlhErztmBhgafaMXCtqWKVDJQYc2oNndY5llncEspUDlOFFrXRA23QiUl9jwB7aPvhkoE5UGeQxBlyFLEaXCbrW+XT16wGe9Kcsk25JsH/oWgjw9PbGge+ysdAtgRAhwNm1iW+rXN5pV2oMuEaVTHlXL30iFaySXU+hAsBGpJulzAAclE3geEQGAIzCfcKrFv7VEVna3LAQMIcNyiue7lKSg1ppQ0OcAshPWWT4amNtarb4GgN8qcmwvlAk8qNRtC4GuEVKLn13fKlUUuxepQC+C9NWJ9ZlHRu5iLMUMPGrdhkZLKwLpvQfoXvXhoCDzsZP0beFgagefgkC0yWiVbxqFBmmn/Xh6tcDyxnGtUpskJ/Mb0dpDGBQnSJSJ7NKHYahaR+Fej3wWMSqMI/+Utmkmm6lgCewfICwmyPdHg4BGtRBkHp+m29VqbPyHCCPKL+pFzpJUiZIep9CBQAnOZ+nQwu3TP8bAybjqvJgkyI+DjLF07gQ4M5wXEibvtod5u0RGQDYKhhZFX3ca9hYuRID9GbDidql+kgt/eKCpYMpwGaVIAZGAaKObZyL1BygxTMgMUKXuOEXbQwBFEWaOt4tusQW/eKXQsDic0vE+17njA4SrjFg8n43XCwbZQsdfooCC4eSJJoXJVkRYJ/NSgHEOBIJ8wtYeAzQh0HpCjLop3GDeU4BtEU2kUpXR1YhQqlXDvhxvYG73sBd/wD4Df7+v4eqIoYgAAAAAElFTkSuQmCC","content":"00020101021126950014BR.GOV.BCB.PIX2573spi.dev.cloud.itau.com.br/documentos/198e49c5-2330-4ad7-9d0b-967c7b5371225204000053039865802BR5923PMD Gotham NegA cios ME6009SAO PAULO62410503***50300017BR.GOV.BCB.BRCODE01051.0.063040866"},"paid_date":"2022-06-01 16:20:03"}}
This endpoint allow to update the status of a order, from pending to cancelled, this order don't allow payment
HTTP Request
PUT https://noccapi-stg.paymentez.com/order/cancel/<transaction_id>
URL Parameters
Parameter
Type
Required
Description
transaction.id
String
Yes (*)
Transaction identifier. This code is unique among all transactions.
Response
Parameter
Description
status
Could be success or failure
detail
If success could be Completed If failure could be Cancellation could not be applied
transaction.id
Id generated by Nuvei
transaction.status
The status of payment (pending, approved, cancelled, failure).
transaction.status_detail
The status detail of the transaction, for more information status detail
transaction.dev_reference
Reference from commerce.
transaction.amount
Total amount to pay.
transaction.currency
Currency of the transaction.
transaction.country
Country where the transaction has made.
transaction.paid_date
Payment date of the transaction.
transaction.qr.code
Base64 code for render (only for pix carrier).
transaction.qr.content
plain text content in code (only for pix carrier).
In case of error throw in the carrier, the request return a JSON structured like this:
{"qr":{"id":"QR-128","error_code":"E28","error_desc":"Error interno del proveedor: 911-valueOfConvenienceFeePercentage debe tener un tamaño de caracteres"}}
This endpoint allow to generate QR codes that the payment method will show in order that the final client will read it
HTTP Request
POST https://ccapi-stg.paymentez.com/v2/qr/generate/
Body Parameters
Parameter
Type
Required
Description
qr.type
String
Yes
QR type, could be 'STA' for static, or 'DIN' for dynamic.
qr.expiration_time
Number
Yes
Time in seconds it will take to expire the QR to make a payment.
After the generation of a QR code, the process of authorization will begin once the QR had been read. The consult is needed in order to know the status of the payment intent.
HTTP Request
GET https://ccapi-stg.paymentez.com/v2/qr/<qr_id>/
URL Parameters
Parameter
Type
Required
Description
qr_id
String
Yes
Qr identifier. This id is unique in this platform.
transaction_date
String
No
In case that the payment apply after the creation date, you should specify the transaction date in the following format: YYYY-MM-DD
Response
Parameter
Description
transaction.status
Could be success, pending or failure.
transaction.current_status
Could be PENDING, APPROVED, CANCELLED, INITIATED, REJECTED or EXPIRED.
transaction.payment_date
If staging environment the date will be in UTC, otherwise will depend on carrier.
transaction.amount
The amount of the transaction.
transaction.authorization_code
If success the authorization code responded from carrier.
transaction.installments
The number of installments for the payment.
transaction.dev_reference
For QR empty string
transaction.message
The returned message from carrier.
transaction.carrier_code
The returned code from carrier.
transaction.id
Transaction identifier. This code is unique among all transactions.
transaction.status_detail
The status detail of the transaction, for more information status detail
card.bin
The BIN of the card (First six digits of the card).
The above request returns JSON structured like this:
{"application":{"code":"CiColApp2"},"commerce":{"merchant_id":"0010203040"},"user":{"email":"user@example.com","id":"sadfasdf"},"transaction":{"id":"DAP-11","status":"pending","dev_reference":"prueba_stg_3","amount":5001.0,"description":"Esto es una prueba","currency":"COP","country":"COL","date":null,"authorization_code":null}}
Generate a purchase order in the wallet. For example: 'daviplata'
HTTP Request
POST https://noccapi-stg.paymentez.com/order/
URL Parameters
Parameter
Type
Required
Description
carrier.id
String
Yes
Indicates the method where the order will be created.
The above request returns JSON structured like this:
{"application":{"code":"CiColApp2"},"commerce":{"merchant_id":"0010203040"},"user":{"email":"user@example.com","id":"sadfasdf"},"transaction":{"id":"DAP-11","status":"approved","dev_reference":"prueba_stg_3","amount":5001.0,"description":"Esto es una prueba","currency":"COP","country":"COL","date":"2020-08-10 16:59:38","authorization_code":"943376"}}
Only if the order generated before is with status pending, you need to verify the order.
HTTP Request
POST https://noccapi-stg.paymentez.com/order/verify/
URL Parameters
Parameter
Type
Required
Description
transaction.id
String
Yes
Payment Id returned in the generation of an order.
type
String
Yes
The type of value that is going to be sent in the request. Valid strings "BY_OTP".
value
String
Yes
The OTP (One Time Password) sent to the client.
Response
The same kind of response of generate an order.
Cards
In this platform we can securely store the sensitive credit card data.
This data is transformed into an encrypted code called token, which can be stored in a database. With the platform, the store will be able to offer features like “One click buy” and “Retry transaction”, always preserving the integrity and the confidentiality of the information.
The BIN of the card (First six digits of the card).
card.status
Either of the following status: valid, review, pending and rejected. If the response is "review" or "pending", the transaction associated to the attempt to add a card (transaction_reference) needs to be verified by the user, to set this card as valid.
card.token
New card identifier. This code is unique among all cards, only returned if status is valid or review, "" otherwise.
card.message
If any, would be the message of the carrier for example in case of rejected by carrier.
card.expiry_year
The expiry year of the card.
card.expiry_month
The expiry month of the card.
card.transaction_reference
The transaction.id that origin the addition of the card (only if it was sent to review, by the anti-fraud system, null otherwise).
This endpoint retrieves all Cards related to a user.
HTTP Request
GET https://ccapi-stg.paymentez.com/v2/card/list
URL Parameters
Parameter
Type
Required
Description
uid
String
Yes
Customer identifier. This is the identifier you use inside your application.
Response
A list of cards
Parameter
Description
result_size
Number of items of the list of cards.
card.bin
The BIN of the card (First six digits of the card).
card.status
Either of the following status: valid, review, pending and rejected. If the response is "review" or "pending", the transaction associated to the attempt to add a card (transaction_reference) needs to be verified by the user, to set this card as valid.
card.token
Card identifier. This code is unique among all cards
card.holder_name
The credit card holder name.
card.expiry_year
The expiry year of the card.
card.expiry_month
The expiry month of the card.
card.transaction_reference
The transaction.id that origin the addition of the card (only if it was sent to review, by the anti-fraud system, null otherwise).
This is an example of response for 3DS 2 with objects for authentication:
{"transaction":{"status":"failure","current_status":"REJECTED","payment_date":null,"amount":11.1,"authorization_code":null,"installments":1,"dev_reference":"referencia","message":null,"carrier_code":null,"id":"RB-5969","status_detail":37},"card":{"bin":"401600","status":"","token":"","expiry_year":"2020","expiry_month":"9","transaction_reference":"RB-5969","type":"vi","number":"0051","origin":"ORIGIN"},"3ds":{"sdk_response":{"acs_trans_id":"00000000-0005-5a5a-8000-016ab2e4246c","acs_signed_content":null,"acs_reference_number":"JCB0002"},"authentication":{"status":"U","return_message":"U-status/Challenge authentication via ACS: ","version":null,"xid":"MDAwMDAwMDAwMDAwMDAwMDAyMDg=","reference_id":"ffffffff-9002-51a3-8000-0000000345a2","cavv":null,"return_code":"5","eci":null},"browser_response":{"hidden_iframe":"","challenge_request":""}}}
This endpoint creates a debit transaction with a stored credit card.
If you want to debit with 3D Secure 2 authentication, there are two possible ways:
Direct debit with Nuvei. This will include extra_params in the request, that are used for authentication (See objects for authentication)
By Performing a 3D Secure 2 authentication calling the proper endpoint Authentication 3DS 2 section, before calling the debit.
HTTP Request
POST https://ccapi-stg.paymentez.com/v2/transaction/debit/
URL Parameters
Parameter
Type
Required
Description
session_id
String
No
Fraud related parameter. 32-length numeric hash.
order.amount
Number
Yes
Amount to debit. Format: Decimal with two fraction digits.
order.description
String
Yes
Description of the order to be purchase. Format: (Maximum Length 250)
order.dev_reference
String
Yes
Merchant order reference. You will identify this purchase using this reference.
order.vat
Number
Yes
Sales tax amount, included in product cost. Format: Decimal with two fraction digits.
order.installments
Number
No
The number of installments for the payment, only for COP, MXN, BRL, PEN, CLP and USD (Ecuador).
Only available for Ecuador and Colombia. The taxable amount is the total amount of all taxable items excluding tax. If not sent, it's calculated on the total. Format: Decimal with two fraction digits.
order.tax_percentage
Number
No
Only available for Ecuador and Colombia. The tax rate to be applied to this order. For Ecuador should be 0 or 12.
order.months_grace
Number
No
Only available for Mexico and Ecuador (Medianet), the number of months of grace for a deferred payment.
user.id
String
Yes
Customer identifier. This is the identifier you use inside your application.
user.first_name
String
No
User name.
user.last_name
String
No
User last name.
user.email
String
Yes
Buyer email, with valid e-mail format.
user.phone
String
No
Buyer phone.
user.ip_address
String
No
User IP address. Valid v4 IP address.
user.fiscal_number
String
No
The fiscal number given by the buyer Note: For card types ex, ak, vr, sx, ol, ep and cd this field is mandatory.
card.token
String
No
Card Identifier. This code is unique among all cards. Format: Long Integer.
card.cvc
String
No
The credit card security number.
wallet.type
String
No
Type of wallet, the valid are : 'VisaCheckout', 'Masterpass' and 'CyberSource'.
wallet.key
String
No
The id of the wallet (either callid, transactionId or subscriptionID ).
extra_params
Json
No
Optional params (3DS 2 objects included) used for some commerce in Json format. Please contact your commercial executive for more details.
The origin of the credit card. Could be one of the following: Paymentez, VisaCheckout, Masterpass.
In case of transactions that were authenticated with 3DS 2, the response will include:
Parameter
Description
3ds.sdk_response.acs_trans_id
Transaction ID from ACS.
3ds.sdk_response.acs_signed_content
Signed content from ACS.
3ds.sdk_response.acs_reference_number
ACS reference number.
3ds.authentication.status
Authentication status, could be: "Y", "N", "U", "A", "R", "C" or "-" if value not available due errors or not enrolled, for more information authentication_status.
3ds.authentication.xid
Transaction identifier sent to MPI.
3ds.authentication.return_code
Returned code from MPI, that provides all the information that is needed to determine how to manage the transaction, for more information return code mpi
3ds.authentication.eci
Electronic Commerce Indicator, with visa cards, the value to be passed in Authorization message.
3ds.authentication.return_message
Description of the return_code.
3ds.authentication.version
3DS message version used.
3ds.authentication.cavv
Cardholder Authentication Verification Value, determined by ACS. Format: base64
3ds.authentication.reference_id
DS Transaction Id.
3ds.browser_response.challenge_request
If cardholder was enrolled and or challenge authentication requested, payment page application must redirects the user browser to the ACS. If this field is not empty, it will contain the html to redirect.
3ds.browser_response.hidden_iframe
If this field is not empty, the content should be render into an intermediate page into an invisible iframe and wait about 5 seconds.
3ds.service
The name of the MPI that has authenticated the transaction.
Objects for authentication
Before perform a payment whether through a debit with token, a debit with card or an authorization, it is possible to first perform a 3D Secure authentication, sending this objects in extra_params:
Object name
Description
threeDS2_data
If authentication will be performed directly in debit/authorization this object is required.
browser_info
Required for device_type browser.
auth_data
Use this object if you performed the authentication first.
risk_indicator
Additional risk fields for 3DS 2. Include this in your request whenever available.
Parameter
Type
Required
Description
extra_params.threeDS2_data.term_url
String
Yes
Merchant page url, where ACS will post (via user browser) CRes message after authentication.
extra_params.threeDS2_data.device_type
String
Yes
Device type. Valid strings: browser, SDK.
extra_params.threeDS2_data.process_anyway
Boolean
No
Process anyway, ie. no matter the result of the authentication, perform the debit/authorize. If not provided default false.
extra_params.threeDS2_data.reference_id
String
Yes*
Mandatory only for MPI CyberSource, the id used to build the jwt sent in the init method in front end.
extra_params.browser_info.ip
String
C
User IP address. Valid v4 IP address.
extra_params.browser_info.language
String
C
Language of the browser.
extra_params.browser_info.java_enabled
Boolean
C
If java is enabled in the browser.
extra_params.browser_info.js_enabled
Boolean
C
If Java Script is enabled in the browser.
extra_params.browser_info.color_depth
Number
C
Color depth of the browser.
extra_params.browser_info.screen_height
Number
C
Screen height of the browser.
extra_params.browser_info.screen_width
Number
C
Screen width of the browser.
extra_params.browser_info.timezone_offset
Number
C
Time Zone Offset.
extra_params.browser_info.user_agent
String
C
User agent.
extra_params.browser_info.accept_header
String
C
Accept header.
extra_params.auth_data.cavv
String
Yes
Cardholder Authentication Verification Value, determined by ACS. Format: base64
extra_params.auth_data.xid
String
No
Transaction identifier sent to MPI.
extra_params.auth_data.eci
String
Yes
Electronic Commerce Indicator, with visa cards, the value to be passed in Authorization message.
extra_params.auth_data.version
String
Yes
3DS message version used.
extra_params.auth_data.reference_id
UUID
Yes
DS Transaction Id.
extra_params.auth_data.status
String
Yes
Authentication status, could be: "Y", "N", "U", "A", "R" or "C", for more information authentication_status
Address
This is an example of request with Billing Address Object:
Reservation date in the following format:YYYY-MM-DD HH:MM:SS.
reservation.ticket_number
String
No
Ticket number.
reservation.travel_agent_code
String
Yes
Travel agent code.
reservation.travel_agent_name
String
Yes
Travel agent name.
reservation.itinerary_type
String
No
Itinerary type can be MULTI_DESTINATION, ONE_WAY, ROUND_TRIP.
reservation.complete_route
String
No
Complete route example: SFO-JFK:JFK-LHR:LHR-CDG.
reservation.frequent_flyer
String
No
Frequent flyer code, split with _.
reservation.delta_days
Number
No
Delta days.
reservation.city_departure
String
No
Departure city.
reservation.city_arrival
String
No
Arrival City.
Flight leg object detail.
Parameter
Type
Required
Description
carrier_code
String
Yes
Carrier code.
departure_airport
String
Yes
Departure airport.
departure_date
Date Time
Yes
Departure date in the following format:YYYY-MM-DD HH:MM:SS.
destination_airport
String
Yes
Destination airport
arrival_date
Date Time
Yes
Arrival date in the following format:YYYY-MM-DD HH:MM:SS.
flight_number
String
Yes
Flight number.
stopover_allowed
Boolean
No
Allow stopover.
Passenger object detail.
Parameter
Type
Required
Description
id
String
No
User id.
first_name
String
Yes
First name passenger.
last_name
String
Yes
Last name passenger.
middle_name
String
No
Middle name passenger.
title
String
Yes
Title passenger.
email
String
No
Passenger email.
type
String
No
Passenger type : ADT, INF ó CHD.
phone
String
No
Passenger phone.
amount
Number
No
Amount for passenger. Format: Decimal with two fraction digits.
Installments Type
The installments type are only available for Ecuador and Mexico. For this countries if you send installments, then the installments_type are mandatory. The valid values are:
Type
Description
0
Revolving credit (rotativo).
1
Revolving and deferred without interest (The bank will pay to the commerce the installment, month by month).
2
Deferred with interest.
3
Deferred without interest.
7
Deferred with interest and months of grace.
6
Deferred without interest pay month by month. (*)
9
Deferred without interest and months of grace.
10
Deferred without interest promotion bimonthly. (*)
21
For Diners Club exclusive, deferred with and without interest.
22
For Diners Club exclusive, deferred with and without interest.
30
Deferred with interest pay month by month. (*)
50
Deferred without interest promotions (Supermaxi). (*)
51
Deferred with interest (Cuota fácil). (*)
52
Without interest (Rendecion Produmillas). (*)
53
Without interest sale with promotions. (*)
70
Deferred special without interest. (*)
72
Credit without interest (cte smax). (*)
73
Special credit without interest (smax). (*)
74
Prepay without interest (smax). (*)
75
Deffered credit without interest (smax). (*)
90
Without interest with months of grace (Supermaxi). (*)
This endpoint creates a debit transaction with a QR code, only for Colombia (COP).
This is a solution that allow to pay throw a QR code generated in the dataphone or mobile application that is scaned from the mobile wallet of the client.
HTTP Request
POST https://ccapi-stg.paymentez.com/v2/transaction/debit/
URL Parameters
Parameter
Type
Required
Description
session_id
String
No
Fraud related parameter. 32-length numeric hash.
order.amount
Number
Yes
Total amount to pay. Format: Decimal with two fraction digits.
order.description
String
Yes
The order description.
order.dev_reference
String
Yes
Id from commerce to identify the order.
order.vat
Number
Yes
Sales tax amount, included in product cost. Format: Decimal with two fraction digits.
order.installments
Number
No
The number of installments for the payment, only for COP, MXN, BRL, PEN, CLP and USD (Ecuador).
user.id
String
Yes
Buyer identifier.
user.email
String
Yes
Buyer email registered to order.
user.phone
String
No
Numero de teléfono del comprador.
user.ip_address
String
No
User IP address. Valid v4 IP address.
user.fiscal_number
String
No
The fiscal number given by the buyer Note: For card types ex, ak, vr, sx, ol, ep and cd this field is mandatory.
user.fiscal_number_type
String
No
Fiscal number type
card.token
String
Yes
Card Identifier. This code is unique among all cards. Format: Long Integer.
card.account_type
String
No
The corresponding values for: Credit, Checking and Savings accounts are: C, R and A respectively.
Only available for Ecuador and Colombia. The taxable amount is the total amount of all taxable items excluding tax. If not sent, it's calculated on the total. Format: Decimal with two fraction digits.
order.tax_percentage
Number
No
Only available for Ecuador and Colombia. The tax rate to be applied to this order. For Ecuador should be 0 or 12.
order.months_grace
Number
No
Only available for Mexico and Ecuador (Medianet), the number of months of grace for a deferred payment.
user.id
String
Yes
Customer identifier. This is the identifier you use inside your application.
user.first_name
String
No
User name.
user.last_name
String
No
User last name.
user.email
String
Yes
Buyer email, with valid e-mail format.
user.phone
String
No
Buyer phone.
user.ip_address
String
No
User IP address. Valid v4 IP address.
user.fiscal_number
String
No
The fiscal number given by the buyer Note: For card types ex, ak, vr, sx, ol, ep and cd this field is mandatory.
The above request returns JSON structured like this:
{"transaction":{"id":"RB-MA-1826","status":"success","current_status":"APPROVED","status_detail":3,"payment_date":"2024-03-04T16:16:44.271","amount":200.0,"installments":1,"carrier_code":"00","message":"Response by mock","authorization_code":"bMSLxK","dev_reference":"referencia","carrier":"Redeban","product_description":"Product description","payment_method_type":"0"},"card":{"number":"7445","bin":"519633","type":"mc","transaction_reference":"RB-MA-1826","expiry_year":"2026","expiry_month":"1","origin":"localhost:8080","fiscal_number":"80265579"}}
This endpoint creates a debit transaction with a credit card through a token.
HTTP Request
POST https://ccapi-stg.paymentez.com/v2/transaction/debit_cc/
URL Parameters
Parameter
Type
Required
Description
order.amount
Number
Yes
Total amount to pay. Format: Decimal with two fraction digits.
order.description
String
Yes
The order description.
order.dev_reference
String
Yes
Id from commerce to identify the order.
order.vat
Number
Yes
Sales tax amount, included in product cost. Format: Decimal with two fraction digits.
order.installments
Number
No
The number of installments for the payment, only for COP, MXN, BRL, PEN, CLP and USD (Ecuador).
user.id
String
Yes
Buyer identifier.
user.email
String
Yes
Buyer email registered to order.
user.phone
String
No
Numero de teléfono del comprador.
user.ip_address
String
No
User IP address. Valid v4 IP address.
user.fiscal_number
String
No
The fiscal number given by the buyer Note: For card types ex, ak, vr, sx, ol, ep and cd this field is mandatory.
This endpoint capture an authorized transaction (Only for Cielo (BRL), Prosa (MXN) Procesos and VisaNet (PEN))
HTTP Request
POST https://ccapi-stg.paymentez.com/v2/transaction/capture/
URL Parameters
Parameter
Type
Required
Description
transaction.id
String
Yes
Transaction identifier. This code is unique among all transactions.
order.amount
Number
No
The order amount to capture, could be greater o lower than original (Prosa MXN), or only lower (Cielo, BRL Procesos and VisaNet (PEN)). Format: Decimal with two fraction digits. If not provided, the full amount of the original authorize will be captured.
{"transaction":{"status":"failure","payment_date":null,"amount":11.1,"authorization_code":null,"installments":1,"dev_reference":"referencia","message":null,"carrier_code":null,"id":"RB-5969","status_detail":37},"card":{"bin":"401600","status":"","token":"","expiry_year":"2020","expiry_month":"9","transaction_reference":"RB-5969","type":"vi","number":"0051","origin":"ORIGIN"},"3ds":{"sdk_response":{"acs_trans_id":"00000000-0005-5a5a-8000-016ab2e4246c","acs_signed_content":null,"acs_reference_number":"JCB0002"},"authentication":{"status":"U","return_message":"U-status/Challenge authentication via ACS: ","version":null,"xid":"MDAwMDAwMDAwMDAwMDAwMDAyMDg=","reference_id":"ffffffff-9002-51a3-8000-0000000345a2","cavv":null,"return_code":"5","eci":null},"browser_response":{"hidden_iframe":"","challenge_request":""}}}
After have been performed a transaction, whether through an add card, a debit with token, a debit with card or an authorization, if the response transaction status is pending, this end point should be posted after that.
Sometimes an add card or debit transaction would need to be verified with a code from the financial entity that charges the card. Another case that needs verification is when the card issuer send a OTP to the user in order to continue with the transaction, or after the buyer have been challenged in a 3DS 2 transaction.
When the buyer gets the verification code from his bank, or when the buyer obtain the SMS with the OTP, or when the merchant gets the result of the challenge response, its possible to verify the operation making a request to:
HTTP Request
POST https://ccapi-stg.paymentez.com/v2/transaction/verify
URL Parameters
Parameter
Type
Required
Description
transaction.id
String
Yes
Transaction identifier. This code is unique among all transactions.
user.id
String
Yes
Customer identifier. This is the identifier you use inside your application. Max length allowed 100 characters
type
String
Yes
The type of value that is going to be sent in the request. Valid strings "BY_AMOUNT", "BY_AUTH_CODE", "BY_OTP", "BY_CRES" and "AUTHENTICATION_CONTINUE".
value
String
Yes
Could be the authorization code provided by the financial entity to the buyer, the transaction amount, the One Time Password (OTP), the Challenge Response (CRES), or empty string in case of AUTHENTICATION_CONTINUE.
more_info
Boolean
No
true or false to determine if the response will include more info about the transaction.
Response
Parameter
Description
status
The status of the transaction, for more information status detail
payment_date
If staging environment the date will be in UTC, otherwise will depend on carrier.
amount
The amount of the transaction.
transaction_id
Transaction identifier. This code is unique among all transactions.
status_detail
The status detail of the transaction, for more information status detail
message
If the type of verification was "BY_OTP", the response message in case of failure.
{"status":"success","transaction":{"status":"success","payment_date":"2020-02-11T00:39:58.477","authorization_code":"TEST00","refund_amount":8.0,"dev_reference":"referencia","carrier_code":null,"status_detail":34,"amount":11.1,"installments":1,"message":"Reverse by mock","id":"PR-11"},"detail":"Completed partial refunded with 8.0","card":{"bin":"400000","status":"","token":"","expiry_year":"2020","expiry_month":"9","transaction_reference":"PR-11","type":"vi","number":"0077","origin":"ORIGIN"}}
This endpoint is used to refund a transaction
HTTP Request
POST https://ccapi-stg.paymentez.com/v2/transaction/refund/
URL Parameters
Parameter
Type
Required
Description
transaction.id
String
Yes (*)
Transaction identifier. This code is unique among all transactions.
transaction.reference_label
Number
Yes (*)
Only for QR Colombia. ID Reference for a QR transaction.
order.amount
Number
No
The order amount to refund. Format: Decimal with two fraction digits. If not provided, the full amount of the transaction. Works with Cielo (BRL), Prosa (MXN), Credibanco and Redeban (COP) (**).
more_info
Boolean
No
true or false to determine if the response will include more info about the transaction.
Response
Parameter
Description
status
Could be one of the following: success, pending or failure
detail
If success could be Completed or Completed partial refunded with NN.NN where NN.NN is the amount of the partial refund. If failure could be Error: Not completed, Transaction already refunded or Invalid Status. If pending, Waiting gateway confirmation or Waiting gateway confirmation for partial refund with NN.NN.
The above request returns JSON structured like this:
{"application":{"code":"CiEquApp"},"commerce":{"merchant_id":"456879852"},"beneficiary":{"first_name":"John","last_name":"Doe","email":"user@example.com","card_bin":"405142","card_number":"8061"},"transaction":{"id":"PP-MA-49","dev_reference":"123456789","amount":200.0,"currency":"PEN","authorization_code":"222752","authorization_date":"2020-04-20 18:34:33","error_code":"00","error_description":"Approved and completed successfully","status_detail":3,"current_status":"APPROVED"}}
Allows performing a payout (a transfer of funds from the merchant to the consumer) with no connection to a previous transaction.
HTTP Request
POST https://ccapi-stg.paymentez.com/v3/card/payout/
URL Parameters
Parameter
Type
Required
Description
order.amount
Number
Yes
The transaction amount. Decimal with two fraction digits.
order.currency
String
Yes
Three letter ISO currency code, example PEN.
order.dev_reference
String
Yes
Merchant order reference. Max length 50.
card.number
String
Yes
A valid credit card number.
card.holder_name
String
Yes
The credit card holder name.
card.expiry_month
Number
Yes
The credit card expiry month.
card.expiry_year
Number
Yes
The credit card expiry year.
user.first_name
String
Yes
First name beneficiary. Max length 30.
user.last_name
String
Yes
Last name beneficiary. Max length 40.
user.address
String
Yes
Address of beneficiary. Max length 50.
user.phone
String
Yes
Phone number beneficiary. Max length 18.
user.zip
String
Yes
Zip beneficiary. Max length 10.
user.city
String
Yes
City of beneficiary. Max length 30.
user.country
String
Yes
Three letter ISO county code, example PER.
user.state
String
No
The state of the beneficiary. Max length 3.
user.email
String
Yes
Card holder valid email.
user.identification
String
Yes
This represents the customer’s identification number in their respective country. Max length 15.
To generate a link to pay, certain information is required, this allows to consume any payment method provided by Nuvei
HTTP Request
POST https://noccapi-stg.paymentez.com/linktopay/init_order/
URL Parameters
Parameter
Type
Required
Description
user.id
String
Yes
Buyer identifier. Max length 250 characters.
user.email
String
Yes
Buyer email, with valid e-mail format. Max length 250 characters.
user.name
String
Yes
Buyer name. Max length 100 characters.
user.last_name
String
Yes
Buyer name. Max length 100 characters.
user.fiscal_number_type
String
No
Indicates the type of fiscal number (user identification).See the valid types.
user.fiscal_number
String
No
Fiscal number (identification number) given by the user. Max length 100 characters.
order.dev_reference
String
Yes
Id from commerce to identify the order. Max length 100 characters.
order.description
String
Yes
The order description. Max length 250 characters.
order.amount
Number
Yes
Total amount to pay. Format: Decimal with two fraction digits.
order.installments_type
Number
Yes
Only available Ecuador and Mexico see the valid types. For the rest of the countries, 0 to allow installments, -1 otherwise. Only available to card payment method.
order.vat
Number
Yes
Sales tax amount, included in order amount. Format: Decimal with two fraction digits.
order.inc
Number
No
National consumption tax, included in order amount. Format: Decimal with two fraction digits.
order.tip
Number
No
Only available for pay with Qr code . Tip, not included in order amount. Format: Decimal with two fraction digits.
order.taxable_amount
Number
No
Only available for Ecuador and Colombia. The taxable amount is the total amount of all taxable items excluding tax. If not sent, it's calculated on the total. Format: Decimal with two fraction digits.
order.tax_percentage
Number
No
Only available for Ecuador and Colombia. The tax rate to be applied to this order. For Ecuador should be 0 or 12.
URL to redirect when transaction is success. (max 500)
configuration.failure_url
String
Yes
URL to redirect when transaction is failure. (max 500)
configuration.pending_url
String
Yes
URL to redirect when transaction is pending. (max 500)
configuration.review_url
String
Yes
URL to redirect when transaction is in review. (max 500)
configuration.card.capture_cellphone
Boolean
No
Indicates if it is required or not to ask for the phone number in card payment (By default is True).
billing_address.street
String
No
The name of the street.
billing_address.city
String
Yes
The city, max length of 50 characters.
billing_address.state
String
No
The state: ISO 3166-2 country subdivision code in case of 3DS authentication, free format otherwise
billing_address.district
String
No
The district.
billing_address.zip
String
Yes
The zip or postal code. Max length allowed of 50 characters.
billing_address.house_number
String
No
The house number
billing_address.country
String
Yes
Country in ISO 3166-1 alpha-3 format, for example: COL, MEX, ECU.
billing_address.additional_address_info
String
No
Additional address info, without format.
Response
Parameter
Description
user.id
Buyer identifier.
user.email
Buyer email registered to order.
order.dev_reference
Reference from commerce.
order.amount
Total amount to pay.
order.description
Order description.
configuration.expiration_date
Date limit to pay.
configuration.partial_payment
Indicates if the partial payment is allowed.
configuration.allowed_payment_methods
Indicates allowed payment methods.
payment.payment_url
Link To Pay, URL to do redirect.
payment.payment_qr
Code Qr base64, URL to do redirect.
Currencies
Allowed currencies:
Currency
Country
COP
Colombia
USD
Ecuador, El Salvador, Panama
BRL
Brazil
MXN
Mexico
ARS
Argentina
CLP
Chile
PEN
Peru
GTQ
Guatemala
HNL
Honduras
NIO
Nicaragua
CRC
Costa Rica
Allowed payment methods
Allowed payment methods by country:
Key
Description
All
All payment methods
Card
Only card payment method (All countries)
BankTransfer
Only bank transfer method (Colombia)
Cash
Only cash / reference payment method (Colombia, Mexico, Ecuador)
Colsubsidio
Only colsubsidio for Colombia
EWallet
Only E-wallet payment method (Colombia)
Qr
Only Qr code payment method (Colombia)
Pix
Only Pix (Qr code) payment method (Brazil)
Authentication 3DS 2
3D Secure 2 is the new generation of authentication technology introduced by EMVCo and major card schemes, providing an additional layer of verification on Card Not Present (CNP) transactions.
The goal is to reduce the risk of fraud without harming the conversion rate. This new version analyzes several variables used as a criteria to determine the cardholder authenticity, allowing in some cases decreased cardholder authentication interactions (challenges), without risking the merchant’s Liability Shift.
In 3D Secure 2, the authentication is performed within your app or payment form. The shopper's identity may be verified by using passive, biometric, and two-factor authentication approach. A transaction may go through a frictionless or a challenge authentication flow.
3D Secure 2 is supported by the following card schemes:
Visa
Mastercard
Discover / Diners
JCB
UnionPay
American Express
How it works
In 3D Secure 2, the browser flow and mobile flow are treated separately.
For the browser flow the steps are the following:
The payment page places Nuvei
input values into 3DS authenticate endpoint and post it.
The MPI contacts directory and returns either final response, continue with authentication and perform 3DS method or finalized HTML redirect form with included formatted CReq message and ACS URL to the payment page application.
If cardholder was enrolled and or challenge authentication requested, payment page application redirects the user browser to the ACS with posting the PAReq/CReq from acquired from MPI.
ACS authenticates.
Payment page application receives the Nuvei
transaction id and CRes back from the ACS.
Payment page application submits the ACS response CRes to Nuvei
in the verify_auth endpoint.
Nuvei
return the result of the verification of the CRes.
For the SDK flow the steps are the following:
The app collect the sdk_info needed and send to the commerce backend (SDK initialization / getSdkInfo). The commerce backed gather all the information an places input values into 3ds `authenticate endpoint and post it.
The MPI contacts directory and returns either final response, or the information needed (sdk_response) to fulfill the challenge request.
ACS authenticates.
The app obtain the authentication result from the ACS.
If authenticated the commerce backend submits the verify_auth endpoint to get the authentication result params.
The above request returns JSON structured like this: (case B)
{"authentication":{"status":"-","xid":"MDAwMDAwMDAwMDAwMDAwMDAxMDc=","return_code":"50","eci":null,"return_message":"3DS method requested before enrollment","version":null,"cavv":null,"reference_id":null},"transaction":{"dev_reference":"ref_12","id":"AU-107"},"browser_response":{"challenge_request":"","hidden_iframe":"<iframe>...</iframe><form>...</form><script type='text/javascript' xmlns='http://www.w3.org/1999/xhtml'>document.getElementById('tdsMmethodForm').submit();</script>"},"sdk_response":{"acs_trans_id":"00000000-0005-5a5a-8000-016ab2e4246c","acs_signed_content":null,"acs_reference_number":"JCB0002"},"service":"modirum"}
The above request returns JSON structured like this: (case C)
{"authentication":{"status":null,"xid":"MDAwMDAwMDAwMDAwMDAwMDAxMDk=","return_code":"9","eci":null,"return_message":"To be redirected to acs","version":null,"cavv":null,"reference_id":null},"transaction":{"dev_reference":"ref_1234","id":"AU-109"},"browser_response":{"challenge_request":"<!DOCTYPE html SYSTEM 'about:legacy-compat'><html>.....</html>","hidden_iframe":""},"sdk_response":{"acs_trans_id":"00000000-0005-5a5a-8000-016ab2e4246c","acs_signed_content":null,"acs_reference_number":"JCB0002"},"service":"nuvei"}
This endpoint initiates the flow of authentication with 3DS 2
HTTP Request
POST https://ccapi-stg.paymentez.com/v2/3ds/authenticate/
URL Parameters
Parameter
Type
Required
Description
term_url
String
Yes
Merchant page url, where ACS will post (via user browser) CRes message after authentication.
device_type
String
Yes
Device type. Valid strings: browser, SDK.
user.id
String
Yes
Customer identifier. This is the identifier you use inside your application. Max length allowed 100 characters
user.email
String
Yes
Buyer email, with valid e-mail format.
user.mobile_phone
String
No
User mobile phone Format: 1-3 digits for country code - number. Example: 52-1234567890
user.home_phone
String
No
User home phone Format: 1-3 digits for country code - number. Example: 52-1234567890
user.work_phone
String
No
User work phone Format: 1-3 digits for country code - number. Example: 52-1234567890
order.amount
Number
Yes
Amount to debit. Format: Decimal with two fraction digits.
order.description
String
Yes
Description of the order to be purchase. Format: (Maximum Length 250)
order.dev_reference
String
Yes
Merchant order reference. You will identify this purchase using this reference.
order.installments
Number
No
The number of installments for the payment, only for COP, MXN, BRL, PEN, CLP and USD (Ecuador).
State, format: ISO 3166-2 country subdivision code, example 'DF' for Ciudad de México
risk_indicator.ship_indicator
Number
No
Format 2 numeric
risk_indicator.delivery_time_frame
Number
No
Length 1-2
risk_indicator.delivery_email_addr
String
No
A valid e-mail address
risk_indicator.reorder_items_ind
Number
No
Length 1-2
risk_indicator.pre_order_purchase
Number
No
Length 1-2
risk_indicator.pre_order_date
String
No
Date, format: YYYYMMDD
risk_indicator.gift_card_amount
Number
No
Format: Decimal with two fraction digits
risk_indicator.gift_card_curr
String
No
Gift card currency, example: COP, MXN, PEN, BRL, CLP
risk_indicator.gift_card_count
Number
No
Format 2 numeric
Response
Parameter
Description
authentication.status
Authentication status, could be: "Y", "N", "U", "A", "R", "C" or "-" if value not available due errors or not enrolled, for more information authentication_status.
authentication.xid
Transaction identifier sent to MPI.
authentication.return_code
Returned code from MPI, that provides all the information that is needed to determine how to manage the transaction, for more information return code mpi
authentication.eci
Electronic Commerce Indicator, with visa cards, the value to be passed in Authorization message.
authentication.return_message
Description of the return_code.
authentication.version
3DS message version used.
authentication.cavv
Cardholder Authentication Verification Value, determined by ACS. Format: base64
authentication.reference_id
DS Transaction Id.
transaction.dev_reference
Id reference from commerce.
transaction.id
Transaction identifier. This code is unique among all transactions.
browser_response.challenge_request
If cardholder was enrolled and or challenge authentication requested, payment page application must redirects the user browser to the ACS. If this field is not empty, it will contain the html to redirect.
browser_response.hidden_iframe
If this field is not empty, the content should be render into an intermediate page into an invisible iframe and wait about 5 seconds.
sdk_response.acs_trans_id
Transaction ID from ACS.
sdk_response.acs_signed_content
Signed content from ACS.
sdk_response.acs_reference_number
ACS reference number.
service
The name of the MPI that has authenticated the transaction.
Authentication Status
Code
Description
Y
Authentication / Account verification successful.
N
Not Authenticated / Account not verified. Transaction denied.
U
Authentication / Account verification could not be performed.
A
Authentication / Verification was attempted but could not be verified.
C
Challenge Required. Additional authentication is required using a Challenge.
R
Authentication /Account verification rejected by the Issuer.
Return Code MPI (This apply for Modirum MPI only)
Code
Description
0
Not Authenticated, do not continue transaction
1
Fully Authenticated, continue transaction
2
Not enrolled
3
Not enrolled cache
4
Attempt
5
U-received
6
Error received (from Directory or ACS)
9
Pending
50
Execute 3DS method and continue to authentication
80
Skip device case (no 3DS performed as device known not well capable)
If in the authentication return code is 50, this end point should be posted after had been render the iframe and had waited during 5 seconds.
HTTP Request
POST https://ccapi-stg.paymentez.com/v2/3ds/auth_continue/
URL Parameters
Parameter
Type
Required
Description
transaction.id
String
Yes
Transaction identifier. This code is unique among all transactions.
Response
Parameter
Description
authentication.status
Authentication status, could be: "Y", "N", "U", "A", "R", "C" or "-" if value not available due errors or not enrolled, for more information authentication_status.
authentication.xid
Transaction identifier sent to MPI.
authentication.return_code
Returned code from MPI, that provides all the information that is needed to determine how to manage the transaction, for more information return code mpi
authentication.eci
Electronic Commerce Indicator, with visa cards, the value to be passed in Authorization message.
authentication.return_message
Description of the return_code.
authentication.version
3DS message version used.
authentication.cavv
Cardholder Authentication Verification Value, determined by ACS. Format: base64
authentication.reference_id
DS Transaction Id.
transaction.dev_reference
Id reference from commerce.
transaction.id
Transaction identifier. This code is unique among all transactions.
browser_response.challenge_request
If cardholder was enrolled and or challenge authentication requested, payment page application must redirects the user browser to the ACS. If this field is not empty, it will contain the html to redirect.
browser_response.hidden_iframe
If this field is not empty, the content should be render into an intermediate page into an invisible iframe and wait about 5 seconds.
The above request returns JSON structured like this:
{"authentication":{"status":"Y","xid":"MDAwMDAwMDAwMDAwMDAwMDAxMTA=","return_code":"1","eci":"05","return_message":"Y-status/Challenge authentication via ACS: https://dsx.modirum.com:443/dstests/ACSEmu2","version":null,"cavv":"QUNTRU1VOlFmJCRoQm9EaGxKdFk=","reference_id":"00000000-463b-5424-8000-000000033f52"},"transaction":{"dev_reference":"ref_1234","id":"AU-109"},"browser_response":{"challenge_request":"","hidden_iframe":""},"sdk_response":{"acs_trans_id":"00000000-0005-5a5a-8000-016ab2e4246c","acs_signed_content":null,"acs_reference_number":"JCB0002"},"service":"nuvei"}
If a challenge was requested, this end point has to be requested to validate the Challenge response.
HTTP Request
POST https://ccapi-stg.paymentez.com/v2/3ds/auth_verify/
URL Parameters
Parameter
Type
Required
Description
transaction.id
String
Yes
Transaction identifier. This code is unique among all transactions.
cres
String
Yes for browser
Challenge request response received in the term_url. Format: base64 url encoded. Only for device type browser is mandatory
Response
Parameter
Description
authentication.status
Authentication status, could be: "Y", "N", "U", "A", "R", "C" or "-" if value not available due errors or not enrolled, for more information authentication_status.
authentication.xid
Transaction identifier sent to MPI.
authentication.return_code
Returned code from MPI, that provides all the information that is needed to determine how to manage the transaction, for more information return code mpi
authentication.eci
Electronic Commerce Indicator, with visa cards, the value to be passed in Authorization message.
authentication.return_message
Description of the return_code.
authentication.version
3DS message version used.
authentication.cavv
Cardholder Authentication Verification Value, determined by ACS. Format: base64
authentication.reference_id
DS Transaction Id.
transaction.dev_reference
Id reference from commerce.
transaction.id
Transaction identifier. This code is unique among all transactions.
browser_response.challenge_request
If cardholder was enrolled and or challenge authentication requested, payment page application must redirects the user browser to the ACS. If this field is not empty, it will contain the html to redirect.
browser_response.hidden_iframe
If this field is not empty, the content should be render into an intermediate page into an invisible iframe and wait about 5 seconds.
For further information visit the following manual.
Test Cards
You can use the following cards for your tests. For adding a card or direct purchase in staging environment:
Card
Return Code
Scenarios
4111111111111111, 36417002140808
valid
Charge succeeds
5119159076977991, 370236553676505
review
Charge is under Review
4242424242424242, 347763907473248
rejected
Not Authorized
4520121813132351, 378196561987405
rejected
Rejected by Fraud System
375953548754701, 376337093362277
rejected
Card in black list
For a card not listed above, the system will leave the card as valid.
Once you add a valid card in the platform you can prove the debit using a specific description as follow:
order.description
Result
Approved transaction
status = success, status_detail = 3
Denied transaction
status = failure, status_detail = 9
Reviewed transaction
status = pending, status_detail = 1
Rejected by fraud system transaction
status = failure, status_detail = 11
Card in black list
status = failure, status_detail = 12
You can use either the test cards or the description to prove, but not both.
OTP Diners
In case of integration with OTP Diners (only Ecuador) you can use the following testing cards in staging environment:
Card
OTP
36417002140808
012345 (success result)
36417002140808
543210 (pending result)
3DS with nuvei MPI
The following cards are for testing in the staging environment, you should change the order.description depending on the test case
Every time a transaction gets approved or cancelled you will get an HTTP POST request from Nuvei to your callback_url (you need to provide this url to our staff). The POST includes the following fields:
Parameter
Description
transaction.status
The status of the transaction, for more information status
transaction.order_description
Description of the order to be purchase. Format: (Maximum Length 250)
transaction.authorization_code
If success the authorization code responded from carrier.
transaction.status_detail
The status detail of the transaction, for more information status detail
transaction.date
Transaction date (used for approved numbers in the Dashboard).
transaction.message
The returned message from carrier or fraud analysis system.
transaction.id
Transaction identifier. This code is unique among all transactions.
transaction.dev_reference
Merchant order reference.
transaction.carrier_code
The returned code from carrier.
transaction.amount
The amount of the transaction.
transaction.paid_date
Transaction paid date (used for approved numbers in the Dashboard).
transaction.installments
The number of installments for the payment.
transaction.stoken
MD5 hash of [transaction_id]_[application_code]_[user_id]_[app_key]
transaction.ltp_id
Reference to the link to pay used to pay.
transaction.application_code
The transaction belongs to this application code.
transaction.payment_method_type
Payment method of the transaction, type string. For more information payment_method_types
transaction.terminal_code
Terminal id of the transaction.
user.id
Customer identifier. This is the identifier you use inside your application.
user.email
Buyer email, with valid e-mail format.
card.bin
The BIN of the card (First six digits of the card).
The origin of the credit card. Could be one of the following: Paymentez, VisaCheckout, Masterpass.
card.fiscal_number
Fiscal number of the payer of the transaction.
For every transaction you must return an HTTP status, this status is only used to know that you received correctly the call:
Status
Case
200
success
203
token error
You just need to generate the stoken and match the token against the one you receive to be sure that the POST came from Nuvei
. You must store this information from all transactions in your database and always check the transaction.id to make sure you are not getting a duplicated POST.
If your server doesn’t respond with an HTTP 200 OK message, the POST will be retrying until get an status HTTP 200, this during 48 hours, with incremental period of time in each retry, first retry will be at 5 min aprox., second retry at 10 min aprox. and so on. In case of receiving any HTTP status >= 500 we will stop trying.
Additionally to approve transactions we also send you those approved transactions that get cancelled, this time the only difference is the status value, which will be 2. In this case you should answer with 200 (so we don’t send it again) and should update the transaction status so you ensure your data and accounting matches with Nuvei
Status details
The Nuvei
API uses the following status and status details:
Status
Meaning
0
Pending
1
Approved
2
Cancelled
4
Rejected
5
Expired
Status Detail
Meaning
0
Waiting for Payment.
1
Verification required, please see Verification section.
2
Paid Partially
3
Paid.
4
In Dispute.
5
Overpaid.
6
Fraud.
7
Refund.
8
Chargeback
9
Rejected by carrier.
10
System error.
11
Nuvei fraud.
12
Nuvei blacklist.
13
Time tolerance.
14
Expired by Nuvei
15
Expired by carrier.
16
Rejected by Nuvei
17
Abandoned by Nuvei
18
Abandoned by Customer
19
Invalid Authorization Code.
20
Authorization code expired.
21
Nuvei Fraud - Pending refund.
22
Invalid AuthCode - Pending refund.
23
AuthCode expired - Pending refund.
24
Nuvei Fraud - Refund requested.
25
Invalid AuthCode - Refund requested.
26
AuthCode expired - Refund requested.
27
Merchant - Pending refund.
28
Merchant - Refund requested.
29
Annulled.
30
Transaction seated (only Ecuador).
31
Waiting for OTP.
32
OTP successfully validated.
33
OTP not validated.
34
Partial refund.
35
3DS method requested, waiting to continue.
36
3DS challenge requested, waiting CRES.
37
Rejected by 3DS.
47
Failure cpf validation
48
Authenticated by 3DS
Errors
The Nuvei
API uses the following error codes:
Http Status Code
Meaning
400
Bad Request -- For example json not well formatted, data type or parameters missing.
401
Unauthorized -- Your auth_token is wrong or expired.
403
Forbidden -- For several reasons, for example invalid card, card already added, carrier not configured or operation not allowed.
404
Not found -- The resource does not exist.
409
Conflict -- For several reasons, for example transaction could not be created, a miss configuration, the response from third party service response with error.
500
Internal Server Error -- We had a problem with our server. Try again later.
503
Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
Response in case of error
An example of an error returns JSON structured like this:
{"error":{"type":"Invalid Token","help":"Auth-Token: should have a format like b64encode(application_code;unix_timestamp;token)","description":"{}"}}
Parameter
Description
error.type
Type of error.
error.help
In some cases a useful help for the developers.
error.description
A description of the error.
Payment Method Types
These are the meanings of the different payment method types.