API Reference

With this API you can get secured qr code image url, to get complete url for qrcode image you need to concatenate qrcodeUrl and qrcodeSaS values.

Example:

https://bbuatfiles.blob.core.windows.net/qrcode/b356bb29-a1d8-49ee -b49f-7e03a75758da/b9cae47b-1a25-4dae-960f-182d0ebd473d.jpg?sv=202 0-04-08&se=2021-08-10T07%3A02%3A54Z&sr=b&sp=r&sig=6qzewFJLzJnXqcos nTWiTu4AkZSC2yoHbIFg400%2F31o%3D

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:

  • requestMoneyGuid: This field contains a unique identifier that represents a specific request to which the QR code is associated.
import requests import json # Define the API endpoint URL url = "https://uat-businessapi.spenn.com/api/partner/transaction/request/getqrcode" # Define the headers, including the Authorization header with your actual token headers = { "Content-Type": "application/json", "Authorization": "Bearer eyJhbG...NrEQ41w" # Replace with your actual token } # Define the request body as a Python dictionary request_data = { "requestMoneyGuid": "1e6cc63a-2d0d-4885-9c51-f9a35f113811" } # Convert the request data to JSON format request_data_json = json.dumps(request_data) # Make the POST request response = requests.post(url, headers=headers, data=request_data_json) # Check the response if response.status_code == 200: print("Request was successful. Response:") print(response.json()) else: print(f"Request failed with status code {response.status_code}.") print("Response content:") print(response.text)
import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; public class APICallExample { public static void main(String[] args) { // Define the API endpoint URL String url = "https://uat-businessapi.spenn.com/api/partner/transaction/request/getqrcode"; // Define the request headers String authorizationHeader = "Bearer eyJhbG...NrEQ41w"; // Replace with your actual token String contentType = "application/json"; // Define the request body as a JSON string String requestJson = "{\"requestMoneyGuid\": \"1e6cc63a-2d0d-4885-9c51-f9a35f113811\"}"; try (CloseableHttpClient httpClient = HttpClients.createDefault()) { // Create the HTTP POST request HttpPost request = new HttpPost(url); // Set the request headers request.addHeader("Content-Type", contentType); request.addHeader("Authorization", authorizationHeader); // Set the request body request.setEntity(new StringEntity(requestJson)); // Execute the request HttpResponse response = httpClient.execute(request); // Check the response if (response.getStatusLine().getStatusCode() == 200) { System.out.println("Request was successful. Response:"); // Process and print the response here if needed } else { System.out.println("Request failed with status code " + response.getStatusLine().getStatusCode() + "."); System.out.println("Response content:"); // Print the response content here if needed } } catch (Exception e) { e.printStackTrace(); } } }
// Define the API endpoint URL const url = "https://uat-businessapi.spenn.com/api/partner/transaction/request/getqrcode"; // Define the request headers const headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer eyJhbG...NrEQ41w', // Replace with your actual token }; // Define the request body as a JavaScript object const requestData = { requestMoneyGuid: "1e6cc63a-2d0d-4885-9c51-f9a35f113811", }; // Make the POST request fetch(url, { method: 'POST', headers: headers, body: JSON.stringify(requestData), }) .then(response => { if (response.status === 200) { return response.json(); } else { console.error(`Request failed with

👍

Sample response

{ "$id": "1", "requestId": "1e6cc63a-2d0d-4885-9c51-f9a35f113811", "status": "Pending", "amount": 10, "qrcodeurl":"https://bbuatfiles.blob.core.windows.net/qrcode/b356bb29-a1d8-49e e-b49f-7e03a75758da/b9cae47b-1a25-4dae-960f-182d0ebd473d.jpg", "qrcodeSas": "?sv=2020-04-08&se=2021-08-10T07%3A02%3A54Z&sr=b&sp=r&sig=6qzewFJL zJnXqcosnTWiTu4AkZSC2yoHbIFg400%2F31o%3D", "TimestampCreated": "2021-04-06T05:06:14.8661984", "ExpirationTimeInUtc": "2021-08-10T07:02:54.6066325Z" }