Package Tracking

Client-side configurationanchor

Here is an example that demonstrates client integration and can be used for any Server integration for creating user approval.

note

If you have already submitted line item information in the Client SDK integration and there have been no changes to it, you can skip line item information in the server integration.

*The code snippet here does not include the entire integration, so to emphasize the change, please refer our guide.

  1. Java
fundingSource: paypal.FUNDING.PAYPAL,
createOrder: function () {
  return paypalCheckoutInstance.createPayment({
    flow: 'checkout', // Required
    amount: 10.00, // Required
    currency: 'USD', // Required, must match the currency passed in with loadPayPalSDK
    intent: 'capture', // Must match the intent passed in with loadPayPalSDK
    enableShippingAddress: true,
    shippingAddressEditable: false,
    shippingAddressOverride: {…},
    lineItems: [{
      quantity: 1,
      unitAmount: 10.00,
      name: "item name",
      kind: "debit",
      upcCode: "012345678912",
      upcType: "UPC-A", //New field
      url: "https://example.com", //New field
      imageUrl: "https://example.com/product1.jpeg", //New field
    }]
  });
},

Next Page: Server-side configuration