The request tried to create a payment, but the payment method was not found

Hello,
I am opening this post because TODAY July 7th 2023 we started encountering an issue with recurring payments which is greatly impacting our company revenues.

In many instances, we started to receive the below error code on our recurring payments request - where Rapyd is initiating a subscription payment with the API:

{
“status”: {
“error_code”: “ERROR_CREATE_PAYMENT”,
“status”: “ERROR”,
“message”: “The request tried to create a payment, but the payment method was not found. The request was rejected. Corrective action: Use the ID of the payment method in the ‘payment_method’ field. Alternatively, if the customer has a default payment method, you can use the ID of the customer in the ‘customer’ field.”,
“response_code”: “ERROR_CREATE_PAYMENT”,
“operation_id”: “eb0c0e48-4db3-4c5b-9a6e-6fedb07191dc”
}
}

The request for the above payment was made at the /payments endpoint with the following body, in which we provide both the customer ID and the customer’s payment_method ID:

{
"amount": 29,
"currency": "EUR",
"customer": "cus_d3e4751db1f8fecf5dcaabaf2bXXXX",
"payment_method": "card_ca03f158a07dae54867a69d9910XXXXX",
"capture": true,
"initiation_type": "recurring",
"statement_descriptor": "ourwebsiteurl.com"
}

We cannot understand why we are receiving the above error since when we check the customer object with the API, we can verify that the customer (cus_d3e4751db1f8fecf5dcaabaf2bXXXX) has a payment method on file (card_ca03f158a07dae54867a69d9910XXXXX).

Here is the GET API request on the /customers/cus_d3e4751db1f8fecf5dcaabaf2bXXXX endpoint:

{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "ed9260fa-2dd1-4931-b5b8-c15a74b1398b"
    },
    "data": {
        **"id": "cus_d3e4751db1f8fecf5dcaabaf2bXXXX",**
        "delinquent": false,
        "discount": null,
        "name": "john doe",
 **"default_payment_method": "card_ca03f158a07dae54867a69d9910XXXXX",**
"description": "",
        "email": "john-doe@gmail.com",
        "phone_number": "",
        "invoice_prefix": "",
        "addresses": [],
        "payment_methods": {
            "data": [
                {
                    **"id": "card_ca03f158a07dae54867a69d9910XXXXX",**
                    "type": "gb_mastercard_card",
                    "category": "card",
                    "metadata": {},
                    "image": "https://iconslib.rapyd.net/checkout/gb_mastercard_card.png",
                    "webhook_url": "",
                    "supporting_documentation": "",
                    "next_action": "not_applicable",
                    "name": "john doe",
                    "last4": "XXXX",
                    "acs_check": "pass",
                    "cvv_check": "unchecked",
                    "bin_details": {
                        "type": "DEBIT",
                        "brand": "MASTERCARD",
                        "level": "STANDARD",
                        "issuer": "XXXXXXX",
                        "country": "ES",
                        "bin_number": "XXXXXX"
                    },
                    "expiration_year": "XX",
                    "expiration_month": "XX",
                    "fingerprint_token": "ocfp_2b373c1a4bcd46abf8c70655XXXXXXX"
                }
            ],
            "has_more": false,
            "total_count": 1,
            "url": "/v1/customers/cus_d3e4751db1f8fecf5dcaabaf2bXXXX/payment_methods"
        },
        "subscriptions": {
            "data": [
                {
                    "id": "sub_19d027ccb4e1fdcfe0d38115cXXXXXX",
                    "billing": "pay_automatically",
                    "billing_cycle_anchor": 1688742490,
                    "created_at": 1688569690,
                    **"customer_token": "cus_d3e4751db1f8fecf5dcaabaf2bXXXX",**
                    "days_until_due": 30,
                    "metadata": {},
                    "tax_percent": 0,
                    "cancel_at_period_end": false,
                    "canceled_at": null,
                    "current_period_end": 1691420890,
                    "current_period_start": 1688742490,
                    "discount": null,
                    "ended_at": null,
                    "subscription_items": null,
                    "status": "unpaid",
                    "trial_end": null,
                    "trial_start": null,
                    "payment_method": "",
                    "payment_fields": null,
                    "payout_fields": null,
                    "type": "payment",
                    "simultaneous_invoice": true
                }
            ],
            "has_more": false,
            "total_count": 1,
            "url": "/v1/subscriptions?customer_token=cus_d3e4751db1f8fecf5dcaabaf2bXXXX"
        },
        "created_at": 1688569632,
        "metadata": {},
        "business_vat_id": "",
        "ewallet": ""
    }
}

The above error is occurring in around 70% of our recurring payments. However, the 30% of our successful recurring payments are initiated in the same way and contain the same fields as the failed ones.

Any assistance in solving this issue would be greatly appreciated.

Thanks

Hi @Damiano_Caffa - thanks for your question.

Since this is happening in production, you will need to email Rapyd Client Support team – if you are unable to open a ticket through your account in the Rapyd Client Portal, you must email support@rapyd.net. This forum is not monitored by Rapyd client support.

Best,
Drew

Hi @drew.harris .

I’ve issued a support ticket from the dashboard and also sent an email.
However, I doubt that the support team has the ability to fix the API unless it reaches out to the Rapyd development team.

Can you please bring this issue to the right team’s attention?
Thank you

Thanks @Damiano_Caffa,

Support let us know that they have responded and provided an answer.

01297427 is case number.