curl --request POST \
--url https://api.prod.bastion.com/v2/issuance/redemption-instructions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_account_id": "<string>",
"chain": "SOLANA_DEVNET",
"label": "<string>",
"payment_rail": "WIRE",
"identity_id": "<string>",
"stablecoin_symbol": "<string>"
}
'import requests
url = "https://api.prod.bastion.com/v2/issuance/redemption-instructions"
payload = {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_account_id": "<string>",
"chain": "SOLANA_DEVNET",
"label": "<string>",
"payment_rail": "WIRE",
"identity_id": "<string>",
"stablecoin_symbol": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
bank_account_id: '<string>',
chain: 'SOLANA_DEVNET',
label: '<string>',
payment_rail: 'WIRE',
identity_id: '<string>',
stablecoin_symbol: '<string>'
})
};
fetch('https://api.prod.bastion.com/v2/issuance/redemption-instructions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
bank_account_id: '<string>',
chain: 'SOLANA_DEVNET',
label: '<string>',
payment_rail: 'WIRE',
identity_id: '<string>',
stablecoin_symbol: '<string>'
})
};
fetch('https://api.prod.bastion.com/v2/issuance/redemption-instructions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.prod.bastion.com/v2/issuance/redemption-instructions"
payload := strings.NewReader("{\n \"request_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"bank_account_id\": \"<string>\",\n \"chain\": \"SOLANA_DEVNET\",\n \"label\": \"<string>\",\n \"payment_rail\": \"WIRE\",\n \"identity_id\": \"<string>\",\n \"stablecoin_symbol\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.prod.bastion.com/v2/issuance/redemption-instructions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"request_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"bank_account_id\": \"<string>\",\n \"chain\": \"SOLANA_DEVNET\",\n \"label\": \"<string>\",\n \"payment_rail\": \"WIRE\",\n \"identity_id\": \"<string>\",\n \"stablecoin_symbol\": \"<string>\"\n}")
.asString();val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"request_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"bank_account_id\": \"<string>\",\n \"chain\": \"SOLANA_DEVNET\",\n \"label\": \"<string>\",\n \"payment_rail\": \"WIRE\",\n \"identity_id\": \"<string>\",\n \"stablecoin_symbol\": \"<string>\"\n}")
val request = Request.Builder()
.url("https://api.prod.bastion.com/v2/issuance/redemption-instructions")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let parameters = [
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_account_id": "<string>",
"chain": "SOLANA_DEVNET",
"label": "<string>",
"payment_rail": "WIRE",
"identity_id": "<string>",
"stablecoin_symbol": "<string>"
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.prod.bastion.com/v2/issuance/redemption-instructions")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))using RestSharp;
var options = new RestClientOptions("https://api.prod.bastion.com/v2/issuance/redemption-instructions");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"request_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"bank_account_id\": \"<string>\",\n \"chain\": \"SOLANA_DEVNET\",\n \"label\": \"<string>\",\n \"payment_rail\": \"WIRE\",\n \"identity_id\": \"<string>\",\n \"stablecoin_symbol\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.prod.bastion.com/v2/issuance/redemption-instructions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"request_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"bank_account_id\": \"<string>\",\n \"chain\": \"SOLANA_DEVNET\",\n \"label\": \"<string>\",\n \"payment_rail\": \"WIRE\",\n \"identity_id\": \"<string>\",\n \"stablecoin_symbol\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"address": "<string>",
"bank_account_id": "<string>",
"chain": "SOLANA_DEVNET",
"label": "<string>",
"payment_rail": "WIRE",
"identity_id": "<string>",
"stablecoin_symbol": "<string>"
}Create Redemption Instructions
Create redemption instructions for a given identity
curl --request POST \
--url https://api.prod.bastion.com/v2/issuance/redemption-instructions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_account_id": "<string>",
"chain": "SOLANA_DEVNET",
"label": "<string>",
"payment_rail": "WIRE",
"identity_id": "<string>",
"stablecoin_symbol": "<string>"
}
'import requests
url = "https://api.prod.bastion.com/v2/issuance/redemption-instructions"
payload = {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_account_id": "<string>",
"chain": "SOLANA_DEVNET",
"label": "<string>",
"payment_rail": "WIRE",
"identity_id": "<string>",
"stablecoin_symbol": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
bank_account_id: '<string>',
chain: 'SOLANA_DEVNET',
label: '<string>',
payment_rail: 'WIRE',
identity_id: '<string>',
stablecoin_symbol: '<string>'
})
};
fetch('https://api.prod.bastion.com/v2/issuance/redemption-instructions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
bank_account_id: '<string>',
chain: 'SOLANA_DEVNET',
label: '<string>',
payment_rail: 'WIRE',
identity_id: '<string>',
stablecoin_symbol: '<string>'
})
};
fetch('https://api.prod.bastion.com/v2/issuance/redemption-instructions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.prod.bastion.com/v2/issuance/redemption-instructions"
payload := strings.NewReader("{\n \"request_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"bank_account_id\": \"<string>\",\n \"chain\": \"SOLANA_DEVNET\",\n \"label\": \"<string>\",\n \"payment_rail\": \"WIRE\",\n \"identity_id\": \"<string>\",\n \"stablecoin_symbol\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.prod.bastion.com/v2/issuance/redemption-instructions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"request_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"bank_account_id\": \"<string>\",\n \"chain\": \"SOLANA_DEVNET\",\n \"label\": \"<string>\",\n \"payment_rail\": \"WIRE\",\n \"identity_id\": \"<string>\",\n \"stablecoin_symbol\": \"<string>\"\n}")
.asString();val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"request_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"bank_account_id\": \"<string>\",\n \"chain\": \"SOLANA_DEVNET\",\n \"label\": \"<string>\",\n \"payment_rail\": \"WIRE\",\n \"identity_id\": \"<string>\",\n \"stablecoin_symbol\": \"<string>\"\n}")
val request = Request.Builder()
.url("https://api.prod.bastion.com/v2/issuance/redemption-instructions")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let parameters = [
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_account_id": "<string>",
"chain": "SOLANA_DEVNET",
"label": "<string>",
"payment_rail": "WIRE",
"identity_id": "<string>",
"stablecoin_symbol": "<string>"
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.prod.bastion.com/v2/issuance/redemption-instructions")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))using RestSharp;
var options = new RestClientOptions("https://api.prod.bastion.com/v2/issuance/redemption-instructions");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"request_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"bank_account_id\": \"<string>\",\n \"chain\": \"SOLANA_DEVNET\",\n \"label\": \"<string>\",\n \"payment_rail\": \"WIRE\",\n \"identity_id\": \"<string>\",\n \"stablecoin_symbol\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.prod.bastion.com/v2/issuance/redemption-instructions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"request_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"bank_account_id\": \"<string>\",\n \"chain\": \"SOLANA_DEVNET\",\n \"label\": \"<string>\",\n \"payment_rail\": \"WIRE\",\n \"identity_id\": \"<string>\",\n \"stablecoin_symbol\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"address": "<string>",
"bank_account_id": "<string>",
"chain": "SOLANA_DEVNET",
"label": "<string>",
"payment_rail": "WIRE",
"identity_id": "<string>",
"stablecoin_symbol": "<string>"
}Authorizations
Bearer authentication with an API token
Body
Request identifier in a UUID format. Serves as an idempotency key.
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}Bank account ID to which the redeemed funds should be sent
Blockchain network for the redemption
ISSUANCE_SUPPORTED_CHAIN_UNSPECIFIED, SOLANA_DEVNET, SOLANA_MAINNET "SOLANA_DEVNET"
Label for the redemption instruction
Payment rail for the redemption, currently only 'WIRE' is supported
ISSUANCE_SUPPORTED_FIAT_PAYMENT_METHOD_UNSPECIFIED, WIRE "WIRE"
Unique identifier of the identity that this redemption instruction belongs to
Symbol of the stablecoin associated with this redemption instruction
Response
Success
Unique identifier for the redemption instruction
Generated redemption address. Stablecoins sent to this address will be redeemed.
Bank account ID to which the redeemed funds should be sent
Blockchain network for the redemption instruction
ISSUANCE_SUPPORTED_CHAIN_UNSPECIFIED, SOLANA_DEVNET, SOLANA_MAINNET "SOLANA_DEVNET"
Label for the redemption instruction
Payment rail for the redemption instruction, currently only 'WIRE' is supported
ISSUANCE_SUPPORTED_FIAT_PAYMENT_METHOD_UNSPECIFIED, WIRE "WIRE"
Unique identifier of the identity that this redemption instruction belongs to
Symbol of the stablecoin associated with this redemption instruction