Skip to main content
PATCH
Reassign a Payment Method to Another Customer
Reassign an enrolled payment method to a different customer of the same account. Send the customer_id of the target customer in the request body. Only card payment methods can be reassigned. The response returns the payment method in the same shape as the Enroll Payment Method response, with the new owner in the customer_id field.
To reassign the payment method, you need to provide the payment_method_id, which is the vaulted_token received when using the Enroll Payment Method endpoint.
A payment method that is already assigned to a customer that has data cannot be reassigned, and the request is rejected with 409 CONFLICT.
After a payment method is reassigned, the merchant is responsible for updating the customer identifier wherever the payment method was already used. This includes any subscription created with it, the merchant’s own mapping between a user and the vaulted_token, and any stored pair of customer and payment method. Yuno reassigns the payment method to the new customer, but it does not update those references on the merchant side.

Authorizations

public-api-key
string
header
default:<Your public-api-key>
required
private-secret-key
string
header
default:<Your private-secret-key>
required

Headers

X-account-code
string
required

The unique identifier of your account (UUID).

Path Parameters

payment_method_id
string
required

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

Body

application/json
customer_id
string
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_key
string
Example:

"a0000000-0000-4000-8000-000000000010"

name
string
Example:

"VISA ****1111"

description
string
Example:

"VISA ****1111"

type
string
Example:

"CARD"

category
string
Example:

"CARD"

country
string
Example:

"US"

parent_type
any
status
string
Example:

"ENROLLED"

sub_status
string
Example:

"ENROLLED"

vaulted_token
string
Example:

"b0000000-0000-4000-8000-000000000002"

callback_url
any
action
any
redirect_url
any
created_at
string
Example:

"2024-06-04T12:47:46.992602Z"

updated_at
string
Example:

"2024-06-04T12:47:46.992603Z"

card_data
object
last_successfully_used
any
last_successfully_used_at
any
preferred
any
customer_id
string

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

Example:

"b3f2c1a0-1234-4a5b-9c8d-000000000001"

verify
any