v1
latestOpenAPI 3.0.02026-08-043111167.0 KBSourcesOfPayment
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
post/source-of-payment/create-direct-payment
Query parameters
authorizationstring required
Authorization token
Request body
Example request
{
"name": "test url 2",
"slug": "test-url-2",
"paidMethod": 1,
"companyProductId": 1,
"expiresAt": "2021-08-30T17:00:00.000Z",
"documentType": "CC",
"documentNumber": "1000000888",
"currencyId": 1,
"amount": 10000.5,
"firstName": "John",
"lastName": "Doe",
"email": "user1@gmail.com",
"phone": "+573103297014",
"userType": "1",
"description": "test url 2",
"callbackUrl": "https://myurl.com/callback",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}Response
source of payment model instance
Example response
{
"fastPaymentProcessorEngine": {
"code": "200",
"message": "success",
"body": {
"pdf": "https://myurl.com/pdf",
"pdfUrl": "https://myurl.com/pdf"
}
},
"sourceOfPayment": {
"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"
}
}