Airwallex logo
Airwallex logoAirwallex logo

Loans

Copy for LLMView as Markdown

A Loan object represents a lending contract between the lender and the borrower. It includes the terms and conditions, and manages the lifecycle of a loan.

You should follow below steps to manage the loan lifecycle:

  1. Loan application: use OAuth APIs to collect customer data from Airwallex for credit assessment.
  2. Loan creation: use Create a Loan API to create a draft loan.
  3. Customer consent collection: redirect your customer to an Airwallex consent page to accept the service T&C. The link of the consent page is specified by the consent_url on the Loan object.
  4. Loan management: use Update a Loan API to update the status of a loan.
  5. Loan repayment: use Create A Loan Transaction API to make repayments for the loan.
Endpoints
POST /partner-api/v1/lending/loans
GET /partner-api/v1/lending/loans/{loanId}
POST /partner-api/v1/lending/loans/{loanId}
GET /partner-api/v1/lending/loans

Create a loan

POST /partner-api/v1/lending/loans

Creates a Loan. The created loan is in DRAFT status. You should redirect the customer to consent_url to collect the consent. Once the consent is collected, the loan status will transit to ACCEPTED automatically.

To collect user consent, you need to redirect the customer to the Airwallex website to complete a new OAuth flow. Once the customer has granted consent for the loan, they cannot disconnect from your app. To initiate this new OAuth flow, you should utilize the consent_url provided by the loan resource and append the necessary OAuth parameters to it. Here's an example of how the URL should look:

https://www.airwallex.com/app/oauth/loan? loan_id=LOAN_ID&response_type=code &client_id=YOUR_APP_ID&redirect_uri=YOUR_REDIRECT_URL &scope=YOUR_SCOPES&state=YOUR_STATE

Upon successful completion, you will receive an authorization code in the response. For a comprehensive list of parameters, please refer to the OAuth authorization.

Request body
balancesobject

The balances of the loan. Only required when loan_type is TERM_LOAN.

balances.total_fee_amountnumber

The fee amount of the loan. Only applicable when the loan type is TERM_LOAN.

balances.total_principal_amountnumber

The principal amount of the loan. Only applicable when the loan type is TERM_LOAN.

borrower_account_idrequiredstring

The Airwallex account unique identifier of the borrower.

currencyrequiredobject

The currency of the loan product.

loan_recoveryobject

A collection of methods that help the lender to mitigate the loss in the event of delinquency or default. Note: This is only applicable to specific partners.

loan_recovery.applicable_restrictionsarray

The list of applicable restrictions that the lender can set on the borrower’s Airwallex account in case of a delinquency or bad debt happened to this loan. Immutable after the loan origination. Restrictions include: ALL which limits all fund outbound activities from the account.

loan_typerequiredstring

The type of the loan. One of the following:

  • TERM_LOAN: A term loan is a fixed amount borrowed for a specific period, typically repaid in regular installments over the agreed-upon term.
  • CREDIT_LINE: A credit line is a flexible form of borrowing that allows borrowers to access funds as needed up to the credit limit.
loan_type_display_textstring

The text of the loan type which will be displayed to the borrower in the Airwallex UI. If not provided, loan_type will be used for display. Up to 30 characters in length.

repaymentobject

Indicates how the loan should be repaid.

repayment.beneficiaryrequiredobject

Beneficiary details for loan repayment

repayment.beneficiary.additional_infoobject
repayment.beneficiary.additional_info.business_areastring
repayment.beneficiary.additional_info.business_phone_numberstring
repayment.beneficiary.additional_info.business_registration_expiry_datestring
repayment.beneficiary.additional_info.business_registration_numberstring
repayment.beneficiary.additional_info.business_registration_typestring
repayment.beneficiary.additional_info.external_identifierstring
repayment.beneficiary.additional_info.external_namestring
repayment.beneficiary.additional_info.legal_rep_addressobject
repayment.beneficiary.additional_info.legal_rep_address.citystring
repayment.beneficiary.additional_info.legal_rep_address.country_codestring
repayment.beneficiary.additional_info.legal_rep_address.full_addressstring
repayment.beneficiary.additional_info.legal_rep_address.postcodestring
repayment.beneficiary.additional_info.legal_rep_address.statestring
repayment.beneficiary.additional_info.legal_rep_address.street_addressstring
repayment.beneficiary.additional_info.legal_rep_bank_account_numberstring
repayment.beneficiary.additional_info.legal_rep_date_of_birthstring
repayment.beneficiary.additional_info.legal_rep_emailstring
repayment.beneficiary.additional_info.legal_rep_first_namestring
repayment.beneficiary.additional_info.legal_rep_first_name_in_chinesestring
repayment.beneficiary.additional_info.legal_rep_id_expiry_datestring
repayment.beneficiary.additional_info.legal_rep_id_numberstring
repayment.beneficiary.additional_info.legal_rep_id_typestring
repayment.beneficiary.additional_info.legal_rep_last_namestring
repayment.beneficiary.additional_info.legal_rep_last_name_in_chinesestring
repayment.beneficiary.additional_info.legal_rep_mobile_numberstring
repayment.beneficiary.additional_info.legal_rep_nationalitystring
repayment.beneficiary.additional_info.legal_rep_occupationstring
repayment.beneficiary.additional_info.personal_emailstring
repayment.beneficiary.additional_info.personal_first_name_in_chinesestring
repayment.beneficiary.additional_info.personal_id_expiry_datestring
repayment.beneficiary.additional_info.personal_id_numberstring
repayment.beneficiary.additional_info.personal_id_typestring
repayment.beneficiary.additional_info.personal_last_name_in_chinesestring
repayment.beneficiary.additional_info.personal_mobile_numberstring
repayment.beneficiary.additional_info.personal_nationalitystring
repayment.beneficiary.additional_info.personal_occupationstring
repayment.beneficiary.additional_info.recipient_account_idstring
repayment.beneficiary.additional_info.security_questionstring
repayment.beneficiary.additional_info.security_question_answerstring
repayment.beneficiary.addressobject
repayment.beneficiary.address.citystring
repayment.beneficiary.address.country_codestring
repayment.beneficiary.address.full_addressstring
repayment.beneficiary.address.postcodestring
repayment.beneficiary.address.statestring
repayment.beneficiary.address.street_addressstring
repayment.beneficiary.bank_detailsobject
repayment.beneficiary.bank_details.account_currencystring
repayment.beneficiary.bank_details.account_namestring
repayment.beneficiary.bank_details.account_name_aliasstring
repayment.beneficiary.bank_details.account_numberstring
repayment.beneficiary.bank_details.account_routing_type1string
repayment.beneficiary.bank_details.account_routing_type2string
repayment.beneficiary.bank_details.account_routing_value1string
repayment.beneficiary.bank_details.account_routing_value2string
repayment.beneficiary.bank_details.bank_account_categorystring
repayment.beneficiary.bank_details.bank_branchstring
repayment.beneficiary.bank_details.bank_citystring
repayment.beneficiary.bank_details.bank_country_codestring
repayment.beneficiary.bank_details.bank_namestring
repayment.beneficiary.bank_details.bank_statestring
repayment.beneficiary.bank_details.bank_street_addressstring
repayment.beneficiary.bank_details.binding_mobile_numberstring
repayment.beneficiary.bank_details.ibanstring
repayment.beneficiary.bank_details.intermediary_bank_namestring
repayment.beneficiary.bank_details.intermediary_bank_swift_codestring
repayment.beneficiary.bank_details.local_clearing_systemstring
repayment.beneficiary.bank_details.swift_codestring
repayment.beneficiary.company_namestring
repayment.beneficiary.date_of_birthstring
repayment.beneficiary.digital_walletobject
repayment.beneficiary.digital_wallet.account_namestring
repayment.beneficiary.digital_wallet.country_codestring
repayment.beneficiary.digital_wallet.currencystring
repayment.beneficiary.digital_wallet.id_typestring
repayment.beneficiary.digital_wallet.id_valuestring
repayment.beneficiary.digital_wallet.providerstring
repayment.beneficiary.entity_typestring
repayment.beneficiary.first_namestring
repayment.beneficiary.last_namestring
request_idrequiredstring

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

Response body - 200 OK
activated_atstring

The time when this loan becomes active.

app_idstring

The unique identifier of the lender application.

balancesobject

The balances of the loan.

balances.total_fee_amountnumber

The fee amount of the loan. Only applicable when the loan type is TERM_LOAN.

balances.total_paid_amountnumber

The total paid amount of the loan through loan transaction API. Equals to the sum of all loan transaction amounts which status is COMPLETED. Only applicable when the loan type is TERM_LOAN.

balances.total_principal_amountnumber

The principal amount of the loan. Only applicable when the loan type is TERM_LOAN.

borrower_account_idstring

The Airwallex account unique identifier of the borrower.

closed_atstring

The time when this loan is closed.

closure_typestring

Indicates how the loan is closed. One of the following:

  • ABANDONED: The loan is abandoned by the lender or the borrower before it’s funded.
  • REPAID: The loan is fully repaid and all obligations are met between the borrower and lender.
  • WRITTEN_OFF: The lender no longer expects the repayment from the borrower. So the lender closes the loan and marks it as a bad debt.
consent_urlstring

The URL of the Airwallex web page where the customer consent is collected.

created_atstring

The time when this loan was created.

currencyobject

The currency of the loan product.

idstring

The unique identifier of the loan.

loan_recoveryobject

A collection of methods that help the lender to mitigate the loss in the event of delinquency or default. Note: This is only applicable to specific partners.

loan_recovery.active_restrictionsarray

A list of the withdrawal restrictions that are currently applied on the borrower due to delinquency or default.

loan_recovery.applicable_restrictionsarray

The list of applicable restrictions that the lender can set on the borrower’s Airwallex account in case of a delinquency or bad debt happened to this loan. Immutable after the loan origination. Restrictions include: ALL which limits all fund outbound activities from the account.

loan_typestring

The type of the loan. One of the following:

  • TERM_LOAN: A term loan is a fixed amount borrowed for a specific period, typically repaid in regular installments over the agreed-upon term.
  • CREDIT_LINE: A credit line is a flexible form of borrowing that allows borrowers to access funds as needed up to the credit limit.
loan_type_display_textstring

The text of the loan type which will be displayed to the borrower in the Airwallex UI. If not provided, loan_type will be used for display.

repaymentobject

Indicates how the loan should be repaid.

repayment.beneficiaryobject

Beneficiary details for loan repayment

repayment.beneficiary.additional_infoobject
repayment.beneficiary.additional_info.business_areastring
repayment.beneficiary.additional_info.business_phone_numberstring
repayment.beneficiary.additional_info.business_registration_expiry_datestring
repayment.beneficiary.additional_info.business_registration_numberstring
repayment.beneficiary.additional_info.business_registration_typestring
repayment.beneficiary.additional_info.external_identifierstring
repayment.beneficiary.additional_info.external_namestring
repayment.beneficiary.additional_info.legal_rep_addressobject
repayment.beneficiary.additional_info.legal_rep_address.citystring
repayment.beneficiary.additional_info.legal_rep_address.country_codestring
repayment.beneficiary.additional_info.legal_rep_address.full_addressstring
repayment.beneficiary.additional_info.legal_rep_address.postcodestring
repayment.beneficiary.additional_info.legal_rep_address.statestring
repayment.beneficiary.additional_info.legal_rep_address.street_addressstring
repayment.beneficiary.additional_info.legal_rep_bank_account_numberstring
repayment.beneficiary.additional_info.legal_rep_date_of_birthstring
repayment.beneficiary.additional_info.legal_rep_emailstring
repayment.beneficiary.additional_info.legal_rep_first_namestring
repayment.beneficiary.additional_info.legal_rep_first_name_in_chinesestring
repayment.beneficiary.additional_info.legal_rep_id_expiry_datestring
repayment.beneficiary.additional_info.legal_rep_id_numberstring
repayment.beneficiary.additional_info.legal_rep_id_typestring
repayment.beneficiary.additional_info.legal_rep_last_namestring
repayment.beneficiary.additional_info.legal_rep_last_name_in_chinesestring
repayment.beneficiary.additional_info.legal_rep_mobile_numberstring
repayment.beneficiary.additional_info.legal_rep_nationalitystring
repayment.beneficiary.additional_info.legal_rep_occupationstring
repayment.beneficiary.additional_info.personal_emailstring
repayment.beneficiary.additional_info.personal_first_name_in_chinesestring
repayment.beneficiary.additional_info.personal_id_expiry_datestring
repayment.beneficiary.additional_info.personal_id_numberstring
repayment.beneficiary.additional_info.personal_id_typestring
repayment.beneficiary.additional_info.personal_last_name_in_chinesestring
repayment.beneficiary.additional_info.personal_mobile_numberstring
repayment.beneficiary.additional_info.personal_nationalitystring
repayment.beneficiary.additional_info.personal_occupationstring
repayment.beneficiary.additional_info.recipient_account_idstring
repayment.beneficiary.additional_info.security_questionstring
repayment.beneficiary.additional_info.security_question_answerstring
repayment.beneficiary.addressobject
repayment.beneficiary.address.citystring
repayment.beneficiary.address.country_codestring
repayment.beneficiary.address.full_addressstring
repayment.beneficiary.address.postcodestring
repayment.beneficiary.address.statestring
repayment.beneficiary.address.street_addressstring
repayment.beneficiary.bank_detailsobject
repayment.beneficiary.bank_details.account_currencystring
repayment.beneficiary.bank_details.account_namestring
repayment.beneficiary.bank_details.account_name_aliasstring
repayment.beneficiary.bank_details.account_numberstring
repayment.beneficiary.bank_details.account_routing_type1string
repayment.beneficiary.bank_details.account_routing_type2string
repayment.beneficiary.bank_details.account_routing_value1string
repayment.beneficiary.bank_details.account_routing_value2string
repayment.beneficiary.bank_details.bank_account_categorystring
repayment.beneficiary.bank_details.bank_branchstring
repayment.beneficiary.bank_details.bank_citystring
repayment.beneficiary.bank_details.bank_country_codestring
repayment.beneficiary.bank_details.bank_namestring
repayment.beneficiary.bank_details.bank_statestring
repayment.beneficiary.bank_details.bank_street_addressstring
repayment.beneficiary.bank_details.binding_mobile_numberstring
repayment.beneficiary.bank_details.ibanstring
repayment.beneficiary.bank_details.intermediary_bank_namestring
repayment.beneficiary.bank_details.intermediary_bank_swift_codestring
repayment.beneficiary.bank_details.local_clearing_systemstring
repayment.beneficiary.bank_details.swift_codestring
repayment.beneficiary.company_namestring
repayment.beneficiary.date_of_birthstring
repayment.beneficiary.digital_walletobject
repayment.beneficiary.digital_wallet.account_namestring
repayment.beneficiary.digital_wallet.country_codestring
repayment.beneficiary.digital_wallet.currencystring
repayment.beneficiary.digital_wallet.id_typestring
repayment.beneficiary.digital_wallet.id_valuestring
repayment.beneficiary.digital_wallet.providerstring
repayment.beneficiary.entity_typestring
repayment.beneficiary.first_namestring
repayment.beneficiary.last_namestring
request_idstring

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

statusstring

The status of the loan. One of the following:

  • DRAFT: The loan is a draft and requires the borrower to confirm the contract.
  • ACCEPTED: The loan offer is accepted by the borrower and waiting to be funded.
  • ACTIVE: The loan is activated and the borrower can use the loan.
  • REPAYMENT_FAILED: The repayment of the loan is overdue.
  • CLOSED: The loan is closed. No further disbursement or payment could be made on this loan. The loan could be closed in situations specified in closure_type.
updated_atstring

The time when this loan was last updated.

POST /partner-api/v1/lending/loans
$curl --request POST \
> --url 'https://api-demo.airwallex.com/partner-api/v1/lending/loans' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "balances": {
> "total_fee_amount": 1000,
> "total_principal_amount": 10000
> },
> "borrower_account_id": "acct_ca6530db68a9",
> "currency": "USD",
> "loan_recovery": {
> "applicable_restrictions": []
> },
> "loan_type": "CREDIT_LINE",
> "loan_type_display_text": "Revenue-based Financing",
> "repayment": {
> "beneficiary": {
> "additional_info": {
> "business_area": "<string>",
> "business_phone_number": "<string>",
> "business_registration_expiry_date": "<string>",
> "business_registration_number": "<string>",
> "business_registration_type": "<string>",
> "external_identifier": "<string>",
> "external_name": "<string>",
> "legal_rep_address": {
> "city": "<string>",
> "country_code": "<string>",
> "full_address": "<string>",
> "postcode": "<string>",
> "state": "<string>",
> "street_address": "<string>"
> },
> "legal_rep_bank_account_number": "<string>",
> "legal_rep_date_of_birth": "<string>",
> "legal_rep_email": "<string>",
> "legal_rep_first_name": "<string>",
> "legal_rep_first_name_in_chinese": "<string>",
> "legal_rep_id_expiry_date": "<string>",
> "legal_rep_id_number": "<string>",
> "legal_rep_id_type": "<string>",
> "legal_rep_last_name": "<string>",
> "legal_rep_last_name_in_chinese": "<string>",
> "legal_rep_mobile_number": "<string>",
> "legal_rep_nationality": "<string>",
> "legal_rep_occupation": "<string>",
> "personal_email": "<string>",
> "personal_first_name_in_chinese": "<string>",
> "personal_id_expiry_date": "<string>",
> "personal_id_number": "<string>",
> "personal_id_type": "<string>",
> "personal_last_name_in_chinese": "<string>",
> "personal_mobile_number": "<string>",
> "personal_nationality": "<string>",
> "personal_occupation": "<string>",
> "recipient_account_id": "<string>",
> "security_question": "<string>",
> "security_question_answer": "<string>"
> },
> "address": {
> "city": "<string>",
> "country_code": "<string>",
> "full_address": "<string>",
> "postcode": "<string>",
> "state": "<string>",
> "street_address": "<string>"
> },
> "bank_details": {
> "account_currency": "<string>",
> "account_name": "<string>",
> "account_name_alias": "<string>",
> "account_number": "<string>",
> "account_routing_type1": "<string>",
> "account_routing_type2": "<string>",
> "account_routing_value1": "<string>",
> "account_routing_value2": "<string>",
> "bank_account_category": "<string>",
> "bank_branch": "<string>",
> "bank_city": "<string>",
> "bank_country_code": "<string>",
> "bank_name": "<string>",
> "bank_state": "<string>",
> "bank_street_address": "<string>",
> "binding_mobile_number": "<string>",
> "iban": "<string>",
> "intermediary_bank_name": "<string>",
> "intermediary_bank_swift_code": "<string>",
> "local_clearing_system": "<string>",
> "swift_code": "<string>"
> },
> "company_name": "<string>",
> "date_of_birth": "<string>",
> "digital_wallet": {
> "account_name": "<string>",
> "country_code": "<string>",
> "currency": "<string>",
> "id_type": "<string>",
> "id_value": "<string>",
> "provider": "<string>"
> },
> "entity_type": "<string>",
> "first_name": "<string>",
> "last_name": "<string>"
> }
> },
> "request_id": "e26fe780-ac29-4130-b650-edb1cc1bd4a4"
>}'
Response (200 OK)
1{
2 "activated_at": "<date-time>",
3 "app_id": "appid_30dc2df7ac234",
4 "balances": {
5 "total_fee_amount": 1000,
6 "total_paid_amount": 8000,
7 "total_principal_amount": 10000
8 },
9 "borrower_account_id": "acct_ca6530db68a9",
10 "closed_at": "<date-time>",
11 "closure_type": "REPAID",
12 "consent_url": "https://www.airwallex.com/app/oauth/loan?loan_id=d2bde493-093b-4e68-b38a-0df603fb3ff6s",
13 "created_at": "<date-time>",
14 "currency": "HKD",
15 "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
16 "loan_recovery": {
17 "active_restrictions": [],
18 "applicable_restrictions": []
19 },
20 "loan_type": "CREDIT_LINE",
21 "loan_type_display_text": "Revenue-based Financing",
22 "repayment": {
23 "beneficiary": {
24 "additional_info": {
25 "business_area": "<string>",
26 "business_phone_number": "<string>",
27 "business_registration_expiry_date": "<string>",
28 "business_registration_number": "<string>",
29 "business_registration_type": "<string>",
30 "external_identifier": "<string>",
31 "external_name": "<string>",
32 "legal_rep_address": {
33 "city": "<string>",
34 "country_code": "<string>",
35 "full_address": "<string>",
36 "postcode": "<string>",
37 "state": "<string>",
38 "street_address": "<string>"
39 },
40 "legal_rep_bank_account_number": "<string>",
41 "legal_rep_date_of_birth": "<string>",
42 "legal_rep_email": "<string>",
43 "legal_rep_first_name": "<string>",
44 "legal_rep_first_name_in_chinese": "<string>",
45 "legal_rep_id_expiry_date": "<string>",
46 "legal_rep_id_number": "<string>",
47 "legal_rep_id_type": "<string>",
48 "legal_rep_last_name": "<string>",
49 "legal_rep_last_name_in_chinese": "<string>",
50 "legal_rep_mobile_number": "<string>",
51 "legal_rep_nationality": "<string>",
52 "legal_rep_occupation": "<string>",
53 "personal_email": "<string>",
54 "personal_first_name_in_chinese": "<string>",
55 "personal_id_expiry_date": "<string>",
56 "personal_id_number": "<string>",
57 "personal_id_type": "<string>",
58 "personal_last_name_in_chinese": "<string>",
59 "personal_mobile_number": "<string>",
60 "personal_nationality": "<string>",
61 "personal_occupation": "<string>",
62 "recipient_account_id": "<string>",
63 "security_question": "<string>",
64 "security_question_answer": "<string>"
65 },
66 "address": {
67 "city": "<string>",
68 "country_code": "<string>",
69 "full_address": "<string>",
70 "postcode": "<string>",
71 "state": "<string>",
72 "street_address": "<string>"
73 },
74 "bank_details": {
75 "account_currency": "<string>",
76 "account_name": "<string>",
77 "account_name_alias": "<string>",
78 "account_number": "<string>",
79 "account_routing_type1": "<string>",
80 "account_routing_type2": "<string>",
81 "account_routing_value1": "<string>",
82 "account_routing_value2": "<string>",
83 "bank_account_category": "<string>",
84 "bank_branch": "<string>",
85 "bank_city": "<string>",
86 "bank_country_code": "<string>",
87 "bank_name": "<string>",
88 "bank_state": "<string>",
89 "bank_street_address": "<string>",
90 "binding_mobile_number": "<string>",
91 "iban": "<string>",
92 "intermediary_bank_name": "<string>",
93 "intermediary_bank_swift_code": "<string>",
94 "local_clearing_system": "<string>",
95 "swift_code": "<string>"
96 },
97 "company_name": "<string>",
98 "date_of_birth": "<string>",
99 "digital_wallet": {
100 "account_name": "<string>",
101 "country_code": "<string>",
102 "currency": "<string>",
103 "id_type": "<string>",
104 "id_value": "<string>",
105 "provider": "<string>"
106 },
107 "entity_type": "<string>",
108 "first_name": "<string>",
109 "last_name": "<string>"
110 }
111 },
112 "request_id": "e26fe780-ac29-4130-b650-edb1cc1bd4a4",
113 "status": "ACTIVE",
114 "updated_at": "<date-time>"
115}
Was this section helpful?

Get loan by ID

GET /partner-api/v1/lending/loans/{loanId}

Gets the details of a Loan by unique identifier.

Parameters
loanIdrequiredstring

The unique identifier of the loan object.

Response body - 200 OK
activated_atstring

The time when this loan becomes active.

app_idstring

The unique identifier of the lender application.

balancesobject

The balances of the loan.

balances.total_fee_amountnumber

The fee amount of the loan. Only applicable when the loan type is TERM_LOAN.

balances.total_paid_amountnumber

The total paid amount of the loan through loan transaction API. Equals to the sum of all loan transaction amounts which status is COMPLETED. Only applicable when the loan type is TERM_LOAN.

balances.total_principal_amountnumber

The principal amount of the loan. Only applicable when the loan type is TERM_LOAN.

borrower_account_idstring

The Airwallex account unique identifier of the borrower.

closed_atstring

The time when this loan is closed.

closure_typestring

Indicates how the loan is closed. One of the following:

  • ABANDONED: The loan is abandoned by the lender or the borrower before it’s funded.
  • REPAID: The loan is fully repaid and all obligations are met between the borrower and lender.
  • WRITTEN_OFF: The lender no longer expects the repayment from the borrower. So the lender closes the loan and marks it as a bad debt.
consent_urlstring

The URL of the Airwallex web page where the customer consent is collected.

created_atstring

The time when this loan was created.

currencyobject

The currency of the loan product.

idstring

The unique identifier of the loan.

loan_recoveryobject

A collection of methods that help the lender to mitigate the loss in the event of delinquency or default. Note: This is only applicable to specific partners.

loan_recovery.active_restrictionsarray

A list of the withdrawal restrictions that are currently applied on the borrower due to delinquency or default.

loan_recovery.applicable_restrictionsarray

The list of applicable restrictions that the lender can set on the borrower’s Airwallex account in case of a delinquency or bad debt happened to this loan. Immutable after the loan origination. Restrictions include: ALL which limits all fund outbound activities from the account.

loan_typestring

The type of the loan. One of the following:

  • TERM_LOAN: A term loan is a fixed amount borrowed for a specific period, typically repaid in regular installments over the agreed-upon term.
  • CREDIT_LINE: A credit line is a flexible form of borrowing that allows borrowers to access funds as needed up to the credit limit.
loan_type_display_textstring

The text of the loan type which will be displayed to the borrower in the Airwallex UI. If not provided, loan_type will be used for display.

repaymentobject

Indicates how the loan should be repaid.

repayment.beneficiaryobject

Beneficiary details for loan repayment

repayment.beneficiary.additional_infoobject
repayment.beneficiary.additional_info.business_areastring
repayment.beneficiary.additional_info.business_phone_numberstring
repayment.beneficiary.additional_info.business_registration_expiry_datestring
repayment.beneficiary.additional_info.business_registration_numberstring
repayment.beneficiary.additional_info.business_registration_typestring
repayment.beneficiary.additional_info.external_identifierstring
repayment.beneficiary.additional_info.external_namestring
repayment.beneficiary.additional_info.legal_rep_addressobject
repayment.beneficiary.additional_info.legal_rep_address.citystring
repayment.beneficiary.additional_info.legal_rep_address.country_codestring
repayment.beneficiary.additional_info.legal_rep_address.full_addressstring
repayment.beneficiary.additional_info.legal_rep_address.postcodestring
repayment.beneficiary.additional_info.legal_rep_address.statestring
repayment.beneficiary.additional_info.legal_rep_address.street_addressstring
repayment.beneficiary.additional_info.legal_rep_bank_account_numberstring
repayment.beneficiary.additional_info.legal_rep_date_of_birthstring
repayment.beneficiary.additional_info.legal_rep_emailstring
repayment.beneficiary.additional_info.legal_rep_first_namestring
repayment.beneficiary.additional_info.legal_rep_first_name_in_chinesestring
repayment.beneficiary.additional_info.legal_rep_id_expiry_datestring
repayment.beneficiary.additional_info.legal_rep_id_numberstring
repayment.beneficiary.additional_info.legal_rep_id_typestring
repayment.beneficiary.additional_info.legal_rep_last_namestring
repayment.beneficiary.additional_info.legal_rep_last_name_in_chinesestring
repayment.beneficiary.additional_info.legal_rep_mobile_numberstring
repayment.beneficiary.additional_info.legal_rep_nationalitystring
repayment.beneficiary.additional_info.legal_rep_occupationstring
repayment.beneficiary.additional_info.personal_emailstring
repayment.beneficiary.additional_info.personal_first_name_in_chinesestring
repayment.beneficiary.additional_info.personal_id_expiry_datestring
repayment.beneficiary.additional_info.personal_id_numberstring
repayment.beneficiary.additional_info.personal_id_typestring
repayment.beneficiary.additional_info.personal_last_name_in_chinesestring
repayment.beneficiary.additional_info.personal_mobile_numberstring
repayment.beneficiary.additional_info.personal_nationalitystring
repayment.beneficiary.additional_info.personal_occupationstring
repayment.beneficiary.additional_info.recipient_account_idstring
repayment.beneficiary.additional_info.security_questionstring
repayment.beneficiary.additional_info.security_question_answerstring
repayment.beneficiary.addressobject
repayment.beneficiary.address.citystring
repayment.beneficiary.address.country_codestring
repayment.beneficiary.address.full_addressstring
repayment.beneficiary.address.postcodestring
repayment.beneficiary.address.statestring
repayment.beneficiary.address.street_addressstring
repayment.beneficiary.bank_detailsobject
repayment.beneficiary.bank_details.account_currencystring
repayment.beneficiary.bank_details.account_namestring
repayment.beneficiary.bank_details.account_name_aliasstring
repayment.beneficiary.bank_details.account_numberstring
repayment.beneficiary.bank_details.account_routing_type1string
repayment.beneficiary.bank_details.account_routing_type2string
repayment.beneficiary.bank_details.account_routing_value1string
repayment.beneficiary.bank_details.account_routing_value2string
repayment.beneficiary.bank_details.bank_account_categorystring
repayment.beneficiary.bank_details.bank_branchstring
repayment.beneficiary.bank_details.bank_citystring
repayment.beneficiary.bank_details.bank_country_codestring
repayment.beneficiary.bank_details.bank_namestring
repayment.beneficiary.bank_details.bank_statestring
repayment.beneficiary.bank_details.bank_street_addressstring
repayment.beneficiary.bank_details.binding_mobile_numberstring
repayment.beneficiary.bank_details.ibanstring
repayment.beneficiary.bank_details.intermediary_bank_namestring
repayment.beneficiary.bank_details.intermediary_bank_swift_codestring
repayment.beneficiary.bank_details.local_clearing_systemstring
repayment.beneficiary.bank_details.swift_codestring
repayment.beneficiary.company_namestring
repayment.beneficiary.date_of_birthstring
repayment.beneficiary.digital_walletobject
repayment.beneficiary.digital_wallet.account_namestring
repayment.beneficiary.digital_wallet.country_codestring
repayment.beneficiary.digital_wallet.currencystring
repayment.beneficiary.digital_wallet.id_typestring
repayment.beneficiary.digital_wallet.id_valuestring
repayment.beneficiary.digital_wallet.providerstring
repayment.beneficiary.entity_typestring
repayment.beneficiary.first_namestring
repayment.beneficiary.last_namestring
request_idstring

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

statusstring

The status of the loan. One of the following:

  • DRAFT: The loan is a draft and requires the borrower to confirm the contract.
  • ACCEPTED: The loan offer is accepted by the borrower and waiting to be funded.
  • ACTIVE: The loan is activated and the borrower can use the loan.
  • REPAYMENT_FAILED: The repayment of the loan is overdue.
  • CLOSED: The loan is closed. No further disbursement or payment could be made on this loan. The loan could be closed in situations specified in closure_type.
updated_atstring

The time when this loan was last updated.

GET /partner-api/v1/lending/loans/{loanId}
$curl --request GET \
> --url 'https://api-demo.airwallex.com/partner-api/v1/lending/loans/loanId' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "activated_at": "<date-time>",
3 "app_id": "appid_30dc2df7ac234",
4 "balances": {
5 "total_fee_amount": 1000,
6 "total_paid_amount": 8000,
7 "total_principal_amount": 10000
8 },
9 "borrower_account_id": "acct_ca6530db68a9",
10 "closed_at": "<date-time>",
11 "closure_type": "REPAID",
12 "consent_url": "https://www.airwallex.com/app/oauth/loan?loan_id=d2bde493-093b-4e68-b38a-0df603fb3ff6s",
13 "created_at": "<date-time>",
14 "currency": "HKD",
15 "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
16 "loan_recovery": {
17 "active_restrictions": [],
18 "applicable_restrictions": []
19 },
20 "loan_type": "CREDIT_LINE",
21 "loan_type_display_text": "Revenue-based Financing",
22 "repayment": {
23 "beneficiary": {
24 "additional_info": {
25 "business_area": "<string>",
26 "business_phone_number": "<string>",
27 "business_registration_expiry_date": "<string>",
28 "business_registration_number": "<string>",
29 "business_registration_type": "<string>",
30 "external_identifier": "<string>",
31 "external_name": "<string>",
32 "legal_rep_address": {
33 "city": "<string>",
34 "country_code": "<string>",
35 "full_address": "<string>",
36 "postcode": "<string>",
37 "state": "<string>",
38 "street_address": "<string>"
39 },
40 "legal_rep_bank_account_number": "<string>",
41 "legal_rep_date_of_birth": "<string>",
42 "legal_rep_email": "<string>",
43 "legal_rep_first_name": "<string>",
44 "legal_rep_first_name_in_chinese": "<string>",
45 "legal_rep_id_expiry_date": "<string>",
46 "legal_rep_id_number": "<string>",
47 "legal_rep_id_type": "<string>",
48 "legal_rep_last_name": "<string>",
49 "legal_rep_last_name_in_chinese": "<string>",
50 "legal_rep_mobile_number": "<string>",
51 "legal_rep_nationality": "<string>",
52 "legal_rep_occupation": "<string>",
53 "personal_email": "<string>",
54 "personal_first_name_in_chinese": "<string>",
55 "personal_id_expiry_date": "<string>",
56 "personal_id_number": "<string>",
57 "personal_id_type": "<string>",
58 "personal_last_name_in_chinese": "<string>",
59 "personal_mobile_number": "<string>",
60 "personal_nationality": "<string>",
61 "personal_occupation": "<string>",
62 "recipient_account_id": "<string>",
63 "security_question": "<string>",
64 "security_question_answer": "<string>"
65 },
66 "address": {
67 "city": "<string>",
68 "country_code": "<string>",
69 "full_address": "<string>",
70 "postcode": "<string>",
71 "state": "<string>",
72 "street_address": "<string>"
73 },
74 "bank_details": {
75 "account_currency": "<string>",
76 "account_name": "<string>",
77 "account_name_alias": "<string>",
78 "account_number": "<string>",
79 "account_routing_type1": "<string>",
80 "account_routing_type2": "<string>",
81 "account_routing_value1": "<string>",
82 "account_routing_value2": "<string>",
83 "bank_account_category": "<string>",
84 "bank_branch": "<string>",
85 "bank_city": "<string>",
86 "bank_country_code": "<string>",
87 "bank_name": "<string>",
88 "bank_state": "<string>",
89 "bank_street_address": "<string>",
90 "binding_mobile_number": "<string>",
91 "iban": "<string>",
92 "intermediary_bank_name": "<string>",
93 "intermediary_bank_swift_code": "<string>",
94 "local_clearing_system": "<string>",
95 "swift_code": "<string>"
96 },
97 "company_name": "<string>",
98 "date_of_birth": "<string>",
99 "digital_wallet": {
100 "account_name": "<string>",
101 "country_code": "<string>",
102 "currency": "<string>",
103 "id_type": "<string>",
104 "id_value": "<string>",
105 "provider": "<string>"
106 },
107 "entity_type": "<string>",
108 "first_name": "<string>",
109 "last_name": "<string>"
110 }
111 },
112 "request_id": "e26fe780-ac29-4130-b650-edb1cc1bd4a4",
113 "status": "ACTIVE",
114 "updated_at": "<date-time>"
115}
Was this section helpful?

Update a loan

POST /partner-api/v1/lending/loans/{loanId}

Updates the attributes of an existing loan by setting the values of the request parameters. Any parameters not provided will be left unchanged.

Parameters
loanIdrequiredstring

The unique identifier of the loan object.

Request body
closure_typestring

Indicates how the loan is closed. Should only be set when status=CLOSED. One of the following:

  • ABANDONED: The loan is abandoned by the lender or the borrower before it’s funded.
  • REPAID: The loan is fully repaid and all obligations are met between the borrower and lender.
  • WRITTEN_OFF: The lender no longer expects the repayment from the borrower. So the lender closes the loan and marks it as a bad debt.
loan_recoveryobject

A collection of methods that help the lender to mitigate the loss in the event of delinquency or default. Note: This is only applicable to specific partners.

loan_recovery.active_restrictionsarray

A list of the withdrawal restrictions that to be applied to the borrower's account due to delinquency or default. The restrictions must fall within the scope of predefined applicable_restrictions. You can only add new restrictions when the loan status is REPAYMENT_FAILED.

loan_type_display_textstring

The text of the loan type which will be displayed to the borrower in the Airwallex UI. If not provided, loan_type will be used for display. Up to 30 characters in length.

repaymentobject

Indicates how the loan should be repaid.

repayment.beneficiaryrequiredobject

Beneficiary details for loan repayment

repayment.beneficiary.additional_infoobject
repayment.beneficiary.additional_info.business_areastring
repayment.beneficiary.additional_info.business_phone_numberstring
repayment.beneficiary.additional_info.business_registration_expiry_datestring
repayment.beneficiary.additional_info.business_registration_numberstring
repayment.beneficiary.additional_info.business_registration_typestring
repayment.beneficiary.additional_info.external_identifierstring
repayment.beneficiary.additional_info.external_namestring
repayment.beneficiary.additional_info.legal_rep_addressobject
repayment.beneficiary.additional_info.legal_rep_address.citystring
repayment.beneficiary.additional_info.legal_rep_address.country_codestring
repayment.beneficiary.additional_info.legal_rep_address.full_addressstring
repayment.beneficiary.additional_info.legal_rep_address.postcodestring
repayment.beneficiary.additional_info.legal_rep_address.statestring
repayment.beneficiary.additional_info.legal_rep_address.street_addressstring
repayment.beneficiary.additional_info.legal_rep_bank_account_numberstring
repayment.beneficiary.additional_info.legal_rep_date_of_birthstring
repayment.beneficiary.additional_info.legal_rep_emailstring
repayment.beneficiary.additional_info.legal_rep_first_namestring
repayment.beneficiary.additional_info.legal_rep_first_name_in_chinesestring
repayment.beneficiary.additional_info.legal_rep_id_expiry_datestring
repayment.beneficiary.additional_info.legal_rep_id_numberstring
repayment.beneficiary.additional_info.legal_rep_id_typestring
repayment.beneficiary.additional_info.legal_rep_last_namestring
repayment.beneficiary.additional_info.legal_rep_last_name_in_chinesestring
repayment.beneficiary.additional_info.legal_rep_mobile_numberstring
repayment.beneficiary.additional_info.legal_rep_nationalitystring
repayment.beneficiary.additional_info.legal_rep_occupationstring
repayment.beneficiary.additional_info.personal_emailstring
repayment.beneficiary.additional_info.personal_first_name_in_chinesestring
repayment.beneficiary.additional_info.personal_id_expiry_datestring
repayment.beneficiary.additional_info.personal_id_numberstring
repayment.beneficiary.additional_info.personal_id_typestring
repayment.beneficiary.additional_info.personal_last_name_in_chinesestring
repayment.beneficiary.additional_info.personal_mobile_numberstring
repayment.beneficiary.additional_info.personal_nationalitystring
repayment.beneficiary.additional_info.personal_occupationstring
repayment.beneficiary.additional_info.recipient_account_idstring
repayment.beneficiary.additional_info.security_questionstring
repayment.beneficiary.additional_info.security_question_answerstring
repayment.beneficiary.addressobject
repayment.beneficiary.address.citystring
repayment.beneficiary.address.country_codestring
repayment.beneficiary.address.full_addressstring
repayment.beneficiary.address.postcodestring
repayment.beneficiary.address.statestring
repayment.beneficiary.address.street_addressstring
repayment.beneficiary.bank_detailsobject
repayment.beneficiary.bank_details.account_currencystring
repayment.beneficiary.bank_details.account_namestring
repayment.beneficiary.bank_details.account_name_aliasstring
repayment.beneficiary.bank_details.account_numberstring
repayment.beneficiary.bank_details.account_routing_type1string
repayment.beneficiary.bank_details.account_routing_type2string
repayment.beneficiary.bank_details.account_routing_value1string
repayment.beneficiary.bank_details.account_routing_value2string
repayment.beneficiary.bank_details.bank_account_categorystring
repayment.beneficiary.bank_details.bank_branchstring
repayment.beneficiary.bank_details.bank_citystring
repayment.beneficiary.bank_details.bank_country_codestring
repayment.beneficiary.bank_details.bank_namestring
repayment.beneficiary.bank_details.bank_statestring
repayment.beneficiary.bank_details.bank_street_addressstring
repayment.beneficiary.bank_details.binding_mobile_numberstring
repayment.beneficiary.bank_details.ibanstring
repayment.beneficiary.bank_details.intermediary_bank_namestring
repayment.beneficiary.bank_details.intermediary_bank_swift_codestring
repayment.beneficiary.bank_details.local_clearing_systemstring
repayment.beneficiary.bank_details.swift_codestring
repayment.beneficiary.company_namestring
repayment.beneficiary.date_of_birthstring
repayment.beneficiary.digital_walletobject
repayment.beneficiary.digital_wallet.account_namestring
repayment.beneficiary.digital_wallet.country_codestring
repayment.beneficiary.digital_wallet.currencystring
repayment.beneficiary.digital_wallet.id_typestring
repayment.beneficiary.digital_wallet.id_valuestring
repayment.beneficiary.digital_wallet.providerstring
repayment.beneficiary.entity_typestring
repayment.beneficiary.first_namestring
repayment.beneficiary.last_namestring
statusstring

The status of the loan. One of the following:

  • ACTIVE: The loan is activated and the borrower can use the loan.
  • REPAYMENT_FAILED: The repayment of the loan is failed.
  • CLOSED: The loan is closed. No further disbursement or payment could be made on this loan. The loan could be closed in situations specified in closure_type. When the loan is closed, all the restrictions will be removed and OAuth will be disconnected.

DRAFT, ACCEPTED, ACTIVE, REPAYMENT_FAILED, CLOSED

Response body - 200 OK
activated_atstring

The time when this loan becomes active.

app_idstring

The unique identifier of the lender application.

balancesobject

The balances of the loan.

balances.total_fee_amountnumber

The fee amount of the loan. Only applicable when the loan type is TERM_LOAN.

balances.total_paid_amountnumber

The total paid amount of the loan through loan transaction API. Equals to the sum of all loan transaction amounts which status is COMPLETED. Only applicable when the loan type is TERM_LOAN.

balances.total_principal_amountnumber

The principal amount of the loan. Only applicable when the loan type is TERM_LOAN.

borrower_account_idstring

The Airwallex account unique identifier of the borrower.

closed_atstring

The time when this loan is closed.

closure_typestring

Indicates how the loan is closed. One of the following:

  • ABANDONED: The loan is abandoned by the lender or the borrower before it’s funded.
  • REPAID: The loan is fully repaid and all obligations are met between the borrower and lender.
  • WRITTEN_OFF: The lender no longer expects the repayment from the borrower. So the lender closes the loan and marks it as a bad debt.
consent_urlstring

The URL of the Airwallex web page where the customer consent is collected.

created_atstring

The time when this loan was created.

currencyobject

The currency of the loan product.

idstring

The unique identifier of the loan.

loan_recoveryobject

A collection of methods that help the lender to mitigate the loss in the event of delinquency or default. Note: This is only applicable to specific partners.

loan_recovery.active_restrictionsarray

A list of the withdrawal restrictions that are currently applied on the borrower due to delinquency or default.

loan_recovery.applicable_restrictionsarray

The list of applicable restrictions that the lender can set on the borrower’s Airwallex account in case of a delinquency or bad debt happened to this loan. Immutable after the loan origination. Restrictions include: ALL which limits all fund outbound activities from the account.

loan_typestring

The type of the loan. One of the following:

  • TERM_LOAN: A term loan is a fixed amount borrowed for a specific period, typically repaid in regular installments over the agreed-upon term.
  • CREDIT_LINE: A credit line is a flexible form of borrowing that allows borrowers to access funds as needed up to the credit limit.
loan_type_display_textstring

The text of the loan type which will be displayed to the borrower in the Airwallex UI. If not provided, loan_type will be used for display.

repaymentobject

Indicates how the loan should be repaid.

repayment.beneficiaryobject

Beneficiary details for loan repayment

repayment.beneficiary.additional_infoobject
repayment.beneficiary.additional_info.business_areastring
repayment.beneficiary.additional_info.business_phone_numberstring
repayment.beneficiary.additional_info.business_registration_expiry_datestring
repayment.beneficiary.additional_info.business_registration_numberstring
repayment.beneficiary.additional_info.business_registration_typestring
repayment.beneficiary.additional_info.external_identifierstring
repayment.beneficiary.additional_info.external_namestring
repayment.beneficiary.additional_info.legal_rep_addressobject
repayment.beneficiary.additional_info.legal_rep_address.citystring
repayment.beneficiary.additional_info.legal_rep_address.country_codestring
repayment.beneficiary.additional_info.legal_rep_address.full_addressstring
repayment.beneficiary.additional_info.legal_rep_address.postcodestring
repayment.beneficiary.additional_info.legal_rep_address.statestring
repayment.beneficiary.additional_info.legal_rep_address.street_addressstring
repayment.beneficiary.additional_info.legal_rep_bank_account_numberstring
repayment.beneficiary.additional_info.legal_rep_date_of_birthstring
repayment.beneficiary.additional_info.legal_rep_emailstring
repayment.beneficiary.additional_info.legal_rep_first_namestring
repayment.beneficiary.additional_info.legal_rep_first_name_in_chinesestring
repayment.beneficiary.additional_info.legal_rep_id_expiry_datestring
repayment.beneficiary.additional_info.legal_rep_id_numberstring
repayment.beneficiary.additional_info.legal_rep_id_typestring
repayment.beneficiary.additional_info.legal_rep_last_namestring
repayment.beneficiary.additional_info.legal_rep_last_name_in_chinesestring
repayment.beneficiary.additional_info.legal_rep_mobile_numberstring
repayment.beneficiary.additional_info.legal_rep_nationalitystring
repayment.beneficiary.additional_info.legal_rep_occupationstring
repayment.beneficiary.additional_info.personal_emailstring
repayment.beneficiary.additional_info.personal_first_name_in_chinesestring
repayment.beneficiary.additional_info.personal_id_expiry_datestring
repayment.beneficiary.additional_info.personal_id_numberstring
repayment.beneficiary.additional_info.personal_id_typestring
repayment.beneficiary.additional_info.personal_last_name_in_chinesestring
repayment.beneficiary.additional_info.personal_mobile_numberstring
repayment.beneficiary.additional_info.personal_nationalitystring
repayment.beneficiary.additional_info.personal_occupationstring
repayment.beneficiary.additional_info.recipient_account_idstring
repayment.beneficiary.additional_info.security_questionstring
repayment.beneficiary.additional_info.security_question_answerstring
repayment.beneficiary.addressobject
repayment.beneficiary.address.citystring
repayment.beneficiary.address.country_codestring
repayment.beneficiary.address.full_addressstring
repayment.beneficiary.address.postcodestring
repayment.beneficiary.address.statestring
repayment.beneficiary.address.street_addressstring
repayment.beneficiary.bank_detailsobject
repayment.beneficiary.bank_details.account_currencystring
repayment.beneficiary.bank_details.account_namestring
repayment.beneficiary.bank_details.account_name_aliasstring
repayment.beneficiary.bank_details.account_numberstring
repayment.beneficiary.bank_details.account_routing_type1string
repayment.beneficiary.bank_details.account_routing_type2string
repayment.beneficiary.bank_details.account_routing_value1string
repayment.beneficiary.bank_details.account_routing_value2string
repayment.beneficiary.bank_details.bank_account_categorystring
repayment.beneficiary.bank_details.bank_branchstring
repayment.beneficiary.bank_details.bank_citystring
repayment.beneficiary.bank_details.bank_country_codestring
repayment.beneficiary.bank_details.bank_namestring
repayment.beneficiary.bank_details.bank_statestring
repayment.beneficiary.bank_details.bank_street_addressstring
repayment.beneficiary.bank_details.binding_mobile_numberstring
repayment.beneficiary.bank_details.ibanstring
repayment.beneficiary.bank_details.intermediary_bank_namestring
repayment.beneficiary.bank_details.intermediary_bank_swift_codestring
repayment.beneficiary.bank_details.local_clearing_systemstring
repayment.beneficiary.bank_details.swift_codestring
repayment.beneficiary.company_namestring
repayment.beneficiary.date_of_birthstring
repayment.beneficiary.digital_walletobject
repayment.beneficiary.digital_wallet.account_namestring
repayment.beneficiary.digital_wallet.country_codestring
repayment.beneficiary.digital_wallet.currencystring
repayment.beneficiary.digital_wallet.id_typestring
repayment.beneficiary.digital_wallet.id_valuestring
repayment.beneficiary.digital_wallet.providerstring
repayment.beneficiary.entity_typestring
repayment.beneficiary.first_namestring
repayment.beneficiary.last_namestring
request_idstring

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

statusstring

The status of the loan. One of the following:

  • DRAFT: The loan is a draft and requires the borrower to confirm the contract.
  • ACCEPTED: The loan offer is accepted by the borrower and waiting to be funded.
  • ACTIVE: The loan is activated and the borrower can use the loan.
  • REPAYMENT_FAILED: The repayment of the loan is overdue.
  • CLOSED: The loan is closed. No further disbursement or payment could be made on this loan. The loan could be closed in situations specified in closure_type.
updated_atstring

The time when this loan was last updated.

POST /partner-api/v1/lending/loans/{loanId}
$curl --request POST \
> --url 'https://api-demo.airwallex.com/partner-api/v1/lending/loans/loanId' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "closure_type": "REPAID",
> "loan_recovery": {
> "active_restrictions": []
> },
> "loan_type_display_text": "Revenue-based Financing",
> "repayment": {
> "beneficiary": {
> "additional_info": {
> "business_area": "<string>",
> "business_phone_number": "<string>",
> "business_registration_expiry_date": "<string>",
> "business_registration_number": "<string>",
> "business_registration_type": "<string>",
> "external_identifier": "<string>",
> "external_name": "<string>",
> "legal_rep_address": {
> "city": "<string>",
> "country_code": "<string>",
> "full_address": "<string>",
> "postcode": "<string>",
> "state": "<string>",
> "street_address": "<string>"
> },
> "legal_rep_bank_account_number": "<string>",
> "legal_rep_date_of_birth": "<string>",
> "legal_rep_email": "<string>",
> "legal_rep_first_name": "<string>",
> "legal_rep_first_name_in_chinese": "<string>",
> "legal_rep_id_expiry_date": "<string>",
> "legal_rep_id_number": "<string>",
> "legal_rep_id_type": "<string>",
> "legal_rep_last_name": "<string>",
> "legal_rep_last_name_in_chinese": "<string>",
> "legal_rep_mobile_number": "<string>",
> "legal_rep_nationality": "<string>",
> "legal_rep_occupation": "<string>",
> "personal_email": "<string>",
> "personal_first_name_in_chinese": "<string>",
> "personal_id_expiry_date": "<string>",
> "personal_id_number": "<string>",
> "personal_id_type": "<string>",
> "personal_last_name_in_chinese": "<string>",
> "personal_mobile_number": "<string>",
> "personal_nationality": "<string>",
> "personal_occupation": "<string>",
> "recipient_account_id": "<string>",
> "security_question": "<string>",
> "security_question_answer": "<string>"
> },
> "address": {
> "city": "<string>",
> "country_code": "<string>",
> "full_address": "<string>",
> "postcode": "<string>",
> "state": "<string>",
> "street_address": "<string>"
> },
> "bank_details": {
> "account_currency": "<string>",
> "account_name": "<string>",
> "account_name_alias": "<string>",
> "account_number": "<string>",
> "account_routing_type1": "<string>",
> "account_routing_type2": "<string>",
> "account_routing_value1": "<string>",
> "account_routing_value2": "<string>",
> "bank_account_category": "<string>",
> "bank_branch": "<string>",
> "bank_city": "<string>",
> "bank_country_code": "<string>",
> "bank_name": "<string>",
> "bank_state": "<string>",
> "bank_street_address": "<string>",
> "binding_mobile_number": "<string>",
> "iban": "<string>",
> "intermediary_bank_name": "<string>",
> "intermediary_bank_swift_code": "<string>",
> "local_clearing_system": "<string>",
> "swift_code": "<string>"
> },
> "company_name": "<string>",
> "date_of_birth": "<string>",
> "digital_wallet": {
> "account_name": "<string>",
> "country_code": "<string>",
> "currency": "<string>",
> "id_type": "<string>",
> "id_value": "<string>",
> "provider": "<string>"
> },
> "entity_type": "<string>",
> "first_name": "<string>",
> "last_name": "<string>"
> }
> },
> "status": "ACTIVE"
>}'
Response (200 OK)
1{
2 "activated_at": "<date-time>",
3 "app_id": "appid_30dc2df7ac234",
4 "balances": {
5 "total_fee_amount": 1000,
6 "total_paid_amount": 8000,
7 "total_principal_amount": 10000
8 },
9 "borrower_account_id": "acct_ca6530db68a9",
10 "closed_at": "<date-time>",
11 "closure_type": "REPAID",
12 "consent_url": "https://www.airwallex.com/app/oauth/loan?loan_id=d2bde493-093b-4e68-b38a-0df603fb3ff6s",
13 "created_at": "<date-time>",
14 "currency": "HKD",
15 "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
16 "loan_recovery": {
17 "active_restrictions": [],
18 "applicable_restrictions": []
19 },
20 "loan_type": "CREDIT_LINE",
21 "loan_type_display_text": "Revenue-based Financing",
22 "repayment": {
23 "beneficiary": {
24 "additional_info": {
25 "business_area": "<string>",
26 "business_phone_number": "<string>",
27 "business_registration_expiry_date": "<string>",
28 "business_registration_number": "<string>",
29 "business_registration_type": "<string>",
30 "external_identifier": "<string>",
31 "external_name": "<string>",
32 "legal_rep_address": {
33 "city": "<string>",
34 "country_code": "<string>",
35 "full_address": "<string>",
36 "postcode": "<string>",
37 "state": "<string>",
38 "street_address": "<string>"
39 },
40 "legal_rep_bank_account_number": "<string>",
41 "legal_rep_date_of_birth": "<string>",
42 "legal_rep_email": "<string>",
43 "legal_rep_first_name": "<string>",
44 "legal_rep_first_name_in_chinese": "<string>",
45 "legal_rep_id_expiry_date": "<string>",
46 "legal_rep_id_number": "<string>",
47 "legal_rep_id_type": "<string>",
48 "legal_rep_last_name": "<string>",
49 "legal_rep_last_name_in_chinese": "<string>",
50 "legal_rep_mobile_number": "<string>",
51 "legal_rep_nationality": "<string>",
52 "legal_rep_occupation": "<string>",
53 "personal_email": "<string>",
54 "personal_first_name_in_chinese": "<string>",
55 "personal_id_expiry_date": "<string>",
56 "personal_id_number": "<string>",
57 "personal_id_type": "<string>",
58 "personal_last_name_in_chinese": "<string>",
59 "personal_mobile_number": "<string>",
60 "personal_nationality": "<string>",
61 "personal_occupation": "<string>",
62 "recipient_account_id": "<string>",
63 "security_question": "<string>",
64 "security_question_answer": "<string>"
65 },
66 "address": {
67 "city": "<string>",
68 "country_code": "<string>",
69 "full_address": "<string>",
70 "postcode": "<string>",
71 "state": "<string>",
72 "street_address": "<string>"
73 },
74 "bank_details": {
75 "account_currency": "<string>",
76 "account_name": "<string>",
77 "account_name_alias": "<string>",
78 "account_number": "<string>",
79 "account_routing_type1": "<string>",
80 "account_routing_type2": "<string>",
81 "account_routing_value1": "<string>",
82 "account_routing_value2": "<string>",
83 "bank_account_category": "<string>",
84 "bank_branch": "<string>",
85 "bank_city": "<string>",
86 "bank_country_code": "<string>",
87 "bank_name": "<string>",
88 "bank_state": "<string>",
89 "bank_street_address": "<string>",
90 "binding_mobile_number": "<string>",
91 "iban": "<string>",
92 "intermediary_bank_name": "<string>",
93 "intermediary_bank_swift_code": "<string>",
94 "local_clearing_system": "<string>",
95 "swift_code": "<string>"
96 },
97 "company_name": "<string>",
98 "date_of_birth": "<string>",
99 "digital_wallet": {
100 "account_name": "<string>",
101 "country_code": "<string>",
102 "currency": "<string>",
103 "id_type": "<string>",
104 "id_value": "<string>",
105 "provider": "<string>"
106 },
107 "entity_type": "<string>",
108 "first_name": "<string>",
109 "last_name": "<string>"
110 }
111 },
112 "request_id": "e26fe780-ac29-4130-b650-edb1cc1bd4a4",
113 "status": "ACTIVE",
114 "updated_at": "<date-time>"
115}
Was this section helpful?

Get list of loans

GET /partner-api/v1/lending/loans

Gets a list of Loans based on the query parameters.

Parameters
statusstring

The status of the loan. One of the following:

  • DRAFT: The loan is a draft and requires the borrower to confirm the contract.
  • ACCEPTED: The loan offer is accepted by the borrower and waiting to be funded.
  • ACTIVE: The loan is activated and the borrower can use the loan.
  • REPAYMENT_FAILED: The repayment of the loan is failed.
  • CLOSED: The loan is closed. No further disbursement or payment could be made on this loan.
closure_typestring

Indicates how the loan is closed. One of the following:

  • ABANDONED: The loan is abandoned by the lender or the borrower before it’s funded.
  • REPAID: The loan is fully repaid and all obligations are met between the borrower and lender.
  • WRITTEN_OFF: The lender no longer expects the repayment from the borrower. So the lender closes the loan and marks it as a bad debt.
from_created_atstring

The start time of created_at in ISO8601 format.

to_created_atstring

The end time of created_at in ISO8601 format.

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.

Response body - 200 OK
has_moreboolean

A flag which identifies whether there are more results.

itemsarray

The paginated loan objects.

items.activated_atstring

The time when this loan becomes active.

items.app_idstring

The unique identifier of the lender application.

items.balancesobject

The balances of the loan.

items.balances.total_fee_amountnumber

The fee amount of the loan. Only applicable when the loan type is TERM_LOAN.

items.balances.total_paid_amountnumber

The total paid amount of the loan through loan transaction API. Equals to the sum of all loan transaction amounts which status is COMPLETED. Only applicable when the loan type is TERM_LOAN.

items.balances.total_principal_amountnumber

The principal amount of the loan. Only applicable when the loan type is TERM_LOAN.

items.borrower_account_idstring

The Airwallex account unique identifier of the borrower.

items.closed_atstring

The time when this loan is closed.

items.closure_typestring

Indicates how the loan is closed. One of the following:

  • ABANDONED: The loan is abandoned by the lender or the borrower before it’s funded.
  • REPAID: The loan is fully repaid and all obligations are met between the borrower and lender.
  • WRITTEN_OFF: The lender no longer expects the repayment from the borrower. So the lender closes the loan and marks it as a bad debt.
items.consent_urlstring

The URL of the Airwallex web page where the customer consent is collected.

items.created_atstring

The time when this loan was created.

items.currencyobject

The currency of the loan product.

items.idstring

The unique identifier of the loan.

items.loan_recoveryobject

A collection of methods that help the lender to mitigate the loss in the event of delinquency or default. Note: This is only applicable to specific partners.

items.loan_recovery.active_restrictionsarray

A list of the withdrawal restrictions that are currently applied on the borrower due to delinquency or default.

items.loan_recovery.applicable_restrictionsarray

The list of applicable restrictions that the lender can set on the borrower’s Airwallex account in case of a delinquency or bad debt happened to this loan. Immutable after the loan origination. Restrictions include: ALL which limits all fund outbound activities from the account.

items.loan_typestring

The type of the loan. One of the following:

  • TERM_LOAN: A term loan is a fixed amount borrowed for a specific period, typically repaid in regular installments over the agreed-upon term.
  • CREDIT_LINE: A credit line is a flexible form of borrowing that allows borrowers to access funds as needed up to the credit limit.
items.loan_type_display_textstring

The text of the loan type which will be displayed to the borrower in the Airwallex UI. If not provided, loan_type will be used for display.

items.repaymentobject

Indicates how the loan should be repaid.

items.repayment.beneficiaryobject

Beneficiary details for loan repayment

items.repayment.beneficiary.additional_infoobject
items.repayment.beneficiary.additional_info.business_areastring
items.repayment.beneficiary.additional_info.business_phone_numberstring
items.repayment.beneficiary.additional_info.business_registration_expiry_datestring
items.repayment.beneficiary.additional_info.business_registration_numberstring
items.repayment.beneficiary.additional_info.business_registration_typestring
items.repayment.beneficiary.additional_info.external_identifierstring
items.repayment.beneficiary.additional_info.external_namestring
items.repayment.beneficiary.additional_info.legal_rep_addressobject
items.repayment.beneficiary.additional_info.legal_rep_address.citystring
items.repayment.beneficiary.additional_info.legal_rep_address.country_codestring
items.repayment.beneficiary.additional_info.legal_rep_address.full_addressstring
items.repayment.beneficiary.additional_info.legal_rep_address.postcodestring
items.repayment.beneficiary.additional_info.legal_rep_address.statestring
items.repayment.beneficiary.additional_info.legal_rep_address.street_addressstring
items.repayment.beneficiary.additional_info.legal_rep_bank_account_numberstring
items.repayment.beneficiary.additional_info.legal_rep_date_of_birthstring
items.repayment.beneficiary.additional_info.legal_rep_emailstring
items.repayment.beneficiary.additional_info.legal_rep_first_namestring
items.repayment.beneficiary.additional_info.legal_rep_first_name_in_chinesestring
items.repayment.beneficiary.additional_info.legal_rep_id_expiry_datestring
items.repayment.beneficiary.additional_info.legal_rep_id_numberstring
items.repayment.beneficiary.additional_info.legal_rep_id_typestring
items.repayment.beneficiary.additional_info.legal_rep_last_namestring
items.repayment.beneficiary.additional_info.legal_rep_last_name_in_chinesestring
items.repayment.beneficiary.additional_info.legal_rep_mobile_numberstring
items.repayment.beneficiary.additional_info.legal_rep_nationalitystring
items.repayment.beneficiary.additional_info.legal_rep_occupationstring
items.repayment.beneficiary.additional_info.personal_emailstring
items.repayment.beneficiary.additional_info.personal_first_name_in_chinesestring
items.repayment.beneficiary.additional_info.personal_id_expiry_datestring
items.repayment.beneficiary.additional_info.personal_id_numberstring
items.repayment.beneficiary.additional_info.personal_id_typestring
items.repayment.beneficiary.additional_info.personal_last_name_in_chinesestring
items.repayment.beneficiary.additional_info.personal_mobile_numberstring
items.repayment.beneficiary.additional_info.personal_nationalitystring
items.repayment.beneficiary.additional_info.personal_occupationstring
items.repayment.beneficiary.additional_info.recipient_account_idstring
items.repayment.beneficiary.additional_info.security_questionstring
items.repayment.beneficiary.additional_info.security_question_answerstring
items.repayment.beneficiary.addressobject
items.repayment.beneficiary.address.citystring
items.repayment.beneficiary.address.country_codestring
items.repayment.beneficiary.address.full_addressstring
items.repayment.beneficiary.address.postcodestring
items.repayment.beneficiary.address.statestring
items.repayment.beneficiary.address.street_addressstring
items.repayment.beneficiary.bank_detailsobject
items.repayment.beneficiary.bank_details.account_currencystring
items.repayment.beneficiary.bank_details.account_namestring
items.repayment.beneficiary.bank_details.account_name_aliasstring
items.repayment.beneficiary.bank_details.account_numberstring
items.repayment.beneficiary.bank_details.account_routing_type1string
items.repayment.beneficiary.bank_details.account_routing_type2string
items.repayment.beneficiary.bank_details.account_routing_value1string
items.repayment.beneficiary.bank_details.account_routing_value2string
items.repayment.beneficiary.bank_details.bank_account_categorystring
items.repayment.beneficiary.bank_details.bank_branchstring
items.repayment.beneficiary.bank_details.bank_citystring
items.repayment.beneficiary.bank_details.bank_country_codestring
items.repayment.beneficiary.bank_details.bank_namestring
items.repayment.beneficiary.bank_details.bank_statestring
items.repayment.beneficiary.bank_details.bank_street_addressstring
items.repayment.beneficiary.bank_details.binding_mobile_numberstring
items.repayment.beneficiary.bank_details.ibanstring
items.repayment.beneficiary.bank_details.intermediary_bank_namestring
items.repayment.beneficiary.bank_details.intermediary_bank_swift_codestring
items.repayment.beneficiary.bank_details.local_clearing_systemstring
items.repayment.beneficiary.bank_details.swift_codestring
items.repayment.beneficiary.company_namestring
items.repayment.beneficiary.date_of_birthstring
items.repayment.beneficiary.digital_walletobject
items.repayment.beneficiary.digital_wallet.account_namestring
items.repayment.beneficiary.digital_wallet.country_codestring
items.repayment.beneficiary.digital_wallet.currencystring
items.repayment.beneficiary.digital_wallet.id_typestring
items.repayment.beneficiary.digital_wallet.id_valuestring
items.repayment.beneficiary.digital_wallet.providerstring
items.repayment.beneficiary.entity_typestring
items.repayment.beneficiary.first_namestring
items.repayment.beneficiary.last_namestring
items.request_idstring

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

items.statusstring

The status of the loan. One of the following:

  • DRAFT: The loan is a draft and requires the borrower to confirm the contract.
  • ACCEPTED: The loan offer is accepted by the borrower and waiting to be funded.
  • ACTIVE: The loan is activated and the borrower can use the loan.
  • REPAYMENT_FAILED: The repayment of the loan is overdue.
  • CLOSED: The loan is closed. No further disbursement or payment could be made on this loan. The loan could be closed in situations specified in closure_type.
items.updated_atstring

The time when this loan was last updated.

GET /partner-api/v1/lending/loans
$curl --request GET \
> --url 'https://api-demo.airwallex.com/partner-api/v1/lending/loans' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "has_more": false,
3 "items": [
4 {
5 "app_id": "appid_30dc2df7ac234",
6 "balances": {
7 "total_fee_amount": 1000,
8 "total_paid_amount": 8000,
9 "total_principal_amount": 10000
10 },
11 "borrower_account_id": "acct_ca6530db68a9",
12 "closure_type": "REPAID",
13 "consent_url": "https://www.airwallex.com/app/oauth/loan?loan_id=d2bde493-093b-4e68-b38a-0df603fb3ff6s",
14 "currency": "HKD",
15 "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
16 "loan_recovery": {
17 "active_restrictions": [],
18 "applicable_restrictions": []
19 },
20 "loan_type": "CREDIT_LINE",
21 "loan_type_display_text": "Revenue-based Financing",
22 "request_id": "e26fe780-ac29-4130-b650-edb1cc1bd4a4",
23 "status": "ACTIVE"
24 }
25 ]
26}
Was this section helpful?