Payment Methods

Asociar Payment Methods a Subscriptions

Changed on

Asocia varias Subscriptions a Payment Methods en una sola petición.

Acepta como máximo 500 pares en data. La respuesta es 200 incluso cuando algunos pares fallan, y trae el desglose del lote: load_summary con los conteos por resultado, success_detail con los pares asociados y errors_details con los que fallaron junto a su mensaje de error.

post/subscriptions/associate/payment-method/batch

Request

  • Base URL
    https://api.trytoku.com
  • URL
    https://api.trytoku.com/subscriptions/associate/payment-method/batch
  • Auth
    API key in header x-api-key

Headers

x-account-keystring

Llave de API de una Account, para operar sobre esa Account en lugar de la principal.

Request body

Example request

{
  "data": [
    {
      "id_payment_method": "pm_pBf2NL0d0gvBM7Ei_1E3HIWnTN4W93_O",
      "id_subscription": "sub_Yx4Qb1oT8kFhLmN2_9AwZrJvE6Ss0uKd"
    }
  ]
}

Response

Successful Response

successboolean required

Es true cuando la operación se ejecutó sin errores.

Example response

{
  "errors_details": [
    {
      "id_payment_method": "pm_pBf2NL0d0gvBM7Ei_1E3HIWnTN4W93_O",
      "id_subscription": "sub_Yx4Qb1oT8kFhLmN2_9AwZrJvE6Ss0uKd"
    }
  ],
  "success_detail": [
    {
      "id_payment_method": "pm_pBf2NL0d0gvBM7Ei_1E3HIWnTN4W93_O",
      "id_subscription": "sub_Yx4Qb1oT8kFhLmN2_9AwZrJvE6Ss0uKd"
    }
  ]
}

Changes

    • breaking

      request body became required

    • breaking

      the request property became required

    • breaking

      the request property // became required

    • breaking

      the response's property type changed from object to no type for status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      api operation id asociar-múltiples-payment-methods-a-subscriptions removed and replaced with associate_subscription_bulk

    • info

      api tag Payment Methods added

    • info

      added the new optional header request parameter x-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 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

      removed 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

      added subschema #1 subschema #2 to the response property anyOf list for the response status

    • info

      the response property became required for the status

    • info

      the response's property default value true was removed for the status

    • info

      added the required property to the response with the status