### Apple Pay Configuration and Callbacks Source: https://docs.oppwa.com/integrations/widget/apple-pay A comprehensive example demonstrating the setup of Apple Pay options, including shipping methods, contact requirements, and event callbacks. ```html
``` ```css body {background-color:#f6f6f5;} ``` ```javascript var subTotalAmount = 7731; var shippingAmount = 0; var taxAmount = 1469; var currency = "EUR"; var applePayTotalLabel = "COMPANY, INC."; function getAmount() { return ((subTotalAmount + shippingAmount + taxAmount)/100).toFixed(2); } function getTotal() { return { // Business name, the name that will appear on the card statement label: applePayTotalLabel, amount: getAmount() }; } function getLineItems() { return [{ label: "Subtotal", amount: (subTotalAmount/100).toFixed(2) }, { label: "Shipping", amount: (shippingAmount/100).toFixed(2) }, { label: "Tax", amount: (taxAmount/100).toFixed(2) }]; } var wpwlOptions = { applePay: { // Possible values: 1-14. version: 3, // Possible values: canMakePayments, applePayCapabilities, canMakePaymentsWithActiveCard checkAvailability: "applePayCapabilities", // Required if checkAvailability is applePayCapabilities or canMakePaymentsWithActiveCard merchantIdentifier: "merchant.com.test", // Default is css. // Possible values: css, js. buttonSource: "js", // Default is white-outline. // Possible values: white-outline, white, black. buttonStyle: "white-outline", // Possible values: add-money, book, buy, check-out, continue, contribute, donate, // order, pay, plain, reload, rent, subscribe, support, tip, top-up. buttonType: "buy", // Store name. Displayed in the Touch Bar on supported models of MacBook Pro. displayName: "MyStore", total: getTotal(), currencyCode: currency, // Default is US, or explicity defined by wpwlOptions.locale countryCode: "US", // Default is ["supports3DS"]. // Possible values: supports3DS, supportsCredit, supportsDebit, supportsEMV merchantCapabilities: ["supports3DS"], // Default is ["amex", "discover", "masterCard", "visa"]. // Possible values: amex, bancomat, bancontact, cartesBancaires, chinaUnionPay, // dankort, discover, eftpos, electron, elo, girocard, interac, jcb, // mada, maestro, masterCard, mir, privateLabel, visa, vPay supportedNetworks: ["amex", "discover", "masterCard", "visa"], // Display additional charges, discounts, and pending costs. lineItems: getLineItems(), shippingMethods: [{ label: "Free Shipping", amount: "0.00", identifier: "free", detail: "Delivers in five business days", }, { label: "Express Shipping", amount: "5.00", identifier: "express", detail: "Delivers in two business days", } ], // Possible values: shipping, delivery, storePickup, servicePickup shippingType: "shipping", // Limit payments to cards from specific countries. supportedCountries: ["US"], // Triggered when the payment sheet is dismissed onCancel: function () { console.log("onCancel"); }, // Triggered when a payment method is selected onPaymentMethodSelected: function (paymentMethod) { // Possible paymentMethod.type values: debit, credit, prepaid, store console.log("onPaymentMethodSelected: " + paymentMethod.type); // Calculate new total and new line items subTotalAmount = (["debit", "credit"].includes(paymentMethod.type)) ? 7731 : 7431; return { newTotal: getTotal(), newLineItems: getLineItems() }; }, // Possible values: email, name, phone, postalAddress, phoneticName requiredShippingContactFields: ["postalAddress", "email"], // Possible values: postalAddress requiredBillingContactFields: ["postalAddress"], // Triggered when a shipping contact is selected onShippingContactSelected: function (shippingContact) { // Redacted shipping contact information, only for completing transaction tasks, // such as calculating taxes or shipping costs. // Note: The data returned may differ based on the user's geographic region. ``` -------------------------------- ### Full Implementation Example Source: https://docs.oppwa.com/advanced-options A complete example including the HTML form, CSS styling, and JavaScript logic for toggling PayPal registration. ```html
body {background-color:#f6f6f5;} var wpwlOptions = { inlineFlow: ["PAYPAL","PAYPAL_CONTINUE"], locale: "en", style:"plain", paypal: {"createRegistration":"true"}, forter: {siteId : "1a4cd159d7ae"} } function handleClick(checkbox) { wpwlOptions.paypal.createRegistration = checkbox.checked.toString(); wpwl.reloadButton(); } $("#createRegistrationCheckbox").prop("checked", "true" === wpwlOptions.paypal.createRegistration); Create Registration ``` -------------------------------- ### Payment Webhook Example Source: https://docs.oppwa.com/tutorials/webhooks Example of a notification triggered by a payment event. ```json { "type":"PAYMENT", "payload":{ "id":"8a829449515d198b01517d5601df5584", "paymentType":"PA", "paymentBrand":"VISA", "amount":"92.00", "currency":"EUR", "presentationAmount":"92.00", "presentationCurrency":"EUR", "descriptor":"3017.7139.1650 OPP_Channel ", "result":{ "code":"000.000.000", "description":"Transaction succeeded" }, "authentication":{ "entityId":"8a8294185282b95b01528382b4940245" }, "card":{ "bin":"420000", "last4Digits":"0000", "holder":"Jane Jones", "expiryMonth":"05", "expiryYear":"2018" }, "customer":{ "givenName":"Jones", "surname":"Jane", "merchantCustomerId":"jjones", "sex":"F", "email":"jane@jones.com" }, "customParameters":{ "SHOPPER_promoCode":"AT052" }, "risk":{ "score":"0" }, "buildNumber":"ec3c704170e54f6d7cf86c6f1969b20f6d855ce5@2015-12-01 12:20:39 +0000", "timestamp":"2015-12-07 16:46:07+0000", "ndc":"8a8294174b7ecb28014b9699220015ca_66b12f658442479c8ca66166c4999e78", "channelName": "OPP_Channel", "source": "SYSTEM", "paymentMethod": "CC", "shortId": "5420.6916.5424" } } ``` -------------------------------- ### Registration Webhook Example Source: https://docs.oppwa.com/tutorials/webhooks Example of a notification triggered by a registration event, including the action field. ```json { "type":"REGISTRATION", "action": "CREATED", "payload":{ "id":"8a82944a53e6a0150153eaf693584262", "paymentBrand":"VISA", "result":{ "code":"000.000.000", "description":"Transaction succeeded", "randomField1315125026":"Please allow for new unexpected fields to be added" }, "card":{ "bin":"420000", "last4Digits":"0000", "holder":"Jane Jones" }, "authentication":{ "entityId":"8a8294174b7ecb28014b9699220015ca" }, "redirect":{ "parameters":[ ] }, "risk":{ "score":"" }, "timestamp":"2016-04-06 09:45:41+0000", "ndc":"8a8294174b7ecb28014b9699220015ca_b1539494024c411684b544574716e608", "channelName": "OPP_Channel", "source": "SYSTEM", "paymentMethod": "CC", "shortId": "7820.6916.2918" } } ``` -------------------------------- ### Schedule Webhook Example Source: https://docs.oppwa.com/tutorials/webhooks Example of a notification triggered by a schedule event. ```json { "type": "SCHEDULE", "payload": { "id": "8acda4a489919d63018996faf10b2a66", "registrationId": "8acda4a889919e5e018996f86a8f127a", "paymentType": "SD", "presentationAmount": "92.00", "presentationCurrency": "EUR", "result": { "code": "000.000.000", "description": "Transaction succeeded", "randomField1730751282": "Please allow for new unexpected fields to be added" }, "resultDetails": { "ConnectorTxID1": "8acda4a489919d63018996faf10b2a66" }, "customer": { "givenName":"Jones", "surname":"Jane", "merchantCustomerId":"jjones", "sex":"F", "email":"jane@jones.com" }, "authentication": { "entityId": "8a8294174b7ecb28014b9699220015ca" }, "redirect": { "parameters": [] }, "risk": { "score": "" }, "timestamp": "2023-07-27 10:52:55+0000", "ndc": "ef2c099f5b29455a9dbd260c59bcc224", "channelName": "OPP_Channel", "source": "SCHEDULER", "paymentMethod": "DC", "shortId": "3833.0396.7654" } } ``` -------------------------------- ### Initiate Authorization Request Source: https://docs.oppwa.com/sso Example of a cURL request to the authorization endpoint to start the OAuth2 flow. ```curl curl -G https://eu-test.oppwa.com/sso/v2/authorize \ -d "client_id=8a829418504762810150482b9432129d" \ -d "redirect_uri=https://docs.oppwa.com/tutorials/openid" \ -d "scope=openid" \ -d "response_type=code" \ -d "login_hint=8ac7a4c79394bdc801939736f17e063d" \ -d "state=6186f927-1c38-4295-aae7-0c4a90d66b1c" ``` -------------------------------- ### Initialize CheckoutSettings Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/paypal-payfast Set up the checkout settings with the required payment brands and the previously created brand configuration. ```java Set paymentBrands = new LinkedHashSet(); paymentBrands.add("PAYPAL_PAYFAST"); CheckoutSettings checkoutSettings = new CheckoutSettings(checkoutId, paymentBrands, Connect.ProviderMode.TEST); checkoutSettings.setBrandConfig(brandConfig); ``` ```kotlin val paymentBrands = hashSetOf("PAYPAL_PAYFAST") val checkoutSettings = CheckoutSettings(checkoutId, paymentBrands, Connect.ProviderMode.TEST) checkoutSettings.setBrandConfig(brandConfig) ``` -------------------------------- ### Initialize CheckoutSettings in Live Mode Source: https://docs.oppwa.com/integrations/mobile-sdk/first-integration Sets up checkout parameters for production using the live provider mode. ```java CheckoutSettings checkoutSettings = new CheckoutSettings(checkoutId, paymentBrands, Connect.ProviderMode.LIVE); ``` ```kotlin val checkoutSettings = CheckoutSettings(checkoutId, paymentBrand, Connect.ProviderMode.LIVE) ``` -------------------------------- ### Enable installment payments for Android Source: https://docs.oppwa.com/mobile-sdk-advanced-options Configure installment options for Android CheckoutSettings. ```java CheckoutSettings checkoutSettings = new CheckoutSettings( checkoutId, paymentBrands, providerMode); checkoutSettings.setInstallmentEnabled(true); checkoutSettings.setInstallmentOptions(new Integer[] { 1, 2, 3 }); ``` ```kotlin val checkoutSettings = CheckoutSettings(checkoutId, paymentBrands, providerMode) checkoutSettings.isInstallmentEnabled = true checkoutSettings.installmentOptions = arrayOf(1, 2, 3) ``` -------------------------------- ### Initialize OPPPaymentProvider in Live Mode Source: https://docs.oppwa.com/integrations/mobile-sdk/custom-ui Configure the payment provider for production using the live mode constant. ```objective-c self.provider = [OPPPaymentProvider paymentProviderWithMode:OPPProviderModeLive]; ``` ```swift let provider = OPPPaymentProvider(mode: OPPProviderMode.live) ``` -------------------------------- ### OPPCheckoutSettings / CheckoutSettings - Installment Configuration Source: https://docs.oppwa.com/mobile-sdk-advanced-options Configures the installment payment options for the checkout process. ```APIDOC ## Configure Installment Options ### Description Enables installment payments and sets the available installment options for the checkout session. ### Usage - **installmentEnabled** (boolean) - Set to true to enable installment payments. - **installmentOptions** (array) - Define the list of available installment options (e.g., [1, 2, 3]). ``` -------------------------------- ### Initialize Payment Provider in Production Source: https://docs.oppwa.com/mobile-sdk-first-integration Configure the payment provider to use the live environment mode. ```Objective-C self.provider = [OPPPaymentProvider paymentProviderWithMode:OPPProviderModeLive]; ``` ```Swift let provider = OPPPaymentProvider(mode: OPPProviderMode.live) ``` ```Java CheckoutSettings checkoutSettings = new CheckoutSettings(checkoutId, paymentBrands, Connect.ProviderMode.LIVE); ``` ```Kotlin val checkoutSettings = CheckoutSettings(checkoutId, paymentBrand, Connect.ProviderMode.LIVE) ``` -------------------------------- ### Install iOS Pods Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/klarna Execute the pod installation command to integrate the SDK into your project. ```bash pod install ``` -------------------------------- ### Initialize OppPaymentProvider in Live Mode Source: https://docs.oppwa.com/integrations/mobile-sdk/custom-ui Initialize the payment provider with live mode during instantiation. ```java OppPaymentProvider paymentProvider = new OppPaymentProvider(context, Connnect.ProviderMode.LIVE); ``` ```kotlin val paymentProvider = OppPaymentProvider(context, Connnect.ProviderMode.LIVE) ``` -------------------------------- ### Create a PKPaymentRequest Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/apple-pay Initialize a payment request using the SDK helper and configure currency and summary items. ```objective-c PKPaymentRequest *request = [OPPPaymentProvider paymentRequestWithMerchantIdentifier:@"YOUR MERCHANT ID" countryCode:@"YOUR COUNTRY CODE"]; // Set currency. request.currencyCode = "USD"; // Create total item. Label should represent your company. // It will be prepended with the word "Pay" (i.e. "Pay Sportswear $100.00") NSDecimalNumber *amount = [NSDecimalNumber decimalNumberWithMantissa:10000 exponent:-2 isNegative:NO]; request.paymentSummaryItems = @[[PKPaymentSummaryItem summaryItemWithLabel:@"Sportswear" amount:amount]]; ``` ```swift let request = OPPPaymentProvider.paymentRequest(withMerchantIdentifier: "YOUR MERCHANT ID", countryCode: "YOUR COUNTRY CODE") // Set currency. request.currencyCode = "USD" // Create total item. Label should represent your company. // It will be prepended with the word "Pay" (i.e. "Pay Sportswear $100.00") let amount = NSDecimalNumber(mantissa: 10000, exponent: -2, isNegative: false) request.paymentSummaryItems = [PKPaymentSummaryItem(label: "Sportswear", amount: amount)] ``` -------------------------------- ### Prepare Checkout for Tokenization Source: https://docs.oppwa.com/integrations/widget/omni-tokens Perform a server-to-server POST request to initialize the tokenization process. ```bash curl https://eu-test.oppwa.com/v1/checkouts \ -d "entityId=8ac7a4c79394bdc801939736f1e8064f" \ -d "testMode=EXTERNAL" \ -d "createOmniToken=true" \ -d "integrity=true" \ -H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng=" ``` -------------------------------- ### Registration Status Response Example Source: https://docs.oppwa.com/integrations/mobile-sdk/custom-ui/tokenization Example JSON response received when requesting the status of a registration-only transaction. ```json { "id":"8a82944a580a782101581f3a0b4b5ab9", "card":{ "bin":"420000", "last4Digits":"0000", "holder":"Jane Jones", "expiryMonth":"05", "expiryYear":"2018" }, "result":{ "code":"000.100.110", "description":"Request successfully processed in 'Merchant in Integrator Test Mode'" }, // ... } ``` -------------------------------- ### Enable installment payments Source: https://docs.oppwa.com/mobile-sdk-advanced-options Configure installment options for checkout settings. Requires SDK version 2.30.0 or higher. ```objective-c OPPCheckoutSettings *checkoutSettings = [[OPPCheckoutSettings alloc] init]; checkoutSettings.installmentEnabled = YES; checkoutSettings.installmentOptions = @[@1, @2, @3]; ``` ```swift let checkoutSettings = OPPCheckoutSettings() checkoutSettings.isInstallmentEnabled = true checkoutSettings.installmentOptions = [1, 2, 3] ``` -------------------------------- ### Implement protocol methods Source: https://docs.oppwa.com/integrations/mobile-sdk/emv-3ds-new-flow Define the methods required to handle 3DS configuration and challenge screens. ```objective-c //OPPThreeDSEventListener protocol methods - (void)onThreeDSConfigRequiredWithCompletion:(void (^)(OPPThreeDSConfig * _Nonnull))completion { OPPThreeDSConfig *config = [[OPPThreeDSConfig alloc] init]; //return config completion(config); } - (void)onThreeDSChallengeRequiredWithCompletion:(void (^)(UINavigationController * _Nonnull))completion { //return Navigation Controller completion(self.navController); } ``` ```swift //OPPThreeDSEventListener protocol methods func onThreeDSChallengeRequired(completion: @escaping (UINavigationController) -> Void) { completion(self.navigationController!) } func onThreeDSConfigRequired(completion: @escaping (OPPThreeDSConfig) -> Void) { let config = OPPThreeDSConfig() completion(config) } ``` -------------------------------- ### Create PayPal Payfast Configuration for Custom UI Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/paypal-payfast Initialize the configuration object for use with custom UI implementations. ```java PaypalPayfastConfig paypalPayfastConfig = new PaypalPayfastConfig(false, true, "https://example.com"); ``` ```kotlin val paypalPayfastConfig = new PaypalPayfastConfig(false, true, "https://example.com"); ``` -------------------------------- ### Tieback Message Body Example Source: https://docs.oppwa.com/fraud Example of a custom Tieback message body containing transaction-related key/value pairs delimited by ampersands. ```text client=000000&subclientid=100001&transactionid=ABC123&acitransactionid=000000100001ABC20160914090137168&decision=CANCEL&userid=ANUser&cancelreason=216¬e=lorem+ipsum&processdate=2016-09-14 13:00:00.000&password=NX436T&username=test1 ``` -------------------------------- ### Configure Ready-to-Use UI Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/paypal-payfast Set the payment brand and configuration in the checkout settings. ```swift let checkoutSettings = OPPCheckoutSettings() // Set PayPal PayFast payment brand checkoutSettings.paymentBrands = ["PAYPAL_PAYFAST"] let config = OPPBraintreeConfig.paypalPayFastConfig(universalLink:"https://yourdomain/braintree-payments", URLScheme:"your_app_scheme" enableAppSwitch:true) checkoutSettings.setBrandConfig(config) ``` ```objective-c OPPCheckoutSettings *checkoutSettings = [[OPPCheckoutSettings alloc] init]; // Set PayPal PayFast payment brand checkoutSettings.paymentBrands = @[@"PAYPAL_PAYFAST"]; OPPBraintreeConfig *config = [OPPBraintreeConfig paypalPayFastConfigWithUniversalLink:@"https://yourdomain/braintree-payments" URLScheme:@"your_app_scheme" enableAppSwitch:YES]; [checkoutSettings setBrandConfig:config]; ``` -------------------------------- ### Prepare Checkout with Registration Source: https://docs.oppwa.com/integrations/widget/network-tokens Initiates network token provisioning by setting createRegistration to true in the checkout request. ```curl curl https://eu-test.oppwa.com/v1/checkouts \ -d "entityId=8ac7a4c79394bdc801939736f1e3064c" \ -d "createRegistration=true" \ -d "customParameters[3DS2_enrolled]=true" \ -d "customParameters[3DS2_flow]=challenge" \ -d "testMode=EXTERNAL" \ -d "amount=11.12" \ -d "currency=EUR" \ -d "paymentType=DB" \ -d "standingInstruction.mode=INITIAL" \ -d "standingInstruction.source=CIT" \ -d "standingInstruction.type=UNSCHEDULED" \ -d "customer.givenName=Smith" \ -d "customer.ip=192.168.0.0" \ -d "customer.surname=John" \ -d "customer.language=DE" \ -d "customer.email=john.smith@gmail.com" \ -d "billing.city=MyCity" \ -d "billing.country=DE" \ -d "billing.postcode=712121" \ -d "billing.state=DE" \ -d "billing.street1=MyStreet" \ -d "integrity=true" \ -H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng=" ``` -------------------------------- ### Get SMS Status via cURL Source: https://docs.oppwa.com/integrations/paybylink Perform a GET request to retrieve the status of an SMS distribution using the entity ID and authorization token. ```bash curl -G https://eu-test.oppwa.com/paybylink/v1/{id}/sms/status \ -d "entityId=8ac7a4c79394bdc801939736f1d10646" \ -H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng=" ``` -------------------------------- ### Get Payment Link Status via cURL Source: https://docs.oppwa.com/integrations/paybylink Perform a GET request to retrieve the status of a payment link using the entity ID and authorization token. ```bash curl -G https://eu-test.oppwa.com/paybylink/v1/{id} \ -d "entityId=8ac7a4c79394bdc801939736f1d10646" \ -H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng=" ``` -------------------------------- ### Initialize OPPWpwlOptions for iOS Source: https://docs.oppwa.com/integrations/mobile-sdk/prebuilt-ui/advanced-options Configure brand-specific options using dictionaries for JSON-like settings and JavaScript functions. ```objective-c NSDictionary *config = @{@"locale": @"fr-BE"}; NSDictionary *jsConfig = @{@"onReady": @"function() {/* function here */}"}; OPPWpwlOptions *wpwlOptions = [OPPWpwlOptions initWithConfiguration:config jsFunctions:jsConfig]; ``` ```swift var config = [ "locale" : "fr-BE" ] var jsConfig = [ "onReady" : "function() {/* function here */}" ] as [String : Any] let wpwlOptions = OPPWpwlOptions.initWithConfiguration( config , jsFunctions: jsConfig) ``` -------------------------------- ### Initialize Google Pay Widget Source: https://docs.oppwa.com/google-pay Example of the HTML form and JavaScript configuration required to load the Google Pay button. ```html
``` ```css body {background-color:#f6f6f5;} ``` ```javascript var wpwlOptions = { googlePay: { gatewayMerchantId: "8ac7a4c79394bdc801939736f17e063d" } } ``` -------------------------------- ### GET /sso/v2/userinfo Source: https://docs.oppwa.com/support/sso Retrieves user information after successful authentication. ```APIDOC ## GET /sso/v2/userinfo ### Description Retrieves user information after successful authentication. ### Method GET ### Endpoint /sso/v2/userinfo ### Response #### Success Response (200) - **attached_to** (array) - List of entities the user is attached to, including entityId, entityType, and path. ``` -------------------------------- ### Configure Ready-to-Use UI Settings Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/afterpay-pacific Set the payment brands, result URL, and Afterpay configuration in the checkout settings. ```objective-c OPPCheckoutSettings *checkoutSettings = [[OPPCheckoutSettings alloc] init]; // Set Afterpay Pacific payment methods checkoutSettings.paymentBrands = @"AFTERPAY_PACIFIC,CLEARPAY"; // Set shopper result URL checkoutSettings.shopperResultURL = @"com.companyname.appname.payments://result"; // Set Afterpay Pacific configuration checkoutSettings.afterpayConfig = [[OPPAfterpayConfig alloc] initWithWithMinimumAmount:minimumAmount maximumAmount:maximumAmount locale:locale consumerLocale:consumerLocale]; ``` ```swift let checkoutSettings = OPPCheckoutSettings() // Set Afterpay Pacific payment methods checkoutSettings.paymentBrands = "AFTERPAY_PACIFIC,CLEARPAY" // Set shopper result URL checkoutSettings.shopperResultURL = "com.companyname.appname.payments://result" // Set Afterpay Pacific configuration checkoutSettings.afterpayConfig = OPPAfterpayConfig.init(withMinimumAmount: minimumAmount, maximumAmount: maximumAmount, locale: locale, consumerLocale: consumerLocale) ``` -------------------------------- ### GET /v1/query/ Source: https://docs.oppwa.com/api-reference Searches for transactions using a merchant transaction ID. ```APIDOC ## GET /v1/query/ ### Description Searches for transactions using a merchant transaction ID. ``` -------------------------------- ### Configure Google Pay Options Source: https://docs.oppwa.com/google-pay Reference examples for configuring specific Google Pay parameters within the wpwlOptions object. ```javascript gatewayMerchantId: "8ac7a4c79394bdc801939736f17e063d" ``` ```javascript merchantId: "your_merchantId" ``` ```javascript gateway: sonypaymentservices ``` ```javascript allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"] ``` -------------------------------- ### GET /v3/query/ Source: https://docs.oppwa.com/reference/parameters Searches for transactions using a merchant transaction ID (v3). ```APIDOC ## GET /v3/query/ ### Description Searches for transaction details using a merchant transaction ID via v3 API. ### Method GET ### Endpoint /v3/query/ ``` -------------------------------- ### GET /v3/query/ Source: https://docs.oppwa.com/parameters Searches for transactions using a merchant transaction ID (v3). ```APIDOC ## GET /v3/query/ ### Description Searches for transaction details using a merchantTransactionId via the v3 API. ### Method GET ### Endpoint /v3/query/ ``` -------------------------------- ### Create OXXO_VA Payment Parameters Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/oxxo Initialize payment parameters with checkout ID and identification document details. ```java OxxoVaPaymentParams paymentParams = new OxxoVaPaymentParams( @NonNull String checkoutId, @Nullable IdentificationDocType identificationDocType, // IdentificationDocType is Enum, values are (ID_CARD , PASSPORT , TAXSTATEMENT) @Nullable String identificationDocId); paymentParams.setShopperResultUrl("com.companyname.appname.payments://result"); ``` ```kotlin val paymentParams = PixVaPaymentParams( checkoutId, identificationDocType,// IdentificationDocType is Enum, values are(ID_CARD , PASSPORT , TAXSTATEMENT) identificationDocId ) paymentParams.shopperResultUrl = "com.companyname.appname.payments://result" ``` -------------------------------- ### GET /v1/query/{paymentId}/ Source: https://docs.oppwa.com/api-reference Searches for transactions using a specific payment ID. ```APIDOC ## GET /v1/query/{paymentId}/ ### Description Searches for transactions using a specific payment ID. ### Method GET ### Endpoint /v1/query/{paymentId}/ ### Parameters #### Path Parameters - **paymentId** (string) - Required - The unique identifier for the payment. ``` -------------------------------- ### Initialize OPPCheckoutProvider Source: https://docs.oppwa.com/integrations/mobile-sdk/first-integration Create the provider instance at the class level to prevent it from being released during the payment process. ```objective-c OPPCheckoutProvider *checkoutProvider = [OPPCheckoutProvider checkoutProviderWithPaymentProvider:self.provider checkoutID:checkoutID settings:checkoutSettings]; ``` ```swift let checkoutProvider = OPPCheckoutProvider(paymentProvider: self.provider, checkoutID: checkoutID!, settings: checkoutSettings) ``` -------------------------------- ### Create Venmo Payfast Brand Configuration Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/venmo-payfast Initializes the configuration object with return URL and address collection preferences. ```java VenmoPayfastConfig venmoPayfastConfig = new VenmoPayfastConfig("https://example.com", false, false); CheckoutPaymentBrandConfig brandConfig = new CheckoutPaymentBrandConfig.Builder() .setVenmoPayfastConfig(venmoPayfastConfig) .build(); ``` ```kotlin val venmoPayfastConfig = new VenmoPayfastConfig("https://example.com", false, false); val brandConfig = CheckoutPaymentBrandConfig.Builder() .setVenmoPayfastConfig(venmoPayfastConfig) .build() ``` -------------------------------- ### GET /v1/checkouts/{checkoutId} Source: https://docs.oppwa.com/api-reference Updates or retrieves information for a specific checkout ID. ```APIDOC ## GET /v1/checkouts/{checkoutId} ### Description Retrieves information for a specific checkout ID. ### Method GET ### Endpoint /v1/checkouts/{checkoutId} ### Parameters #### Path Parameters - **checkoutId** (string) - Required - The unique identifier for the checkout. ``` -------------------------------- ### GET /v1/checkouts/{id}/registration Source: https://docs.oppwa.com/integrations/widget/external-tokens Retrieve the status of a tokenization registration request. ```APIDOC ## GET /v1/checkouts/{id}/registration ### Description Check the status of a registration request after the customer is redirected to the shopperResultUrl. ### Method GET ### Endpoint https://eu-test.oppwa.com/v1/checkouts/{id}/registration ### Parameters #### Path Parameters - **id** (string) - Required - The checkout identifier. #### Query Parameters - **entityId** (string) - Required - The entity identifier. ### Request Example curl -G https://eu-test.oppwa.com/v1/checkouts/{id}/registration \ -d "entityId=8ac7a4c8876808f0018770b7edcd09c6" \ -H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng=" ``` -------------------------------- ### Initial Payment Request via cURL Source: https://docs.oppwa.com/cof Example of an initial payment request using the server-to-server integration to store a registration. ```bash curl https://eu-test.oppwa.com/v1/payments \ -d "entityId=8ac7a4c79394bdc801939736f17e063d" \ -d "amount=92.00" \ -d "currency=EUR" \ -d "paymentBrand=VISA" \ -d "paymentType=DB" \ -d "card.number=4200000000000000" \ -d "card.holder=Jane Jones" \ -d "card.expiryMonth=05" \ -d "card.expiryYear=2034" \ -d "card.cvv=123" \ -d "standingInstruction.mode=INITIAL" \ -d "standingInstruction.source=CIT" \ -d "standingInstruction.type=UNSCHEDULED" \ -d "createRegistration=true" \ -H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng=" ``` -------------------------------- ### Initialize CheckoutSettings with Payment Brands Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/afterpay-pacific Create the CheckoutSettings object by specifying the Afterpay Pacific and Clearpay payment brands. ```java Set paymentBrands = new HashSet<>(); paymentBrands.add("AFTERPAY_PACIFIC"); paymentBrands.add("CLEARPAY"); CheckoutSettings checkoutSettings = new CheckoutSettings( checkoutId, paymentBrands, providerMode ); ``` ```kotlin val paymentBrands = hashSetOf("AFTERPAY_PACIFIC", "CLEARPAY") val checkoutSettings = CheckoutSettings( checkoutId, paymentBrands, providerMode ) ``` -------------------------------- ### GET /reports/v2/reconciliations/aggregations/{id} Source: https://docs.oppwa.com/integrations/reporting/settlement Retrieves detailed settlement information with pagination support. ```APIDOC ## GET /reports/v2/reconciliations/aggregations/{id} ### Description Retrieves detailed settlement information for a specific aggregation ID with pagination. Records are split into pages of 100. ### Method GET ### Endpoint https://eu-test.oppwa.com/reports/v2/reconciliations/aggregations/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The aggregation ID. #### Query Parameters - **entityId** (string) - Required - The entity identifier. - **testMode** (string) - Optional - Set to 'INTERNAL' to return dummy data. - **pageNo** (integer) - Optional - The page number to retrieve. ``` -------------------------------- ### Prepare One-Click Checkout Source: https://docs.oppwa.com/integrations/widget/registration-tokens Send a POST request to prepare the checkout, including registration token IDs for stored cards. ```bash curl https://eu-test.oppwa.com/v1/checkouts \ -d "entityId=8ac7a4c79394bdc801939736f17e063d" \ -d "testMode=EXTERNAL" \ -d "registrations[0].id=8ac7a4a19fcd044a019fcdac775c1e27" \ -d "registrations[1].id=8ac7a4a09fcc0550019fcdac788236c6" \ -d "registrations[2].id=8ac7a49f9fcd04a1019fcdac79e31e6f" \ -d "amount=31.13" \ -d "currency=EUR" \ -d "paymentType=DB" \ -d "standingInstruction.mode=REPEATED" \ -d "standingInstruction.source=CIT" \ -d "standingInstruction.type=UNSCHEDULED" \ -H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng=" ``` -------------------------------- ### 3D Secure Error Response Example Source: https://docs.oppwa.com/support/3d-secure-2.0-guide Structure of the threeDSecure object when an authentication error occurs. ```json "threeDSecure":{ "version":"2.2.0", "errorCode":"101", "errorDescription":"MerchantCategoryCode must be specified.", "errorSource":"3DS Server" }, ``` -------------------------------- ### Create PayPal PayFast brand configuration Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/paypal-payfast Initialize the configuration object with universal link, URL scheme, and app switch settings. ```swift let config = OPPBraintreeConfig.paypalPayFastConfig(universalLink:"https://yourdomain/braintree-payments", URLScheme:"your_app_scheme", enableAppSwitch:true) ``` ```objective-c OPPBraintreeConfig *config = [OPPBraintreeConfig paypalPayFastConfigWithUniversalLink:@"https://yourdomain/braintree-payments" URLScheme:@"your_app_scheme" enableAppSwitch:YES]; ``` -------------------------------- ### 503 Service Unavailable Error Response Source: https://docs.oppwa.com/fraud Example JSON response when the service is temporarily unavailable. ```json { "path": "/fraud-check/v1", "error": "Service unavailable", "timestamp": "2020-01-01T00:00:00.000Z", "status": 503 } ``` -------------------------------- ### Configure Apple Pay Options Source: https://docs.oppwa.com/applepay Examples of setting specific Apple Pay configuration parameters within the wpwlOptions object. ```js version: 3 ``` ```js checkAvailability: "applePayCapabilities" ``` ```js merchantIdentifier: "com.company" ``` -------------------------------- ### 500 Internal Server Error Response Source: https://docs.oppwa.com/fraud Example JSON response for an unexpected server error. ```json { "path": "/fraud-check/v1", "error": "Internal server error.", "timestamp": "2020-01-01T00:00:00.000Z", "status": 500 } ``` -------------------------------- ### OPPCheckoutSettings Customization Source: https://docs.oppwa.com/integrations/mobile-sdk/prebuilt-ui/checkout-ui-customization How to initialize checkout settings and override theme properties in iOS. ```APIDOC ## OPPCheckoutSettings ### Description Configures the visual appearance of the checkout UI by selecting a base theme and overriding specific UI attributes. ### Usage ```objectivec OPPCheckoutSettings *settings = [[OPPCheckoutSettings alloc] init]; settings.theme.style = OPPCheckoutThemeStyleLight; settings.theme.confirmationButtonColor = [UIColor greenColor]; ``` ```swift let settings = OPPCheckoutSettings() settings.theme.style = .light settings.theme.confirmationButtonColor = UIColor.green ``` ### Customizable Attributes - **primaryBackgroundColor** (UIColor) - Background color for any views in this theme - **primaryForegroundColor** (UIColor) - Text color for any important labels in a view - **textFieldBackroundColor** (UIColor) - Background color of text fields - **textFieldTextColor** (UIColor) - Input field text color - **textFieldPlaceholderColor** (UIColor) - Placeholder color for text fields - **confirmationButtonColor** (UIColor) - The color of the confirmation buttons - **confirmationButtonTextColor** (UIColor) - Text color for confirmation buttons - **sectionBackgroundColor** (UIColor) - Background color of section - **sectionTextColor** (UIColor) - Text color of section title - **cellHighlightedBackgroundColor** (UIColor) - Highlighted background color for cell in the table view - **cellHighlightedTextColor** (UIColor) - Text label highlighted color - **cellTintColor** (UIColor) - Tint color for cell in the table view - **separatorColor** (UIColor) - Color for separator lines - **paymentBrandIconBackgroundColor** (UIColor) - Background color for payment brand icons - **paymentBrandIconBorderColor** (UIColor) - Border color for payment brand icons - **storedPaymentMethodIconBackgroundColor** (UIColor) - Background color for stored payment method icons - **storedPaymentMethodIconBorderColor** (UIColor) - Border color for stored payment method icons - **errorColor** (UIColor) - Color for rendering any error messages or views - **primaryFont** (UIFont) - Text font for any important labels in a view - **secondaryFont** (UIFont) - Text font for any other labels in a view - **confirmationButtonFont** (UIFont) - Text font for confirmation button - **sectionFont** (UIFont) - Text font of section title - **cellTextFont** (UIFont) - Text font for cell on the table view - **errorFont** (UIFont) - Text font for rendering any error messages - **activityIndicatorPrimaryStyle** (UIActivityIndicatorViewStyle) - Indicator view processing style - **navigationBarTintColor** (UIColor) - Navigation bar tint color - **navigationBarBackgroundColor** (UIColor) - Navigation bar background color - **navigationBarTextAttributes** (NSDictionary) - Text attributes for navigation bar title - **navigationItemTextAttributes** (NSDictionary) - Text attributes for navigation bar item titles - **cancelBarButtonText** (NSString) - Custom text for the right bar button in the navigation bar - **cancelBarButtonImage** (UIImage) - Custom image for the right bar button in the navigation bar ``` -------------------------------- ### GET /v3/query/{id} Source: https://docs.oppwa.com/subscriptions Retrieve details for a specific subscription using its registration ID. ```APIDOC ## GET /v3/query/{id} ### Description Perform a server-to-server GET request to retrieve subscription information. ### Method GET ### Endpoint https://eu-test.oppwa.com/v3/query/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The registration ID of the subscription. #### Query Parameters - **entityId** (string) - Required - The merchant entity ID. - **includeLinkedTransactions** (boolean) - Optional - Whether to include linked transactions. - **paymentTypes** (string) - Optional - Comma-separated list of payment types (e.g., SD,DS). ### Request Example curl -G https://eu-test.oppwa.com/v3/query/{id} \ -d "entityId=8ac7a4c79394bdc801939736f1ac0642" \ -d "includeLinkedTransactions=true" \ -d "paymentTypes=SD,DS" \ -H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng=" ``` -------------------------------- ### Retrieve Omnitoken Status Source: https://docs.oppwa.com/integrations/widget/network-tokens Perform a GET request to retrieve the status of an omnitoken process. ```bash curl -G https://eu-test.oppwa.com/v1/checkouts/{id}/omnitoken \ -d "entityId=8ac7a4c79394bdc801939736f1e3064c" \ -H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng=" ``` -------------------------------- ### Configure FPX for Android Ready-to-Use UI Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/fpx Initialize the CheckoutSettings with FPX payment brands for Java and Kotlin. ```java Set paymentBrands = new HashSet<>(); paymentBrands.add("FPX"); CheckoutSettings checkoutSettings = new CheckoutSettings( checkoutId, paymentBrands, providerMode ); ``` ```kotlin val paymentBrands = hashSetOf("FPX") val checkoutSettings = CheckoutSettings( checkoutId, paymentBrands, providerMode ) ``` -------------------------------- ### GET /v3/query/{paymentId}/ Source: https://docs.oppwa.com/api-reference Searches for transactions using a specific payment ID (v3). ```APIDOC ## GET /v3/query/{paymentId}/ ### Description Searches for transactions using a specific payment ID (v3). ### Method GET ### Endpoint /v3/query/{paymentId}/ ### Parameters #### Path Parameters - **paymentId** (string) - Required - The unique identifier for the payment. ``` -------------------------------- ### Google Pay Configuration Source: https://docs.oppwa.com/google-pay How to initialize the Google Pay widget and configure its options. ```APIDOC ## Google Pay Configuration ### Description To enable Google Pay, include 'GOOGLEPAY' in the data-brands attribute of your payment form and configure the `wpwlOptions.googlePay` object. ### Configuration Object - **gatewayMerchantId** (string) - Required - Your entity ID provided by the payment provider. - **merchantId** (string) - Required (Live) - Google merchant identifier issued after approval. - **gateway** (string) - Required (for GOOGLEPAYTKN) - Payment provider configured for GooglePay. - **allowedAuthMethods** (array) - Optional - Authentication methods supported (e.g., ["PAN_ONLY", "CRYPTOGRAM_3DS"]). Default is ["PAN_ONLY"]. - **allowedCardNetworks** (array) - Optional - Supported card networks (e.g., ["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"]). ### Example ```html
``` ``` -------------------------------- ### Configure Ready-to-Use UI Source: https://docs.oppwa.com/integrations/mobile-sdk/brand-configurations/oxxo Set the OXXO_VA payment brand and shopper result URL in the checkout settings. ```swift let checkoutSettings = OPPCheckoutSettings() // Set Oxxo payment method checkoutSettings.paymentBrands = ["OXXO_VA"] checkoutSettings.shopperResultURL = "com.companyname.appname.payments://result" ``` ```objective-c OPPCheckoutSettings *checkoutSettings = [[OPPCheckoutSettings alloc] init]; // Set Oxxo payment methods checkoutSettings.paymentBrands = @[@"OXXO_VA"]; checkoutSettings.shopperResultURL = @"com.companyname.appname.payments://result"; ``` -------------------------------- ### GET /v1/secureRegistrations/{registrationId} Source: https://docs.oppwa.com/api-reference Queries a secure payment token using the registration ID. ```APIDOC ## GET /v1/secureRegistrations/{registrationId} ### Description Queries a secure payment token using the registration ID. ### Method GET ### Endpoint /v1/secureRegistrations/{registrationId} ### Parameters #### Path Parameters - **registrationId** (string) - Required - The unique identifier for the registration. ``` -------------------------------- ### GET /v1/checkouts/{checkoutId}/payment Source: https://docs.oppwa.com/api-reference Retrieves the payment status for a specific checkout ID. ```APIDOC ## GET /v1/checkouts/{checkoutId}/payment ### Description Retrieves the payment status for a specific checkout ID. ### Method GET ### Endpoint /v1/checkouts/{checkoutId}/payment ### Parameters #### Path Parameters - **checkoutId** (string) - Required - The unique identifier for the checkout. ```