curl --request POST \
--url https://sandbox-raw-tokenization.jupico.com/v1/tokenization/creditcard/raw \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"subMerchantId": "rlockbox-md-1",
"CardHolderName": "Test raw tokenization",
"CreditCardNumber": "4242424242424242",
"Cvv": "123",
"ExpirationDate": {
"ExpirationMonth": "01",
"ExpirationYear": "30"
}
}
'import requests
url = "https://sandbox-raw-tokenization.jupico.com/v1/tokenization/creditcard/raw"
payload = {
"subMerchantId": "rlockbox-md-1",
"CardHolderName": "Test raw tokenization",
"CreditCardNumber": "4242424242424242",
"Cvv": "123",
"ExpirationDate": {
"ExpirationMonth": "01",
"ExpirationYear": "30"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subMerchantId: 'rlockbox-md-1',
CardHolderName: 'Test raw tokenization',
CreditCardNumber: '4242424242424242',
Cvv: '123',
ExpirationDate: {ExpirationMonth: '01', ExpirationYear: '30'}
})
};
fetch('https://sandbox-raw-tokenization.jupico.com/v1/tokenization/creditcard/raw', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://sandbox-raw-tokenization.jupico.com/v1/tokenization/creditcard/raw';
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subMerchantId: 'rlockbox-md-1',
CardHolderName: 'Test raw tokenization',
CreditCardNumber: '4242424242424242',
Cvv: '123',
ExpirationDate: {ExpirationMonth: '01', ExpirationYear: '30'}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"success": true,
"code": "<string>",
"data": {
"paymentToken": {
"type": "creditcard",
"token": {
"provider": "<string>",
"token": "<string>",
"cardType": "<string>",
"last4Digits": "<string>",
"expirationMonth": "<string>",
"expirationYear": "<string>",
"cardHolderName": "<string>"
}
}
},
"message": "<string>"
}Tokenize raw card data
Securely tokenize raw credit card information. The resulting token can be used in place of raw card data in future transactions, improving security and simplifying PCI compliance.
curl --request POST \
--url https://sandbox-raw-tokenization.jupico.com/v1/tokenization/creditcard/raw \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"subMerchantId": "rlockbox-md-1",
"CardHolderName": "Test raw tokenization",
"CreditCardNumber": "4242424242424242",
"Cvv": "123",
"ExpirationDate": {
"ExpirationMonth": "01",
"ExpirationYear": "30"
}
}
'import requests
url = "https://sandbox-raw-tokenization.jupico.com/v1/tokenization/creditcard/raw"
payload = {
"subMerchantId": "rlockbox-md-1",
"CardHolderName": "Test raw tokenization",
"CreditCardNumber": "4242424242424242",
"Cvv": "123",
"ExpirationDate": {
"ExpirationMonth": "01",
"ExpirationYear": "30"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subMerchantId: 'rlockbox-md-1',
CardHolderName: 'Test raw tokenization',
CreditCardNumber: '4242424242424242',
Cvv: '123',
ExpirationDate: {ExpirationMonth: '01', ExpirationYear: '30'}
})
};
fetch('https://sandbox-raw-tokenization.jupico.com/v1/tokenization/creditcard/raw', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://sandbox-raw-tokenization.jupico.com/v1/tokenization/creditcard/raw';
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subMerchantId: 'rlockbox-md-1',
CardHolderName: 'Test raw tokenization',
CreditCardNumber: '4242424242424242',
Cvv: '123',
ExpirationDate: {ExpirationMonth: '01', ExpirationYear: '30'}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"success": true,
"code": "<string>",
"data": {
"paymentToken": {
"type": "creditcard",
"token": {
"provider": "<string>",
"token": "<string>",
"cardType": "<string>",
"last4Digits": "<string>",
"expirationMonth": "<string>",
"expirationYear": "<string>",
"cardHolderName": "<string>"
}
}
},
"message": "<string>"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
Tokenize raw credit card data. Submit card details to receive a secure token for future transactions.
Unique identifier of the submerchant.
Name of the card holder. The maximum length of this field is 100 characters. This field only contains alphabetic characters, periods, hyphens, and apostrophes.
The credit card number to tokenize
Card verification value (CVV/CVC)
Response
Successful credit card tokenization
Whether the request was processed successfully. Declines return HTTP 200 with success: false.
Machine-readable result code. See the Error Codes reference.
The response payload.
Hide child attributes
Hide child attributes
The payment credential to charge: a one-time token from the web component or a stored Jupico token.
Hide child attributes
Hide child attributes
Type of token supplied.
"creditcard"
Token payload returned by tokenization.
Hide child attributes
Hide child attributes
Payment provider that issued the token (for example, jupico).
The token value.
Card brand (e.g., visa, mastercard)
Last 4 digits of the card number
Two-digit expiration month (01-12).
Two-digit expiration year.
Name of the cardholder.
Human-readable result message.
Was this page helpful?

