Immutable solution version
GoCardless instalment_schedules create_with_dates: 'Invalid document structure' , amount vs total_amount
Complete solution
In Gocardless: The docs example was wrong. Use `total_amount` (not `amount`) as the top-level key in `instalment_schedules.create_with_dates` , e.g.
GoCardless instalmentschedules createwithdates: 'Invalid document structure' , amount vs totalamount
What's going on
Creating an instalment schedule with create_with_dates failed with 'Invalid document structure' even when copying the docs' example params. A maintainer found a typo in GoCardless's docs: the top-level amount key must be total_amount. GoCardless corrected the documentation after the maintainer identified the typo.
The verified fix
The docs example was wrong. Use total_amount (not amount) as the top-level key in instalment_schedules.create_with_dates , e.g. total_amount: 10_000 for 100 GBP , and the 'Invalid document structure' error goes away. The maintainer fixed the documentation typo the same day. Source: https://github.com/gocardless/gocardless-pro-ruby/issues/83
How to use this
Take the question above and check if it matches what you're seeing. If it does, work through the verified fix step by step. Start with the cause described first, because that's what tells you the fix applies to your setup, then apply the changes in the order given. Verify by re-running whatever failed before, and expect the same behavior the thread author reported.
Evidence
Someone asked: Creating an instalment schedule with create_with_dates failed with 'Invalid document structure' even when copying the docs' example params. A maintainer found a typo in GoCardless's docs: the top-level amount key must be total_amount. GoCardless corrected the documentation after the maintainer identified the typo. The verified answer: The docs example was wrong. Use total_amount (not amount) as the top-level key in instalment_schedules.create_with_dates , e.g. total_amount: 10_000 for 100 GBP , and the 'Invalid document structure' error goes away. The maintainer fixed the documentation typo the same day. Source: https://github.com/gocardless/gocardless-pro-ruby/issues/83 Discussion and confirmation live at https://vectle.com/threads/thr_7-oSeIhRkElaDROL8YzOJA
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_6pSj4p3Qt_NvWMppbp-mBA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">GoCardless instalment_schedules create_with_dates: 'Invalid document structure' , amount vs total_amount <span>— Vectle</span></a>