ER diagram for Payment
Overview
This document explains about the ER diagram for payment which includes the following tables:
Key tables
- CC_TRANSACTION: Represents the logical transaction (checkout).Used to track the overall process of a transaction from initiation to completion involving split tender payment.
- CC_TRANSACTION_ATTEMPT: Represents each customer retry attempt.Important for capturing multiple attempts to process a transaction in split tender payment.
- CC_PAYMENTS: Provides more detailed information about each payment made during the transaction.
Payment status values
Possible payment status values
| Status |
|---|
| INITIATED |
| PROCESSING |
| PENDING |
| PENDING_FOR_CUSTOMER_CREATION |
| PENDING_FOR_PAYMENT_METHOD_CREATION |
| CANCEL_FAILED |
| PROCESSING_DEDUP_CHECK |
| PAYMENT_METHOD_FAILED |
| CAPTURE_INITIALIZED |
| CANCEL_INITIALIZED |
| CONFIRMATION_INITIALIZED |
| AUTH_REQUIRED |
| PROCESSING_DEDUP_CHECK |
| CONFIRMATION_REQUIRED |
| ACCEPTED |
| AUTHORIZED |
| COMPLETED |
| CANCELED |
| FAILED |
Error column structure
Error Json
{
"message": "",
"errorCode": "",
"errorGroup": "",
"httpStatus": "",
"errorDetails": {
"code": "",
"message": "",
"declineCode": "",
"networkAdviceCode": "",
"networkDeclineCode": ""
}
}
Error Json description
- See Error Structure
Agent column structure
Agent Json
{
"firstName": "",
"lastName": "",
"isAccessVerified": true,
"userId": ""
}
Agent json description
- See Agent Structure
Warning column structure
Warning Json
{
"code": "",
"title": "",
"description": ""
}
Warning json description
| Field | Description |
|---|---|
| code | Code of warning |
| title | title of the warning |
| description | Description of warning |
Consent column structure
Consent Json
{
"collectionDetails": {
"web": {
"ipAddress": "",
"userAgent": ""
},
"type": ""
},
"merchantConsentId": "",
"collectionTimestamp": "",
"merchantConsentText": ""
}
Details
Payment method column structure
Payment method Json
{
"id": "",
"card": {
"last4": "",
"status": "",
"zipCode": "",
"cardBrand": "",
"expiryYear": "",
"nameOnCard": "",
"expiryMonth": "",
"manufacturerCard": ""
},
"default": "",
"warning": "",
"nickname": "",
"validate": "",
"authRequired": "",
"attachRequired": "",
"paymentMethodType": "",
"savePaymentMethod": "",
"partialAuthorization": "",
"paymentMethodDetails": {
"moto": "",
"type": "",
"last4": "",
"status": "",
"zipCode": "",
"cvcCheck": "",
"cardBrand": "",
"expiryYear": "",
"nameOnCard": "",
"cardChannel": "",
"cardFunding": "",
"cardNetwork": "",
"countryCode": "",
"expiryMonth": "",
"fingerprint": "",
"zipCodeCheck": "",
"manufacturerCard": "",
"addressLine1Check": "",
"vendorPaymentMethodFingerprint": ""
}
}
Details
Meta data column structure
meta data Json
{
"orderId":"",
"invoiceDate":"",
"OrderType":""
}
payment details structure
payment details Json
{
"healthcare": {
"iias": {
"qualifiedAmount": null,
"qualifiedAmountDetails": {
"prescriptionAmount": null
}
},
"visionAmount": null
}
}
Transaction details section
Transaction details sample Json
{
"description":"",
"vendorMerchantId":"",
"authorizeCard":"",
"vendor":"STRIPE",
"customerId":"",
"agent":{
"userId":"",
"lastName":"",
"firstName":"",
"isAccessVerified":true
},
"statementDescriptorSuffix":"",
"checkoutId":"",
"consent":{
"collectionDetails":{
"web":{
"ipAddress":"",
"userAgent":""
},
"type":""
},
"merchantConsentId":"",
"collectionTimestamp":"",
"merchantConsentText":""
},
"paymentDetails":{
"healthcare":{
"iias":{
"qualifiedAmount":null,
"qualifiedAmountDetails":{
"prescriptionAmount":null
}
},
"visionAmount":null
}
},
"paymentAllocations":[
{
"id":"",
"amount":"",
"authorizedAmount":"",
"capturedAmount":"",
"paymentMethodId":"",
"status":"",
"vendorPaymentId":"",
"PaymentMethod":{
"id":"",
"default":true,
"paymentMethodType":"",
"nickname":"",
"SourceProvider":{
"name":""
},
"paymentMethodDetails":{
"type":"",
"last4":"",
"status":"",
"cardBrand":"",
"expiryMonth":"",
"expiryYear":"",
"nameOnCard":"",
"zipCode":"",
"accountHolderType":"",
"accountType":"",
"bankName":"",
"routingNumber":"",
"nameOnAccount":"",
"CardCategory":[
{
"type":"",
"medications":[
{
"label":"",
"value":""
}
]
}
]
}
},
"paymentCancellationReason":"",
"paymentCancellationMessage":"",
"error":{
"code":"",
"message":"",
"declineCode":"",
"networkDeclineCode":"",
"networkAdviceCode":""
},
"metadata":[
{
"key1":"value1",
"key2":"value2"
}
]
}
]
}
Details
| Field | Description |
|---|---|
| description | Description of the payment transaction used for initiating the payment. |
| vendorMerchantId | Identifier assigned by the payment vendor for this merchant. Used to uniquely identify the merchant in the vendor's system. |
| authorizeCard | Indicates whether the card was authorized for the specified amount. Default false |
| vendor | STRIPE |
| customerId | Unique identifier for the customer associated with this payment. |
| agent | - See Agent Structure |
| statementDescriptorSuffix | This value is directly propagated from request. |
| checkoutId | Unique identifier for the checkout session associated with this payment |
| consent | - See Consent Structure |
| paymentDetails | - See Payment details structure |
| paymentAllocations | - See Payment allocation structure |
Attempt details section
Attempt details sample Json
{
"paymentAllocations":[
{
"id":"",
"amount":"",
"authorizedAmount":"",
"capturedAmount":"",
"paymentMethodId":"",
"status":"",
"vendorPaymentId":"",
"PaymentMethod":{
"id":"",
"default":true,
"paymentMethodType":"",
"nickname":"",
"SourceProvider":{
"name":""
},
"paymentMethodDetails":{
"type":"",
"last4":"",
"status":"",
"cardBrand":"",
"expiryMonth":"",
"expiryYear":"",
"nameOnCard":"",
"zipCode":"",
"accountHolderType":"",
"accountType":"",
"bankName":"",
"routingNumber":"",
"nameOnAccount":"",
"CardCategory":[
{
"type":"",
"medications":[
{
"label":"",
"value":""
}
]
}
]
}
},
"paymentCancellationReason":"",
"paymentCancellationMessage":"",
"error":{
"code":"",
"message":"",
"declineCode":"",
"networkDeclineCode":"",
"networkAdviceCode":""
},
"metadata":[
{
"key1":"value1",
"key2":"value2"
}
]
}
]
}
Details
| Field | Description |
|---|---|
| paymentAllocations | - See Payment allocation structure |
paymentAllocations section
Details
| Field | Description |
|---|---|
| id | Unique identifier for this split tender payment. |
| amount | Amount in cents (USD) allocated to this split tender. |
| authorizedAmount | Amount in cents (USD) that was authorized for this split tender. |
| capturedAmount | Amount in cents (USD) that was successfully captured for this split tender. |
| paymentMethodId | Identifier of the payment method used for this split tender. |
| vendorPaymentId | Unique identifier assigned by the payment vendor |
| status | Current processing state of payment. |
| PaymentMethod | - See Paymentmethod Structure |
| paymentCancellationReason | The reason this payment was canceled |
| paymentCancellationMessage | This value is directly propagated from request and will be used to provide additional context for the cancellation. |
| error | - See Error Structure |
| metadata | Key-value pairs containing additional metadata for this payment split The payment-level metadata includes transaction-level metadata from payment.metadata[], the referenceId (which is the unique individual payment ID), and any metadata specific to the payment method. |