This API processes a card payment from a customer's RAKBANK credit card towards a merchant account and also allows the client to pass the related fund transfer transaction details in the same request.
Attachment | Size |
---|---|
![]() | 2.58 KB |
Response Codes
Click Here for API Response Codes
Basepath
/v1
Paths
/card_payments
Create a Card Payment
Creates a card payment from a customer's credit card towards a merchant account and also allows the client to pass the related fund transfer transaction details in the same request. The payment authorization code of the card payment request and the payment reference id corresponding to related fund transfer transaction and the transaction date are returned in the response.
Unique Id sent by client in UUID format. The value should be a unique identifier of the request so that it can be used for any tracking and investigation purpose.
{
"maxLength": 50
}
Request details to create a credit card payment.
Definitions
Response in case of error
{
"properties": {
"status": {
"type": "string",
"description": "HTTP Status"
},
"response_code": {
"type": "string",
"description": "API specific error code"
},
"property": {
"type": "string",
"description": ""
},
"response_message": {
"type": "string",
"description": "brief details of the error"
},
"description": {
"type": "string",
"description": "detailed description of the error"
}
},
"additionalProperties": false,
"required": [
"response_message",
"response_code",
"status"
]
}
{
"properties": {
"from": {
"$ref": "#/definitions/from"
},
"to": {
"$ref": "#/definitions/to"
},
"transaction_amount": {
"description": "Transaction Amount Value",
"$ref": "#/definitions/value"
},
"billing_amount": {
"description": "Billing Amount Value",
"$ref": "#/definitions/value"
},
"related_part_transactions": {
"type": "array",
"description": "Holds an array of part transactions",
"items": {
"$ref": "#/definitions/part_transactions"
}
}
},
"additionalProperties": false
}
This will contain the details of the customer and his card to be used for the card payment
{
"properties": {
"customer_id_type": {
"type": "string",
"enum": [
"CIF_ID"
],
"description": "Type of the Customer id of the customer who initiates the transaction. Allowed values - CIF_ID",
"example": "CIF_ID"
},
"customer_id": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"example": 1234567,
"description": "Customer id of the customer, corresponding to the customer_id_type, who initiates the transaction"
}
},
"additionalProperties": false,
"required": [
"customer_id",
"customer_id_type"
]
}
This will contain the details of the merchant to which payment would be made.
{
"properties": {
"mcc_code": {
"type": "string",
"minLength": 1,
"maxLength": 4,
"description": "Merchant Category Code of the marchant to which payment would be made.",
"example": "Gordan"
}
},
"additionalProperties": false,
"required": [
"mcc_code"
]
}
Amount details
{
"properties": {
"currency": {
"type": "string",
"minLength": 1,
"maxLength": 3,
"description": "Currency",
"example": "AED"
},
"amount": {
"type": "string",
"pattern": "^((\\d{1}|\\d{2}|\\d{3}|\\d{4}|\\d{5}|\\d{6}|\\d{7}|\\d{8}|\\d{9}|\\d{10}|\\d{11}|\\d{12}|\\d{13}|\\d{14}|\\d{15}|\\d{16})?\\.?(\\d{1}|\\d{2}|\\d{3})?)$",
"minLength": 1,
"maxLength": 20,
"description": "Amount Value",
"example": 2001
}
},
"additionalProperties": false,
"required": [
"currency",
"amount"
]
}
Array of Part Transactions
{
"properties": {
"part_transaction_type": {
"type": "string",
"enum": [
"C",
"D"
],
"description": "Debit/Credit Indicator of the part transaction. Allowed values are C - Credit, D - Debit.",
"example": "C"
},
"account_id": {
"type": "string",
"minLength": 1,
"maxLength": 16,
"example": "5120********3456",
"description": "Debit or Credit Account id. Debit Account id should be passed as masked credit card number. Masking logic to be used : Except for first 4 and last 4 digits of the card, all other digits should be passed as '*'."
},
"value": {
"$ref": "#/definitions/value"
},
"value_date": {
"type": "string",
"description": "Value Date of the transaction.",
"example": "2019-01-30T11:10:12Z",
"format": "date-time"
},
"transaction_narration": {
"$ref": "#/definitions/transaction_narration"
},
"rate": {
"type": "string",
"description": "Forex rate applicable for the transaction. This is mandatory for non-AED transactions when rate_code is not MID. The rate can be fetched using FxRate & Charges API."
},
"rate_code": {
"type": "string",
"enum": [
"TTS",
"TTB",
"MID"
],
"description": "Forex rate code applicable for the transaction. Possible values: TTS,TTB,MID. This is mandatory for non-AED transactions. The rate code can be fetched using FxRate & Charges API."
}
},
"additionalProperties": false,
"required": [
"part_transaction_type",
"account_id",
"value",
"value_date",
"transaction_narration"
]
}
Transaction Narrations to appear in the account statement for this transaction.
{
"additionalProperties": false,
"properties": {
"transaction_code": {
"type": "string",
"minLength": 1,
"maxLength": 5,
"description": "Transaction particular Code. This will differ based on the type of transaction. First line of the transaction narration in the account statement will be the description related to this code.",
"example": "520"
},
"transaction_particular2": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "Second line of the transaction narration. The client's reference number for this transaction must be passed in this field",
"example": null
},
"transaction_particulars": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"description": "Third line of the transaction narration",
"example": "2019-02-06 06:34:11.785"
},
"transaction_remarks": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"description": "Transaction Remarks",
"example": "for 1234567890123"
}
},
"required": [
"transaction_code"
]
}
{
"properties": {
"payment_authcode": {
"type": "string",
"minLength": 1,
"maxLength": 15,
"description": "Bank's Authorization code corresponding the card payment transaction",
"example": 91928374
},
"payment_ref_id": {
"type": "string",
"minLength": 1,
"maxLength": 9,
"description": "The bank's unique id corresponding to related fund transfer transaction",
"example": "M123"
},
"transaction_date": {
"type": "string",
"description": "Date when the transaction is created.",
"example": "2018-09-14",
"format": "date"
}
},
"additionalProperties": false
}