Process a QR Code Payment

The QR Sale service (Command 100) allows merchants to initiate a digital wallet payment by generating a dynamic QR code on the POS terminal screen. This unified interface leverages the same processing logic as card sales but alters the terminal's interaction model to accept digital wallet scans.

Service Definition

To trigger a payment via QR code, send a POST request to the Sale endpoint and set the saleType parameter to 1.
AttributeSpecification
Endpoint URLhttp://pos-domain/api/postxs/sale
MethodPOST
AuthorizationBearer <token>

Required Headers

Include the following mandatory headers in every request:

  • env: Environment identifier (e.g., uat).
  • country: Country code (e.g., ar).
  • app: Application identifier (always posintegrado).

Request Parameters

Include the terminal identifiers and the specific transaction details in the request body.

ParameterTypeRequiredDescription
idTerminalStringYes8-character alphanumeric terminal identifier.
idSucursalIntegerYes6-digit branch identifier assigned by Getnet.
serialNumberStringYes12-character physical serial number of the device.
commandIntegerYesMust be 100 for Sale operations.
amountLongYesValue in pesos for the transaction.
saleTypeEnumYesSet to 1 for QR payments.
printOnPosBooleanNotrue to request a physical receipt print on the POS.
customIdStringNoMerchant internal ID (max 25 chars).
webhookStringNoURL for asynchronous result delivery.

Example Request

json
{ "idTerminal": "80005000", "idSucursal": 12983, "serialNumber": "SNTEST1234", "command": 100, "amount": 100000, "saleType": 1, "printOnPos": true, "customId": "QR-TX-2026-03-05" }

Handle the Transaction Result

When the transaction completes, the Cloud API returns the authorization result as the HTTP response. The API remains open for up to 5 minutes to receive this response.
ParameterTypeDescription
idPosTxsIntegerUnique identifier for the transaction in Getnet Cloud.
response.codeInteger0 indicates the QR payment was successfully authorized.
response.messageStringNarrative status message (e.g., "APPROVED").
saleTypeEnumReturns "QR" to confirm the digital wallet source.
authorizationCodeString6ndigit approval code from the authorizer.
amountLongThe total finalized amount processed.

Example Response

json
{ "code": 1, "status": "OK", "message": "TRANSACTION SENT", "data": { "idPosTxs": 185, "customId": "QR-TX-2026-03-05", "response": { "functionCode": 100, "code": 0, "message": "APPROVED", "saleType": "QR", "authorizationCode": "010929", "amount": 100000 } } }

Operational Best Practices

Adhere to the following guidelines for a robust QR implementation:

  • Timeout Recovery: If a synchronous request times out at 90 seconds, the system continues to wait for 3.5 additional minutes. Use the Status Query endpoint to verify the final state.
  • Asynchronous Processing: When using webhooks, the API acknowledges the request immediately. Monitor your listener for the final "APPROVED" payload.
  • Header Consistency: Ensure headers match the target environment (UAT vs. Production) to prevent routing errors.

Next Steps

Now that you can process QR payments, you can manage other transaction types or track status: