receipts

Display receipt

Request

HTTP GET from APIURL/receipts with receiptid

Example:

GET:APIURL/receipts/\{receiptid\}.xml?apikey=33893489743

Response

The same as when it was created.

Create completed order/receipt

Creates a completed order, requires Basic HTTP-authentication

Request

Parameters

Name

Required

Example

Description

Value

orderid

No

orderid=11007

The order the payment is for and the receipt is created for.

Id

payment.transactionidNopayment.transactionid=77The transcation ID for the payment.String

payment.totalamount

Yes

payment.totalamount=6360

Value of payment

Integer

payment.paymentmethodid

Yes

payment.paymentmethodid=x

Payment method NOTE: this value is specific per installation. Verify with a BRP support technician.
This affects how the receipt is accounted for.

Id

payment.valuecardnumber

No

payment.valuecardnumber=456

The number of the valuecard used for payment. This also requires that the proper payment method is specified, see above. The valuecard could be of either type "Amount" or "Units"

Integer

Example:

POST:APIURL/receipts.xml
orderid=11007
payment.totalamount=13900
payment.paymentmethodid=1

 

Response

Tag

Format

Example

Description

receipt

 

<receipt>

The receipt tag that defines a receipt for an order

id

ID

<id>4845</id>

Unique ID

typeString<type>receipt</type>

"receipt" if a regular receipt.
"delivery" if a delivery receipt.

created

Time

<created>2013-04-21 13:54</created>

When the receipt was created

number

Integer

<number>50034</number>

Counter

transactionidString
<transactionid>77</transactionid>
Transaction ID

customer

 

<customer>

The customer

id

ID

<id>5</id>

The customer's unique ID

number

String

<number>10004</number>

Customer number

name

String

<name>John Doe</name>

The customer's first and last name

streetaddress

String

<streetaddress>Main Street 10A</streetaddress>

Street

postaladdress

String

<postaladdress>590 23 Springfield</postaladdress>

Zip code and city

country

String

<country>Sweden</country>

Country

businessunit

 

<businessunit><id>11</id><name>Center facility</name></businessunit>

The business unit the booking belongs to

company <company><name>AcmeLLC</name><orgnumber>555555-5555</orgnumber><bankgiro>1111111</bankgiro><postgiro>22222</postgiro></company>Company information

items

 

<items>

The items tag surrounds the bookings, item below

invoicepayments

 

<invoicepayments>

The invoicepayments tag surrounds paid invoices

id

ID

<id>17059</id>

Unique ID for the invoice payment

invoiceid

ID

<invoiceid>54</invoiceid>

ID fo the paid invoice

invoicenumber

String

<invoicenumber>F2489</invoicenumber>

The number of the paid invoice

priceexvat

Integer

<priceexvat>2500</priceexvat>

The amount paid without VAT in cents/ören

priceincvat

Integer

<priceincvat>2650</priceincvat>

The amount paid including VAT in cents/ören

amount

Integer

<amount>6360</amount>

Inoice amount in cents/ören

vatsums

 

<vatsums>

VAT percentages with different VATs are applicable

vatsum

 

<vatsum>

VAT group

rate

Integer

<rate>6</rate>

VAT percentage

amount

Integer

<amount>360</amount>

The amount paid for the specified VAT group in cents/ören

<receipt>
  <id>4845</id>
  <type>receipt</type>
  <created>2012-04-10 12:59</created>
  <number>3000034</number>
  <transactionid>77</transactionid>
  <customer>
    <id>5</id>
    <number>10004</number>
    <name>John Doe</name>
    <streetaddress>Mainstreet 10A</streetaddress>
    <postaladdress>590 23 Springfield</postaladdress>
    <country>Sweden</country>
  </customer>
  <businessunit>
    <id>2</id>
    <name>Center facility</name>
  </businessunit>
  <company>
	<name>Acme LLC</name>
	<orgnumber>555555-5555</orgnumber>
	<bankgiro>1111111</bankgiro>
	<postgiro>22222</postgiro>
  </company>
  <items>
    See table below
  </items>
  <invoicepayments>
    <invoicepayment>
      <id>17059</id>
      <invoiceid>54</invoiceid>
      <invoicenumber>F2489</invoicenumber>
      <priceexvat>2500</priceexvat>
      <priceincvat>2650</priceincvat>
    </invoicepayment>
  </invoicepayments>
  <amount>9010</amount>
  <vatsums>
    <vatsum>
      <rate>6</rate>
      <amount>510</amount>
    </vatsum>
  </vatsums>
</receipt>

Item-tag

Each item/order row/booking contains the following fields

Tag

Format

Example

Description

id

ID

<id>17043</id>

A unique ID for the registerorderitem

orderitemidID<orderitemid>333</orderitemid>A unique ID for the orderitem the payment is for and the receipt is created for

producttype

String

<producttype>Article</producttype>

The type of product

productname

String

<productname>Product One</productname>

The name of the product

productidID<productid>1</productid>The product ID number

numberofproducts

Integer

<numberofproducts>1</numberofproducts>

The number of units

priceexvat

Integer

<priceexvat>6000</priceexvat>

The price excluding VAT in cents/ören

priceincvat

Integer

<priceincvat>6360</priceincvat>

The price including VAT in cents/ören

The applicable tags may vary depending on the type of product used.

Article
<item>
  <id>17043</id>
  <producttype>Article</producttype>
  <productname>Product One</productname>
  <productid>1</productid>
  <numberofproducts>1</numberofproducts>
  <priceexvat>6000</priceexvat>
  <priceincvat>6360</priceincvat>
</item>
Entry

Tag

Format

Example

Description

entries

 

 

Encloses the entry

entry

 

<entry>

An entry

id

ID

<id>207</id>

The entry ID

cardnumber

Integer

<cardnumber>9403083844703985</cardnumber>

The entry's card number. Always 16 characters. Always start with a 9.

validuntil

Time

<validuntil><timepoint><timestamp>1332442800</timestamp><datetime>2012-03-22 20:00</datetime><date>2012-03-22</date><time>20:00</time></timepoint></validuntil>

Valid length of visit

<item>
 <id>29843</id>
 <producttype>Entry</producttype>
 <productname>Drop-in swimming adult</productname>
 <productid>1</productid>
 <numberofproducts>1</numberofproducts>
 <priceexvat>4000</priceexvat>
 <priceincvat>4000</priceincvat>
 <entries>
   <entry>
     <id>207</id>
     <cardnumber>9403083844703985</cardnumber>           
     <validuntil>
       <timepoint>
         <timestamp>1332442800</timestamp>
         <datetime>2012-03-22 20:00</datetime>
         <date>2012-03-22</date>
         <time>20:00</time>
       </timepoint>
     </validuntil>
   </entry>
  </entries>
</item>
Valuecard

Tag

Format

Example

Description

 valuecard

 

 <valuecard>

Se Valuecards 
<item>
  <id>15433</id>
  <producttype>Valuecard</producttype>
  <productname>Gift card</productname>
  <productid>1</productid>
  <numberofproducts>1</numberofproducts>
  <priceexvat>80000</priceexvat>
  <priceincvat>100000</priceincvat>
  <valuecard>
    See valuecards
  </valuecard>
</item>
Event

Tag

Format

Example

Description

 participant String <participant>John Doe</participant>The name of the participant
eventidID<id>2</id>Event id
<item>
  <id>21347</id>
  <producttype>Event</producttype>
  <productid>1</productid>
  <productname>Salsa dancing for beginners</productname>
  <numberofproducts>1</numberofproducts>
  <priceexvat>15000</priceexvat>
  <priceincvat>18750</priceincvat>
  <participant>John Doe<participant>
  <eventid>3</eventid>
</item>

 

Groupactivity

Tag

Format

Example

Description

 participant String <participant>John Doe</participant>The name of the participant
activityidID<id>2</id>Activity id
<item>
  <id>21347</id>
  <producttype>groupActivity</producttype>
  <productid>1</productid>
  <productname>Zumba</productname>
  <numberofproducts>1</numberofproducts>
  <priceexvat>15000</priceexvat>
  <priceincvat>18750</priceincvat>
  <participant>John Doe<participant>
  <activityid>3</activityid>
</item>
Subscription

Tag

Format

Example

Description

 userid ID <userid>22</userid>ID of the user of the subscription
subscriptionidID<subscriptionid>74</subscriptionid>ID of the subscription
<item>
  <id>21347</id>
  <producttype>Event</producttype>
  <productid>1</productid>
  <productname>Salsa dancing for beginners</productname>
  <numberofproducts>1</numberofproducts>
  <priceexvat>15000</priceexvat>
  <priceincvat>18750</priceincvat>
  <userid>22</userid>
  <subscriptionid>74</subscriptionid>  
</item>