Store a credit card
POST/api/v3/creditcard
This method can be used to store a new card or update an existing card.
To update an existing card: Send a new POST request using an existing card number with its updated values. The stored card will then be updated.
Request
- application/json
Body
customer_id integer
The customer id #
external_key string
Unique external key value
name string
Name on credit card
number string
Credit card number
cvv string
CVV/CSC security code (not stored, but may be used for validation/pre-auth)
expdate string
Expiration date (in YYYY-MM-DD format)
expdate_year string
Expiration year (4-digits, YYYY) (only required if you do not provide expdate)
expdate_month string
Expiration month (2-digits, MM) (only required if you do not provide expdate)
address string
Billing street address
city string
Billing city
state string
Billing state
postcode string
Billing postal code
country string
Billing country
Responses
- 201
- 400
- 401
Object was created successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response
object
id integer
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": {
"id": 0
}
}
{
"code": 201,
"status": "OK",
"message": "",
"details": {},
"response": {
"id": 1234
}
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response boolean
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 400,
"status": "Error",
"message": "Missing or invalid parameter.",
"details": {},
"response": false
}
Authentication error
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response boolean
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 401,
"status": "Error",
"message": "Invalid or incorrect authorization [Missing (basic) authorization header.]",
"details": {},
"response": false
}
Loading...