SlimPay Developer Center

  • REST API
  • File Transfer
  • Resources
  • Overview
  • Use Case Guides
  • Reference
  • Browser
 
Getting Started
  • Choosing the right HTTP client
  • Get an access token
  • Retrieving URLs
  • Where to next?
Enroll your customers
  • Checkout Integration Types
  • SlimPay Checkout
  • Checkout Api
  • Setting Up SlimCollect
  • Import an Existing Mandate
  • Add a Document Signature
Collect payments
  • Add a First Payment
  • Collect Payments by Direct Debit
Webhook
  • Configuration
  • Notification
  • Security
Monitor activity
  • Handle Payment Issues
  • Refund Payments
  • Update the Payment Method

Add a First Payment During Checkout

SlimPay’s powerful Checkout solution allows you to enroll your customers and collect a first payment simultaneously. While setting up a customer for direct debit or SlimCollect payments, you can also collect a first payment in the same transaction!

You can also create a payment in the notification or return URL at the end of a Checkout transaction. You can find step-by-step guides on this in our server to server payments section.

Please note

This guide does not cover the basics of API authentication or the format of requests and responses. Please review these sections if you are unfamiliar with these concepts.

To add a first payment during Checkout, we simply need to add an additional payment order item when creating the order.

    'items' => [
        [
            // Your already existing order item of type
            // signMandate
        ],
        [
            'type' => 'payment',
            'action' => 'create',
            'payin' => [
                'amount' => 29.99,
                'scheme' => null,
                'reference' => null,
                'label' => 'First payment for your subscription to Hooli Magazine',
                'executionDate' => null
            ]
        ]
    ]

The table below lists all of the parameters that you need to collect a customer’s first payment. Be sure to include all the properties that are mandatory, as well as any optional ones you wish.
All of the data you provide must conform to the constraints outlined in our comprehensive API reference.

ParameterMandatoryFormatMax length
payment reference
If null, SlimPay will generate a unique reference for this payment.
Alphanumeric without special characters35
amount YESDecimal19
currency
  • EUR
ISO 42173
scheme
  • null: same scheme as the one used for the order
Alphanumeric35
label
Label to appear in the bank statement.
Alphanumeric140
executionDate
As soon as possible if null.
A date, formatted to ISO 8601 standard
E.g. 2016-11-03T00:00:00.000+0100
28

You can retrieve the payment once the order is closed.completed using the get-payment relation:

// The order
$order = $hapiClient->sendFollow($follow);
$orderReference = $order->getState()['reference'];

// The payment created
$rel = new Hal\CustomRel('https://api.slimpay.net/alps#get-payment');
$follow = new Http\Follow($rel);
$payment = $hapiClient->sendFollow($follow, $order);

And that’s it, you’ve added a first payment to the Checkout! To complete the process, just follow steps 2 and 3 from the direct debit or SlimCollect guides!

 
SlimPay
  • Developer Center
  • Help Center
  • Website
  • REST API
    • Overview
    • Guides
    • Reference
    • Browser
    • Clients
  • File Transfer
    • Overview
    • Checkout
    • Payments
    • Payments Issues
    • Account Reporting
  • Resources
    • FAQ
    • IBANs