Create multiple products and then check them out together and pay

Hritik_Baral
Contributor
Contributor

I'm building a marketplace like thing where there will be multiple products and each products will have their own price, You can add to cart as many as products you want and then proceed to pay so is their a way to create these products with the API's rather then manually creating the products so that we can easily get all of our products and also edit them

In short how to Create a Product wiith their product id and price

How to get all the products 

How to edit the product details 

How to check out products 

I hope my question is understanable  

Login to Me Too
1 REPLY 1

MTS_Chiranjeevi
Moderator
Moderator

Good day @Hritik_Baral,

 

Thank you for posting to the PayPal community.

 

Please perform Create Order API (https://developer.paypal.com/docs/api/orders/v2/#orders_create) call in which you can pass array of items that the customer purchases from the merchant under "purchase_units" object and then redirect the customer/buyer to "approve" URL returned from the Create Order API response as below: 

{ "href": "https://www.sandbox.paypal.com/checkoutnow?token=3WV85313YD557721J", "method": "GET", "rel": "approve" },

Once the order is approved by the customer/buyer, merchant should perform Capture Order (https://developer.paypal.com/docs/api/orders/v2/#orders_capture) API call and customer/buyer should pass the valid funding source.

 

Guide link : https://developer.paypal.com/docs/api/orders/v2/ 

 

If your still facing any issues, please create a MTS ticket via - https://www.paypal-support.com/s/?language=en_US with the detail information and error details.

 

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.