Setup Payin Component
curl --request POST \
--url https://api.decodahealth.com/billing/payment-terminal/payin-config \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"charges": [
{
"patientId": "<string>",
"totalOutstanding": 123,
"id": "<string>",
"patient": {
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>",
"externalId": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": true,
"meta": {},
"isArchived": true,
"primaryLocationId": "<string>",
"gender": "<string>",
"dateOfBirth": "2023-12-25",
"patientMedications": [
"<string>"
],
"onSchedulingBlacklist": true,
"surchargeDisabled": true,
"tags": [
{
"id": "<string>",
"name": "<string>",
"isActive": true,
"createdDate": "2023-11-07T05:31:56Z",
"emoji": "<string>",
"color": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"creditBalance": 123,
"preferredProviderId": "<string>"
},
"total": 0,
"description": "<string>",
"status": "OUTSTANDING",
"discountAmount": 0,
"discountPercentage": 0,
"externalId": "<string>",
"externalCreatedDate": "2023-11-07T05:31:56Z",
"ruleSetId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"creatorId": "<string>",
"items": [],
"tips": [],
"locationId": "<string>",
"eventId": "<string>",
"memberId": "<string>",
"comment": "<string>",
"meta": {},
"merchantAccountId": "<string>"
}
],
"paymentAmount": 123,
"savePaymentMethod": false,
"textReceipt": false,
"paymentPlan": {
"initialAmount": 123,
"chargeIds": [
"<string>"
],
"installments": 123,
"installmentAmount": 123,
"locationId": "<string>",
"startDate": "2023-12-25"
},
"isSurcharged": false,
"locationId": "<string>",
"creatorId": "<string>",
"membershipId": "<string>",
"membershipStartDate": "2023-11-07T05:31:56Z",
"soldByProviderId": "<string>",
"merchantAccountId": "<string>"
}
'import requests
url = "https://api.decodahealth.com/billing/payment-terminal/payin-config"
payload = {
"charges": [
{
"patientId": "<string>",
"totalOutstanding": 123,
"id": "<string>",
"patient": {
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>",
"externalId": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": True,
"meta": {},
"isArchived": True,
"primaryLocationId": "<string>",
"gender": "<string>",
"dateOfBirth": "2023-12-25",
"patientMedications": ["<string>"],
"onSchedulingBlacklist": True,
"surchargeDisabled": True,
"tags": [
{
"id": "<string>",
"name": "<string>",
"isActive": True,
"createdDate": "2023-11-07T05:31:56Z",
"emoji": "<string>",
"color": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"creditBalance": 123,
"preferredProviderId": "<string>"
},
"total": 0,
"description": "<string>",
"status": "OUTSTANDING",
"discountAmount": 0,
"discountPercentage": 0,
"externalId": "<string>",
"externalCreatedDate": "2023-11-07T05:31:56Z",
"ruleSetId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"creatorId": "<string>",
"items": [],
"tips": [],
"locationId": "<string>",
"eventId": "<string>",
"memberId": "<string>",
"comment": "<string>",
"meta": {},
"merchantAccountId": "<string>"
}
],
"paymentAmount": 123,
"savePaymentMethod": False,
"textReceipt": False,
"paymentPlan": {
"initialAmount": 123,
"chargeIds": ["<string>"],
"installments": 123,
"installmentAmount": 123,
"locationId": "<string>",
"startDate": "2023-12-25"
},
"isSurcharged": False,
"locationId": "<string>",
"creatorId": "<string>",
"membershipId": "<string>",
"membershipStartDate": "2023-11-07T05:31:56Z",
"soldByProviderId": "<string>",
"merchantAccountId": "<string>"
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
charges: [
{
patientId: '<string>',
totalOutstanding: 123,
id: '<string>',
patient: {
id: '<string>',
createdDate: '2023-11-07T05:31:56Z',
firstName: '<string>',
lastName: '<string>',
phoneNumber: '<string>',
email: '<string>',
locationId: '<string>',
externalId: '<string>',
address: '<string>',
addressLineTwo: '<string>',
city: '<string>',
state: '<string>',
zipCode: '<string>',
country: '<string>',
addressValid: true,
meta: {},
isArchived: true,
primaryLocationId: '<string>',
gender: '<string>',
dateOfBirth: '2023-12-25',
patientMedications: ['<string>'],
onSchedulingBlacklist: true,
surchargeDisabled: true,
tags: [
{
id: '<string>',
name: '<string>',
isActive: true,
createdDate: '2023-11-07T05:31:56Z',
emoji: '<string>',
color: '<string>',
updatedDate: '2023-11-07T05:31:56Z'
}
],
creditBalance: 123,
preferredProviderId: '<string>'
},
total: 0,
description: '<string>',
status: 'OUTSTANDING',
discountAmount: 0,
discountPercentage: 0,
externalId: '<string>',
externalCreatedDate: '2023-11-07T05:31:56Z',
ruleSetId: '<string>',
createdDate: '2023-11-07T05:31:56Z',
creatorId: '<string>',
items: [],
tips: [],
locationId: '<string>',
eventId: '<string>',
memberId: '<string>',
comment: '<string>',
meta: {},
merchantAccountId: '<string>'
}
],
paymentAmount: 123,
savePaymentMethod: false,
textReceipt: false,
paymentPlan: {
initialAmount: 123,
chargeIds: ['<string>'],
installments: 123,
installmentAmount: 123,
locationId: '<string>',
startDate: '2023-12-25'
},
isSurcharged: false,
locationId: '<string>',
creatorId: '<string>',
membershipId: '<string>',
membershipStartDate: '2023-11-07T05:31:56Z',
soldByProviderId: '<string>',
merchantAccountId: '<string>'
})
};
fetch('https://api.decodahealth.com/billing/payment-terminal/payin-config', 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.decodahealth.com/billing/payment-terminal/payin-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'charges' => [
[
'patientId' => '<string>',
'totalOutstanding' => 123,
'id' => '<string>',
'patient' => [
'id' => '<string>',
'createdDate' => '2023-11-07T05:31:56Z',
'firstName' => '<string>',
'lastName' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'locationId' => '<string>',
'externalId' => '<string>',
'address' => '<string>',
'addressLineTwo' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipCode' => '<string>',
'country' => '<string>',
'addressValid' => true,
'meta' => [
],
'isArchived' => true,
'primaryLocationId' => '<string>',
'gender' => '<string>',
'dateOfBirth' => '2023-12-25',
'patientMedications' => [
'<string>'
],
'onSchedulingBlacklist' => true,
'surchargeDisabled' => true,
'tags' => [
[
'id' => '<string>',
'name' => '<string>',
'isActive' => true,
'createdDate' => '2023-11-07T05:31:56Z',
'emoji' => '<string>',
'color' => '<string>',
'updatedDate' => '2023-11-07T05:31:56Z'
]
],
'creditBalance' => 123,
'preferredProviderId' => '<string>'
],
'total' => 0,
'description' => '<string>',
'status' => 'OUTSTANDING',
'discountAmount' => 0,
'discountPercentage' => 0,
'externalId' => '<string>',
'externalCreatedDate' => '2023-11-07T05:31:56Z',
'ruleSetId' => '<string>',
'createdDate' => '2023-11-07T05:31:56Z',
'creatorId' => '<string>',
'items' => [
],
'tips' => [
],
'locationId' => '<string>',
'eventId' => '<string>',
'memberId' => '<string>',
'comment' => '<string>',
'meta' => [
],
'merchantAccountId' => '<string>'
]
],
'paymentAmount' => 123,
'savePaymentMethod' => false,
'textReceipt' => false,
'paymentPlan' => [
'initialAmount' => 123,
'chargeIds' => [
'<string>'
],
'installments' => 123,
'installmentAmount' => 123,
'locationId' => '<string>',
'startDate' => '2023-12-25'
],
'isSurcharged' => false,
'locationId' => '<string>',
'creatorId' => '<string>',
'membershipId' => '<string>',
'membershipStartDate' => '2023-11-07T05:31:56Z',
'soldByProviderId' => '<string>',
'merchantAccountId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/billing/payment-terminal/payin-config"
payload := strings.NewReader("{\n \"charges\": [\n {\n \"patientId\": \"<string>\",\n \"totalOutstanding\": 123,\n \"id\": \"<string>\",\n \"patient\": {\n \"id\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"locationId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"isArchived\": true,\n \"primaryLocationId\": \"<string>\",\n \"gender\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"patientMedications\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": true,\n \"surchargeDisabled\": true,\n \"tags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isActive\": true,\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"emoji\": \"<string>\",\n \"color\": \"<string>\",\n \"updatedDate\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n },\n \"total\": 0,\n \"description\": \"<string>\",\n \"status\": \"OUTSTANDING\",\n \"discountAmount\": 0,\n \"discountPercentage\": 0,\n \"externalId\": \"<string>\",\n \"externalCreatedDate\": \"2023-11-07T05:31:56Z\",\n \"ruleSetId\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"creatorId\": \"<string>\",\n \"items\": [],\n \"tips\": [],\n \"locationId\": \"<string>\",\n \"eventId\": \"<string>\",\n \"memberId\": \"<string>\",\n \"comment\": \"<string>\",\n \"meta\": {},\n \"merchantAccountId\": \"<string>\"\n }\n ],\n \"paymentAmount\": 123,\n \"savePaymentMethod\": false,\n \"textReceipt\": false,\n \"paymentPlan\": {\n \"initialAmount\": 123,\n \"chargeIds\": [\n \"<string>\"\n ],\n \"installments\": 123,\n \"installmentAmount\": 123,\n \"locationId\": \"<string>\",\n \"startDate\": \"2023-12-25\"\n },\n \"isSurcharged\": false,\n \"locationId\": \"<string>\",\n \"creatorId\": \"<string>\",\n \"membershipId\": \"<string>\",\n \"membershipStartDate\": \"2023-11-07T05:31:56Z\",\n \"soldByProviderId\": \"<string>\",\n \"merchantAccountId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
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.decodahealth.com/billing/payment-terminal/payin-config")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"charges\": [\n {\n \"patientId\": \"<string>\",\n \"totalOutstanding\": 123,\n \"id\": \"<string>\",\n \"patient\": {\n \"id\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"locationId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"isArchived\": true,\n \"primaryLocationId\": \"<string>\",\n \"gender\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"patientMedications\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": true,\n \"surchargeDisabled\": true,\n \"tags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isActive\": true,\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"emoji\": \"<string>\",\n \"color\": \"<string>\",\n \"updatedDate\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n },\n \"total\": 0,\n \"description\": \"<string>\",\n \"status\": \"OUTSTANDING\",\n \"discountAmount\": 0,\n \"discountPercentage\": 0,\n \"externalId\": \"<string>\",\n \"externalCreatedDate\": \"2023-11-07T05:31:56Z\",\n \"ruleSetId\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"creatorId\": \"<string>\",\n \"items\": [],\n \"tips\": [],\n \"locationId\": \"<string>\",\n \"eventId\": \"<string>\",\n \"memberId\": \"<string>\",\n \"comment\": \"<string>\",\n \"meta\": {},\n \"merchantAccountId\": \"<string>\"\n }\n ],\n \"paymentAmount\": 123,\n \"savePaymentMethod\": false,\n \"textReceipt\": false,\n \"paymentPlan\": {\n \"initialAmount\": 123,\n \"chargeIds\": [\n \"<string>\"\n ],\n \"installments\": 123,\n \"installmentAmount\": 123,\n \"locationId\": \"<string>\",\n \"startDate\": \"2023-12-25\"\n },\n \"isSurcharged\": false,\n \"locationId\": \"<string>\",\n \"creatorId\": \"<string>\",\n \"membershipId\": \"<string>\",\n \"membershipStartDate\": \"2023-11-07T05:31:56Z\",\n \"soldByProviderId\": \"<string>\",\n \"merchantAccountId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/billing/payment-terminal/payin-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"charges\": [\n {\n \"patientId\": \"<string>\",\n \"totalOutstanding\": 123,\n \"id\": \"<string>\",\n \"patient\": {\n \"id\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"locationId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"isArchived\": true,\n \"primaryLocationId\": \"<string>\",\n \"gender\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"patientMedications\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": true,\n \"surchargeDisabled\": true,\n \"tags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isActive\": true,\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"emoji\": \"<string>\",\n \"color\": \"<string>\",\n \"updatedDate\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n },\n \"total\": 0,\n \"description\": \"<string>\",\n \"status\": \"OUTSTANDING\",\n \"discountAmount\": 0,\n \"discountPercentage\": 0,\n \"externalId\": \"<string>\",\n \"externalCreatedDate\": \"2023-11-07T05:31:56Z\",\n \"ruleSetId\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"creatorId\": \"<string>\",\n \"items\": [],\n \"tips\": [],\n \"locationId\": \"<string>\",\n \"eventId\": \"<string>\",\n \"memberId\": \"<string>\",\n \"comment\": \"<string>\",\n \"meta\": {},\n \"merchantAccountId\": \"<string>\"\n }\n ],\n \"paymentAmount\": 123,\n \"savePaymentMethod\": false,\n \"textReceipt\": false,\n \"paymentPlan\": {\n \"initialAmount\": 123,\n \"chargeIds\": [\n \"<string>\"\n ],\n \"installments\": 123,\n \"installmentAmount\": 123,\n \"locationId\": \"<string>\",\n \"startDate\": \"2023-12-25\"\n },\n \"isSurcharged\": false,\n \"locationId\": \"<string>\",\n \"creatorId\": \"<string>\",\n \"membershipId\": \"<string>\",\n \"membershipStartDate\": \"2023-11-07T05:31:56Z\",\n \"soldByProviderId\": \"<string>\",\n \"merchantAccountId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"sessionKey": "<string>",
"payinConfigId": "<string>",
"sandbox": true,
"paymentMethods": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Payment Terminals
Setup Payin Component
Sets up a payin component for completing a given Transaction.
POST
/
billing
/
payment-terminal
/
payin-config
Setup Payin Component
curl --request POST \
--url https://api.decodahealth.com/billing/payment-terminal/payin-config \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"charges": [
{
"patientId": "<string>",
"totalOutstanding": 123,
"id": "<string>",
"patient": {
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>",
"externalId": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": true,
"meta": {},
"isArchived": true,
"primaryLocationId": "<string>",
"gender": "<string>",
"dateOfBirth": "2023-12-25",
"patientMedications": [
"<string>"
],
"onSchedulingBlacklist": true,
"surchargeDisabled": true,
"tags": [
{
"id": "<string>",
"name": "<string>",
"isActive": true,
"createdDate": "2023-11-07T05:31:56Z",
"emoji": "<string>",
"color": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"creditBalance": 123,
"preferredProviderId": "<string>"
},
"total": 0,
"description": "<string>",
"status": "OUTSTANDING",
"discountAmount": 0,
"discountPercentage": 0,
"externalId": "<string>",
"externalCreatedDate": "2023-11-07T05:31:56Z",
"ruleSetId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"creatorId": "<string>",
"items": [],
"tips": [],
"locationId": "<string>",
"eventId": "<string>",
"memberId": "<string>",
"comment": "<string>",
"meta": {},
"merchantAccountId": "<string>"
}
],
"paymentAmount": 123,
"savePaymentMethod": false,
"textReceipt": false,
"paymentPlan": {
"initialAmount": 123,
"chargeIds": [
"<string>"
],
"installments": 123,
"installmentAmount": 123,
"locationId": "<string>",
"startDate": "2023-12-25"
},
"isSurcharged": false,
"locationId": "<string>",
"creatorId": "<string>",
"membershipId": "<string>",
"membershipStartDate": "2023-11-07T05:31:56Z",
"soldByProviderId": "<string>",
"merchantAccountId": "<string>"
}
'import requests
url = "https://api.decodahealth.com/billing/payment-terminal/payin-config"
payload = {
"charges": [
{
"patientId": "<string>",
"totalOutstanding": 123,
"id": "<string>",
"patient": {
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>",
"externalId": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": True,
"meta": {},
"isArchived": True,
"primaryLocationId": "<string>",
"gender": "<string>",
"dateOfBirth": "2023-12-25",
"patientMedications": ["<string>"],
"onSchedulingBlacklist": True,
"surchargeDisabled": True,
"tags": [
{
"id": "<string>",
"name": "<string>",
"isActive": True,
"createdDate": "2023-11-07T05:31:56Z",
"emoji": "<string>",
"color": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"creditBalance": 123,
"preferredProviderId": "<string>"
},
"total": 0,
"description": "<string>",
"status": "OUTSTANDING",
"discountAmount": 0,
"discountPercentage": 0,
"externalId": "<string>",
"externalCreatedDate": "2023-11-07T05:31:56Z",
"ruleSetId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"creatorId": "<string>",
"items": [],
"tips": [],
"locationId": "<string>",
"eventId": "<string>",
"memberId": "<string>",
"comment": "<string>",
"meta": {},
"merchantAccountId": "<string>"
}
],
"paymentAmount": 123,
"savePaymentMethod": False,
"textReceipt": False,
"paymentPlan": {
"initialAmount": 123,
"chargeIds": ["<string>"],
"installments": 123,
"installmentAmount": 123,
"locationId": "<string>",
"startDate": "2023-12-25"
},
"isSurcharged": False,
"locationId": "<string>",
"creatorId": "<string>",
"membershipId": "<string>",
"membershipStartDate": "2023-11-07T05:31:56Z",
"soldByProviderId": "<string>",
"merchantAccountId": "<string>"
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
charges: [
{
patientId: '<string>',
totalOutstanding: 123,
id: '<string>',
patient: {
id: '<string>',
createdDate: '2023-11-07T05:31:56Z',
firstName: '<string>',
lastName: '<string>',
phoneNumber: '<string>',
email: '<string>',
locationId: '<string>',
externalId: '<string>',
address: '<string>',
addressLineTwo: '<string>',
city: '<string>',
state: '<string>',
zipCode: '<string>',
country: '<string>',
addressValid: true,
meta: {},
isArchived: true,
primaryLocationId: '<string>',
gender: '<string>',
dateOfBirth: '2023-12-25',
patientMedications: ['<string>'],
onSchedulingBlacklist: true,
surchargeDisabled: true,
tags: [
{
id: '<string>',
name: '<string>',
isActive: true,
createdDate: '2023-11-07T05:31:56Z',
emoji: '<string>',
color: '<string>',
updatedDate: '2023-11-07T05:31:56Z'
}
],
creditBalance: 123,
preferredProviderId: '<string>'
},
total: 0,
description: '<string>',
status: 'OUTSTANDING',
discountAmount: 0,
discountPercentage: 0,
externalId: '<string>',
externalCreatedDate: '2023-11-07T05:31:56Z',
ruleSetId: '<string>',
createdDate: '2023-11-07T05:31:56Z',
creatorId: '<string>',
items: [],
tips: [],
locationId: '<string>',
eventId: '<string>',
memberId: '<string>',
comment: '<string>',
meta: {},
merchantAccountId: '<string>'
}
],
paymentAmount: 123,
savePaymentMethod: false,
textReceipt: false,
paymentPlan: {
initialAmount: 123,
chargeIds: ['<string>'],
installments: 123,
installmentAmount: 123,
locationId: '<string>',
startDate: '2023-12-25'
},
isSurcharged: false,
locationId: '<string>',
creatorId: '<string>',
membershipId: '<string>',
membershipStartDate: '2023-11-07T05:31:56Z',
soldByProviderId: '<string>',
merchantAccountId: '<string>'
})
};
fetch('https://api.decodahealth.com/billing/payment-terminal/payin-config', 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.decodahealth.com/billing/payment-terminal/payin-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'charges' => [
[
'patientId' => '<string>',
'totalOutstanding' => 123,
'id' => '<string>',
'patient' => [
'id' => '<string>',
'createdDate' => '2023-11-07T05:31:56Z',
'firstName' => '<string>',
'lastName' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'locationId' => '<string>',
'externalId' => '<string>',
'address' => '<string>',
'addressLineTwo' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipCode' => '<string>',
'country' => '<string>',
'addressValid' => true,
'meta' => [
],
'isArchived' => true,
'primaryLocationId' => '<string>',
'gender' => '<string>',
'dateOfBirth' => '2023-12-25',
'patientMedications' => [
'<string>'
],
'onSchedulingBlacklist' => true,
'surchargeDisabled' => true,
'tags' => [
[
'id' => '<string>',
'name' => '<string>',
'isActive' => true,
'createdDate' => '2023-11-07T05:31:56Z',
'emoji' => '<string>',
'color' => '<string>',
'updatedDate' => '2023-11-07T05:31:56Z'
]
],
'creditBalance' => 123,
'preferredProviderId' => '<string>'
],
'total' => 0,
'description' => '<string>',
'status' => 'OUTSTANDING',
'discountAmount' => 0,
'discountPercentage' => 0,
'externalId' => '<string>',
'externalCreatedDate' => '2023-11-07T05:31:56Z',
'ruleSetId' => '<string>',
'createdDate' => '2023-11-07T05:31:56Z',
'creatorId' => '<string>',
'items' => [
],
'tips' => [
],
'locationId' => '<string>',
'eventId' => '<string>',
'memberId' => '<string>',
'comment' => '<string>',
'meta' => [
],
'merchantAccountId' => '<string>'
]
],
'paymentAmount' => 123,
'savePaymentMethod' => false,
'textReceipt' => false,
'paymentPlan' => [
'initialAmount' => 123,
'chargeIds' => [
'<string>'
],
'installments' => 123,
'installmentAmount' => 123,
'locationId' => '<string>',
'startDate' => '2023-12-25'
],
'isSurcharged' => false,
'locationId' => '<string>',
'creatorId' => '<string>',
'membershipId' => '<string>',
'membershipStartDate' => '2023-11-07T05:31:56Z',
'soldByProviderId' => '<string>',
'merchantAccountId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/billing/payment-terminal/payin-config"
payload := strings.NewReader("{\n \"charges\": [\n {\n \"patientId\": \"<string>\",\n \"totalOutstanding\": 123,\n \"id\": \"<string>\",\n \"patient\": {\n \"id\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"locationId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"isArchived\": true,\n \"primaryLocationId\": \"<string>\",\n \"gender\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"patientMedications\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": true,\n \"surchargeDisabled\": true,\n \"tags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isActive\": true,\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"emoji\": \"<string>\",\n \"color\": \"<string>\",\n \"updatedDate\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n },\n \"total\": 0,\n \"description\": \"<string>\",\n \"status\": \"OUTSTANDING\",\n \"discountAmount\": 0,\n \"discountPercentage\": 0,\n \"externalId\": \"<string>\",\n \"externalCreatedDate\": \"2023-11-07T05:31:56Z\",\n \"ruleSetId\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"creatorId\": \"<string>\",\n \"items\": [],\n \"tips\": [],\n \"locationId\": \"<string>\",\n \"eventId\": \"<string>\",\n \"memberId\": \"<string>\",\n \"comment\": \"<string>\",\n \"meta\": {},\n \"merchantAccountId\": \"<string>\"\n }\n ],\n \"paymentAmount\": 123,\n \"savePaymentMethod\": false,\n \"textReceipt\": false,\n \"paymentPlan\": {\n \"initialAmount\": 123,\n \"chargeIds\": [\n \"<string>\"\n ],\n \"installments\": 123,\n \"installmentAmount\": 123,\n \"locationId\": \"<string>\",\n \"startDate\": \"2023-12-25\"\n },\n \"isSurcharged\": false,\n \"locationId\": \"<string>\",\n \"creatorId\": \"<string>\",\n \"membershipId\": \"<string>\",\n \"membershipStartDate\": \"2023-11-07T05:31:56Z\",\n \"soldByProviderId\": \"<string>\",\n \"merchantAccountId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
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.decodahealth.com/billing/payment-terminal/payin-config")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"charges\": [\n {\n \"patientId\": \"<string>\",\n \"totalOutstanding\": 123,\n \"id\": \"<string>\",\n \"patient\": {\n \"id\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"locationId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"isArchived\": true,\n \"primaryLocationId\": \"<string>\",\n \"gender\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"patientMedications\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": true,\n \"surchargeDisabled\": true,\n \"tags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isActive\": true,\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"emoji\": \"<string>\",\n \"color\": \"<string>\",\n \"updatedDate\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n },\n \"total\": 0,\n \"description\": \"<string>\",\n \"status\": \"OUTSTANDING\",\n \"discountAmount\": 0,\n \"discountPercentage\": 0,\n \"externalId\": \"<string>\",\n \"externalCreatedDate\": \"2023-11-07T05:31:56Z\",\n \"ruleSetId\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"creatorId\": \"<string>\",\n \"items\": [],\n \"tips\": [],\n \"locationId\": \"<string>\",\n \"eventId\": \"<string>\",\n \"memberId\": \"<string>\",\n \"comment\": \"<string>\",\n \"meta\": {},\n \"merchantAccountId\": \"<string>\"\n }\n ],\n \"paymentAmount\": 123,\n \"savePaymentMethod\": false,\n \"textReceipt\": false,\n \"paymentPlan\": {\n \"initialAmount\": 123,\n \"chargeIds\": [\n \"<string>\"\n ],\n \"installments\": 123,\n \"installmentAmount\": 123,\n \"locationId\": \"<string>\",\n \"startDate\": \"2023-12-25\"\n },\n \"isSurcharged\": false,\n \"locationId\": \"<string>\",\n \"creatorId\": \"<string>\",\n \"membershipId\": \"<string>\",\n \"membershipStartDate\": \"2023-11-07T05:31:56Z\",\n \"soldByProviderId\": \"<string>\",\n \"merchantAccountId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/billing/payment-terminal/payin-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"charges\": [\n {\n \"patientId\": \"<string>\",\n \"totalOutstanding\": 123,\n \"id\": \"<string>\",\n \"patient\": {\n \"id\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"locationId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"isArchived\": true,\n \"primaryLocationId\": \"<string>\",\n \"gender\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"patientMedications\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": true,\n \"surchargeDisabled\": true,\n \"tags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isActive\": true,\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"emoji\": \"<string>\",\n \"color\": \"<string>\",\n \"updatedDate\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n },\n \"total\": 0,\n \"description\": \"<string>\",\n \"status\": \"OUTSTANDING\",\n \"discountAmount\": 0,\n \"discountPercentage\": 0,\n \"externalId\": \"<string>\",\n \"externalCreatedDate\": \"2023-11-07T05:31:56Z\",\n \"ruleSetId\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"creatorId\": \"<string>\",\n \"items\": [],\n \"tips\": [],\n \"locationId\": \"<string>\",\n \"eventId\": \"<string>\",\n \"memberId\": \"<string>\",\n \"comment\": \"<string>\",\n \"meta\": {},\n \"merchantAccountId\": \"<string>\"\n }\n ],\n \"paymentAmount\": 123,\n \"savePaymentMethod\": false,\n \"textReceipt\": false,\n \"paymentPlan\": {\n \"initialAmount\": 123,\n \"chargeIds\": [\n \"<string>\"\n ],\n \"installments\": 123,\n \"installmentAmount\": 123,\n \"locationId\": \"<string>\",\n \"startDate\": \"2023-12-25\"\n },\n \"isSurcharged\": false,\n \"locationId\": \"<string>\",\n \"creatorId\": \"<string>\",\n \"membershipId\": \"<string>\",\n \"membershipStartDate\": \"2023-11-07T05:31:56Z\",\n \"soldByProviderId\": \"<string>\",\n \"merchantAccountId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"sessionKey": "<string>",
"payinConfigId": "<string>",
"sandbox": true,
"paymentMethods": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
The tenant you are making this request on behalf of
Your api key
Body
application/json
Payment medium types supported by the system.
These fall into two categories:
- Payment Processor Mediums: Require Rainforest/Stripe payin (card processing)
- External Settlement Mediums: Settled outside the system (cash, check, etc.)
Available options:
POS, VIRTUAL_TERMINAL, PAYMENT_LINK, PAYMENT_PLAN, SUBSCRIPTION, SAVED_PAYMENT_METHOD, MEMBERSHIP, CASH, CHECK, CARE_CREDIT, PATIENT_CREDIT Show child attributes
Show child attributes
Represents the creation of a payment plan without an ID.
This model defines the structure for creating a new payment plan, including details about the initial payment, associated charge, frequency of payments, number of installments, and the amount for each installment.
Show child attributes
Show child attributes
⌘I
