# Get CreditCard Token
# Request Base URL
Test Environment : https://security-test.transfersmile.com
Prod Environment : https://security.transfersmile.com
# EndPoints
/card/token
# Request Header
Parametro | Requerido | Descripción |
---|---|---|
Content-Type | recomendado | application/json |
Authorization | Si | Basic Base64(app_id:security_key) |
# Request Body (JSON formato)
Parametro | Tipo | Requerido | Max Extensión(o Valor por defecto) | Descripción |
---|---|---|---|---|
app_id | string | Si | 32 | app id creada en el dashboard |
timestamp | string | Si | 19 | yyyy-MM-dd HH:mm:ss |
card.card_no | string | Si | 32 | |
card.issuer | string | Si | 16 | visa,mastercard... |
card.holder.name | string | Si | 64 | |
card.holder.identification.type | string | no | 16 | |
card.holder.identification.number | string | Si | 64 | |
card.cvv | string | Si | 8 | security code |
card.valid_thru_year | string | Si | 4 | expire year |
card.valid_thru_month | string | Si | 2 | expire month |
# Ejemplo de Request
curl --location --request POST 'https://security.transfersmile.com/card/token' \
--header 'Authorization: Basic Base64(appid:security_key)' \
--header 'Content-Type: application/json' \
--data-raw '{
"app_id": "app_id",
"timestamp": "{{datetime}}",
"card": {
"card_no": "card_no",
...
}
}'
# Http Response (JSON formato)
Parametro | Tipo | Descripción |
---|---|---|
code | string | código regresado |
msg | string Msg retornado | |
sub_code | string | Return sub code(sólo error) |
sub_msg | string | Return sub msg(sólo error) |
token | string | |
# Return Code (Exitoso)
{
"code": "10000",
"msg": "Success",
"token": "{token}",
}
# Return Code (Fallido)
{
"code": "40002",
"msg": "Business Failed",
"sub_code": "invalid-signature",
"sub_msg": "invalid signature"
}