-
Notifications
You must be signed in to change notification settings - Fork 72
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
Return links to unsettled credits links from /accounts/{accounts.id}/credits #730
Comments
the accounts endpoint should only return accounts. can you please expand on what you mean? |
"links": {
"accounts.credits": "/accounts/{accounts.id}/credits",
"accounts.reversals": "/accounts/{accounts.id}/reversals",
"accounts.customer": "/customers/{accounts.customer}",
"accounts.debits": "/accounts/{accounts.id}/debits",
"accounts.settlements": "/accounts/{accounts.id}/settlements",
"accounts.refunds": "/accounts/{accounts.id}/refunds"
} |
this is a little more tricky than it first appears. i'm not sure that we currently do any filtering by null or not null so we need to figure out how that would work. we also need to resolve how to deal with the fact that a credit can be associated to more than one settlement.
i think we need some more thought around how this works! @balanced/spec-ialz any thoughts about how to filter based off of relationships? a quicker way may be to create a link |
when? |
create a settlement, settlement fails, create a subsequent settlement to retry. |
I see. A credit can only be associated to one successful settlement. I think that's what @kyungmin is trying to solve. |
one |
Yes. I like the idea of having the |
@balanced/spec-ialz Any other thoughts on this? |
My response to @remear's comment from chat:
Agreed that this can wait until we have more traction on this feature. However, for the record, this would allow us to implement the following mocks, providing an easier way to view outstanding credits: |
If an outstanding credit or reversal is defined as one that has not been settled or one that failed to settle, this should already be achievable by displaying as outstanding any credits and reversals without a settlement link. Is pending considered outstanding? |
By outstanding, I meant unsettled. Users would need to know which credits made to payable accounts need to be settled. |
If there's a settlement link the credit is either settled or being settled and does not need to be settled. Would you agree? |
Yes. We are currently loading all credits for the account and filtering out settled ones on the Account page, but it's too expensive to do this for the entire marketplace. |
The accounts endpoint currently returns links to all credits and settlements for the account. It makes it difficult to filter out only unsettled credits from the credits list.
The text was updated successfully, but these errors were encountered: