Skip to main content

Step 1: Store New Card

If you don't have any card stored for a customer yet, use this API to store a new card and receive a card_token.

Endpoint Information

Name: Store New Customer Card
Method: POST
URL: {{stg_url}}/api/v1/store-new-customer/card

Authentication

Type: Basic Auth

  • Username: App Key
  • Password: Secret Key

Request Body

Content-Type: application/json

{
"customerToken": "46ee99884ecd415570b091d508539825",
"customerReferenceId": "",
"merchantAccountId": "100012",
"cardName": "JOHN DOE",
"cardNumber": "4123456789012345",
"cardExpiry": "12/2028"
}

Response

Success Response

{
"success": true,
"message": "success",
"data": {
"card_token": "a8ebb8d3-4e84-45ab-9847-6a574edc4e58",
"card_number": "412345XXXXXX2345",
"expiry_date": "*******",
"card_type": "VISA",
"card_name": "JO****OE",
"customer": {
"customer_reference_id": "16275a38-a270-4c6d-960a-70781ae1823a",
"first_name": "Danny",
"middle_name": null,
"last_name": "Example",
"email": "[email protected]"
}
}
}