Payment Methods
Clone a Payment Method
Copy a payment method from one sub account to another sub account. This allows one to share payment methods between accounts without having to collect the card information again. The original payment method's id / token should be provided in the path.
post/payment_methods/{token}/clone
Request
- Base URLhttps://api.justifi.ai/v1
- Authnone declared. Required headers: Idempotency-Key, Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
tokenstring required
Headers
Idempotency-Keystring uuid required
a string to identify your request (we recommend using a generated uuid, but you may use any unique string) see Idempotent Requests
Authorizationstring required
the access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)
Request body
Example request
{
"destination_account_id": "acc_xyz123"
}Response
Payment method clone was successful
Example response
{
"type": "payment_method",
"data": {
"id": "pm_123xyz",
"signature": "3aGWnUznQ",
"customer_id": "cust_123abc",
"account_id": "acc_123",
"status": "valid",
"invalid_reason": "INVALID_ACCOUNT_NUMBER",
"payment_method_import_id": "pmi_123xyz",
"created_at": "2024-01-01T12:00:00Z",
"updated_at": "2024-01-01T12:00:00Z",
"card": {
"id": "pm_123xyz",
"name": "Lindsay Whalen",
"brand": "visa",
"digital_wallet": "apple_pay",
"token": "pm_123xyz",
"month": "5",
"year": "2042",
"metadata": {
"new": "info"
},
"address_line1_check": "pass",
"address_postal_code_check": "pass",
"bin_details": {
"type": "Credit",
"card_brand": "Visa",
"card_class": "Consumer",
"country": "United States of America",
"issuer": "WELLS FARGO BANK, N.A.",
"funding_source": "Credit"
}
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.