Preview a One-Time Loan

Previewing a loan is a POST API call for the Node Resources.

This API call is just like applying for a one-time loan, but the loan is not created. This API call should be used to generate a loan preview for the end user before the final loan is created.

Request

POST /v3.1/users/5c26721d877971006217fa5a/nodes HTTP/1.1
Host: https://uat-api.synapsefi.com
X-SP-USER-IP: 255.127.79.76
X-SP-USER: oauth_QqpLD7NBKOmjGR10ZHfvx2JYA6to58lUhnzIaPrF|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json
{
  "type": "LOAN-US",
  "preview_only":true,
  "generate_agreement":true,
  "info": {
  	"loan_type":"ONE-TIME",
    "nickname":"My Loan",
    "credit_limit":{
    	"amount":40.10,
    	"currency":"USD"
    },
    "interest": {
    	"apr": 3,
    	"cap": 5
    },
    "payment_node_id":"5c2e4b4c03dfb100680b858f",
    "disbursement_node_id":"5c2e4b4c03dfb100680b858f",
    "document_id":"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
    "schedule":"MONTHLY",
    "next_payment":30,
    "num_payments":10
  },
  "extra":{
  	"supp_id":"xx123c"
  }
}
curl -X POST \
  https://uat-api.synapsefi.com/v3.1/users/5c26721d877971006217fa5a/nodes \
  -H 'Content-Type: application/json' \
  -H 'X-SP-USER: oauth_QqpLD7NBKOmjGR10ZHfvx2JYA6to58lUhnzIaPrF|e83cf6ddcf778e37bfe3d48fc78a6502062fc' \
  -H 'X-SP-USER-IP: 255.127.79.76' \
  -d '{
  "type": "LOAN-US",
  "preview_only":true,
  "info": {
  	"loan_type":"ONE-TIME",
    "nickname":"My Loan",
    "credit_limit":{
    	"amount":40.10,
    	"currency":"USD"
    },
    "interest": {
    	"apr": 10,
    	"cap": 5
    },
    "payment_node_id":"5c2e4b4c03dfb100680b858f",
    "disbursement_node_id":"5c2e4b4c03dfb100680b858f",
    "document_id":"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
    "schedule":"MONTHLY",
    "next_payment":30,
    "num_payments":10
  },
  "extra":{
  	"supp_id":"xx123c"
  }
}'
body= {
  "type": "LOAN-US",
  "preview_only":true,
  "info": {
  	"loan_type":"ONE-TIME",
    "nickname":"My Loan",
    "credit_limit":{
    	"amount":40.10,
    	"currency":"USD"
    }
   
}

user.create_node(body, idempotency_key='123456')
const body = {
  "type": "LOAN-US",
  "preview_only":true,
  "info": {
  	"loan_type":"ONE-TIME",
    "nickname":"My Loan",
    "credit_limit":{
    	"amount":40.10,
    	"currency":"USD"
    }
   
};

user.createNode(body);
body= {
  "type": "LOAN-US",
  "preview_only":true,
  "info": {
  	"loan_type":"ONE-TIME",
    "nickname":"My Loan",
    "credit_limit":{
    	"amount":40.10,
    	"currency":"USD"
    }
   ...
}

user.create_node(payload: body)
$extra = (object)[
  "supp_id" => "xx123c"
];
$credit_limit = (object)[
 "amount" => 40.10,
 "currency" => "USD"
];
$interest = (object)[
 "apr" => 10,
 "cap" => 5
];

$info = (object)[
 "loan_type" => "ONE-TIME",
 "nickname" => "My Loan",
 "credit_limit" => $credit_limit,
 "interest" => $interest,
 "payment_node_id" => "5c2e4b4c03dfb100680b858f",
 "disbursement_node_id" => "5c2e4b4c03dfb100680b858f",  
"document_id" =>"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
 "schedule"=>"MONTHLY",
 "next_payment"=>30,
 "num_payments"=>10
 "extra" => $extra
];

$body = (object) [
 "type" => "LOAN-US",
 "preview_only" => true,
 "info" => $info,
 "extra" => $extra,
];

$user->create_node($body);
body := `{
  "type": "LOAN-US",
  "preview_only":true,
  "info": {
  	"loan_type":"ONE-TIME",
    "nickname":"My Loan",
    "credit_limit":{
    	"amount":40.10,
    	"currency":"USD"
    }
   …...
}`

data, err := user.CreateNode(body)

Response

{
    "error_code": "0",
    "http_code": "200",
    "limit": 20,
    "node_count": 1,
    "nodes": [
        {
            "_id": "PREVIEW",
            "_links": {
                "self": {
                    "href": "https://uat-api.synapsefi.com/v3.1/users/5c26721d877971006217fa5a/nodes/PREVIEW"
                }
            },
            "_v": 2,
            "allowed": "CREDIT",
            "client": {
                "id": "589acd9ecb3cd400fa75ac06",
                "name": "SynapseFI"
            },
            "extra": {
                "note": null,
                "supp_id": "xx123c"
            },
            "info": {
                "agreements": [
                    {
                        "type": "LOAN_AGREEMENT",
                        "url": "https://cdn.synapsepay.com/uploads/2019/01/03/k1xfaLEi0FRKMOtWTXjSe5rmzvP7DYbh3QVAgoHnUs4IyG0869.pdf"
                    }
                ],
                "balance": {
                    "amount": 0,
                    "currency": "USD"
                },
                "credit_limit": {
                    "amount": 40.1,
                    "currency": "USD"
                },
                "disbursement_node_id": "5c2e4b4c03dfb100680b858f",
                "document_id": "2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
                "installment_amount": 4.21,
                "installments": [
                    {
                        "amount": 4.21,
                        "date": 1549129843000
                    },
                    {
                        "amount": 4.21,
                        "date": 1551549043000
                    },
                    {
                        "amount": 4.21,
                        "date": 1554227443000
                    },
                    {
                        "amount": 4.21,
                        "date": 1556819443000
                    },
                    {
                        "amount": 4.21,
                        "date": 1559497843000
                    },
                    {
                        "amount": 4.21,
                        "date": 1562089843000
                    },
                    {
                        "amount": 4.21,
                        "date": 1564768243000
                    },
                    {
                        "amount": 4.21,
                        "date": 1567446643000
                    },
                    {
                        "amount": 4.21,
                        "date": 1570038643000
                    },
                    {
                        "amount": 4.21,
                        "date": 1572717043000
                    }
                ],
                "interest": {
                    "accrued": 0,
                    "apr": 3,
                    "cap": 5
                },
                "loan_type": "ONE-TIME",
                "name_on_account": " ",
                "next_payment": 1549129843000,
                "nickname": "My Loan",
                "num_payments": 10,
                "payment_node_id": "5c2e4b4c03dfb100680b858f",
              	"remaining_payments": 10,
                "schedule": "MONTHLY"
            },
            "is_active": true,
            "timeline": [],
            "type": "LOAN-US",
            "user_id": "5c26721d877971006217fa5a"
        }
    ],
    "page_count": 1,
    "success": true
}
{
    "error_code": "0",
    "http_code": "200",
    "limit": 20,
    "node_count": 1,
    "nodes": [
        {
            "_id": "PREVIEW",
            "_links": {
                "self": {
                    "href": "https://uat-api.synapsefi.com/v3.1/users/5c26721d877971006217fa5a/nodes/PREVIEW"
                }
            },
            "_v": 2,
            "allowed": "REJECTED",
            "client": {
                "id": "589acd9ecb3cd400fa75ac06",
                "name": "SynapseFI"
            },
            "extra": {
                "note": "The LOANTYPE amount requested is higher than what we can offer you. Your limit is 100.",
                "supp_id": "xx123c"
            },
            "info": {
                "agreements": [
                    {
                        "type": "ADVERSE_ACTION",
                        "url": "https://cdn.synapsepay.com/uploads/2019/01/03/ihEToBrDdLjeuVStqs40nRKPQ2lbWXYkOH0a9Iz7NMwx5ZGvcU.pdf"
                    }
                ],
                "balance": {
                    "amount": 0,
                    "currency": "USD"
                },
                "credit_limit": {
                    "amount": 0,
                    "currency": "USD"
                },
                "disbursement_node_id": "5c2e4b4c03dfb100680b858f",
                "document_id": "2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
                "installment_amount": 0,
                "installments": [],
                "interest": {
                    "accrued": 0,
                    "apr": 10,
                    "cap": 0.05
                },
                "loan_type": "ONE-TIME",
                "name_on_account": " ",
                "next_payment": null,
                "nickname": "My Loan",
                "num_payments": 0,
                "payment_node_id": "5c2e4b4c03dfb100680b858f",
                "schedule": "MONTHLY"
            },
            "is_active": true,
            "timeline": [],
            "type": "LOAN-US",
            "user_id": "5c26721d877971006217fa5a"
        }
    ],
    "page_count": 1,
    "success": true
}

Preview a One-Time Loan


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.