### GET /v2/returnreasons Source: https://dev.credova.com/docs/api/v2/reference Retrieves all return reasons available within the system. ```APIDOC ## GET /v2/returnreasons ### Description Returns all return reasons currently configured in the system. ### Method GET ### Endpoint /v2/returnreasons ### Response #### Success Response (200) - Returns a list of available return reasons. ``` -------------------------------- ### GET /v2/returnreasons Source: https://dev.credova.com/docs/api/v2/reference Retrieves a list of available return reasons for lending transactions. ```APIDOC ## GET /v2/returnreasons ### Description Retrieves a list of all defined return reasons. This is typically used to populate dropdowns or validate inputs when processing returns. ### Method GET ### Endpoint https://sandbox-lending-api.credova.com/v2/returnreasons ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example ```json // No request body required ``` ### Response #### Success Response (200) - **publicId** (string) - The unique identifier for the return reason. - **description** (string) - The human-readable description of the return reason. #### Response Example ```json [ { "publicId": "string", "description": "string" } ] ``` -------------------------------- ### GET /v2/applications/from/{storeCode}/at/{date} Source: https://dev.credova.com/docs/api/v2/reference Retrieves a list of applications created at a specific store on a given date. ```APIDOC ## GET /v2/applications/from/{storeCode}/at/{date} ### Description Returns a list of applications and their statuses for a specific store on a specific date. ### Method GET ### Endpoint https://sandbox-lending-api.credova.com/v2/applications/from/{storeCode}/at/{date} ### Parameters #### Path Parameters - **storeCode** (string) - Required - The unique code associated with the store. - **date** (string) - Required - The date in YYYY-MM-DD format. ### Request Example GET /v2/applications/from/STORE123/at/2023-10-27 ### Response #### Success Response (200) - **publicId** (string) - The Public ID associated with the application. - **status** (string) - Current status of the application. - **paymentInfo** (object) - Payment information details. #### Response Example [ { "publicId": "c4c4eede-cbb0-4efd-8e10-aa1d02392ce6", "status": "Approved", "paymentInfo": {} } ] ``` -------------------------------- ### Initiate Return Request via PHP Source: https://dev.credova.com/docs/api/v2/reference Sends a POST request to the /v2/applications/{publicId}/requestreturn endpoint to start the return process. Requires an authentication token and specific return details such as agent information and return type. ```php $authentication_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"; $public_id = "c4c4eede-cbb0-4efd-8e10-aa1d02392ce6"; $headers = array( "Content-Type: application/json", "Authorization: Bearer ".$authentication_token ); $ch = curl_init(); $fields = array( "agentName" => "Jonh", "phone" => "123-456-789", "email" => "lorem@ipsum.com", "reason" => "customer request", "returnType" => "1", "returnReasonPublicId" => "teydfgJhbTiulkjTUCUzI1NiIsnR5LKJosp6" ); curl_setopt($ch, CURLOPT_URL, "https://sandbox-lending-api.credova.com/v2/applications/".$public_id."/requestreturn"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); $response = curl_exec($ch); echo "Response is ".$response; ``` -------------------------------- ### Return All Return Reasons - PHP Source: https://dev.credova.com/docs/api/v2/reference This PHP script shows how to fetch all available return reasons from the system using the Credova API. It sets up the authentication token and content type headers, then sends a GET request to the return reasons endpoint. No request arguments are required for this endpoint. ```php ``` -------------------------------- ### Get Application Status by Public ID (PHP) Source: https://dev.credova.com/docs/api/v2/reference Retrieves the status of a Credova application using its public ID. This PHP example demonstrates how to construct the request, including setting headers and making a cURL request to the API endpoint. ```php ``` -------------------------------- ### GET /v2/financingpartners Source: https://dev.credova.com/docs/api/v2/reference Retrieves a list of all active financing partners associated with the authenticated store. ```APIDOC ## GET /v2/financingpartners ### Description Returns all the active financing partners associated with the authenticated store. ### Method GET ### Endpoint /v2/financingpartners ### Response #### Success Response (200) - **code** (string) - Code - **name** (string) - Name - **displayName** (string) - Display Name - **street** (string) - Street - **suiteApartment** (string) - Suite/Apartment - **city** (string) - City - **state** (string) - State - **zipCode** (string) - Zip Code - **phone** (string) - Phone Number #### Response Example [ { "code": "", "name": "", "displayName": "", "street": "", "suiteApartment": "", "city": "", "state": "", "zipCode": "", "phone": "" } ] ``` -------------------------------- ### Return All Financing Partners - PHP Source: https://dev.credova.com/docs/api/v2/reference This PHP script demonstrates how to retrieve a list of all active financing partners associated with the authenticated store using the Credova API. It configures the necessary headers for authentication and makes a GET request to the financing partners endpoint. The response will contain details for each partner. ```php array( 0 => "1234", 1 => "9876" ) ); cost_setopt($ch, CURLOPT_URL, "https://sandbox-lending-api.credova.com/v2/applications/" . $public_id . "/orders"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, array()); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); $response = curl_exec($ch); echo "Response is " . $response; ``` -------------------------------- ### GET /v2/applications/phone/{phone}/status Source: https://dev.credova.com/docs/api/v2/reference Retrieves the current status and details of a lending application or pre-qualification associated with a specific phone number. ```APIDOC ## GET /v2/applications/phone/{phone}/status ### Description Retrieves the current status and financial details of an application linked to a customer's phone number. ### Method GET ### Endpoint https://sandbox-lending-api.credova.com/v2/applications/phone/{phone}/status ### Parameters #### Path Parameters - **phone** (string) - Required - The customer's phone number. ### Request Example GET /v2/applications/phone/815-227-1188/status ### Response #### Success Response (200) - **publicId** (string) - The Public ID associated with the application. - **applicationId** (int) - Internal application ID. - **status** (string) - Current status (e.g., Pending, Approved, Declined). - **phone** (string) - Customer's phone number. - **approvalAmount** (decimal) - Approval Amount. #### Response Example { "publicId": "c4c4eede-cbb0-4efd-8e10-aa1d02392ce6", "applicationId": 12345, "status": "Approved", "phone": "815-227-1188", "approvalAmount": 500.00 } ``` -------------------------------- ### Get Lowest Payment Option using PHP Source: https://dev.credova.com/docs/api/v2/reference Retrieves the lowest monthly payment option, financed period, and early buyout options for a specific store. This POST request to the /v2/calculator/store/{code}/amount/{financedAmount}/lowestPaymentOption endpoint requires store code and financed amount. ```php ``` -------------------------------- ### Get Application Status by Phone Number (PHP) Source: https://dev.credova.com/docs/api/v2/reference This snippet demonstrates how to retrieve the status of a Credova application using a customer's phone number. It utilizes cURL to send a GET request to the API endpoint, including necessary headers for authentication and content type. The response contains detailed information about the application's status. ```php ``` -------------------------------- ### GET /v2/applications/phone/{phone}/status Source: https://dev.credova.com/docs/api/v2/reference Retrieves application status using a customer's phone number. This endpoint should not be used for order validation. ```APIDOC ## GET /v2/applications/phone/{phone}/status ### Description Retrieves application status using a customer's phone number. This endpoint should not be used for order validation. ### Method GET ### Endpoint /v2/applications/phone/{phone}/status ### Parameters #### Path Parameters - **phone** (string) - Required - The phone number to be searched. Must follow the patterns: `999-999-9999` or `9999999999`. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET \ 'https://sandbox-lending-api.credova.com/v2/applications/phone/5551234567/status' \ -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \ -H 'Content-Type: application/json' ``` ### Response #### Success Response (200) - **publicId** (string) - The Public ID associated with the application or pre-qualification. - **applicationId** (integer) - Our internal application ID (nullable, when there is no application). - **status** (string) - Current status. Possible values: Pending, Pre-qualified, Ineligible, Declined, Approved, PendingApproval, SignedWaitingForInvoice, SignedWaitingForInvoiceApproval, Authorized, Signed, Funded, PendingReturn, Returned, Expired, Error. - **phone** (string) - Customer's phone number. - **approvalAmount** (decimal) - Approval Amount (nullable, when status is Declined). - **borrowedAmount** (decimal) - Contract's Borrowed Amount (nullable, when status is not Signed). - **invoiceAmount** (decimal) - Contract's Invoice Amount (nullable, when status is not Signed). - **totalInStorePayment** (decimal) - Contract's Total In Store Payment (nullable, when status is not Signed). - **financingPartnerCode** (string) - Contract's Financing Partner Code (nullable, when status is not Signed). - **financingPartnerName** (string) - Contract's Financing Partner Name (nullable, when status is not Signed). - **financingPartnerDisplayName** (string) - Contract's Financing Partner Display Name (nullable, when status is not Signed). - **paymentInfo** (object) - Payment information (nullable, when payment is not Created). - **transferId** (string) - Payment Transfer ID (nullable, when status is manually processed). - **wireReferenceId** (string) - Payment Wire Reference ID (nullable, when status is not manually processed). - **date** (date) - Payment Date. - **amount** (decimal) - Payment Amount. - **status** (string) - Payment Status. Possible values: pending, processed, manually processed, returned. #### Response Example ```json { "publicId": "c4c4eede-cbb0-4efd-8e10-aa1d02392ce6", "applicationId": 12345, "status": "Approved", "phone": "555-123-4567", "approvalAmount": 1000.00, "borrowedAmount": 800.00, "invoiceAmount": 800.00, "totalInStorePayment": 200.00, "financingPartnerCode": "FP123", "financingPartnerName": "Credova Financing", "financingPartnerDisplayName": "Credova", "paymentInfo": { "transferID": "TRN987654", "wireReferenceId": null, "date": "2023-10-27", "amount": 800.00, "status": "processed" } } ``` ``` -------------------------------- ### GET /v2/applications/{publicId}/status Source: https://dev.credova.com/docs/api/v2/reference Retrieves the status of a specific application using its public ID. This is useful for tracking the progress of a user's application or pre-qualification. ```APIDOC ## GET /v2/applications/{publicId}/status ### Description Retrieves the status of a specific application using its public ID. This is useful for tracking the progress of a user's application or pre-qualification. ### Method GET ### Endpoint /v2/applications/{publicId}/status ### Parameters #### Path Parameters - **publicId** (string) - Required - The Public ID associated with the application or pre-qualification. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET \ 'https://sandbox-lending-api.credova.com/v2/applications/c4c4eede-cbb0-4efd-8e10-aa1d02392ce6/status' \ -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \ -H 'Content-Type: application/json' ``` ### Response #### Success Response (200) - **publicId** (string) - The Public ID associated with the application or pre-qualification. - **applicationId** (integer) - Our internal application ID (nullable, when there is no application). - **status** (string) - Current status. Possible values: Pending, Pre-qualified, Ineligible, Declined, Approved, PendingApproval, SignedWaitingForInvoice, SignedWaitingForInvoiceApproval, Authorized, Signed, Funded, PendingReturn, Returned, Expired, Error. - **phone** (string) - Customer's phone number. - **approvalAmount** (decimal) - Approval Amount (nullable, when status is Declined). - **borrowedAmount** (decimal) - Contract's Borrowed Amount (nullable, when status is not Signed). - **invoiceAmount** (decimal) - Contract's Invoice Amount (nullable, when status is not Signed). - **totalInStorePayment** (decimal) - Contract's Total In Store Payment (nullable, when status is not Signed). - **financingPartnerCode** (string) - Contract's Financing Partner Code (nullable, when status is not Signed). - **financingPartnerName** (string) - Contract's Financing Partner Name (nullable, when status is not Signed). - **financingPartnerDisplayName** (string) - Contract's Financing Partner Display Name (nullable, when status is not Signed). - **paymentInfo** (object) - Payment information (nullable, when payment is not Created). - **transferId** (string) - Payment Transfer ID (nullable, when status is manually processed). - **wireReferenceId** (string) - Payment Wire Reference ID (nullable, when status is not manually processed). - **date** (date) - Payment Date. - **amount** (decimal) - Payment Amount. - **status** (string) - Payment Status. Possible values: pending, processed, manually processed, returned. #### Response Example ```json { "publicId": "c4c4eede-cbb0-4efd-8e10-aa1d02392ce6", "applicationId": 12345, "status": "Approved", "phone": "555-123-4567", "approvalAmount": 1000.00, "borrowedAmount": 800.00, "invoiceAmount": 800.00, "totalInStorePayment": 200.00, "financingPartnerCode": "FP123", "financingPartnerName": "Credova Financing", "financingPartnerDisplayName": "Credova", "paymentInfo": { "transferID": "TRN987654", "wireReferenceId": null, "date": "2023-10-27", "amount": 800.00, "status": "processed" } } ``` ``` -------------------------------- ### POST /v2/applications Source: https://dev.credova.com/docs/api/v2/reference Creates a new financing application within the Credova system. ```APIDOC ## POST /v2/applications ### Description Creates a new application for financing. Requires a valid authentication token. ### Method POST ### Endpoint /v2/applications ### Parameters - Requires authentication via Bearer token in headers. ### Response #### Success Response (200) - Returns the created application details. ``` -------------------------------- ### POST /v2/applications Source: https://dev.credova.com/docs/api/v2/reference Submit a new application to Credova for processing. This endpoint allows for the inclusion of detailed customer information, address, and a list of products to be financed. ```APIDOC ## POST /v2/applications ### Description Submits a new loan application with customer details, address, and product information. ### Method POST ### Endpoint /v2/applications ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **storeCode** (string) - Required - The store's unique identifier. - **firstName** (string) - Required - Customer's first name (max 100 characters). - **middleInitial** (string) - Optional - Customer's middle initial (max 100 characters). - **lastName** (string) - Required - Customer's last name (max 100 characters). - **dateOfBirth** (datetime) - Optional - Customer's date of birth (must be at least 18 years old). - **mobilePhone** (string) - Required - Customer's mobile phone number (format: `999-999-9999` or `9999999999`). - **email** (string) - Optional - Customer's email address (max 100 characters). - **address** (object) - Optional - Customer's address details. - **street** (string) - Optional - Street name (max 40 characters, PO boxes not allowed). - **suiteApartment** (string) - Optional - Suite or apartment number (max 5 characters). - **city** (string) - Optional - City name (max 25 characters). - **state** (string) - Optional - State abbreviation (2 uppercase letters, valid US state). - **zipCode** (string) - Optional - Zip code (max 5 characters). - **products** (array of object) - Required - List of products included in the application. - **id** (string) - Optional - Product identifier (max 256 characters). - **description** (string) - Required - Product description (max 256 characters). - **serialNumber** (string) - Optional - Product serial number (max 256 characters). - **quantity** (decimal) - Required - Number of units for the product (must be greater than 0). - **value** (decimal) - Required - Total value for the product quantity (includes sales tax if not itemized separately). - **redirectUrl** (string) - Optional - URL to redirect the customer after contract signing (for redirect checkout type). - **cancelUrl** (string) - Optional - URL to redirect the customer if they cancel before signing. - **referenceNumber** (string) - Optional - Unique invoice reference number. - **authorization** (bool) - Optional - Set to `true` to initiate the authorization process. ### Request Example ```json { "storeCode": "LIPSUM", "firstName": "Lorem", "lastName": "Ipsum", "dateOfBirth": "1983-04-01", "mobilePhone": "123-456-789", "email": "lorem@ipsum.com", "referenceNumber": "3456789", "authorization": false, "address": { "street": "45999 Center Oak Plaza", "suiteApartment": "100", "city": "Sterling", "state": "VA", "zipCode": "20166" }, "products": [ { "id": "1", "description": "Foo", "serialNumber": "FOO001", "quantity": "1", "value": "1000.00" }, { "id": "2", "description": "Bar", "serialNumber": "BAR001", "quantity": "2", "value": "2200.00" } ] } ``` ### Response #### Success Response (200) - **applicationId** (string) - The unique identifier for the submitted application. - **status** (string) - The current status of the application (e.g., 'PENDING', 'APPROVED', 'DECLINED'). #### Response Example ```json { "applicationId": "app_12345abcde", "status": "PENDING" } ``` #### Error Response - **code** (integer) - Error code. - **message** (string) - Error message describing the issue. #### Error Response Example ```json { "code": 400, "message": "Invalid input data provided." } ``` ``` -------------------------------- ### POST /v2/calculator/store/{code}/amount/{financedAmount}/lowestPaymentOption Source: https://dev.credova.com/docs/api/v2/reference Retrieves the lowest monthly payment option, finance period, and early buyout details for a specific store and amount. ```APIDOC ## POST /v2/calculator/store/{code}/amount/{financedAmount}/lowestPaymentOption ### Description Returns the monthly lowest payment option, financed period, and early buyout options for a specific store. ### Method POST ### Endpoint /v2/calculator/store/{code}/amount/{financedAmount}/lowestPaymentOption ### Parameters #### Path Parameters - **code** (string) - Required - The store code. - **financedAmount** (decimal) - Required - The total amount to be financed. ### Response #### Success Response (200) - **financingPartnerCode** (string) - Financing Partner's Code - **financingPartnerName** (string) - Financing Partner's Name - **minMonthlyPayment** (decimal) - Monthly Payment minimum value - **financePeriod** (int) - Finance Period - **earlyBuyoutOptions** (array) - List of early buyout objects #### Response Example { "financingPartnerCode": "PARTNER_01", "minMonthlyPayment": 50.00, "financePeriod": 12, "earlyBuyoutOptions": [ { "month": 3, "earlyBuyoutPayment": 150.00, "savingsPercentage": 10.0 } ] } ``` -------------------------------- ### Capture Authorized Application - PHP Source: https://dev.credova.com/docs/api/v2/reference This PHP script shows how to capture a previously authorized application and sign the contract using the Credova API. It includes setting up authentication, defining the capture amount, and sending a POST request. This operation is intended for applications that have already been authorized. ```php 100.00 ); curl_setopt($ch, CURLOPT_URL, "https://sandbox-lending-api.credova.com/v3/applications/" . $public_id . "/capture"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); $response = curl_exec($ch); echo "Response is " . $response; ``` -------------------------------- ### Return Request API Source: https://dev.credova.com/docs/api/v2/reference Initiates the return request process for an application. The application must be signed and cannot have a pending return request. ```APIDOC ## POST /v2/applications/{publicId}/requestreturn ### Description Starts the return request process. The application must be signed and cannot have a pending return request. ### Method POST ### Endpoint /v2/applications/`{publicId}`/requestreturn ### Parameters #### Path Parameters - **publicId** (string) - Required - The Public ID associated with the application. #### Query Parameters None #### Request Body - **agentName** (string) - Optional - Maximum length is 100 characters. - **phone** (string) - Optional - Must follow the patterns: `999-999-9999` or `9999999999`. - **email** (string) - Optional - Maximum length is 100 characters. - **reason** (string) - Optional - Maximum length is 500 characters. - **returnType** (int) - Optional - 1 = Redraft, 2 = Return or 4 = Partial. - **returnReasonPublicId** (string) - Optional - The Public ID associated with the return reason. - **amount** (decimal) - Required (When returnType is Partial) - Amount of the partial return request. ### Request Example ```php "Jonh", "phone" => "123-456-789", "email" => "lorem@ipsum.com", "reason" => "customer request", "returnType" => "1", "returnReasonPublicId" => "teydfgJhbTiulkjTUCUzI1NiIsnR5LKJosp6" ); curl_setopt($ch, CURLOPT_URL, "https://sandbox-lending-api.credova.com/v2/applications/" . $public_id . "/requestreturn"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, array()); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); $response = curl_exec($ch); echo "Response is " . $response; ?> ``` ### Response #### Success Response (200) This method does not return any content. #### Response Example None ``` -------------------------------- ### Submit Application Request via PHP Source: https://dev.credova.com/docs/api/v2/reference Demonstrates how to construct a JSON payload and send a POST request to the Credova API v2 application endpoint using PHP cURL. It includes authentication headers and a structured array containing customer, address, and product details. ```PHP "LIPSUM", "firstName" => "Lorem", "lastName" => "Ipsum", "dateOfBirth" => "1983-04-01", "mobilePhone" => "123-456-789", "email" => "lorem@ipsum.com", "referenceNumber" => "3456789", "authorization" => false, "address" => array( "street" => "45999 Center Oak Plaza", "suiteApartment" => "100", "city" => "Sterling", "state" => "VA", "zipCode" => "20166" ), "products" => array( array( "id" => "1", "description" => "Foo", "serialNumber" => "FOO001", "quantity" => "1", "value" => "1000.00" ), array( "id" => "2", "description" => "Bar", "serialNumber" => "BAR001", "quantity" => "2", "value" => "2200.00" ) ) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://sandbox-lending-api.credova.com/v2/applications"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields)); $response = curl_exec($ch); echo "Response is ".$response; ``` -------------------------------- ### Credova API v2 Return Reasons Response Sample Source: https://dev.credova.com/docs/api/v2/reference This is a sample JSON response structure from the Credova API v2 when requesting return reasons. Each object in the array represents a return reason with its unique public identifier and a descriptive text. The response is an array of objects, and each field is non-nullable. ```json [ { "publicId": "", "description": "" } ] ``` -------------------------------- ### Callback Notification Source: https://dev.credova.com/docs/api/v2/application This endpoint describes the callback notification mechanism. When an application is created, a `Callback-Url` can be provided. Our system will POST updates to this URL regarding the application's status changes during the process. The URL must be public, secure (HTTPS), support JSON, and return a 200 OK response. ```APIDOC ## POST /websites/dev_credova_api_v2/application/callback ### Description Receives status updates for an application via a POST request to a specified callback URL. ### Method POST ### Endpoint /websites/dev_credova_api_v2/application/callback ### Parameters #### Header Parameters - **Callback-Url** (string) - Required - The URL to receive status update notifications. #### Request Body - **publicId** (string) - Required - The Public ID for the application. - **applicationId** (integer) - Optional - Our internal application ID. Null if no application has been created yet. - **status** (string) - Required - Current status of the application. Possible values: Declined, Approved, Signed, Funded, Returned. - **phone** (string) - Required - Customer's phone number. - **approvalAmount** (decimal) - Optional - Approval Amount (only when status is Declined). - **borrowedAmount** (decimal) - Optional - Contract's Borrowed Amount (only when status is not Signed). - **invoiceAmount** (decimal) - Optional - Contract's Invoice Amount (only when status is not Signed). - **totalInStorePayment** (decimal) - Optional - Contract's Total In Store Payment (only when status is not Signed). - **financingPartnerCode** (string) - Optional - Contract's Financing Partner Code (only when status is not Signed). - **financingPartnerName** (string) - Optional - Contract's Financing Partner Name (only when status is not Signed). - **financingPartnerDisplayName** (string) - Optional - Contract's Financing Partner Display Name (only when status is not Signed). - **paymentInfo** (object) - Optional - Contract's Payment Information (only when payment is not Created). - **transferId** (string) - Optional - Payment Transfer ID (only when status is manually processed). - **wireReferenceId** (string) - Optional - Payment Wire Reference ID (only when status is not manually processed). - **date** (date) - Required - Payment Date. - **amount** (decimal) - Required - Payment Amount. - **status** (string) - Required - Payment Status. Possible values: pending, processed, manually processed, returned. ### Request Example ```json { "publicId": "", "applicationId": , "status": "Approved", "phone": "", "approvalAmount": 1000.00, "borrowedAmount": 950.00, "invoiceAmount": 950.00, "totalInStorePayment": 50.00, "financingPartnerCode": "FP123", "financingPartnerName": "Financing Partner Inc.", "financingPartnerDisplayName": "Financing Partner", "paymentInfo": { "transferId": "TRN456", "wireReferenceId": "WR789", "date": "2023-10-27", "amount": 950.00, "status": "processed" } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the callback was received. #### Response Example ```json { "message": "Callback received successfully." } ``` -------------------------------- ### POST /v2/applications/{publicId}/orders Source: https://dev.credova.com/docs/api/v2/reference Adds order references to a signed application. ```APIDOC ## POST /v2/applications/{publicId}/orders ### Description Add the order reference into the application. The application must be signed. ### Method POST ### Endpoint /v2/applications/{publicId}/orders ### Parameters #### Path Parameters - **publicId** (string) - Required - The unique identifier of the application. #### Request Body - **orders** (array of string) - Required - Number or IDs of the orders attached to this Contract. ### Request Example { "orders": ["ORD-123", "ORD-456"] } ### Response #### Success Response (200) - **status** (string) - Status of the request. ``` -------------------------------- ### POST /v3/applications/{publicId}/capture Source: https://dev.credova.com/docs/api/v2/reference Captures a previously authorized application and signs the contract. This operation supports a single capture per application, which may be for a partial or full amount. ```APIDOC ## POST /v3/applications/{publicId}/capture ### Description Captures a previously authorized application and signs the contract. The application must be in an authorized state to proceed. ### Method POST ### Endpoint /v3/applications/{publicId}/capture ### Parameters #### Path Parameters - **publicId** (string) - Required - The unique identifier of the application. #### Request Body - **amount** (decimal) - Required - The amount to capture from the authorized application. ### Request Example { "amount": 100.00 } ### Response #### Success Response (200) - No content returned. ``` -------------------------------- ### Generate Authentication Token using PHP Source: https://dev.credova.com/docs/api/v2/reference Generates an authentication token by sending a POST request to the /v2/token endpoint. Requires username and password. Returns a JWT token valid for 1 hour. ```php "foo", "password" => "bar" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://sandbox-lending-api.credova.com/v2/token"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, "username=foo&password=bar"); $response = curl_exec($ch); $decoded = json_decode($response, TRUE); $authentication_token = $decoded["jwt"]; echo "Authentication token is " . $authentication_token; ?> ``` -------------------------------- ### POST /v2/applications/{publicId}/deliveryinformation Source: https://dev.credova.com/docs/api/v2/reference Adds delivery information to an application that has a signed contract. ```APIDOC ## POST /v2/applications/{publicId}/deliveryinformation ### Description Adds the delivery information to an application that has a signed contract. ### Method POST ### Endpoint /v2/applications/{publicId}/deliveryinformation ### Parameters #### Path Parameters - **publicId** (string) - Required - The unique identifier of the application. #### Request Body - **method** (string) - Optional - Delivery Method. Possible values are Direct or Shipped. - **carrier** (string) - Optional - Carrier String Representation. - **trackingNumber** (string) - Optional - Tracking Number. - **address** (string) - Required - Address (Max 50 chars). - **address2** (string) - Optional - Address line 2 (Max 50 chars). - **city** (string) - Required - City (Max 50 chars). - **state** (string) - Required - State (Max 2 chars). - **zip** (string) - Required - Zip Code (Max 5 chars). ### Request Example { "method": "Direct", "carrier": "UPS", "trackingNumber": "000001", "address": "45999 Center Oak Plaza", "address2": "Suite 100", "city": "Sterling", "state": "VA", "zip": "20166" } ### Response #### Success Response (200) - **status** (string) - Status of the request. #### Response Example { "status": "Delivery information created" } ``` -------------------------------- ### POST /v2/token Source: https://dev.credova.com/docs/api/v2/reference Generates an authentication token required for accessing protected endpoints. The token is valid for 1 hour. ```APIDOC ## POST /v2/token ### Description Generates the authentication token required for subsequent API requests. The returned JWT is valid for 1 hour. ### Method POST ### Endpoint /v2/token ### Parameters #### Request Body - **username** (string) - Required - The username provided by the Credova team. - **password** (string) - Required - The password provided by the Credova team. ### Request Example { "username": "foo", "password": "bar" } ### Response #### Success Response (200) - **jwt** (string) - The authentication token. #### Response Example { "jwt": "eyJhbGciOiJIUzI1Ni..." } ``` -------------------------------- ### Application Status Callback JSON Schema Source: https://dev.credova.com/docs/api/v2/application Represents the JSON payload sent by the Credova system to a provided Callback-Url when an application status changes. It includes core application details, financial metrics, and nested payment information. ```json { "publicId": "", "applicationId": , "status": "", "phone": "", "approvalAmount": , "borrowedAmount": , "invoiceAmount": , "totalInStorePayment": , "financingPartnerCode": "", "financingPartnerName": "", "financingPartnerDisplayName": "", "paymentInfo": { "transferId": "", "wireReferenceId": "", "date": "", "amount": , "status": "" } } ``` -------------------------------- ### Upload Application Invoice via PHP Source: https://dev.credova.com/docs/api/v2/reference Attaches an invoice file to a specific application using the /v2/applications/{publicId}/uploadinvoice endpoint. The request must be sent as multipart/form-data containing the file object. ```php $authentication_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"; $public_id = "c4c4eede-cbb0-4efd-8e10-aa1d02392ce6"; $headers = array( "Content-Type: multipart/form-data", "Authorization: Bearer ".$authentication_token ); $fields = array( "file" => new CurlFile("invoice.pdf", "application/pdf", "invoice.pdf") ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://sandbox-lending-api.credova.com/v2/applications/".$public_id."/uploadinvoice"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); $response = curl_exec($ch); echo "Response is ".$response; ```