Airwallex logo
Airwallex logoAirwallex logo

Funds Split Reversals

Copy for LLMView as Markdown

The FundsSplitReversal API helps you reverse an existing FundsSplit made to a connected account, either entirely or partially.

Data Retention Policy: You can query and operate FundsSplitReversal resources for a maximum of 2 years since creation.

Endpoints
POST /api/v1/pa/funds_split_reversals/create
GET /api/v1/pa/funds_split_reversals/{id}
GET /api/v1/pa/funds_split_reversals

Create a FundsSplitReversal

POST /api/v1/pa/funds_split_reversals/create

Initiate a FundsSplitReversal to take money back from a connected account. You must specify a FundsSplit as the source of reversal.

When reversing a FundsSplit, You can optionally reverse part of it. You can do so as many times as you wish until the entire FundsSplit has been reversed. Once entirely reversed, a FundsSplit can’t be reversed again. This method will return an error when called on an already-reversed FundsSplit, or when trying to reverse more money than is left on a FundsSplit.

Request body
amountrequiredstring

Amount of this reversal. You can only reverse up to the unreversed amount remaining of the FundsSplit. Please refer to supported currencies for supported minor units.

funds_split_idrequiredstring

Unique identifier of FundsSplit on which the FundsSplitReversal is created

request_idrequiredstring

Unique request identifier specified by the merchant. Maximum length is 64.

metadataobject

A set of key-value pairs that you can attach to the FundsSplitReversal. You can specify up to 50 keys with key names up to 50 characters long and values up to 500 characters long.

Response body - 201 Created
amountnumber

Amount of this reversal. You can only reverse up to the unreversed amount remaining of the FundsSplit

created_atstring

Instant when this split reversal is created at

funds_split_idstring

FundsSplit unique identifier

idstring

Unique identifier for the FundsSplitReversal

metadataobject

A set of key-value pairs that you can attach to the Funds Split Reversal. You can specify up to 50 keys with key names up to 50 characters long and values up to 500 characters long.

request_idstring

Unique request identifier specified by the merchant in the last operation

statusstring

Status of this reversal, can be CREATED, RELEASED, SETTLED etc

Errors
Error statusDescription
400

Bad Request. Possible error codes: validation_error, duplicate_request

401

Unauthorized. Possible error codes: unauthorized

403

Forbidden

404

Not Found. Possible error codes: not_found(invalid url)

500

Server Error. Possible error codes: internal_error

POST /api/v1/pa/funds_split_reversals/create
$curl --request POST \
> --url 'https://api-demo.airwallex.com/api/v1/pa/funds_split_reversals/create' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "request_id": "1b1fa33d-a733-4884-8d45-bba8076c447d",
> "funds_split_id": "spt_hkpdkhwr5h1s5nct0l",
> "amount": "10",
> "metadata": {
> "foo": "bar"
> }
>}'
Response (201 Created)
1{
2 "id": "rev_hkpdkhwr5h1375nct0l",
3 "request_id": "1b1fa33d-a733-4884-8d45-bba8076c447d",
4 "funds_split_id": "spt_hkpdkhwr5h1s5nct0l",
5 "amount": "10",
6 "status": "CREATED",
7 "metadata": {
8 "foo": "bar"
9 },
10 "created_at": "2024-04-09T02:46:19.320490400Z"
11}
Was this section helpful?

Retrieve a FundsSplitReversal

GET /api/v1/pa/funds_split_reversals/{id}

Retrieve a FundsSplitReversal by unique identifier

Parameters
idrequiredstring

FundsSplitReversal Id

Response body - 200 OK
amountnumber

Amount of this reversal. You can only reverse up to the unreversed amount remaining of the FundsSplit

created_atstring

Instant when this split reversal is created at

funds_split_idstring

FundsSplit unique identifier

idstring

Unique identifier for the FundsSplitReversal

metadataobject

A set of key-value pairs that you can attach to the Funds Split Reversal. You can specify up to 50 keys with key names up to 50 characters long and values up to 500 characters long.

request_idstring

Unique request identifier specified by the merchant in the last operation

statusstring

Status of this reversal, can be CREATED, RELEASED, SETTLED etc

Errors
Error statusDescription
400

Bad Request. Possible error codes: validation_error

401

Unauthorized. Possible error codes: unauthorized

403

Forbidden

404

Not Found. Possible error codes: not_found(invalid url), resource_not_found

500

Server Error. Possible error codes: internal_error

GET /api/v1/pa/funds_split_reversals/{id}
$curl --request GET \
> --url 'https://api-demo.airwallex.com/api/v1/pa/funds_split_reversals/rev_hkpdkhwr5h1375nct0l' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "id": "rev_hkpdkhwr5h1375nct0l",
3 "request_id": "ff232fa1-3ebe-4b59-8d96-ea7b6499ef43",
4 "funds_split_id": "spt_hkpdkhwr5h1s5nct0l",
5 "amount": 10,
6 "status": "RELEASED",
7 "metadata": {
8 "foo": "bar"
9 },
10 "created_at": "2024-04-09T02:46:19.320490400Z"
11}
Was this section helpful?

Get list of FundsSplitReversals

GET /api/v1/pa/funds_split_reversals

Retrieve list of FundsSplitReversals

Parameters
funds_split_idrequiredstring

Unique identifier of which funds_split this funds_split_reversal would be created from.

page_numinteger

Page number starting from 0

page_sizeinteger

Number of Fund Split Reversals to be listed per page. Default value is 10. Maximum is 1000. The value greater than the maximum will be capped to the maximum.

Response body - 200 OK
has_moreboolean

A flag which identifies whether there are more results.

itemsarray

List items

items.amountnumber

Amount of this reversal. You can only reverse up to the unreversed amount remaining of the FundsSplit

items.created_atstring

Instant when this split reversal is created at

items.funds_split_idstring

FundsSplit unique identifier

items.idstring

Unique identifier for the FundsSplitReversal

items.metadataobject

A set of key-value pairs that you can attach to the Funds Split Reversal. You can specify up to 50 keys with key names up to 50 characters long and values up to 500 characters long.

items.request_idstring

Unique request identifier specified by the merchant in the last operation

items.statusstring

Status of this reversal, can be CREATED, RELEASED, SETTLED etc

Errors
Error statusDescription
400

Bad Request. Possible error codes: validation_error

401

Unauthorized. Possible error codes: unauthorized

403

Forbidden

404

Not Found. Possible error codes: not_found(invalid url)

500

Server Error. Possible error codes: internal_error

GET /api/v1/pa/funds_split_reversals
$curl --request GET \
> --url 'https://api-demo.airwallex.com/api/v1/pa/funds_split_reversals' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "has_more": false,
3 "items": [
4 {
5 "id": "rev_hkpdkhwr5h1375nct0l",
6 "request_id": "ff232fa1-3ebe-4b59-8d96-ea7b6499ef43",
7 "funds_split_id": "spt_hkpdkhwr5h1s5nct0l",
8 "amount": 10,
9 "status": "CREATED",
10 "metadata": {
11 "foo": "bar"
12 },
13 "created_at": "2024-04-09T02:46:19.320490400Z"
14 }
15 ]
16}
Was this section helpful?