Skip to content

API for Virtual Card Purchases

This documentation describes the APIs required to manage purchases made with virtual cards.


List Purchases

[GET] /issuing-purchase

Lists all purchases made with virtual cards.

Query params

Field name Data type Required Description
cursor string No String used to get the next batch of results.
limit int No Maximum number of objects to be retrieved. Max = 100.
after date No Date filter for objects created after a specific date. Example: "2022-01-20".
before date No Date filter for objects created before a specific date. Example: "2022-02-20".
ids array No List of strings to filter purchases by their IDs.
status array No List of strings to filter purchases by status. Options: "approved", "canceled", "confirmed", "denied", "voided".
endToEndIds array No List of strings to filter purchases by their endToEndIds.
holderIds array No List of strings to filter purchases by cardholder IDs.
cardIds array No List of strings to filter purchases by card IDs.

Request Example

curl --request GET \
  --url "/issuing-purchase?limit=10" \
  --header 'Authorization: Bearer {token}'

Responses

200 - Success
[
  {
    "acquirer_id": 801683,
    "amount": 2000,
    "installment_count": 1,
    "card_ending": "7418",
    "card_id": "5632332274860032",
    "created": "2022-05-19T18:22:52.620500",
    "end_to_end_id": "23bf8460-73f6-4ed6-a3e2-6cc22f4796bc",
    "holder_name": "Tony Praag",
    "id": "4690712905908224",
    "issuer_amount": 2000,
    "issuer_currency_code": "BRL",
    "issuer_currency_symbol": "R$",
    "issuing_transaction_ids": ["5816612812750848"],
    "merchant_amount": 2000,
    "merchant_category_code": "fastFoodRestaurants",
    "merchant_country_code": "BRA",
    "merchant_currency_code": "BRL",
    "merchant_currency_symbol": "R$",
    "merchant_fee": 0,
    "merchant_id": "219271734140274",
    "merchant_name": "Google Cloud Platform",
    "method_code": "token",
    "score": null,
    "status": "confirmed",
    "tags": ["ticket"],
    "tax": 0,
    "updated": "2022-05-19T19:00:46.259552",
    "wallet_id": null,
    "zip_code": "02101234"
  }
]

Get Purchase by ID

[GET] /issuing-purchase/:id

Returns the details of a specific purchase.

Request Example

curl --request GET \
  --url "/issuing-purchase/purchase_12345" \
  --header 'Authorization: Bearer {token}'

Responses

200 - Success
{
  "acquirer_id": 801683,
  "amount": 2000,
  "installment_count": 1,
  "card_ending": "7418",
  "card_id": "5632332274860032",
  "created": "2022-05-19T18:22:52.620500",
  "end_to_end_id": "23bf8460-73f6-4ed6-a3e2-6cc22f4796bc",
  "holder_name": "Tony Praag",
  "id": "4690712905908224",
  "issuer_amount": 2000,
  "issuer_currency_code": "BRL",
  "issuer_currency_symbol": "R$",
  "issuing_transaction_ids": ["5816612812750848"],
  "merchant_amount": 2000,
  "merchant_category_code": "fastFoodRestaurants",
  "merchant_country_code": "BRA",
  "merchant_currency_code": "BRL",
  "merchant_currency_symbol": "R$",
  "merchant_fee": 0,
  "merchant_id": "219271734140274",
  "merchant_name": "Google Cloud Platform",
  "method_code": "token",
  "score": null,
  "status": "confirmed",
  "tags": ["ticket"],
  "tax": 0,
  "updated": "2022-05-19T19:00:46.259552",
  "wallet_id": null,
  "zip_code": "02101234"
}

List Purchase Logs

[GET] /issuing-purchase/log

Lists logs of operations performed on purchases.

Query params

Field name Data type Required Description
cursor string No String used to get the next batch of results.
limit int No Maximum number of objects to be retrieved. Max = 100.
after date No Date filter for objects created after a specific date. Example: "2022-01-20".
before date No Date filter for objects created before a specific date. Example: "2022-02-20".
types array No List of strings to filter logs by type. Options: "approved", "canceled", "confirmed", "denied", "reversed", "voided".
purchaseIds array No List of strings to filter logs by purchase IDs.

Request Example

curl --request GET \
  --url "/issuing-purchase/log?limit=10" \
  --header 'Authorization: Bearer {token}'

Responses

200 - Success
[
  {
    "created": "2022-05-19T18:22:52.764806",
    "errors": [],
    "id": "6379562766172160",
    "installment": 1,
    "issuing_transaction_id": "5816612812750848",
    "purchase": {
      "acquirer_id": 801683,
      "amount": 2000,
      "installment_count": 1,
      "card_ending": "7418",
      "card_id": "5632332274860032",
      "created": "2022-05-19T18:22:52.620500",
      "end_to_end_id": "23bf8460-73f6-4ed6-a3e2-6cc22f4796bc",
      "holder_name": "Tony Praag",
      "id": "4690712905908224",
      "issuer_amount": 2000,
      "issuer_currency_code": "BRL",
      "issuer_currency_symbol": "R$",
      "issuing_transaction_ids": ["5816612812750848"],
      "merchant_amount": 2000,
      "merchant_category_code": "fastFoodRestaurants",
      "merchant_country_code": "BRA",
      "merchant_currency_code": "BRL",
      "merchant_currency_symbol": "R$",
      "merchant_fee": 0,
      "merchant_id": "219271734140274",
      "merchant_name": "Google Cloud Platform",
      "method_code": "token",
      "score": null,
      "status": "approved",
      "tags": [],
      "tax": 0,
      "updated": "2022-05-19T18:22:53.553381",
      "wallet_id": null,
      "zip_code": "02101234"
    },
    "type": "approved"
  }
]

Get Purchase Log by ID

[GET] /issuing-purchase/log/:id

Returns the details of a specific log related to a purchase.

Request Example

curl --request GET \
  --url "/issuing-purchase/log/log_12345" \
  --header 'Authorization: Bearer {token}'

Responses

200 - Success
{
  "created": "2022-05-19T18:22:52.764806",
  "errors": [],
  "id": "6379562766172160",
  "installment": 1,
  "issuing_transaction_id": "5816612812750848",
  "purchase": {
    "acquirer_id": 801683,
    "amount": 2000,
    "installment_count": 1,
    "card_ending": "7418",
    "card_id": "5632332274860032",
    "created": "2022-05-19T18:22:52.620500",
    "end_to_end_id": "23bf8460-73f6-4ed6-a3e2-6cc22f4796bc",
    "holder_name": "Tony Praag",
    "id": "4690712905908224",
    "issuer_amount": 2000,
    "issuer_currency_code": "BRL",
    "issuer_currency_symbol": "R$",
    "issuing_transaction_ids": ["5816612812750848"],
    "merchant_amount": 2000,
    "merchant_category_code": "fastFoodRestaurants",
    "merchant_country_code": "BRA",
    "merchant_currency_code": "BRL",
    "merchant_currency_symbol": "R$",
    "merchant_fee": 0,
    "merchant_id": "219271734140274",
    "merchant_name": "Google Cloud Platform",
    "method_code": "token",
    "score": null,
    "status": "approved",
    "tags": [],
    "tax": 0,
    "updated": "2022-05-19T18:22:53.553381",
    "wallet_id": null,
    "zip_code": "02101234"
  },
  "type": "approved"
}

Notes

  • Replace {token} with the provided authentication token.