Payments, invoices and corrections

Prepare a paid purchase in the API and send the owner to Motano to confirm it.

On this page

Prepare checkout

Paid publication, renewal and promotion require REST payments to be enabled separately. The API calculates payment.amountCents and returns paymentPath. The owner opens the path in their signed-in account, confirms the terms and pays through Stripe. New purchases return PAYMENTS_DISABLED when the feature is off.

Checkout status and history

Keep payment.id and read the recorded checkout status. When pending, checkoutState distinguishes awaiting_confirmation, opening and awaiting_payment. History includes paid or refunded payments. Amounts use PLN minor units.

curl --fail-with-body --request GET \
  --url "${MOTANO_API_ORIGIN}/api/v1/payments/${MOTANO_PAYMENT_ID}/checkout" \
  --header "Authorization: Bearer ${MOTANO_API_KEY}"

Documents and retries

The owner’s invoices and corrections are available in HTML or XML. Billing details come from the most recent paid purchase with saved details. Retrying issuance requires invoices:retry and uses the billing details saved at purchase. Check the response for accepted, failed or sending.