When a customer's default payment method is updated in your billing system, you should consider notifying Churn Buster so that analytics can be properly reported.
This endpoint is optional, though it adds a great layer of depth to your campaign reporting, showing which campaigns were recovered via retry, compared to which campaigns were recovered via card update.
curl -X "POST" "https://api.churnbuster.io/v1/payment_methods" \
-H "Content-Type: application/json" \
-u "ACCOUNT_ID:API_KEY" \
-d $'{
"payment_method": {
"source": "in_house",
"source_id": "card_abc123",
"type": "card",
"properties": {
"brand": "visa",
"funding": "debit",
"last4": "1234",
"exp_month": 9,
"exp_year": 2022
}
},
"customer": {
"source": "in_house",
"source_id": "cus_abc123",
"email": "sarah@example.com",
"properties": {
"first_name": "Sarah",
"last_name": "Doe"
}
}
}
Important note about "source" and "source_id":