INVALID_COMPLETE_PAYMENT_URL when creating customer with payment method

When posting to “/v1/customers” to create customer with (fake) payment method, I get the error:

{
“status”: {
“error_code”: “INVALID_COMPLETE_PAYMENT_URL”,
“status”: “ERROR”,
“message”: “The request tried to create a payment, but the \u0027complete_payment_url\u0027 parameter was not valid. The request was rejected. Corrective action: Use the correct URL.”,
“response_code”: “INVALID_COMPLETE_PAYMENT_URL”,
“operation_id”: “46aba627-2cf5-4ae8-9fe8-55db82b08789”
}
}

The body of the POST looks like this:

{“name”:“Customer name",“email”:"someemail@gmail.com”,“payment_method”:{“type”:“is_visa_card”,“fields”:{“number”:“4111111111111111”,“expiration_month”:“10”,“expiration_year”:“23”,“cvv”:“123”,“name”:“Customer name”}}

I’ve tried placing “payment_options” (and “payment_method_options”) in the body as well, in various places:

“payment_method_options”: {“complete_payment_url”:“http://1.2.3.4:3000/rapyd",“error_payment_url”:"http://1.2.3.4:3000/rapyd”}

So I’m a bit lost where it should actually be specified and couldn’t find out based on the documentation.

Thanks!

Thanks @abo. I’ve posted a request and response below that works for me. Let me know if you have any questions.

Create Customer with Payment Method Request

{
    "name": "Test User",
    "business_vat_id": "123456666",
    "email": "testuser@rapyd.net",
    "ewallet": "ewallet_622b1deb47c3391d9075fd1f5c09a3e5",
    "invoice_prefix": "TU-",
    "metadata": {
        "merchant_defined": true
    },
    "payment_method": {
    "type": "is_visa_card",
    "fields": {
        "name": "Test User",
        "number": "4111111111111111",
        "expiration_month": "08",
        "expiration_year": "24",
        "cvv": "789"
    },
    "complete_payment_url": "https://samsung.com",
    "error_payment_url": "https://apple.com"
    },
    "phone_number": "+14155556666"
}

Create Customer with Payment Method Response

{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "4e9ccd88-e628-40f6-b347-1f843dda16e1"
    },
    "data": {
        "id": "cus_438a1c1c7dc37f0a92cea6bfdf473996",
        "delinquent": false,
        "discount": null,
        "name": "Test User",
        "default_payment_method": "card_808d76b2d27617f0c5b49895606d9f45",
        "description": "",
        "email": "testuser@rapyd.net",
        "phone_number": "+14155556666",
        "invoice_prefix": "TU-",
        "addresses": [],
        "payment_methods": {
            "data": [
                {
                    "id": "card_808d76b2d27617f0c5b49895606d9f45",
                    "type": "is_visa_card",
                    "category": "card",
                    "metadata": null,
                    "image": "https://iconslib.rapyd.net/checkout/is_visa_card.png",
                    "authentication_url": "",
                    "webhook_url": "",
                    "supporting_documentation": "",
                    "name": "Test User",
                    "last4": "1111",
                    "acs_check": "unchecked",
                    "cvv_check": "unchecked",
                    "bin_details": {
                        "brand": null,
                        "bin_number": "411111"
                    },
                    "expiration_year": "24",
                    "expiration_month": "08",
                    "fingerprint_token": "ocfp_2a694038316f52122bbbb3ae926cfda9",
                    "redirect_url": "https://sandboxdashboard.rapyd.net/3ds-payment?token=payment_fa1cf4249fdf098356b42f6cda09d9c2"
                }
            ],
            "has_more": false,
            "total_count": 1,
            "url": "/v1/customers/cus_438a1c1c7dc37f0a92cea6bfdf473996/payment_methods"
        },
        "subscriptions": null,
        "created_at": 1623092363,
        "metadata": {
            "merchant_defined": true
        },
        "business_vat_id": "123456666",
        "ewallet": "ewallet_622b1deb47c3391d9075fd1f5c09a3e5",
        "complete_payment_url": "https://samsung.com",
        "error_payment_url": "https://apple.com"
    }
}```
4 Likes

That did the trick! Thank you for the speedy response, awesome!

1 Like