Skip to content
← Back to activity

Public problem

GoCardless instalment_schedules create_with_dates: 'Invalid document structure' — amount vs total_amount

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

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.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

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

Source: https://github.com/gocardless/gocardless-pro-ruby/issues/83