Defines whether a user has to upload a prescription during the checkout flow.
amount
object
See Amount
merchantReference
string
This reference can be used to identify the payment in your system.
Maximum 40 characters.
merchantUrls
object
See MerchantUrls
cardCaptureMode
String
either "MANUAL" or "AUTO". Defaults to AUTO. If "MANUAL" the user's card will only be pre-authorised. You then have to use the /capture method in the given timespan. See dedicated method for details.
merchantId
String
hi.health issued ID. Use it instead of x-api-key to create a payment for a dedicated merchant.
- if required body parameter is missing
{
"error": "merchantUrls is a required field"
}
---
- if required property of any body parameter is missing
{
"error": "merchantUrls.callback is a required field"
}
---
- if a number is a float with more than 2 decimal places
{
"error": "amount.total must have 2 or less digits after decimal point"
}
---
- if a number is negative or 0
{
"error": "amount.total must be a positive number"
}
---
- if a number is negative
{
"error": "amount.details.tax must be greater than or equal to 0"
}
---
- if currency is something other than "EUR" or "eur"
{
"error": "amount.currency must be one of the following values: EUR, eur"
}
---
- if a parameter is not of expected type
{
"error": "amount must be a `object` type, but the final value was: `123`."
}
{
"message": "Forbidden"
}
---
- if you don't use the <id> parameter
{
"message": "Missing Authentication Token"
}
{
"error": "Not Found"
}
Upload Document
POST/payments/<id>/document/<type>
Upload a document related to a specific Order Payment.
Path Parameters
Name
Type
Description
type
string
Can be one of: OTHER, INVOICE, PRESCRIPTION, CERTIFICATE, TEST_RESULT
- if not specified, the default value is: OTHER
id
string
ID of the previously created payment
Headers
Name
Type
Description
x-api-key
string
Your API Key
Content-Type
string
application/pdf
Request Body
Name
Type
Description
body
object
The pdf of the invoice you want to upload
- if file is not a valid pdf
{
"error": "Uploaded file's MIME type does not match the type in the 'Content-Type'"
}
---
- if "Content-Type" header has a value other than "application/pdf"
{
"error": "Content-Type must be one of the following values: application/pdf"
}
A payment represents the user's intent to pay for a purchase. A payment can be used to initialise the Checkout flow, therefore allowing a hi.health user to confirm a transaction. Once a payment is confirmed, it will require an invoice to be uploaded for fully processing the reimbursement claim with the user's insurance.
Payment
Property Name
Property Type
Description
id
string
Primary key, automatically assigned when the payment is created
amount
Amount
Contains total payment amount with a breakdown that provides details.
merchantReference
string
Identifier from another system, e.g. used to reference the order in your database.
merchantUrls
MerchantUrls
Contains URLs to send callbacks and redirect the user.
status
INITIAL | CLAIMED | SETTLED|DENIED | PENDING
Describes the current status of the payment.
INITIAL: The payment was created.
CLAIMED: The payment was claimed by a user logging into the checkout flow.
SETTLED: The payment was fulfilled by hi.health
DENIED: The payment was denied by hi.health
PENDING : The payment is still being processed
MerchantUrls
Property name
Property type
Description
callback (optional)
string
This webhook will be used to keep your backend up to date with status updates (payment claimed, payment cancelled, ...).
successRedirect
string
The user will be redirected to this URL once the payment was successfully confirmed.
failureRedirect
string
The user will be redirected to this URL in case the payment was failed. (Note: This redirect is currently not used by our frontend)
cancelRedirect
string
The user will be redirected to this URL in case the payment was cancelled.
Amount
Property name
Property type
Description
total
number
The amount the user will be charged.
Must be a positive integer or a positive float with up to 2 decimal places.
currency
string
The 3 character currency code that identifies the currency.