Change collection mode for a transaction
Change collection mode to determine whether Paddle tries to collect payment for a transaction automatically using a saved payment method or sends an invoice that must be paid manually.
All purchases are transactions. They hold all the information about a customer purchase, including customer details, items, calculated tax and localized pricing, and payments.
Change collection mode for a transaction to determine whether Paddle tries to collect automatically using a saved payment method, or sends an invoice to a customer that they must pay manually.
How it works
You can create two kinds of transactions:
Automatically-collected transactions
Paddle collects using a saved payment method. If no payment method is saved, customers must enter one using Paddle Checkout. Typically part of a self-service workflow.
Manually-collected transactions
Paddle collects by sending an invoice that the customer must pay by bank transfer or using Paddle Checkout. Typically part of a sales-assisted invoicing workflow.
Before a transaction is billed, you can switch between automatic and manual collection modes. This means that you can do things like:
- Move higher-dollar deals to manually collected, sending invoices to customers that they can pay by bank transfer.
- Automatically collect for smaller amounts for sales-assisted customers, like changes to seats or addons mid-billing cycle.
You can change a transaction collection mode for draft
and ready
transactions.
Subscriptions also have a
collection_mode
field. Change the collection mode against a subscription to determine the collection mode for transactions created from that subscription.
Before you begin
To change collection mode for a transaction, you'll need to get an existing transaction that's draft
or ready
.
You can't change collection mode for a transaction that's billed
or completed
:
- Billed transactions have been marked as finalized, so they're considered financial records. Cancel a billed transaction to say that it's no longer needed, then create another.
- Completed transactions have payments against them, so there's no need to change their collection mode.
If you've not yet created a transaction, you can set a collection mode when creating a transaction. To learn more, see
Change from automatic to manual
Change an automatically-collected transaction to a manually-collected transaction when you want to send an invoice to customers. Collection for payment happens manually, which means customers must pay by bank transfer or Paddle Checkout. Paddle doesn't automatically collect for the balance.
You'll need to mark the transaction as billed
to issue your invoice. Paddle assigns an invoice number and sends an invoice document.
Send a PATCH request to the /transactions/{transaction_id}
endpoint.
Paddle ID of the transaction entity to work with.
API
List transactions by making a GET request to the /transactions
endpoint. Work your way through the results to find the transaction that you'd like to work with.
Paddle dashboard
Head to Paddle > Transactions, then use the search box to find the transaction you want to cancel. Copy the ID from the transaction page.
Manually-collected transactions require the billing_details
object, which is where you can set information like payment terms and purchase order number.
Details for invoicing. Required if collection_mode
is manual
.
Whether the related transaction may be paid using a Paddle Checkout.
Customer purchase order number. Appears on invoice documents.
Notes or other information to include on this invoice. Appears on invoice documents.
How long a customer has to pay this invoice once issued.
Request
This example changes the collection mode for an automatically-billed transaction to manual
.
In your request, set billing_details
to manual and include the billing_details
object. Billing details must include payment_terms
, but you may omit other fields.
The billing_details.enable_checkout
field is omitted, which means that this transaction can't be paid using Paddle Checkout. Only bank transfers are accepted.
123456789101{
2 "collection_mode": "manual",
3 "billing_details": {
4 "payment_terms": {
5 "interval": "day",
6 "frequency": 30
7 },
8 "purchase_order_number": "PO-1030"
9 }
10}
Response
If successful, Paddle responds with a copy of the updated transaction entity.
12345678910111213141516171819201{
2 "data": {
3 "id": "txn_01h0j589qt1nee24210teqtz57",
4 "status": "ready",
5 "customer_id": "ctm_01gw1xk43eqy2rrf0cs93zvm6t",
6 "address_id": "add_01gwprnm56rxj8sbt0cb52972j",
7 "business_id": null,
8 "custom_data": null,
9 "origin": "api",
10 "collection_mode": "manual",
11 "subscription_id": null,
12 "invoice_id": "inv_01h140bf2esng25zn13h5k4phe",
13 "invoice_number": null,
14 "billing_details": {
15 "enable_checkout": false,
16 "payment_terms": {
17 "interval": "day",
18 "frequency": 30
19 },
20 "purchase_order_number": "PO-1030",
Request
This example changes the collection mode for an automatically-billed transaction to manual
.
In your request, set billing_details
to manual and include
the billing_details
object. Billing details must include payment_terms
, but you may omit other fields.
billing_details.enable_checkout
is included and set to true
, which means that you can pass this transaction to a checkout to collect for it.
12345678910111{
2 "collection_mode": "manual",
3 "billing_details": {
4 "enable_checkout": true,
5 "payment_terms": {
6 "interval": "day",
7 "frequency": 30
8 },
9 "purchase_order_number": "PO-1030"
10 }
11}
Response
If successful, Paddle responds with a copy of the updated transaction entity.
checkout.url
is included in the response, which you can send to customers to open a checkout to capture payment details for this transaction.
You can also pass a transaction ID to a checkout using Paddle.js to collect for it.
12345678910111213141516171819201{
2 "data": {
3 "id": "txn_01h0j589qt1nee24210teqtz57",
4 "status": "ready",
5 "customer_id": "ctm_01gw1xk43eqy2rrf0cs93zvm6t",
6 "address_id": "add_01gwprnm56rxj8sbt0cb52972j",
7 "business_id": null,
8 "custom_data": null,
9 "origin": "api",
10 "collection_mode": "manual",
11 "subscription_id": null,
12 "invoice_id": "inv_01h14c70rkdej2ce47evkphbya",
13 "invoice_number": null,
14 "billing_details": {
15 "enable_checkout": true,
16 "payment_terms": {
17 "interval": "day",
18 "frequency": 30
19 },
20 "purchase_order_number": "PO-1030",
Change from manual to automatic
Change a manually-collected transaction to an automatically-collected transaction when you want to collect using a saved payment method. If no payment method is saved, customers must enter one using Paddle Checkout.
Send a PATCH request to the /transactions/{transaction_id}
endpoint.
Paddle ID of the transaction entity to work with.
Automatically-collected transactions don't need the billing_details
object. Paddle automatically nulls
this when you change collection mode to automatic.
Request
This example changes the collection mode for a manually-billed transaction to automatic
.
1231{
2 "collection_mode": "automatic"
3}
Response
If successful, Paddle responds with a copy of the updated transaction entity.
billing_details
is automatically set to null
.
12345678910111213141516171819201{
2 "data": {
3 "id": "txn_01h0j589qt1nee24210teqtz57",
4 "status": "ready",
5 "customer_id": "ctm_01gw1xk43eqy2rrf0cs93zvm6t",
6 "address_id": "add_01gwprnm56rxj8sbt0cb52972j",
7 "business_id": null,
8 "custom_data": null,
9 "origin": "api",
10 "collection_mode": "automatic",
11 "subscription_id": null,
12 "invoice_id": "inv_01h14cfndr1pbkgbvc3bgz2gnn",
13 "invoice_number": null,
14 "billing_details": null,
15 "billing_period": {
16 "starts_at": "2023-03-29T12:45:08.730136Z",
17 "ends_at": "2024-03-29T12:45:08.730136Z"
18 },
19 "currency_code": "USD",
20 "discount_id": null,
Events
transaction.updated | Occurs when the collection mode for a transaction is updated. |