Showing results for 
Search instead for 
Did you mean: 

PayPal JavaScript SDK Image and Item Name


PayPal JavaScript SDK Image and Item Name



I'm currently integrating PayPal JavaScript SDK.

I would like to show item name and it's image on the payment confirmation page (The one with 'Pay Now' button).

I've checked through documentation, but could not find any options for this type of parameters.


Also I'm having the trouble with setting goods type to DIGITALGOODS. As soon as I'm trying to put it in accordance with it creates more and more 'required' params, so I'm getting Error 400. Does anyone have a good example of digitals goods parameters configuration?


My current button configuration looks like this;

style: {
'color': 'gold', // gold, blue, silver
'shape': 'rect', // rect, pill
'label': 'pay' // paypal, checkout, pay
createOrder: function(data, actions) {
// Set up the transaction
return actions.order.create({
purchase_units: [{
amount: {
value: '1.99',
currency: 'USD'
custom_id: 'f12b98e0-83b8-41c8-9321-1797618f07c4',
onApprove: function(data, actions) {
// alert('onApprove');
// Capture the funds from the transaction
return actions.order.capture().then(function(details) {
// Show a success message to your buyer
// alert('Transaction completed by ' +;
return fetch('/api/purchases/f12b98e0-83b8-41c8-9321-1797618f07c4', {
method: 'post',
body: JSON.stringify({
orderID: data.orderID
onCancel: function(data, actiond) {
// alert('onCancel');
onError: function(data, actions) {
// alert('onError');
}, onClick: function(){
// alert('clicked');