Create a Single-Step Card Payment
This guide shows you how to process a complete single-step payment transaction with the Getnet Global API. In this flow, you capture the payment directly, without a previous authorization.
Requirements
Before following the steps, you need to:
- Create your account by contacting the Integration Support team to get your API credentials
client_idandclient_secret. - Generate your token with your credentials using the Authentication endpoint.
Getnet provides a Postman Collection to help you replicate these use cases locally. You can also test the API in sandbox with the API Reference in the documentation.
Use case specifics
When integrating any Getnet solution, market-specific requirements apply. Be sure to review the resources below before you go live:
You can also use test cards to simulate specific scenarios. You can find the specific requirements for each country in the Developer Resources section of the Getnet documentation.
Payment facilitators: When Getnet enables your credential as a payment facilitator, you must also send thedata.sub_merchantobject on this request. See Payment Facilitators.
Single-step payment process
This section guides you through the process of creating a single-step payment transaction with the Getnet Global API. You'll learn how to capture payment directly in one step and optionally verify the transaction status.
The following diagram provides an overview of the single-step payment process:
Tokenize card data (optional)
You can use tokenization instead of sending the raw card number in your payment request. Tokenization enhances security and reduces PCI DSS compliance scope. To use a tokenized card:
- Tokenize the card by calling the Card Tokenization endpoint with the
card_numberandcustomer_id. - In your payment request, replace the
card.numberfield withcard.number_tokenusing the token value received from the tokenization endpoint.
number_token, you must exclude the card.number property from the request. For complete details on tokenization, see the Tokenization and Vault documentation.Step 1: Capture the payment
In a single-step payment, you capture the payment with the Create - Authorize endpoint. This step validates the customer's payment details and directly transfers the funds.
Country-specific requirements: Some markets may require additional mandatory fields. In Uruguay, you must include aratesarray with theivakey and setdata.payment.transaction_typetoFULL. Sendregional_regulation_codeonly when the transaction qualifies for a regional regulation or tax benefit. Each entry takes acode(17934or19210) and an optionalinvoiceof up to 9 alphanumeric characters. When you omit theinvoice, Getnet derives it from yourorder_id. Review the Taxes and Regulations reference for more information.
data.payment.payment_method attribute in your request to CREDIT or DEBIT. This setting captures the funds immediately. The table below lists the minimum fields you need to send:| Attribute | Description | Required |
|---|---|---|
idempotency_key | Unique identifier to prevent duplicate charges. | Yes |
order_id | Merchant reference ID used for reconciliation. | Yes |
request_id | Trace identifier for idempotency audits and support follow-up. | Recommended |
data.amount | Transaction amount in cents. | Yes |
data.currency | ISO currency code used in the transaction. | Yes |
data.customer | Customer details (name, email, phone, document, full billing address). Mandatory in production to avoid antifraud blocks. | Yes (Prod) |
data.payment.payment_method | Must be CREDIT or DEBIT for a single-step flow. | Yes |
data.payment.transaction_type | Defines how the transaction is processed (FULL, INSTALL_NO_INTEREST, INSTALL_WITH_INTEREST). | Yes |
data.payment.number_installments | Number of installments (use 1 for a single payment). | Yes |
data.payment.card | Card data set (number, brand, expiration_month, expiration_year, security_code, cardholder_name). | Yes |
data.additional_data.device | Device fingerprint information (ip_address, device_id, finger_print) for antifraud analysis. | Yes (Prod) |
The objects required for antifraud validation must include the following fields:
| Object / Field | Description |
|---|---|
customer.first_name | Customer's first name |
customer.last_name | Customer's last name |
customer.email | Customer email address |
customer.phone_number | Phone number (international format) |
customer.document_type | Document type (e.g., CPF, DNI, etc.) |
customer.document_number | Document number (without punctuation) |
customer.billing_address.street | Street name |
customer.billing_address.number | Address number |
customer.billing_address.district | District or neighborhood |
customer.billing_address.city | City |
customer.billing_address.state | State or province |
customer.billing_address.country | Country code (ISO) |
customer.billing_address.postal_code | Postal or ZIP code |
additional_data.device.ip_address | Customer’s IP address |
additional_data.device.device_id | Device fingerprint session ID (UUIDv4) |
additional_data.device.finger_print | Fingerprint hash generated by the antifraud script |
Antifraud data is mandatory for production environments. Antifraud teams automatically block transactions that lack device fingerprint or customer information, to prevent fraud. See the Antifraud documentation for complete implementation details.
payment_id that identifies this transaction.The following code block shows a single-step payment request:
status as APPROVED:Step 2: Check the payment status (optional)
Create - Authorize response shows the status as APPROVED.Some payments process asynchronously, so the status can change over time. To get the latest status of a transaction, use the Get Transaction endpoint.
For real-time updates without polling, use Webhooks to receive notifications for every status change.
Next steps
Now that you have successfully created a single-step payment, you can explore more features of the Getnet Global API:
- Learn how to create a Two-Step Payment.
- Learn how to create a Recurring Payment.
- Read about 3DS Payments.
On this page