---
title: "POST /source-of-payment/create-direct-payment"
method: POST
path: "/source-of-payment/create-direct-payment"
tags: ["SourcesOfPayment"]
---

# POST /source-of-payment/create-direct-payment

`POST /source-of-payment/create-direct-payment`

## Create direct payment and source of payment

Create a new source of payment direct form backend, without a front interface, belonging to a companyProductId.

***expiresAt*** [optional]: Only avaylable for "paymentChannel": "pos" cashIn. 

* By default it is set to 7 days expiration 

* expiresAt value must be greater than 24h from current date 

* expiresAt must be less than 7 from current date

** expiration for bank transfers is by default 1 hr online and 24 hr in a physical bank with the bank code generated.***callbackUrl*** : url to return after payment is processed 

***userType*** [optional]: only required for transactions in colombia 

***metadata*** [optional]: object with additional information

## Query parameters

- `authorization` string, required

## Request body

- object
  - `name` string
  - `slug` string
  - `paidMethod` number — see /paid-methods : PSE, 2: Credit card
  - `companyProductId` number — Company product id, see /company-products
  - `expiresAt` string
  - `documentType` string
  - `documentNumber` string
  - `currencyId` number — Currency id, see /currencies
  - `amount` number
  - `firstName` string
  - `lastName` string
  - `email` string
  - `phone` string
  - `userType` string — "0": Natural person, "1": Legal person
  - `description` string
  - `callbackUrl` string — Url to return after payment
  - `metadata` object — Metadata to save in payment, optional

## Response `200`

source of payment model instance

- object
  - `fastPaymentProcessorEngine` object
    - `code` string
    - `message` string
    - `body` object
      - `pdf` string
      - `pdfUrl` string
  - `sourceOfPayment` object
    - `id` number — Source of payment id
    - `name` string — Source of payment name
    - `active` boolean — Source of payment active, is available
    - `slug` string — Source of payment slug
    - `companyProductId` number — Source of payment company product id
    - `createdAt` string — Source of payment created date
    - `fixedValue` number, nullable — Source of payment fixed value
    - `maxPayments` number, nullable — Source of maximum payments. If the value is 0, no limit is set, unlimited payments.
    - `expiresAt` string, nullable — Source of maximum payments. If the value is 0, no limit is set.
    - `url` string — Base URL of the payment to be use in web: https://app.loopay.com/@troop/d30/test-url-2 | in demo: https://demo.loopay.com/@troop/d30/test-url-2
    - `hasFastCheckOut` boolean — Source of payment has fast check out

## Other responses

- `202` — ## Create-direct-payment with card Create a direct source of payment with a card pay method, belonging to a companyProductId. To consult the available paidMethods belonging to a companyProductId, see the /paid-methods endpoint. * cardCVV card CVV applies only to card payments * cardNumber card number applies only to card payments * expirationDate card expiration date, "MM/YY" applies only to card payments ### Example input: ~~~{ "name": "test url 2", "slug": "test-url-2", "paidMethod": 16, "companyProductId": 203, "documentType": "DNI", "documentNumber": "1000000888", "currencyId": 2, "amount": 25, "firstName": "John", "lastName": "Doe", "email": "jdoe@gmail.com", "phone": "+573103297014", "description": "test url 2", "callbackUrl": "https://www.loopay.com/", "cardCVV": 355, "cardNumber": "5303710409428783", "cardExpirationDate": "05/26"

---

[API](https://skmtc.dev/loopay/apis/loopay-api.md) · [All operations](https://skmtc.dev/loopay/apis/loopay-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/loopay/loopay-api/revisions/2f7c6537d598/schema)
