Initiating a Payment Using a Payment Consent

Once a payment consent is ACTIVE, you can use it to initiate payments on the customer's behalf without any further customer involvement.

To initiate a payment, call the Initiate Payment endpoint and include the consent_id in the provider_method_parameters.

Prerequisites

Before initiating a payment with a consent, make sure that:

  • The consent is ACTIVE — Only consents with the status ACTIVE can be used. Consents in any other status will be rejected.
  • The provider and method match — The provider and method in your payment request must match the ones the consent was created with. For example, a consent created with bankgirot/autogiro can only be used for bankgirot/autogiro payments.

Provider Method Parameters

ProviderMethodRequired ParametersDescription
bankgirotautogiroconsent_idThe ID of the active Autogiro consent.
swishrecurringconsent_id, messageThe ID of the active Swish consent and a message shown to the customer (max 50 characters).

Examples

Bankgirot Autogiro

{
  "amount": 10000,
  "currency": "SEK",
  "provider": "bankgirot",
  "method": "autogiro",
  "provider_method_parameters": {
    "consent_id": "{{consent_id}}"
  }
}

Swish Recurring

{
  "amount": 5000,
  "currency": "SEK",
  "provider": "swish",
  "method": "recurring",
  "provider_method_parameters": {
    "consent_id": "{{consent_id}}",
    "message": "Monthly subscription fee"
  }
}