Loans
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:
- Loan application: use OAuth APIs to collect customer data from Airwallex for credit assessment.
- Loan creation: use Create a Loan API to create a draft loan.
- 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_urlon the Loan object. - Loan management: use Update a Loan API to update the status of a loan.
- Loan repayment: use Create A Loan Transaction API to make repayments for the loan.
POST /partner-api/v1/lending/loansGET /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.
The balances of the loan. Only required when loan_type is TERM_LOAN.
The fee amount of the loan. Only applicable when the loan type is TERM_LOAN.
The principal amount of the loan. Only applicable when the loan type is TERM_LOAN.
The Airwallex account unique identifier of the borrower.
The currency of the loan product.
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.
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.
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.
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.
Indicates how the loan should be repaid.
Beneficiary details for loan repayment
A unique request identifier specified by you for idempotency. Up to 50 characters.
The time when this loan becomes active.
The unique identifier of the lender application.
The balances of the loan.
The fee amount of the loan. Only applicable when the loan type is TERM_LOAN.
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.
The principal amount of the loan. Only applicable when the loan type is TERM_LOAN.
The Airwallex account unique identifier of the borrower.
The time when this loan is closed.
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.
The URL of the Airwallex web page where the customer consent is collected.
The time when this loan was created.
The currency of the loan product.
The unique identifier of the loan.
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.
A list of the withdrawal restrictions that are currently applied on the borrower due to delinquency or default.
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.
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.
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.
Indicates how the loan should be repaid.
Beneficiary details for loan repayment
A unique request identifier specified by you for idempotency. Up to 50 characters.
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.
The time when this loan was last updated.
$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">}'
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": 100008 },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}
Get loan by ID
GET /partner-api/v1/lending/loans/{loanId}
Gets the details of a Loan by unique identifier.
The unique identifier of the loan object.
The time when this loan becomes active.
The unique identifier of the lender application.
The balances of the loan.
The fee amount of the loan. Only applicable when the loan type is TERM_LOAN.
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.
The principal amount of the loan. Only applicable when the loan type is TERM_LOAN.
The Airwallex account unique identifier of the borrower.
The time when this loan is closed.
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.
The URL of the Airwallex web page where the customer consent is collected.
The time when this loan was created.
The currency of the loan product.
The unique identifier of the loan.
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.
A list of the withdrawal restrictions that are currently applied on the borrower due to delinquency or default.
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.
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.
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.
Indicates how the loan should be repaid.
Beneficiary details for loan repayment
A unique request identifier specified by you for idempotency. Up to 50 characters.
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.
The time when this loan was last updated.
$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'
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": 100008 },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}
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.
The unique identifier of the loan object.
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.
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.
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.
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.
Indicates how the loan should be repaid.
Beneficiary details for loan repayment
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
The time when this loan becomes active.
The unique identifier of the lender application.
The balances of the loan.
The fee amount of the loan. Only applicable when the loan type is TERM_LOAN.
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.
The principal amount of the loan. Only applicable when the loan type is TERM_LOAN.
The Airwallex account unique identifier of the borrower.
The time when this loan is closed.
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.
The URL of the Airwallex web page where the customer consent is collected.
The time when this loan was created.
The currency of the loan product.
The unique identifier of the loan.
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.
A list of the withdrawal restrictions that are currently applied on the borrower due to delinquency or default.
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.
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.
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.
Indicates how the loan should be repaid.
Beneficiary details for loan repayment
A unique request identifier specified by you for idempotency. Up to 50 characters.
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.
The time when this loan was last updated.
$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">}'
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": 100008 },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}
Get list of loans
GET /partner-api/v1/lending/loans
Gets a list of Loans based on the query parameters.
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.
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.
The start time of created_at in ISO8601 format.
The end time of created_at in ISO8601 format.
The number of the page. Starts from 0. Defaults to 0.
The number of items returned per page. Defaults to 20.
A flag which identifies whether there are more results.
The paginated loan objects.
The time when this loan becomes active.
The unique identifier of the lender application.
The balances of the loan.
The fee amount of the loan. Only applicable when the loan type is TERM_LOAN.
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.
The principal amount of the loan. Only applicable when the loan type is TERM_LOAN.
The Airwallex account unique identifier of the borrower.
The time when this loan is closed.
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.
The URL of the Airwallex web page where the customer consent is collected.
The time when this loan was created.
The currency of the loan product.
The unique identifier of the loan.
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.
A list of the withdrawal restrictions that are currently applied on the borrower due to delinquency or default.
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.
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.
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.
Indicates how the loan should be repaid.
Beneficiary details for loan repayment
A unique request identifier specified by you for idempotency. Up to 50 characters.
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.
The time when this loan was last updated.
$curl --request GET \> --url 'https://api-demo.airwallex.com/partner-api/v1/lending/loans' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
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": 1000010 },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}