Skip to content

How payments work

A booking only goes live when Transdirect can charge someone for it. There are three ways that happens, and choosing between them is an explicit part of your integration — not something that gets switched on for you.

RouteHow you select itWhen to use it
Saved payment methodpayment_method: "nab_<id>" or "paypal_<id>"Most API integrations
Credit accountpayment_method: "credit"Accounts with an approved Transdirect credit account
Demopayment_method: "demo"Integration testing — no charge, never shipped

The same payment_method values work when creating and when confirming a booking.

Charge a card or PayPal billing agreement saved on your account. Retrieve the identifier from GET /api/members/payment-methods, then pass it when creating or confirming the booking.

You cannot pass raw card details to the API. Cards are added through the members area under Billing → Payment Methods, and the API only ever references the saved record by id.

If you have an approved Transdirect credit account with available credit, the cost is billed to it and settled on invoice. Select it with payment_method: "credit".

Passing payment_method: "demo" produces a full end-to-end booking that is never charged and never sent to a courier. See demo mode.

Demo deliberately skips the payment checks, so a demo booking succeeding tells you nothing about whether a live one will. Test the live path explicitly before you go live.

This is the sequence that trips people up. Demo bookings work with no payment selection at all, so an integration can be fully tested and still fail on its first live booking.

  1. Call GET /api/members/payment-methods and check you get a non-empty array. If it is empty, add a card in the members area under Billing → Payment Methods first.
  2. Take the id from the response, e.g. nab_123.
  3. Pass it on your live booking — as payment_method at create, or as payment at confirm.
Terminal window
# 1. Find out what you can charge
curl -H "Api-key: YOUR_API_KEY" \
https://www.transdirect.com.au/api/members/payment-methods
# 2. Create and confirm a live booking against that method
curl -X POST \
-H "Api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"payment_method": "nab_123",
"courier": "allied",
"pickup_date": "2025-08-18",
"items": [ { "weight": "5", "height": "25", "width": "35", "length": "40", "quantity": 1, "description": "carton" } ],
"sender": { "postcode": "2000", "suburb": "SYDNEY", "type": "business", "country": "AU" },
"receiver": { "postcode": "3000", "suburb": "MELBOURNE", "type": "business", "country": "AU" }
}' \
https://www.transdirect.com.au/api/bookings/v4

Use the same payment_method string on both. It takes the id exactly as GET /api/members/payment-methods returns it — no conversion, no reshaping.

TokenMeans
nab_<id>Charge that saved card
paypal_<id>Charge that saved PayPal agreement
creditBill your credit account
demoDemo booking — no charge, never shipped

At create — create and confirm in one call. Best when you already know the courier and pickup date.

{ "payment_method": "nab_123", "courier": "allied", "pickup_date": "2025-08-18" }

At confirm — create a quote first, show the rates to your user, then pay when they pick a courier.

{ "courier": "allied", "pickup-date": "2025-08-18", "payment_method": "nab_123" }

An unrecognised token is rejected with 400. It is never silently ignored, and never quietly falls back to your credit account.

There is no shorthand for “use my default method” — pass an explicit id.

Confirm additionally accepts a structured form. It is equivalent to the string above and remains supported, but payment_method is the recommended way:

{
"courier": "allied",
"pickup-date": "2025-08-18",
"payment": { "method": "card", "card_id": 123 }
}
payment.methodAdditional fieldEquivalent payment_method
cardcard_id (required)nab_<id>
paypalagreement_id (required)paypal_<id>
creditcredit
demodemo

You can send both, as long as they agree — payment_method: "nab_123" alongside payment: { "method": "card", "card_id": 123 } is fine. If they name different payment methods the request is rejected with 400, rather than one silently winning and charging something you didn’t choose.

Status codeMeaningWhat to do
400Payment method not found or unavailable — the id isn’t an active method on your accountRe-read the id from GET /api/members/payment-methods; don’t hard-code or copy it from the billing screens
402The method was declined by the payment provider. Includes a payment_error object with code, user_message, method, log_idSurface user_message and let the user pick another method
403NO_PAYMENT_METHOD — no credit account and no payment method supplied. Or API_ACCESS_DISABLED — access disabled on the accountFor NO_PAYMENT_METHOD, supply a payment_method. For API_ACCESS_DISABLED, contact support

A 403 NO_PAYMENT_METHOD almost always means the request omitted a payment selection rather than that anything is wrong with the account. Check what you sent before checking your billing settings.