Token
The key generated by a subscription process is identified as a token, allowing the generation of charges without user interaction.
Charge using token
Allows payments to be made without user intervention using previously subscribed means of payment.
Request
Allows payments to be made without user intervention using previously subscribed means of payment.
- Name
auth- Type
- Authentication
- is Required
- REQUIRED
- Description
Site authentication. See more in Authentication
- Name
payment- Type
- PaymentRequest
- is Required
- REQUIRED
- Description
Requested payment information.
- Name
instrument- Type
- Instrument-collect
- is Required
- REQUIRED
- Description
Structure containing the details of a subscribed means of payment.
- Name
ipAddress- Type
- string
- is Required
- REQUIRED
- Description
IP address of the user who will perform the process.
Example:134.10.163.36Max length:46
- Name
userAgent- Type
- string
- is Required
- REQUIRED
- Description
User Agent of the user's browser that will carry out the process.
Example:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36Max length:255
- Name
payer- Type
- Person
- is Required
- REQUIRED
- Description
Data of the user payer, refers to the owner of the means of payment or user who paid the requested amount.
- Name
buyer- Type
- Person
- is optional
- Description
User data buyer, refers to the user who is buying a product or service.
- Name
locale- Type
- string
- is optional
- Description
Language in which the request and the session will be processed. See more in Location
Example:en_US, es_COFormat:regexPattern:^\w{2}\_[A-Z]{2}Max length:5
- Name
type- Type
- string
- is optional
- Description
Parameter used for pre-authorization type sessions
Only
checkinis supported to generate a pre-authorization sessionAllowed values:checkin
- Name
metadata- Type
- metadata
- is optional
- Description
Key-value structure used to send additional information and determine specific behaviors during session processing.
- Name
provider- Type
- string
- is optional
- Description
Provider code to use for the transaction.
Request
curl -X "POST" https://checkout-test.placetopay.com/api/collect \
-H "Content-Type: application/json" \
-d '{
"locale": "es_CO",
"auth": {
"login": "aabbccdd1234567890aabbccdd123456",
"tranKey": "ABC123example456trankey+789abc012def3456ABC=",
"nonce": "NjE0OWVkODgwYjNhNw==",
"seed": "2021-09-21T09:34:48-05:00"
},
"payer": {
"name": "John",
"surname": "Doe",
"email": "[email protected]",
"mobile": "5551234567",
"documentType": "CC",
"document": "12345678"
},
"payment": {
"reference": "1122334455",
"description": "Test",
"amount": {
"currency": "USD",
"total": 100
}
},
"instrument": {
"token": {
"token": "e07ca9986cf0ecac8a557fa11c07bf37ea35e9e3e3a4180c49"
}
},
"expiration": "2021-12-30T00:00:00-05:00",
"returnUrl": "https://dnetix.co/p2p/client",
"ipAddress": "127.0.0.1",
"userAgent": "PlacetoPay Sandbox"
}'
Response
OK
- Name
requestId- Type
- integer
- is optional
- Description
- Name
status- Type
- Status
- is optional
- Description
Structure that contains the response information about a request or payment, and reports the current status of the same.
- Name
request- Type
- request
- is optional
- Description
- Name
payment- Type
- PaymentResponse
- is optional
- Description
- Name
subscription- Type
- SubscriptionResponse
- is optional
- Description
Structure containing information for the subscription payment method.
Response
{
"requestId": 1,
"status": {
"status": "APPROVED",
"reason": "00",
"message": "The request has been successfully approved",
"date": "2021-11-30T15:49:47-05:00"
},
"request": {
"locale": "es_CO",
"payer": {
"document": "1033332222",
"documentType": "CC",
"name": "Name",
"surname": "LastName",
"email": "[email protected]",
"mobile": "3111111111",
"address": {
"postalCode": "12345"
}
},
"payment": {
"reference": "1122334455",
"description": "Prueba",
"amount": {
"currency": "USD",
"total": 100
},
"allowPartial": false,
"subscribe": false
},
"returnUrl": "https://redirection.test/home",
"ipAddress": "127.0.0.1",
"userAgent": "PlacetoPay Sandbox",
"expiration": "2021-12-30T00:00:00-05:00"
},
"payment": [
{
"status": {
"status": "APPROVED",
"reason": "00",
"message": "Aprobada",
"date": "2021-11-30T15:49:36-05:00"
},
"internalReference": 1,
"paymentMethod": "visa",
"paymentMethodName": "Visa",
"issuerName": "JPMORGAN CHASE BANK, N.A.",
"amount": {
"from": {
"currency": "USD",
"total": 100
},
"to": {
"currency": "USD",
"total": 100
},
"factor": 1
},
"authorization": "000000",
"reference": "1122334455",
"receipt": "241516",
"franchise": "DF_VS",
"refunded": false,
"processorFields": [
{
"keyword": "lastDigits",
"value": "1111",
"displayOn": "none"
}
]
}
],
"subscription": null
}
Invalidate token
Allows you to invalidate an existing site token. This will make the token or subtoken no longer usable.
Request
- Name
auth- Type
- Authentication
- is Required
- REQUIRED
- Description
Site authentication. See more in Authentication
- Name
instrument- Type
- InstrumentInvalidate
- is Required
- REQUIRED
- Description
Información del Token a invalidar.
- Name
locale- Type
- string
- is optional
- Description
Language in which the request and the session will be processed. See more in Location
Example:en_US, es_COFormat:regexPattern:^\w{2}\_[A-Z]{2}Max length:5
Request
curl -X "POST" https://checkout-test.placetopay.com/api/instrument/invalidate \
-H "Content-Type: application/json" \
-d '{
"locale": "en_US",
"auth": {
"login": "aabbccdd1234567890aabbccdd123456",
"tranKey": "ABC123example456trankey+789abc012def3456ABC=",
"nonce": "NjE0OWVkODgwYjNhNw==",
"seed": "2021-09-21T09:34:48-05:00"
},
"instrument": {
"token": {
"token": "a3bfc8e2afb9ac5583922eccd6d2061c1b0592b099f04e352a894f37ae51cf1a"
}
}
}'
Response
Example response
- Name
status- Type
- Status
- is Required
- REQUIRED
- Description
Structure that contains the response information about a request or payment, and reports the current status of the same.
Response
{
"status": {
"status": "APPROVED",
"reason": "00",
"message": "The petition has been successfully approved",
"date": "2022-07-27T14:51:27-05:00"
}
}