Skip to main content

Get checkout URL of an invoice

Get checkout URL of an invoice by id and redirect url.

Endpoint

GET /integration/invoice/{id}/checkout-redirect

HTTP Request

GET /integration/invoice/{id}/checkout-redirect?redirectUrl={url}

Query parameters

NameDescriptionRequiredType
idIdentifier of the invoiceYesstring
urlThe redirect url.Nostring

Successful response

"checkout-url"

Response parameters

NameDescriptionType
checkoutUrlThe checkout url.string

Erroneous response

{
"code": "404",
"reason": "Invoice not found."
}

Responses

CodeDescription
200Successful operation
400Invalid request
401Unauthorized
404Not found
500Unexpected error

Examples

curl https://api.bluetape.com/genericBthubService/integration/invoice/<invoiceId>/checkout-redirect \
-X GET \
-H "X-BlueTape-Key: <your-key>" \
-H "X-Integration-AccountId: <your-account-id>" \
-d "redirectUrl={url}" \
import fetch from 'node-fetch';


const invoiceId = '27be905508e7';
const url = `https://api.bluetape.com/genericBthubService/integration/invoice/${invoiceId}/checkout-redirect?redirectUrl=${url}`;
const options = {
method: 'GET',
headers: {
'X-BlueTape-Key': '<your-key>',
'X-Integration-AccountId': '<your-account-id>',
'Content-Type': 'application/json'
}
};

fetch(url, options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
using Flurl.Http;

var result = await "https://api.bluetape.com/genericBthubService/integration/invoice/{invoiceId}/checkout-redirect"
.SetQueryParams(new {
redirectUrl = url,
})
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/json")
.GetAsync();
import requests

url = "https://api.bluetape.com/genericBthubService/integration/invoice/<invoiceId>/checkout-redirect?redirectUrl=<url>"

headers = {
"X-BlueTape-Key": "<your-key>",
"X-Integration-AccountId": "<your-account-id>",
"Content-Type": "application/json"
}

response = requests.get(url, headers=headers)

print(response.text)