Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
99 lines (73 sloc) 2.33 KB

Getting started

Let's create an account, invite a user to, create a transaction and capture that transaction using only the API.

  1. Register your app

    curl -i \
    	-d name="My new app"

    Should return something like:

    	"app": {
    		"id": "56983e109967856f4ea4aa71",
    		"name": "My new app",
    		"key": "416766b7-6d64-446c-a918-6df8e6e7cbf4"

    Save these details.

  2. Create a merchant account

    Using the key from above we are now going to create a merchant account:

    curl -i \
    	-u :416766b7-6d64-446c-a918-6df8e6e7cbf4 \
    	-d test="yes" \
    	-d name="My webshop" \
    	-d email="" \
    	-d currency="USD" \
    	-d website="" \
    	-d descriptor="My webshop" \
    	-d company[country]="DK"

    Should return something along the lines of:

    	"merchant": {
    		"id": "569843df9967856f4ea4aa77",
    		"key": "f4f516ab-f253-4f76-a924-67b6486d42e4",

    The id value is used for referencing the merchant account later.

    The key attribute is the public key used for creating new transactions.

    Follow the examples at to set up the frontend for payments and create a test sale using the card number 4100 0000 0000 0000.

  3. Invite your email to the account (optional)

    Still using your app for authentication and you new account's ID, you can now invite your email to get access via

    curl -i \
    	-u :416766b7-6d64-446c-a918-6df8e6e7cbf4 \
    	-d email=""
  4. Fetch all transactions

    If you have set up a frontend and created some test sales, we can pull the list of those:

    curl -i \
    	-u :416766b7-6d64-446c-a918-6df8e6e7cbf4

    This will give you all sorts of information about the transaction, but make a note of id and amount.

  5. Capture a transaction

    Finally, let's capture the transaction in its whole:

    curl -i \
    	-u :416766b7-6d64-446c-a918-6df8e6e7cbf4
    	-d amount=100
  6. Explore

    See what else you can do in the README file.