Create a transaction
POST {{baseUrl}}/transactions
Creates a new transaction.
Transactions are typically created with the status of draft
or ready
initially:
- Draft transactions have
items
against them, but don't have all of the required fields for billing. Paddle creates draft transactions automatically when a checkout is opened. - Paddle automatically marks transactions as
ready
when all of the required fields are present for billing. This includescustomer_id
andaddress_id
for automatically-collected transactions, andbilling_details
for manually-collected transactions.
The collection_mode
against a transaction determines how Paddle tries to collect for payment:
- Manually-collected transactions are for sales-assisted billing. Paddle sends an invoice to your customer when a transaction is
billed
. Payment is often by wire transfer. - Automatically-collected transactions are for self-serve checkouts. You may pass the transaction to a checkout or use the returned
checkout.url
to collect for payment.
When a manually-collected transaction is marked as billed
or an automatically-collected transaction is completed
, Paddle automatically creates a related subscription for the items on the transaction.
If successful, your response includes a copy of the new transaction entity.
Use the include
parameter to include related entities in the response.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
include | string | Include related entities in the response. Use a comma-separated list to specify multiple entities. |
Request Body
{"items"=>[{"price_id"=>"<string>", "quantity"=>"<integer>"}], "status"=>"<string>", "customer_id"=>"<string>", "address_id"=>"<string>", "business_id"=>"<string>", "custom_data"=>"<object>", "currency_code"=>"<string>", "collection_mode"=>"automatic", "discount_id"=>"<string>", "billing_details"=>{"payment_terms"=>{"interval"=>"<string>", "frequency"=>"<integer>"}, "enable_checkout"=>false, "purchase_order_number"=>"<string>", "additional_information"=>"<string,null>"}, "billing_period"=>{"starts_at"=>"<dateTime>", "ends_at"=>"<dateTime>"}, "checkout"=>{"url"=>"<string,null>"}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |