v1

latestOpenAPI 3.0.02026-08-043111167.0 KB
SourcesOfPayment

Create source of payment

Create a new payment source belonging to a companyProductId

post/source-of-payment/create

Query parameters

authorizationstring required

Authorization token

Request body

namestring
companyProductIdnumber
slugstring
clientCommentsAvailableboolean
activeboolean
descriptionOnClientFormboolean
isPredefinedPayerDetailsboolean
paidMethodsnumber[]
clientDefinesReferenceboolean
descriptionstring
expiresAtstring
fixedValuenumber
maxPaymentsnumber
urlCallbackstring
hasFastCheckOutboolean

Example request

{
  "name": "Source of payment 1",
  "slug": "Source of payment 1",
  "active": true,
  "customFields": [
    {
      "id": 1691515792228,
      "name": "campo 2",
      "type": "text"
    }
  ],
  "description": "descrption",
  "expiresAt": "2090-09-30T00:00:00.000Z",
  "fixedValue": 100000.5,
  "maxPayments": 10,
  "payerDetails": {
    "ref": "ref-001",
    "email": "johnD@gmail.com",
    "phone": "+57 310 3297014",
    "fullName": "John Doe",
    "documentType": "CC",
    "documentNumber": "1000000888"
  },
  "urlCallback": "https://myurl.com/callback"
}

Response

source of payment model instance

idnumber

Source of payment id

namestring

Source of payment name

activeboolean

Source of payment active, is available

slugstring

Source of payment slug

companyProductIdnumber

Source of payment company product id

createdAtstring

Source of payment created date

fixedValuenumber nullable

Source of payment fixed value

maxPaymentsnumber nullable

Source of maximum payments. If the value is 0, no limit is set, unlimited payments.

expiresAtstring nullable

Source of maximum payments. If the value is 0, no limit is set.

urlstring
hasFastCheckOutboolean

Source of payment has fast check out

Example response

{
  "id": 240,
  "name": "test url 2",
  "active": true,
  "slug": "test-url-2",
  "companyProductId": 1,
  "createdAt": "2021-08-30T17:00:00.000Z",
  "expiresAt": "2021-08-30T17:00:00.000Z",
  "url": "@troop/d30/test-url-2"
}