This page is to further demonstrate how to implement frontend processes for Credit Card transactions
Card Number
Expiration (MM/YYYY) /
CVV
Result card token_id
JS implementation:
Card Token ID
3DS Authentication enabled
Result redirect url (if 3DS)
// sample charge in CURL curl -X POST \ https://api.sandbox.midtrans.com/v2/charge \ -H 'Accept: application/json' \ -H 'Authorization: Basic < From your server_key >' \ -H 'Content-Type: application/json' \ -d '{ "payment_type": "credit_card", "transaction_details": { "order_id": "order102-2-1562650595", "gross_amount": 100000 }, "credit_card": { "token_id": "< Token ID from Get Token Step >", "authentication": true } }'
Redirect URL
Result:
...