API Reference

To deposit confirmation, the client needs to provide the transactionId which can be retrieved from the deposit creation response. Deposit can be confirmed if the status of transaction is Accepted.

Description

Headers

  • Content-Type: The Content-Type header is set to application/json, indicating that the request body contains JSON data.
  • Authorization: The Authorization header is used with a bearer token for authentication. The actual token value should replace the placeholder Bearer eyJhbG...NrEQ41w.

Request Body

The request body is in JSON format and contains the following fields:

ParameterSeverityTypeDescription
transactionIdRequiredStringMust be a valid GUID

Sample Request:

import requests def confirm_deposit_transaction(transaction_id, token): # URL with the transaction ID included in the query parameters url = f"https://uat-businessapi.spenn.com/api/partner/transaction/deposit/confirm?transactionId={transaction_id}" # Headers with the Content-Type and Authorization token headers = { 'Content-Type': 'application/json', 'Authorization': f'Bearer {token}' } # Sending the POST request try: response = requests.post(url, headers=headers) # Return the response data (or handle it as needed) return response.json() except requests.RequestException as e: print(f"Error: {e}") # Example usage transaction_id = 'FFa85f64-5717-4562-b3fc-2c963f66aFF6' # Replace with the actual transaction ID token = 'your_bearer_token_here' # Replace with your actual bearer token confirmation_response = confirm_deposit_transaction(transaction_id, token) print(confirmation_response)
import java.net.HttpURLConnection; import java.net.URL; public class DepositTransactionConfirmer { public static void main(String[] args) { String transactionId = "FFa85f64-5717-4562-b3fc-2c963f66aFF6"; // Replace with the actual transaction ID String token = "your_bearer_token_here"; // Replace with your actual bearer token String response = confirmDepositTransaction(transactionId, token); System.out.println(response); } private static String confirmDepositTransaction(String transactionId, String token) { try { // URL with the transaction ID included in the query parameters URL url = new URL("https://uat-businessapi.spenn.com/api/partner/transaction/deposit/confirm?transactionId=" + transactionId); // Open a connection HttpURLConnection connection = (HttpURLConnection) url.openConnection(); // Set the request method and headers connection.setRequestMethod("POST"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Authorization", "Bearer " + token); // Check the response code int responseCode = connection.getResponseCode(); String responseMessage = connection.getResponseMessage(); // Disconnect the connection connection.disconnect(); // Return the response code and message return "Response Code: " + responseCode + ", Response Message: " + responseMessage; } catch (Exception e) { e.printStackTrace(); return null; } } }
async function confirmDepositTransaction(transactionId, token) { // URL with the transaction ID included in the query parameters const url = `https://uat-businessapi.spenn.com/api/partner/transaction/deposit/confirm?transactionId=${transactionId}`; // Setting up the request headers const headers = { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` }; try { // Sending the POST request const response = await fetch(url, { method: 'POST', headers: headers }); // Parsing the JSON response const responseData = await response.json(); return responseData; } catch (error) { console.error('Error:', error); } } // Example usage const transactionId = 'FFa85f64-5717-4562-b3fc-2c963f66aFF6'; // Replace with the actual transaction ID const token = 'your_bearer_token_here'; // Replace with your actual bearer token confirmDepositTransaction(transactionId, token) .then(data => console.log(data)) .catch(error => console.error('Error in confirming deposit transaction:', error));

👍

Sample Response

{ }

NB: Confirming the deposit will remove the amount lock and set transaction status to OK