---
title: "DirectPayment"
method: POST
path: "/v2/DirectPayment/{invoiceKey}/{paymentGatewayId}"
tags: ["Payments (V2)"]
---

# DirectPayment

`POST /v2/DirectPayment/{invoiceKey}/{paymentGatewayId}`

Facilitates the payment process by directly executing payments using card details or saved tokens. Note: This endpoint can be used if your system PCI certified

## Path parameters

- `invoiceKey` string, required
- `paymentGatewayId` integer, required

## Request body

- object
  - `PaymentType` 'card' | 'token', required — Specify the payment type: 'card' for card payment, 'token' for tokenized payment.
  - `Bypass3DS` boolean — Specify whether this transaction should be verified by 3DS or not.
  - `SaveToken` boolean — Set to true to save card data and return a token for future use.
  - `Token` string — The token value to execute the transaction against. Required if PaymentType is 'token'.
  - `Card` object — Card details. Required if PaymentType is 'card'.
    - `Number` string — The 16 digits of the card that will be charged for the transaction.
    - `ExpiryMonth` string — Card expiry month (MM).
    - `ExpiryYear` string — Card expiry year (YY).
    - `SecurityCode` string — Card CVV / CVC.
    - `HolderName` string — Name on card.

## Response `200`

Payment processed successfully

- object
  - `IsSuccess` boolean — Indicates if the request was successful.
  - `Message` string — Response message associated with the request.
  - `ValidationErrors` object[] — List of validation errors, if any.
    - `Name` string
    - `Error` string
  - `Data` object
    - `Status` string — The transaction status in non-3DS flow
    - `ErrorMessage` string — In case of error, the error message returned from the gateway.
    - `PaymentId` string — The payment ID associated with the transaction.
    - `Token` string — If SaveToken is requested, this returns the token of the card.
    - `PaymentURL` string — The OTP link. You should redirect your customer to this page for 3DS verification.
    - `CardInfo` object
      - `Number` string — The card number that executed the payment, displays first and last 4 digits.
      - `ExpiryMonth` string — Card expiry month.
      - `ExpiryYear` string — Card expiry year.
      - `Brand` string — Card brand (VISA or Master).
      - `Issuer` string — The card issuer bank.

---

[API](https://skmtc.net/myfatoorah/apis/myfatoorah-api-v3.md) · [All operations](https://skmtc.net/myfatoorah/apis/myfatoorah-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myfatoorah/myfatoorah-api-v3/revisions/994a74287a16/schema)
