Payment
The Payment object
Unique identifier for the object.
Has the value "live" if the object exists in live mode, or "sand" if it exists in test mode.
Possible values: [sand
, live
]
A unique string to reference the Payment. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Payment with your internal systems.
Mode of this Payment.
Possible values: [Payment
, Wallet
, Setup
]
The ID of the Company this Payment is associated with.
The ID of the Customer of this Payment.
The ID of the Customer's PaymentMethod to attach to this Payment.
Default PaymentGateway used for the first transaction.
List of PaymentGateways enabled for this Payment. If empty all PaymentGateways are used.
closeCheckout object
callback object
Current status of the Payment.
Possible values: [Requested
, Paid
, Confirmed
, Refunded
, Cancelled
, Voided
, Expired
]
metadata objectnullable
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. It can contain up to 10 key-value items with a maximum length of 40 for the key and of 400 chars for the value.
transactions object[]
paymentGateway object
Possible values: [0
, 1
, 2
]
Possible values: [OTP
, REDIRECT
, DROPIN
]
paymentGatewayParameters object[]nullable
options object[]nullable
error object
The error encountered during the Transaction, if any.
The type of error returned.
Possible values: [Generic
, Cancelled
, NotCompleted
, MissingPaymentMethod
, Declined
, System
]
externalError object
creditCard object
If this is a card PaymentMethod, this contains the user’s card details.
Card brand
Card masked PAN
Two-digit number representing the card’s expiration month.
Four-digit number representing the card’s expiration year.
directDebit object
If this is a sepa_debit PaymentMethod, this contains the user’s card details.
ID of the bank account.
BIC of the bank account.
IBAN of the bank account.
Current status of the Transaction.
Possible values: [Requested
, Paid
, Confirmed
, Refunded
, Dropped
, Cancelled
, Failed
, Voided
, Expired
, ImpossibleRefund
]
request object
Possible values: [OTP
, REDIRECT
, DROPIN
]
lines object[]
The quantity of the line item being purchased.
The ID of the Product that this PaymentLine will belong to. One of productId
or productName
is required. When productId
is provided, all other product-related fields will be ignored, as their values will be automatically loaded from the Product.
The product’s name, meant to be displayable to the customer. One of productId
or productName
is required.
The product’s variant description, meant to be displayable to the customer.
The product’s image, meant to be displayable to the customer.
A non-negative integer in cents representing how much to charge for each individual unit.
A non-negative integer in cents representing the discount applied to each individual unit. This field is mutually exclusive with discountAmount
— only one of the two may be specified.
A non-negative integer in cents representing the total discount applied to the entire line. This field is mutually exclusive with unitDiscountAmount
— only one of the two may be specified.
A non-negative integer in cents representing how much to charge.
The product's applicable tax rate.
Indicates whether this payment line refers to a food item. This flag is used to determine eligibility for meal vouchers or similar benefits.
modifiers object[]nullable
The ID of the Modifier that this customization will belong to.
The ID of the Product that this customization will belong to.
discounts object[]
The discount’s name, meant to be displayable to the customer.
The discount’s description. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
A non-negative integer in cents representing how much to subtract from the total. Must be specified when both type
and value
are null.
Defines how the discount is calculated:
DOLLAROFF
: A fixed amount in cents is subtracted from the total.PERCENOFF
: A percentage of the total amount is subtracted.FIXED
: The final price is set to a fixed amount, overriding the original total.
Possible values: [DOLLAROFF
, PERCENOFF
, FIXED
]
The value of the discount, contextual to the selected type
. Must be specified when type
is provided and amount
is null.
Defines the application order of this discount relative to others.
{
"id": "string",
"tenant": "sand",
"mode": "Payment",
"parentPaymentId": "string",
"companyId": "string",
"customerId": "string",
"customerEmail": "string",
"customerFirstName": "string",
"customerLastName": "string",
"customerPhoneNumber": "string",
"customerPaymentMethodId": "string",
"selectedPaymentGateway": "string",
"paymentGateways": [
"string"
],
"checkoutUrl": "string",
"closeCheckout": {
"success": true,
"date": "2024-07-29T15:51:28.071Z"
},
"callback": {
"success": true,
"date": "2024-07-29T15:51:28.071Z"
},
"totalAmount": 0,
"discountAmount": 0,
"finalAmount": 0,
"paidAmount": 0,
"paidVoucherAmount": 0,
"amount": 0,
"status": "Requested",
"metadata": {},
"transactions": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"paymentGatewayId": "string",
"paymentGateway": {
"id": "string",
"name": "string",
"type": 0,
"paymentAction": "OTP",
"image": "string",
"checkoutImage": "string",
"icon": "string",
"minimumAmount": 0,
"isPartiallyRefundable": true,
"isTokenizable": true,
"requestAffiliationUrl": "string",
"paymentGatewayParameters": [
{
"paymentGatewayId": "string",
"parameterId": "string",
"friendlyName": "string",
"isMerchant": true,
"isForm": true,
"isVisible": true,
"isRequired": true,
"tenantDefaultValue": "string",
"options": [
{
"id": "string",
"text": "string"
}
]
}
]
},
"externalId1": "string",
"externalId2": "string",
"externalId3": "string",
"isWallet": true,
"error": {
"code": "Generic",
"externalError": {
"message": "string",
"code": "string"
}
},
"requestedAmount": 0,
"amount": 0,
"voucherAmount": 0,
"noOfVouchers": 0,
"confirmedAmount": 0,
"refundedAmount": 0,
"currency": "string",
"creditCard": {
"brand": "string",
"pan": "string",
"expiration": "string",
"expirationMonth": 0,
"expirationYear": 0,
"product": "string"
},
"directDebit": {
"accountId": "string",
"accountBic": "string",
"accountIban": "string"
},
"holderEmail": "string",
"holderName": "string",
"status": "Requested",
"request": {
"action": "OTP",
"externalTransactionId": "string",
"url": "string"
}
}
],
"lines": [
{
"quantity": 0,
"productId": "string",
"productName": "string",
"productVariant": "string",
"productImage": "string",
"unitAmount": 0,
"unitDiscountAmount": 0,
"discountAmount": 0,
"finalAmount": 0,
"taxRate": 0,
"isFood": true,
"modifiers": [
{
"modifierId": "string",
"productId": "string",
"productName": "string",
"quantity": 0,
"price": 0
}
]
}
],
"discounts": [
{
"discountName": "string",
"discountDescription": "string",
"amount": 0,
"type": "DOLLAROFF",
"value": 0,
"index": 0
}
]
}