Skip to main content

Payments

The settlement attempts on an invoice: retry, card swap, due-date change, refund and re-sending the billing e-mail.

CommandHTTPDescription
payments listGET /v1/paymentsList payments
payments createPOST /v1/paymentsProcess a payment
payments getGET /v1/payments/{id}Get a payment
payments deleteDELETE /v1/payments/{id}Delete a payment
payments cancelPOST /v1/payments/{id}/cancelCancel a payment
payments change-cardPOST /v1/payments/{id}/change-cardSwap the payment's card
payments change-due-datePOST /v1/payments/{id}/change-due-dateChange the billet's due date
payments refundPOST /v1/payments/{id}/refundRefund a payment
payments retryPOST /v1/payments/{id}/retryRetry a payment
payments send-emailPOST /v1/payments/{id}/send-emailSend the billet by e-mail
payments syncPOST /v1/payments/{id}/syncSync a payment with the gateway
payments bulk-update-invoice createPOST /v1/payments/bulk-update-invoiceReassign 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​