Tokenization (tokenize)
This service allows you to store a payment instrument such as: credit cards or bank account safely, through a request that contains its information, a token will be generated that can be used in the processing service and for all Indeed, in Placetopay it is equivalent to a credit card or bank account, the difference is that the token structure is sent instead of card or account.
Prior to consuming this service, the information must be consulted to know whether or not it is necessary to generate an OTP for the client and, if necessary, request the token from the person and send it during consumption.
Request
- Name
locale- Type
- string
- is optional
- Description
- Name
auth- Type
- Authentication
- is optional
- Description
Structure that contains the site authentication information generated according to the WSSE UsernameToken Profile 1.1
- Name
payer- Type
- Person
- is optional
- Description
Structure that reflects the information of a person involved in a transaction.
- Name
instrument- Type
- Instrument
- is Required
- REQUIRED
- Description
Structure that contains information about the means of payment to be used in a transaction. This structure is variable according to the request that is generated. Each service requires that one or another data be used.
- Name
payment- Type
- Payment
- is optional
- Description
Structure that contains the information about the payment of the transaction required to the web service
- Name
subscription- Type
- Subscription
- is optional
- Description
Structure that contains information about a subscription or transaction that does not require a specific amount
- Name
ipAddress- Type
- string
- is optional
- Description
- Name
userAgent- Type
- string
- is optional
- Description
Request
curl -X "POST" https://api-co-dev.placetopay.ws/gateway/tokenize \
-H "Content-Type: application/json" \
-d '{
"auth": {
"login": "aabbccdd1234567890aabbccdd123456",
"tranKey": "ABC123example456trankey+789abc012def3456ABC=",
"nonce": "NjBjYjc3YTYwZGZhYw==",
"seed": "2021-06-17T11:26:14-05:00"
},
"payer": {
"name": "John",
"surname": "Doe",
"email": "[email protected]"
},
"instrument": {
"card": {
"number": "5180300000000005",
"expiration": "12/18",
"cvv": "123",
"installments": "3"
}
},
"ipAddress": "127.0.0.1",
"userAgent": "Testing"
}'
Response
OK
- Name
status- Type
- Status
- is optional
- Description
Structure that contains information about a request or payment, informing its current status.
- Name
provider- Type
- string
- is optional
- Description
- Name
instrument- Type
- Instrument
- is optional
- Description
Structure that contains information about the means of payment to be used in a transaction. This structure is variable according to the request that is generated. Each service requires that one or another data be used.
- Name
additional- Type
- object
- is optional
- Description
Object that stores additional information to tokenization response.
Response
{
"status": {
"status": "OK",
"reason": "00",
"message": "The request has been successfully processed",
"date": "2021-06-17T11:29:37-05:00"
},
"provider": "CREDIBANCO",
"instrument": {
"token": {
"id": 123,
"token": "faketoken12f233bd8f5d42138d681bf07ea8295429df07a4af287703e30c891",
"subtoken": "fakesubtoken00005",
"franchise": "master",
"franchiseName": "Mastercard",
"lastDigits": "0005",
"validUntil": "2018-12-31"
}
}
}
Tokenization (invalidate)
This service allows you to invalidate and delete a token associated with a credit card.
Request
- Name
auth- Type
- Authentication
- is Required
- REQUIRED
- Description
Structure that contains the site authentication information generated according to the WSSE UsernameToken Profile 1.1
- Name
instrument- Type
- object
- is Required
- REQUIRED
- Description
Request
curl -X "POST" https://api-co-dev.placetopay.ws/invalidate \
-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"
},
"instrument": {
"token": {
"token": "faketoken12f233bd8f5d42138d681bf07ea8295429df07a4af287703e30c891"
}
}
}'
Response
OK
- Name
status- Type
- Status
- is optional
- Description
Structure that contains information about a request or payment, informing its current status.
Response
{
"status": {
"status": "OK",
"reason": "00",
"message": "The request has been successfully processed",
"date": "2021-06-17T11:29:37-05:00"
}
}
Consult tokenization
This service allows you to search for a tokenization using the value of the token or subtoken.
Request
- Name
auth- Type
- Authentication
- is Required
- REQUIRED
- Description
Structure that contains the site authentication information generated according to the WSSE UsernameToken Profile 1.1
- Name
instrument- Type
- Instrument
- is Required
- REQUIRED
- Description
Request
curl -X "POST" https://api-co-dev.placetopay.ws/gateway/token \
-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"
},
"instrument": {
"token": {
"id": 123,
}
}
}'
Response
OK
- Name
status- Type
- Status
- is optional
- Description
Structure that contains information about a request or payment, informing its current status.
- Name
data- Type
- object
- is optional
- Description
Object with token information.
Response
{
"status": {
"status": "OK",
"reason": "00",
"message": "The request has been successfully processed",
"date": "2021-06-17T11:29:37-05:00"
},
"data": {
"id": 1,
"type": "card",
"token": "faketoken12f233bd8f5d42138d681bf07ea8295429df07a4af287703e30c891",
"subtoken": "fakesubtoken00005",
"franchise": "visa",
"franchiseName": "Visa",
"issuerName": "TESTING",
"lastDigits": "1111",
"validUntil": "12/29",
"owner": "John Doe",
"bin": "411111",
"accountType": null,
"isPromotedToBrandToken": false
}
}