Payments
The settlement attempts on an invoice: retry, card swap, due-date change, refund and re-sending the billing e-mail.
| Command | HTTP | Description |
|---|---|---|
payments list | GET /v1/payments | List payments |
payments create | POST /v1/payments | Process a payment |
payments get | GET /v1/payments/{id} | Get a payment |
payments delete | DELETE /v1/payments/{id} | Delete a payment |
payments cancel | POST /v1/payments/{id}/cancel | Cancel a payment |
payments change-card | POST /v1/payments/{id}/change-card | Swap the payment's card |
payments change-due-date | POST /v1/payments/{id}/change-due-date | Change the billet's due date |
payments refund | POST /v1/payments/{id}/refund | Refund a payment |
payments retry | POST /v1/payments/{id}/retry | Retry a payment |
payments send-email | POST /v1/payments/{id}/send-email | Send the billet by e-mail |
payments sync | POST /v1/payments/{id}/sync | Sync a payment with the gateway |
payments bulk-update-invoice create | POST /v1/payments/bulk-update-invoice | Reassign payments to another invoice |
Examples
--params carries query and path parameters (id, page, filters); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.
# List payments
kobana billing payments list \
--fields "id,public_id,external_id,invoice_id,billing_account_id"
# Get a payment
kobana billing payments get --params '{"id": "PAYMENT_ID"}'
# Process a payment
kobana billing payments create --json '{"invoiceId": "INVOICEID"}'
# Cancel a payment
kobana billing payments cancel \
--params '{"id": "PAYMENT_ID"}' \
--json '{"reason": "REASON", "cancel_on_gateway": true}'
# Delete a payment
kobana billing payments delete --params '{"id": "PAYMENT_ID"}' --dry-run
Next steps
- Payment methods
- Schema introspection — every parameter this resource accepts.