post https://checkout-api.frisbii.com/v1/session/charge
Examples
Charge session potentially creating customer if not already exists.
curl -X POST \
  --url https://checkout-api.frisbii.com/v1/session/charge \
  -u 'priv_xxxx:' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "order": {
    "handle": "order-12345",
    "customer": {
        "handle": "customer-123",
        "first_name": "John",
        "last_name": "Doe",
        "phone":"+4531313131"
    },
    "amount": 50000
  },
  "accept_url":"https://webshop.com/accept/order-12345",
  "cancel_url":"https://webshop.com/decline/order-12345"
}'Charge session also creating a saved payment method for later recurring use (e.g. for merchant initiated payments or as payment method on subscription). Currency definedmaybe different from account default.
curl -X POST \
  --url https://checkout-api.frisbii.com/v1/session/charge \
  -u 'priv_xxxx:' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
    "recurring": true,
    "order": {
        "ordertext": "Awesome product",
        "handle": "order-12345",
        "amount": 10000,
        "currency": "EUR",
        "customer":{
            "email":"[email protected]",
            "handle":"customer-1",
            "first_name":"John",
            "last_name":"Doe"
        }
    },
    "accept_url":"https://webshop.com/accept/order-12345",
    "cancel_url":"https://webshop.com/decline/order-12345"
}'Errors
The operation can generate the following errors beside the generic HTTP error codes described here.
| Error code | HTTP code | Description | 
|---|---|---|
| 601 | 400 | Could not find any available payments methods. Payment options must be configured in the administration to create a session | 
| 603 | 404 | Configuration not found | 
| 604 | 400 | Card-on-file not allowed for session storing credentials | 
| 79 | 400 | Invoice already settled | 
| 105 | 400 | Invoice already authorized | 
| 29 | 400 | Invoice already cancelled | 
| 71 | 400 | The customer is deleted | 
| 11 | 400 | Duplicate customer handle provided | 
| 18 | 400 | Customer could not be determined from either reference, create customer object or payment method source | 
| 99 | 400 | Customer object given does not match handle of existing customer or handle given does not match existing customer reference | 
| 24 | 400 | No amount or order lines was provided | 
| 100 | 400 | Amount change is not allowed when charging an existing invoice | 
| 80 | 400 | Existing charge has processing transactions | 
| 72 | 400 | Currency change not allowed on existing invoice or charge | 
