> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Renew virtual card

PUT https://api-sandbox.payabli.com/api/MoneyOutCard/vcard/{cardToken}/renew
Content-Type: application/json

Renews an expired or expiring virtual card by extending its expiration date to a future month.

The card must be a virtual card that hasn't been fully used. The new expiration date must be in `MM-YYYY` or `MM/YYYY` format and no more than 2 years and 363 days in the future. The card expires on the last day of the month you specify.

On success, `referenceId` holds the renewed card's token (the card processor may issue a new token). The response reuses the standard payout result object, so the payment-transaction fields it carries don't apply to renewal and always return `null`.

Reference: https://docs.payabli.com/developers/api-reference/cards/renew-vcard

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: payabliApi-oas
  version: 1.0.0
paths:
  /MoneyOutCard/vcard/{cardToken}/renew:
    put:
      operationId: RenewVCard
      summary: Renew a virtual card
      description: >-
        Renews an expired or expiring virtual card by extending its expiration
        date to a future month.


        The card must be a virtual card that hasn't been fully used. The new
        expiration date must be in `MM-YYYY` or `MM/YYYY` format and no more
        than 2 years and 363 days in the future. The card expires on the last
        day of the month you specify.


        On success, `referenceId` holds the renewed card's token (the card
        processor may issue a new token). The response reuses the standard
        payout result object, so the payment-transaction fields it carries don't
        apply to renewal and always return `null`.
      tags:
        - subpackage_moneyOut
      parameters:
        - name: cardToken
          in: path
          description: ID for the virtual card to renew.
          required: true
          schema:
            type: string
        - name: requestToken
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewVCardResponse'
        '400':
          description: Bad request / invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
        '503':
          description: Database connection error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenewVCardRequest'
servers:
  - url: https://api-sandbox.payabli.com/api
    description: Sandbox
  - url: https://api.payabli.com/api
    description: Production
components:
  schemas:
    RenewVCardRequest:
      type: object
      properties:
        expirationDate:
          type: string
          description: >
            The new expiration date for the virtual card, in `MM-YYYY` or
            `MM/YYYY` format. The card expires on the last day of the month you
            specify. The date can't be more than 2 years and 363 days in the
            future.
      required:
        - expirationDate
      title: RenewVCardRequest
    ResponseText:
      type: string
      description: |
        Response text for operation: 'Success' or 'Declined'.
      title: ResponseText
    IsSuccess:
      type: boolean
      description: |
        Boolean indicating whether the operation was successful. A `true` value
        indicates success. A `false` value indicates failure.
      title: IsSuccess
    Authcode:
      type: string
      description: Authorization code for the transaction.
      title: Authcode
    Referenceidtrans:
      type: string
      description: The transaction identifier in Payabli.
      title: Referenceidtrans
    ResultCode:
      type: integer
      description: |
        Result code for the operation. Value `1` indicates a successful
        operation, values `2` and `3` indicate errors. A value of `10` indicates
        that an operation has been initiated and is pending.
      title: ResultCode
    Resulttext:
      type: string
      description: |
        Text describing the result. If `ResultCode` = 1, will return `Approved`
        or a general success message. If `ResultCode` = 2 or 3, will contain
        the cause of the error or decline.
      title: Resulttext
    AvsResponseText:
      type: string
      description: |
        Text code describing the result for address validation (applies only for
        card transactions).
      title: AvsResponseText
    CvvResponseText:
      type: string
      description: >
        Text code describing the result for CVV validation (applies only for
        card

        transactions).
      title: CvvResponseText
    Vendoridtrans:
      type: integer
      format: int64
      description: >
        Payabli-generated unique ID of the vendor on the payout. Returns the
        same

        value as the response's `customerId`/`CustomerId` field, or `0` when no

        vendor is associated.
      title: Vendoridtrans
    MethodReferenceId:
      type: string
      description: |
        The stored method's identifier (sometimes referred to as 'token') in
        Payabli. When `null`, the method wasn't created, or doesn't exist,
        depending on the operation performed.
      title: MethodReferenceId
    RenewVCardResponseData:
      type: object
      properties:
        authCode:
          oneOf:
            - $ref: '#/components/schemas/Authcode'
            - type: 'null'
          description: Not used for virtual card renewal; always returns `null`.
        referenceId:
          $ref: '#/components/schemas/Referenceidtrans'
          description: >-
            Reference identifier for the renewed virtual card returned by the
            card processor.
        resultCode:
          $ref: '#/components/schemas/ResultCode'
        resultText:
          $ref: '#/components/schemas/Resulttext'
        avsResponseText:
          oneOf:
            - $ref: '#/components/schemas/AvsResponseText'
            - type: 'null'
          description: Not used for virtual card renewal; always returns `null`.
        cvvResponseText:
          oneOf:
            - $ref: '#/components/schemas/CvvResponseText'
            - type: 'null'
          description: Not used for virtual card renewal; always returns `null`.
        customerId:
          oneOf:
            - $ref: '#/components/schemas/Vendoridtrans'
            - type: 'null'
          description: Not used for virtual card renewal; always returns `null`.
        vendorId:
          oneOf:
            - $ref: '#/components/schemas/Vendoridtrans'
            - type: 'null'
          description: Not used for virtual card renewal; always returns `null`.
        methodReferenceId:
          oneOf:
            - $ref: '#/components/schemas/MethodReferenceId'
            - type: 'null'
          description: Not used for virtual card renewal; always returns `null`.
      required:
        - authCode
        - referenceId
        - resultCode
        - resultText
        - avsResponseText
        - cvvResponseText
        - customerId
        - vendorId
        - methodReferenceId
      title: RenewVCardResponseData
    RenewVCardResponse:
      type: object
      properties:
        responseText:
          $ref: '#/components/schemas/ResponseText'
        isSuccess:
          $ref: '#/components/schemas/IsSuccess'
        responseData:
          $ref: '#/components/schemas/RenewVCardResponseData'
      required:
        - responseText
        - isSuccess
        - responseData
      title: RenewVCardResponse
    PayabliErrorBodyResponseData:
      type: object
      properties:
        explanation:
          type: string
          description: Human-readable explanation of what happened.
        todoAction:
          type: string
          description: Suggested resolution.
      description: Object with detailed error context.
      title: PayabliErrorBodyResponseData
    PayabliErrorBody:
      type: object
      properties:
        isSuccess:
          type: boolean
          description: Always `false` for error responses.
        responseCode:
          type: integer
          description: |
            Code for the response. Learn more in
            [API Response Codes](/developers/api-reference/api-responses).
        responseText:
          type: string
          description: Error text describing what went wrong.
        responseData:
          $ref: '#/components/schemas/PayabliErrorBodyResponseData'
          description: Object with detailed error context.
      required:
        - isSuccess
        - responseText
      description: |
        Shape returned by every Payabli API error response. The `responseData`
        object carries human-readable error context.
      title: PayabliErrorBody
  securitySchemes:
    APIKeyAuth:
      type: apiKey
      in: header
      name: requestToken

```

## Examples



**Request**

```json
{
  "expirationDate": "12-2027"
}
```

**Response**

```json
{
  "responseText": "Success",
  "isSuccess": true,
  "responseData": {
    "authCode": null,
    "referenceId": "20231206142225227890",
    "resultCode": 1,
    "resultText": "Virtual card renewed",
    "avsResponseText": null,
    "cvvResponseText": null,
    "customerId": null,
    "vendorId": null,
    "methodReferenceId": null
  }
}
```

**SDK Code**

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.moneyOut.renewVCard("20231206142225226104", {
        expirationDate: "12-2027",
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.money_out.renew_v_card(
    card_token="20231206142225226104",
    expiration_date="12-2027",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliPayabliApiOasClient;
import io.github.payabli.api.resources.moneyout.requests.RenewVCardRequest;

public class Example {
    public static void main(String[] args) {
        PayabliPayabliApiOasClient client = PayabliPayabliApiOasClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.moneyOut().renewVCard(
            "20231206142225226104",
            RenewVCardRequest
                .builder()
                .expirationDate("12-2027")
                .build()
        );
    }
}
```

```csharp
using PayabliPayabliApiOas;
using System.Threading.Tasks;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiOasClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.MoneyOut.RenewVCardAsync(
            "20231206142225226104",
            new RenewVCardRequest {
                ExpirationDate = "12-2027"
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithApiKey(
            "YOUR_API_KEY_HERE",
        ),
    )
    request := &payabli.RenewVCardRequest{
        ExpirationDate: "12-2027",
    }
    client.MoneyOut.RenewVCard(
        context.TODO(),
        "20231206142225226104",
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\MoneyOut\Requests\RenewVCardRequest;

$client = new PayabliClient(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->moneyOut->renewVCard(
    '20231206142225226104',
    new RenewVCardRequest([
        'expirationDate' => '12-2027',
    ]),
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/MoneyOutCard/vcard/20231206142225226104/renew")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"expirationDate\": \"12-2027\"\n}"

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["expirationDate": "12-2027"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/MoneyOutCard/vcard/20231206142225226104/renew")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```