---
updatedAt: 2026-05-30T23:19:06.000Z
agentTools:
  projectIndex: https://docs.bamboopayment.com/llms.txt
---

# Create a Purchase

Create a purchase by submitting raw card data through the secure endpoint. Exclusively for PCI-certified merchants.

This page describes how to create a purchase when the merchant **collects and submits raw card data** directly to Bamboo. This flow is exclusively for **PCI-certified merchants** who manage cardholder data within their own infrastructure. It is the equivalent of the standard [Create a Purchase](/reference/api-purchase#/) endpoint, but it accepts the `CardData` object instead of a token.

<br />

<Callout icon="⚠️" theme="warn">
  **This endpoint must only be used by PCI-certified merchants.** If your business is not PCI-certified, use the standard [Create a Purchase](/reference/api-purchase#/) endpoint with tokenization instead.
</Callout>

<br />

<Callout icon="📘" theme="info">
  Review the [Create a Purchase Integration Guide](/docs/create-purchase#/) for flow descriptions, validation rules, capture modes, and card scheme considerations.
</Callout>

## Endpoint

This endpoint processes a purchase using the **CardData** object.

**Staging**\
`https://secure-api.stage.bamboopayment.com/v3/api/Purchase`

**Production**\
`https://secure-api.bamboopayment.com/v3/api/Purchase`

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Direct Purchase",
    "version": "3"
  },
  "paths": {
    "/v3/api/purchase": {
      "post": {
        "tags": [
          "PurchaseV"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "examples": {
                  "OK": {
                    "summary": "OK",
                    "value": {
                      "TransactionId": "79632697147789184",
                      "Result": "COMPLETED",
                      "Status": "APPROVED",
                      "ErrorCode": null,
                      "ErrorDescription": null,
                      "Created": "2024-08-07T17:51:54.620",
                      "AuthorizationDate": "2024-08-07T17:51:56.879",
                      "AuthorizationCode": "839936",
                      "Amount": 25000,
                      "Currency": "BRL",
                      "Installments": 1,
                      "TaxableAmount": null,
                      "Tip": null,
                      "Url": "https://api.stage.bamboopayment.com/Purchase/79632697147789184",
                      "MetadataOut": null,
                      "Action": null,
                      "PaymentMethod": {
                        "Brand": "Visa",
                        "CardOwner": "Joao Silva",
                        "Bin": "450799",
                        "IssuerBank": "Santander",
                        "Type": "CreditCard",
                        "Expiration": "203008",
                        "Last4": "4905"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ],
        "operationId": "directPurchase"
      }
    }
  },
  "components": {
    "schemas": {
      "AddressData": {
        "type": "object",
        "properties": {
          "Country": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "State": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "AddressDetail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CardDataWeb": {
        "type": "object",
        "properties": {
          "CardHolderName": {
            "type": "string",
            "nullable": true
          },
          "Pan": {
            "type": "string",
            "nullable": true
          },
          "CVV": {
            "type": "string",
            "nullable": true
          },
          "Expiration": {
            "type": "string",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "nullable": true
          },
          "Document": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CardOnFile": {
        "type": "object",
        "properties": {
          "TransactionType": {
            "type": "string",
            "nullable": true
          },
          "NetworkTransactionId": {
            "type": "string",
            "nullable": true
          },
          "Usage": {
            "type": "string",
            "nullable": true
          },
          "Reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CommerceKeyDomain": {
        "type": "object",
        "properties": {
          "Key": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CustomerData": {
        "type": "object",
        "properties": {
          "FirstName": {
            "type": "string",
            "nullable": true
          },
          "LastName": {
            "type": "string",
            "nullable": true
          },
          "ReferenceCode": {
            "type": "string",
            "nullable": true
          },
          "DocumentNumber": {
            "type": "string",
            "nullable": true
          },
          "DocumentType": {
            "type": "string",
            "nullable": true
          },
          "PhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "nullable": true
          },
          "Gender": {
            "type": "string",
            "nullable": true
          },
          "BirthDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "BirthPlace": {
            "type": "string",
            "nullable": true
          },
          "Address": {
            "$ref": "#/components/schemas/AddressData"
          }
        },
        "additionalProperties": false
      },
      "FraudPreventData": {
        "type": "object",
        "properties": {
          "AntifraudFingerprintId": {
            "type": "string",
            "nullable": true
          },
          "AntifraudMetadataIn": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "UserAgent": {
            "type": "string",
            "nullable": true
          },
          "ClientIP": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MerchantNotificationData": {
        "type": "object",
        "properties": {
          "url_Webhook": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NetworkTokenData": {
        "type": "object",
        "properties": {
          "Token": {
            "type": "string",
            "nullable": true
          },
          "Cryptogram": {
            "type": "string",
            "nullable": true
          },
          "Expiration_Month": {
            "type": "integer",
            "format": "int32"
          },
          "Expiration_Year": {
            "type": "integer",
            "format": "int32"
          },
          "CardHolderName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ThreeDSAuthMethod": {
        "enum": [
          "DISABLE",
          "EXTERNAL",
          "INTERNAL"
        ],
        "type": "string"
      },
      "ThreeDSData": {
        "type": "object",
        "properties": {
          "Eci": {
            "type": "string",
            "nullable": true
          },
          "Xid": {
            "type": "string",
            "nullable": true
          },
          "Cavv": {
            "type": "string",
            "nullable": true
          },
          "Version": {
            "type": "string",
            "nullable": true
          },
          "TransactionId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TransactionCommand": {
        "type": "object",
        "properties": {
          "TrxToken": {
            "type": "string",
            "nullable": true
          },
          "PaymentMethod": {
            "type": "string",
            "nullable": true
          },
          "Order": {
            "type": "string",
            "nullable": true
          },
          "InvoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "UniqueID": {
            "type": "string",
            "nullable": true
          },
          "AdditionalData": {
            "type": "string",
            "nullable": true
          },
          "HasCvv": {
            "type": "boolean"
          },
          "Installments": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "Amount": {
            "type": "integer",
            "format": "int64"
          },
          "Capture": {
            "type": "boolean"
          },
          "TaxableAmount": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "Tip": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "Currency": {
            "type": "string",
            "nullable": true
          },
          "TargetCountryISO": {
            "type": "string",
            "nullable": true
          },
          "SoftDescriptor": {
            "type": "string",
            "nullable": true
          },
          "MetadataIn": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "Redirection": {
            "$ref": "#/components/schemas/UrlsRedirectionTransaction"
          },
          "AntifraudData": {
            "$ref": "#/components/schemas/FraudPreventData"
          },
          "MerchantNotification": {
            "$ref": "#/components/schemas/MerchantNotificationData"
          },
          "Customer": {
            "$ref": "#/components/schemas/CustomerData"
          },
          "ThreeDSAuthMethod": {
            "$ref": "#/components/schemas/ThreeDSAuthMethod"
          },
          "ThreeDS": {
            "$ref": "#/components/schemas/ThreeDSData"
          },
          "NetworkToken": {
            "$ref": "#/components/schemas/NetworkTokenData"
          },
          "CardOnFile": {
            "$ref": "#/components/schemas/CardOnFile"
          },
          "CardData": {
            "$ref": "#/components/schemas/CardDataWeb"
          },
          "CommerceKey": {
            "$ref": "#/components/schemas/CommerceKeyDomain"
          },
          "Language": {
            "type": "string",
            "nullable": true
          },
          "CustomerIP": {
            "type": "string",
            "nullable": true
          },
          "QuoteId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UrlsRedirectionTransaction": {
        "type": "object",
        "properties": {
          "Url_Approved": {
            "type": "string",
            "nullable": true
          },
          "Url_Rejected": {
            "type": "string",
            "nullable": true
          },
          "Url_Canceled": {
            "type": "string",
            "nullable": true
          },
          "Url_Pending": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Authorization": {
        "type": "apiKey",
        "description": "Commerce account Private Key",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "servers": [
    {
      "url": "https://secure-api.stage.bamboopayment.com"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```