Get CreditCard Token

Request Base URL

  Test Environment : https://security-test.pagsmile.com
  Prod Environment : https://security.pagsmile.com

EndPoints

  /card/token

Request Header

ParameterRequiredDescription

Content-Type

recommend

application/json

Authorization

yes

Basic Base64(app_id:security_key)

Request Body (JSON format)

ParameterTypeRequiredMax Length(or Default Value)Description

app_id

string

yes

32

created app's id at dashboard

timestamp

string

yes

19

yyyy-MM-dd HH:mm:ss

card.card_no

string

yes

32

card.issuer

string

yes

16

visa,mastercard...

card.holder.name

string

yes

64

card.holder.identification.type

string

no

16

card.holder.identification.number

string

yes

64

card.cvv

string

yes

8

security code

card.valid_thru_year

string

yes

4

expire year

card.valid_thru_month

string

yes

2

expire month

Request Sample

curl --location --request POST 'https://security.pagsmile.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 format)

ParameterTypeDescription

code

string

return code

msg

string

return msg

sub_code

string

return sub code(only error)

sub_msg

string

return sub msg(only error)

token

string

Return Code (Success)

{
    "code": "10000",
    "msg": "Success",
    "token": "{token}",
}

Return Code (Fail)

{
    "code": "40002",
    "msg": "Business Failed",
    "sub_code": "invalid-signature",
    "sub_msg": "invalid signature"
}

Last updated