PaymentFailedv1.0.0
Properties
id* :
Unique identifier of the payment referred as Checkout Session Id.
clientReferenceId* :
A unique string to reference the Checkout Session. This can be a Customer ID, Subscription ID, Subscription type, User action or similar. This value is generated and passed from the service/user that has initiated the creation of this payment, that can be later used to reconcile the session with your internal systems.
eg: for creating a subscription, the clientReferenceId will be the action type
CREATE_SUBSCRIPTION
.paymentServiceProvider* :
Name of the Payment Service Provider used.
pspUserId* :
Id of the user created on the Payment Service Provider.
pspCardId* :
Id of the Tokenized card used. Issued by the Payment Service Provider.
pspChargeId* :
Id of the payment. Issued by the Payment Service Provider.
amount* :
Amount collected for the payment before calculating the discount and vat.
discount* :
Discount applied for the payment.
vat* :
Vat collected for the payment.
amountToBePaid* :
Actual amount to be paid after calculating the discount and vat.
coupon* :
Coupon used for the payment.
currency* :
Currency used in the payment. Value can be one of below.
- BHD - SAR - AED - KWD - QAR - OMR
paymentMethod* :
Payment method used. Value can be one of the below.
- cash - cc - benefit - mada - applePay - knet - naps - bnpl
userId* :
The ID of the subscriber who has done the payment.
name* :
The name of the subscriber who has done the payment
phoneNumber* :
The phone number of the subscriber who has done the payment
email* :
The email of the subscriber who has done the payment
cardPrefix* :
First six number of the card used by the user for the payment.
metadata* :
Set of key-value pairs that can be set by initiator service/user. This can be useful for storing additional information about the object in a structured format.
Error* :
Object that contains the error code and reason for the failed payment.
- error [String] - Reason [String]
createdAt* :
The date when the user created the checkout session.
openapi: 3.0.0
info:
version: "1.0.0"
title: PaymentFailed
paths: {}
components:
schemas:
PaymentFailed:
type: object
required:
- metadata
- data
properties:
data:
"$ref": "#/components/schemas/Data"
metadata:
"$ref": "#/components/schemas/Metadata"
Data:
type: object
required:
- id
- clientReferenceId
- paymentServiceProvider
- pspUserId
- pspChargeId
- pspCardId
- amount
- discount
- vat
- amountToBePaid
- coupon
- currency
- paymentMethod
- userId
- name
- phoneNumber
- email
- error
- metadata
- createdAt
properties:
id:
type: string
clientReferenceId:
type: string
paymentServiceProvider:
type: string
pspUserId:
type: string
pspChargeId:
type: string
pspCardId:
type: string
amount:
type: number
format: double
discount:
type: number
vat:
type: number
amountToBePaid:
type: number
format: double
coupon:
type: string
currency:
type: string
enum:
- BHD
- SAR
- AED
- KWD
- QAR
- OMR
paymentMethod:
type: string
userId:
type: string
name:
type: string
phoneNumber:
type: string
email:
type: string
cardPrefix:
type: string
error:
type: object
required:
- code
- reason
properties:
code:
type: string
reason:
type: string
metadata:
type: object
createdAt:
type: string
format: date-time
Metadata:
type: object
required:
- serviceFunction
- version
properties:
serviceFunction:
type: string
version:
type: string