curl --request GET \
--url https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status \
--header 'Authorization: Bearer <token>' \
--header 'X-Brand-Id: <x-brand-id>'import requests
url = "https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status"
headers = {
"X-Brand-Id": "<x-brand-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Brand-Id': '<x-brand-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Brand-Id: <x-brand-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Brand-Id", "<x-brand-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status")
.header("X-Brand-Id", "<x-brand-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Brand-Id"] = '<x-brand-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"currency": "<string>",
"order_ref": "<string>",
"payment_state": "created",
"total_minor": 123
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}Read the payment status of an order
Returns the current payment state of an order — for example whether it is awaiting payment, authorized, paid, or failed — so a storefront or portal can poll for the outcome after the patient completes payment in the browser. The state reflects confirmations received from the payment provider. An order that belongs to a different brand returns 404, the same as an order that does not exist, so no order’s existence is revealed across brands. The payment token is never returned here.
curl --request GET \
--url https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status \
--header 'Authorization: Bearer <token>' \
--header 'X-Brand-Id: <x-brand-id>'import requests
url = "https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status"
headers = {
"X-Brand-Id": "<x-brand-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Brand-Id': '<x-brand-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Brand-Id: <x-brand-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Brand-Id", "<x-brand-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status")
.header("X-Brand-Id", "<x-brand-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.purplelabelmd.com/v1/payments/{order_ref}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Brand-Id"] = '<x-brand-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"currency": "<string>",
"order_ref": "<string>",
"payment_state": "created",
"total_minor": 123
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}Authorizations
Per-client API key (M2M). Presented as Authorization: Bearer <key>.
Headers
The brand this request is scoped to. It is validated against your authenticated account; an unknown or unauthorized brand is rejected. The brand is never taken from the request body.
^brd_[A-Za-z0-9][A-Za-z0-9_-]*$Path Parameters
^ord_[A-Za-z0-9][A-Za-z0-9_-]*$Response
the current payment state of the order
The current payment state of an order. It reflects confirmations received from the payment provider after the patient completes payment. Intended for polling; it does not include the payment token or a fee breakdown.