LoyaltyDish supports 3 payment types: Credit card, PayPal and Cash.
Checkout mutation
mutation (
$id: ID!
$paymentType: String!
$cashReceived: Decimal
$cashReceivedCurrency: String
$change: Decimal
$changeCurrency: String
$consumerPaypalEmail: String
$paymentGatewayParams: JSONString
){
checkoutOrder(
input: {
id: $id
paymentType: $paymentType
cashReceived: $cashReceived
cashReceivedCurrency: $cashReceivedCurrency
change: $change
changeCurrency: $changeCurrency
consumerPaypalEmail: $consumerPaypalEmail
paymentGatewayParams: $paymentGatewayParams
}
) {
errors
success
order {
id
}
}
}
Credit card checkout
paymentGatewayParams
depends in the payment gateway you configured for your system
Currently, there are 3 available payment gateways: Stripe, Square, Razorpay
// Stripe params schema
{
"payment_method_id": {
"type": "string",
}
}
// Square params schema
{
"source_id": {
"type": "string",
}
}
// Razorpay params schema
{
"payment_id": {
"type": "string",
}
}
PayPal checkout
Cash checkout
mutation (
$id: ID!
$paymentType: String!
$cashReceived: Decimal
$cashReceivedCurrency: String
$change: Decimal
$changeCurrency: String
){
checkoutOrder(
input: {
id: $id
paymentType: $paymentType
cashReceived: $cashReceived
cashReceivedCurrency: $cashReceivedCurrency
change: $change
changeCurrency: $changeCurrency
}
) {
errors
success
order {
id
}
}
}