Airwallex logo

Loan Transactions

Copy for LLMView as Markdown

The Loan Transaction is a financial transaction associated with the loan.

Endpoints
POST /partner-api/v1/lending/loan_transactions/create
GET /partner-api/v1/lending/loan_transactions/{id}
GET /partner-api/v1/lending/loan_transactions

Create a Loan Transaction

POST /partner-api/v1/lending/loan_transactions/create

Creates a Loan Transaction.

Request body
loan_idrequiredstring

The unique identifier of the associated loan.

payment_amountrequirednumber

The payment amount to be sent to the beneficiary before fees. The payment currency is the same with loan currency.

referencerequiredstring

A user specified reference that will be displayed to the beneficiary on the payment transaction with their bank.

  • 1-140 characters long
  • Should not contain emojis
request_idrequiredstring

A unique request identifier specified by you for idempotency. Up to 50 characters.

sourceCurrencyrequiredobject

The currency that the payer uses to fund the payment (3-letter ISO-4217 code). In most cases it should be the same with loan currency.

typerequiredstring

The type of the transaction. Only REPAYMENT is supported at this moment.

REPAYMENT
Response body - 200 OK
created_atstring

The date when the transaction is created.

idstring

The unique identifier of the loan.

loan_idstring

The unique identifier of the associated loan.

payment_amountnumber

Payment amount in payment_currency.

payment_currencyobject

Payment currency, i.e. the currency that the beneficiary receives (3-letter ISO-4217 code).

posted_datestring

The date when the transaction is posted.

referencestring

A user specified reference that will be displayed to the beneficiary on the payment transaction with their bank.

  • 1-140 characters long
  • Should not contain emojis
request_idstring

A unique request identifier specified by you for idempotency. Up to 50 characters.

source_amountnumber

Source amount in source_currency.

source_currencyobject

The currency that the payer uses to fund the payment (3-letter ISO-4217 code). In most cases it should be the same with loan currency.

statusstring

The status of the transaction.

PENDING

The transaction is pending to be executed.

COMPLETED

The transaction is completed successfully.

FAILED

The transaction failed.

transaction_datestring

The date when the transaction completed.

typestring

The type of the transaction. Only REPAYMENT is supported at this moment.

REPAYMENT
updated_atstring

The date when the transaction is updated.

POST /partner-api/v1/lending/loan_transactions/create
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/partner-api/v1/lending/loan_transactions/create' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "loan_id": "e1f3c6e3-ba66-4400-83ec-e81553647806",
> "payment_amount": 1000,
> "reference": "repayment-2021-01-01",
> "request_id": "ffb277f7-c10d-4e46-ab1e-25acd90a79fc",
> "sourceCurrency": "USD",
> "type": "REPAYMENT"
>}'
Response (200 OK)
1{
2 "created_at": "<date-time>",
3 "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
4 "loan_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
5 "payment_amount": 1000,
6 "payment_currency": "USD",
7 "posted_date": "<date-time>",
8 "reference": "repayment-2021-01-01",
9 "request_id": "e26fe780-ac29-4130-b650-edb1cc1bd4a4",
10 "source_amount": 1000,
11 "source_currency": "USD",
12 "status": "COMPLETED",
13 "transaction_date": "<date-time>",
14 "type": "REPAYMENT",
15 "updated_at": "<date-time>"
16}
Was this section helpful?

Retrieve a Loan Transaction

GET /partner-api/v1/lending/loan_transactions/{id}

Get the details of a Loan Transaction by unique identifier.

Path parameters
idrequiredstring

The unique identifier of the loan transaction.

Response body - 200 OK
created_atstring

The date when the transaction is created.

idstring

The unique identifier of the loan.

loan_idstring

The unique identifier of the associated loan.

payment_amountnumber

Payment amount in payment_currency.

payment_currencyobject

Payment currency, i.e. the currency that the beneficiary receives (3-letter ISO-4217 code).

posted_datestring

The date when the transaction is posted.

referencestring

A user specified reference that will be displayed to the beneficiary on the payment transaction with their bank.

  • 1-140 characters long
  • Should not contain emojis
request_idstring

A unique request identifier specified by you for idempotency. Up to 50 characters.

source_amountnumber

Source amount in source_currency.

source_currencyobject

The currency that the payer uses to fund the payment (3-letter ISO-4217 code). In most cases it should be the same with loan currency.

statusstring

The status of the transaction.

PENDING

The transaction is pending to be executed.

COMPLETED

The transaction is completed successfully.

FAILED

The transaction failed.

transaction_datestring

The date when the transaction completed.

typestring

The type of the transaction. Only REPAYMENT is supported at this moment.

REPAYMENT
updated_atstring

The date when the transaction is updated.

GET /partner-api/v1/lending/loan_transactions/{id}
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/partner-api/v1/lending/loan_transactions/loan_transaction_id' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "created_at": "<date-time>",
3 "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
4 "loan_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
5 "payment_amount": 1000,
6 "payment_currency": "USD",
7 "posted_date": "<date-time>",
8 "reference": "repayment-2021-01-01",
9 "request_id": "e26fe780-ac29-4130-b650-edb1cc1bd4a4",
10 "source_amount": 1000,
11 "source_currency": "USD",
12 "status": "COMPLETED",
13 "transaction_date": "<date-time>",
14 "type": "REPAYMENT",
15 "updated_at": "<date-time>"
16}
Was this section helpful?

List all Loan Transactions

GET /partner-api/v1/lending/loan_transactions

Get a list of Loans based on the query parameters.

Query parameters
from_created_atstring

The start time of created_at in ISO8601 format.

loan_idstring

The unique identifier of the associated loan.

page_numinteger

The number of the page. Starts from 0. Defaults to 0.

page_sizeinteger

The number of items returned per page. Defaults to 20.

statusstring

The status of the transaction.

PENDING

The transaction is pending to be executed.

COMPLETED

The transaction is completed successfully.

FAILED

The transaction failed.

to_created_atstring

The end time of created_at in ISO8601 format.

typestring

The type of the transaction. Only REPAYMENT is supported at this moment.

REPAYMENT
Response body - 200 OK
has_moreboolean

A flag which identifies whether there are more results.

itemsarray

The paginated loan transaction objects.

items.created_atstring

The date when the transaction is created.

items.idstring

The unique identifier of the loan.

items.loan_idstring

The unique identifier of the associated loan.

items.payment_amountnumber

Payment amount in payment_currency.

items.payment_currencyobject

Payment currency, i.e. the currency that the beneficiary receives (3-letter ISO-4217 code).

items.posted_datestring

The date when the transaction is posted.

items.referencestring

A user specified reference that will be displayed to the beneficiary on the payment transaction with their bank.

  • 1-140 characters long
  • Should not contain emojis
items.request_idstring

A unique request identifier specified by you for idempotency. Up to 50 characters.

items.statusstring

The status of the transaction.

PENDING

The transaction is pending to be executed.

COMPLETED

The transaction is completed successfully.

FAILED

The transaction failed.

items.typestring

The type of the transaction. Only REPAYMENT is supported at this moment.

REPAYMENT
items.updated_atstring

The date when the transaction is updated.

items.source_amountnumber

Source amount in source_currency.

items.source_currencyobject

The currency that the payer uses to fund the payment (3-letter ISO-4217 code). In most cases it should be the same with loan currency.

items.transaction_datestring

The date when the transaction completed.

GET /partner-api/v1/lending/loan_transactions
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/partner-api/v1/lending/loan_transactions' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "has_more": false,
3 "items": [
4 {
5 "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
6 "loan_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
7 "payment_amount": 1000,
8 "payment_currency": "USD",
9 "reference": "repayment-2021-01-01",
10 "request_id": "e26fe780-ac29-4130-b650-edb1cc1bd4a4",
11 "source_amount": 1000,
12 "source_currency": "USD",
13 "status": "COMPLETED",
14 "type": "REPAYMENT"
15 }
16 ]
17}
Was this section helpful?