Airwallex logo
Airwallex logoAirwallex logo

Direct Debits

Copy for LLMView as Markdown

Direct Debits are transactions that third party made to pull funds out of your Airwallex account.

Endpoints
GET /api/v1/direct_debits
GET /api/v1/direct_debits/{transaction_id}
POST /api/v1/direct_debits/{transaction_id}/cancel

Get list of direct debits

GET /api/v1/direct_debits

Get list of direct debits by specifying the start and end date/time of creation. If neither from_created_date nor to_created_date are provided, direct debits within 30 days of today will be returned. If only to_created_date is provided, direct debits within 30 days of to_created_date will be returned.

Parameters
from_created_datestring

The start date of created_at in ISO8601 format (inclusive)

page_numinteger

Page number, starts from 0.

page_sizeinteger

Number of results per page, defaultValue 100

to_created_datestring

The end date of created_at in ISO8601 format (inclusive)

Response body - 200 OK
has_moreboolean

A flag which identifies whether there are more results.

itemsarray

Paged results.

items.amountnumber

The amount of this direct debit

items.created_atstring

The timestamp this direct debit was created

items.currencystring

The currency (3-letter ISO-4217 code) of this direct debit

items.global_account_idstring

The global account id of this direct debit

items.transaction_idstring

A unique id of this direct debit

items.debtor_namestring

The debtor's name of this direct debit

items.mandate_idstring

The unique identifier of the related mandate

items.statement_refstring

The statement reference of this direct debit

items.statusstring

The status of direct debit transaction

NEW, IN_REVIEW, PENDING, SETTLED, REJECTED, RETURNED

Errors
Error statusDescription
307

Temporary Redirect

400

Possible errors: field_required, bad_request, invalid_argument

401

Possible errors: credentials_invalid, credentials_expired

429

Too many requests

500

Service unavailable

GET /api/v1/direct_debits
$curl --request GET \
> --url 'https://api-demo.airwallex.com/api/v1/direct_debits' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "has_more": false,
3 "items": [
4 {
5 "amount": 12794.27,
6 "currency": "USD",
7 "transaction_id": "da46a141-85d3-4ed7-8155-5ab8f7cc34f2",
8 "global_account_id": "e412ea03-b6fa-4198-90ef-aaee64c4139c",
9 "status": "SETTLED",
10 "debtor_name": "ABC",
11 "statement_ref": "5487287788",
12 "mandate_id": "11987bad-bb6d-4e30-ba49-d19826c3e803"
13 }
14 ]
15}
Was this section helpful?

Get direct debit by ID

GET /api/v1/direct_debits/{transaction_id}

Get direct debit by transaction id.

Parameters
transaction_idrequiredstring

Unique Identifier for direct debit transaction

Response body - 200 OK
amountnumber

The amount of this direct debit

created_atstring

The timestamp this direct debit was created

currencystring

The currency (3-letter ISO-4217 code) of this direct debit

debtor_namestring

The debtor's name of this direct debit

global_account_idstring

The global account id of this direct debit

mandate_idstring

The unique identifier of the related mandate

statement_refstring

The statement reference of this direct debit

statusstring

The status of direct debit transaction

NEW, IN_REVIEW, PENDING, SETTLED, REJECTED, RETURNED

transaction_idstring

A unique id of this direct debit

Errors
Error statusDescription
307

Temporary Redirect

400

Possible errors: field_required, bad_request, invalid_argument

401

Possible errors: credentials_invalid, credentials_expired

429

Too many requests

500

Service unavailable

GET /api/v1/direct_debits/{transaction_id}
$curl --request GET \
> --url 'https://api-demo.airwallex.com/api/v1/direct_debits/transaction_id' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "amount": 12794.27,
3 "created_at": "<date-time>",
4 "currency": "USD",
5 "transaction_id": "da46a141-85d3-4ed7-8155-5ab8f7cc34f2",
6 "global_account_id": "e412ea03-b6fa-4198-90ef-aaee64c4139c",
7 "status": "SETTLED",
8 "debtor_name": "ABC",
9 "statement_ref": "5487287788",
10 "mandate_id": "11987bad-bb6d-4e30-ba49-d19826c3e803"
11}
Was this section helpful?

Cancel a direct debit by ID

POST /api/v1/direct_debits/{transaction_id}/cancel

Cancel a direct debit by transaction id.

Parameters
transaction_idrequiredstring

The unique identifier for direct debit transaction

Response body - 200 OK

OK

Errors
Error statusDescription
307

Temporary Redirect

400

Possible errors: resource_not_found, invalid_operation, invalid_state_for_operation

401

Possible errors: credentials_invalid, credentials_expired

429

Too many requests

500

Service unavailable

POST /api/v1/direct_debits/{transaction_id}/cancel
$curl --request POST \
> --url 'https://api-demo.airwallex.com/api/v1/direct_debits/transaction_id/cancel' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Was this section helpful?