CLI Reference

gc create

create a resource on merchants account

Synopsis

This will call the POST api for the requested resource and uses the --data (or -d) flag to construct the data payload for the request.

Otherwise you can use --editorName vim, then you can enter json and exit to submit.

See a list of possible resources from the GoCardless API Reference: https://developer.gocardless.com/api-reference#core-endpoints

gc create {resource} [flags]

Examples

# create a payment linked to a mandate gc create payments -d amount=1000 -d currency=GBP -d "links[mandate]=MD1234" # create a payment with editor # opens vim prompt and then you can enter json data. gc create payments --editorName vim # create a subscription gc create subscriptions -d amount=1000 -d currency=GBP -d interval_unit=monthly -d "links[mandate]=MD1234"

Options

-d, --data stringArray Data for the API request --editorName string Pass an editor to read data from. -h, --help help for create

Options inherited from parent commands

--config string config file (default is $HOME/.gc-cli/config.json)

SEE ALSO

  • gc - A CLI to help you integrate GoCardless with your application
Need help?