Attach a Payment Method to a Customer

POST https://us-central1-appgregator.cloudfunctions.net/stripe/payment/methods/:id/attach

Query Parameters

Name
Type
Description

name*

String

ft-4

connection_name*

String

stripe-1

Headers

Name
Type
Description

x-api-key*

String

XXX

Request Body

Name
Type
Description

customer*

String

cus_MQqeLuPp19Qbk8

{
    "id": "pm_1MZTFzIyq0PiFIhU8bezpCMk",
    "object": "payment_method",
    "billing_details": {
        "address": {
            "city": null,
            "country": null,
            "line1": null,
            "line2": null,
            "postal_code": null,
            "state": null
        },
        "email": null,
        "name": null,
        "phone": null
    },
    "card": {
        "brand": "visa",
        "checks": {
            "address_line1_check": null,
            "address_postal_code_check": null,
            "cvc_check": "pass"
        },
        "country": "US",
        "exp_month": 8,
        "exp_year": 2023,
        "fingerprint": "UDAye2KvD1pcOwWy",
        "funding": "credit",
        "generated_from": null,
        "last4": "4242",
        "networks": {
            "available": [
                "visa"
            ],
            "preferred": null
        },
        "three_d_secure_usage": {
            "supported": true
        },
        "wallet": null
    },
    "created": 1675922720,
    "customer": "cus_MQqeLuPp19Qbk8",
    "livemode": false,
    "metadata": {},
    "type": "card"
}
curl --location --request POST 'https://us-central1-appgregator.cloudfunctions.net/stripe/payment/methods?name=ft-4&connection_name=stripe-1' \
--header 'x-api-key: XXX' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'type=card' \
--data-urlencode 'card[number]=4242424242424242' \
--data-urlencode 'card[exp_month]=8' \
--data-urlencode 'card[exp_year]=2023' \
--data-urlencode 'card[cvc]=314'

Last updated