Asociar Payment Method a Subscription
Changed onAsocia una Subscription a un Payment Method para que sus cobros puedan realizarse con ese medio de pago. Quedar asociada no garantiza que se cobre con él: si la Subscription tiene más de un Payment Method asociado, el cobro se hace con el que esté activo.
La Subscription y el Payment Method deben pertenecer al mismo Customer de la organización autenticada. Responde 400 cuando la Subscription no existe o cuando no comparte el Customer con el Payment Method, y 404 cuando el Payment Method no existe.
Request
- Base URLhttps://api.trytoku.com
- URLhttps://api.trytoku.com/subscriptions/associate/payment-method
- AuthAPI key in header x-api-key
Headers
Llave de API de una Account, para operar sobre esa Account en lugar de la principal.
Request body
Example request
{
"id_payment_method": "pm_pBf2NL0d0gvBM7Ei_1E3HIWnTN4W93_O",
"id_subscription": "sub_Yx4Qb1oT8kFhLmN2_9AwZrJvE6Ss0uKd"
}Response
Successful Response
Example response
{
"id_payment_method": "pm_pBf2NL0d0gvBM7Ei_1E3HIWnTN4W93_O",
"id_subscription": "sub_Yx4Qb1oT8kFhLmN2_9AwZrJvE6Ss0uKd"
}Changes
- breaking
request body became required
- info
api operation id
attach-a-payment-method-to-subscriptionremoved and replaced withassociate_subscription - info
api tag
Payment Methodsadded - info
added the new optional
headerrequest parameterx-account-key - info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
added the required property
to the response with the status
- breaking