v1

latestOpenAPI 3.0.02026-07-26167441.9 MB

Reassign a Payment Method to Another Customer

Reassigns an enrolled payment method to a different customer of the same account. Only card payment methods can be reassigned. The reassignment fails when the payment method is already assigned to a customer that has data. Returns the payment method in the same shape as the Enroll Payment Method response, with the new owner in the customer_id field.

patch/payment-methods/{payment_method_id}

Path parameters

payment_method_idstring required

The unique identifier of the payment_method. This is the vaulted_token received when enrolling a payment method with Enroll Payment Method (UUID).

Headers

X-account-codestring required

The unique identifier of your account (UUID).

Request body

customer_idstring required

The unique identifier of the customer the payment method is reassigned to (UUID). The payment method can be reassigned only while its current customer has no data; otherwise the request returns 409 CONFLICT.

Response

The reassigned payment method, including the new owner in the customer_id field.

idempotency_keystring
namestring
descriptionstring
typestring
categorystring
countrystring
{"stackTrail":"components:schemas:PaymentMethod:properties:parent_type","oasType":"schema","type":"unknown"}
statusstring
sub_statusstring
vaulted_tokenstring
{"stackTrail":"components:schemas:PaymentMethod:properties:callback_url","oasType":"schema","type":"unknown"}
{"stackTrail":"components:schemas:PaymentMethod:properties:action","oasType":"schema","type":"unknown"}
{"stackTrail":"components:schemas:PaymentMethod:properties:redirect_url","oasType":"schema","type":"unknown"}
created_atstring
updated_atstring
{"stackTrail":"components:schemas:PaymentMethod:properties:last_successfully_used","oasType":"schema","type":"unknown"}
{"stackTrail":"components:schemas:PaymentMethod:properties:last_successfully_used_at","oasType":"schema","type":"unknown"}
{"stackTrail":"components:schemas:PaymentMethod:properties:preferred","oasType":"schema","type":"unknown"}
customer_idstring

The unique identifier of the customer the payment method now belongs to. Returned by the reassignment response so you can confirm the new owner.

{"stackTrail":"components:schemas:PaymentMethod:properties:verify","oasType":"schema","type":"unknown"}

Example response

{
  "idempotency_key": "a0000000-0000-4000-8000-000000000010",
  "name": "VISA ****1111",
  "description": "VISA ****1111",
  "type": "CARD",
  "category": "CARD",
  "country": "US",
  "status": "ENROLLED",
  "sub_status": "ENROLLED",
  "vaulted_token": "b0000000-0000-4000-8000-000000000002",
  "created_at": "2024-06-04T12:47:46.992602Z",
  "updated_at": "2024-06-04T12:47:46.992603Z",
  "card_data": {
    "iin": "41111111",
    "lfd": "1111",
    "holder_name": "JOHN DOE",
    "expiration_month": 3,
    "expiration_year": 26,
    "number_length": 16,
    "security_code_length": 3,
    "brand": "VISA",
    "issuer": "JPMORGAN CHASE BANK N A",
    "country_code": "US",
    "category": "CREDIT",
    "type": "CREDIT",
    "fingerprint": "55a7fe38-cdc3-45dc-8c5f-820751799c76"
  },
  "customer_id": "b3f2c1a0-1234-4a5b-9c8d-000000000001"
}