### Installments and Pay Later Payment Methods Reference
Source: https://developers.payu.com/europe/docs/get-started/get-started/integration-overview/references
This section provides a detailed reference for credit payment methods, including various installment and 'Pay Later' options available on different markets. It lists the 'Value' for initiation, transaction amount ranges, the name of the service, and the supported currency.
```APIDOC
Installments and Pay Later Payment Methods:
- Value: ai
Transaction amount (PLN): 100,00 - 50000,00*
Name: PayU | Installments
Currency: PLN
- Value: dpkl
Transaction amount (PLN): 1,00 - 7000,00
Name: Klarna | PayU Pay Later (Poland)
Currency: PLN
- Value: dpt
Transaction amount (PLN): 1,00 - 2000,00
Name: Twisto | PayU Pay Later (Poland)
Currency: PLN
- Value: dpp
Transaction amount (PLN): 10,00 - 6000,00
Name: PayPo | PayU Pay Later (Poland)
Currency: PLN
- Value: ppf
Transaction amount (PLN): 100,00 - 50000,00
Name: PragmaPay | PayU Pay Later (Poland)
Currency: PLN
- Value: blikbnpl
Transaction amount (PLN): 30,00 - 4000,00
Name: BLIK Pay Later (Poland)
Currency: PLN
- Value: dpcz
Transaction amount (PLN): 3,00 - 999999,99
Name: Pay Later with Twisto (Czech)
Currency: CZK
- Value: dpts
Transaction amount (PLN): 1500,00 - 100000,00
Name: Twisto Pay in 3 (Czech)
Currency: CZK
* - depending on the variant
```
--------------------------------
### Initialize PayuDocumentForm Instance
Source: https://developers.payu.com/europe/docs/get-started/services/marketplace/sdk/uploading-files
Demonstrates the basic initialization of a PayuDocumentForm instance using a placeholder 'verificationId'. This snippet shows the minimal code required to get started with the form.
```javascript
const documentForm = PayuDocumentForm({verificationId: 'VERIFICATION_ID'});
```
--------------------------------
### Example Buyer Data for ClientID Generation
Source: https://developers.payu.com/europe/docs/get-started/get-started/integration-overview/references
This JSON snippet illustrates the required fields (`email`, `firstName`, `lastName`) for the `buyer` object in an Order Create Request. Providing a unique set of these fields for each user enables the ClientID functionality, simplifying payment authorization by storing user consent for bank account retrieval.
```JSON
{
"email": "email@email.com",
"firstName": "John",
"lastName": "Doe"
}
```
--------------------------------
### Install PayU EMEA SDK TypeScript Type Definitions
Source: https://developers.payu.com/europe/docs/get-started/checkout/secure-form
This command installs the necessary TypeScript type definitions for the PayU EMEA SDK. It allows developers using TypeScript in their projects to benefit from type checking and autocompletion for the SDK's functionalities.
```TypeScript
npm install --save @types/payu-emea-sdk
```
--------------------------------
### PayU Android SDK Installment API References
Source: https://developers.payu.com/europe/docs/get-started/mobile-sdk/implementation-guide/android/mobile-installments
This section provides key API references for integrating PayU mobile installments, including builder classes for `Installment` and `InstallmentOption`, the activity to trigger the installment flow, and the data structure returned upon selection.
```APIDOC
com.payu.android.front.sdk.payment_library_core.external.model.Installment.Builder
com.payu.android.front.sdk.payment_library_core.external.model.InstallmentOption.Builder
com.payu.android.front.sdk.payment_installments.mastercard.offer.view.OfferInstallmentsActivity
startForResult(activity: Activity): Triggers the installment selection flow.
SelectedInstallment (data class)
id: String - Unique identifier for the selected installment option.
installmentType: String - Type of installment (e.g., VARYING_NUMBER_OF_OPTIONS or VARYING_NUMBER_OF_INSTALLMENTS).
proposalId: String? - Optional proposal ID associated with the installment.
```
--------------------------------
### Display PayU Installments Information Link
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/credit/installments
Provides an HTML anchor tag with an image, redirecting customers to an informational PDF document about PayU Installments when clicked. Recommended for main or e-shop pages.
```HTML
```
--------------------------------
### Example: Call PayU Tokenize Method
Source: https://developers.payu.com/europe/docs/get-started/checkout/secure-form
This JavaScript example demonstrates a basic call to the `tokenize` method on the PayU instance to initiate the card token creation process.
```JavaScript
payu.tokenize()
```
--------------------------------
### Example: Create SecureForms Instance
Source: https://developers.payu.com/europe/docs/get-started/checkout/secure-form
This JavaScript example shows how to create a `SecureForms` instance using the `secureForms()` method of an existing PayU SDK instance. This instance is then used to manage secure form elements.
```JavaScript
var secureForms = payu.secureForms()
```
--------------------------------
### Example: Create PayU JS SDK Instance
Source: https://developers.payu.com/europe/docs/get-started/checkout/secure-form
This JavaScript example demonstrates how to create a new PayU SDK instance by passing a test Point of Sale identifier. The instance is stored in the `payu` variable for further use.
```JavaScript
var payu = PayU('393823')
```
--------------------------------
### Create New Order Request with PayU API
Source: https://developers.payu.com/europe/docs/get-started/get-started/integration-overview/accept-payment
Illustrates how to initiate a new transaction by sending a POST request to the https://secure.payu.com/api/v2_1/orders endpoint. It includes setting Content-Type and Authorization headers, and providing transaction details like customerIp, merchantPosId, description, currencyCode, totalAmount, and products in the JSON body.
```curl
curl -X POST https://secure.payu.com/api/v2_1/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 3e5cac39-7e38-4139-8fd6-30adc06a61bd" \
-d '{
"customerIp": "127.0.0.1",
"merchantPosId": "145227",
"description": "RTV market",
"currencyCode": "PLN",
"totalAmount": "21000",
"products": [
{
"name": "Wireless Mouse for Laptop",
"unitPrice": "21000",
"quantity": "1"
}
]
}'
```
--------------------------------
### JavaScript Example: Appending PayU Installment Element
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/credit/widget
This snippet demonstrates how to use the `element` object returned by `OpenPayU.Installments.miniInstallment` to dynamically append the installment amount text and link to a specified HTML element on the page. It includes error handling for configuration issues.
```HTML
```
--------------------------------
### PayU API: Payout Creation Success Response Example
Source: https://developers.payu.com/europe/docs/get-started/payouts/payouts-api/standard-payout
Provides an example of the JSON response received after successfully initiating a payout. It includes details such as `payoutId`, `extPayoutId`, and the `status` of both the payout and the overall request.
```json
{
"payout": {
"payoutId": "133bfe5f400e4b2c8da44abfdf753d79",
"extPayoutId": "123123",
"status": "PENDING"
},
"status": {
"statusCode": "SUCCESS"
}
}
```
--------------------------------
### Card-based Payment Methods Reference
Source: https://developers.payu.com/europe/docs/get-started/get-started/integration-overview/references
This section provides a detailed reference for card-based payment methods, including standard credit/debit cards and digital wallets like Apple Pay, Google Pay, and Visa Mobile. It outlines the 'Value' used for initiation, applicable transaction amount ranges, a description of the method, and booking availability.
```APIDOC
Card Based Payment Methods:
- Value: c
Transaction Amount: 0,01 - 999999,99
Description: Payment card (credit, debit, prepaid) - CHF, EUR, GBP, USD.
Booking: 24h/7
- Value: c
Transaction Amount: 0,05 - 999999,99
Description: Payment card (credit, debit, prepaid) - PLN, RON.
Booking: 24h/7
- Value: c
Transaction Amount: 0,30 - 999999,99
Description: Payment card (credit, debit, prepaid) - CZK.
Booking: 24h/7
- Value: c
Transaction Amount: 0,02 - 999999,99
Description: Payment card (credit, debit, prepaid) - BGN.
Booking: 24h/7
- Value: c
Transaction Amount: 1,00 - 999999,99
Description: Payment card (credit, debit, prepaid) - RUB.
Booking: 24h/7
- Value: c
Transaction Amount: 5 - 9999999
Description: Payment card (credit, debit, prepaid) - HUF.
Booking: 24h/7
- Value: c
Transaction Amount: 0,50 - 9999999,99
Description: Payment card (credit, debit, prepaid) - all other supported currencies.
Booking: 24h/7
- Value: jp
Transaction Amount: as above for payment cards
Description: Apple Pay is a source of card data - authorization and settlement are done in the same way as for a standard card payment. In the panel and on statements, Apple Pay transactions are marked as card payments, i.e. you may use the 'jp' value to initiate Apple Pay payment, but the transaction created will be marked with 'c'. To check if the transaction was done via Apple Pay, you need to check "payment flow" value. The value can be obtained through Transaction Data Retrieve.
Booking: 24h/7
- Value: ap
Transaction Amount: as above for payment cards
Description: Google Pay (formerly Android Pay) is a source of card data - authorization and settlement are done in the same way as for a standard card payment. In the panel and on statements, Google Pay transactions are marked as card payments, i.e. you can use the 'ap' value to initiate Google Pay payment, but the transaction created will be marked with 'c'. To check if the transaction was done via Google Pay, you need to check "payment flow" value. The value can be obtained through Transaction Data Retrieve.
Booking: 24h/7
- Value: vm
Transaction Amount: as above for payment cards
Description: Visa Mobile is a source of card data - authorization and settlement are done in the same way as for a standard card payment. In the panel and on statements, Visa Mobile transactions are marked as card payments, i.e. you can use the 'vm' value to initiate Visa Mobile payment, but the transaction created will be marked with 'c'. To check if the transaction was done via Visa Mobile, you need to check "payment flow" value. The value can be obtained through Transaction Data Retrieve. Currently available only for Polish shops and the PLN currency.
Booking: 24h/7
```
--------------------------------
### Partial Order Creation Request Body Example
Source: https://developers.payu.com/europe/docs/get-started/services/marketplace/integration
A partial JSON snippet illustrating the structure for products and payment methods within an order creation request. This example is part of a larger request body for creating an order.
```JSON
"products": [
{
"name": "product D",
"quantity": 1,
"unitPrice": 3500,
"virtual": false
}
]
}
],
"payMethods": {
"payMethod":{
"type":"PBL",
"value":"m",
"amount":5000
}
}
}'
```
--------------------------------
### New Order Creation Response Structure
Source: https://developers.payu.com/europe/docs/get-started/get-started/integration-overview/accept-payment
Details the expected JSON response after successfully creating a new order. It includes the status, redirectUri (for the payment page), orderId, and extOrderId. The redirectUri is crucial for directing the payer to complete the payment.
```json
{
"status": {
"statusCode": "SUCCESS"
},
"redirectUri": "{payment_summary_redirection_url}",
"orderId": "WZHF5FFDRJ140731GUEST000P01",
"extOrderId": "{YOUR_EXT_ORDER_ID}"
}
```
--------------------------------
### Retrieve POS Credentials: Example Response
Source: https://developers.payu.com/europe/docs/get-started/collaboration/referral-program
A successful GET request for POS credentials returns a JSON object containing `posId`, `type`, `name`, `encoding`, and detailed `authorization` keys. These credentials are essential for authenticating payments, refunds, and checking payment status notifications.
```json
{
"posId": "JyoMIVTY",
"type": "REST",
"name": "Test POS",
"encoding": "UTF-8",
"authorization": {
"standard": {
"merchantPosId": "385234",
"key": "9c0041e05fdee99749de4c2d2ce4c66e",
"secondKey": "f096a39d78fbe03b8d23dde43b728cfd",
"authKey": "uHcZ9Ly"
}
}
}
```
--------------------------------
### Example: Custom Fonts Configuration for Secure Forms Instance
Source: https://developers.payu.com/europe/docs/get-started/checkout/secure-form
Demonstrates how to define custom fonts for the Secure Forms instance using the `fonts` parameter, specifying font families, source URLs, styles, and weights for different font variations.
```JSON
{
"fonts": [
{
"family": "Own Font",
"src": "url(https://ownulr.com/own_font_normal.woff2) format(\"woff2\"), url(https://ownulr.com/own_font_normal.woff) format(\"woff2)",
"style": "normal",
"weight": 400
},
{
"family": "Own Font",
"src": "url(https://ownulr.com/own_font_bold.woff2) format(\"woff2\")",
"style": "normal",
"weight": "bold"
}
]
}
```
--------------------------------
### Example redirectUri for CVV Authentication
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/cards/tokenization/charge-token
Shows an example of the redirectUri parameter provided in a WARNING_CONTINUE_CVV response, which can be used to facilitate CVV collection.
```URL
https://secure.payu.com/api/v2/token/token.json?refReqId=11ed628ebe88ef6837d90ebb26f1a8b9
```
--------------------------------
### International Payment Methods API Reference
Source: https://developers.payu.com/europe/docs/get-started/get-started/integration-overview/references
This reference details available international payment methods, including their API `Value`, supported `Transaction amount (equivalent in EUR)`, `Name`, `Type`, `Availability` by country, and supported `Currency`. Note that activation for these methods may require contacting your account manager.
```APIDOC
International Payment Methods:
- Value: pbc
Transaction amount (equivalent in EUR): 1,00 - 999999,99
Name: Bancontact
Type: Payment Card
Availability: BE
Currency: EUR
- Value: pmb
Transaction amount (equivalent in EUR): 1,00 - 999999,99
Name: MyBank
Type: Standard Bank Transfer / Online Bank Transfer
Availability: IT
Currency: EUR
- Value: pscd
Transaction amount (equivalent in EUR): 1,00 - 1000,00
Name: PaySafeCard
Type: Prepaid Voucher
Availability: AT, BE, CY, DE, ES, FI, FR, IT, LI, LT, LU, MT, NL, PT, SI, SK
Currency: EUR
- Value: sdd
Transaction amount (equivalent in EUR): 1,00 - 1000,00
Name: SEPA Direct Debit
Type: Online Bank Transfer
Availability: AT, BE, CH, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HR, HU, IE, IS, IT, LI, LT, LU, LV, MC, MT, NL, NO, PT, RO, SE, SI, SK, SM
Currency: EUR
- Value: pmbc
Transaction amount (equivalent in EUR): 1,00 - 99999,99
Name: Multibanco
Type: Online Bank Transfer
Availability: PT
Currency: EUR
- Value: ptrl
Transaction amount (equivalent in EUR): 1,00 - 1000,00
Name: Trustly
Type: Online Bank Transfer
Availability: DE, DK, EE, ES, FI, LT, LV, NL, NO, PT, SE
Currency: EUR, DKK*, NOK*, SEK*
Additional Currency Notes:
- CHF*: only in combination with country code CH
- DKK*: only in combination with country code DK
- NOK*: only in combination with country code NO
- SEK*: only in combination with country code SE
```
--------------------------------
### BLIK Order Creation Positive Response Example
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/blik/integration
Example of a successful JSON response after creating an order with BLIK, indicating a 'SUCCESS' status and providing the unique orderId.
```JSON
{
"status": {
"statusCode": "SUCCESS"
},
"orderId": ""
}
```
--------------------------------
### Submerchant Balance Retrieval Response JSON Example
Source: https://developers.payu.com/europe/docs/get-started/services/marketplace/integration
A JSON example of the response received after successfully retrieving a submerchant's balance, showing the available and total amounts, along with the overall status of the request.
```JSON
{
"balance": {
"availableAmount": "5494",
"totalAmount": "5500"
},
"status": {
"statusCode": "SUCCESS"
}
}
```
--------------------------------
### Example Redirect URL after 3DS Authentication
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/cards/tokenization/charge-token
Shows an example of the URL to which the payer is redirected after successful 3DS authentication, including statusCode and refReqId query parameters.
```URL
https://your.shop.com/payment?statusCode=SUCCESS&refReqId=5c867936fbb3cc2c373820b4550b4645
```
--------------------------------
### PayU Notification Signature Header Example
Source: https://developers.payu.com/europe/docs/get-started/payment-flows/lifecycle
An example of the 'OpenPayu-Signature' header received from a PayU server, containing sender, signature, algorithm, and content details.
```Generic
OpenPayu-Signature:
sender=checkout;
signature=c33a38d89fb60f873c039fcec3a14743;
algorithm=MD5;
content=DOCUMENT
```
--------------------------------
### Example BLIK Token Structures
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/blik/support-services
These JSON structures illustrate the format of BLIK tokens returned by the payment methods retrieval service. The first example shows a UID token, while the second demonstrates a PAYID token, including details for recurring payments.
```JSON
"blikTokens": [
{
"value": "",
"type": "UID",
"brandImageUrl": "",
"bankApplicationReferences": [
{
"key": "",
"label": ""
},
{
"key": "",
"label": ""
}
]
}
]
```
```JSON
"blikTokens": [
{
"value": "",
"type": "PAYID",
"brandImageUrl": "",
"bankApplicationReferences": [
{
"key": "",
"label": ""
},
{
"key": "",
"label": ""
}
],
"recurring": {
"aliasLabel": "",
"type": "O",
"initializationDate": "",
"expirationDate": ""
}
}
]
```
--------------------------------
### Example Call for GooglePayService#requestGooglePayCard (Java)
Source: https://developers.payu.com/europe/docs/get-started/mobile-sdk/implementation-guide/android/mobile-google-pay
A practical example demonstrating how to invoke the requestGooglePayCard method on an instance of googlePayService. This snippet shows how to pass the Cart object (obtained from createCart()) and a placeholder posId to initiate the payment.
```Java
googlePayService.requestGooglePayCard(createCart(), "posId");
```
--------------------------------
### Sample PayU Merchant Registration Link
Source: https://developers.payu.com/europe/docs/get-started/collaboration/referral-program
Provides an example of a direct registration link for merchants, illustrating the base URL structure and default parameters for the PayU system.
```URL
https://secure.payu.com/boarding/#/form?lang=pl&nsf=false&partnerId=someid
```
--------------------------------
### Retrieve Installment Options from Merchant API (Android/Kotlin)
Source: https://developers.payu.com/europe/docs/get-started/mobile-sdk/implementation-guide/android/mobile-installments
This Kotlin code snippet demonstrates how to override the `provideInstallments` method within `PaymentMethodActions` to fetch installment options from a merchant API. It uses `installmentRepository` to get options, processes them into `InstallmentOption` objects, and then builds an `Installment` object to pass back via the `InstallmentCallback`.
```Kotlin
val disposable = installmentRepository.getInstallmentOption(persistenceRepository.proposalId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
{
if (it.installmentDecision != null) {
//merchant could display an information regarding this flow
println("Installment previously taken: $it")
return@subscribe
}
val installmentList: ArrayList = ArrayList()
it.installmentOptions.forEach { item ->
installmentList.add(InstallmentOption.Builder()
.withId(item.id)
.withFirstInstallments(item.firstInstallmentAmount ?: 0)
.withNumberOfInstallments(item.numberOfInstallments ?: 0)
.withTotalValue(item.totalAmountDue)
.withAnnualPercentageRate(item.annualPercentageRate)
.withInstallmentAmount(item.installmentAmount ?: 0)
.withInstallmentFeeAmount(item.installmentFeeAmount)
.withInterestRate(item.interestRate)
.build())
}
val installment: Installment = Installment.Builder()
.withCurrency(it.currencyCode)
.withProposalId(persistenceRepository.proposalId)
.withInstallmentType(it.installmentOptionFormat)
.withInstallmentOptionList(installmentList)
.withMaxNumberOfInstallments(it.maxNumberOfInstallments ?: 0)
.withMinNumberOfInstallments(it.minNumberOfInstallments ?: 0)
.build()
callback.onFetched(installment)
}, {
println("Error during fetching installments: $it")
})
```
--------------------------------
### Integrate PayU Installments: Create Order Request with Curl
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/credit/installments
This cURL snippet demonstrates how to create an order request for PayU Installments. It extends the standard order request by including the 'payMethods' object, setting 'type' to 'PBL' and 'value' to 'ai' to specify installments as the payment method. The example also includes customer details, product information, and a notification URL.
```curl
curl -v -X POST https://secure.payu.com/api/v2_1/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 3e5cac39-7e38-4139-8fd6-30adc06a61bd" \
-d '{
"notifyUrl": "https://your.eshop.com/notify",
"customerIp": "127.0.0.1",
"merchantPosId": "145227",
"description": "RTV market",
"currencyCode": "PLN",
"totalAmount": "99900",
"extOrderId":"yrjut2mp63wdzcozq7w0br",
"buyer": {
"email": "jan.kowalski@example.com",
"phone": "654111654",
"firstName": "Jan",
"lastName": "Kowalski"
},
"payMethods":{
"payMethod":{
"type":"PBL",
"value":"ai"
}
},
"products": [
{
"name": "Laptop",
"unitPrice": "99900",
"quantity": "1"
}
]
}'
```
--------------------------------
### BLIK Order Creation Error Response Example
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/blik/integration
This JSON snippet provides an example of an error response for a BLIK order creation. It details the error through `statusCode`, `codeLiteral`, and `statusDesc`, and may include `blikData` for specific error-dependent information.
```JSON
{
"status": {
"statusCode": "",
"codeLiteral": "",
"statusDesc": ""
},
"orderId": "",
"blikData": {
// specific data dependent on a particular error
}
}
```
--------------------------------
### API Reference: Create a User
Source: https://developers.payu.com/europe/docs/get-started/collaboration/referral-program
This entry refers to the detailed API documentation for creating a new user. It provides comprehensive information on all available parameters, their types, descriptions, and constraints for the `create-a-user` operation within the Partner Merchant Registration tag.
```APIDOC
Operation: create-a-user
Tag: Partner-Merchant-Registration
Endpoint: /europe/api/#tag/Partner-Merchant-Registration/operation/create-a-user
Description: Detailed parameters for creating a user.
```
--------------------------------
### Style PayU Installments Transaction Button
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/credit/installments
Applies CSS styling to a form submit button named 'payform' to display a PayU Installments graphic, drawing customer attention to quick installment shopping. This code should be placed within the tags of the HTML document.
```CSS
```
--------------------------------
### PayuDocumentForm Instance Creation API
Source: https://developers.payu.com/europe/docs/get-started/services/marketplace/sdk/uploading-files
Documents the PayuDocumentForm constructor, detailing its required 'params' (including 'verificationId') and optional 'options' (like 'dev' mode). It also specifies the return type and potential exceptions during instance creation.
```APIDOC
PayuDocumentForm(params, options?)
params: required object
verificationId: required string
Verification identifier.
options: optional object
dev: optional boolean
Allows to create instance in developer mode which enables you to operate on a site that does not use HTTPS.
Return: PayuDocumentForm instance.
Exceptions:
verificationId.is.empty: Occurs when creating PayuDocumentForm instance when no verificationId parameter is specified or is empty.
non.https.integration: Occurs on MarketplaceVerification instance creation when the protocol of the page, on which JS SDK is loaded, is not https and file, and the page is not loaded from localhost: 127.0.0.1 or 0.0.0.0.
```
--------------------------------
### Handle Installment Selection Result in onActivityResult (Android/Kotlin)
Source: https://developers.payu.com/europe/docs/get-started/mobile-sdk/implementation-guide/android/mobile-installments
This Kotlin code snippet demonstrates how to process the result returned from `OfferInstallmentsActivity` within the `onActivityResult` method. It extracts the `SelectedInstallment` object, converts it into an `InstallmentSelected` object based on the installment type, and then makes a backend call to request the installment.
```Kotlin
fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
when (requestCode) {
...
OfferInstallmentsActivity.INSTALLMENT_REQUEST_CODE -> {
val selectedInstallment: SelectedInstallment = data.getParcelableExtra(OfferInstallmentsActivity.INSTALLMENT_KEY)
val installmentSelected: InstallmentSelected =
if (selectedInstallment.installmentType == InstallmentType.OPTIONS.toString())
InstallmentSelected(selectedInstallment.id)
else InstallmentSelected(numberOfInstallments = selectedInstallment.id.toInt())
//Make a call to request an installment from backend
viewModel.requestInstallment(installmentSelected, selectedInstallment.proposalId!!)
Toast.makeText(this, "Installment finished", Toast.LENGTH_SHORT).show()
}
}
}
```
--------------------------------
### PayU JS SDK Instance Creation API
Source: https://developers.payu.com/europe/docs/get-started/checkout/secure-form
Documents the `PayU` constructor for creating a new JS SDK instance. It requires a `posId` and optionally accepts an `options` object to enable developer mode or other settings.
```APIDOC
PayU(posId: string, options?: object)
Parameters:
posId:
type: string
required: true
description: Point of Sale identifier.
options:
type: object
optional: true
description: Instance options.
Properties:
dev:
type: boolean
description: Enables instance creation in developer mode for non-HTTPS sites.
Returns: PayU instance.
Exceptions:
posis.is.empty: Occurs if posId is not specified or empty.
non.https.integration: Occurs if page protocol is not HTTPS and not localhost, unless developer mode is enabled.
```
--------------------------------
### Retrieve Payment Methods using cURL GET Request
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/cards/tokenization/retrieve-and-delete-token
This cURL example demonstrates how to retrieve a user's payment methods and tokens from the PayU system. It uses a GET request to the `/api/v2_1/paymethods` endpoint, including an OAuth access token in the `Authorization` header. Note that GET requests should not contain a body, as per RFC 9110.
```Shell
curl -X GET https://secure.payu.com/api/v2_1/paymethods \n -H "Authorization: Bearer 87ad751f-7ea5-4023-a16f-04b6647a07f5"\n -H "Cache-Control: no-cache"
```
--------------------------------
### JavaScript: Upload Selected File
Source: https://developers.payu.com/europe/docs/get-started/services/marketplace/sdk/uploading-files
This example shows how to initiate the upload of a selected file to the server using the `upload` method. Ensure the form has been rendered first.
```JavaScript
documentForm.upload();
```
--------------------------------
### Retrieve Specific Refund Data Response Example
Source: https://developers.payu.com/europe/docs/get-started/payment-flows/refunds
Example JSON response showing detailed information about a specific refund retrieved using the GET /api/v2_1/orders//refunds/ endpoint. It includes fields like refundId, amount, currencyCode, and status.
```JSON
{
"refundId": "5000000143",
"extRefundId": "postman_refund2_QX9ZR7M6QP200601GUEST000P01",
"amount": "400",
"currencyCode": "EUR",
"description": "Order refund",
"creationDateTime": "2020-06-01T13:18:03.648+02:00",
"statusDateTime": "2020-06-01T13:18:33.661+02:00",
"status": "FINALIZED"
}
```
--------------------------------
### Example cURL Request to Retrieve Transaction Data
Source: https://developers.payu.com/europe/docs/get-started/payment-flows/transaction-retrieve
A cURL command demonstrating how to make a GET request to the PayU API to fetch transaction details for a given order ID. This example includes the endpoint, content type header, and an authorization bearer token.
```bash
curl -X GET https://secure.payu.com/api/v2_1/orders/{orderId}/transactions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 3e5cac39-7e38-4139-8fd6-30adc06a61bd" \
```
--------------------------------
### JSON: Example Apple Pay Encrypted Token
Source: https://developers.payu.com/europe/docs/get-started/payment-solutions/cards/digital-wallets/apple-pay
This JSON snippet presents an example of the `paymentData` object, which encapsulates the securely encrypted Apple Pay token. This token is received within the `event.payment.token.paymentData` field during the `onpaymentauthorized` event, and contains payment details for server-side processing.
```JSON
{
"version": "EC_v1",
"data": "DjI8Ez7nPhVo742aGEzABz/TfxCPt9LSdf2/h+0xIgVJbi3fQqd4lv3ogoTI3SQ7vZrDAWI8g2lbd5sflXBHc0z+wSeybsCcqZB3n1edRFXU7+6DYmdhFFWWCejwUc6XZWmsSaVNEQf+Kc0SeYrj8Eskdapj8bYX/QXxXSPqS4IKSjB+f3O0gUXSq7LK/jA9dl+BbWW0l3gXERU6n5rcYndO5rnjiwNUpnm7EMIMfNU+IPbsubpL82kbL2MdMJB1grel03J4JKld6G0pFSmjR2mF/xBY/yKkADRhoQkVlDRicuKVMpdRXXbIQjw/yRkLv/u8iy1wXI5YmEBB+W4QpPYsuxys94gMPaKhcaEK/OaT099aFrNBezbuLMTcTzbhXOpPwWn9pkAK0eZNOQ==",
"signature": "MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5jCCA4ugAwIBAgIIaGD2mdnMpw8wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSB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91TaKOvvGcgV5Ct4n4mPebWZ+Y1UENj53pwv4CMDIt1UQhsKMFd2xd8zg7kGf9F3wsIW2WT8ZyaYISb1T4en0bmcubCYkhYQaZDwmSHQAAMYIBjTCCAYkCAQEwgYYwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBGMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNV
```
--------------------------------
### Retrieve Submerchant Balance GET Request Example
Source: https://developers.payu.com/europe/docs/get-started/services/marketplace/integration
A cURL command demonstrating how to retrieve a submerchant's balance via an HTTP GET request to the `/api/v2_1/customers/ext//balances` endpoint, specifying the currency code. It includes required headers for content type and authorization.
```curl
curl -v -X GET https://secure.payu.com/api/v2_1/customers/ext//balances?currencyCode=PLN \
-H "Content-Type: application/json" \
-H "Authorization: Bearer "
```
--------------------------------
### SoftAcceptService API Definition
Source: https://developers.payu.com/europe/docs/get-started/mobile-sdk/implementation-guide/android/soft-accept
Comprehensive API documentation for `com.payu.android.front.sdk.payment_library_webview_module.soft_accept.external.SoftAcceptService`, an optional component for handling 3DS payments. It details the class entry point, available constructors for default or custom dialogs, and public methods for processing and dismissing the soft accept flow. Includes parameter descriptions and notes on retrieving results.
```APIDOC
Class: com.payu.android.front.sdk.payment_library_webview_module.soft_accept.external.SoftAcceptService
Constructors:
SoftAcceptService(dialogBodyMessage: String?, fragmentManager: FragmentManager, authorizationDetails: AuthorizationDetails, isCancelable: boolean)
dialogBodyMessage: Optional message for the dialog. If not provided, a default text is used.
fragmentManager: FragmentManager to attach the dialog.
authorizationDetails: Start data for soft accept, currently includes a redirect link.
isCancelable: Flag indicating if the dialog can be canceled by pressing outside. Returns AUTHENTICATION_CANCELED if canceled.
Note: To retrieve response (SoftAcceptTransactionStatus), use getParentFragmentManager().setFragmentResultListener with Key: SoftAcceptService.KEY_REQUEST_BUNDLE. Object is stored under SoftAcceptService.KEY_SOFT_ACCEPT_RESPONSE_DETAIL.
SoftAcceptService(childView: @LayoutRes int, fragmentManager: FragmentManager, authorizationDetails: AuthorizationDetails, isCancelable: boolean)
childView: Custom layout resource ID to be displayed in the dialog. Only simple layouts are supported.
fragmentManager: FragmentManager to attach the dialog.
authorizationDetails: Start data for soft accept, currently includes a redirect link.
isCancelable: Flag indicating if the dialog can be canceled by pressing outside. Returns AUTHENTICATION_CANCELED if canceled.
Note: To retrieve response (SoftAcceptTransactionStatus), use getParentFragmentManager().setFragmentResultListener with Key: SoftAcceptService.KEY_REQUEST_BUNDLE. Object is stored under SoftAcceptService.KEY_SOFT_ACCEPT_RESPONSE_DETAIL.
Methods:
processSoftAccept(): void
Purpose: Displays the dialog and checks if payment needs additional user action.
dismissSoftAccept(): void
Purpose: Removes the displayed dialog.
```
```Java
/**
* @param dialogBodyMessage -message on dialog that could be seen by end user - if not provided then user will see default text
* @param fragmentManager -dialog will be attached using fragmentManager
* @param authorizationDetails -start data for soft accept {@linkplain SoftAcceptTransactionData} - right now it consist of redirect link
* @param isCancelable - flag that indicate if user can cancel a dialog pressing outside of it. In this case dialog will return {@link SoftAcceptTransactionStatus#AUTHENTICATION_CANCELED}
* To retrieve resonse {@linkplain SoftAcceptTransactionStatus}: there is a need to call getParentFragmentManager().setFragmentResultListener
* Using Key: {@link SoftAcceptService#KEY_REQUEST_BUNDLE}
* Object is stored {@link SoftAcceptService#KEY_SOFT_ACCEPT_RESPONSE_DETAIL}
* Sample in Kotlin:
* supportFragmentManager.setFragmentResultListener(SoftAcceptService.KEY_REQUEST_BUNDLE, this, { _, bundle ->
* val result = bundle.getParcelable(SoftAcceptService.KEY_SOFT_ACCEPT_RESPONSE_DETAIL)
* // Do something with the result
* })
*/
public SoftAcceptService(
@Nullable String dialogBodyMessage,
@NonNull FragmentManager fragmentManager,
@NonNull AuthorizationDetails authorizationDetails,
boolean isCancelable) {
//init
}
/**
* @param childView -custom layout, that should be displayed in default layout place, only simple layout are supported
* @param fragmentManager -dialog will be attached using fragmentManager
* @param authorizationDetails -start data for soft accept {@linkplain SoftAcceptTransactionData} - right now it consist of redirect link
* @param isCancelable - flag that indicate if user can cancel a dialog pressing outside of it. In this case dialog will return {@link SoftAcceptTransactionStatus#AUTHENTICATION_CANCELED}
* To retrieve resonse {@linkplain SoftAcceptTransactionStatus}: there is a need to call getParentFragmentManager().setFragmentResultListener
* Using Key: {@link SoftAcceptService#KEY_REQUEST_BUNDLE}
* Object is stored {@link SoftAcceptService#KEY_SOFT_ACCEPT_RESPONSE_DETAIL}
* Sample in Kotlin:
*supportFragmentManager.setFragmentResultListener(SoftAcceptService.KEY_REQUEST_BUNDLE, this, { _, bundle ->
* val result = bundle.getParcelable(SoftAcceptService.KEY_SOFT_ACCEPT_RESPONSE_DETAIL)
* // Do something with the result
*})
*/
public SoftAcceptService(@LayoutRes int childView,
@NonNull FragmentManager fragmentManager,
@NonNull AuthorizationDetails authorizationDetails,
boolean isCancelable) {
//init
}
```
--------------------------------
### Retrieve Submerchant Verification Status (cURL)
Source: https://developers.payu.com/europe/docs/get-started/services/marketplace/boarding
This example demonstrates how to send an HTTP GET request using cURL to retrieve the verification status of a submerchant. It specifies the endpoint, required headers for content type and authorization, and emphasizes adherence to RFC 9110 regarding GET request bodies.
```curl
curl -v -X GET https://secure.payu.com/api/v2_1/customers/ext//status?currencyCode=PLN \
-H "Content-Type: application/json" \
-H "Authorization: Bearer "
```
--------------------------------
### API Reference: Create POS for Partner
Source: https://developers.payu.com/europe/docs/get-started/collaboration/referral-program
This entry refers to the detailed API documentation for creating a Point of Sale (POS) for a partner. It provides comprehensive information on all available parameters, their types, descriptions, and constraints for the `create-pos-for-partner` operation within the Partner Merchant Registration tag.
```APIDOC
Operation: create-pos-for-partner
Tag: Partner-Merchant-Registration
Endpoint: /europe/api/#tag/Partner-Merchant-Registration/operation/create-pos-for-partner
Description: Detailed parameters for creating a POS.
```
--------------------------------
### Retrieve FX Rate Table using cURL
Source: https://developers.payu.com/europe/docs/get-started/payouts/payouts-api/fx-payout
This cURL example demonstrates how to make a GET request to the `/api/v2_1/mcp-partners/{fxPartnerId}/fx-table` endpoint to retrieve the latest currency exchange rate table from PayU. An OAuth token is required for authorization, and GET requests must not include a body.
```curl
curl -X GET https://secure.payu.com/api/v2_1/mcp-partners/9999e44b-f68f-42e1-ad6c-3735ba1e2954/fx-table \
-H "Authorization: Bearer 3e5cac39-7e38-4139-8fd6-30adc06a61bd"
```