Copper Conduit API Reference

 

 

Base URL

 

development: https://api.usecopper.com/next

production: https://api.usecopper.com/v1

 

 

Introduction

 

The Copper API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

 

 

Authentication

 

The Copper API uses API keys to authenticate requests.

 

Test mode secret keys have the prefix sk_test_ and live mode secret keys have the prefix sk_live_.

 

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

 

Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.

 

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

 

 

Connected Accounts

 

Clients can make requests as connected accounts using the special header Copper-Account which should contain a Copper account ID.

 

 

Errors

 

Copper uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a transaction failed, etc.). Codes in the 5xx range indicate an error with Coppers’s servers (these are rare).

 

Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.

 

Attributes

 

type: string

 

The type of error returned.

 

code: string

 

For some errors that could be handled programmatically, a short string indicating the error code reported.

 

message: string

A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.

 

param: string

If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.

 

 

Pagination

 

All top-level API resources have support for bulk fetches via "list" API methods. For instance, you can list tickets, list transactions, and list devices. These list API methods share a common structure, taking at least these three parameters: limit, starting_after, and ending_before.

 

Copper utilizes cursor-based pagination via the starting_after and ending_before parameters. Both parameters take an existing object ID value (see below) and return objects in reverse chronological order. The ending_before parameter returns objects listed before the named object. The starting_after parameter returns objects listed after the named object. These parameters are mutually exclusive -- only one of starting_after orending_before may be used.

 

Parameters

 

limit

optional, default is 10

 

A limit on the number of objects to be returned, between 1 and 100.

 

starting_after

optional

 

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

 

ending_before

optional

 

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

 

List Response Format

 

object: string

value is "list"

 

A string describing the object type returned.

 

data: array

An array containing the actual response elements, paginated by any request parameters.

 

has_more: boolean

 

Whether or not there are more elements available after this set. If false, this set comprises the end of the list.

 

 

Accounts

 

The Account object

 

id: string

 

Unique identifier for the object.

 

address: hash

 

The full address of the account.

 

address.city: string

 

City, district, suburb, town, or village.

 

address.country: string

 

Two-letter country code (ISO 3166-1 alpha-2).

 

address.line1: string

 

Address line 1 (e.g., street, PO Box, or company name).

 

address.line2: string

Address line 2 (e.g., apartment, suite, unit, or building).

 

address.postal_code: string

ZIP or postal code.

 

address.state: string

State, county, province, or region.

 

name: string

 

The name of the account.

 

type: string

 

The Copper account type. Can be admin, reseller, developer or merchant.

 

email: string

 

The primary user’s email address.

 

phone: string

 

The accounts phone number.

 

website: string

 

The accounts website.

 

metadata: hash

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

 

object: string

value is “account”

 

String representing the object’s type. Objects of the same type share the same value.

 

Create an Account

 

POST /accounts

 

Creates a new Account object.

 

curl https://api.usecopper.com/next/accounts \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -d “address[city]”=Reno \

    -d “address[country]”=US \

    -d “address[line1]”=”10753 Harbottle Drive” \

    -d “address[postal_code]”=89511 \

    -d “address[state]”=NV \

    -d name=”Copper Inc.” \

    -d email=”info@usecopper.com” \

    -d phone=”+1 (415) 793-8793” 

 

 

Parameters

 

address (REQUIRED)

 

The full address of the account.

 

name (REQUIRED)

 

email: optional

phone: optional

website: optional

 

metadata: optional dictionary

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

 

Returns

 

Returns an Account object if creation succeeds.

 

Retrieve an Account

 

GET /accounts/{identifier}

 

Retrieves an Account object.

 

curl https://api.usecopper.com/next/accounts/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX:

 

 

Returns

 

Returns an Account object if a valid identifier was provided.

 

Update an Account

 

POST /accounts/{identifier}

 

Updates an Account object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

 

curl https://api.usecopper.com/next/accounts/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX:  \

    -d website=”https://usecopper.com”

 

 

Parameters

 

address: optional dictionary

 

The full address of the account.

 

name: optional

A name for the account.

 

email: optional

 

The primary user’s email address.

 

phone: optional

 

The accounts phone number.

 

website: optional

 

The accounts website.

 

metadata: optional dictionary

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

Returns

 

Returns an updated Account object if a valid identifier was provided.

 

Delete an Account

 

DELETE /account/{identifier}

 

Deletes an Account object.

 

curl https://api.usecopper.com/next/accounts/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -X DELETE

 

 

Returns

 

Returns the Account object that was deleted.

 

List all Accounts

 

GET /accounts

 

Returns a list of Account objects.

 

curl https://api.usecopper.com/next/accounts \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -d limit=3 \

    -G

 

 

Parameters

 

ending_before: optional

limit: optional

starting_after: optional

 

Returns

 

A dictionary with a data property that contains an array of up to limit accounts, starting after account starting_after. Each entry in the array is a separate account object. If no more accounts are available, the resulting array will be empty.

 

 

Locations

 

The Location object

 

id: string

 

Unique identifier for the object.

 

address: hash

 

The full address of the location.

 

address.city: string

 

City, district, suburb, town, or village.

 

address.country: string

 

Two-letter country code (ISO 3166-1 alpha-2).

 

address.line1: string

 

Address line 1 (e.g., street, PO Box, or company name).

 

address.line2: string

Address line 2 (e.g., apartment, suite, unit, or building).

 

address.postal_code: string

ZIP or postal code.

 

address.state: string

State, county, province, or region.

 

display_name: string

 

The display name of the location.

 

phone: string

 

The locations phone number.

 

website: string

 

The locations website.

 

metadata: hash

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

object: string

value is "location"

 

String representing the object’s type. Objects of the same type share the same value.

 

Create a Location

 

POST /locations

 

Creates a new Location object.

 

curl https://api.usecopper.com/next/locations \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -d “address[city]”=Reno \

    -d “address[country]”=US \

    -d “address[line1]”=”1851 Steamboat Pkwy” \

    -d “address[line2]”=”6002” \

    -d “address[postal_code]”=89521 \

    -d “address[state]”=NV \

    -d display_name=”Copper Damonte Ranch” \

    -d phone=”+1 (415) 395-6398”

 

 

Parameters

 

address (REQUIRED)

 

The full address of the location.

 

display_name (REQUIRED)

 

phone: optional

website: optional

metadata: optional dictionary

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

Returns

 

Returns a Location object if creation succeeds.

 

Retrieve a Location

 

GET /locations/{identifier}

 

Retrieves a Location object.

 

curl https://api.usecopper.com/next/locations/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX:

 

 

Returns

 

Returns a Location object if a valid identifier was provided.

 

Update a Location

 

POST /locations/{identifier}

 

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

 

curl https://api.usecopper.com/next/locations/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX:  \

    -d website=”https://usecopper.com”

 

 

Parameters

 

address: optional dictionary

 

The full address of the location.

 

phone: string

 

The locations phone number.

 

 

website: string

 

The locations website.

 

display_name: optional

 

A name for the location.

 

metadata: optional dictionary

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

 

Returns

 

Returns an updated Location object if a valid identifier was provided.

 

Delete a Location

 

DELETE /locations/{identifier}

 

Deletes a Location object.

 

curl https://api.usecopper.com/next/locations/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -X DELETE

 

 

Returns

 

Returns the Location object that was deleted.

 

List all Locations

 

GET /locations

 

Returns a list of Location objects.

 

curl https://api.usecopper.com/next/locations \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -d limit=3 \

    -G

 

 

Parameters

 

ending_before: optional

limit: optional

starting_after: optional

 

Returns

 

A dictionary with a data property that contains an array of up to limit locations, starting after location starting_after. Each entry in the array is a separate location object. If no more locations are available, the resulting array will be empty.

 

 

Devices

 

A device represents a Copper Cord or Copper Companion hardware.

 

The device object

 

id: string

 

Unique identifier for the object.

 

device_type: string

 

Type of device, one of copper_Cord or poynt_P5.

 

label: string

 

Custom label given to the device for easier identification.

 

last_seen: string

 

Time at which the device was last seen  in ISO format.

 

location: string

 

The location identifier of the reader.

 

metadata: hash

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

serial_number: string

 

Serial number of the device.

 

status: string

 

The networking status of the device.

 

object: string

 

value is “device”

 

String representing the object’s type. Objects of the same type share the same value.

 

device_sw_version: string

 

The current software version of the reader.

 

ip_address: string

 

The local IP address of the reader.

 

Create a Device

 

POST /devices

 

Creates a new Device object.

 

curl https://api.usecopper.com/next/devices \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -d registration_code=”sale-put-catch” \

    -d location=loc_XXXXXXXXXXXXXXXXXXXXXXXXXX

   

 

Parameters

 

registration_code (REQUIRED)

 

A code generated by the device used for registering to an account.

 

label: optional

 

Custom label given to the device for easier identification. If no label is specified, the registration code will be used.

 

location: optional

 

The location to assign the device to. If no location is specified, the reader will be assigned to the account’s default location.

 

metadata: optional dictionary

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

 

Returns

 

Returns a Device object if creation succeeds.

 

Retrieve a Device

 

GET /devices/{identifier}

 

Retrieves a Device object.

 

curl https://api.usecopper.com/next/devices/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

 

 

Returns

 

Returns a Device object if a valid identifier was provided.

 

Update a Device

 

POST /devices/{identifier}

 

Updates a Device object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

 

curl https://api.usecopper.com/next/devices/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -d label=”Terminal 1”

 

 

Parameters

 

 

label: optional

 

The new label of the device.

 

metadata: optional dictionary

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

Returns

 

Returns an updated Device object if a valid identifier was provided.

 

Delete a Device

 

DELETE /devices/{identifier}

 

Deletes a Device object.

 

curl https://api.usecopper.com/next/devices/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -X DELETE

 

 

Returns

 

Returns the Device object that was deleted.

 

List all Devices

 

GET /devices

 

Returns a list of Device objects.

 

curl https://api.usecopper.com/next/devices \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -d limit=3 \

    -G

 

 

Parameters

 

device_type: optional enum

 

Filters readers by device type

Possible enum values: copper_Cord, poynt_P5                    

 

location: optional

 

A location ID to filter the response list to only devices at the specific location

 

status: optional enum

 

A status filter to filter readers to only offline or online readers

Possible enum values: offline, online

 

serial_number: string

 

Filter the response list to only devices matching the serial number

 

 

More parameters

 

ending_before: optional

limit: optional

starting_after: optional

 

Returns

 

A dictionary with a data property that contains an array of up to limit devices, starting after device starting_after. Each entry in the array is a separate Device object. If no more devices are available, the resulting array will be empty.

 

 

Tickets

 

The Ticket object

 

id: string

 

Unique identifier for the object.

 

currency: currency

 

Three-letter ISO currency code, in lowercase. Must be a supported currency.

 

location: string

 

ID of the location this ticket is for if one exists.

 

guests: integer

 

The number of guests.

 

discounts: array

 

List of discount objects (TBD).

 

dob: string

 

Date of business on YYYY-MM-DD form.

 

items: array

 

List of item objects (TBD).

 

name: string

 

Table or Tab name for this ticket.

 

payments: array

 

List of payment objects (TBD).

 

reference: string

 

A merchant specific reference (e.g. a check number).

 

server: string

 

The name of the server that created this ticket.

 

subtotal: integer

 

Amount of this ticket before surcharges. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).

 

surcharges: array

 

List of surcharge objects (TBD).

 

time: string

 

Time when ticket was printed in HH:MM (24h) form.

 

total: integer

 

Total amount of this ticket. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).

 

metadata: hash

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

 

object: string

 

value is “ticket”

 

List all Tickets

 

GET /tickets

 

Returns a list of Ticket objects.

 

curl https://api.usecopper.com/next/tickets \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -d location=loc_XXXXXXXXXXXXXXXXXXXXXXXXXX \

    -d limit=3 \

    -G

 

Parameters

 

location: optional

 

A location ID to filter the response list to only tickets at the specific location

 

reference: string

 

Filter the response list to only tickets matching the reference

 

ending_before: optional

limit: optional

starting_after: optional

search_query: optional

created[gte] : optional (greater than or equal)

created[gt] : optional (greater than)

created[lte] : optional (less than or equal)

created[lt] : optional (less than)

 

 

Returns

 

A dictionary with a data property that contains an array of up to limit tickets, starting after ticket starting_after. Each entry in the array is a separate tickets object. If no more tickets are available, the resulting array will be empty.

 

Retrieve a Ticket

 

GET /tickets/{identifier}

 

Retrieves a Ticket object.

 

curl https://api.usecopper.com/next/tickets/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX:

 

 

Returns

 

Returns a Ticket object if a valid identifier was provided.

 

Transactions

 

The Transaction object

 

id: string

Unique identifier for the object.

 

amount: integer

 

Amount collected by this transaction. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00).

 

approval_code: string

 

The authorization approval code for this transaction, as received from the payment processor.

 

created: string

 

Time at which the object was created in ISO format.

 

customer: hash

 

ID of the customer this transaction is for if one exists.\

 

declined: boolean

 

If the transaction failed, this Boolean represents whether it was due to the card being declined.

 

location: string

 

ID of the location this ticket is for if one exists.

 

payment_method: hash

 

Details about the payment method at the time of the transaction (TBD)

 

receipt_url: string

 

This is the URL to view the receipt for this transaction.

 

refunded: boolean

 

Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.

 

refunded_amount: integer

 

Amount in cents refunded (can be less than the amount attribute on the charge if a partial refund was issued).

 

status: string

 

The status of the transactions is either succeeded, pending, or failed.

 

ticket: string

 

ID of the ticket this charge is for if one exists.

 

tip_amount: integer

 

Tip amount.

 

metadata: hash

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

 

object: string

value is “transaction”

 

String representing the object’s type. Objects of the same type share the same value.

 

captured: boolean

 

If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.

 

failure_code: string

 

Error code explaining reason for charge failure if available (see the errors section for a list of codes).

 

refunds: list

 

A list of refunds that have been applied to the charge.

 

Retrieve a Transaction

 

GET /transactions/{identifier}

 

Retrieves a Transaction object.

 

curl https://api.usecopper.com/next/transactions/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX:

 

Returns

 

Returns a Transaction object if a valid identifier was provided.

 

Create a Transaction

 

POST /transactions

 

Creates a Transaction object.

 

curl 'https://api.usecopper.com/next/transactions' \

   -d payment_type=card \

   -d "card[brand]"=Visa \

   -d "card[last4]"=1111 \

   -d "card[number]"=4444333322221111 \

   -d "card[expiry]"=1222 \

   -d "card[csc]"=123 \

   -d ticket=tkt_XXXXXXXXXXXXXXXXXXXXXXXXXX \

   -d "amounts[currency]"=USD \

   -d "amounts[transaction_amount]"=17518 \

   -d "amounts[payment_amount]"=14599 \

   -d "amounts[tip_amount]"=2919

 

 

Note: You can pick one of the card numbers from here: https://helpdesk.nuvei.com/doku.php?id=developer:integration_docs:testing-guide#testing_resources

If you use a different number, just make sure to update the card brand  last4 field accordingly.

Also, transaction_amount = payment_amount + tip_amount

 

Returns

 

Returns a Transaction object

 

List all Transactions

 

GET /transactions

 

Returns a list of Transaction objects.

 

curl https://api.usecopper.com/next/transactions \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -d limit=3

    -G

 

 

Parameters

 

location: optional

 

ticket: optional

 

A ticket ID to filter the response list to only transaction of a specific ticket

 

status: optional enum

 

A status filter to filter transactions to only succeeded or failed transactions

Possible enum values: succeeded, failed

 

last4: optional

 

Filter the response list to only transactions using a card with matching last 4 digits

 

ending_before: optional

limit: optional

starting_after: optional

search_query: optional

created[gte] : optional (greater than or equal)

created[gt] : optional (greater than)

created[lte] : optional (less than or equal)

created[lt] : optional (less than)

 

 

Returns

 

A dictionary with a data property that contains an array of up to limit transactions, starting after transactions starting_after. Each entry in the array is a separate transaction object. If no more transactions are available, the resulting array will be empty.

 

 

Refunds

 

Refund objects allow you to refund a transactions that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.

 

The refund object

 

id: string

 

Unique identifier for the object.

 

amount: integer

 

Amount, in cents.

 

transaction: string

 

ID of the transaction that was refunded.

 

currency: currency

 

Three-letter ISO currency code, in lowercase. Must be a supported currency.

           

metadata: hash

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

 

reason: string

 

Reason for the refund, either user-provided or generated by Copper internally.

 

status: string

 

Status of the refund. This can be succeeded, or failed.

 

Create a refund

 

POST /refunds

 

When you create a new refund, you must specify a Transaction on which to create it.

 

Creating a new refund will refund a transaction that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.

 

You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded.

 

Once entirely refunded, a charge can’t be refunded again. This method will return an error when called on an already-refunded transaction, or when trying to refund more money than is left on a transaction.

 

curl https://api.usecopper.com/next/refunds \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \

    -d transaction=txn_XXXXXXXXXXXXXXXXXXXXXXXXXX \

    -d amount=100

 

 

Parameters

 

transaction: optional

 

The identifier of the charge to refund.

 

amount: optional

 

default is entire transaction

 

A positive integer in cents representing how much of this transaction to refund. Can refund only up to the remaining, unrefunded amount of the transaction.

 

metadata: optional

dictionary, default is { }

 

A set of key-value pairs that you can attach to a Refund object. This can be useful for storing additional information about the refund in a structured format. You can unset individual keys if you POST an empty value for that key. You can clear all keys if you POST an empty value for metadata

 

reason: optional

default is null

 

String indicating the reason for the refund.

 

Returns

 

Returns the Refund object if the refund succeeded. Returns an error if the Transaction has already been refunded, or if an invalid identifier was provided.

 

 

Retrieve a refund

 

GET /refunds/{identifier}

 

Retrieves the details of an existing refund.

 

curl https://api.usecopper.com/next/refunds/{identifier} \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX:

 

Returns

 

Returns a refund if a valid ID was provided. Returns an error otherwise.

 

Update a refund

 

POST /transactions/{identifier}

 

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

 

This request only accepts metadata as an argument.

 

Parameters

 

metadata: optional dictionary

 

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

 

Returns

 

Returns the refund object if the update succeeded. This call will return an error if update parameters are invalid.

 

List all refunds

 

GET /refunds

 

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

 

curl https://api.usecopper.com/next/refunds \

    -u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX:

 

 

Parameters

 

transaction: optional

 

Only return refunds for the transaction specified by this transaction ID.

 

More parameters

 

ending_before: optional

limit: optional

starting_after: optional

 

Returns

 

A dictionary with a data property that contains an array of up to limit refunds, starting after refund starting_after. Each entry in the array is a separate refund object. If no more refunds are available, the resulting array will be empty. If you provide a non-existent charge ID, this call returns an error.

 

 

 

Home

 

The Home object

 

id: string

id can be one of these gross_volume (Total sales), card_volume (Card sales), guest_count (Guests), ticket_count (Tickets) and transaction_count (Transactions)

 

average: number

currency: string

data: []

data.start_time: Date

data.end_time: Date

data.value: number

 

 

GET /charts/{id}

 

curl https://api.usecopper.com/next/charts/guest_count

-u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX:

-d start_time=1577836800000

-d end_time=1609286400000

-d unit=hour -G

 

Returns Home object

 

Parameters

 

start_date: Date

 

end_date: Date

 

unit: string

unit can be one of these hour, day, week or month