> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.littglobal.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.littglobal.com/_mcp/server.

# Get Payment Redemption Link

POST TBD/api/v2/payment/redemption-link

This API endpoint provides a unique URL for the redemption of a user's wallet balance. Based on the requested format, the response data could either be a direct URL or an object containing the URL along with additional related information.

### Request Body

- `return_array` (boolean): This flag determines the shape of the response. If set to `false`, the server will return the data as a plain URL. If it is `true`, the server will return the data as an object, including the redemption URL, user ID, token, and expiration time.
    

### Response

- `url` (string): The URL for the payment redemption link.
    
- `user_id` (string): The user ID associated with this request.
    
- `token` (string): A unique token associated with the redemption link.
    
- `expiration` (integer): The time in seconds until the redemption link expires. This field would only be included if 'return_array' is set to true.

Reference: https://docs.littglobal.com/litt-white-label/api-reference/digital-wallet/get-payment-redemption-link

## Request

### Query parameters

- `api_token` (string, optional)

## Response

### 200

Get Payment Redemption Link

- `message` (string, optional)
- `api` (string, optional)
- `status` (string, optional)
- `data` (ApiV2PaymentRedemptionLinkPostResponsesContentApplicationJsonSchemaData, optional)

## Types

### ApiV2PaymentRedemptionLinkPostResponsesContentApplicationJsonSchemaData

- `url` (string, optional)
- `user_id` (string, optional)
- `token` (string, optional)
- `expiration` (integer, optional)

## Examples

**Response**

```json
{
  "message": "Successfully generated a redemption link",
  "api": "paymentRedemptionLink",
  "status": "success",
  "data": {
    "url": "https://cub.littglobal.com/business/payment/redeem-wallet-balance?user_id=6c68dd44-a4b8-400b-b4f5-89c1802d5c28&token=18076627-e229-4971-b840-e5b34fefb876-fed74a9f-171b-411a-bcc8-6a7a3f61b2",
    "user_id": "6c68dd44-a4b8-400b-b4f5-89c1802d5c28",
    "token": "YOUR_TOKEN",
    "expiration": 300
  }
}
```

**SDK Code**

```python Digital Wallet_getPaymentRedemptionLink_example
import requests

url = "https://tbd/api/v2/payment/redemption-link"

querystring = {"api_token":"{{token}}"}

response = requests.post(url, params=querystring)

print(response.json())
```

```javascript Digital Wallet_getPaymentRedemptionLink_example
const url = 'https://tbd/api/v2/payment/redemption-link?api_token=%7B%7Btoken%7D%7D';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Digital Wallet_getPaymentRedemptionLink_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://tbd/api/v2/payment/redemption-link?api_token=%7B%7Btoken%7D%7D"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Digital Wallet_getPaymentRedemptionLink_example
require 'uri'
require 'net/http'

url = URI("https://tbd/api/v2/payment/redemption-link?api_token=%7B%7Btoken%7D%7D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
```

```java Digital Wallet_getPaymentRedemptionLink_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tbd/api/v2/payment/redemption-link?api_token=%7B%7Btoken%7D%7D")
  .asString();
```

```php Digital Wallet_getPaymentRedemptionLink_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tbd/api/v2/payment/redemption-link?api_token=%7B%7Btoken%7D%7D');

echo $response->getBody();
```

```csharp Digital Wallet_getPaymentRedemptionLink_example
using RestSharp;

var client = new RestClient("https://tbd/api/v2/payment/redemption-link?api_token=%7B%7Btoken%7D%7D");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift Digital Wallet_getPaymentRedemptionLink_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://tbd/api/v2/payment/redemption-link?api_token=%7B%7Btoken%7D%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```