Hi Bryan.
I have something very interesting, In sandbox everything works perfect, but in production expecially international cards, to be exact Ecuadorian cards, in some cards, I have this example of a real payment
request:
{
“idempotency_key”: “savecard_6aab5b4f670877.92960336”,
“source_id”: “[redacted]”,
“card”: {
“cardholder_name”: “Diego Guerrero G”,
“billing_address”: {
“address_line_1”: “Av narcisa de Jesús”,
“address_line_2”: “Urb la Romareda”,
“locality”: “Guayaquil”,
“administrative_district_level_1”: “G”,
“postal_code”: “090703”,
“country”: “EC”
},
“customer_id”: “JD36QEJ14JC13HHR7W7HZBRCBG”
}
}
response:
{
“errors”: [
{
“category”: “INVALID_REQUEST_ERROR”,
“code”: “INVALID_CARD_DATA”,
“detail”: “Invalid card data.”,
“field”: “source_id”
}
]
}
Could you please explain me why happen this ? It Is Problem in my side or customer or the source bank, any advice?
thank you in advance
P.d . the cards has founds
this is my personal log:
{"timestamp":"2026-09-16 23:15:25","stage":"WEB_TOKENIZATION_DIAGNOSTIC","bookid":5346,"data":{"phase":"TOKENIZE_RETURNED","status":"OK","token_created":true,"payment_method":"Card","card_brand":"MASTERCARD","card_type":"CREDIT","prepaid_type":"NOT_PREPAID","last4":"1694","billing_country":"EC","billing_state":"G","postal_code_present":true,"amount":"358.37","currency":"USD","intent":"CHARGE_AND_STORE","customer_initiated":true,"seller_keyed_in":false,"errors":[],"exception_name":null,"exception_message":null,"client_ip":"157.100.40.19","bookid":5346}}
{"timestamp":"2026-09-16 23:15:27","stage":"CREATE_PAYMENT","bookid":5346,"data":{"result":"SUCCESS","amount_cents":35837,"amount_dollars":358.37,"payment_status":"COMPLETED","payment_id":"L9qXmTBy5hJmaGHrWeZPGsb31wCZY","card_brand":"MASTERCARD","last4":"1694","card_type":"CREDIT","prepaid_type":"NOT_PREPAID","urlReceipt":"https://squareup.com/receipt/preview/L9qXmTBy5hJmaGHrWeZPGsb31wCZY"}}
{"timestamp":"2026-09-16 23:15:27","stage":"UPDATE_RESERVATION_PAYMENT_ID","bookid":5346,"data":{"result":"SUCCESS","payment_id":"L9qXmTBy5hJmaGHrWeZPGsb31wCZY","affected_rows":1}}
{"timestamp":"2026-09-16 23:15:27","stage":"CHECK_EXISTING_CARD","bookid":5346,"data":{"result":"NO_MATCH","payment_id":"L9qXmTBy5hJmaGHrWeZPGsb31wCZY","customer_id":"JD36QEJ14JC13HHR7W7HZBRCBG","fingerprint_available":true}}
{"timestamp":"2026-09-16 23:15:28","stage":"CREATE_CARD_FROM_PAYMENT","bookid":5346,"data":{"result":"FAILED","payment_id":"L9qXmTBy5hJmaGHrWeZPGsb31wCZY","customer_id":"JD36QEJ14JC13HHR7W7HZBRCBG","country":"EC","amount_cents":35837,"errors":[{"category":"INVALID_REQUEST_ERROR","code":"INVALID_CARD_DATA","detail":"Invalid card data.","field":"source_id"}]}}
{"timestamp":"2026-09-16 23:15:28","stage":"STORE_CARD_AFTER_PAYMENT","bookid":5346,"data":{"result":"FAILED","payment_completed":true,"payment_id":"L9qXmTBy5hJmaGHrWeZPGsb31wCZY","save_card_error":[{"category":"INVALID_REQUEST_ERROR","code":"INVALID_CARD_DATA","detail":"Invalid card data.","field":"source_id"}]}}
{"timestamp":"2026-09-16 23:15:28","stage":"DB_SAVE_PAYMENT","bookid":5346,"data":{"result":"RESPONSE_RECEIVED","payment_id":"L9qXmTBy5hJmaGHrWeZPGsb31wCZY"}}
the last stage is to save the data in my data base.
{"timestamp":"2026-09-16 23:15:28","stage":"DB_SAVE_PAYMENT","bookid":5346,"data":{"result":"RESPONSE_RECEIVED","payment_id":"L9qXmTBy5hJmaGHrWeZPGsb31wCZY"}}