Add Card for an existing Customer
Endpoint for adding a Card for an existing Customer.
info
Please be aware that this endpoint requires a Manage Customers API Key.
POST
/api/v1/groups/{group_id}/revere_pay/{linked_account_id}/customers/{customer_id}
Request Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| token | Card token generated with Reverepay Tokenizer | string | Required |
| billing_address | Billing address of the Customer | object | Required |
| billing_address.city | City of the Customer. | string | Required |
| billing_address.company | Company Name of the Customer. | string | |
| billing_address.country | Country of the Customer. | string | Required |
| billing_address.line_1 | First Address line of the Customer. | string | Required |
| billing_address.line_2 | Second Address line of the Customer. | string | |
| billing_address.postal_code | Postal Code of the Customer. | string | Required |
| billing_address.subdivision | Subdivision of the Customer. | string | Required |
Response
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request / Validation error |
| 500 | Internal Error |
Example Usage
- JavaScript
- Python
- Go
add_card.js
var headers = new Headers();
headers.append('Authorization', 'API_KEY');
var requestOptions = {
method: 'POST',
headers: headers,
redirect: 'follow',
body: {
// request body data
}
};
const group_id = '';
const linked_account_id = '';
const customer_id = '';
const url = `https://api.reverepayments.dev/api/v1/groups/${group_id}/revere_pay/${linked_account_id}/customers/${customer_id}`;
fetch(url, requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
add_card.py
import requests
group_id = ""
linked_account_id = ""
customer_id = ""
url = "https://api.reverepayments.dev/api/v1/groups/" + group_id + "/revere_pay/" + linked_account_id + "/customers/" + customer_id
headers = {
'Authorization': 'API_KEY'
}
response = requests.request("POST", url, headers=headers, json={
// request body data
})
print(response.text)
add_card.go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
const group_id = ""
const linked_account_id = ""
const customer_id = ""
url := "https://api.reverepayments.dev/api/v1/groups/" + group_id + "/revere_pay/" + linked_account_id + "/customers/" + customer_id
client := &http.Client{}
body := bytes.NewBuffer(nil)
_ = json.NewEncoder(body).Encode(map[string]any{
// body data
})
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Authorization", "API_KEY")
res, _ := client.Do(req)
defer res.Body.Close()
bytes, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println(string(bytes))
}
Example Request
{
"token": "25f8fa96-5c96-4448-994c-c2b7281ed263",
"billing_address": {
"line1": "742 Evergreen Terrace",
"line2": "Apt 5B",
"city": "Springfield",
"subdivision": "IL",
"postal_code": "62704",
"country": "US"
}
}
Example Success Response
{
"card_id": "7aef4024-045b-4901-a5cc-b9a54ea19bb1",
"first_six": "411111",
"last_four": "1111",
"expiration": "11/26",
"brand": "Visa",
"card_type": "debit",
"card_category": "PERSONAL",
"holder_name": "John Doe",
"billing_address": {
"line1": "742 Evergreen Terrace",
"line2": "Apt 5B",
"city": "Springfield",
"subdivision": "IL",
"postal_code": "62704",
"country": "US"
},
"issuer": "Visa Sandbox",
"issuer_country": "US",
"regulated": true,
"commercial": false,
"card_on_file": true,
"created_at": "2025-07-21T12:43:14.964535Z",
"updated_at": "2025-07-21T12:43:14.964535Z"
}