Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🆕 Line items for the Payments API #6

Open
remcotolsma opened this issue May 28, 2024 · 1 comment
Open

🆕 Line items for the Payments API #6

remcotolsma opened this issue May 28, 2024 · 1 comment
Assignees

Comments

@remcotolsma
Copy link
Member

🆕 Line items for the Payments API🆕

The Orders API already had the capability of adding line item information to the Order. Now it is also possible to add this information when you are using the Payments API.

Why are we doing this?
At Mollie we always try to improve and make things easier. One way we want to do that, is to remove the dependency on the Orders API. We want to do this by having the Payments API support all use cases and payment methods. This means that later this year you will be able to use the Payments API for Klarna, Billie and Vouchers too!
Additionally, we have some awesome plans for other features that will be leveraging line item information.

How does it differ from the Orders API?
It is good to know that on the Payments API, the lines are simply meta-data. In contrast to the Orders API, line items do not have any business logic related to it (like a status). You also cannot create a refund via the API only referencing a line item, you simply send in an amount. This is on purpose since we realised from the Orders API that building logic on line items is actually making things more complex and less flexible.

All the details can be found in our API Documentation and we are looking forward to your feedback! https://docs.mollie.com/reference/v2/payments-api/create-payment

Source: https://discord.com/channels/1037712581407817839/1037752322585018368/1243549435514851380

@remcotolsma remcotolsma self-assigned this Jun 5, 2024
@remcotolsma remcotolsma moved this from Todo to In Progress in Pronamic Pay Jun 5, 2024
@remcotolsma
Copy link
Member Author

Did a quick compare:

Property Orders API Payments API  
  https://docs.mollie.com/reference/v2/orders-api/create-order https://docs.mollie.com/reference/v2/payments-api/create-payment  
lines Required Optional  
type Optional Optional Line
category Optional N/A OrderLine
description N/A Required PaymentLine
name Required N/A OrderLine
quantity Required Required Line
quantityUnit N/A Optional PaymentLine
unitPrice Required Required Line
discountAmount Optional Optional Line
totalAmount Required Required Line
vatRate Required Optional OrderLine, PaymentLine
vatAmount Required Optional OrderLine, PaymentLine
sku Optional Optional Line
imageUrl Optional Optional Line
productUrl Optional Optional Line
metadata Optional N/A OrderLine

https://docs.google.com/spreadsheets/d/1NW-bOFT7ON3mBK95Fd-8FnvQouXxsE8qKNthv-_2PNU/edit?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant