Extending Order Request
To create an order with an already chosen payment method, you need to include the payMethods section in the order request. The details and structure of the payMethods object are described in the Create an Order section of our API Reference.
{
"payMethods": {
"payMethod": {
"type": "PBL",
"value": "m",
// optional for BLIK (blik), see below
"authorizationCode": "123456",
"specificData": []
}
}
}
The highlighted payMethod object is part of the payMethods section and specifies the payment method selected by the customer.
To assign payment methods to buttons on your website, you must first retrieve them from PayU.
For the BLIK payment method (value="blik" in payMethod), you can either redirect the payer to an external page or capture a 6-digit authorization code directly on your page. If you capture the authorization code on your page, include the authorizationCode parameter in the payMethods section of the order request body. In this case, the HTTP success response code is 201 instead of the standard 302.
All BLIK services, except for redirecting the payer to the BLIK payment page, require a special point of sale (POS) configuration by PayU. The configuration for "Transparent Payment with BLIK Authorization Code" is not compatible with the redirection option, so it requires a separate POS setup.
For more information about creating an order, see the Creating a New Order section.
Examples of Successful Responses
- Standard
- For Banks: orx, bnx, gbx, nlx
{
"orderId": "VVLR1HXK2S160929GUEST000P01",
"status": {
"statusCode": "SUCCESS"
},
"redirectUri": "https://some_uri.com"
}
{
"orderId": "1BSLZN2FFZ160929GUEST000P01",
"extOrderId": "{extOrderId}",
"status": {
"statusCode": "WARNING_CONTINUE_REDIRECT"
},
"redirectUri": "https://some_uri.com"
}
For details about the parameters, see the Create an Order section in our API Reference.