Skip to content

Commit

Permalink
Update document with open amount.
Browse files Browse the repository at this point in the history
  • Loading branch information
ppostma committed Feb 11, 2019
1 parent c871cb2 commit bcd09cd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,22 @@ To retrieve a single payment request:
payment_request = client.payment_requests.get("platform_token", "user_token", "payment_request_token")
```

Create a new payment request for an existing user:
Create a new payment request (i.e. Tikkie) for an existing user:

```ruby
payment_request = client.payment_requests.create("platform_token", "user_token", "bank_account_token",
amount: "5.00",
amount: "5.00", # optional
currency: "EUR",
description: "Test",
external_id: "Invoice 12345" # optional
external_id: "Invoice 12345" # mandatory only when platform_usage is set to `FOR_MYSELF`
)

tikkie_url = payment_request.payment_request_url
payment_request_token = payment_request.payment_request_token
```

The parameter `amount` is optional. When omitted, it will create a payment request with an open amount, where the payer can decide on the amount.

### Error handling

All responses to an API request include the methods `success?` and `error?` to determine whether the API call was successful or not. When the API request was not successful, the method `errors` will return details about the error response.
Expand Down

0 comments on commit bcd09cd

Please sign in to comment.