Raw Credit Card Payment
The raw credit card payment method allows merchants to process transactions by directly submitting credit card details. This method requires strict security measures to protect sensitive payment information.
PCI Compliance Required
This payment method is only available for merchants who are PCI DSS compliant. Handling raw credit card data requires adherence to strict security standards to protect customer information.
Raw Credit Card Transaction Flow

- Customer → Merchant: The customer completes a purchase on the merchant's website.
- Merchant → PagSeguro: The merchant server validates customer data and submits the transaction details.
- PagSeguro → Merchant: PagSeguro processes the request and returns transaction details to the merchant server.
- Merchant → Customer: The merchant server communicates the transaction status to the customer.
Follow the steps below to create a raw credit card payment:
Step 1: Collecting Necessary Data
To process a payment, you will need to gather information about the customer, your store, and the order. The Create a Transaction endpoint page provides a comprehensive list of the required details.
Step 2: Submitting a Payment Request
With all necessary information collected, submit a POST request to the Create a Transaction endpoint. This request must contain the integration
, order
, charge
, and payer
objects. The charge
object should include raw credit card details. You can see an example below.
Reference Pages for Supported Limits and Languages
You can check the reference pages for the maximum and minumum supported amounts, supported currencies, and supported languages.
{
"integration": {
"reference": "REF-XXX-1234567890",
"notification_url": "https://www.merchantwebsite.com/notify?type=transaction",
"language": "pt_BR"
},
"order": {
"currency": "BRL",
"items": [
{
"quantity": 1,
"description": "Product description",
"unit_price": 101.10
}
]
},
"charge": {
"country": "BR",
"type": "CREDIT_CARD",
"credit_card": {
"raw": {
"number":"4073020000000002",
"cvc":"123",
"expiration_month":"12",
"expiration_year":"2028"
},
"holder_name": "jonh doe"
}
},
"payer": {
"email": "[email protected]",
"ip": "192.0.2.146",
"person": {
"name": "Mr. Payer Full Name",
"birth_date": "1970-01-01",
"document": {
"type": "CPF",
"number": "98765432101"
},
"phone": {
"country_code": "55",
"number": "44900000000"
}
}
}
}
Reason Codes
If the request fails, the API will return an HTTP status code other than 200. The response body will include an
errors
array with descriptive messages and corresponding error codes.For the full list of possible error codes, see the Reason Codes reference.
Step 3: Processing the API Response
Upon a successful request, the API returns transaction details. Example response:
{
"code": "25a58ef1-3755-476b-b2f6-e445b170a849",
"reference": "REF-XXX-1234567890",
"status": "PENDING",
"amount": 101.1,
"currency": "BRL",
"country": "BR",
"created_at": "2021-04-12T12:43:13Z"
}
Step 4: Handling Transaction Status
The status
field in the response indicates the transaction state. You can monitor status updates using the notification_url
or by querying the transaction status.
Updated 20 days ago