Pass the collected data to your server because you will need to submit both Name and CPF/CNPJ in the /payments request. This information will be shown to the shopper to help identify the payment.
The expiration date of the Pix payment. The default value is 24 hours, the maximum value is 5 days, in ISO 8601 format. For example: 2020-07-18T15:42:40.428+01:00
Free-text field that will be shown to the shopper. By default this contains the message: $merchantName - Este pagamento PIX para $merchantName é processado por Adyen. If you provide any value, keep the length under 60 characters because this will be appended to the default message.
The expiration date of the Pix payment. The default value is 24 hours, the maximum value is 5 days, in ISO 8601 format. For example: 2020-07-18T15:42:40.428+01:00
// Set YOUR_X-API-KEY with the API key from the Customer Area.
// Change to Environment.LIVE and add the Live URL prefix when you're ready to accept live payments.
Client client = new Client("YOUR_X-API-KEY", Environment.TEST);
Checkout checkout = new Checkout(client);
PaymentsRequest paymentsRequest = new PaymentsRequest();
String merchantAccount = "YOUR_MERCHANT_ACCOUNT";
paymentsRequest.setMerchantAccount(merchantAccount);
Amount amount = new Amount();
amount.setCurrency("");
amount.setValue(100000L);
paymentsRequest.setAmount(amount);
DefaultPaymentMethodDetails paymentMethodDetails = new DefaultPaymentMethodDetails();
paymentMethodDetails.setType("pix");
paymentsRequest.setPaymentMethod(paymentMethodDetails);
String sessionValidity = "2021-12-21T13:00:00-03:00";
String shopperStatement = "Your message to the shopper.";
ShopperName shopperName = new ShopperName();
shopperName.setFirstName("Jose");
shopperName.setInfix("da");
shopperName.setLastName("Silva");
paymentsRequest.setShopperName(shopperName);
String socialSecurityNumber = "01234567890";
List<LineItem> lineItems = new ArrayList<>();
lineItems.add(
new LineItem()
.id("Item 1")
.amountIncludingTax(40000L)
);
lineItems.add(
new LineItem()
.id("Item 2")
.amountIncludingTax(60000L)
);
paymentsRequest.setReference("YOUR_ORDER_NUMBER");
PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);
// Set your X-API-KEY with the API key from the Customer Area.
$client = new \Adyen\Client();
$client->setXApiKey("YOUR_X-API-KEY");
$service = new \Adyen\Service\Checkout($client);
$params = [
"merchantAccount" => "YOUR_MERCHANT_ACCOUNT",
"amount" => [
"currency" => "",
"value" => 100000
],
"paymentMethod" => [
"type" => "pix"
],
"sessionValidity" => "2021-12-21T13:00:00-03:00",
"shopperStatement" => "Your message to the shopper.",
"shopperName" => [
"firstName" => "Jose",
"infix" => "da",
"lastName" => "Silva"
],
"socialSecurityNumber" => "01234567890",
"lineItems": [
[
"id" => "Item 1",
"amountIncludingTax" => "40000"
],
[
"id" => "Item 2",
"amountIncludingTax" => "60000"
]
],
"reference" => "YOUR_ORDER_NUMBER"
];
$result = $service->payments($params);
# Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen.Adyen()
adyen.client.xapikey = 'YOUR_X-API-KEY'
result = adyen.checkout.payments({
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_ORDER_NUMBER",
"paymentMethod": {
"type": "pix"
},
"amount": {
"currency": "",
"value": 100000
},
"sessionValidity":"2021-12-21T13:00:00-03:00",
"shopperStatement": "Your message to the shopper.",
"shopperName": {
"firstName": "Jose",
"infix": "da",
"lastName": "Silva"
},
"socialSecurityNumber": "01234567890",
"lineItems": [
{
"id": "Item 1",
"amountIncludingTax": "40000"
},
{
"id": "Item 2",
"amountIncludingTax": "60000"
}
]
})
// Set your X-API-KEY with the API key from the Customer Area.
var client = new Client ("YOUR_X-API-KEY", Environment.Test);
var checkout = new Checkout(client);
var paymentsRequest = new Adyen.Model.Checkout.PaymentRequest
{
MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
Reference = "YOUR_ORDER_NUMBER",
PaymentMethod = new DefaultPaymentMethodDetails {Type = "pix"},
Amount = new Adyen.Model.Checkout.Amount(currency: "", value: 100000),
SessionValidity = "2021-12-21T13:00:00-03:00",
ShopperStatement = "Your message to the shopper.",
ShopperName = new Adyen.Model.Checkout.Name
{
FirstName = "Jose",
LastName = "Silva"
},
SocialSecurityNumber = "01234567890",
LineItems = new List<LineItem>
{
new LineItem(id: "Item 1", amountIncludingTax: 40000),
new LineItem(id: "Item 2", amountIncludingTax: 60000)
}
};
// Set your X-API-KEY with the API key from the Customer Area.
const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
const config = new Config();
// Set your X-API-KEY with the API key from the Customer Area.
config.apiKey = '[API_KEY]';
config.merchantAccount = '[MERCHANT_ACCOUNT]';
const client = new Client({ config });
client.setEnvironment("TEST");
const checkout = new CheckoutAPI(client);
checkout.payments({
merchantAccount: "YOUR_MERCHANT_ACCOUNT",
reference: "YOUR_ORDER_NUMBER",
paymentMethod: {
type: "pix"
},
amount: {
currency: "",
value: "100000"
},
sessionValidity: "2021-12-21T13:00:00-03:00",
shopperStatement: "Your message to the shopper.",
shopperName: {
firstName": "Jose",
infix": "da",
lastName": "Silva"
},
socialSecurityNumber: "01234567890",
lineItems: [
{
id: "item1",
amountIncludingTax: "5000"
},
{
id: "item2",
amountIncludingTax: "10000"
}
]
}).then(res => res);