get https://api.sandbox.midtrans.com/v2/card/register
Register Card for Card Payment Method
Register Card can be triggered to register the card information of the customer for future one click and two click transactions.
Register Card Status Method
HTTP Method | Endpoint | Definition |
---|---|---|
GET | BASE_URL/v2/card/register | Register card information (card number and expiry) to be used for two clicks and one click |
Register Card Request
See sample on the right -- try it yourself!
Query Parameter | Description | Type | Required |
---|---|---|---|
card_number | Credit card number | String | Required |
card_exp_month | Credit card expiry month | String | Required |
card_exp_year | Credit card expiry year | String | Required |
client_key | Partner client key credential | String | Required |
callback | Function name used for JSONP callback | String | Required |
Register Card Response
{
"status_code": "200",
"saved_token_id": "436502PjvfpHomPBggDvfipaIYhV0009",
"transaction_id": "50e7c4ac-772e-43fa-94fb-52559bce4fc0",
"masked_card": "48111111-1114"
}
JSON Attribute | Description | Type |
---|---|---|
transaction_id | Transaction ID given by Midtrans. | String |
masked_card | First 8-digit and last 4-digit of customer's credit card number. | String |
status_code | Status code of transaction charge result. | String |
saved_token_id | Token id used for Two Clicks or One Click. | String |