NAV Navbar
Shell JavaScript Java Python Go Ruby

Extend API v1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Extend APIs help businesses of all sizes harness the power of instant credit card distribution and seamless tracking.

Please note that these APIs and documentation may change as needed. All APIs are served over HTTPS and use JSON to provide a secure, RESTful interface.

Contact our support team with any questions.
You may read our Terms of Service here.

Conventions

Connection

Base URL api.paywithextend.com - Used for all API requests with 2 exceptions
Sensitive Info URL v.paywithextend.com - Used for creating/registering SOURCE Credit Cards and retrieving sensitive Virtual Card information (i.e. real Virtual Card number and Security Code)
Note: Do not use v.paywithextend.com except for the special cases described above.

All communication must be over HTTPS using TLS v1.2

Required Headers

# Required Headers
-H 'Content-Type: application/json'
-H 'Accept: application/vnd.paywithextend.v2020-07-08+json'
# Optional Headers
-H 'Accept-Language: en-US'

Content-Type, Accept headers are required for all endpoints

All text should be encoded UTF-8 unless otherwise specified.

All calls (with a few exceptions) must pass the version of the API in an Accept header.

Authorization Header

# Replace access-token with your token generated from /signin
-H 'Authorization: Bearer {access-token}'

Unless otherwise noted, all endpoints require authentication via an authorization token in the header. These JWT tokens are opaque, short lived, and provide no session information. A single user can authenticate with multiple tokens.

API Versioning

Supported Versions
application/vnd.paywithextend.v2020-01-17+json supported
application/vnd.paywithextend.v2020-07-08+json current

Version Error Messaging

Status: 406 - Not Acceptable

{
    "error": "Invalid API version"
}

If you send a version that was previously valid, but is no longer supported you'll still receive the Status: 406 - Not Acceptable code with the following JSON body:

Status: 406 - Not Acceptable

{
    "error": "Unsupported API version"
}





When you send an invalid version number (i.e. a malformed Accept header), you'll receive a Status: 406 - Not Acceptable code with the following JSON body:



Timestamps

Timestamp Format: YYYY-MM-DDThh:mm:ss.SSS±hhmm
Timestamp Format: YYYY-MM-DDThh:mm:ss.SSSz

All timestamps should be in ISO 8601 format.

PCI Compliance

Due to the sensitive nature of storing and transmitting credit card data (the 14/15/16 digit Virtual Card Number and the security code CVC/CCV), direct calls to these endpoints do not return these values. Instead, encrypted values will be returned. In order for the API to receive the full card data, calls must be made to Extend's PCI compliant storage system (i.e. v.paywithextend.com).

Please contact us to discuss these restrictions.

Authentication

Forgot Password

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/forgot \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json'

const inputBody = '{
  "email": "demo@paywithextend.com"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json'

};

fetch('https://api.paywithextend.com/forgot',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/forgot");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json'
}

r = requests.post('https://api.paywithextend.com/forgot', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/forgot", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json'
}

result = RestClient.post 'https://api.paywithextend.com/forgot',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /forgot

Send an email to the specified email address with guided steps on how to reset their password

Body parameter

{
  "email": "demo@paywithextend.com"
}

Parameters

Name In Type Required Description
body body ForgotPasswordRequest true Forgot Password Request
» email body string true Email Address

Example responses

200 Response

{
  "msg": "ok"
}

Responses

Status Meaning Description Schema
200 OK Forgot Password Response SimpleResponse

Sign In

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/signin \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json'

const inputBody = '{
  "email": "demo@paywithextend.com",
  "password": "JQT<QEXjO+UGnN@%5H_6HS>P"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json'

};

fetch('https://api.paywithextend.com/signin',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/signin");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json'
}

r = requests.post('https://api.paywithextend.com/signin', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/signin", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json'
}

result = RestClient.post 'https://api.paywithextend.com/signin',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /signin

Retrieve an Authorization token for future API calls. The token value in the response will be used in the Authorization header for all endpoints. This token should be treated as an opaque string and is valid for 10 minutes from the time it is created. The validity period can not be extended. A single user may have multiple tokens active at any one time.

Body parameter

{
  "email": "demo@paywithextend.com",
  "password": "JQT<QEXjO+UGnN@%5H_6HS>P"
}

Parameters

Name In Type Required Description
body body LoginRequest true Login Request
» email body string true Email Address
» password body string true Password

Example responses

200 Response

{
  "user": {
    "id": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phone": "string",
    "phoneIsoCountry": "string",
    "avatarType": "LINKEDIN",
    "avatarUrl": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "currency": "USD",
    "locale": "string",
    "timezone": "string",
    "hasExpensifyLink": true,
    "employeeId": "string"
  },
  "token": "abc123DEF456ghi789JKL012"
}

Responses

Status Meaning Description Schema
200 OK Message LoginSignUpResponse

Sign Out

Example Request

# You can also use wget
curl -X DELETE https://api.paywithextend.com/signout \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/signout',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/signout");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.paywithextend.com/signout', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.paywithextend.com/signout", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.paywithextend.com/signout',
  params: {
  }, headers: headers

p JSON.parse(result)

DELETE /signout

Invalidate the user's current session. This is helpful if you want to provide a way for users to manually sign out of their session.

Responses

Status Meaning Description Schema
200 OK Signout None

Virtual Cards

Bulk Virtual Card Push

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardpush \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "id": "cc_1234",
  "file": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardpush',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardpush");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardpush', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"multipart/form-data"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardpush", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'multipart/form-data',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardpush',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /creditcards/{id}/bulkvirtualcardpush

Upload CSV to send multiple virtual cards at once. First, you must get a CSV template via the Bulk Virtual Card Push API. After you download the CSV, you must enter the required information in the CSV for each Virtual Card you would like to create. Then, you can submit the completed CSV to this API

Body parameter

id: cc_1234
file: string

Parameters

Name In Type Required Description
body body BulkVirtualCardPushRequest false
» id body string true ID of the Credit Card
» file body string(binary) true CSV file

Example responses

200 Response

{
  "csvVirtualCardPush": {
    "tasks": [
      {
        "taskId": "t_1234",
        "status": "Completed",
        "record": {
          "creditCardId": "string",
          "recipient": "string",
          "recipientFirstName": "string",
          "recipientLastName": "string",
          "cardholder": "string",
          "displayName": "string",
          "referenceFields": [
            null
          ],
          "notes": "string",
          "direct": true,
          "balanceCents": 0,
          "currency": "[",
          "validFromTimestamp": "2019-08-24T14:15:22Z",
          "validToTimestamp": "2019-08-24T14:15:22Z",
          "validFromDate": "2019-08-24",
          "validToDate": "2019-08-24",
          "recurs": true,
          "recurrence": {},
          "receiptAttachmentIds": [
            null
          ],
          "hasPlasticCard": true,
          "plasticFirstName": "string",
          "plasticLastName": "string",
          "plasticAddress1": "string",
          "plasticAddress2": "string",
          "plasticCity": "string",
          "plasticProvince": "string",
          "plasticPostal": "string",
          "plasticCountry": "string",
          "organizationName": "string",
          "address1": "string",
          "address2": "string",
          "city": "string",
          "province": "string",
          "postal": "string",
          "country": "string",
          "minTransactionCents": 0,
          "maxTransactionCents": 0,
          "maxTransactionCount": 0,
          "address": {},
          "expirationMonthYear": "string",
          "sinceTimestamp": "2019-08-24T14:15:22Z",
          "sinceDate": "2019-08-24",
          "untilTimestamp": "2019-08-24T14:15:22Z",
          "untilDate": "2019-08-24",
          "push": true
        },
        "virtualCardId": "vc_1234",
        "errors": {
          "error": "Something went wrong."
        }
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK CSV Virtual Card Push Response BulkVirtualCardPushResponse

Get Bulk Push CSV Template

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardtemplate \
  -H 'Content-Type: */*' \
  -H 'Accept: text/csv' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = 'string';
const headers = {
  'Content-Type':'*/*',
  'Accept':'text/csv',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardtemplate',
{
  method: 'GET',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardtemplate");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': '*/*',
  'Accept': 'text/csv',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardtemplate', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"*/*"},
        "Accept": []string{"text/csv"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardtemplate", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => '*/*',
  'Accept' => 'text/csv',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/creditcards/{id}/bulkvirtualcardtemplate',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /creditcards/{id}/bulkvirtualcardtemplate

Get a CSV template to be used for Bulk Virtual Card Push API. After you download the CSV, you must enter the required information in the CSV

Body parameter

Parameters

Name In Type Required Description
id path string true ID of the Credit Card
body body string false

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK CSV Template file string

Get Virtual Card

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/virtualcards/{id} \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/virtualcards/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/virtualcards/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/virtualcards/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /virtualcards/{id}

Get Virtual Card by ID. Note in order to retrieve secure information (i.e. the real Virtual Card number and the Security Code), you must make this same request but at the v.paywithextend.com/virtualcards/{id} URL instead. This API will only return non-sensitive information.

Parameters

Name In Type Required Description
id path string true ID of the Virtual Card to be obtained

Example responses

200 Response

{
  "virtualCard": {
    "id": "vc_1234",
    "status": "ACTIVE",
    "recipientId": "u_1234",
    "recipient": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardholderId": "string",
    "cardholder": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Virtual Card",
    "expires": "2022-01-01T00:00:00.000+0000",
    "currency": "USD",
    "limitCents": 1000000,
    "balanceCents": 400000,
    "referenceFields": [
      {
        "fieldLabel": "string",
        "fieldCode": "string",
        "optionLabel": "string",
        "optionCode": "string"
      }
    ],
    "spentCents": 600000,
    "lifetimeSpentCents": 600000,
    "awaitingBudget": false,
    "last4": "1234",
    "numberFormat": "cardnumber16",
    "validFrom": "2020-01-01T01:01:12.123+0000",
    "validTo": "2020-01-01T01:01:12.123+0000",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "creditCardId": "cc_1234",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "receiptAttachments": [
      {
        "id": "string",
        "transactionId": "string",
        "virtualCardId": "string",
        "contentType": "string",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "createdAt": "string",
        "updatedAt": "string"
      }
    ],
    "pending": {
      "balanceCents": 0,
      "validFrom": "string",
      "validTo": "string",
      "recurs": true,
      "activeUntil": "string",
      "currency": "USD",
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "receiptAttachments": {}
    },
    "notes": "It was the best of times, it was the worst of times.",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "direct": true,
    "features": {
      "recurrence": true,
      "customAddress": true,
      "customMin": true,
      "customMax": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "activeUntil": "string",
    "minTransactionCents": 0,
    "maxTransactionCents": 0,
    "maxTransactionCount": 0,
    "tokenReferenceIds": "['tok_123', 'tok_abc']",
    "network": "MASTERCARD",
    "companyName": "ACME Co.",
    "creditCardDisplayName": "My Virtual Card"
  }
}

Responses

Status Meaning Description Schema
200 OK Virtual Card VirtualCardResponse

Update Virtual Card

Example Request

# You can also use wget
curl -X PUT https://api.paywithextend.com/virtualcards/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "creditCardId": "cc_1234",
  "referenceFields": [
    {
      "fieldCode": "COMPCODE",
      "optionCode": "ABC123"
    }
  ],
  "displayName": "My Virtual Card",
  "notes": "It was the best of times, it was the worst of times.",
  "balanceCents": 400000,
  "currency": "USD",
  "validFrom": "2020-01-01T01:01:12.123+0000",
  "validTo": "2020-01-01T01:01:12.123+0000",
  "recurs": true,
  "recurrence": {
    "balanceCents": 400000,
    "RecurrencePeriod": "WEEKLY",
    "interval": 2,
    "RecurrenceTerminator": "COUNT",
    "count": 10,
    "resetCount": true,
    "until": "2022-01-01T00:00:00.000+0000",
    "byWeekDay": 0,
    "byMonthDay": 1,
    "byYearDay": 1
  },
  "receiptAttachmentIds": [
    "string"
  ],
  "expirationMonthYear": "11/23"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.paywithextend.com/virtualcards/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api.paywithextend.com/virtualcards/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api.paywithextend.com/virtualcards/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /virtualcards/{id}

Modify an existing Virtual Card or request a modification. If the authenticated user is the recipient of this Virtual Card, then calling this endpoint will create a pending revision on the Virtual Card on the VirtualCard.pending property. If the authenticated user is the cardholder of this Virtual Card, then this endpoint will immediately modify the Virtual Card. If there is a pendingmodification in the VirtualCard.pending property and the authenticated user is the cardholderthen you may send the current VirtualCard values to "reject" the pending modification. This will essentially null out the VirtualCard.pending property.

Body parameter

{
  "creditCardId": "cc_1234",
  "referenceFields": [
    {
      "fieldCode": "COMPCODE",
      "optionCode": "ABC123"
    }
  ],
  "displayName": "My Virtual Card",
  "notes": "It was the best of times, it was the worst of times.",
  "balanceCents": 400000,
  "currency": "USD",
  "validFrom": "2020-01-01T01:01:12.123+0000",
  "validTo": "2020-01-01T01:01:12.123+0000",
  "recurs": true,
  "recurrence": {
    "balanceCents": 400000,
    "RecurrencePeriod": "WEEKLY",
    "interval": 2,
    "RecurrenceTerminator": "COUNT",
    "count": 10,
    "resetCount": true,
    "until": "2022-01-01T00:00:00.000+0000",
    "byWeekDay": 0,
    "byMonthDay": 1,
    "byYearDay": 1
  },
  "receiptAttachmentIds": [
    "string"
  ],
  "expirationMonthYear": "11/23"
}

Parameters

Name In Type Required Description
id path string true ID of the Virtual Card
body body UpdateVirtualCardRequest true Update Virtual Card Request
» creditCardId body string false ID of Credit Card - Required to approve a card. Relevant for cardholders who wish to approve a PENDING status Virtual Card or approve a modification request to a Virtual Card
» referenceFields body [AppliedReferenceFieldRequest] false Reference Fields
»» fieldCode body string true The code of the reference field
»» optionCode body string true The code of the reference field option (or the freetext input by the user if enabled)
» displayName body string true Display Name
» notes body string false Notes
» balanceCents body integer(int64) true Balance Cents
» currency body string false Currency Code (ISO 4217)
» validFrom body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Valid From Timestamp - Required if recurs is false
» validTo body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Valid To Timestamp - Required if recurs is false
» recurs body boolean false true if this Card is currently set up for Recurrence. Defaults to false.
» recurrence body RecurrenceRequest false Required if recurs is true
»» balanceCents body integer(int64) true Balance Cents
»» RecurrencePeriod body string false Period - The period of time each recurrence iterates. For example, a period of WEEKLY and interval of 2 means reccurence will execute once every 2 weeks.
»» interval body integer(int32) true Interval - The interval between each recurrence iteration. For example, an interval of 2 means reccurence will execute once every 2 weeks for WEEKLY. Defaults to 1.
»» RecurrenceTerminator body string false Terminator - Determines when recurrence will end. NONE - recurrence will never end. COUNT - recurrence will end after # of times. DATE - recurrence will end on specific date. COUNT_OR_DATE - recurrence will end after # of times or on specific date, whichever comes first.
»» count body integer(int32) false How many times recurrence will be executed. Can only be provided when terminator is COUNT or COUNT_OR_DATE.
»» resetCount body boolean false If present and true, the current recurrence counter will reset to 0.
»» until body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Limits recurrence until this date. Can only be provided when terminator is DATE or COUNT_OR_DATE.
»» byWeekDay body integer(int32) false For WEEKLY recurrence only (required in this case). The day of the week this will recur on. Must be between 0-6, inclusive. 0 is Monday.
»» byMonthDay body integer(int32) false For MONTHLY recurrence only (required in this case). The day of the month this will recur on. 1 based. Must be between 1-31, inclusive. 31 is guaranteed to be the end of every month. 30 will always be on the 30th, except for February, which will run on the last day of that month. In other words, the day will always be clamped to the end of the month if it's too high a number.
»» byYearDay body integer(int32) false For YEARLY recurrence only (required in this case). The year day this will recur on. 1 based. Must be between 1-365. Note that the day will be calculated based on a non-leap year. ie: 365 will always be December 31st, even if a year has 366 days. Consequentially, this means Feb 29 cannot be chosen as a valid recurrence date.
» receiptAttachmentIds body [string] false List of Attachment IDs to assign to this Virtual Card. Note: Attachments must be uploaded via /receiptattachments beforehand. /receiptattachments will return an Attachment ID for you to use here
» expirationMonthYear body string false The month and year for the virtual card to expire (format: MM/YY).

Enumerated Values

Parameter Value
» currency USD
» currency BRL
»» RecurrencePeriod DAILY
»» RecurrencePeriod WEEKLY
»» RecurrencePeriod MONTHLY
»» RecurrencePeriod YEARLY
»» RecurrenceTerminator NONE
»» RecurrenceTerminator COUNT
»» RecurrenceTerminator DATE
»» RecurrenceTerminator COUNT_OR_DATE

Example responses

200 Response

{
  "virtualCard": {
    "id": "vc_1234",
    "status": "ACTIVE",
    "recipientId": "u_1234",
    "recipient": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardholderId": "string",
    "cardholder": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Virtual Card",
    "expires": "2022-01-01T00:00:00.000+0000",
    "currency": "USD",
    "limitCents": 1000000,
    "balanceCents": 400000,
    "referenceFields": [
      {
        "fieldLabel": "string",
        "fieldCode": "string",
        "optionLabel": "string",
        "optionCode": "string"
      }
    ],
    "spentCents": 600000,
    "lifetimeSpentCents": 600000,
    "awaitingBudget": false,
    "last4": "1234",
    "numberFormat": "cardnumber16",
    "validFrom": "2020-01-01T01:01:12.123+0000",
    "validTo": "2020-01-01T01:01:12.123+0000",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "creditCardId": "cc_1234",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "receiptAttachments": [
      {
        "id": "string",
        "transactionId": "string",
        "virtualCardId": "string",
        "contentType": "string",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "createdAt": "string",
        "updatedAt": "string"
      }
    ],
    "pending": {
      "balanceCents": 0,
      "validFrom": "string",
      "validTo": "string",
      "recurs": true,
      "activeUntil": "string",
      "currency": "USD",
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "receiptAttachments": {}
    },
    "notes": "It was the best of times, it was the worst of times.",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "direct": true,
    "features": {
      "recurrence": true,
      "customAddress": true,
      "customMin": true,
      "customMax": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "activeUntil": "string",
    "minTransactionCents": 0,
    "maxTransactionCents": 0,
    "maxTransactionCount": 0,
    "tokenReferenceIds": "['tok_123', 'tok_abc']",
    "network": "MASTERCARD",
    "companyName": "ACME Co.",
    "creditCardDisplayName": "My Virtual Card"
  }
}

Responses

Status Meaning Description Schema
200 OK Virtual Card Response VirtualCardResponse

Get User Virtual Cards

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/virtualcards \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "count": 0,
  "page": 0,
  "sortField": "string",
  "sortDirection": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards',
{
  method: 'GET',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/virtualcards', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/virtualcards", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/virtualcards',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /virtualcards

Get all Virtual Cards that belong to the authenticated user

Body parameter

{
  "count": 0,
  "page": 0,
  "sortField": "string",
  "sortDirection": "string"
}

Parameters

Name In Type Required Description
statuses query string false Status of the Virtual Cards
count query string false Limit of items per page
page query string false The page to start from
sortField query string false Field to sort by
sortDirection query string false Sort direction
body body PageableRequest false
» count body integer(int32) false
» page body integer(int32) false
» sortField body string false
» sortDirection body string false

Example responses

200 Response

{
  "pagination": {
    "page": 0,
    "pageItemCount": 0,
    "totalItems": 0,
    "numberOfPages": 0
  },
  "virtualCards": [
    {
      "id": "vc_1234",
      "status": "ACTIVE",
      "recipientId": "u_1234",
      "recipient": {
        "id": "string",
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phone": "string",
        "phoneIsoCountry": "string",
        "avatarType": "LINKEDIN",
        "avatarUrl": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "currency": "USD",
        "locale": "string",
        "timezone": "string",
        "hasExpensifyLink": true,
        "employeeId": "string"
      },
      "cardholderId": "string",
      "cardholder": {
        "id": "string",
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phone": "string",
        "phoneIsoCountry": "string",
        "avatarType": "LINKEDIN",
        "avatarUrl": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "currency": "USD",
        "locale": "string",
        "timezone": "string",
        "hasExpensifyLink": true,
        "employeeId": "string"
      },
      "cardImage": {
        "id": "im_1234",
        "contentType": "image/png",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "textColorRGBA": "rgba(255,255,255,1)",
        "hasTextShadow": true,
        "shadowTextColorRGBA": "rgba(0,0,0,1)"
      },
      "displayName": "My Virtual Card",
      "expires": "2022-01-01T00:00:00.000+0000",
      "currency": "USD",
      "limitCents": 1000000,
      "balanceCents": 400000,
      "referenceFields": [
        {
          "fieldLabel": "string",
          "fieldCode": "string",
          "optionLabel": "string",
          "optionCode": "string"
        }
      ],
      "spentCents": 600000,
      "lifetimeSpentCents": 600000,
      "awaitingBudget": false,
      "last4": "1234",
      "numberFormat": "cardnumber16",
      "validFrom": "2020-01-01T01:01:12.123+0000",
      "validTo": "2020-01-01T01:01:12.123+0000",
      "inactiveSince": "2020-01-01T01:01:12.123+0000",
      "timezone": "America/New_York",
      "creditCardId": "cc_1234",
      "recurs": true,
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "receiptAttachments": [
        {
          "id": "string",
          "transactionId": "string",
          "virtualCardId": "string",
          "contentType": "string",
          "urls": {
            "property1": "string",
            "property2": "string"
          },
          "createdAt": "string",
          "updatedAt": "string"
        }
      ],
      "pending": {
        "balanceCents": 0,
        "validFrom": "string",
        "validTo": "string",
        "recurs": true,
        "activeUntil": "string",
        "currency": "USD",
        "recurrence": {
          "id": "string",
          "balanceCents": 0,
          "period": "[",
          "interval": 0,
          "terminator": "[",
          "count": 0,
          "until": "string",
          "byWeekDay": 0,
          "byMonthDay": 0,
          "byYearDay": 0,
          "prevRecurrenceAt": "string",
          "nextRecurrenceAt": "string",
          "currentCount": 0,
          "remainingCount": 0,
          "createdAt": "string",
          "updatedAt": "string"
        },
        "receiptAttachments": {}
      },
      "notes": "It was the best of times, it was the worst of times.",
      "createdAt": "2020-01-01T01:01:12.123+0000",
      "updatedAt": "2020-01-01T01:01:12.123+0000",
      "address": {
        "address1": "1234 Place Ave.",
        "address2": "Apt. B",
        "city": "New York City",
        "province": "New York",
        "postal": "10010",
        "country": "US"
      },
      "direct": true,
      "features": {
        "recurrence": true,
        "customAddress": true,
        "customMin": true,
        "customMax": true,
        "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
      },
      "activeUntil": "string",
      "minTransactionCents": 0,
      "maxTransactionCents": 0,
      "maxTransactionCount": 0,
      "tokenReferenceIds": "['tok_123', 'tok_abc']",
      "network": "MASTERCARD",
      "companyName": "ACME Co.",
      "creditCardDisplayName": "My Virtual Card"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Virtual Cards Response VirtualCardsResponse

Create Virtual Card

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/virtualcards \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "creditCardId": "cc_1234",
  "recipient": "demo@paywithextend.com",
  "recipientFirstName": "Jane",
  "recipientLastName": "Doe",
  "cardholder": "demo@paywithextend.com",
  "displayName": "My Virtual Card",
  "referenceFields": [
    {
      "fieldCode": "COMPCODE",
      "optionCode": "ABC123"
    }
  ],
  "notes": "It was the best of times, it was the worst of times.",
  "balanceCents": 400000,
  "direct": false,
  "currency": "USD",
  "validFrom": "2020-01-01T01:01:12.123+0000",
  "validTo": "2020-01-01T01:01:12.123+0000",
  "recurs": true,
  "recurrence": {
    "balanceCents": 400000,
    "RecurrencePeriod": "WEEKLY",
    "interval": 2,
    "RecurrenceTerminator": "COUNT",
    "count": 10,
    "resetCount": true,
    "until": "2022-01-01T00:00:00.000+0000",
    "byWeekDay": 0,
    "byMonthDay": 1,
    "byYearDay": 1
  },
  "receiptAttachmentIds": [
    "string"
  ],
  "country": "US",
  "expirationMonthYear": "11/23"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.paywithextend.com/virtualcards', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/virtualcards", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.paywithextend.com/virtualcards',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /virtualcards

This endpoint may be used to either send a virtual card to a recipient email address or it may be used to request a virtual card from a cardholder email address. Sending a Virtual Card requires recipient to be sent. Requesting a virtual card requires cardholder to be sent.

Body parameter

{
  "creditCardId": "cc_1234",
  "recipient": "demo@paywithextend.com",
  "recipientFirstName": "Jane",
  "recipientLastName": "Doe",
  "cardholder": "demo@paywithextend.com",
  "displayName": "My Virtual Card",
  "referenceFields": [
    {
      "fieldCode": "COMPCODE",
      "optionCode": "ABC123"
    }
  ],
  "notes": "It was the best of times, it was the worst of times.",
  "balanceCents": 400000,
  "direct": false,
  "currency": "USD",
  "validFrom": "2020-01-01T01:01:12.123+0000",
  "validTo": "2020-01-01T01:01:12.123+0000",
  "recurs": true,
  "recurrence": {
    "balanceCents": 400000,
    "RecurrencePeriod": "WEEKLY",
    "interval": 2,
    "RecurrenceTerminator": "COUNT",
    "count": 10,
    "resetCount": true,
    "until": "2022-01-01T00:00:00.000+0000",
    "byWeekDay": 0,
    "byMonthDay": 1,
    "byYearDay": 1
  },
  "receiptAttachmentIds": [
    "string"
  ],
  "country": "US",
  "expirationMonthYear": "11/23"
}

Parameters

Name In Type Required Description
body body CreateVirtualCardRequest true Create Virtual Card Request
» creditCardId body string false ID of Credit Card
» recipient body string false Recipient Email Address - Only required if you want to send a card to someone else.
» recipientFirstName body string false Recipient First Name - Only used if direct is set to true
» recipientLastName body string false Recipient Last Name - Only used if direct is set to true
» cardholder body string false Cardholder Email Address
» displayName body string true Display Name
» referenceFields body [AppliedReferenceFieldRequest] false Reference Fields
»» fieldCode body string true The code of the reference field
»» optionCode body string true The code of the reference field option (or the freetext input by the user if enabled)
» notes body string false Notes
» balanceCents body integer(int64) true Balance Cents
» direct body boolean false If true, will be a Direct card, bypassing need for full Extend account to view
» currency body string false Currency Code (ISO 4217)
» validFrom body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Valid From Timestamp - Required if recurs is false
» validTo body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Valid To Timestamp - Required if recurs is false
» recurs body boolean false true if this Card is currently set up for Recurrence. Defaults to false.
» recurrence body RecurrenceRequest false Required if recurs is true
»» balanceCents body integer(int64) true Balance Cents
»» RecurrencePeriod body string false Period - The period of time each recurrence iterates. For example, a period of WEEKLY and interval of 2 means reccurence will execute once every 2 weeks.
»» interval body integer(int32) true Interval - The interval between each recurrence iteration. For example, an interval of 2 means reccurence will execute once every 2 weeks for WEEKLY. Defaults to 1.
»» RecurrenceTerminator body string false Terminator - Determines when recurrence will end. NONE - recurrence will never end. COUNT - recurrence will end after # of times. DATE - recurrence will end on specific date. COUNT_OR_DATE - recurrence will end after # of times or on specific date, whichever comes first.
»» count body integer(int32) false How many times recurrence will be executed. Can only be provided when terminator is COUNT or COUNT_OR_DATE.
»» resetCount body boolean false If present and true, the current recurrence counter will reset to 0.
»» until body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Limits recurrence until this date. Can only be provided when terminator is DATE or COUNT_OR_DATE.
»» byWeekDay body integer(int32) false For WEEKLY recurrence only (required in this case). The day of the week this will recur on. Must be between 0-6, inclusive. 0 is Monday.
»» byMonthDay body integer(int32) false For MONTHLY recurrence only (required in this case). The day of the month this will recur on. 1 based. Must be between 1-31, inclusive. 31 is guaranteed to be the end of every month. 30 will always be on the 30th, except for February, which will run on the last day of that month. In other words, the day will always be clamped to the end of the month if it's too high a number.
»» byYearDay body integer(int32) false For YEARLY recurrence only (required in this case). The year day this will recur on. 1 based. Must be between 1-365. Note that the day will be calculated based on a non-leap year. ie: 365 will always be December 31st, even if a year has 366 days. Consequentially, this means Feb 29 cannot be chosen as a valid recurrence date.
» receiptAttachmentIds body [string] false List of Attachment IDs to assign to this Virtual Card. Note: Attachments must be uploaded via /receiptattachments beforehand. /receiptattachments will return an Attachment ID for you to use here
» country body string false ISO2 Country Code. Only available to set if parent CreditCard.customAddress is true.
» expirationMonthYear body string false The month and year for the virtual card to expire (format: MM/YY).

Enumerated Values

Parameter Value
» currency USD
» currency BRL
»» RecurrencePeriod DAILY
»» RecurrencePeriod WEEKLY
»» RecurrencePeriod MONTHLY
»» RecurrencePeriod YEARLY
»» RecurrenceTerminator NONE
»» RecurrenceTerminator COUNT
»» RecurrenceTerminator DATE
»» RecurrenceTerminator COUNT_OR_DATE

Example responses

200 Response

{
  "virtualCard": {
    "id": "vc_1234",
    "status": "ACTIVE",
    "recipientId": "u_1234",
    "recipient": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardholderId": "string",
    "cardholder": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Virtual Card",
    "expires": "2022-01-01T00:00:00.000+0000",
    "currency": "USD",
    "limitCents": 1000000,
    "balanceCents": 400000,
    "referenceFields": [
      {
        "fieldLabel": "string",
        "fieldCode": "string",
        "optionLabel": "string",
        "optionCode": "string"
      }
    ],
    "spentCents": 600000,
    "lifetimeSpentCents": 600000,
    "awaitingBudget": false,
    "last4": "1234",
    "numberFormat": "cardnumber16",
    "validFrom": "2020-01-01T01:01:12.123+0000",
    "validTo": "2020-01-01T01:01:12.123+0000",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "creditCardId": "cc_1234",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "receiptAttachments": [
      {
        "id": "string",
        "transactionId": "string",
        "virtualCardId": "string",
        "contentType": "string",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "createdAt": "string",
        "updatedAt": "string"
      }
    ],
    "pending": {
      "balanceCents": 0,
      "validFrom": "string",
      "validTo": "string",
      "recurs": true,
      "activeUntil": "string",
      "currency": "USD",
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "receiptAttachments": {}
    },
    "notes": "It was the best of times, it was the worst of times.",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "direct": true,
    "features": {
      "recurrence": true,
      "customAddress": true,
      "customMin": true,
      "customMax": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "activeUntil": "string",
    "minTransactionCents": 0,
    "maxTransactionCents": 0,
    "maxTransactionCount": 0,
    "tokenReferenceIds": "['tok_123', 'tok_abc']",
    "network": "MASTERCARD",
    "companyName": "ACME Co.",
    "creditCardDisplayName": "My Virtual Card"
  }
}

Responses

Status Meaning Description Schema
200 OK Virtual Card Response VirtualCardResponse

Cancel Virtual Card

Example Request

# You can also use wget
curl -X PUT https://api.paywithextend.com/virtualcards/{id}/cancel \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards/{id}/cancel',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards/{id}/cancel");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.paywithextend.com/virtualcards/{id}/cancel', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api.paywithextend.com/virtualcards/{id}/cancel", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api.paywithextend.com/virtualcards/{id}/cancel',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /virtualcards/{id}/cancel

Cancel a Virtual Card. This is intended for either the recipient or the cardholder of the Virtual Card

Parameters

Name In Type Required Description
id path string true ID of the Virtual Card

Example responses

200 Response

{
  "virtualCard": {
    "id": "vc_1234",
    "status": "ACTIVE",
    "recipientId": "u_1234",
    "recipient": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardholderId": "string",
    "cardholder": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Virtual Card",
    "expires": "2022-01-01T00:00:00.000+0000",
    "currency": "USD",
    "limitCents": 1000000,
    "balanceCents": 400000,
    "referenceFields": [
      {
        "fieldLabel": "string",
        "fieldCode": "string",
        "optionLabel": "string",
        "optionCode": "string"
      }
    ],
    "spentCents": 600000,
    "lifetimeSpentCents": 600000,
    "awaitingBudget": false,
    "last4": "1234",
    "numberFormat": "cardnumber16",
    "validFrom": "2020-01-01T01:01:12.123+0000",
    "validTo": "2020-01-01T01:01:12.123+0000",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "creditCardId": "cc_1234",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "receiptAttachments": [
      {
        "id": "string",
        "transactionId": "string",
        "virtualCardId": "string",
        "contentType": "string",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "createdAt": "string",
        "updatedAt": "string"
      }
    ],
    "pending": {
      "balanceCents": 0,
      "validFrom": "string",
      "validTo": "string",
      "recurs": true,
      "activeUntil": "string",
      "currency": "USD",
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "receiptAttachments": {}
    },
    "notes": "It was the best of times, it was the worst of times.",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "direct": true,
    "features": {
      "recurrence": true,
      "customAddress": true,
      "customMin": true,
      "customMax": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "activeUntil": "string",
    "minTransactionCents": 0,
    "maxTransactionCents": 0,
    "maxTransactionCount": 0,
    "tokenReferenceIds": "['tok_123', 'tok_abc']",
    "network": "MASTERCARD",
    "companyName": "ACME Co.",
    "creditCardDisplayName": "My Virtual Card"
  }
}

Responses

Status Meaning Description Schema
200 OK Virtual Card Response VirtualCardResponse

Update Virtual Card Customer Support Code

Example Request

# You can also use wget
curl -X PUT https://api.paywithextend.com/virtualcards/{id}/supportcode \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "creditCardId": "cc_1234",
  "referenceFields": [
    {
      "fieldCode": "COMPCODE",
      "optionCode": "ABC123"
    }
  ],
  "displayName": "My Virtual Card",
  "notes": "It was the best of times, it was the worst of times.",
  "balanceCents": 400000,
  "currency": "USD",
  "validFrom": "2020-01-01T01:01:12.123+0000",
  "validTo": "2020-01-01T01:01:12.123+0000",
  "recurs": true,
  "recurrence": {
    "balanceCents": 400000,
    "RecurrencePeriod": "WEEKLY",
    "interval": 2,
    "RecurrenceTerminator": "COUNT",
    "count": 10,
    "resetCount": true,
    "until": "2022-01-01T00:00:00.000+0000",
    "byWeekDay": 0,
    "byMonthDay": 1,
    "byYearDay": 1
  },
  "receiptAttachmentIds": [
    "string"
  ],
  "expirationMonthYear": "11/23"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards/{id}/supportcode',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards/{id}/supportcode");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.paywithextend.com/virtualcards/{id}/supportcode', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api.paywithextend.com/virtualcards/{id}/supportcode", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api.paywithextend.com/virtualcards/{id}/supportcode',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /virtualcards/{id}/supportcode

Modify an existing Virtual Card's customer support code.

Body parameter

{
  "creditCardId": "cc_1234",
  "referenceFields": [
    {
      "fieldCode": "COMPCODE",
      "optionCode": "ABC123"
    }
  ],
  "displayName": "My Virtual Card",
  "notes": "It was the best of times, it was the worst of times.",
  "balanceCents": 400000,
  "currency": "USD",
  "validFrom": "2020-01-01T01:01:12.123+0000",
  "validTo": "2020-01-01T01:01:12.123+0000",
  "recurs": true,
  "recurrence": {
    "balanceCents": 400000,
    "RecurrencePeriod": "WEEKLY",
    "interval": 2,
    "RecurrenceTerminator": "COUNT",
    "count": 10,
    "resetCount": true,
    "until": "2022-01-01T00:00:00.000+0000",
    "byWeekDay": 0,
    "byMonthDay": 1,
    "byYearDay": 1
  },
  "receiptAttachmentIds": [
    "string"
  ],
  "expirationMonthYear": "11/23"
}

Parameters

Name In Type Required Description
id path string true ID of the Virtual Card
body body UpdateVirtualCardRequest true Update Virtual Card Request
» creditCardId body string false ID of Credit Card - Required to approve a card. Relevant for cardholders who wish to approve a PENDING status Virtual Card or approve a modification request to a Virtual Card
» referenceFields body [AppliedReferenceFieldRequest] false Reference Fields
»» fieldCode body string true The code of the reference field
»» optionCode body string true The code of the reference field option (or the freetext input by the user if enabled)
» displayName body string true Display Name
» notes body string false Notes
» balanceCents body integer(int64) true Balance Cents
» currency body string false Currency Code (ISO 4217)
» validFrom body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Valid From Timestamp - Required if recurs is false
» validTo body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Valid To Timestamp - Required if recurs is false
» recurs body boolean false true if this Card is currently set up for Recurrence. Defaults to false.
» recurrence body RecurrenceRequest false Required if recurs is true
»» balanceCents body integer(int64) true Balance Cents
»» RecurrencePeriod body string false Period - The period of time each recurrence iterates. For example, a period of WEEKLY and interval of 2 means reccurence will execute once every 2 weeks.
»» interval body integer(int32) true Interval - The interval between each recurrence iteration. For example, an interval of 2 means reccurence will execute once every 2 weeks for WEEKLY. Defaults to 1.
»» RecurrenceTerminator body string false Terminator - Determines when recurrence will end. NONE - recurrence will never end. COUNT - recurrence will end after # of times. DATE - recurrence will end on specific date. COUNT_OR_DATE - recurrence will end after # of times or on specific date, whichever comes first.
»» count body integer(int32) false How many times recurrence will be executed. Can only be provided when terminator is COUNT or COUNT_OR_DATE.
»» resetCount body boolean false If present and true, the current recurrence counter will reset to 0.
»» until body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Limits recurrence until this date. Can only be provided when terminator is DATE or COUNT_OR_DATE.
»» byWeekDay body integer(int32) false For WEEKLY recurrence only (required in this case). The day of the week this will recur on. Must be between 0-6, inclusive. 0 is Monday.
»» byMonthDay body integer(int32) false For MONTHLY recurrence only (required in this case). The day of the month this will recur on. 1 based. Must be between 1-31, inclusive. 31 is guaranteed to be the end of every month. 30 will always be on the 30th, except for February, which will run on the last day of that month. In other words, the day will always be clamped to the end of the month if it's too high a number.
»» byYearDay body integer(int32) false For YEARLY recurrence only (required in this case). The year day this will recur on. 1 based. Must be between 1-365. Note that the day will be calculated based on a non-leap year. ie: 365 will always be December 31st, even if a year has 366 days. Consequentially, this means Feb 29 cannot be chosen as a valid recurrence date.
» receiptAttachmentIds body [string] false List of Attachment IDs to assign to this Virtual Card. Note: Attachments must be uploaded via /receiptattachments beforehand. /receiptattachments will return an Attachment ID for you to use here
» expirationMonthYear body string false The month and year for the virtual card to expire (format: MM/YY).

Enumerated Values

Parameter Value
» currency USD
» currency BRL
»» RecurrencePeriod DAILY
»» RecurrencePeriod WEEKLY
»» RecurrencePeriod MONTHLY
»» RecurrencePeriod YEARLY
»» RecurrenceTerminator NONE
»» RecurrenceTerminator COUNT
»» RecurrenceTerminator DATE
»» RecurrenceTerminator COUNT_OR_DATE

Example responses

200 Response

{
  "customerSupportCode": "string"
}

Responses

Status Meaning Description Schema
200 OK Customer Support Code Response CustomerSupportCodeResponse

Add Virtual Card to Wallet

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/virtualcards/{id}/wallet \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "walletType": "APPLEPAY",
  "tokenReferenceId": "tok_123_abc"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards/{id}/wallet',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards/{id}/wallet");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.paywithextend.com/virtualcards/{id}/wallet', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/virtualcards/{id}/wallet", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.paywithextend.com/virtualcards/{id}/wallet',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /virtualcards/{id}/wallet

Mark a card as added to wallet

Body parameter

{
  "walletType": "APPLEPAY",
  "tokenReferenceId": "tok_123_abc"
}

Parameters

Name In Type Required Description
id path string true ID of the Virtual Card
body body AddVirtualCardToWalletRequest false
» walletType body string true Type of wallet, either APPLEPAY or GOOGLEPAY
» tokenReferenceId body string true The token reference id returned when adding the card to wallet

Example responses

200 Response

{
  "virtualCard": {
    "id": "vc_1234",
    "status": "ACTIVE",
    "recipientId": "u_1234",
    "recipient": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardholderId": "string",
    "cardholder": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Virtual Card",
    "expires": "2022-01-01T00:00:00.000+0000",
    "currency": "USD",
    "limitCents": 1000000,
    "balanceCents": 400000,
    "referenceFields": [
      {
        "fieldLabel": "string",
        "fieldCode": "string",
        "optionLabel": "string",
        "optionCode": "string"
      }
    ],
    "spentCents": 600000,
    "lifetimeSpentCents": 600000,
    "awaitingBudget": false,
    "last4": "1234",
    "numberFormat": "cardnumber16",
    "validFrom": "2020-01-01T01:01:12.123+0000",
    "validTo": "2020-01-01T01:01:12.123+0000",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "creditCardId": "cc_1234",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "receiptAttachments": [
      {
        "id": "string",
        "transactionId": "string",
        "virtualCardId": "string",
        "contentType": "string",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "createdAt": "string",
        "updatedAt": "string"
      }
    ],
    "pending": {
      "balanceCents": 0,
      "validFrom": "string",
      "validTo": "string",
      "recurs": true,
      "activeUntil": "string",
      "currency": "USD",
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "receiptAttachments": {}
    },
    "notes": "It was the best of times, it was the worst of times.",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "direct": true,
    "features": {
      "recurrence": true,
      "customAddress": true,
      "customMin": true,
      "customMax": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "activeUntil": "string",
    "minTransactionCents": 0,
    "maxTransactionCents": 0,
    "maxTransactionCount": 0,
    "tokenReferenceIds": "['tok_123', 'tok_abc']",
    "network": "MASTERCARD",
    "companyName": "ACME Co.",
    "creditCardDisplayName": "My Virtual Card"
  }
}

Responses

Status Meaning Description Schema
200 OK Virtual Card Response VirtualCardResponse

Remove a Virtual Card as removed Wallet

Example Request

# You can also use wget
curl -X DELETE https://api.paywithextend.com/virtualcards/{id}/wallet \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "walletType": "APPLEPAY",
  "tokenReferenceId": "tok_123_abc"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards/{id}/wallet',
{
  method: 'DELETE',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards/{id}/wallet");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.paywithextend.com/virtualcards/{id}/wallet', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.paywithextend.com/virtualcards/{id}/wallet", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.paywithextend.com/virtualcards/{id}/wallet',
  params: {
  }, headers: headers

p JSON.parse(result)

DELETE /virtualcards/{id}/wallet

Mark a card as revoved from wallet

Body parameter

{
  "walletType": "APPLEPAY",
  "tokenReferenceId": "tok_123_abc"
}

Parameters

Name In Type Required Description
id path string true ID of the Virtual Card
body body AddVirtualCardToWalletRequest false
» walletType body string true Type of wallet, either APPLEPAY or GOOGLEPAY
» tokenReferenceId body string true The token reference id returned when adding the card to wallet

Example responses

200 Response

{
  "virtualCard": {
    "id": "vc_1234",
    "status": "ACTIVE",
    "recipientId": "u_1234",
    "recipient": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardholderId": "string",
    "cardholder": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Virtual Card",
    "expires": "2022-01-01T00:00:00.000+0000",
    "currency": "USD",
    "limitCents": 1000000,
    "balanceCents": 400000,
    "referenceFields": [
      {
        "fieldLabel": "string",
        "fieldCode": "string",
        "optionLabel": "string",
        "optionCode": "string"
      }
    ],
    "spentCents": 600000,
    "lifetimeSpentCents": 600000,
    "awaitingBudget": false,
    "last4": "1234",
    "numberFormat": "cardnumber16",
    "validFrom": "2020-01-01T01:01:12.123+0000",
    "validTo": "2020-01-01T01:01:12.123+0000",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "creditCardId": "cc_1234",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "receiptAttachments": [
      {
        "id": "string",
        "transactionId": "string",
        "virtualCardId": "string",
        "contentType": "string",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "createdAt": "string",
        "updatedAt": "string"
      }
    ],
    "pending": {
      "balanceCents": 0,
      "validFrom": "string",
      "validTo": "string",
      "recurs": true,
      "activeUntil": "string",
      "currency": "USD",
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "receiptAttachments": {}
    },
    "notes": "It was the best of times, it was the worst of times.",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "direct": true,
    "features": {
      "recurrence": true,
      "customAddress": true,
      "customMin": true,
      "customMax": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "activeUntil": "string",
    "minTransactionCents": 0,
    "maxTransactionCents": 0,
    "maxTransactionCount": 0,
    "tokenReferenceIds": "['tok_123', 'tok_abc']",
    "network": "MASTERCARD",
    "companyName": "ACME Co.",
    "creditCardDisplayName": "My Virtual Card"
  }
}

Responses

Status Meaning Description Schema
200 OK Virtual Card Response VirtualCardResponse

Cancel Virtual Card Update Request

Example Request

# You can also use wget
curl -X PUT https://api.paywithextend.com/virtualcards/{id}/cancelupdate \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards/{id}/cancelupdate',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards/{id}/cancelupdate");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.paywithextend.com/virtualcards/{id}/cancelupdate', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api.paywithextend.com/virtualcards/{id}/cancelupdate", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api.paywithextend.com/virtualcards/{id}/cancelupdate',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /virtualcards/{id}/cancelupdate

Cancel a pending modification request to a Virtual Card (pending modifications are stored as a VirtualCardRevision on the VirtualCard.pending property). This endpoint is intended for the recipient of the Virtual Card

Parameters

Name In Type Required Description
id path string true ID of the Virtual Card

Example responses

200 Response

{
  "virtualCard": {
    "id": "vc_1234",
    "status": "ACTIVE",
    "recipientId": "u_1234",
    "recipient": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardholderId": "string",
    "cardholder": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Virtual Card",
    "expires": "2022-01-01T00:00:00.000+0000",
    "currency": "USD",
    "limitCents": 1000000,
    "balanceCents": 400000,
    "referenceFields": [
      {
        "fieldLabel": "string",
        "fieldCode": "string",
        "optionLabel": "string",
        "optionCode": "string"
      }
    ],
    "spentCents": 600000,
    "lifetimeSpentCents": 600000,
    "awaitingBudget": false,
    "last4": "1234",
    "numberFormat": "cardnumber16",
    "validFrom": "2020-01-01T01:01:12.123+0000",
    "validTo": "2020-01-01T01:01:12.123+0000",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "creditCardId": "cc_1234",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "receiptAttachments": [
      {
        "id": "string",
        "transactionId": "string",
        "virtualCardId": "string",
        "contentType": "string",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "createdAt": "string",
        "updatedAt": "string"
      }
    ],
    "pending": {
      "balanceCents": 0,
      "validFrom": "string",
      "validTo": "string",
      "recurs": true,
      "activeUntil": "string",
      "currency": "USD",
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "receiptAttachments": {}
    },
    "notes": "It was the best of times, it was the worst of times.",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "direct": true,
    "features": {
      "recurrence": true,
      "customAddress": true,
      "customMin": true,
      "customMax": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "activeUntil": "string",
    "minTransactionCents": 0,
    "maxTransactionCents": 0,
    "maxTransactionCount": 0,
    "tokenReferenceIds": "['tok_123', 'tok_abc']",
    "network": "MASTERCARD",
    "companyName": "ACME Co.",
    "creditCardDisplayName": "My Virtual Card"
  }
}

Responses

Status Meaning Description Schema
200 OK Virtual Card Response VirtualCardResponse

Get Virtual Card History

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/virtualcards/{id}/revisions \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards/{id}/revisions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards/{id}/revisions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/virtualcards/{id}/revisions', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/virtualcards/{id}/revisions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/virtualcards/{id}/revisions',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /virtualcards/{id}/revisions

Get a paginated list of historical revisions that pertain to a Virtual Card

Parameters

Name In Type Required Description
id path string true ID of the Virtual Card
limit query integer(int32) false Number of results to return. Defaults to 20. Maximum of 100.
previousCursor query string false previousCursor cursor token from previous pagination response. If present, will return limit results before the token.
nextCursor query string false nextCursor cursor token from previous pagination response. If present, will return limit results after the token. Cannot be present if previousCursor is provided.
order query string false One of asc or desc. Defaults to desc.

Example responses

200 Response

{
  "revisions": [
    {
      "id": "c_1234",
      "event": "APPROVED",
      "timestamp": "2020-01-01T01:01:12.123+0000",
      "operator": {
        "id": "string",
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phone": "string",
        "phoneIsoCountry": "string",
        "avatarType": "LINKEDIN",
        "avatarUrl": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "currency": "USD",
        "locale": "string",
        "timezone": "string",
        "hasExpensifyLink": true,
        "employeeId": "string"
      },
      "before": {
        "displayName": "string",
        "currency": "USD",
        "limitCents": 0,
        "balanceCents": 0,
        "spentCents": 0,
        "lifetimeSpentCents": 0,
        "awaitingBudget": true,
        "validFrom": "string",
        "validTo": "string",
        "referenceFields": [
          {
            "fieldLabel": null,
            "fieldCode": null,
            "optionLabel": null,
            "optionCode": null
          }
        ],
        "recurs": true,
        "recurrence": {
          "id": "string",
          "balanceCents": 0,
          "period": "[",
          "interval": 0,
          "terminator": "[",
          "count": 0,
          "until": "string",
          "byWeekDay": 0,
          "byMonthDay": 0,
          "byYearDay": 0,
          "prevRecurrenceAt": "string",
          "nextRecurrenceAt": "string",
          "currentCount": 0,
          "remainingCount": 0,
          "createdAt": "string",
          "updatedAt": "string"
        },
        "receiptAttachments": [
          "string"
        ],
        "pending": {
          "balanceCents": 0,
          "validFrom": "string",
          "validTo": "string",
          "recurs": true,
          "activeUntil": "string",
          "currency": "[",
          "recurrence": {},
          "receiptAttachments": {}
        },
        "pendingModification": true,
        "cardholder": {
          "id": "string",
          "firstName": "string",
          "lastName": "string",
          "email": "string",
          "phone": "string",
          "phoneIsoCountry": "string",
          "avatarType": "[",
          "avatarUrl": "string",
          "createdAt": "string",
          "updatedAt": "string",
          "currency": "[",
          "locale": "string",
          "timezone": "string",
          "hasExpensifyLink": true,
          "employeeId": "string"
        },
        "recipient": {
          "id": "string",
          "firstName": "string",
          "lastName": "string",
          "email": "string",
          "phone": "string",
          "phoneIsoCountry": "string",
          "avatarType": "[",
          "avatarUrl": "string",
          "createdAt": "string",
          "updatedAt": "string",
          "currency": "[",
          "locale": "string",
          "timezone": "string",
          "hasExpensifyLink": true,
          "employeeId": "string"
        },
        "status": "PENDING",
        "notes": "string",
        "activeUntil": "string"
      },
      "after": {
        "displayName": "string",
        "currency": "USD",
        "limitCents": 0,
        "balanceCents": 0,
        "spentCents": 0,
        "lifetimeSpentCents": 0,
        "awaitingBudget": true,
        "validFrom": "string",
        "validTo": "string",
        "referenceFields": [
          {
            "fieldLabel": null,
            "fieldCode": null,
            "optionLabel": null,
            "optionCode": null
          }
        ],
        "recurs": true,
        "recurrence": {
          "id": "string",
          "balanceCents": 0,
          "period": "[",
          "interval": 0,
          "terminator": "[",
          "count": 0,
          "until": "string",
          "byWeekDay": 0,
          "byMonthDay": 0,
          "byYearDay": 0,
          "prevRecurrenceAt": "string",
          "nextRecurrenceAt": "string",
          "currentCount": 0,
          "remainingCount": 0,
          "createdAt": "string",
          "updatedAt": "string"
        },
        "receiptAttachments": [
          "string"
        ],
        "pending": {
          "balanceCents": 0,
          "validFrom": "string",
          "validTo": "string",
          "recurs": true,
          "activeUntil": "string",
          "currency": "[",
          "recurrence": {},
          "receiptAttachments": {}
        },
        "pendingModification": true,
        "cardholder": {
          "id": "string",
          "firstName": "string",
          "lastName": "string",
          "email": "string",
          "phone": "string",
          "phoneIsoCountry": "string",
          "avatarType": "[",
          "avatarUrl": "string",
          "createdAt": "string",
          "updatedAt": "string",
          "currency": "[",
          "locale": "string",
          "timezone": "string",
          "hasExpensifyLink": true,
          "employeeId": "string"
        },
        "recipient": {
          "id": "string",
          "firstName": "string",
          "lastName": "string",
          "email": "string",
          "phone": "string",
          "phoneIsoCountry": "string",
          "avatarType": "[",
          "avatarUrl": "string",
          "createdAt": "string",
          "updatedAt": "string",
          "currency": "[",
          "locale": "string",
          "timezone": "string",
          "hasExpensifyLink": true,
          "employeeId": "string"
        },
        "status": "PENDING",
        "notes": "string",
        "activeUntil": "string"
      }
    }
  ],
  "pagination": {
    "previousCursor": "string",
    "nextCursor": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Virtual Card Diffs Response VirtualCardDiffsResponse

Get Virtual Card Transactions

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/virtualcards/{id}/transactions \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards/{id}/transactions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards/{id}/transactions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/virtualcards/{id}/transactions', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/virtualcards/{id}/transactions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/virtualcards/{id}/transactions',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /virtualcards/{id}/transactions

Get a paginated list of transactions that pertain to a Virtual Card

Parameters

Name In Type Required Description
id path string true ID of the Virtual Card
count query integer(int32) false Number of results to return. Defaults to 25. Maximum of 500.
before query string false Timestamp cursor used for pagination. If present, will return count results before this timestamp
after query string false Timestamp cursor used for pagination. If present, will return count results after this timestamp
statuses query array[string] false List of Transaction statuses to filter by. Defaults to [PENDING]

Enumerated Values

Parameter Value
statuses PENDING
statuses CLEARED
statuses DECLINED
statuses NO_MATCH
statuses AVS_PASS
statuses AVS_FAIL

Example responses

200 Response

{
  "transactions": [
    {
      "id": "txn_1234",
      "cardholderName": "Jane Doe",
      "cardholderEmail": "demo@paywithextend.com",
      "recipientName": "Jane Doe",
      "recipientEmail": "demo@paywithextend.com",
      "recipientId": "u_123",
      "nameOnCard": "Jane Doe",
      "source": "VIRTUAL",
      "vcnLast4": "demo@paywithextend.com",
      "vcnDisplayName": "1234",
      "virtualCardId": "vc_1234",
      "type": "DEBIT",
      "status": "CLEARED",
      "declineReasons": [
        {
          "code": "ACCOUNT_INACTIVE",
          "description": "Decline - Do Not Honor"
        }
      ],
      "approvalCode": "ABC1234",
      "authBillingAmountCents": 400000,
      "authBillingCurrency": "USD",
      "authMerchantAmountCents": 400000,
      "authMerchantCurrency": "USD",
      "authExchangeRate": 1.2345,
      "clearingBillingAmountCents": 400000,
      "clearingBillingCurrency": "USD",
      "clearingMerchantAmountCents": 400000,
      "clearingMerchantCurrency": "USD",
      "clearingExchangeRate": 1.2345,
      "mcc": "AIRLINE",
      "mccGroup": "TRAVEL",
      "mccDescription": "Airplanes",
      "merchantId": "123456",
      "merchantName": "ACME Airline Co.",
      "merchantAddress": "1234 Place Ave.",
      "merchantCity": "New York City",
      "merchantState": "New York",
      "merchantCountry": "US",
      "merchantZip": "10010",
      "authedAt": "2020-01-01T01:01:12.123+0000",
      "clearedAt": "2020-01-01T01:01:12.123+0000",
      "updatedAt": "2020-01-01T01:01:12.123+0000",
      "hasAttachments": true,
      "referenceId": "ABC1234",
      "creditCardId": "cc_",
      "sentToExpensify": true,
      "attachmentsCount": 1,
      "referenceFields": [
        {
          "fieldLabel": "string",
          "fieldCode": "string",
          "optionLabel": "string",
          "optionCode": "string"
        }
      ],
      "creditCardDisplayName": "ACME Co."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Transaction Response TransactionsResponse

Reject Virtual Card

Example Request

# You can also use wget
curl -X PUT https://api.paywithextend.com/virtualcards/{id}/reject \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/virtualcards/{id}/reject',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/virtualcards/{id}/reject");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.paywithextend.com/virtualcards/{id}/reject', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api.paywithextend.com/virtualcards/{id}/reject", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api.paywithextend.com/virtualcards/{id}/reject',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /virtualcards/{id}/reject

Reject a PENDING status Virtual Card or reject a pending modification to a Virtual Card (pending modifications are stored as a VirtualCardRevision on the VirtualCard.pending property). This endpoint is intended for the cardholder of the Virtual Card

Parameters

Name In Type Required Description
id path string true ID of the Virtual Card

Example responses

200 Response

{
  "virtualCard": {
    "id": "vc_1234",
    "status": "ACTIVE",
    "recipientId": "u_1234",
    "recipient": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardholderId": "string",
    "cardholder": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Virtual Card",
    "expires": "2022-01-01T00:00:00.000+0000",
    "currency": "USD",
    "limitCents": 1000000,
    "balanceCents": 400000,
    "referenceFields": [
      {
        "fieldLabel": "string",
        "fieldCode": "string",
        "optionLabel": "string",
        "optionCode": "string"
      }
    ],
    "spentCents": 600000,
    "lifetimeSpentCents": 600000,
    "awaitingBudget": false,
    "last4": "1234",
    "numberFormat": "cardnumber16",
    "validFrom": "2020-01-01T01:01:12.123+0000",
    "validTo": "2020-01-01T01:01:12.123+0000",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "creditCardId": "cc_1234",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "receiptAttachments": [
      {
        "id": "string",
        "transactionId": "string",
        "virtualCardId": "string",
        "contentType": "string",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "createdAt": "string",
        "updatedAt": "string"
      }
    ],
    "pending": {
      "balanceCents": 0,
      "validFrom": "string",
      "validTo": "string",
      "recurs": true,
      "activeUntil": "string",
      "currency": "USD",
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "receiptAttachments": {}
    },
    "notes": "It was the best of times, it was the worst of times.",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "direct": true,
    "features": {
      "recurrence": true,
      "customAddress": true,
      "customMin": true,
      "customMax": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "activeUntil": "string",
    "minTransactionCents": 0,
    "maxTransactionCents": 0,
    "maxTransactionCount": 0,
    "tokenReferenceIds": "['tok_123', 'tok_abc']",
    "network": "MASTERCARD",
    "companyName": "ACME Co.",
    "creditCardDisplayName": "My Virtual Card"
  }
}

Responses

Status Meaning Description Schema
200 OK Virtual Card Response VirtualCardResponse

Credit Cards

Get Credit Card

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/creditcards/{id} \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/creditcards/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/creditcards/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/creditcards/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/creditcards/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/creditcards/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /creditcards/{id}

Get Credit Card by ID

Parameters

Name In Type Required Description
id path string true ID of the Credit Card to be obtained.

Example responses

200 Response

{
  "creditCard": {
    "id": "string",
    "type": "SOURCE",
    "currency": "USD",
    "parentCreditCardId": "string",
    "parentCreditCardDisplayName": "ACME Co.",
    "userId": "string",
    "user": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "ownerId": "string",
    "owner": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "parentCreditCardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Credit Card",
    "companyName": "ACME Co.",
    "expires": "2020-01-01T01:01:12.123+0000",
    "activeUntil": "2020-01-01T01:01:12.123+0000",
    "last4": "1234",
    "issuer": "AMEX",
    "issuerName": "American Express",
    "issuerId": "is_1234",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "status": "ACTIVE",
    "numberFormat": "cardnumber16",
    "features": {
      "budgets": true,
      "recurrence": true,
      "customAddress": true,
      "direct": true,
      "plasticCardsEnabled": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "issuingLimitCents": 1000000,
    "until": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "issuedAmountCents": 400000,
    "activeVirtualCardCount": 42,
    "activeAccountCount": 56,
    "totalBalanceCents": 400000,
    "totalActiveSpentCents": 300000,
    "totalSpentCents": 300000,
    "activeIssuedAmountCents": 300000,
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "hasPlaidLink": true,
    "hasExpensifyLink": true,
    "policyInfoId": "string",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "issuerAccountCreditLimitCents": 5000,
    "issuerAccountBalanceCents": 6000,
    "issuerAvailableLimitCents": 1000,
    "issuerFieldsUpdatedAt": "2019-08-24T14:15:22Z",
    "readOnly": true
  }
}

Responses

Status Meaning Description Schema
200 OK Credit Card CreditCardResponse

Update Credit Card

Example Request

# You can also use wget
curl -X PUT https://api.paywithextend.com/creditcards/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "type": "SOURCE",
  "displayName": "My Credit Card",
  "companyName": "ACME Co.",
  "companyId": "c_1234",
  "address1": "1234 Place Ave.",
  "address2": "Apt. B",
  "city": "New York City",
  "province": "New York",
  "postal": "10010",
  "country": "US",
  "last4": "1234",
  "expires": "2020-01-01T01:01:12.123+0000",
  "maxVirtualCardAmountCents": 400000,
  "email": "demo@paywithextend.com",
  "issuingLimitCents": 400000,
  "until": "2020-01-01",
  "recurs": true,
  "recurrence": {
    "balanceCents": 400000,
    "RecurrencePeriod": "WEEKLY",
    "interval": 2,
    "RecurrenceTerminator": "COUNT",
    "count": 10,
    "resetCount": true,
    "until": "2022-01-01T00:00:00.000+0000",
    "byWeekDay": 0,
    "byMonthDay": 1,
    "byYearDay": 1
  },
  "reset": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/creditcards/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/creditcards/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.paywithextend.com/creditcards/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api.paywithextend.com/creditcards/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api.paywithextend.com/creditcards/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /creditcards/{id}

Modify an existing Credit Card. Note: updating the billing address does not update the billing address on file with the issuing bank.

Body parameter

{
  "type": "SOURCE",
  "displayName": "My Credit Card",
  "companyName": "ACME Co.",
  "companyId": "c_1234",
  "address1": "1234 Place Ave.",
  "address2": "Apt. B",
  "city": "New York City",
  "province": "New York",
  "postal": "10010",
  "country": "US",
  "last4": "1234",
  "expires": "2020-01-01T01:01:12.123+0000",
  "maxVirtualCardAmountCents": 400000,
  "email": "demo@paywithextend.com",
  "issuingLimitCents": 400000,
  "until": "2020-01-01",
  "recurs": true,
  "recurrence": {
    "balanceCents": 400000,
    "RecurrencePeriod": "WEEKLY",
    "interval": 2,
    "RecurrenceTerminator": "COUNT",
    "count": 10,
    "resetCount": true,
    "until": "2022-01-01T00:00:00.000+0000",
    "byWeekDay": 0,
    "byMonthDay": 1,
    "byYearDay": 1
  },
  "reset": true
}

Parameters

Name In Type Required Description
id path string true ID of the Credit Card
body body UpdateCreditCardRequest true Update Credit Card Request
» type body string true Type of Credit Card
» displayName body string true Display Name
» companyName body string true Company Name to associate with this Credit Card Account
» companyId body string false Company ID to associate with this Credit Card Account
» address1 body string true First line in a street address
» address2 body string false Second line in a street address
» city body string false Name of a city in a street address
» province body string false State/Province in a street address
» postal body string false Postal/Zip code in a street address
» country body string true ISO2 Country Code
» last4 body string false Last 4 digits of Card Number
» expires body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Expiration Date
» maxVirtualCardAmountCents body integer(int64) false Maximum Balance to be allowed for Virtual Cards created from this Credit Card
» email body string true Email Address of User to associate with this Credit Card Account
» issuingLimitCents body integer(int64) false Issuing Limit for a Budget. Only to be used when updating a DELEGATE type Credit Card.
» until body string(yyyy-MM-dd) false Until date for when this Budget may no longer be used. Only to be used when updating a DELEGATE type Credit Card and recurrence is present.
» recurs body boolean false true if this Budget is recurring. Only to be used when updating a DELEGATE type Credit Card.
» recurrence body RecurrenceRequest false Required if recurs is true
»» balanceCents body integer(int64) true Balance Cents
»» RecurrencePeriod body string false Period - The period of time each recurrence iterates. For example, a period of WEEKLY and interval of 2 means reccurence will execute once every 2 weeks.
»» interval body integer(int32) true Interval - The interval between each recurrence iteration. For example, an interval of 2 means reccurence will execute once every 2 weeks for WEEKLY. Defaults to 1.
»» RecurrenceTerminator body string false Terminator - Determines when recurrence will end. NONE - recurrence will never end. COUNT - recurrence will end after # of times. DATE - recurrence will end on specific date. COUNT_OR_DATE - recurrence will end after # of times or on specific date, whichever comes first.
»» count body integer(int32) false How many times recurrence will be executed. Can only be provided when terminator is COUNT or COUNT_OR_DATE.
»» resetCount body boolean false If present and true, the current recurrence counter will reset to 0.
»» until body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Limits recurrence until this date. Can only be provided when terminator is DATE or COUNT_OR_DATE.
»» byWeekDay body integer(int32) false For WEEKLY recurrence only (required in this case). The day of the week this will recur on. Must be between 0-6, inclusive. 0 is Monday.
»» byMonthDay body integer(int32) false For MONTHLY recurrence only (required in this case). The day of the month this will recur on. 1 based. Must be between 1-31, inclusive. 31 is guaranteed to be the end of every month. 30 will always be on the 30th, except for February, which will run on the last day of that month. In other words, the day will always be clamped to the end of the month if it's too high a number.
»» byYearDay body integer(int32) false For YEARLY recurrence only (required in this case). The year day this will recur on. 1 based. Must be between 1-365. Note that the day will be calculated based on a non-leap year. ie: 365 will always be December 31st, even if a year has 366 days. Consequentially, this means Feb 29 cannot be chosen as a valid recurrence date.
» reset body boolean false true if this Budget's recurrence should be reset. Only to be used when updating a DELEGATE type Credit Card.

Enumerated Values

Parameter Value
» type SOURCE
» type DELEGATE
»» RecurrencePeriod DAILY
»» RecurrencePeriod WEEKLY
»» RecurrencePeriod MONTHLY
»» RecurrencePeriod YEARLY
»» RecurrenceTerminator NONE
»» RecurrenceTerminator COUNT
»» RecurrenceTerminator DATE
»» RecurrenceTerminator COUNT_OR_DATE

Example responses

200 Response

{
  "creditCard": {
    "id": "string",
    "type": "SOURCE",
    "currency": "USD",
    "parentCreditCardId": "string",
    "parentCreditCardDisplayName": "ACME Co.",
    "userId": "string",
    "user": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "ownerId": "string",
    "owner": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "parentCreditCardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Credit Card",
    "companyName": "ACME Co.",
    "expires": "2020-01-01T01:01:12.123+0000",
    "activeUntil": "2020-01-01T01:01:12.123+0000",
    "last4": "1234",
    "issuer": "AMEX",
    "issuerName": "American Express",
    "issuerId": "is_1234",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "status": "ACTIVE",
    "numberFormat": "cardnumber16",
    "features": {
      "budgets": true,
      "recurrence": true,
      "customAddress": true,
      "direct": true,
      "plasticCardsEnabled": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "issuingLimitCents": 1000000,
    "until": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "issuedAmountCents": 400000,
    "activeVirtualCardCount": 42,
    "activeAccountCount": 56,
    "totalBalanceCents": 400000,
    "totalActiveSpentCents": 300000,
    "totalSpentCents": 300000,
    "activeIssuedAmountCents": 300000,
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "hasPlaidLink": true,
    "hasExpensifyLink": true,
    "policyInfoId": "string",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "issuerAccountCreditLimitCents": 5000,
    "issuerAccountBalanceCents": 6000,
    "issuerAvailableLimitCents": 1000,
    "issuerFieldsUpdatedAt": "2019-08-24T14:15:22Z",
    "readOnly": true
  }
}

Responses

Status Meaning Description Schema
200 OK Credit Card Response CreditCardResponse

Delete Credit Card

Example Request

# You can also use wget
curl -X DELETE https://api.paywithextend.com/creditcards/{id} \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/creditcards/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/creditcards/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.paywithextend.com/creditcards/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.paywithextend.com/creditcards/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.paywithextend.com/creditcards/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

DELETE /creditcards/{id}

Delete a Credit Card

Parameters

Name In Type Required Description
id path string true ID of the Credit Card

Example responses

200 Response

{
  "creditCards": {
    "deleted": [
      "string"
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Delete Credit Card Response DeleteCreditCardResponse

Get User Credit Cards

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/creditcards \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "count": 0,
  "page": 0,
  "sortField": "string",
  "sortDirection": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/creditcards',
{
  method: 'GET',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/creditcards");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/creditcards', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/creditcards", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/creditcards',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /creditcards

Get all Credit Cards that belong to the authenticated user

Body parameter

{
  "count": 0,
  "page": 0,
  "sortField": "string",
  "sortDirection": "string"
}

Parameters

Name In Type Required Description
body body PageableRequest false
» count body integer(int32) false
» page body integer(int32) false
» sortField body string false
» sortDirection body string false

Example responses

200 Response

{
  "pagination": {
    "page": 0,
    "pageItemCount": 0,
    "totalItems": 0,
    "numberOfPages": 0
  },
  "creditCards": [
    {
      "id": "string",
      "type": "SOURCE",
      "currency": "USD",
      "parentCreditCardId": "string",
      "parentCreditCardDisplayName": "ACME Co.",
      "userId": "string",
      "user": {
        "id": "string",
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phone": "string",
        "phoneIsoCountry": "string",
        "avatarType": "LINKEDIN",
        "avatarUrl": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "currency": "USD",
        "locale": "string",
        "timezone": "string",
        "hasExpensifyLink": true,
        "employeeId": "string"
      },
      "ownerId": "string",
      "owner": {
        "id": "string",
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phone": "string",
        "phoneIsoCountry": "string",
        "avatarType": "LINKEDIN",
        "avatarUrl": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "currency": "USD",
        "locale": "string",
        "timezone": "string",
        "hasExpensifyLink": true,
        "employeeId": "string"
      },
      "cardImage": {
        "id": "im_1234",
        "contentType": "image/png",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "textColorRGBA": "rgba(255,255,255,1)",
        "hasTextShadow": true,
        "shadowTextColorRGBA": "rgba(0,0,0,1)"
      },
      "parentCreditCardImage": {
        "id": "im_1234",
        "contentType": "image/png",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "textColorRGBA": "rgba(255,255,255,1)",
        "hasTextShadow": true,
        "shadowTextColorRGBA": "rgba(0,0,0,1)"
      },
      "displayName": "My Credit Card",
      "companyName": "ACME Co.",
      "expires": "2020-01-01T01:01:12.123+0000",
      "activeUntil": "2020-01-01T01:01:12.123+0000",
      "last4": "1234",
      "issuer": "AMEX",
      "issuerName": "American Express",
      "issuerId": "is_1234",
      "createdAt": "2020-01-01T01:01:12.123+0000",
      "updatedAt": "2020-01-01T01:01:12.123+0000",
      "status": "ACTIVE",
      "numberFormat": "cardnumber16",
      "features": {
        "budgets": true,
        "recurrence": true,
        "customAddress": true,
        "direct": true,
        "plasticCardsEnabled": true,
        "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
      },
      "issuingLimitCents": 1000000,
      "until": "2020-01-01T01:01:12.123+0000",
      "timezone": "America/New_York",
      "recurs": true,
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "issuedAmountCents": 400000,
      "activeVirtualCardCount": 42,
      "activeAccountCount": 56,
      "totalBalanceCents": 400000,
      "totalActiveSpentCents": 300000,
      "totalSpentCents": 300000,
      "activeIssuedAmountCents": 300000,
      "address": {
        "address1": "1234 Place Ave.",
        "address2": "Apt. B",
        "city": "New York City",
        "province": "New York",
        "postal": "10010",
        "country": "US"
      },
      "hasPlaidLink": true,
      "hasExpensifyLink": true,
      "policyInfoId": "string",
      "inactiveSince": "2020-01-01T01:01:12.123+0000",
      "issuerAccountCreditLimitCents": 5000,
      "issuerAccountBalanceCents": 6000,
      "issuerAvailableLimitCents": 1000,
      "issuerFieldsUpdatedAt": "2019-08-24T14:15:22Z",
      "readOnly": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Credit Cards CreditCardsResponse

Get Virtual Cards From Credit Card

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/creditcards/{id}/virtualcards \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "count": 0,
  "page": 0,
  "sortField": "string",
  "sortDirection": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/creditcards/{id}/virtualcards',
{
  method: 'GET',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/creditcards/{id}/virtualcards");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/creditcards/{id}/virtualcards', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/creditcards/{id}/virtualcards", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/creditcards/{id}/virtualcards',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /creditcards/{id}/virtualcards

Get all Virtual Cards that are issued by this Credit Card

Body parameter

{
  "count": 0,
  "page": 0,
  "sortField": "string",
  "sortDirection": "string"
}

Parameters

Name In Type Required Description
count query string false Limit of items per page
page query string false The page to start from
sortField query string false Field to sort by
sortDirection query string false Sort direction
id path string true ID of the Credit Card
body body PageableRequest false
» count body integer(int32) false
» page body integer(int32) false
» sortField body string false
» sortDirection body string false

Example responses

200 Response

{
  "pagination": {
    "page": 0,
    "pageItemCount": 0,
    "totalItems": 0,
    "numberOfPages": 0
  },
  "virtualCards": [
    {
      "id": "vc_1234",
      "status": "ACTIVE",
      "recipientId": "u_1234",
      "recipient": {
        "id": "string",
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phone": "string",
        "phoneIsoCountry": "string",
        "avatarType": "LINKEDIN",
        "avatarUrl": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "currency": "USD",
        "locale": "string",
        "timezone": "string",
        "hasExpensifyLink": true,
        "employeeId": "string"
      },
      "cardholderId": "string",
      "cardholder": {
        "id": "string",
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phone": "string",
        "phoneIsoCountry": "string",
        "avatarType": "LINKEDIN",
        "avatarUrl": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "currency": "USD",
        "locale": "string",
        "timezone": "string",
        "hasExpensifyLink": true,
        "employeeId": "string"
      },
      "cardImage": {
        "id": "im_1234",
        "contentType": "image/png",
        "urls": {
          "property1": "string",
          "property2": "string"
        },
        "textColorRGBA": "rgba(255,255,255,1)",
        "hasTextShadow": true,
        "shadowTextColorRGBA": "rgba(0,0,0,1)"
      },
      "displayName": "My Virtual Card",
      "expires": "2022-01-01T00:00:00.000+0000",
      "currency": "USD",
      "limitCents": 1000000,
      "balanceCents": 400000,
      "referenceFields": [
        {
          "fieldLabel": "string",
          "fieldCode": "string",
          "optionLabel": "string",
          "optionCode": "string"
        }
      ],
      "spentCents": 600000,
      "lifetimeSpentCents": 600000,
      "awaitingBudget": false,
      "last4": "1234",
      "numberFormat": "cardnumber16",
      "validFrom": "2020-01-01T01:01:12.123+0000",
      "validTo": "2020-01-01T01:01:12.123+0000",
      "inactiveSince": "2020-01-01T01:01:12.123+0000",
      "timezone": "America/New_York",
      "creditCardId": "cc_1234",
      "recurs": true,
      "recurrence": {
        "id": "string",
        "balanceCents": 0,
        "period": "DAILY",
        "interval": 0,
        "terminator": "NONE",
        "count": 0,
        "until": "string",
        "byWeekDay": 0,
        "byMonthDay": 0,
        "byYearDay": 0,
        "prevRecurrenceAt": "string",
        "nextRecurrenceAt": "string",
        "currentCount": 0,
        "remainingCount": 0,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "receiptAttachments": [
        {
          "id": "string",
          "transactionId": "string",
          "virtualCardId": "string",
          "contentType": "string",
          "urls": {
            "property1": "string",
            "property2": "string"
          },
          "createdAt": "string",
          "updatedAt": "string"
        }
      ],
      "pending": {
        "balanceCents": 0,
        "validFrom": "string",
        "validTo": "string",
        "recurs": true,
        "activeUntil": "string",
        "currency": "USD",
        "recurrence": {
          "id": "string",
          "balanceCents": 0,
          "period": "[",
          "interval": 0,
          "terminator": "[",
          "count": 0,
          "until": "string",
          "byWeekDay": 0,
          "byMonthDay": 0,
          "byYearDay": 0,
          "prevRecurrenceAt": "string",
          "nextRecurrenceAt": "string",
          "currentCount": 0,
          "remainingCount": 0,
          "createdAt": "string",
          "updatedAt": "string"
        },
        "receiptAttachments": {}
      },
      "notes": "It was the best of times, it was the worst of times.",
      "createdAt": "2020-01-01T01:01:12.123+0000",
      "updatedAt": "2020-01-01T01:01:12.123+0000",
      "address": {
        "address1": "1234 Place Ave.",
        "address2": "Apt. B",
        "city": "New York City",
        "province": "New York",
        "postal": "10010",
        "country": "US"
      },
      "direct": true,
      "features": {
        "recurrence": true,
        "customAddress": true,
        "customMin": true,
        "customMax": true,
        "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
      },
      "activeUntil": "string",
      "minTransactionCents": 0,
      "maxTransactionCents": 0,
      "maxTransactionCount": 0,
      "tokenReferenceIds": "['tok_123', 'tok_abc']",
      "network": "MASTERCARD",
      "companyName": "ACME Co.",
      "creditCardDisplayName": "My Virtual Card"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Virtual Cards Response VirtualCardsResponse

Get Recipients From Credit Card

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/creditcards/{id}/recipients \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/creditcards/{id}/recipients',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/creditcards/{id}/recipients");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/creditcards/{id}/recipients', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/creditcards/{id}/recipients", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/creditcards/{id}/recipients',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /creditcards/{id}/recipients

Get all Recipients of all Virtual Cards that are issued by this Credit Card

Parameters

Name In Type Required Description
id path string true ID of the Credit Card
includeBudgets path boolean true Include Virtual Card recipients of Budgets

Example responses

200 Response

{
  "users": [
    {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Users Response UsersResponse

Update Credit Card Status

Example Request

# You can also use wget
curl -X PATCH https://api.paywithextend.com/creditcards/{id}/status \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/creditcards/{id}/status',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/creditcards/{id}/status");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.paywithextend.com/creditcards/{id}/status', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.paywithextend.com/creditcards/{id}/status", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.paywithextend.com/creditcards/{id}/status',
  params: {
  }, headers: headers

p JSON.parse(result)

PATCH /creditcards/{id}/status

Update Credit Card Status. This is used to trigger a refresh of the status of SOURCE Credit Cards if the Credit Card is not yet ACTIVE. Some Issuers do not notify us of a change in status so this allows us to check with them if the status has changed.

Parameters

Name In Type Required Description
id path string true ID of the Credit Card

Example responses

200 Response

{
  "creditCard": {
    "id": "string",
    "type": "SOURCE",
    "currency": "USD",
    "parentCreditCardId": "string",
    "parentCreditCardDisplayName": "ACME Co.",
    "userId": "string",
    "user": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "ownerId": "string",
    "owner": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    },
    "cardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "parentCreditCardImage": {
      "id": "im_1234",
      "contentType": "image/png",
      "urls": {
        "property1": "string",
        "property2": "string"
      },
      "textColorRGBA": "rgba(255,255,255,1)",
      "hasTextShadow": true,
      "shadowTextColorRGBA": "rgba(0,0,0,1)"
    },
    "displayName": "My Credit Card",
    "companyName": "ACME Co.",
    "expires": "2020-01-01T01:01:12.123+0000",
    "activeUntil": "2020-01-01T01:01:12.123+0000",
    "last4": "1234",
    "issuer": "AMEX",
    "issuerName": "American Express",
    "issuerId": "is_1234",
    "createdAt": "2020-01-01T01:01:12.123+0000",
    "updatedAt": "2020-01-01T01:01:12.123+0000",
    "status": "ACTIVE",
    "numberFormat": "cardnumber16",
    "features": {
      "budgets": true,
      "recurrence": true,
      "customAddress": true,
      "direct": true,
      "plasticCardsEnabled": true,
      "walletsEnabled": "['APPLEPAY', 'GOOGLEPAY']"
    },
    "issuingLimitCents": 1000000,
    "until": "2020-01-01T01:01:12.123+0000",
    "timezone": "America/New_York",
    "recurs": true,
    "recurrence": {
      "id": "string",
      "balanceCents": 0,
      "period": "DAILY",
      "interval": 0,
      "terminator": "NONE",
      "count": 0,
      "until": "string",
      "byWeekDay": 0,
      "byMonthDay": 0,
      "byYearDay": 0,
      "prevRecurrenceAt": "string",
      "nextRecurrenceAt": "string",
      "currentCount": 0,
      "remainingCount": 0,
      "createdAt": "string",
      "updatedAt": "string"
    },
    "issuedAmountCents": 400000,
    "activeVirtualCardCount": 42,
    "activeAccountCount": 56,
    "totalBalanceCents": 400000,
    "totalActiveSpentCents": 300000,
    "totalSpentCents": 300000,
    "activeIssuedAmountCents": 300000,
    "address": {
      "address1": "1234 Place Ave.",
      "address2": "Apt. B",
      "city": "New York City",
      "province": "New York",
      "postal": "10010",
      "country": "US"
    },
    "hasPlaidLink": true,
    "hasExpensifyLink": true,
    "policyInfoId": "string",
    "inactiveSince": "2020-01-01T01:01:12.123+0000",
    "issuerAccountCreditLimitCents": 5000,
    "issuerAccountBalanceCents": 6000,
    "issuerAvailableLimitCents": 1000,
    "issuerFieldsUpdatedAt": "2019-08-24T14:15:22Z",
    "readOnly": true
  }
}

Responses

Status Meaning Description Schema
200 OK Credit Card Response CreditCardResponse

Events

Get Event

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/events/{id} \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json'

};

fetch('https://api.paywithextend.com/events/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/events/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json'
}

r = requests.get('https://api.paywithextend.com/events/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/events/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json'
}

result = RestClient.get 'https://api.paywithextend.com/events/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /events/{id}

Get Event by ID

Parameters

Name In Type Required Description
id path string true Event ID

Example responses

200 Response

{
  "event": {
    "id": "string",
    "type": "FUNDING_SOURCE_ACTIVATED",
    "timestamp": "string",
    "data": {
      "property1": {},
      "property2": {}
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Event EventResponse

Event List

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/events \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json'

const inputBody = '{
  "count": 0,
  "page": 0,
  "sortField": "string",
  "sortDirection": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json'

};

fetch('https://api.paywithextend.com/events',
{
  method: 'GET',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/events");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json'
}

r = requests.get('https://api.paywithextend.com/events', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/events", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json'
}

result = RestClient.get 'https://api.paywithextend.com/events',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /events

Get all Events accessible to the authenticated user

Body parameter

{
  "count": 0,
  "page": 0,
  "sortField": "string",
  "sortDirection": "string"
}

Parameters

Name In Type Required Description
count query string false Limit of items per page
page query string false The page to start from
sortField query string false Field to sort by
sortDirection query string false Sort direction
body body PageableRequest false
» count body integer(int32) false
» page body integer(int32) false
» sortField body string false
» sortDirection body string false

Example responses

200 Response

{
  "pagination": {
    "page": 0,
    "pageItemCount": 0,
    "totalItems": 0,
    "numberOfPages": 0
  },
  "events": [
    {
      "id": "string",
      "type": "FUNDING_SOURCE_ACTIVATED",
      "timestamp": "string",
      "data": {
        "property1": {},
        "property2": {}
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Event List Response EventsResponse

Users

Create User

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/create \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json'

const inputBody = '{
  "email": "demo@paywithextend.com",
  "password": "JQT<QEXjO+UGnN@%5H_6HS>P",
  "firstName": "Jane",
  "lastName": "Doe",
  "phone": "15555555555",
  "locale": "en-US",
  "timezone": "America/New_York",
  "currency": "USD"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json'

};

fetch('https://api.paywithextend.com/create',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/create");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json'
}

r = requests.post('https://api.paywithextend.com/create', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/create", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json'
}

result = RestClient.post 'https://api.paywithextend.com/create',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /create

Create a new user account. The user will be required to verify their email address via the /verify endpoint.

Body parameter

{
  "email": "demo@paywithextend.com",
  "password": "JQT<QEXjO+UGnN@%5H_6HS>P",
  "firstName": "Jane",
  "lastName": "Doe",
  "phone": "15555555555",
  "locale": "en-US",
  "timezone": "America/New_York",
  "currency": "USD"
}

Parameters

Name In Type Required Description
body body CreateUserRequest true Create User Request
» email body string true Email Address
» password body string true Password
» firstName body string true First Name
» lastName body string true Last Name
» phone body string true Phone Number
» locale body string false Default Locale Preference
» timezone body string false Default Time Zone Preference
» currency body string false Default Currency Preference

Example responses

200 Response

{
  "user": {
    "id": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phone": "string",
    "phoneIsoCountry": "string",
    "avatarType": "LINKEDIN",
    "avatarUrl": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "currency": "USD",
    "locale": "string",
    "timezone": "string",
    "hasExpensifyLink": true,
    "employeeId": "string"
  },
  "token": "abc123DEF456ghi789JKL012"
}

Responses

Status Meaning Description Schema
200 OK Login / Signup Response LoginSignUpResponse

Set User Avatar

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/useravatars \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "avatarType": "UPLOAD",
  "file": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/useravatars',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/useravatars");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.paywithextend.com/useravatars', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"multipart/form-data"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/useravatars", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'multipart/form-data',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.paywithextend.com/useravatars',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /useravatars

Add an image to the currently authenticated user's account to be used as their avatar. This endpoint only supports Multipart form uploads. If an avatar already exists, the previous one is replaced.

Body parameter

avatarType: UPLOAD
file: string

Parameters

Name In Type Required Description
body body UserAvatarRequest false
» avatarType body string true Type of avatar. LINKEDIN and UPLOAD require that you send a file as part of the multipart request. GRAVATAR does not require a file to be sent and will set the user's avatar based on the Gravatar associated with their email address (if one exists). DEFAULT does not require a file to be sent and will remove any existing avatar.
» file body string(binary) false Image file

Enumerated Values

Parameter Value
» avatarType LINKEDIN
» avatarType UPLOAD
» avatarType GRAVATAR
» avatarType DEFAULT

Example responses

200 Response

{
  "user": {
    "id": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phone": "string",
    "phoneIsoCountry": "string",
    "avatarType": "LINKEDIN",
    "avatarUrl": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "currency": "USD",
    "locale": "string",
    "timezone": "string",
    "hasExpensifyLink": true,
    "employeeId": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK User UserResponse

Update User

Example Request

# You can also use wget
curl -X PATCH https://api.paywithextend.com/users \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "firstName": "Jane",
  "lastName": "Doe",
  "phone": "15555555555",
  "locale": "en-US",
  "timezone": "America/New_York",
  "currency": "USD",
  "employeeId": "12345"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/users',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/users");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.paywithextend.com/users', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.paywithextend.com/users", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.paywithextend.com/users',
  params: {
  }, headers: headers

p JSON.parse(result)

PATCH /users

Update User

Body parameter

{
  "firstName": "Jane",
  "lastName": "Doe",
  "phone": "15555555555",
  "locale": "en-US",
  "timezone": "America/New_York",
  "currency": "USD",
  "employeeId": "12345"
}

Parameters

Name In Type Required Description
body body UpdateUserRequest true Update User Request
» firstName body string false First Name
» lastName body string false Last Name
» phone body string false Phone Number
» locale body string false Default Locale Preference
» timezone body string false Default Time Zone Preference
» currency body string false Default Currency Preference
» employeeId body string false Employee Id

Example responses

200 Response

{
  "id": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "phone": "string",
  "phoneIsoCountry": "string",
  "avatarType": "LINKEDIN",
  "avatarUrl": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "currency": "USD",
  "locale": "string",
  "timezone": "string",
  "hasExpensifyLink": true,
  "employeeId": "string"
}

Responses

Status Meaning Description Schema
200 OK User User

Get all users who have received a virtual card directly or indirectly from the requester

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/users/recipients \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/users/recipients',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/users/recipients");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/users/recipients', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/users/recipients", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/users/recipients',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /users/recipients

Get all users who have received a virtual card directly or indirectly from the currently authenticated user.

Example responses

200 Response

{
  "users": [
    {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "phoneIsoCountry": "string",
      "avatarType": "LINKEDIN",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "currency": "USD",
      "locale": "string",
      "timezone": "string",
      "hasExpensifyLink": true,
      "employeeId": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Users Response UsersResponse

Resend Email Verification Code

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/users/resendverification \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json'

const inputBody = '{
  "email": "demo@paywithextend.com"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json'

};

fetch('https://api.paywithextend.com/users/resendverification',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/users/resendverification");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json'
}

r = requests.post('https://api.paywithextend.com/users/resendverification', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/users/resendverification", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json'
}

result = RestClient.post 'https://api.paywithextend.com/users/resendverification',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /users/resendverification

If the verification code is no longer valid, it is possible to resend the verification email with a new code. This endpoint will trigger a new email to be sent.

Body parameter

{
  "email": "demo@paywithextend.com"
}

Parameters

Name In Type Required Description
body body ResendEmailVerificationRequest true Resend Email Verification Request
» email body string true Email Address

Example responses

200 Response

{
  "msg": "ok"
}

Responses

Status Meaning Description Schema
200 OK Resend Email Verification Code Response SimpleResponse

Verify Email

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/users/verify \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json'

const inputBody = '{
  "email": "demo@paywithextend.com",
  "code": "123456"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json'

};

fetch('https://api.paywithextend.com/users/verify',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/users/verify");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json'
}

r = requests.post('https://api.paywithextend.com/users/verify', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/users/verify", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json'
}

result = RestClient.post 'https://api.paywithextend.com/users/verify',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /users/verify

After creating a new account, the user must verify ownership of the email address used to create the account. An email will be sent to the email address containing a 6 digit numeric code which must be sent to this endpoint.

Body parameter

{
  "email": "demo@paywithextend.com",
  "code": "123456"
}

Parameters

Name In Type Required Description
body body VerifyEmailRequest true Verify Email Request
» email body string true Email Address
» code body string true Verification Code

Example responses

200 Response

{
  "msg": "ok"
}

Responses

Status Meaning Description Schema
200 OK Verify Email Response SimpleResponse

Delete User

Example Request

# You can also use wget
curl -X DELETE https://api.paywithextend.com/users/me \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json'

};

fetch('https://api.paywithextend.com/users/me',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/users/me");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json'
}

r = requests.delete('https://api.paywithextend.com/users/me', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.paywithextend.com/users/me", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json'
}

result = RestClient.delete 'https://api.paywithextend.com/users/me',
  params: {
  }, headers: headers

p JSON.parse(result)

DELETE /users/me

Delete the currently authenticated user

Example responses

200 Response

{
  "users": {
    "deleted": [
      "string"
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Delete User Response DeleteUserResponse

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/users/expensify \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json'

const inputBody = '{
  "creditCardId": "string",
  "userEmail": "test@organization.com",
  "partnerUserId": "test_partner_id",
  "partnerUserSecret": "abcdefg123456789"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json'

};

fetch('https://api.paywithextend.com/users/expensify',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/users/expensify");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json'
}

r = requests.post('https://api.paywithextend.com/users/expensify', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/users/expensify", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json'
}

result = RestClient.post 'https://api.paywithextend.com/users/expensify',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /users/expensify

Body parameter

{
  "creditCardId": "string",
  "userEmail": "test@organization.com",
  "partnerUserId": "test_partner_id",
  "partnerUserSecret": "abcdefg123456789"
}
Name In Type Required Description
body body CreateExpensifyLinkRequest true Create Expensify Link Request
» creditCardId body string false
» userEmail body string true User's Expensify Email
» partnerUserId body string true User's Expensify Partner ID
» partnerUserSecret body string true User's Expensify Partner Secret

Example responses

200 Response

{
  "id": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "phone": "string",
  "phoneIsoCountry": "string",
  "avatarType": "LINKEDIN",
  "avatarUrl": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "currency": "USD",
  "locale": "string",
  "timezone": "string",
  "hasExpensifyLink": true,
  "employeeId": "string"
}
Status Meaning Description Schema
200 OK User User

Example Request

# You can also use wget
curl -X DELETE https://api.paywithextend.com/users/expensify \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json'

};

fetch('https://api.paywithextend.com/users/expensify',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/users/expensify");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json'
}

r = requests.delete('https://api.paywithextend.com/users/expensify', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.paywithextend.com/users/expensify", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json'
}

result = RestClient.delete 'https://api.paywithextend.com/users/expensify',
  params: {
  }, headers: headers

p JSON.parse(result)

DELETE /users/expensify

Example responses

200 Response

{
  "id": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "phone": "string",
  "phoneIsoCountry": "string",
  "avatarType": "LINKEDIN",
  "avatarUrl": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "currency": "USD",
  "locale": "string",
  "timezone": "string",
  "hasExpensifyLink": true,
  "employeeId": "string"
}
Status Meaning Description Schema
200 OK User User

Get User

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/users/{id} \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/users/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/users/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/users/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/users/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/users/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /users/{id}

Get User by ID. Optionally, pass "me" as the ID to get information about the currently authenticated user.

Parameters

Name In Type Required Description
id path string true ID of the User to be obtained or "me"

Example responses

200 Response

{
  "id": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "phone": "string",
  "phoneIsoCountry": "string",
  "avatarType": "LINKEDIN",
  "avatarUrl": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "currency": "USD",
  "locale": "string",
  "timezone": "string",
  "hasExpensifyLink": true,
  "employeeId": "string"
}

Responses

Status Meaning Description Schema
200 OK User User

Metrics

Get Spend Metrics

Example Request

# You can also use wget
curl -X POST https://api.paywithextend.com/metrics/spend \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "aggregate": "SUM",
  "period": "QUARTER",
  "since": "2020-01-01T01:01:12.123+0000",
  "until": "2020-01-04T01:01:12.123+0000",
  "creditCardId": [
    "cc_1234"
  ],
  "virtualCardId": [
    "vc_1234"
  ],
  "status": [
    "CLEARED"
  ],
  "source": [
    "VIRTUAL"
  ],
  "recipientId": [
    "u_1234"
  ],
  "mccGroup": [
    "AIRLINE"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/metrics/spend',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/metrics/spend");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.paywithextend.com/metrics/spend', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.paywithextend.com/metrics/spend", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.paywithextend.com/metrics/spend',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /metrics/spend

Retrieve Metrics on Spend for a wide-range of filters including date range, Credit Cards, Recipients, Transaction Status, and Merchant Category Groups. If no date range is specified, the first and last date sets in the response will correspond to the first and last recorded Transactions

Body parameter

{
  "aggregate": "SUM",
  "period": "QUARTER",
  "since": "2020-01-01T01:01:12.123+0000",
  "until": "2020-01-04T01:01:12.123+0000",
  "creditCardId": [
    "cc_1234"
  ],
  "virtualCardId": [
    "vc_1234"
  ],
  "status": [
    "CLEARED"
  ],
  "source": [
    "VIRTUAL"
  ],
  "recipientId": [
    "u_1234"
  ],
  "mccGroup": [
    "AIRLINE"
  ]
}

Parameters

Name In Type Required Description
body body SpendMetricsRequest true Spend Metrics Request
» aggregate body string true Metric Aggregate
» period body string true Metric Period
» since body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Since Date
» until body string(yyyy-MM-ddTHH:mm:ss.SSSz) false Until Date
» creditCardId body [string] false List of Credit Card IDs
» virtualCardId body [string] false List of Virtual Card IDs
» status body [string] true List of Transaction Statuses
» source body [string] true List of Transaction Sources
» recipientId body [string] false List of Recipient User IDs
» mccGroup body [string] true List of Merchant Category Groups

Enumerated Values

Parameter Value
» aggregate AVERAGE
» aggregate COUNT
» aggregate SUM
» period DAY
» period WEEK
» period MONTH
» period QUARTER
» period YEAR
» status PENDING
» status CLEARED
» status DECLINED
» status NO_MATCH
» status AVS_PASS
» status AVS_FAIL
» source PHYSICAL
» source VIRTUAL
» source OTHER
» mccGroup AIRLINE
» mccGroup ENTERTAINMENT
» mccGroup ASSOCIATIONS
» mccGroup AUTOMOBILES
» mccGroup BUSINESS
» mccGroup CAR_RENTAL
» mccGroup EDUCATION
» mccGroup FINANCIAL
» mccGroup GAS
» mccGroup GOVERNMENT
» mccGroup LODGING
» mccGroup MAIL_PHONE_ORDER
» mccGroup PERSONAL
» mccGroup PROFESSIONAL
» mccGroup REPAIR
» mccGroup RESTAURANTS
» mccGroup RETAIL
» mccGroup TELECOM
» mccGroup TRANSPORTATION
» mccGroup UTILITIES
» mccGroup WHOLESALE
» mccGroup OTHER

Example responses

200 Response

{
  "metric": "spend",
  "aggregate": "SUM",
  "period": "QUARTER",
  "type": "CURRENCY",
  "dataSets": [
    1568592000000,
    1568692000000,
    1568792000000
  ],
  "series": [
    {
      "name": "all",
      "data": [
        10000000,
        900000,
        6452000
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Spend Metrics Response SpendMetricsResponse

Organizations

Get Organization

Example Request

# You can also use wget
curl -X GET https://api.paywithextend.com/organizations/{id} \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/organizations/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/organizations/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.paywithextend.com/organizations/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.paywithextend.com/organizations/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.paywithextend.com/organizations/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /organizations/{id}

Get the Organization if the authenticated user can view it

Parameters

Name In Type Required Description
id path string true ID of the Organization

Example responses

200 Response

{
  "organization": {
    "id": "string",
    "name": "Acme Inc",
    "industry": "Manufacturing",
    "useCase": "string",
    "owner": "u_12345abcefg"
  }
}

Responses

Status Meaning Description Schema
200 OK Organization Response OrganizationResponse

Update Organization

Example Request

# You can also use wget
curl -X PUT https://api.paywithextend.com/organizations/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "name": "string",
  "industry": "string",
  "useCase": "string",
  "ownerId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/organizations/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/organizations/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.paywithextend.com/organizations/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.paywithextend.v2020-07-08+json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api.paywithextend.com/organizations/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api.paywithextend.com/organizations/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /organizations/{id}

Modify an existing Organization.

Body parameter

{
  "name": "string",
  "industry": "string",
  "useCase": "string",
  "ownerId": "string"
}

Parameters

Name In Type Required Description
id path string true ID of the Organization
body body UpdateOrganizationRequest true Update Organization Request
» name body string true
» industry body string false
» useCase body string false
» ownerId body string false

Example responses

200 Response

{
  "organization": {
    "id": "string",
    "name": "Acme Inc",
    "industry": "Manufacturing",
    "useCase": "string",
    "owner": "u_12345abcefg"
  }
}

Responses

Status Meaning Description Schema
200 OK Organization Response OrganizationResponse

Delete Organization

Example Request

# You can also use wget
curl -X DELETE https://api.paywithextend.com/organizations/{id} \
  -H 'Accept: application/vnd.paywithextend.v2020-07-08+json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.paywithextend.com/organizations/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.paywithextend.com/organizations/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

import requests
headers = {
  'Accept': 'application/vnd.paywithextend.v2020-07-08+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.paywithextend.com/organizations/{id}', headers = headers)

print(r.json())