--- swagger: "2.0" info: x-ibm-name: card-payments-api title: Card Payments API version: 1.0.0 description: 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. contact: name: API developer email: apideveloper@rakbank.ae name: "" schemes: - https host: sandboxapi.rakbank.ae basePath: /v1 consumes: - application/json produces: - application/json securityDefinitions: OAuth for Internal Bank Apps: type: oauth2 description: "" flow: application scopes: card_payments: To process credit card payments tokenUrl: https://sandboxapi.rakbank/sb/api/v1/int_client_auth/token clientIdHeader: type: apiKey in: header name: X-IBM-Client-Id security: - clientIdHeader: [] OAuth for Internal Bank Apps: - card_payments x-ibm-configuration: testable: false enforced: true phase: realized paths: /card_payments: post: responses: 201: description: 201 Created schema: $ref: '#/definitions/card_payment_resp' 422: description: Error schema: $ref: '#/definitions/error_response' 500: description: Internal Server Error schema: $ref: '#/definitions/error_response' parameters: - name: card_payment_req required: true in: body schema: $ref: '#/definitions/card_payment_req' description: Request details to create a credit card payment. description: 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. summary: Create a Card Payment operationId: createCardPayment parameters: - name: msgid type: string maxLength: 50 required: true in: header description: 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. definitions: error_response: 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 description: Response in case of error card_payment_req: 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 from: 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 description: This will contain the details of the customer and his card to be used for the card payment to: 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 description: This will contain the details of the merchant to which payment would be made. value: 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 description: Amount details 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 description: Array of Part Transactions transaction_narration: 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: ~ 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 description: Transaction Narrations to appear in the account statement for this transaction. card_payment_resp: 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 tags: [] x-ibm-endpoints: - endpointUrl: https://sandboxapi.rakbank.ae/sb/api type: - production - development ...