Skip to main content
POST
/
user
/
patient
/
payment-methods
/
create
Create Payment Method
curl --request POST \
  --url https://api.decodahealth.com/user/patient/payment-methods/create \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "paymentMethodId": "<string>",
  "paymentMethodConfigId": "<string>",
  "fingerprint": "<string>",
  "methodType": "<string>",
  "card": {
    "brand": "<string>",
    "last4": "<string>",
    "expMonth": 123,
    "expYear": 123
  },
  "ach": {
    "accountHolderType": "<string>",
    "accountNumberLast4": "<string>",
    "bankName": "<string>",
    "routingNumber": "<string>"
  },
  "applePay": {
    "type": "<string>",
    "brand": "<string>",
    "brandDesc": "<string>",
    "description": "<string>"
  },
  "billingContact": {
    "name": "<string>",
    "addressLine1": "<string>",
    "addressLine2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postalCode": "<string>",
    "country": "<string>",
    "email": "<string>",
    "phone": "<string>"
  },
  "metadata": {},
  "createdAt": "<string>",
  "updatedAt": "<string>"
}
'
{
  "id": "<string>",
  "patientId": "<string>",
  "rainforestPaymentMethodId": "<string>",
  "brand": "<string>",
  "last4": "<string>",
  "expMonth": 123,
  "expYear": 123,
  "accountHolderType": "<string>",
  "accountNumberLast4": 123,
  "bankName": "<string>",
  "routingNumber": 123,
  "description": "<string>",
  "type": "CARD",
  "isDefault": false,
  "isArchived": false
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Query Parameters

patient_id
string
required

ID of the patient to add the payment method to

Body

application/json
paymentMethodId
string
required
paymentMethodConfigId
string
required
fingerprint
string | null
required
methodType
string
required
card
RainforestCard · object
required

The card used to pay for the payin

ach
RainforestACH · object
required

The ACH used to pay for the payin

applePay
ApplePay · object
required
billingContact
BillingContact · object
required
metadata
Metadata · object
required
createdAt
string
required
updatedAt
string
required

Response

Successful Response

id
string
required
patientId
string | null
required
rainforestPaymentMethodId
string
required
brand
string | null
required
last4
string | null
required
expMonth
integer | null
required
expYear
integer | null
required
accountHolderType
string | null
required
accountNumberLast4
integer | null
required
bankName
string | null
required
routingNumber
integer | null
required
description
string | null
required
type
enum<string> | null
required
Available options:
CARD,
ACH,
APPLE_PAY
isDefault
boolean
default:false
isArchived
boolean
default:false